From db43be130d58243fe37e9928126c2299066e3b98 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Thu, 7 Nov 2019 14:53:12 -0800 Subject: [PATCH 01/50] Fix missing semicolon --- src/testRunner/externalCompileRunner.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/testRunner/externalCompileRunner.ts b/src/testRunner/externalCompileRunner.ts index a27bd58903e..d9c366001d2 100644 --- a/src/testRunner/externalCompileRunner.ts +++ b/src/testRunner/externalCompileRunner.ts @@ -188,7 +188,7 @@ function stripRushStageNumbers(result: string): string { } function stripWebpackHash(result: string): string { - return result.replace(/Hash: \w+/g, "Hash: [redacted]") + return result.replace(/Hash: \w+/g, "Hash: [redacted]"); } function sanitizeSizes(result: string): string { From 4cbace7110b67d2446e588e5e734aa60d80fc038 Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Thu, 7 Nov 2019 14:55:13 -0800 Subject: [PATCH 02/50] Add "auto" to importModuleSpecifierPreference (#34981) * Add "auto" to importModuleSpecifierPreference * Update APIs --- src/compiler/types.ts | 2 +- src/server/protocol.ts | 2 +- tests/baselines/reference/api/tsserverlibrary.d.ts | 4 ++-- tests/baselines/reference/api/typescript.d.ts | 2 +- tests/cases/fourslash/fourslash.ts | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 330aa5b511f..3b387d6ec1e 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -6458,7 +6458,7 @@ namespace ts { readonly includeCompletionsForModuleExports?: boolean; readonly includeAutomaticOptionalChainCompletions?: boolean; readonly includeCompletionsWithInsertText?: boolean; - readonly importModuleSpecifierPreference?: "relative" | "non-relative"; + readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative"; /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ readonly importModuleSpecifierEnding?: "minimal" | "index" | "js"; readonly allowTextChangesInNewFiles?: boolean; diff --git a/src/server/protocol.ts b/src/server/protocol.ts index 925e7638f9d..b91f7f4708f 100644 --- a/src/server/protocol.ts +++ b/src/server/protocol.ts @@ -3013,7 +3013,7 @@ namespace ts.server.protocol { * values, with insertion text to replace preceding `.` tokens with `?.`. */ readonly includeAutomaticOptionalChainCompletions?: boolean; - readonly importModuleSpecifierPreference?: "relative" | "non-relative"; + readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative"; readonly allowTextChangesInNewFiles?: boolean; readonly lazyConfiguredProjectsFromExternalProject?: boolean; readonly providePrefixAndSuffixTextForRename?: boolean; diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index c156e655b81..94c856cfd04 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -3174,7 +3174,7 @@ declare namespace ts { readonly includeCompletionsForModuleExports?: boolean; readonly includeAutomaticOptionalChainCompletions?: boolean; readonly includeCompletionsWithInsertText?: boolean; - readonly importModuleSpecifierPreference?: "relative" | "non-relative"; + readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative"; /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ readonly importModuleSpecifierEnding?: "minimal" | "index" | "js"; readonly allowTextChangesInNewFiles?: boolean; @@ -8304,7 +8304,7 @@ declare namespace ts.server.protocol { * values, with insertion text to replace preceding `.` tokens with `?.`. */ readonly includeAutomaticOptionalChainCompletions?: boolean; - readonly importModuleSpecifierPreference?: "relative" | "non-relative"; + readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative"; readonly allowTextChangesInNewFiles?: boolean; readonly lazyConfiguredProjectsFromExternalProject?: boolean; readonly providePrefixAndSuffixTextForRename?: boolean; diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 77516a9c360..433217ee422 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -3174,7 +3174,7 @@ declare namespace ts { readonly includeCompletionsForModuleExports?: boolean; readonly includeAutomaticOptionalChainCompletions?: boolean; readonly includeCompletionsWithInsertText?: boolean; - readonly importModuleSpecifierPreference?: "relative" | "non-relative"; + readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative"; /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ readonly importModuleSpecifierEnding?: "minimal" | "index" | "js"; readonly allowTextChangesInNewFiles?: boolean; diff --git a/tests/cases/fourslash/fourslash.ts b/tests/cases/fourslash/fourslash.ts index cd184df3bed..d93ad08ed07 100644 --- a/tests/cases/fourslash/fourslash.ts +++ b/tests/cases/fourslash/fourslash.ts @@ -584,7 +584,7 @@ declare namespace FourSlashInterface { readonly includeCompletionsForModuleExports?: boolean; readonly includeInsertTextCompletions?: boolean; readonly includeAutomaticOptionalChainCompletions?: boolean; - readonly importModuleSpecifierPreference?: "relative" | "non-relative"; + readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative"; readonly importModuleSpecifierEnding?: "minimal" | "index" | "js"; } interface CompletionsOptions { From 53d2b7ed601969830a3d21911e478c63219c5cc0 Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Thu, 7 Nov 2019 14:55:54 -0800 Subject: [PATCH 03/50] =?UTF-8?q?Don=E2=80=99t=20assume=20importing=20some?= =?UTF-8?q?=20JSON=20means=20you=20want=20everything=20imported=20with=20.?= =?UTF-8?q?js=20extensions=20(#34961)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/compiler/moduleSpecifiers.ts | 4 ++-- src/compiler/utilities.ts | 4 ---- .../cases/fourslash/importNameCodeFix_withJson.ts | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 tests/cases/fourslash/importNameCodeFix_withJson.ts diff --git a/src/compiler/moduleSpecifiers.ts b/src/compiler/moduleSpecifiers.ts index 564cb4db2c4..1850220a411 100644 --- a/src/compiler/moduleSpecifiers.ts +++ b/src/compiler/moduleSpecifiers.ts @@ -30,7 +30,7 @@ namespace ts.moduleSpecifiers { function getPreferencesForUpdate(compilerOptions: CompilerOptions, oldImportSpecifier: string): Preferences { return { relativePreference: isExternalModuleNameRelative(oldImportSpecifier) ? RelativePreference.Relative : RelativePreference.NonRelative, - ending: hasJSOrJsonFileExtension(oldImportSpecifier) ? + ending: hasJSFileExtension(oldImportSpecifier) ? Ending.JsExtension : getEmitModuleResolutionKind(compilerOptions) !== ModuleResolutionKind.NodeJs || endsWith(oldImportSpecifier, "index") ? Ending.Index : Ending.Minimal, }; @@ -163,7 +163,7 @@ namespace ts.moduleSpecifiers { } function usesJsExtensionOnImports({ imports }: SourceFile): boolean { - return firstDefined(imports, ({ text }) => pathIsRelative(text) ? hasJSOrJsonFileExtension(text) : undefined) || false; + return firstDefined(imports, ({ text }) => pathIsRelative(text) ? hasJSFileExtension(text) : undefined) || false; } function numberOfDirectorySeparators(str: string) { diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 7ee5dcd8278..935c528ebe2 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -8131,10 +8131,6 @@ namespace ts { return some(supportedJSExtensions, extension => fileExtensionIs(fileName, extension)); } - export function hasJSOrJsonFileExtension(fileName: string): boolean { - return supportedJSAndJsonExtensions.some(ext => fileExtensionIs(fileName, ext)); - } - export function hasTSFileExtension(fileName: string): boolean { return some(supportedTSExtensions, extension => fileExtensionIs(fileName, extension)); } diff --git a/tests/cases/fourslash/importNameCodeFix_withJson.ts b/tests/cases/fourslash/importNameCodeFix_withJson.ts new file mode 100644 index 00000000000..49d449b7b04 --- /dev/null +++ b/tests/cases/fourslash/importNameCodeFix_withJson.ts @@ -0,0 +1,15 @@ +/// + +// @Filename: /a.ts +////export const a = 'a'; + +// @Filename: /b.ts +////import "./anything.json"; +//// +////a/**/ + +goTo.file("/b.ts"); +verify.importFixAtPosition([`import "./anything.json"; +import { a } from "./a"; + +a`]); From 165b4bc10057e763429d44f9d4e4d70eade9a5e9 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Thu, 7 Nov 2019 17:14:16 -0800 Subject: [PATCH 04/50] More version sanitization --- src/testRunner/externalCompileRunner.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/testRunner/externalCompileRunner.ts b/src/testRunner/externalCompileRunner.ts index d9c366001d2..8fb4715b30c 100644 --- a/src/testRunner/externalCompileRunner.ts +++ b/src/testRunner/externalCompileRunner.ts @@ -222,7 +222,8 @@ function sanitizeVersionSpecifiers(result: string): string { .replace(/\d+.\d+.\d+-insiders.\d\d\d\d\d\d\d\d/g, "X.X.X-insiders.xxxxxxxx") .replace(/Rush Multi-Project Build Tool (\d+)\.\d+\.\d+/g, "Rush Multi-Project Build Tool $1.X.X") .replace(/([@v\()])\d+\.\d+\.\d+/g, "$1X.X.X") - .replace(/webpack \d+\.\d+\.\d+/g, "$1.X.X"); + .replace(/webpack (\d+)\.\d+\.\d+/g, "webpack $1.X.X") + .replace(/Webpack version: (\d+)\.\d+\.\d+/g, "Webpack version: $1.X.X"); } /** From 3a5230ab3de37dc7ded6aa45661c95476c6e29f3 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 9 Nov 2019 07:52:39 -0800 Subject: [PATCH 05/50] Defer switch exhaustiveness checks (#35000) * Defer switch exhaustiveness checks until they're actually needed * Add regression test * Accept new baselines --- src/compiler/checker.ts | 28 +++++++++++++++++-- .../exhaustiveSwitchStatements1.errors.txt | 13 +++++++++ .../reference/exhaustiveSwitchStatements1.js | 25 +++++++++++++++++ .../exhaustiveSwitchStatements1.symbols | 22 +++++++++++++++ .../exhaustiveSwitchStatements1.types | 28 +++++++++++++++++++ .../exhaustiveSwitchStatements1.ts | 13 +++++++++ 6 files changed, 126 insertions(+), 3 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c3faa45cd54..824836e4db7 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -19294,9 +19294,6 @@ namespace ts { else if (containsMatchingReferenceDiscriminant(reference, expr)) { type = declaredType; } - else if (flow.clauseStart === flow.clauseEnd && isExhaustiveSwitchStatement(flow.switchStatement)) { - return unreachableNeverType; - } } return createFlowType(type, isIncomplete(flowType)); } @@ -19305,6 +19302,7 @@ namespace ts { const antecedentTypes: Type[] = []; let subtypeReduction = false; let seenIncomplete = false; + let bypassFlow: FlowSwitchClause | undefined; for (const antecedent of flow.antecedents!) { if (antecedent.flags & FlowFlags.PreFinally && (antecedent).lock.locked) { // if flow correspond to branch from pre-try to finally and this branch is locked - this means that @@ -19312,6 +19310,11 @@ namespace ts { // in this case we should ignore this branch. continue; } + if (!bypassFlow && antecedent.flags & FlowFlags.SwitchClause && (antecedent).clauseStart === (antecedent).clauseEnd) { + // The antecedent is the bypass branch of a potentially exhaustive switch statement. + bypassFlow = antecedent; + continue; + } const flowType = getTypeAtFlowNode(antecedent); const type = getTypeFromFlowType(flowType); // If the type at a particular antecedent path is the declared type and the @@ -19332,6 +19335,25 @@ namespace ts { seenIncomplete = true; } } + if (bypassFlow) { + const flowType = getTypeAtFlowNode(bypassFlow.antecedent); + const type = getTypeFromFlowType(flowType); + // If the bypass flow contributes a type we haven't seen yet and the switch statement + // isn't exhaustive, process the bypass flow type. Since exhaustiveness checks increase + // the risk of circularities, we only want to perform them when they make a difference. + if (!contains(antecedentTypes, type) && !isExhaustiveSwitchStatement(bypassFlow.switchStatement)) { + if (type === declaredType && declaredType === initialType) { + return type; + } + antecedentTypes.push(type); + if (!isTypeSubsetOf(type, declaredType)) { + subtypeReduction = true; + } + if (isIncomplete(flowType)) { + seenIncomplete = true; + } + } + } return createFlowType(getUnionOrEvolvingArrayType(antecedentTypes, subtypeReduction ? UnionReduction.Subtype : UnionReduction.Literal), seenIncomplete); } diff --git a/tests/baselines/reference/exhaustiveSwitchStatements1.errors.txt b/tests/baselines/reference/exhaustiveSwitchStatements1.errors.txt index d6be1215e16..61f80f6ed3d 100644 --- a/tests/baselines/reference/exhaustiveSwitchStatements1.errors.txt +++ b/tests/baselines/reference/exhaustiveSwitchStatements1.errors.txt @@ -212,4 +212,17 @@ tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts(7,9): error T case Animal.CAT: return Animal.CAT } } + + // Repro from #34840 + + function foo() { + const foo: number | undefined = 0; + while (true) { + const stats = foo; + switch (stats) { + case 1: break; + case 2: break; + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/exhaustiveSwitchStatements1.js b/tests/baselines/reference/exhaustiveSwitchStatements1.js index b7da0e008b3..c29ecfe8af3 100644 --- a/tests/baselines/reference/exhaustiveSwitchStatements1.js +++ b/tests/baselines/reference/exhaustiveSwitchStatements1.js @@ -207,6 +207,19 @@ function expression(): Animal { case Animal.CAT: return Animal.CAT } } + +// Repro from #34840 + +function foo() { + const foo: number | undefined = 0; + while (true) { + const stats = foo; + switch (stats) { + case 1: break; + case 2: break; + } + } +} //// [exhaustiveSwitchStatements1.js] @@ -405,6 +418,17 @@ function expression() { case Animal.CAT: return Animal.CAT; } } +// Repro from #34840 +function foo() { + var foo = 0; + while (true) { + var stats = foo; + switch (stats) { + case 1: break; + case 2: break; + } + } +} //// [exhaustiveSwitchStatements1.d.ts] @@ -469,3 +493,4 @@ declare const zoo: { animal: Animal; } | undefined; declare function expression(): Animal; +declare function foo(): void; diff --git a/tests/baselines/reference/exhaustiveSwitchStatements1.symbols b/tests/baselines/reference/exhaustiveSwitchStatements1.symbols index 3797f342228..9dade3d21c6 100644 --- a/tests/baselines/reference/exhaustiveSwitchStatements1.symbols +++ b/tests/baselines/reference/exhaustiveSwitchStatements1.symbols @@ -543,3 +543,25 @@ function expression(): Animal { } } +// Repro from #34840 + +function foo() { +>foo : Symbol(foo, Decl(exhaustiveSwitchStatements1.ts, 207, 1)) + + const foo: number | undefined = 0; +>foo : Symbol(foo, Decl(exhaustiveSwitchStatements1.ts, 212, 9)) + + while (true) { + const stats = foo; +>stats : Symbol(stats, Decl(exhaustiveSwitchStatements1.ts, 214, 13)) +>foo : Symbol(foo, Decl(exhaustiveSwitchStatements1.ts, 212, 9)) + + switch (stats) { +>stats : Symbol(stats, Decl(exhaustiveSwitchStatements1.ts, 214, 13)) + + case 1: break; + case 2: break; + } + } +} + diff --git a/tests/baselines/reference/exhaustiveSwitchStatements1.types b/tests/baselines/reference/exhaustiveSwitchStatements1.types index 0eb327c9d6d..6a9f9109d12 100644 --- a/tests/baselines/reference/exhaustiveSwitchStatements1.types +++ b/tests/baselines/reference/exhaustiveSwitchStatements1.types @@ -634,3 +634,31 @@ function expression(): Animal { } } +// Repro from #34840 + +function foo() { +>foo : () => void + + const foo: number | undefined = 0; +>foo : number | undefined +>0 : 0 + + while (true) { +>true : true + + const stats = foo; +>stats : number +>foo : number + + switch (stats) { +>stats : number + + case 1: break; +>1 : 1 + + case 2: break; +>2 : 2 + } + } +} + diff --git a/tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts b/tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts index 72de718411f..5f59a6d00df 100644 --- a/tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts +++ b/tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts @@ -210,3 +210,16 @@ function expression(): Animal { case Animal.CAT: return Animal.CAT } } + +// Repro from #34840 + +function foo() { + const foo: number | undefined = 0; + while (true) { + const stats = foo; + switch (stats) { + case 1: break; + case 2: break; + } + } +} From 5c951635e511aa0963ddf42f66d3df64e08e0533 Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Mon, 11 Nov 2019 11:24:20 -0800 Subject: [PATCH 06/50] Fix chalk import (#35040) --- scripts/build/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build/utils.js b/scripts/build/utils.js index a67742cca68..6664a2fa67a 100644 --- a/scripts/build/utils.js +++ b/scripts/build/utils.js @@ -8,7 +8,7 @@ const mkdirp = require("mkdirp"); const del = require("del"); const File = require("vinyl"); const ts = require("../../lib/typescript"); -const { default: chalk } = require("chalk"); +const chalk = require("chalk"); const { spawn } = require("child_process"); const { CancellationToken, CancelError, Deferred } = require("prex"); const { Readable, Duplex } = require("stream"); From 94f85901d7061d5d2ffb8e1ca4a3280d7c504cbc Mon Sep 17 00:00:00 2001 From: Klaus Meinhardt Date: Tue, 12 Nov 2019 19:30:46 +0100 Subject: [PATCH 07/50] strip QuestionToken from MethodDeclaration and PropertyDeclaration emit (#34954) * strip QuestionToken from MethodDeclartion emit Fixes: #34953 * test property emit --- src/compiler/binder.ts | 5 +++-- tests/baselines/reference/optionalMethod.js | 10 ++++++++++ tests/baselines/reference/optionalProperty.js | 10 ++++++++++ .../propertyMemberDeclarations/optionalMethod.ts | 5 +++++ .../propertyMemberDeclarations/optionalProperty.ts | 6 ++++++ 5 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 tests/baselines/reference/optionalMethod.js create mode 100644 tests/baselines/reference/optionalProperty.js create mode 100644 tests/cases/conformance/classes/propertyMemberDeclarations/optionalMethod.ts create mode 100644 tests/cases/conformance/classes/propertyMemberDeclarations/optionalProperty.ts diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 992f8596d08..3372512e0bc 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -3595,7 +3595,8 @@ namespace ts { || hasModifier(node, ModifierFlags.TypeScriptModifier) || node.typeParameters || node.type - || !node.body) { + || !node.body + || node.questionToken) { transformFlags |= TransformFlags.AssertTypeScript; } @@ -3642,7 +3643,7 @@ namespace ts { let transformFlags = subtreeFlags | TransformFlags.ContainsClassFields; // Decorators, TypeScript-specific modifiers, and type annotations are TypeScript syntax. - if (some(node.decorators) || hasModifier(node, ModifierFlags.TypeScriptModifier) || node.type) { + if (some(node.decorators) || hasModifier(node, ModifierFlags.TypeScriptModifier) || node.type || node.questionToken) { transformFlags |= TransformFlags.AssertTypeScript; } diff --git a/tests/baselines/reference/optionalMethod.js b/tests/baselines/reference/optionalMethod.js new file mode 100644 index 00000000000..41680ce7261 --- /dev/null +++ b/tests/baselines/reference/optionalMethod.js @@ -0,0 +1,10 @@ +//// [optionalMethod.ts] +class Base { + method?() { } +} + + +//// [optionalMethod.js] +class Base { + method() { } +} diff --git a/tests/baselines/reference/optionalProperty.js b/tests/baselines/reference/optionalProperty.js new file mode 100644 index 00000000000..d7c37f64914 --- /dev/null +++ b/tests/baselines/reference/optionalProperty.js @@ -0,0 +1,10 @@ +//// [optionalProperty.ts] +class C { + prop?; +} + + +//// [optionalProperty.js] +class C { + prop; +} diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/optionalMethod.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/optionalMethod.ts new file mode 100644 index 00000000000..39ea6df3bd5 --- /dev/null +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/optionalMethod.ts @@ -0,0 +1,5 @@ +// @target: esnext +// @noTypesAndSymbols: true +class Base { + method?() { } +} diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/optionalProperty.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/optionalProperty.ts new file mode 100644 index 00000000000..cb563eedf18 --- /dev/null +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/optionalProperty.ts @@ -0,0 +1,6 @@ +// @target: esnext +// @useDefineForClassFields: true +// @noTypesAndSymbols: true +class C { + prop?; +} From f3344767dd8030765f57f5c5fb328402c2eef7af Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Tue, 12 Nov 2019 12:44:30 -0800 Subject: [PATCH 08/50] Fix import type resolution in jsdoc, mark 2 (#35057) Fake alias resolution only applies when the import type is followed by a qualified name. Otherwise the alias is sufficiently resolved already. --- src/compiler/checker.ts | 3 ++- ...mportTypeReferenceToCommonjsModule.symbols | 22 +++++++++++++++++++ ...cImportTypeReferenceToCommonjsModule.types | 22 +++++++++++++++++++ ...jsdocImportTypeReferenceToESModule.symbols | 16 ++++++++++++++ .../jsdocImportTypeReferenceToESModule.types | 16 ++++++++++++++ ...sdocImportTypeReferenceToCommonjsModule.ts | 14 ++++++++++++ .../jsdocImportTypeReferenceToESModule.ts | 11 ++++++++++ 7 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 tests/baselines/reference/jsdocImportTypeReferenceToCommonjsModule.symbols create mode 100644 tests/baselines/reference/jsdocImportTypeReferenceToCommonjsModule.types create mode 100644 tests/baselines/reference/jsdocImportTypeReferenceToESModule.symbols create mode 100644 tests/baselines/reference/jsdocImportTypeReferenceToESModule.types create mode 100644 tests/cases/conformance/jsdoc/jsdocImportTypeReferenceToCommonjsModule.ts create mode 100644 tests/cases/conformance/jsdoc/jsdocImportTypeReferenceToESModule.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 824836e4db7..b880eff2ba0 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -10852,7 +10852,8 @@ namespace ts { } isRequireAlias = isCallExpression(expr) && isRequireCall(expr, /*requireStringLiteralLikeArgument*/ true) && !!valueType.symbol; } - if (isRequireAlias || node.kind === SyntaxKind.ImportType) { + const isImportTypeWithQualifier = node.kind === SyntaxKind.ImportType && (node as ImportTypeNode).qualifier; + if (isRequireAlias || isImportTypeWithQualifier) { typeType = getTypeReferenceType(node, valueType.symbol); } } diff --git a/tests/baselines/reference/jsdocImportTypeReferenceToCommonjsModule.symbols b/tests/baselines/reference/jsdocImportTypeReferenceToCommonjsModule.symbols new file mode 100644 index 00000000000..6c80d04bed7 --- /dev/null +++ b/tests/baselines/reference/jsdocImportTypeReferenceToCommonjsModule.symbols @@ -0,0 +1,22 @@ +=== tests/cases/conformance/jsdoc/ex.d.ts === +declare var config: { +>config : Symbol(config, Decl(ex.d.ts, 0, 11)) + + fix: boolean +>fix : Symbol(fix, Decl(ex.d.ts, 0, 21)) +} +export = config; +>config : Symbol(config, Decl(ex.d.ts, 0, 11)) + +=== tests/cases/conformance/jsdoc/test.js === +/** @param {import('./ex')} a */ +function demo(a) { +>demo : Symbol(demo, Decl(test.js, 0, 0)) +>a : Symbol(a, Decl(test.js, 1, 14)) + + a.fix +>a.fix : Symbol(fix, Decl(ex.d.ts, 0, 21)) +>a : Symbol(a, Decl(test.js, 1, 14)) +>fix : Symbol(fix, Decl(ex.d.ts, 0, 21)) +} + diff --git a/tests/baselines/reference/jsdocImportTypeReferenceToCommonjsModule.types b/tests/baselines/reference/jsdocImportTypeReferenceToCommonjsModule.types new file mode 100644 index 00000000000..5d376c2852f --- /dev/null +++ b/tests/baselines/reference/jsdocImportTypeReferenceToCommonjsModule.types @@ -0,0 +1,22 @@ +=== tests/cases/conformance/jsdoc/ex.d.ts === +declare var config: { +>config : { fix: boolean; } + + fix: boolean +>fix : boolean +} +export = config; +>config : { fix: boolean; } + +=== tests/cases/conformance/jsdoc/test.js === +/** @param {import('./ex')} a */ +function demo(a) { +>demo : (a: { fix: boolean; }) => void +>a : { fix: boolean; } + + a.fix +>a.fix : boolean +>a : { fix: boolean; } +>fix : boolean +} + diff --git a/tests/baselines/reference/jsdocImportTypeReferenceToESModule.symbols b/tests/baselines/reference/jsdocImportTypeReferenceToESModule.symbols new file mode 100644 index 00000000000..6bd4377a512 --- /dev/null +++ b/tests/baselines/reference/jsdocImportTypeReferenceToESModule.symbols @@ -0,0 +1,16 @@ +=== tests/cases/conformance/jsdoc/ex.d.ts === +export var config: {} +>config : Symbol(config, Decl(ex.d.ts, 0, 10)) + +=== tests/cases/conformance/jsdoc/test.js === +/** @param {import('./ex')} a */ +function demo(a) { +>demo : Symbol(demo, Decl(test.js, 0, 0)) +>a : Symbol(a, Decl(test.js, 1, 14)) + + a.config +>a.config : Symbol(config, Decl(ex.d.ts, 0, 10)) +>a : Symbol(a, Decl(test.js, 1, 14)) +>config : Symbol(config, Decl(ex.d.ts, 0, 10)) +} + diff --git a/tests/baselines/reference/jsdocImportTypeReferenceToESModule.types b/tests/baselines/reference/jsdocImportTypeReferenceToESModule.types new file mode 100644 index 00000000000..d2cf23fbdd0 --- /dev/null +++ b/tests/baselines/reference/jsdocImportTypeReferenceToESModule.types @@ -0,0 +1,16 @@ +=== tests/cases/conformance/jsdoc/ex.d.ts === +export var config: {} +>config : {} + +=== tests/cases/conformance/jsdoc/test.js === +/** @param {import('./ex')} a */ +function demo(a) { +>demo : (a: typeof import("tests/cases/conformance/jsdoc/ex")) => void +>a : typeof import("tests/cases/conformance/jsdoc/ex") + + a.config +>a.config : {} +>a : typeof import("tests/cases/conformance/jsdoc/ex") +>config : {} +} + diff --git a/tests/cases/conformance/jsdoc/jsdocImportTypeReferenceToCommonjsModule.ts b/tests/cases/conformance/jsdoc/jsdocImportTypeReferenceToCommonjsModule.ts new file mode 100644 index 00000000000..63951b895bf --- /dev/null +++ b/tests/cases/conformance/jsdoc/jsdocImportTypeReferenceToCommonjsModule.ts @@ -0,0 +1,14 @@ +// @noEmit: true +// @allowJs: true +// @checkJs: true +// @Filename: ex.d.ts +declare var config: { + fix: boolean +} +export = config; + +// @Filename: test.js +/** @param {import('./ex')} a */ +function demo(a) { + a.fix +} diff --git a/tests/cases/conformance/jsdoc/jsdocImportTypeReferenceToESModule.ts b/tests/cases/conformance/jsdoc/jsdocImportTypeReferenceToESModule.ts new file mode 100644 index 00000000000..5ff0fea6d26 --- /dev/null +++ b/tests/cases/conformance/jsdoc/jsdocImportTypeReferenceToESModule.ts @@ -0,0 +1,11 @@ +// @noEmit: true +// @allowJs: true +// @checkJs: true +// @Filename: ex.d.ts +export var config: {} + +// @Filename: test.js +/** @param {import('./ex')} a */ +function demo(a) { + a.config +} From aa39080ac7bc13fcb7c584ef9ddd8f1c02bad53e Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Tue, 12 Nov 2019 13:30:27 -0800 Subject: [PATCH 09/50] Do not allow freshness to move errors out of the current file, ensure json documents are deeply unfreshened and fully widened (#35048) --- src/compiler/checker.ts | 10 ++-- .../reference/jsDeclarationsJson.types | 2 +- .../jsonFileImportChecksCallCorrectlyTwice.js | 42 +++++++++++++++++ ...FileImportChecksCallCorrectlyTwice.symbols | 41 ++++++++++++++++ ...onFileImportChecksCallCorrectlyTwice.types | 47 +++++++++++++++++++ .../jsonFileImportChecksCallCorrectlyTwice.ts | 24 ++++++++++ 6 files changed, 158 insertions(+), 8 deletions(-) create mode 100644 tests/baselines/reference/jsonFileImportChecksCallCorrectlyTwice.js create mode 100644 tests/baselines/reference/jsonFileImportChecksCallCorrectlyTwice.symbols create mode 100644 tests/baselines/reference/jsonFileImportChecksCallCorrectlyTwice.types create mode 100644 tests/cases/compiler/jsonFileImportChecksCallCorrectlyTwice.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index b880eff2ba0..94ca2129218 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7310,11 +7310,7 @@ namespace ts { if (!declaration.statements.length) { return emptyObjectType; } - const type = getWidenedLiteralType(checkExpression(declaration.statements[0].expression)); - if (type.flags & TypeFlags.Object) { - return getRegularTypeOfObjectLiteral(type); - } - return type; + return getWidenedType(getWidenedLiteralType(checkExpression(declaration.statements[0].expression))); } // Handle variable, parameter or property @@ -14807,7 +14803,7 @@ namespace ts { // JsxAttributes has an object-literal flag and undergo same type-assignablity check as normal object-literal. // However, using an object-literal error message will be very confusing to the users so we give different a message. // TODO: Spelling suggestions for excess jsx attributes (needs new diagnostic messages) - if (prop.valueDeclaration && isJsxAttribute(prop.valueDeclaration)) { + if (prop.valueDeclaration && isJsxAttribute(prop.valueDeclaration) && getSourceFileOfNode(errorNode) === getSourceFileOfNode(prop.valueDeclaration.name)) { // Note that extraneous children (as in `extra`) don't pass this check, // since `children` is a SyntaxKind.PropertySignature instead of a SyntaxKind.JsxAttribute. errorNode = prop.valueDeclaration.name; @@ -14818,7 +14814,7 @@ namespace ts { // use the property's value declaration if the property is assigned inside the literal itself const objectLiteralDeclaration = source.symbol && firstOrUndefined(source.symbol.declarations); let suggestion; - if (prop.valueDeclaration && findAncestor(prop.valueDeclaration, d => d === objectLiteralDeclaration)) { + if (prop.valueDeclaration && findAncestor(prop.valueDeclaration, d => d === objectLiteralDeclaration) && getSourceFileOfNode(objectLiteralDeclaration) === getSourceFileOfNode(errorNode)) { const propDeclaration = prop.valueDeclaration as ObjectLiteralElementLike; Debug.assertNode(propDeclaration, isObjectLiteralElementLike); diff --git a/tests/baselines/reference/jsDeclarationsJson.types b/tests/baselines/reference/jsDeclarationsJson.types index 9a0a94677ef..3294656ba33 100644 --- a/tests/baselines/reference/jsDeclarationsJson.types +++ b/tests/baselines/reference/jsDeclarationsJson.types @@ -1,7 +1,7 @@ === tests/cases/conformance/jsdoc/declarations/index.js === const j = require("./obj.json"); >j : { x: number; y: number; obj: { items: ({ x: number; y?: undefined; err?: undefined; } | { x: number; y: number; err?: undefined; } | { x: number; err: boolean; y?: undefined; })[]; }; } ->require("./obj.json") : { x: number; y: number; obj: { items: ({ x: number; } | { x: number; y: number; } | { x: number; err: boolean; })[]; }; } +>require("./obj.json") : { x: number; y: number; obj: { items: ({ x: number; y?: undefined; err?: undefined; } | { x: number; y: number; err?: undefined; } | { x: number; err: boolean; y?: undefined; })[]; }; } >require : any >"./obj.json" : "./obj.json" diff --git a/tests/baselines/reference/jsonFileImportChecksCallCorrectlyTwice.js b/tests/baselines/reference/jsonFileImportChecksCallCorrectlyTwice.js new file mode 100644 index 00000000000..a76ac7c0be1 --- /dev/null +++ b/tests/baselines/reference/jsonFileImportChecksCallCorrectlyTwice.js @@ -0,0 +1,42 @@ +//// [tests/cases/compiler/jsonFileImportChecksCallCorrectlyTwice.ts] //// + +//// [index.ts] +import data from "./data.json"; + +interface Foo { + str: string; +} + +fn(data.foo); +fn(data.foo); // <-- shouldn't error! + +function fn(arg: Foo[]) { } +//// [data.json] +{ + "foo": [ + { + "bool": true, + "str": "123" + } + ] +} + +//// [data.json] +{ + "foo": [ + { + "bool": true, + "str": "123" + } + ] +} +//// [index.js] +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +var data_json_1 = __importDefault(require("./data.json")); +fn(data_json_1["default"].foo); +fn(data_json_1["default"].foo); // <-- shouldn't error! +function fn(arg) { } diff --git a/tests/baselines/reference/jsonFileImportChecksCallCorrectlyTwice.symbols b/tests/baselines/reference/jsonFileImportChecksCallCorrectlyTwice.symbols new file mode 100644 index 00000000000..2005966a89a --- /dev/null +++ b/tests/baselines/reference/jsonFileImportChecksCallCorrectlyTwice.symbols @@ -0,0 +1,41 @@ +=== tests/cases/compiler/index.ts === +import data from "./data.json"; +>data : Symbol(data, Decl(index.ts, 0, 6)) + +interface Foo { +>Foo : Symbol(Foo, Decl(index.ts, 0, 31)) + + str: string; +>str : Symbol(Foo.str, Decl(index.ts, 2, 15)) +} + +fn(data.foo); +>fn : Symbol(fn, Decl(index.ts, 7, 13)) +>data.foo : Symbol("foo", Decl(data.json, 0, 1)) +>data : Symbol(data, Decl(index.ts, 0, 6)) +>foo : Symbol("foo", Decl(data.json, 0, 1)) + +fn(data.foo); // <-- shouldn't error! +>fn : Symbol(fn, Decl(index.ts, 7, 13)) +>data.foo : Symbol("foo", Decl(data.json, 0, 1)) +>data : Symbol(data, Decl(index.ts, 0, 6)) +>foo : Symbol("foo", Decl(data.json, 0, 1)) + +function fn(arg: Foo[]) { } +>fn : Symbol(fn, Decl(index.ts, 7, 13)) +>arg : Symbol(arg, Decl(index.ts, 9, 12)) +>Foo : Symbol(Foo, Decl(index.ts, 0, 31)) + +=== tests/cases/compiler/data.json === +{ + "foo": [ +>"foo" : Symbol("foo", Decl(data.json, 0, 1)) + { + "bool": true, +>"bool" : Symbol("bool", Decl(data.json, 2, 7)) + + "str": "123" +>"str" : Symbol("str", Decl(data.json, 3, 21)) + } + ] +} diff --git a/tests/baselines/reference/jsonFileImportChecksCallCorrectlyTwice.types b/tests/baselines/reference/jsonFileImportChecksCallCorrectlyTwice.types new file mode 100644 index 00000000000..a4e33505a9f --- /dev/null +++ b/tests/baselines/reference/jsonFileImportChecksCallCorrectlyTwice.types @@ -0,0 +1,47 @@ +=== tests/cases/compiler/index.ts === +import data from "./data.json"; +>data : { foo: { bool: boolean; str: string; }[]; } + +interface Foo { + str: string; +>str : string +} + +fn(data.foo); +>fn(data.foo) : void +>fn : (arg: Foo[]) => void +>data.foo : { bool: boolean; str: string; }[] +>data : { foo: { bool: boolean; str: string; }[]; } +>foo : { bool: boolean; str: string; }[] + +fn(data.foo); // <-- shouldn't error! +>fn(data.foo) : void +>fn : (arg: Foo[]) => void +>data.foo : { bool: boolean; str: string; }[] +>data : { foo: { bool: boolean; str: string; }[]; } +>foo : { bool: boolean; str: string; }[] + +function fn(arg: Foo[]) { } +>fn : (arg: Foo[]) => void +>arg : Foo[] + +=== tests/cases/compiler/data.json === +{ +>{ "foo": [ { "bool": true, "str": "123" } ]} : { foo: { bool: boolean; str: string; }[]; } + + "foo": [ +>"foo" : { bool: boolean; str: string; }[] +>[ { "bool": true, "str": "123" } ] : { bool: boolean; str: string; }[] + { +>{ "bool": true, "str": "123" } : { bool: boolean; str: string; } + + "bool": true, +>"bool" : boolean +>true : true + + "str": "123" +>"str" : string +>"123" : "123" + } + ] +} diff --git a/tests/cases/compiler/jsonFileImportChecksCallCorrectlyTwice.ts b/tests/cases/compiler/jsonFileImportChecksCallCorrectlyTwice.ts new file mode 100644 index 00000000000..67bdeda2050 --- /dev/null +++ b/tests/cases/compiler/jsonFileImportChecksCallCorrectlyTwice.ts @@ -0,0 +1,24 @@ +// @esModuleInterop: true +// @resolveJsonModule: true +// @strict: true +// @outDir: dist +// @filename: index.ts +import data from "./data.json"; + +interface Foo { + str: string; +} + +fn(data.foo); +fn(data.foo); // <-- shouldn't error! + +function fn(arg: Foo[]) { } +// @filename: data.json +{ + "foo": [ + { + "bool": true, + "str": "123" + } + ] +} \ No newline at end of file From 38db7ae59e1c4e539881ae4a8dd15dcdd13d237d Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Wed, 13 Nov 2019 09:22:18 -0800 Subject: [PATCH 10/50] Properly analyze switch statement bypass control flow (#35087) * Properly analyze switch statement bypass control flow * Add regression test * Accept new baselines --- src/compiler/checker.ts | 2 +- .../exhaustiveSwitchStatements1.errors.txt | 21 +++++++++- .../reference/exhaustiveSwitchStatements1.js | 30 +++++++++++++ .../exhaustiveSwitchStatements1.symbols | 38 +++++++++++++++++ .../exhaustiveSwitchStatements1.types | 42 +++++++++++++++++++ .../exhaustiveSwitchStatements1.ts | 16 +++++++ 6 files changed, 147 insertions(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 94ca2129218..0ecf7d31142 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -19333,7 +19333,7 @@ namespace ts { } } if (bypassFlow) { - const flowType = getTypeAtFlowNode(bypassFlow.antecedent); + const flowType = getTypeAtFlowNode(bypassFlow); const type = getTypeFromFlowType(flowType); // If the bypass flow contributes a type we haven't seen yet and the switch statement // isn't exhaustive, process the bypass flow type. Since exhaustiveness checks increase diff --git a/tests/baselines/reference/exhaustiveSwitchStatements1.errors.txt b/tests/baselines/reference/exhaustiveSwitchStatements1.errors.txt index 61f80f6ed3d..e958397f81a 100644 --- a/tests/baselines/reference/exhaustiveSwitchStatements1.errors.txt +++ b/tests/baselines/reference/exhaustiveSwitchStatements1.errors.txt @@ -1,7 +1,8 @@ tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts(7,9): error TS7027: Unreachable code detected. +tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts(235,5): error TS2367: This condition will always return 'false' since the types '"a" | "b"' and '"c"' have no overlap. -==== tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts (1 errors) ==== +==== tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts (2 errors) ==== function f1(x: 1 | 2): string { if (!!true) { switch (x) { @@ -225,4 +226,22 @@ tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts(7,9): error T } } } + + // Repro from #35070 + + type O = { + a: number, + b: number + }; + type K = keyof O | 'c'; + function ff(o: O, k: K) { + switch(k) { + case 'c': + k = 'a'; + } + k === 'c'; // Error + ~~~~~~~~~ +!!! error TS2367: This condition will always return 'false' since the types '"a" | "b"' and '"c"' have no overlap. + return o[k]; + } \ No newline at end of file diff --git a/tests/baselines/reference/exhaustiveSwitchStatements1.js b/tests/baselines/reference/exhaustiveSwitchStatements1.js index c29ecfe8af3..e2287cd4f81 100644 --- a/tests/baselines/reference/exhaustiveSwitchStatements1.js +++ b/tests/baselines/reference/exhaustiveSwitchStatements1.js @@ -220,6 +220,22 @@ function foo() { } } } + +// Repro from #35070 + +type O = { + a: number, + b: number +}; +type K = keyof O | 'c'; +function ff(o: O, k: K) { + switch(k) { + case 'c': + k = 'a'; + } + k === 'c'; // Error + return o[k]; +} //// [exhaustiveSwitchStatements1.js] @@ -429,6 +445,14 @@ function foo() { } } } +function ff(o, k) { + switch (k) { + case 'c': + k = 'a'; + } + k === 'c'; // Error + return o[k]; +} //// [exhaustiveSwitchStatements1.d.ts] @@ -494,3 +518,9 @@ declare const zoo: { } | undefined; declare function expression(): Animal; declare function foo(): void; +declare type O = { + a: number; + b: number; +}; +declare type K = keyof O | 'c'; +declare function ff(o: O, k: K): number; diff --git a/tests/baselines/reference/exhaustiveSwitchStatements1.symbols b/tests/baselines/reference/exhaustiveSwitchStatements1.symbols index 9dade3d21c6..6ee1e4a9889 100644 --- a/tests/baselines/reference/exhaustiveSwitchStatements1.symbols +++ b/tests/baselines/reference/exhaustiveSwitchStatements1.symbols @@ -565,3 +565,41 @@ function foo() { } } +// Repro from #35070 + +type O = { +>O : Symbol(O, Decl(exhaustiveSwitchStatements1.ts, 220, 1)) + + a: number, +>a : Symbol(a, Decl(exhaustiveSwitchStatements1.ts, 224, 10)) + + b: number +>b : Symbol(b, Decl(exhaustiveSwitchStatements1.ts, 225, 14)) + +}; +type K = keyof O | 'c'; +>K : Symbol(K, Decl(exhaustiveSwitchStatements1.ts, 227, 2)) +>O : Symbol(O, Decl(exhaustiveSwitchStatements1.ts, 220, 1)) + +function ff(o: O, k: K) { +>ff : Symbol(ff, Decl(exhaustiveSwitchStatements1.ts, 228, 23)) +>o : Symbol(o, Decl(exhaustiveSwitchStatements1.ts, 229, 12)) +>O : Symbol(O, Decl(exhaustiveSwitchStatements1.ts, 220, 1)) +>k : Symbol(k, Decl(exhaustiveSwitchStatements1.ts, 229, 17)) +>K : Symbol(K, Decl(exhaustiveSwitchStatements1.ts, 227, 2)) + + switch(k) { +>k : Symbol(k, Decl(exhaustiveSwitchStatements1.ts, 229, 17)) + + case 'c': + k = 'a'; +>k : Symbol(k, Decl(exhaustiveSwitchStatements1.ts, 229, 17)) + } + k === 'c'; // Error +>k : Symbol(k, Decl(exhaustiveSwitchStatements1.ts, 229, 17)) + + return o[k]; +>o : Symbol(o, Decl(exhaustiveSwitchStatements1.ts, 229, 12)) +>k : Symbol(k, Decl(exhaustiveSwitchStatements1.ts, 229, 17)) +} + diff --git a/tests/baselines/reference/exhaustiveSwitchStatements1.types b/tests/baselines/reference/exhaustiveSwitchStatements1.types index 6a9f9109d12..79e4483212c 100644 --- a/tests/baselines/reference/exhaustiveSwitchStatements1.types +++ b/tests/baselines/reference/exhaustiveSwitchStatements1.types @@ -662,3 +662,45 @@ function foo() { } } +// Repro from #35070 + +type O = { +>O : O + + a: number, +>a : number + + b: number +>b : number + +}; +type K = keyof O | 'c'; +>K : K + +function ff(o: O, k: K) { +>ff : (o: O, k: K) => number +>o : O +>k : K + + switch(k) { +>k : K + + case 'c': +>'c' : "c" + + k = 'a'; +>k = 'a' : "a" +>k : K +>'a' : "a" + } + k === 'c'; // Error +>k === 'c' : boolean +>k : "a" | "b" +>'c' : "c" + + return o[k]; +>o[k] : number +>o : O +>k : "a" | "b" +} + diff --git a/tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts b/tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts index 5f59a6d00df..9c03f039a8b 100644 --- a/tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts +++ b/tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts @@ -223,3 +223,19 @@ function foo() { } } } + +// Repro from #35070 + +type O = { + a: number, + b: number +}; +type K = keyof O | 'c'; +function ff(o: O, k: K) { + switch(k) { + case 'c': + k = 'a'; + } + k === 'c'; // Error + return o[k]; +} From f5bdd4dacaedfa166f113c45cd29d503e97831b9 Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Wed, 13 Nov 2019 13:13:38 -0800 Subject: [PATCH 11/50] Update user baselines (#35075) --- .../reference/docker/office-ui-fabric.log | 96 +++++- tests/baselines/reference/docker/vscode.log | 18 +- tests/baselines/reference/docker/xterm.js.log | 17 +- .../reference/user/adonis-framework.log | 6 +- tests/baselines/reference/user/prettier.log | 295 ------------------ tests/baselines/reference/user/uglify-js.log | 125 ++++---- tests/baselines/reference/user/webpack.log | 20 +- 7 files changed, 157 insertions(+), 420 deletions(-) delete mode 100644 tests/baselines/reference/user/prettier.log diff --git a/tests/baselines/reference/docker/office-ui-fabric.log b/tests/baselines/reference/docker/office-ui-fabric.log index f9dd067367f..57100adb972 100644 --- a/tests/baselines/reference/docker/office-ui-fabric.log +++ b/tests/baselines/reference/docker/office-ui-fabric.log @@ -12,9 +12,25 @@ Standard output: @uifabric/example-data: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/example-data/tsconfig.json" @uifabric/example-data: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/example-data/tsconfig.json @uifabric/example-data: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/example-data/tsconfig.json" -@uifabric/example-data: [XX:XX:XX XM] ■ Running Webpack -@uifabric/example-data: [XX:XX:XX XM] ■ Webpack Config Path: /office-ui-fabric-react/packages/example-data/webpack.config.js -@uifabric/example-data: Webpack version: 4.29.5 +@uifabric/example-data: [XX:XX:XX XM] ■ Running webpack-cli as a node process +@uifabric/example-data: [XX:XX:XX XM] ■ webpack-cli arguments: /usr/local/bin/node --max-old-space-size=4096 /office-ui-fabric-react/node_modules/webpack-cli/bin/cli.js +@uifabric/example-data: Webpack version: 4.X.X +@uifabric/example-data: Hash: [redacted] +@uifabric/example-data: Version: webpack 4.X.X +@uifabric/example-data: Child +@uifabric/example-data: Hash: [redacted] +@uifabric/example-data: Time: ?s +@uifabric/example-data: Built at: XX/XX/XX XX:XX:XX XM +@uifabric/example-data: Asset Size Chunks Chunk Names +@uifabric/example-data: example-data.js X KiB example-data [emitted] example-data +@uifabric/example-data: example-data.js.map X KiB example-data [emitted] example-data +@uifabric/example-data: Entrypoint example-data = example-data.js example-data.js.map +@uifabric/example-data: [./lib/facepile.js] X KiB {example-data} [built] +@uifabric/example-data: [./lib/index.js] X KiB {example-data} [built] +@uifabric/example-data: [./lib/listItems.js] X KiB {example-data} [built] +@uifabric/example-data: [./lib/lorem.js] X KiB {example-data} [built] +@uifabric/example-data: [./lib/people.js] X KiB {example-data} [built] +@uifabric/example-data: [./lib/testImages.js] X KiB {example-data} [built] @uifabric/example-data: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/example-data/lib/index.d.ts' @uifabric/example-data: Done in ?s. @uifabric/migration: yarn run vX.X.X @@ -40,9 +56,6 @@ Standard output: @uifabric/set-version: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/set-version/tsconfig.json" @uifabric/set-version: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/set-version/tsconfig.json @uifabric/set-version: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/set-version/tsconfig.json" -@uifabric/set-version: [XX:XX:XX XM] ■ Running Webpack -@uifabric/set-version: [XX:XX:XX XM] ■ Webpack Config Path: null -@uifabric/set-version: [XX:XX:XX XM] ■ webpack.config.js not found, skipping webpack @uifabric/set-version: Done in ?s. @uifabric/webpack-utils: yarn run vX.X.X @uifabric/webpack-utils: $ just-scripts build @@ -63,9 +76,60 @@ Standard output: @uifabric/merge-styles: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/merge-styles/tsconfig.json" @uifabric/merge-styles: [XX:XX:XX XM] ■ Running Jest @uifabric/merge-styles: [XX:XX:XX XM] ■ /usr/local/bin/node "/office-ui-fabric-react/node_modules/jest/bin/jest.js" --config "/office-ui-fabric-react/packages/merge-styles/jest.config.js" --passWithNoTests --colors --forceExit -@uifabric/merge-styles: [XX:XX:XX XM] ■ Running Webpack -@uifabric/merge-styles: [XX:XX:XX XM] ■ Webpack Config Path: /office-ui-fabric-react/packages/merge-styles/webpack.config.js -@uifabric/merge-styles: Webpack version: 4.29.5 +@uifabric/merge-styles: [XX:XX:XX XM] ■ Running webpack-cli as a node process +@uifabric/merge-styles: [XX:XX:XX XM] ■ webpack-cli arguments: /usr/local/bin/node --max-old-space-size=4096 /office-ui-fabric-react/node_modules/webpack-cli/bin/cli.js +@uifabric/merge-styles: Webpack version: 4.X.X +@uifabric/merge-styles: Hash: [redacted] +@uifabric/merge-styles: Version: webpack 4.X.X +@uifabric/merge-styles: Child +@uifabric/merge-styles: Hash: [redacted] +@uifabric/merge-styles: Time: ?s +@uifabric/merge-styles: Built at: XX/XX/XX XX:XX:XX XM +@uifabric/merge-styles: Asset Size Chunks Chunk Names +@uifabric/merge-styles: merge-styles.js X KiB merge-styles [emitted] merge-styles +@uifabric/merge-styles: merge-styles.js.map X KiB merge-styles [emitted] merge-styles +@uifabric/merge-styles: Entrypoint merge-styles = merge-styles.js merge-styles.js.map +@uifabric/merge-styles: [../set-version/lib/index.js] X KiB {merge-styles} [built] +@uifabric/merge-styles: [../set-version/lib/setVersion.js] X KiB {merge-styles} [built] +@uifabric/merge-styles: [./lib/StyleOptionsState.js] X KiB {merge-styles} [built] +@uifabric/merge-styles: [./lib/Stylesheet.js] X KiB {merge-styles} [built] +@uifabric/merge-styles: [./lib/concatStyleSets.js] X KiB {merge-styles} [built] +@uifabric/merge-styles: [./lib/concatStyleSetsWithProps.js] X KiB {merge-styles} [built] +@uifabric/merge-styles: [./lib/extractStyleParts.js] X KiB {merge-styles} [built] +@uifabric/merge-styles: [./lib/fontFace.js] X KiB {merge-styles} [built] +@uifabric/merge-styles: [./lib/index.js] X KiB {merge-styles} [built] +@uifabric/merge-styles: [./lib/keyframes.js] X KiB {merge-styles} [built] +@uifabric/merge-styles: [./lib/mergeStyleSets.js] X KiB {merge-styles} [built] +@uifabric/merge-styles: [./lib/mergeStyles.js] X KiB {merge-styles} [built] +@uifabric/merge-styles: [./lib/styleToClassName.js] X KiB {merge-styles} [built] +@uifabric/merge-styles: [./lib/transforms/kebabRules.js] X KiB {merge-styles} [built] +@uifabric/merge-styles: [./lib/version.js] X KiB {merge-styles} [built] +@uifabric/merge-styles: + 5 hidden modules +@uifabric/merge-styles: Child +@uifabric/merge-styles: Hash: [redacted] +@uifabric/merge-styles: Time: ?s +@uifabric/merge-styles: Built at: XX/XX/XX XX:XX:XX XM +@uifabric/merge-styles: Asset Size Chunks Chunk Names +@uifabric/merge-styles: merge-styles.min.js X KiB 0 [emitted] merge-styles +@uifabric/merge-styles: merge-styles.min.js.map X KiB 0 [emitted] merge-styles +@uifabric/merge-styles: Entrypoint merge-styles = merge-styles.min.js merge-styles.min.js.map +@uifabric/merge-styles: [0] ./lib/index.js + 19 modules X KiB {0} [built] +@uifabric/merge-styles: | ./lib/index.js X KiB [built] +@uifabric/merge-styles: | ./lib/Stylesheet.js X KiB [built] +@uifabric/merge-styles: | ./lib/StyleOptionsState.js X KiB [built] +@uifabric/merge-styles: | ./lib/mergeStyles.js X KiB [built] +@uifabric/merge-styles: | ./lib/concatStyleSets.js X KiB [built] +@uifabric/merge-styles: | ./lib/mergeStyleSets.js X KiB [built] +@uifabric/merge-styles: | ./lib/concatStyleSetsWithProps.js X KiB [built] +@uifabric/merge-styles: | ./lib/fontFace.js X KiB [built] +@uifabric/merge-styles: | ./lib/keyframes.js X KiB [built] +@uifabric/merge-styles: | ./lib/version.js X KiB [built] +@uifabric/merge-styles: | ./lib/extractStyleParts.js X KiB [built] +@uifabric/merge-styles: | ./lib/styleToClassName.js X KiB [built] +@uifabric/merge-styles: | ../set-version/lib/index.js X KiB [built] +@uifabric/merge-styles: | ./lib/transforms/kebabRules.js X KiB [built] +@uifabric/merge-styles: | ./lib/transforms/prefixRules.js X KiB [built] +@uifabric/merge-styles: | + 5 hidden modules @uifabric/merge-styles: PASS src/styleToClassName.test.ts @uifabric/merge-styles: PASS src/mergeStyleSets.test.ts @uifabric/merge-styles: PASS src/mergeStyles.test.ts @@ -80,6 +144,7 @@ Standard output: @uifabric/merge-styles: PASS src/Stylesheet.test.ts @uifabric/merge-styles: PASS src/extractStyleParts.test.ts @uifabric/merge-styles: PASS src/concatStyleSetsWithProps.test.ts +@uifabric/merge-styles: PASS src/fontFace.test.ts @uifabric/merge-styles: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/merge-styles/lib/index.d.ts' @uifabric/merge-styles: Done in ?s. @uifabric/jest-serializer-merge-styles: yarn run vX.X.X @@ -111,9 +176,6 @@ Standard output: @uifabric/utilities: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/utilities/tsconfig.json" @uifabric/utilities: [XX:XX:XX XM] ■ Running Jest @uifabric/utilities: [XX:XX:XX XM] ■ /usr/local/bin/node "/office-ui-fabric-react/node_modules/jest/bin/jest.js" --config "/office-ui-fabric-react/packages/utilities/jest.config.js" --passWithNoTests --colors --forceExit -@uifabric/utilities: [XX:XX:XX XM] ■ Running Webpack -@uifabric/utilities: [XX:XX:XX XM] ■ Webpack Config Path: null -@uifabric/utilities: [XX:XX:XX XM] ■ webpack.config.js not found, skipping webpack @uifabric/utilities: PASS src/warn/warnControlledUsage.test.ts @uifabric/utilities: PASS src/focus.test.tsx @uifabric/utilities: PASS src/styled.test.tsx @@ -176,7 +238,15 @@ lerna info Executing command in 42 packages: "yarn run build" @uifabric/utilities: Warning: You have changed the public API signature for this project. Please copy the file "temp/utilities.api.md" to "etc/utilities.api.md", or perform a local build (which does this automatically). See the Git repo documentation for more info. @uifabric/utilities: [XX:XX:XX XM] x Error detected while running '_wrapFunction' @uifabric/utilities: [XX:XX:XX XM] x ------------------------------------ -@uifabric/utilities: [XX:XX:XX XM] x The public API file is out of date. Please run the API snapshot and commit the updated API file. +@uifabric/utilities: [XX:XX:XX XM] x Error: The public API file is out of date. Please run the API snapshot and commit the updated API file. +@uifabric/utilities: at apiExtractorVerify (/office-ui-fabric-react/node_modules/just-scripts/lib/tasks/apiExtractorTask.js:26:19) +@uifabric/utilities: at _wrapFunction (/office-ui-fabric-react/node_modules/just-task/lib/wrapTask.js:13:36) +@uifabric/utilities: at verify-api-extractor (/office-ui-fabric-react/node_modules/undertaker/lib/set-task.js:13:15) +@uifabric/utilities: at _wrapFunction (/office-ui-fabric-react/node_modules/just-task/lib/wrapTask.js:10:16) +@uifabric/utilities: at bound (domain.js:420:14) +@uifabric/utilities: at runBound (domain.js:433:12) +@uifabric/utilities: at asyncRunner (/office-ui-fabric-react/node_modules/async-done/index.js:55:18) +@uifabric/utilities: at processTicksAndRejections (internal/process/task_queues.js:75:11) @uifabric/utilities: [XX:XX:XX XM] x ------------------------------------ @uifabric/utilities: [XX:XX:XX XM] x Error previously detected. See above for error messages. @uifabric/utilities: error Command failed with exit code 1. diff --git a/tests/baselines/reference/docker/vscode.log b/tests/baselines/reference/docker/vscode.log index c1a5c3eb6f9..45c7728bdb5 100644 --- a/tests/baselines/reference/docker/vscode.log +++ b/tests/baselines/reference/docker/vscode.log @@ -1,25 +1,11 @@ -Exit Code: 1 +Exit Code: 0 Standard output: yarn run vX.X.X $ gulp compile --max_old_space_size=4095 [XX:XX:XX] Node flags detected: --max_old_space_size=4095 [XX:XX:XX] Using gulpfile /vscode/gulpfile.js -[XX:XX:XX] Error: /vscode/extensions/typescript-language-features/src/features/fileConfigurationManager.ts(170,4): Type 'string | undefined' is not assignable to type 'SemicolonPreference | undefined'. - Type 'string' is not assignable to type 'SemicolonPreference | undefined'. -info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +Done in ?s. Standard error: -[XX:XX:XX] 'compile' errored after ?s -[XX:XX:XX] Error: Found 1 errors - at Stream. (/vscode/build/lib/reporter.js:74:29) - at _end (/vscode/node_modules/through/index.js:65:9) - at Stream.stream.end (/vscode/node_modules/through/index.js:74:5) - at StreamFilter.onend (/vscode/node_modules/readable-stream/lib/_stream_readable.js:570:10) - at Object.onceWrapper (events.js:286:20) - at StreamFilter.emit (events.js:203:15) - at StreamFilter.EventEmitter.emit (domain.js:466:23) - at endReadableNT (/vscode/node_modules/readable-stream/lib/_stream_readable.js:992:12) - at process._tickCallback (internal/process/next_tick.js:63:19) -error Command failed with exit code 1. diff --git a/tests/baselines/reference/docker/xterm.js.log b/tests/baselines/reference/docker/xterm.js.log index f7535311152..6024f04e09d 100644 --- a/tests/baselines/reference/docker/xterm.js.log +++ b/tests/baselines/reference/docker/xterm.js.log @@ -1,24 +1,9 @@ -Exit Code: 2 +Exit Code: 0 Standard output: > xterm@X.X.X build /xtermjs > tsc -b ./tsconfig.all.json -src/browser/Clipboard.ts(85,5): error TS2322: Type 'null' is not assignable to type 'string'. -src/browser/Clipboard.ts(86,5): error TS2322: Type 'null' is not assignable to type 'string'. -src/browser/Clipboard.ts(87,5): error TS2322: Type 'null' is not assignable to type 'string'. -src/browser/Clipboard.ts(88,5): error TS2322: Type 'null' is not assignable to type 'string'. -src/browser/Clipboard.ts(89,5): error TS2322: Type 'null' is not assignable to type 'string'. -src/browser/Clipboard.ts(90,5): error TS2322: Type 'null' is not assignable to type 'string'. Standard error: -npm ERR! code ELIFECYCLE -npm ERR! errno 2 -npm ERR! xterm@X.X.X build: `tsc -b ./tsconfig.all.json` -npm ERR! Exit status 2 -npm ERR! -npm ERR! Failed at the xterm@X.X.X build script. -npm ERR! This is probably not a problem with npm. There is likely additional logging output above. -npm ERR! A complete log of this run can be found in: -npm ERR! /root/.npm/_logs/XXXX-XX-XXXXXXXXX-debug.log diff --git a/tests/baselines/reference/user/adonis-framework.log b/tests/baselines/reference/user/adonis-framework.log index b6797d03840..443cfcb5ffd 100644 --- a/tests/baselines/reference/user/adonis-framework.log +++ b/tests/baselines/reference/user/adonis-framework.log @@ -27,9 +27,9 @@ node_modules/adonis-framework/src/Encryption/index.js(71,34): error TS2769: No o node_modules/adonis-framework/src/Encryption/index.js(77,50): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. node_modules/adonis-framework/src/Encryption/index.js(85,23): error TS8024: JSDoc '@param' tag has name 'value', but there is no parameter with that name. node_modules/adonis-framework/src/Encryption/index.js(87,15): error TS2304: Cannot find name 'Mixed'. -node_modules/adonis-framework/src/Encryption/index.js(101,21): error TS2769: No overload matches this call. - Overload 1 of 4, '(data: ArrayBufferView, input_encoding: undefined, output_encoding: Utf8AsciiBinaryEncoding): string', gave the following error. - Argument of type '"base64"' is not assignable to parameter of type 'undefined'. +node_modules/adonis-framework/src/Encryption/index.js(101,62): error TS2769: No overload matches this call. + Overload 1 of 4, '(data: ArrayBufferView, input_encoding: "base64" | "binary" | "hex" | undefined, output_encoding: Utf8AsciiBinaryEncoding): string', gave the following error. + Argument of type 'string' is not assignable to parameter of type 'Utf8AsciiBinaryEncoding'. Overload 2 of 4, '(data: string, input_encoding: "base64" | "binary" | "hex" | undefined, output_encoding: Utf8AsciiBinaryEncoding): string', gave the following error. Argument of type 'string' is not assignable to parameter of type 'Utf8AsciiBinaryEncoding'. node_modules/adonis-framework/src/Encryption/index.js(114,15): error TS2304: Cannot find name 'Mixed'. diff --git a/tests/baselines/reference/user/prettier.log b/tests/baselines/reference/user/prettier.log deleted file mode 100644 index 5bd779cfe32..00000000000 --- a/tests/baselines/reference/user/prettier.log +++ /dev/null @@ -1,295 +0,0 @@ -Exit Code: 1 -Standard output: -node_modules/@glimmer/interfaces/dist/types/lib/components.d.ts(1,40): error TS2307: Cannot find module '@glimmer/reference'. -node_modules/@glimmer/interfaces/dist/types/lib/components/component-manager.d.ts(1,45): error TS2307: Cannot find module '@glimmer/reference'. -node_modules/@glimmer/interfaces/dist/types/lib/components/component-manager.d.ts(2,31): error TS2307: Cannot find module '@simple-dom/interface'. -node_modules/@glimmer/interfaces/dist/types/lib/dom/attributes.d.ts(8,8): error TS2307: Cannot find module '@simple-dom/interface'. -node_modules/@glimmer/interfaces/dist/types/lib/dom/bounds.d.ts(1,43): error TS2307: Cannot find module '@simple-dom/interface'. -node_modules/@glimmer/interfaces/dist/types/lib/dom/changes.d.ts(7,8): error TS2307: Cannot find module '@simple-dom/interface'. -node_modules/@glimmer/interfaces/dist/types/lib/dom/tree-construction.d.ts(7,8): error TS2307: Cannot find module '@simple-dom/interface'. -node_modules/@glimmer/interfaces/dist/types/lib/runtime/arguments.d.ts(1,45): error TS2307: Cannot find module '@glimmer/reference'. -node_modules/@glimmer/interfaces/dist/types/lib/runtime/element.d.ts(1,36): error TS2307: Cannot find module '@glimmer/reference'. -node_modules/@glimmer/interfaces/dist/types/lib/runtime/environment.d.ts(1,76): error TS2307: Cannot find module '@glimmer/reference'. -node_modules/@glimmer/interfaces/dist/types/lib/runtime/environment.d.ts(2,36): error TS2307: Cannot find module '@glimmer/runtime'. -node_modules/@glimmer/interfaces/dist/types/lib/runtime/environment.d.ts(3,46): error TS2307: Cannot find module '@simple-dom/interface'. -node_modules/@glimmer/interfaces/dist/types/lib/runtime/modifier.d.ts(4,21): error TS2307: Cannot find module '@glimmer/reference'. -node_modules/@glimmer/interfaces/dist/types/lib/runtime/modifier.d.ts(6,31): error TS2307: Cannot find module '@simple-dom/interface'. -node_modules/@glimmer/interfaces/dist/types/lib/runtime/render.d.ts(1,43): error TS2307: Cannot find module '@simple-dom/interface'. -node_modules/@glimmer/interfaces/dist/types/lib/runtime/scope.d.ts(2,40): error TS2307: Cannot find module '@glimmer/reference'. -node_modules/@glimmer/interfaces/dist/types/lib/runtime/vm.d.ts(2,31): error TS2307: Cannot find module '@glimmer/reference'. -node_modules/@glimmer/util/dist/types/lib/destroy.d.ts(3,69): error TS2677: A type predicate's type must be assignable to its parameter's type. - Type 'SymbolDestroyable' is not assignable to type 'Maybe>'. - Type 'SymbolDestroyable' is not assignable to type 'Dict'. - Index signature is missing in type 'SymbolDestroyable'. -node_modules/@glimmer/util/dist/types/lib/dom.d.ts(1,31): error TS2307: Cannot find module '@simple-dom/interface'. -node_modules/@glimmer/util/dist/types/lib/is-serialization-first-node.d.ts(1,28): error TS2307: Cannot find module '@simple-dom/interface'. -node_modules/@typescript-eslint/typescript-estree/dist/create-program/createWatchProgram.d.ts(1,8): error TS1259: Module '"/prettier/prettier/node_modules/typescript/lib/typescript"' can only be default-imported using the 'esModuleInterop' flag -src/cli/util.js(60,44): error TS2345: Argument of type 'null' is not assignable to parameter of type 'number | undefined'. -src/cli/util.js(119,38): error TS2339: Property 'sync' does not exist on type '(...args: any[]) => any'. -src/cli/util.js(413,36): error TS2345: Argument of type '{ dot: true; nodir: boolean; }' is not assignable to parameter of type 'GlobbyOptions'. - Object literal may only specify known properties, and 'nodir' does not exist in type 'GlobbyOptions'. -src/cli/util.js(507,44): error TS2345: Argument of type 'null' is not assignable to parameter of type 'number | undefined'. -src/cli/util.js(528,37): error TS2339: Property 'grey' does not exist on type 'typeof import("/prettier/prettier/node_modules/chalk/types/index")'. -src/cli/util.js(591,16): error TS2339: Property 'type' does not exist on type 'never'. -src/cli/util.js(592,16): error TS2339: Property 'oppositeDescription' does not exist on type 'never'. -src/cli/util.js(593,17): error TS2339: Property 'name' does not exist on type 'never'. -src/cli/util.js(693,22): error TS2339: Property 'name' does not exist on type 'never'. -src/cli/util.js(693,46): error TS2339: Property 'alias' does not exist on type 'never'. -src/common/create-ignorer.js(34,19): error TS2349: This expression is not callable. - Type 'typeof import("/prettier/prettier/node_modules/ignore/index")' has no call signatures. -src/common/get-file-info.js(36,27): error TS2339: Property 'resolveConfig' does not exist on type '{ ignorePath?: string | undefined; withNodeModules?: boolean | undefined; plugins: any; }'. -src/common/get-file-info.js(59,25): error TS2339: Property 'resolveConfig' does not exist on type '{ ignorePath?: string | undefined; withNodeModules?: boolean | undefined; plugins: any; }'. -src/common/parser-create-error.js(8,9): error TS2339: Property 'loc' does not exist on type 'SyntaxError'. -src/config/resolve-config.js(14,12): error TS2571: Object is of type 'unknown'. -src/config/resolve-config.js(50,16): error TS2571: Object is of type 'unknown'. -src/config/resolve-config.js(51,18): error TS2571: Object is of type 'unknown'. -src/config/resolve-config.js(121,32): error TS2345: Argument of type '{ sync: false; }' is not assignable to parameter of type '{ cache: boolean; sync: boolean; }'. - Property 'cache' is missing in type '{ sync: false; }' but required in type '{ cache: boolean; sync: boolean; }'. -src/config/resolve-config.js(128,32): error TS2345: Argument of type '{ sync: true; }' is not assignable to parameter of type '{ cache: boolean; sync: boolean; }'. - Property 'cache' is missing in type '{ sync: true; }' but required in type '{ cache: boolean; sync: boolean; }'. -src/doc/doc-printer.js(7,14): error TS1023: An index signature parameter type must be either 'string' or 'number'. -src/doc/doc-printer.js(7,37): error TS2304: Cannot find name 'MODE'. -src/doc/doc-printer.js(257,17): error TS2532: Object is possibly 'undefined'. -src/doc/doc-printer.js(258,18): error TS2532: Object is possibly 'undefined'. -src/doc/doc-printer.js(259,17): error TS2532: Object is possibly 'undefined'. -src/doc/doc-printer.js(501,37): error TS2345: Argument of type 'any[][]' is not assignable to parameter of type 'never[]'. - Type 'any[]' is not assignable to type 'never'. -src/index.js(3,25): error TS2732: Cannot find module '../package.json'. Consider using '--resolveJsonModule' to import module with '.json' extension -src/index.js(30,17): error TS2339: Property 'sync' does not exist on type '(...args: any[]) => any'. -src/language-css/clean.js(3,30): error TS2307: Cannot find module 'html-tag-names'. -src/language-css/index.js(8,26): error TS2307: Cannot find module 'linguist-languages/data/CSS'. -src/language-css/index.js(15,26): error TS2307: Cannot find module 'linguist-languages/data/PostCSS'. -src/language-css/index.js(23,26): error TS2307: Cannot find module 'linguist-languages/data/Less'. -src/language-css/index.js(30,26): error TS2307: Cannot find module 'linguist-languages/data/SCSS'. -src/language-css/parser-postcss.js(64,32): error TS2345: Argument of type '{ groups: never[]; type: string; }' is not assignable to parameter of type 'never'. -src/language-css/parser-postcss.js(74,30): error TS2345: Argument of type '{ open: null; close: null; groups: never[]; type: string; }' is not assignable to parameter of type 'never'. -src/language-css/parser-postcss.js(79,30): error TS2345: Argument of type '{ groups: never[]; type: string; }' is not assignable to parameter of type 'never'. -src/language-css/parser-postcss.js(86,30): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. -src/language-css/parser-postcss.js(90,28): error TS2345: Argument of type '{ groups: never[]; type: string; }' is not assignable to parameter of type 'never'. -src/language-css/parser-postcss.js(449,32): error TS2531: Object is possibly 'null'. -src/language-css/utils.js(3,30): error TS2307: Cannot find module 'html-tag-names'. -src/language-graphql/index.js(8,26): error TS2307: Cannot find module 'linguist-languages/data/GraphQL'. -src/language-graphql/parser-graphql.js(64,17): error TS2532: Object is possibly 'undefined'. -src/language-graphql/parser-graphql.js(65,19): error TS2532: Object is possibly 'undefined'. -src/language-handlebars/index.js(7,26): error TS2307: Cannot find module 'linguist-languages/data/Handlebars'. -src/language-html/ast.js(53,11): error TS2536: Type 'Extract' cannot be used to index type 'Node'. -src/language-html/ast.js(56,15): error TS2339: Property 'index' does not exist on type 'Node'. -src/language-html/ast.js(56,22): error TS2339: Property 'siblings' does not exist on type 'Node'. -src/language-html/ast.js(56,32): error TS2339: Property 'prev' does not exist on type 'Node'. -src/language-html/ast.js(56,38): error TS2339: Property 'next' does not exist on type 'Node'. -src/language-html/ast.js(56,44): error TS2339: Property 'parent' does not exist on type 'Node'. -src/language-html/ast.js(74,17): error TS2339: Property 'children' does not exist on type 'Node'. -src/language-html/ast.js(74,34): error TS2339: Property 'children' does not exist on type 'Node'. -src/language-html/ast.js(75,14): error TS2339: Property 'children' does not exist on type 'Node'. -src/language-html/ast.js(80,17): error TS2339: Property 'children' does not exist on type 'Node'. -src/language-html/ast.js(80,34): error TS2339: Property 'children' does not exist on type 'Node'. -src/language-html/ast.js(81,14): error TS2339: Property 'children' does not exist on type 'Node'. -src/language-html/ast.js(81,28): error TS2339: Property 'children' does not exist on type 'Node'. -src/language-html/ast.js(87,17): error TS2339: Property 'hasExplicitNamespace' does not exist on type 'Node'. -src/language-html/ast.js(87,61): error TS2339: Property 'name' does not exist on type 'Node'. -src/language-html/ast.js(90,17): error TS2339: Property 'namespace' does not exist on type 'Node'. -src/language-html/ast.js(90,34): error TS2339: Property 'namespace' does not exist on type 'Node'. -src/language-html/ast.js(90,57): error TS2339: Property 'name' does not exist on type 'Node'. -src/language-html/ast.js(90,69): error TS2339: Property 'name' does not exist on type 'Node'. -src/language-html/conditional-comment.js(23,16): error TS2349: This expression is not callable. - Not all constituents of type 'RegExp | ((node: any) => { type: string; sourceSpan: any; })' are callable. - Type 'RegExp' has no call signatures. -src/language-html/index.js(8,26): error TS2307: Cannot find module 'linguist-languages/data/HTML'. -src/language-html/index.js(18,26): error TS2307: Cannot find module 'linguist-languages/data/HTML'. -src/language-html/index.js(28,26): error TS2307: Cannot find module 'linguist-languages/data/HTML'. -src/language-html/index.js(38,26): error TS2307: Cannot find module 'linguist-languages/data/Vue'. -src/language-html/parser-html.js(52,12): error TS2339: Property 'type' does not exist on type 'Attribute'. -src/language-html/parser-html.js(54,12): error TS2339: Property 'type' does not exist on type 'CDATA'. -src/language-html/parser-html.js(56,12): error TS2339: Property 'type' does not exist on type 'Comment'. -src/language-html/parser-html.js(58,12): error TS2339: Property 'type' does not exist on type 'DocType'. -src/language-html/parser-html.js(60,12): error TS2339: Property 'type' does not exist on type 'Element'. -src/language-html/parser-html.js(62,12): error TS2339: Property 'type' does not exist on type 'Text'. -src/language-html/parser-html.js(89,11): error TS2322: Type 'null' is not assignable to type 'string'. -src/language-html/parser-html.js(114,16): error TS2551: Property 'namespace' does not exist on type 'Element'. Did you mean 'nameSpan'? -src/language-html/parser-html.js(115,16): error TS2551: Property 'namespace' does not exist on type 'Element'. Did you mean 'nameSpan'? -src/language-html/parser-html.js(115,35): error TS2339: Property 'tagDefinition' does not exist on type 'Element'. -src/language-html/parser-html.js(127,21): error TS2551: Property 'namespace' does not exist on type 'Attribute'. Did you mean 'nameSpan'? -src/language-html/parser-html.js(156,15): error TS2551: Property 'namespace' does not exist on type 'Element'. Did you mean 'nameSpan'? -src/language-html/parser-html.js(157,14): error TS2551: Property 'namespace' does not exist on type 'Element'. Did you mean 'nameSpan'? -src/language-html/parser-html.js(159,14): error TS2339: Property 'tagDefinition' does not exist on type 'Element'. -src/language-html/parser-html.js(161,14): error TS2339: Property 'tagDefinition' does not exist on type 'Element'. -src/language-html/parser-html.js(194,29): error TS2345: Argument of type '{ type: any; value: any; raw: any; }' is not assignable to parameter of type 'Node'. - Type '{ type: any; value: any; raw: any; }' is missing the following properties from type 'Node': sourceSpan, visit -src/language-html/preprocess.js(28,19): error TS2554: Expected 0-1 arguments, but got 2. -src/language-html/printer-html.js(314,13): error TS2769: No overload matches this call. - Overload 1 of 2, '(...items: ConcatArray[]): never[]', gave the following error. - Argument of type '"" | ">" | "/>" | "}}" | "]>" | ">" | "[endif]-->" | "]>"' is not assignable to parameter of type 'ConcatArray'. - Type '""' is not assignable to type 'ConcatArray'. - Overload 2 of 2, '(...items: ConcatArray[]): never[]', gave the following error. - Argument of type '"" | ">" | "/>" | "}}" | "]>" | ">" | "[endif]-->" | "]>"' is not assignable to parameter of type 'ConcatArray'. - Type '""' is not assignable to type 'ConcatArray'. -src/language-html/printer-html.js(471,11): error TS2769: No overload matches this call. - Overload 1 of 2, '(...items: ConcatArray[]): never[]', gave the following error. - Argument of type '{ type: string; parts: any; }[]' is not assignable to parameter of type 'ConcatArray'. - The types returned by 'slice(...)' are incompatible between these types. - Type '{ type: string; parts: any; }[]' is not assignable to type 'never[]'. - Type '{ type: string; parts: any; }' is not assignable to type 'never'. - Overload 2 of 2, '(...items: ConcatArray[]): never[]', gave the following error. - Argument of type '{ type: string; parts: any; }[]' is not assignable to parameter of type 'ConcatArray'. -src/language-html/printer-html.js(492,11): error TS2769: No overload matches this call. - Overload 1 of 2, '(...items: ConcatArray[]): never[]', gave the following error. - Argument of type '"" | ">" | "/>" | "}}" | "]>" | ">" | "[endif]-->" | "]>"' is not assignable to parameter of type 'ConcatArray'. - Type '""' is not assignable to type 'ConcatArray'. - Overload 2 of 2, '(...items: ConcatArray[]): never[]', gave the following error. - Argument of type '"" | ">" | "/>" | "}}" | "]>" | ">" | "[endif]-->" | "]>"' is not assignable to parameter of type 'ConcatArray'. - Type '""' is not assignable to type 'ConcatArray'. -src/language-html/printer-html.js(515,11): error TS2769: No overload matches this call. - Overload 1 of 2, '(...items: ConcatArray[]): never[]', gave the following error. - Argument of type '"" | ">" | "/>" | "}}" | "]>" | ">" | "[endif]-->" | "]>"' is not assignable to parameter of type 'ConcatArray'. - Type '""' is not assignable to type 'ConcatArray'. - Overload 2 of 2, '(...items: ConcatArray[]): never[]', gave the following error. - Argument of type '"" | ">" | "/>" | "}}" | "]>" | ">" | "[endif]-->" | "]>"' is not assignable to parameter of type 'ConcatArray'. - Type '""' is not assignable to type 'ConcatArray'. -src/language-html/printer-html.js(638,55): error TS2554: Expected 0 arguments, but got 1. -src/language-html/syntax-vue.js(14,11): error TS2339: Property 'left' does not exist on type '{ left: string; operator: any; right: any; } | undefined'. -src/language-html/syntax-vue.js(14,17): error TS2339: Property 'operator' does not exist on type '{ left: string; operator: any; right: any; } | undefined'. -src/language-html/syntax-vue.js(14,27): error TS2339: Property 'right' does not exist on type '{ left: string; operator: any; right: any; } | undefined'. -src/language-html/utils.js(10,30): error TS2307: Cannot find module 'html-tag-names'. -src/language-html/utils.js(11,39): error TS2307: Cannot find module 'html-element-attributes'. -src/language-html/utils.js(444,17): error TS2554: Expected 0 arguments, but got 1. -src/language-js/comments.js(867,64): error TS2554: Expected 0 arguments, but got 1. -src/language-js/index.js(9,26): error TS2307: Cannot find module 'linguist-languages/data/JavaScript'. -src/language-js/index.js(17,26): error TS2307: Cannot find module 'linguist-languages/data/JavaScript'. -src/language-js/index.js(28,26): error TS2307: Cannot find module 'linguist-languages/data/JSX'. -src/language-js/index.js(35,26): error TS2307: Cannot find module 'linguist-languages/data/TypeScript'. -src/language-js/index.js(42,26): error TS2307: Cannot find module 'linguist-languages/data/TSX'. -src/language-js/index.js(49,26): error TS2307: Cannot find module 'linguist-languages/data/JSON'. -src/language-js/index.js(59,26): error TS2307: Cannot find module 'linguist-languages/data/JSON'. -src/language-js/index.js(67,26): error TS2307: Cannot find module 'linguist-languages/data/JSON with Comments'. -src/language-js/index.js(75,26): error TS2307: Cannot find module 'linguist-languages/data/JSON5'. -src/language-js/needs-parens.js(893,14): error TS2769: No overload matches this call. - Overload 1 of 2, '(...items: ConcatArray<(childPath: any) => any>[]): ((childPath: any) => any)[]', gave the following error. - Argument of type '(string | number)[]' is not assignable to parameter of type 'ConcatArray<(childPath: any) => any>'. - The types returned by 'slice(...)' are incompatible between these types. - Type '(string | number)[]' is not assignable to type '((childPath: any) => any)[]'. - Type 'string | number' is not assignable to type '(childPath: any) => any'. - Type 'string' is not assignable to type '(childPath: any) => any'. - Overload 2 of 2, '(...items: (((childPath: any) => any) | ConcatArray<(childPath: any) => any>)[]): ((childPath: any) => any)[]', gave the following error. - Argument of type '(string | number)[]' is not assignable to parameter of type '((childPath: any) => any) | ConcatArray<(childPath: any) => any>'. - Type '(string | number)[]' is not assignable to type 'ConcatArray<(childPath: any) => any>'. -src/language-js/printer-estree.js(263,36): error TS2304: Cannot find name 'Doc'. -src/language-js/printer-estree.js(264,62): error TS2304: Cannot find name 'Doc'. -src/language-js/printer-estree.js(271,12): error TS2304: Cannot find name 'FastPath'. -src/language-js/printer-estree.js(272,12): error TS2304: Cannot find name 'Options'. -src/language-js/printer-estree.js(401,9): error TS2769: No overload matches this call. - Overload 1 of 2, '(...items: ConcatArray[]): never[]', gave the following error. - Argument of type '{ type: string; parts: any; } | { type: string; contents: any; n: any; }' is not assignable to parameter of type 'ConcatArray'. - Type '{ type: string; parts: any; }' is missing the following properties from type 'ConcatArray': length, join, slice - Overload 2 of 2, '(...items: ConcatArray[]): never[]', gave the following error. - Argument of type '{ type: string; parts: any; } | { type: string; contents: any; n: any; }' is not assignable to parameter of type 'ConcatArray'. - Type '{ type: string; parts: any; }' is not assignable to type 'ConcatArray'. -src/language-js/printer-estree.js(1929,20): error TS2345: Argument of type '" "' is not assignable to parameter of type '{ type: string; id: any; contents: any; break: boolean; expandedStates: any; }'. -src/language-js/printer-estree.js(1931,20): error TS2345: Argument of type '{ type: string; parts: any; }' is not assignable to parameter of type '{ type: string; id: any; contents: any; break: boolean; expandedStates: any; }'. - Type '{ type: string; parts: any; }' is missing the following properties from type '{ type: string; id: any; contents: any; break: boolean; expandedStates: any; }': id, contents, break, expandedStates -src/language-js/printer-estree.js(1933,18): error TS2345: Argument of type '"while ("' is not assignable to parameter of type '{ type: string; id: any; contents: any; break: boolean; expandedStates: any; }'. -src/language-js/printer-estree.js(1942,9): error TS2345: Argument of type '")"' is not assignable to parameter of type '{ type: string; id: any; contents: any; break: boolean; expandedStates: any; }'. -src/language-js/printer-estree.js(3467,11): error TS2769: No overload matches this call. - Overload 1 of 2, '(...items: ConcatArray[]): never[]', gave the following error. - Argument of type 'never[] | { type: string; parts: any; }' is not assignable to parameter of type 'ConcatArray'. - Type '{ type: string; parts: any; }' is not assignable to type 'ConcatArray'. - Overload 2 of 2, '(...items: ConcatArray[]): never[]', gave the following error. - Argument of type 'never[] | { type: string; parts: any; }' is not assignable to parameter of type 'ConcatArray'. - Type '{ type: string; parts: any; }' is not assignable to type 'ConcatArray'. -src/language-js/printer-estree.js(3817,22): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. -src/language-js/printer-estree.js(4033,23): error TS2532: Object is possibly 'undefined'. -src/language-js/printer-estree.js(4034,24): error TS2532: Object is possibly 'undefined'. -src/language-js/printer-estree.js(4355,5): error TS2345: Argument of type '"" | { type: string; parts: any; } | { type: string; contents: any; }' is not assignable to parameter of type 'string'. - Type '{ type: string; parts: any; }' is not assignable to type 'string'. -src/language-js/printer-estree.js(4359,16): error TS2345: Argument of type '{ type: string; parts: any; }' is not assignable to parameter of type 'string'. -src/language-js/printer-estree.js(4407,11): error TS2322: Type '{ type: string; id: any; contents: any; break: boolean; expandedStates: any; }' is not assignable to type 'string'. -src/language-js/printer-estree.js(4422,11): error TS2322: Type '{ type: string; parts: any; }' is not assignable to type 'string'. -src/language-js/printer-estree.js(4434,9): error TS2345: Argument of type '{ type: string; parts: any; }' is not assignable to parameter of type 'string'. -src/language-js/printer-estree.js(4712,9): error TS2554: Expected 0-2 arguments, but got 3. -src/language-js/printer-estree.js(5728,7): error TS2769: No overload matches this call. - Overload 1 of 2, '(...items: ConcatArray<(childPath: any) => any>[]): ((childPath: any) => any)[]', gave the following error. - Argument of type '(string | number)[]' is not assignable to parameter of type 'ConcatArray<(childPath: any) => any>'. - The types returned by 'slice(...)' are incompatible between these types. - Type '(string | number)[]' is not assignable to type '((childPath: any) => any)[]'. - Type 'string | number' is not assignable to type '(childPath: any) => any'. - Type 'string' is not assignable to type '(childPath: any) => any'. - Overload 2 of 2, '(...items: (((childPath: any) => any) | ConcatArray<(childPath: any) => any>)[]): ((childPath: any) => any)[]', gave the following error. - Argument of type '(string | number)[]' is not assignable to parameter of type '((childPath: any) => any) | ConcatArray<(childPath: any) => any>'. - Type '(string | number)[]' is not assignable to type 'ConcatArray<(childPath: any) => any>'. -src/language-js/utils.js(118,55): error TS2554: Expected 0-1 arguments, but got 2. -src/language-js/utils.js(417,14): error TS2339: Property 'comments' does not exist on type 'Expression'. - Property 'comments' does not exist on type 'Identifier'. -src/language-js/utils.js(429,7): error TS2367: This condition will always return 'false' since the types '"FunctionExpression" | "ClassExpression" | "ObjectExpression" | "TaggedTemplateExpression" | "CallExpression" | "ConditionalExpression" | "UpdateExpression" | "SequenceExpression" | ... 11 more ... | "AwaitExpression"' and '"OptionalMemberExpression"' have no overlap. -src/language-js/utils.js(434,9): error TS2367: This condition will always return 'false' since the types '"FunctionExpression" | "ClassExpression" | "ObjectExpression" | "TaggedTemplateExpression" | "CallExpression" | "ConditionalExpression" | "UpdateExpression" | "SequenceExpression" | ... 11 more ... | "AwaitExpression"' and '"OptionalMemberExpression"' have no overlap. -src/language-js/utils.js(437,16): error TS2339: Property 'property' does not exist on type 'SimpleLiteral | RegExpLiteral | FunctionExpression | ArrowFunctionExpression | ArrayExpression | ... 16 more ... | AwaitExpression'. - Property 'property' does not exist on type 'SimpleLiteral'. -src/language-js/utils.js(438,16): error TS2339: Property 'property' does not exist on type 'SimpleLiteral | RegExpLiteral | FunctionExpression | ArrowFunctionExpression | ArrayExpression | ... 16 more ... | AwaitExpression'. - Property 'property' does not exist on type 'SimpleLiteral'. -src/language-js/utils.js(439,16): error TS2339: Property 'property' does not exist on type 'SimpleLiteral | RegExpLiteral | FunctionExpression | ArrowFunctionExpression | ArrayExpression | ... 16 more ... | AwaitExpression'. - Property 'property' does not exist on type 'SimpleLiteral'. -src/language-js/utils.js(440,16): error TS2339: Property 'property' does not exist on type 'SimpleLiteral | RegExpLiteral | FunctionExpression | ArrowFunctionExpression | ArrayExpression | ... 16 more ... | AwaitExpression'. - Property 'property' does not exist on type 'SimpleLiteral'. -src/language-js/utils.js(444,21): error TS2339: Property 'object' does not exist on type 'SimpleLiteral | RegExpLiteral | FunctionExpression | ArrowFunctionExpression | ArrayExpression | ... 16 more ... | AwaitExpression'. - Property 'object' does not exist on type 'SimpleLiteral'. -src/language-js/utils.js(445,18): error TS2339: Property 'comments' does not exist on type 'SimpleLiteral | RegExpLiteral | FunctionExpression | ArrowFunctionExpression | ArrayExpression | ... 16 more ... | AwaitExpression'. - Property 'comments' does not exist on type 'SimpleLiteral'. -src/language-js/utils.js(450,11): error TS2367: This condition will always return 'false' since the types '"FunctionExpression" | "ClassExpression" | "ObjectExpression" | "TaggedTemplateExpression" | "CallExpression" | "ConditionalExpression" | "UpdateExpression" | "SequenceExpression" | ... 11 more ... | "AwaitExpression"' and '"Identifier"' have no overlap. -src/language-js/utils.js(450,41): error TS2367: This condition will always return 'false' since the types '"FunctionExpression" | "ClassExpression" | "ObjectExpression" | "TaggedTemplateExpression" | "CallExpression" | "ConditionalExpression" | "UpdateExpression" | "SequenceExpression" | ... 11 more ... | "AwaitExpression"' and '"ThisExpression"' have no overlap. -src/language-markdown/index.js(8,26): error TS2307: Cannot find module 'linguist-languages/data/Markdown'. -src/language-markdown/index.js(17,26): error TS2307: Cannot find module 'linguist-languages/data/Markdown'. -src/language-markdown/printer-markdown.js(278,18): error TS2532: Object is possibly 'undefined'. -src/language-markdown/printer-markdown.js(279,17): error TS2532: Object is possibly 'undefined'. -src/language-markdown/printer-markdown.js(300,14): error TS2532: Object is possibly 'undefined'. -src/language-markdown/utils.js(203,5): error TS2322: Type 'never[]' is not assignable to type 'null'. -src/language-markdown/utils.js(213,47): error TS2345: Argument of type 'any[]' is not assignable to parameter of type 'null'. -src/language-yaml/index.js(8,26): error TS2307: Cannot find module 'linguist-languages/data/YAML'. -src/language-yaml/printer-yaml.js(226,41): error TS2769: No overload matches this call. - Overload 1 of 2, '(...items: ConcatArray[]): never[]', gave the following error. - Argument of type '"" | { type: string; parts: any; }' is not assignable to parameter of type 'ConcatArray'. - Type '""' is not assignable to type 'ConcatArray'. - Overload 2 of 2, '(...items: ConcatArray[]): never[]', gave the following error. - Argument of type '"" | { type: string; parts: any; }' is not assignable to parameter of type 'ConcatArray'. - Type '""' is not assignable to type 'ConcatArray'. -src/main/core-options.js(117,9): error TS2322: Type '[{ since: string; value: string; }, { since: string; value: undefined; }]' is not assignable to type 'string | number | boolean | { since: string; value: string | number | boolean; }[] | [{ value: (string | number | boolean)[]; }]'. - Type '[{ since: string; value: string; }, { since: string; value: undefined; }]' is not assignable to type '[{ value: (string | number | boolean)[]; }]'. - Types of property '0' are incompatible. - Type '{ since: string; value: string; }' is not assignable to type '{ value: (string | number | boolean)[]; }'. - Object literal may only specify known properties, and 'since' does not exist in type '{ value: (string | number | boolean)[]; }'. -src/main/core-options.js(158,9): error TS2322: Type 'null' is not assignable to type 'string'. -src/main/core-options.js(250,9): error TS2322: Type '[{ since: string; value: false; }, { since: string; value: undefined; }]' is not assignable to type 'string | number | boolean | { since: string; value: string | number | boolean; }[] | [{ value: (string | number | boolean)[]; }]'. - Type '[{ since: string; value: false; }, { since: string; value: undefined; }]' is not assignable to type '[{ value: (string | number | boolean)[]; }]'. - Types of property '0' are incompatible. - Type '{ since: string; value: false; }' is not assignable to type '{ value: (string | number | boolean)[]; }'. - Object literal may only specify known properties, and 'since' does not exist in type '{ value: (string | number | boolean)[]; }'. -src/main/core.js(303,34): error TS2538: Type 'false' cannot be used as an index type. -src/main/core.js(303,47): error TS2538: Type 'false' cannot be used as an index type. -src/main/core.js(308,28): error TS2538: Type 'false' cannot be used as an index type. -src/main/core.js(308,72): error TS2538: Type 'false' cannot be used as an index type. -src/main/core.js(316,14): error TS2538: Type 'false' cannot be used as an index type. -src/main/options-normalizer.js(35,35): error TS2339: Property 'yellow' does not exist on type 'typeof import("/prettier/prettier/node_modules/chalk/types/index")'. -src/main/options-normalizer.js(36,35): error TS2339: Property 'blue' does not exist on type 'typeof import("/prettier/prettier/node_modules/chalk/types/index")'. -src/main/options-normalizer.js(54,5): error TS2525: Initializer provides no value for this binding element and the binding element has no default value. -src/main/options-normalizer.js(74,16): error TS2341: Property '_hasDeprecationWarned' is private and only accessible within class 'Normalizer'. -src/main/options-normalizer.js(80,39): error TS2341: Property '_hasDeprecationWarned' is private and only accessible within class 'Normalizer'. -src/main/options-normalizer.js(99,11): error TS2345: Argument of type '{ name: any; sourceName: any; }' is not assignable to parameter of type 'SchemaHandlers'. - Object literal may only specify known properties, and 'name' does not exist in type 'SchemaHandlers'. -src/main/options-normalizer.js(143,13): error TS2769: No overload matches this call. - Overload 1 of 2, '(...items: ConcatArray[]): never[]', gave the following error. - Argument of type 'string | never[]' is not assignable to parameter of type 'ConcatArray'. - Type 'string' is not assignable to type 'ConcatArray'. - Overload 2 of 2, '(...items: ConcatArray[]): never[]', gave the following error. - Argument of type 'string | never[]' is not assignable to parameter of type 'ConcatArray'. - Type 'string' is not assignable to type 'ConcatArray'. -src/main/options-normalizer.js(198,51): error TS2559: Type '{ name: any; }' has no properties in common with type 'SchemaHandlers'. -src/main/parser.js(21,44): error TS2345: Argument of type 'PropertyDescriptor | undefined' is not assignable to parameter of type 'PropertyDescriptor & ThisType'. - Type 'undefined' is not assignable to type 'PropertyDescriptor & ThisType'. - Type 'undefined' is not assignable to type 'PropertyDescriptor'. -src/main/support.js(5,32): error TS2732: Cannot find module '../../package.json'. Consider using '--resolveJsonModule' to import module with '.json' extension -src/main/support.js(38,24): error TS2339: Property 'name' does not exist on type 'never'. -src/main/support.js(38,35): error TS2339: Property 'name' does not exist on type 'never'. -src/main/support.js(38,48): error TS2339: Property 'name' does not exist on type 'never'. -src/main/support.js(38,57): error TS2339: Property 'name' does not exist on type 'never'. -src/standalone.js(3,25): error TS2732: Cannot find module '../package.json'. Consider using '--resolveJsonModule' to import module with '.json' extension - - - -Standard error: diff --git a/tests/baselines/reference/user/uglify-js.log b/tests/baselines/reference/user/uglify-js.log index 3fff1008d8b..6ec59f31dd1 100644 --- a/tests/baselines/reference/user/uglify-js.log +++ b/tests/baselines/reference/user/uglify-js.log @@ -9,66 +9,69 @@ node_modules/uglify-js/lib/ast.js(968,25): error TS2339: Property 'self' does no node_modules/uglify-js/lib/ast.js(969,37): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. node_modules/uglify-js/lib/ast.js(985,31): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. node_modules/uglify-js/lib/ast.js(989,29): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(184,42): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(535,41): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(861,33): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(1122,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1138,51): error TS2349: This expression is not callable. +node_modules/uglify-js/lib/compress.js(185,42): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(536,41): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(862,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(1124,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(1140,51): error TS2349: This expression is not callable. Not all constituents of type 'true | ((node: any) => any)' are callable. Type 'true' has no call signatures. -node_modules/uglify-js/lib/compress.js(1202,53): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1244,112): error TS2454: Variable 'args' is used before being assigned. -node_modules/uglify-js/lib/compress.js(1245,29): error TS2532: Object is possibly 'undefined'. -node_modules/uglify-js/lib/compress.js(1254,87): error TS2322: Type 'false' is not assignable to type 'number'. -node_modules/uglify-js/lib/compress.js(1262,29): error TS2322: Type 'false' is not assignable to type 'never'. -node_modules/uglify-js/lib/compress.js(1371,53): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(1472,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1552,42): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(1585,41): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(1706,49): error TS2345: Argument of type 'number[]' is not assignable to parameter of type '[number, number, ...never[]]'. +node_modules/uglify-js/lib/compress.js(1204,53): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(1246,112): error TS2454: Variable 'args' is used before being assigned. +node_modules/uglify-js/lib/compress.js(1247,29): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(1256,87): error TS2322: Type 'false' is not assignable to type 'number'. +node_modules/uglify-js/lib/compress.js(1264,29): error TS2322: Type 'false' is not assignable to type 'never'. +node_modules/uglify-js/lib/compress.js(1375,53): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(1476,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(1498,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(1580,42): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(1613,41): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(1735,49): error TS2345: Argument of type 'number[]' is not assignable to parameter of type '[number, number, ...never[]]'. Type 'number[]' is missing the following properties from type '[number, number, ...never[]]': 0, 1 -node_modules/uglify-js/lib/compress.js(2029,59): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(2067,53): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[number, number, ...never[]]'. +node_modules/uglify-js/lib/compress.js(2065,59): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(2103,53): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[number, number, ...never[]]'. Type 'any[]' is missing the following properties from type '[number, number, ...never[]]': 0, 1 -node_modules/uglify-js/lib/compress.js(2215,34): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(2913,55): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. -node_modules/uglify-js/lib/compress.js(2914,25): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/compress.js(2914,55): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -node_modules/uglify-js/lib/compress.js(2914,56): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/compress.js(2955,42): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(3409,38): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(3433,33): error TS2322: Type '"f"' is not assignable to type 'boolean'. -node_modules/uglify-js/lib/compress.js(3567,33): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(3620,29): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(3638,29): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(3663,75): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(3738,63): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(3863,12): error TS2339: Property 'push' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(3942,38): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(3963,24): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(3973,28): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(4207,17): error TS2447: The '|=' operator is not allowed for boolean types. Consider using '||' instead. -node_modules/uglify-js/lib/compress.js(4270,45): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(4381,33): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(4679,17): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(4763,37): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(4971,57): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[string | RegExp, (string | undefined)?]'. +node_modules/uglify-js/lib/compress.js(2251,34): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(2950,55): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. +node_modules/uglify-js/lib/compress.js(2951,25): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/compress.js(2951,55): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +node_modules/uglify-js/lib/compress.js(2951,56): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/compress.js(2992,42): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(3072,33): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(3478,38): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(3504,29): error TS2322: Type '"f"' is not assignable to type 'boolean'. +node_modules/uglify-js/lib/compress.js(3637,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(3690,29): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(3708,29): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(3733,75): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(3808,63): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(3933,12): error TS2339: Property 'push' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(4012,38): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(4033,24): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(4043,28): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(4277,17): error TS2447: The '|=' operator is not allowed for boolean types. Consider using '||' instead. +node_modules/uglify-js/lib/compress.js(4340,45): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(4451,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(4648,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(4794,17): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(4879,37): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(5087,57): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[string | RegExp, (string | undefined)?]'. Property '0' is missing in type 'any[]' but required in type '[string | RegExp, (string | undefined)?]'. -node_modules/uglify-js/lib/compress.js(5135,45): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(5142,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'code' must be of type 'string', but here has type '{ get: () => string; toString: () => string; indent: () => void; indentation: () => number; current_width: () => number; should_break: () => boolean; has_parens: () => boolean; newline: () => void; print: (str: any) => void; ... 23 more ...; parent: (n: any) => any; }'. -node_modules/uglify-js/lib/compress.js(5146,36): error TS2532: Object is possibly 'undefined'. -node_modules/uglify-js/lib/compress.js(5151,41): error TS2339: Property 'get' does not exist on type 'string'. -node_modules/uglify-js/lib/compress.js(5668,18): error TS2454: Variable 'is_strict_comparison' is used before being assigned. -node_modules/uglify-js/lib/compress.js(6203,25): error TS2367: This condition will always return 'false' since the types 'boolean' and 'string' have no overlap. -node_modules/uglify-js/lib/compress.js(6231,47): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(6306,39): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(6378,39): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(6384,41): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(6829,43): error TS2454: Variable 'property' is used before being assigned. -node_modules/uglify-js/lib/compress.js(6844,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(6847,46): error TS2339: Property 'has_side_effects' does not exist on type 'number'. -node_modules/uglify-js/lib/compress.js(6853,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(6891,34): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(5251,45): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(5258,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'code' must be of type 'string', but here has type '{ get: () => string; toString: () => string; indent: () => void; indentation: () => number; current_width: () => number; should_break: () => boolean; has_parens: () => boolean; newline: () => void; print: (str: any) => void; ... 23 more ...; parent: (n: any) => any; }'. +node_modules/uglify-js/lib/compress.js(5262,36): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(5267,41): error TS2339: Property 'get' does not exist on type 'string'. +node_modules/uglify-js/lib/compress.js(5784,18): error TS2454: Variable 'is_strict_comparison' is used before being assigned. +node_modules/uglify-js/lib/compress.js(6334,25): error TS2367: This condition will always return 'false' since the types 'boolean' and 'string' have no overlap. +node_modules/uglify-js/lib/compress.js(6362,47): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(6437,39): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(6509,39): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(6515,41): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(6975,43): error TS2454: Variable 'property' is used before being assigned. +node_modules/uglify-js/lib/compress.js(6990,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(6993,46): error TS2339: Property 'has_side_effects' does not exist on type 'number'. +node_modules/uglify-js/lib/compress.js(6999,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(7037,34): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/minify.js(186,75): error TS2339: Property 'compress' does not exist on type 'Compressor'. node_modules/uglify-js/lib/mozilla-ast.js(566,33): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/output.js(232,25): error TS2554: Expected 0 arguments, but got 2. @@ -96,12 +99,12 @@ node_modules/uglify-js/lib/parse.js(950,23): error TS2345: Argument of type 'any node_modules/uglify-js/lib/parse.js(1064,9): error TS2322: Type 'any[]' is not assignable to type 'never[]'. Type 'any' is not assignable to type 'never'. node_modules/uglify-js/lib/parse.js(1121,17): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/parse.js(1289,32): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/parse.js(1389,20): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/parse.js(1395,20): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/parse.js(1481,48): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/parse.js(1507,35): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/parse.js(1552,52): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(1291,32): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(1391,20): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(1397,20): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(1483,48): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(1509,35): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(1554,52): error TS2531: Object is possibly 'null'. node_modules/uglify-js/lib/propmangle.js(69,18): error TS2339: Property 'prototype' does not exist on type 'ObjectConstructor | FunctionConstructor | StringConstructor | BooleanConstructor | NumberConstructor | ... 4 more ... | ArrayConstructor'. Property 'prototype' does not exist on type 'Math'. node_modules/uglify-js/lib/propmangle.js(70,45): error TS2339: Property 'prototype' does not exist on type 'ObjectConstructor | FunctionConstructor | StringConstructor | BooleanConstructor | NumberConstructor | ... 4 more ... | ArrayConstructor'. diff --git a/tests/baselines/reference/user/webpack.log b/tests/baselines/reference/user/webpack.log index 4832904f337..3e4aa62407b 100644 --- a/tests/baselines/reference/user/webpack.log +++ b/tests/baselines/reference/user/webpack.log @@ -1,5 +1,9 @@ Exit Code: 1 Standard output: +lib/ContextModuleFactory.js(15,35): error TS2300: Duplicate identifier 'Module'. +lib/ContextModuleFactory.js(16,66): error TS2300: Duplicate identifier 'ModuleFactoryCreateData'. +lib/ContextModuleFactory.js(17,62): error TS2300: Duplicate identifier 'ModuleFactoryResult'. +lib/ContextModuleFactory.js(18,59): error TS2300: Duplicate identifier 'ContextDependency'. lib/MultiCompiler.js(15,65): error TS2300: Duplicate identifier 'AsyncSeriesHook'. lib/MultiCompiler.js(16,77): error TS2300: Duplicate identifier 'SyncBailHook'. lib/MultiCompiler.js(17,70): error TS2300: Duplicate identifier 'WatchOptions'. @@ -19,22 +23,6 @@ lib/MultiCompiler.js(128,6): error TS2300: Duplicate identifier 'intermediateFil lib/MultiCompiler.js(135,6): error TS2300: Duplicate identifier 'inputFileSystem'. lib/MultiCompiler.js(144,6): error TS2300: Duplicate identifier 'outputFileSystem'. lib/MultiCompiler.js(153,6): error TS2300: Duplicate identifier 'intermediateFileSystem'. -lib/logging/Logger.js(49,20): error TS2345: Argument of type 'string' is not assignable to parameter of type '"error" | "time" | "group" | "debug" | "info" | "warn" | "log" | "trace" | "groupCollapsed" | "groupEnd" | "profile" | "profileEnd" | "clear" | "status"'. -lib/logging/Logger.js(53,20): error TS2345: Argument of type 'string' is not assignable to parameter of type '"error" | "time" | "group" | "debug" | "info" | "warn" | "log" | "trace" | "groupCollapsed" | "groupEnd" | "profile" | "profileEnd" | "clear" | "status"'. -lib/logging/Logger.js(57,20): error TS2345: Argument of type 'string' is not assignable to parameter of type '"error" | "time" | "group" | "debug" | "info" | "warn" | "log" | "trace" | "groupCollapsed" | "groupEnd" | "profile" | "profileEnd" | "clear" | "status"'. -lib/logging/Logger.js(61,20): error TS2345: Argument of type 'string' is not assignable to parameter of type '"error" | "time" | "group" | "debug" | "info" | "warn" | "log" | "trace" | "groupCollapsed" | "groupEnd" | "profile" | "profileEnd" | "clear" | "status"'. -lib/logging/Logger.js(65,20): error TS2345: Argument of type 'string' is not assignable to parameter of type '"error" | "time" | "group" | "debug" | "info" | "warn" | "log" | "trace" | "groupCollapsed" | "groupEnd" | "profile" | "profileEnd" | "clear" | "status"'. -lib/logging/Logger.js(70,21): error TS2345: Argument of type 'string' is not assignable to parameter of type '"error" | "time" | "group" | "debug" | "info" | "warn" | "log" | "trace" | "groupCollapsed" | "groupEnd" | "profile" | "profileEnd" | "clear" | "status"'. -lib/logging/Logger.js(75,20): error TS2345: Argument of type 'string' is not assignable to parameter of type '"error" | "time" | "group" | "debug" | "info" | "warn" | "log" | "trace" | "groupCollapsed" | "groupEnd" | "profile" | "profileEnd" | "clear" | "status"'. -lib/logging/Logger.js(79,20): error TS2345: Argument of type 'string' is not assignable to parameter of type '"error" | "time" | "group" | "debug" | "info" | "warn" | "log" | "trace" | "groupCollapsed" | "groupEnd" | "profile" | "profileEnd" | "clear" | "status"'. -lib/logging/Logger.js(83,20): error TS2345: Argument of type 'string' is not assignable to parameter of type '"error" | "time" | "group" | "debug" | "info" | "warn" | "log" | "trace" | "groupCollapsed" | "groupEnd" | "profile" | "profileEnd" | "clear" | "status"'. -lib/logging/Logger.js(87,20): error TS2345: Argument of type 'string' is not assignable to parameter of type '"error" | "time" | "group" | "debug" | "info" | "warn" | "log" | "trace" | "groupCollapsed" | "groupEnd" | "profile" | "profileEnd" | "clear" | "status"'. -lib/logging/Logger.js(91,20): error TS2345: Argument of type 'string' is not assignable to parameter of type '"error" | "time" | "group" | "debug" | "info" | "warn" | "log" | "trace" | "groupCollapsed" | "groupEnd" | "profile" | "profileEnd" | "clear" | "status"'. -lib/logging/Logger.js(95,20): error TS2345: Argument of type 'string' is not assignable to parameter of type '"error" | "time" | "group" | "debug" | "info" | "warn" | "log" | "trace" | "groupCollapsed" | "groupEnd" | "profile" | "profileEnd" | "clear" | "status"'. -lib/logging/Logger.js(99,20): error TS2345: Argument of type 'string' is not assignable to parameter of type '"error" | "time" | "group" | "debug" | "info" | "warn" | "log" | "trace" | "groupCollapsed" | "groupEnd" | "profile" | "profileEnd" | "clear" | "status"'. -lib/logging/Logger.js(103,20): error TS2345: Argument of type 'string' is not assignable to parameter of type '"error" | "time" | "group" | "debug" | "info" | "warn" | "log" | "trace" | "groupCollapsed" | "groupEnd" | "profile" | "profileEnd" | "clear" | "status"'. -lib/logging/Logger.js(117,20): error TS2345: Argument of type 'string' is not assignable to parameter of type '"error" | "time" | "group" | "debug" | "info" | "warn" | "log" | "trace" | "groupCollapsed" | "groupEnd" | "profile" | "profileEnd" | "clear" | "status"'. -lib/logging/Logger.js(127,20): error TS2345: Argument of type 'string' is not assignable to parameter of type '"error" | "time" | "group" | "debug" | "info" | "warn" | "log" | "trace" | "groupCollapsed" | "groupEnd" | "profile" | "profileEnd" | "clear" | "status"'. From ef0cca7d12a320bc98cefebbf4d391de36003149 Mon Sep 17 00:00:00 2001 From: Orta Date: Wed, 13 Nov 2019 20:16:48 -0500 Subject: [PATCH 12/50] Adds 'did you mean' to the CLI args parser (#35063) * Adds did you mean to the CLI args parser * Adds test coverage for the did you mean on CLI args * Adds did you mean to convertOptionsFromJson * Ensure tsconfig compiler flags also get 'did you mean?' --- src/compiler/commandLineParser.ts | 94 ++++++++++++++----- src/compiler/diagnosticMessages.json | 13 ++- src/compiler/types.ts | 8 +- .../unittests/config/commandLineParsing.ts | 29 ++++++ .../config/convertTypeAcquisitionFromJson.ts | 8 +- src/testRunner/unittests/tscWatch/helpers.ts | 5 + .../unittests/tscWatch/programUpdates.ts | 2 +- .../unittests/tsserver/projectErrors.ts | 8 +- 8 files changed, 131 insertions(+), 36 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index c9517440ac6..4bcc1e48c8f 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -1087,12 +1087,15 @@ namespace ts { [option: string]: CompilerOptionsValue | undefined; } - /** Tuple with error messages for 'unknown compiler option', 'option requires type' */ - type ParseCommandLineWorkerDiagnostics = [DiagnosticMessage, DiagnosticMessage]; + interface ParseCommandLineWorkerDiagnostics { + unknownOptionDiagnostic: DiagnosticMessage, + unknownDidYouMeanDiagnostic: DiagnosticMessage, + optionTypeMismatchDiagnostic: DiagnosticMessage + } function parseCommandLineWorker( getOptionNameMap: () => OptionNameMap, - [unknownOptionDiagnostic, optionTypeMismatchDiagnostic]: ParseCommandLineWorkerDiagnostics, + diagnostics: ParseCommandLineWorkerDiagnostics, commandLine: readonly string[], readFile?: (path: string) => string | undefined) { const options = {} as OptionsBase; @@ -1123,7 +1126,7 @@ namespace ts { else { // Check to see if no argument was provided (e.g. "--locale" is the last command-line argument). if (!args[i] && opt.type !== "boolean") { - errors.push(createCompilerDiagnostic(optionTypeMismatchDiagnostic, opt.name)); + errors.push(createCompilerDiagnostic(diagnostics.optionTypeMismatchDiagnostic, opt.name)); } switch (opt.type) { @@ -1160,7 +1163,13 @@ namespace ts { } } else { - errors.push(createCompilerDiagnostic(unknownOptionDiagnostic, s)); + const possibleOption = getSpellingSuggestion(s, optionDeclarations, opt => `--${opt.name}`); + if (possibleOption) { + errors.push(createCompilerDiagnostic(diagnostics.unknownDidYouMeanDiagnostic, s, possibleOption.name)); + } + else { + errors.push(createCompilerDiagnostic(diagnostics.unknownOptionDiagnostic, s)); + } } } else { @@ -1203,11 +1212,13 @@ namespace ts { } } + const compilerOptionsDefaultDiagnostics = { + unknownOptionDiagnostic: Diagnostics.Unknown_compiler_option_0, + unknownDidYouMeanDiagnostic: Diagnostics.Unknown_compiler_option_0_Did_you_mean_1, + optionTypeMismatchDiagnostic: Diagnostics.Compiler_option_0_expects_an_argument + }; export function parseCommandLine(commandLine: readonly string[], readFile?: (path: string) => string | undefined): ParsedCommandLine { - return parseCommandLineWorker(getOptionNameMap, [ - Diagnostics.Unknown_compiler_option_0, - Diagnostics.Compiler_option_0_expects_an_argument - ], commandLine, readFile); + return parseCommandLineWorker(getOptionNameMap, compilerOptionsDefaultDiagnostics, commandLine, readFile); } /** @internal */ @@ -1239,10 +1250,11 @@ namespace ts { export function parseBuildCommand(args: readonly string[]): ParsedBuildCommand { let buildOptionNameMap: OptionNameMap | undefined; const returnBuildOptionNameMap = () => (buildOptionNameMap || (buildOptionNameMap = createOptionNameMap(buildOpts))); - const { options, fileNames: projects, errors } = parseCommandLineWorker(returnBuildOptionNameMap, [ - Diagnostics.Unknown_build_option_0, - Diagnostics.Build_option_0_requires_a_value_of_type_1 - ], args); + const { options, fileNames: projects, errors } = parseCommandLineWorker(returnBuildOptionNameMap, { + unknownOptionDiagnostic: Diagnostics.Unknown_build_option_0, + unknownDidYouMeanDiagnostic: Diagnostics.Unknown_build_option_0_Did_you_mean_1, + optionTypeMismatchDiagnostic: Diagnostics.Build_option_0_requires_a_value_of_type_1 + }, args); const buildOptions = options as BuildOptions; if (projects.length === 0) { @@ -1389,19 +1401,28 @@ namespace ts { name: "compilerOptions", type: "object", elementOptions: commandLineOptionsToMap(optionDeclarations), - extraKeyDiagnosticMessage: Diagnostics.Unknown_compiler_option_0 + extraKeyDiagnostics: { + unknownOptionDiagnostic: Diagnostics.Unknown_compiler_option_0, + unknownDidYouMeanDiagnostic: Diagnostics.Unknown_compiler_option_0_Did_you_mean_1 + }, }, { name: "typingOptions", type: "object", elementOptions: commandLineOptionsToMap(typeAcquisitionDeclarations), - extraKeyDiagnosticMessage: Diagnostics.Unknown_type_acquisition_option_0 + extraKeyDiagnostics: { + unknownOptionDiagnostic: Diagnostics.Unknown_type_acquisition_option_0, + unknownDidYouMeanDiagnostic: Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1 + }, }, { name: "typeAcquisition", type: "object", elementOptions: commandLineOptionsToMap(typeAcquisitionDeclarations), - extraKeyDiagnosticMessage: Diagnostics.Unknown_type_acquisition_option_0 + extraKeyDiagnostics: { + unknownOptionDiagnostic: Diagnostics.Unknown_type_acquisition_option_0, + unknownDidYouMeanDiagnostic: Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1 + } }, { name: "extends", @@ -1507,7 +1528,7 @@ namespace ts { function convertObjectLiteralExpressionToJson( node: ObjectLiteralExpression, knownOptions: Map | undefined, - extraKeyDiagnosticMessage: DiagnosticMessage | undefined, + extraKeyDiagnostics: DidYouMeanOptionalDiagnostics | undefined, parentOption: string | undefined ): any { const result: any = returnValue ? {} : undefined; @@ -1527,8 +1548,19 @@ namespace ts { const textOfKey = getTextOfPropertyName(element.name); const keyText = textOfKey && unescapeLeadingUnderscores(textOfKey); const option = keyText && knownOptions ? knownOptions.get(keyText) : undefined; - if (keyText && extraKeyDiagnosticMessage && !option) { - errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnosticMessage, keyText)); + if (keyText && extraKeyDiagnostics && !option) { + if (knownOptions) { + const possibleOption = getSpellingSuggestion(keyText, arrayFrom(knownOptions.keys()), identity); + if (possibleOption) { + errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnostics.unknownDidYouMeanDiagnostic, keyText, possibleOption)); + } + else { + errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnostics.unknownOptionDiagnostic, keyText)); + } + } + else { + errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnostics.unknownOptionDiagnostic, keyText)); + } } const value = convertPropertyValueToJson(element.initializer, option); if (typeof keyText !== "undefined") { @@ -1630,9 +1662,9 @@ namespace ts { // vs what we set in the json // If need arises, we can modify this interface and callbacks as needed if (option) { - const { elementOptions, extraKeyDiagnosticMessage, name: optionName } = option; + const { elementOptions, extraKeyDiagnostics, name: optionName } = option; return convertObjectLiteralExpressionToJson(objectLiteralExpression, - elementOptions, extraKeyDiagnosticMessage, optionName); + elementOptions, extraKeyDiagnostics, optionName); } else { return convertObjectLiteralExpressionToJson( @@ -2468,7 +2500,7 @@ namespace ts { basePath: string, errors: Push, configFileName?: string): CompilerOptions { const options = getDefaultCompilerOptions(configFileName); - convertOptionsFromJson(optionDeclarations, jsonOptions, basePath, options, Diagnostics.Unknown_compiler_option_0, errors); + convertOptionsFromJson(optionDeclarations, jsonOptions, basePath, options, compilerOptionsDefaultDiagnostics, errors); if (configFileName) { options.configFilePath = normalizeSlashes(configFileName); } @@ -2484,13 +2516,19 @@ namespace ts { const options = getDefaultTypeAcquisition(configFileName); const typeAcquisition = convertEnableAutoDiscoveryToEnable(jsonOptions); - convertOptionsFromJson(typeAcquisitionDeclarations, typeAcquisition, basePath, options, Diagnostics.Unknown_type_acquisition_option_0, errors); + + const diagnostics = { + unknownOptionDiagnostic: Diagnostics.Unknown_type_acquisition_option_0, + unknownDidYouMeanDiagnostic: Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1 , + }; + convertOptionsFromJson(typeAcquisitionDeclarations, typeAcquisition, basePath, options, diagnostics, errors); return options; } + function convertOptionsFromJson(optionDeclarations: readonly CommandLineOption[], jsonOptions: any, basePath: string, - defaultOptions: CompilerOptions | TypeAcquisition, diagnosticMessage: DiagnosticMessage, errors: Push) { + defaultOptions: CompilerOptions | TypeAcquisition, diagnostics: DidYouMeanOptionalDiagnostics, errors: Push) { if (!jsonOptions) { return; @@ -2504,7 +2542,13 @@ namespace ts { defaultOptions[opt.name] = convertJsonOption(opt, jsonOptions[id], basePath, errors); } else { - errors.push(createCompilerDiagnostic(diagnosticMessage, id)); + const possibleOption = getSpellingSuggestion(id, optionDeclarations, opt => opt.name); + if (possibleOption) { + errors.push(createCompilerDiagnostic(diagnostics.unknownDidYouMeanDiagnostic, id, possibleOption.name)); + } + else { + errors.push(createCompilerDiagnostic(diagnostics.unknownOptionDiagnostic, id)); + } } } } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index cf2bdfb8cec..d93b725c01b 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -3177,6 +3177,10 @@ "category": "Error", "code": 5024 }, + "Unknown compiler option '{0}'. Did you mean '{1}'?": { + "category": "Error", + "code": 5025 + }, "Could not write file '{0}': {1}.": { "category": "Error", "code": 5033 @@ -3297,6 +3301,10 @@ "category": "Error", "code": 5076 }, + "Unknown build option '{0}'. Did you mean '{1}'?": { + "category": "Error", + "code": 5077 + }, "Generates a sourcemap for each corresponding '.d.ts' file.": { "category": "Message", @@ -4747,7 +4755,10 @@ "category": "Error", "code": 17017 }, - + "Unknown type acquisition option '{0}'. Did you mean '{1}'?": { + "category": "Error", + "code": 17018 + }, "Circularity detected while resolving configuration: {0}": { "category": "Error", "code": 18000 diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 3b387d6ec1e..9aef31dda4e 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -5199,11 +5199,17 @@ namespace ts { type: Map; // an object literal mapping named values to actual values } + /* @internal */ + export interface DidYouMeanOptionalDiagnostics { + unknownOptionDiagnostic: DiagnosticMessage, + unknownDidYouMeanDiagnostic: DiagnosticMessage, + } + /* @internal */ export interface TsConfigOnlyOption extends CommandLineOptionBase { type: "object"; elementOptions?: Map; - extraKeyDiagnosticMessage?: DiagnosticMessage; + extraKeyDiagnostics?: DidYouMeanOptionalDiagnostics; } /* @internal */ diff --git a/src/testRunner/unittests/config/commandLineParsing.ts b/src/testRunner/unittests/config/commandLineParsing.ts index 5792ee1a39c..6ad786fbfc4 100644 --- a/src/testRunner/unittests/config/commandLineParsing.ts +++ b/src/testRunner/unittests/config/commandLineParsing.ts @@ -40,6 +40,33 @@ namespace ts { }); }); + it("Handles 'did you mean?' for misspelt flags", () => { + // --declarations --allowTS + assertParseResult(["--declarations", "--allowTS"], { + errors: [ + { + messageText:"Unknown compiler option '--declarations'. Did you mean 'declaration'?", + category: Diagnostics.Unknown_compiler_option_0_Did_you_mean_1.category, + code: Diagnostics.Unknown_compiler_option_0_Did_you_mean_1.code, + file: undefined, + start: undefined, + length: undefined + }, + { + messageText: "Unknown compiler option '--allowTS'. Did you mean 'allowJs'?", + category: Diagnostics.Unknown_compiler_option_0_Did_you_mean_1.category, + code: Diagnostics.Unknown_compiler_option_0_Did_you_mean_1.code, + file: undefined, + start: undefined, + length: undefined + } + ], + fileNames: [], + options: {} + }); + }); + + it("Parse multiple options of library flags ", () => { // --lib es5,es2015.symbol.wellknown 0.ts assertParseResult(["--lib", "es5,es2015.symbol.wellknown", "0.ts"], @@ -556,4 +583,6 @@ namespace ts { verifyInvalidCombination("watch", "dry"); }); }); + + } diff --git a/src/testRunner/unittests/config/convertTypeAcquisitionFromJson.ts b/src/testRunner/unittests/config/convertTypeAcquisitionFromJson.ts index 0c0b953209f..e8ca5f15d69 100644 --- a/src/testRunner/unittests/config/convertTypeAcquisitionFromJson.ts +++ b/src/testRunner/unittests/config/convertTypeAcquisitionFromJson.ts @@ -111,8 +111,8 @@ namespace ts { }, errors: [ { - category: Diagnostics.Unknown_type_acquisition_option_0.category, - code: Diagnostics.Unknown_type_acquisition_option_0.code, + category: Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1.category, + code: Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1.code, file: undefined, start: 0, length: 0, @@ -206,8 +206,8 @@ namespace ts { }, errors: [ { - category: Diagnostics.Unknown_type_acquisition_option_0.category, - code: Diagnostics.Unknown_type_acquisition_option_0.code, + category: Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1.category, + code: Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1.code, file: undefined, start: 0, length: 0, diff --git a/src/testRunner/unittests/tscWatch/helpers.ts b/src/testRunner/unittests/tscWatch/helpers.ts index 1ab49cec139..7f6a69aa48d 100644 --- a/src/testRunner/unittests/tscWatch/helpers.ts +++ b/src/testRunner/unittests/tscWatch/helpers.ts @@ -273,6 +273,11 @@ namespace ts.tscWatch { return getDiagnosticOfFile(program.getCompilerOptions().configFile!, configFile.content.indexOf(quotedOption), quotedOption.length, Diagnostics.Unknown_compiler_option_0, option); } + export function getUnknownDidYouMeanCompilerOption(program: Program, configFile: File, option: string, didYouMean: string) { + const quotedOption = `"${option}"`; + return getDiagnosticOfFile(program.getCompilerOptions().configFile!, configFile.content.indexOf(quotedOption), quotedOption.length, Diagnostics.Unknown_compiler_option_0_Did_you_mean_1, option, didYouMean); + } + export function getDiagnosticModuleNotFoundOfFile(program: Program, file: File, moduleName: string) { const quotedModuleName = `"${moduleName}"`; return getDiagnosticOfFileFromProgram(program, file.path, file.content.indexOf(quotedModuleName), quotedModuleName.length, Diagnostics.Cannot_find_module_0, moduleName); diff --git a/src/testRunner/unittests/tscWatch/programUpdates.ts b/src/testRunner/unittests/tscWatch/programUpdates.ts index 0b9cc883b85..e6f09c2628a 100644 --- a/src/testRunner/unittests/tscWatch/programUpdates.ts +++ b/src/testRunner/unittests/tscWatch/programUpdates.ts @@ -757,7 +757,7 @@ namespace ts.tscWatch { const watch = createWatchOfConfigFile(configFile.path, host); checkOutputErrorsInitial(host, [ getUnknownCompilerOption(watch(), configFile, "foo"), - getUnknownCompilerOption(watch(), configFile, "allowJS") + getUnknownDidYouMeanCompilerOption(watch(), configFile, "allowJS", "allowJs") ]); }); diff --git a/src/testRunner/unittests/tsserver/projectErrors.ts b/src/testRunner/unittests/tsserver/projectErrors.ts index 64c07c77010..41eea1de9e7 100644 --- a/src/testRunner/unittests/tsserver/projectErrors.ts +++ b/src/testRunner/unittests/tsserver/projectErrors.ts @@ -496,14 +496,14 @@ declare module '@custom/plugin' { }); describe("unittests:: tsserver:: Project Errors for Configure file diagnostics events", () => { - function getUnknownCompilerOptionDiagnostic(configFile: File, prop: string): ConfigFileDiagnostic { - const d = Diagnostics.Unknown_compiler_option_0; + function getUnknownCompilerOptionDiagnostic(configFile: File, prop: string, didYouMean?: string): ConfigFileDiagnostic { + const d = didYouMean ? Diagnostics.Unknown_compiler_option_0_Did_you_mean_1 : Diagnostics.Unknown_compiler_option_0; const start = configFile.content.indexOf(prop) - 1; // start at "prop" return { fileName: configFile.path, start, length: prop.length + 2, - messageText: formatStringFromArgs(d.message, [prop]), + messageText: formatStringFromArgs(d.message, didYouMean ? [prop, didYouMean] : [prop]), category: d.category, code: d.code, reportsUnnecessary: undefined @@ -543,7 +543,7 @@ declare module '@custom/plugin' { openFilesForSession([file], serverEventManager.session); serverEventManager.checkSingleConfigFileDiagEvent(configFile.path, file.path, [ getUnknownCompilerOptionDiagnostic(configFile, "foo"), - getUnknownCompilerOptionDiagnostic(configFile, "allowJS") + getUnknownCompilerOptionDiagnostic(configFile, "allowJS", "allowJs") ]); }); From aa0cb889dae89a3bac503e4bd157a277449dac98 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 14 Nov 2019 15:37:00 -0800 Subject: [PATCH 13/50] Support dynamic file names with project root path (#35111) * Support dynamic file names with project root path Fixes #35094 * Remove unexpected change --- src/server/editorServices.ts | 12 ++-- src/testRunner/unittests/tsserver/projects.ts | 56 +++++++++++++++++++ 2 files changed, 64 insertions(+), 4 deletions(-) diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index f7d220b7894..00f9f4a73e2 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -1141,7 +1141,7 @@ namespace ts.server { const project = this.getOrCreateInferredProjectForProjectRootPathIfEnabled(info, projectRootPath) || this.getOrCreateSingleInferredProjectIfEnabled() || - this.getOrCreateSingleInferredWithoutProjectRoot(info.isDynamic ? this.currentDirectory : getDirectoryPath(info.path)); + this.getOrCreateSingleInferredWithoutProjectRoot(info.isDynamic ? projectRootPath || this.currentDirectory : getDirectoryPath(info.path)); project.addRoot(info); if (info.containingProjects[0] !== project) { @@ -1503,6 +1503,8 @@ namespace ts.server { Debug.assert(!isOpenScriptInfo(info) || this.openFiles.has(info.path)); const projectRootPath = this.openFiles.get(info.path); + const scriptInfo = Debug.assertDefined(this.getScriptInfo(info.path)); + if (scriptInfo.isDynamic) return undefined; let searchPath = asNormalizedPath(getDirectoryPath(info.fileName)); const isSearchPathInProjectRoot = () => containsPath(projectRootPath!, searchPath, this.currentDirectory, !this.host.useCaseSensitiveFileNames); @@ -1943,7 +1945,9 @@ namespace ts.server { } private getOrCreateInferredProjectForProjectRootPathIfEnabled(info: ScriptInfo, projectRootPath: NormalizedPath | undefined): InferredProject | undefined { - if (info.isDynamic || !this.useInferredProjectPerProjectRoot) { + if (!this.useInferredProjectPerProjectRoot || + // Its a dynamic info opened without project root + (info.isDynamic && projectRootPath === undefined)) { return undefined; } @@ -2228,7 +2232,7 @@ namespace ts.server { const isDynamic = isDynamicFileName(fileName); Debug.assert(isRootedDiskPath(fileName) || isDynamic || openedByClient, "", () => `${JSON.stringify({ fileName, currentDirectory, hostCurrentDirectory: this.currentDirectory, openKeys: arrayFrom(this.openFilesWithNonRootedDiskPath.keys()) })}\nScript info with non-dynamic relative file name can only be open script info or in context of host currentDirectory`); Debug.assert(!isRootedDiskPath(fileName) || this.currentDirectory === currentDirectory || !this.openFilesWithNonRootedDiskPath.has(this.toCanonicalFileName(fileName)), "", () => `${JSON.stringify({ fileName, currentDirectory, hostCurrentDirectory: this.currentDirectory, openKeys: arrayFrom(this.openFilesWithNonRootedDiskPath.keys()) })}\nOpen script files with non rooted disk path opened with current directory context cannot have same canonical names`); - Debug.assert(!isDynamic || this.currentDirectory === currentDirectory, "", () => `${JSON.stringify({ fileName, currentDirectory, hostCurrentDirectory: this.currentDirectory, openKeys: arrayFrom(this.openFilesWithNonRootedDiskPath.keys()) })}\nDynamic files must always have current directory context since containing external project name will always match the script info name.`); + Debug.assert(!isDynamic || this.currentDirectory === currentDirectory || this.useInferredProjectPerProjectRoot, "", () => `${JSON.stringify({ fileName, currentDirectory, hostCurrentDirectory: this.currentDirectory, openKeys: arrayFrom(this.openFilesWithNonRootedDiskPath.keys()) })}\nDynamic files must always be opened with service's current directory or service should support inferred project per projectRootPath.`); // If the file is not opened by client and the file doesnot exist on the disk, return if (!openedByClient && !isDynamic && !(hostToQueryFileExistsOn || this.host).fileExists(fileName)) { return; @@ -2239,7 +2243,7 @@ namespace ts.server { if (!openedByClient) { this.watchClosedScriptInfo(info); } - else if (!isRootedDiskPath(fileName) && !isDynamic) { + else if (!isRootedDiskPath(fileName) && (!isDynamic || this.currentDirectory !== currentDirectory)) { // File that is opened by user but isn't rooted disk path this.openFilesWithNonRootedDiskPath.set(this.toCanonicalFileName(fileName), info); } diff --git a/src/testRunner/unittests/tsserver/projects.ts b/src/testRunner/unittests/tsserver/projects.ts index 56bbe989bfc..bd724bd77e3 100644 --- a/src/testRunner/unittests/tsserver/projects.ts +++ b/src/testRunner/unittests/tsserver/projects.ts @@ -1131,6 +1131,62 @@ var x = 10;` checkProjectActualFiles(project, [file.path, libFile.path]); }); + describe("dynamic file with projectRootPath", () => { + const file: File = { + path: "^walkThroughSnippet:/Users/UserName/projects/someProject/out/someFile#1.js", + content: "var x = 10;" + }; + const configFile: File = { + path: `${projectRoot}/tsconfig.json`, + content: "{}" + }; + const configProjectFile: File = { + path: `${projectRoot}/a.ts`, + content: "let y = 10;" + }; + it("with useInferredProjectPerProjectRoot", () => { + const host = createServerHost([libFile, configFile, configProjectFile], { useCaseSensitiveFileNames: true }); + const session = createSession(host, { useInferredProjectPerProjectRoot: true }); + openFilesForSession([{ file: file.path, projectRootPath: projectRoot }], session); + + const projectService = session.getProjectService(); + checkNumberOfProjects(projectService, { inferredProjects: 1 }); + checkProjectActualFiles(projectService.inferredProjects[0], [file.path, libFile.path]); + + session.executeCommandSeq({ + command: protocol.CommandTypes.GetOutliningSpans, + arguments: { + file: file.path + } + }); + + // Without project root + const file2Path = file.path.replace("#1", "#2"); + projectService.openClientFile(file2Path, file.content); + checkNumberOfProjects(projectService, { inferredProjects: 2 }); + checkProjectActualFiles(projectService.inferredProjects[0], [file.path, libFile.path]); + checkProjectActualFiles(projectService.inferredProjects[1], [file2Path, libFile.path]); + }); + + it("fails when useInferredProjectPerProjectRoot is false", () => { + const host = createServerHost([libFile, configFile, configProjectFile], { useCaseSensitiveFileNames: true }); + const projectService = createProjectService(host); + try { + projectService.openClientFile(file.path, file.content, /*scriptKind*/ undefined, projectRoot); + } + catch (e) { + assert.strictEqual( + e.message.replace(/\r?\n/, "\n"), + `Debug Failure. False expression: \nVerbose Debug Information: {"fileName":"^walkThroughSnippet:/Users/UserName/projects/someProject/out/someFile#1.js","currentDirectory":"/user/username/projects/myproject","hostCurrentDirectory":"/","openKeys":[]}\nDynamic files must always be opened with service's current directory or service should support inferred project per projectRootPath.` + ); + } + const file2Path = file.path.replace("#1", "#2"); + projectService.openClientFile(file2Path, file.content); + projectService.checkNumberOfProjects({ inferredProjects: 1 }); + checkProjectActualFiles(projectService.inferredProjects[0], [file2Path, libFile.path]); + }); + }); + it("files opened, closed affecting multiple projects", () => { const file: File = { path: "/a/b/projects/config/file.ts", From 8f40ac06cc44928fb3c69dac8bb8274ba8cdbd9b Mon Sep 17 00:00:00 2001 From: Klaus Meinhardt Date: Fri, 15 Nov 2019 02:34:13 +0100 Subject: [PATCH 14/50] optimize transform of optional chaining and nullish coalescing (#34951) * optimize transform of optional chaining and nullish coalescing * remove unnecessary condition * typo * fix lint * prevent capturing of super * swap branches again * accept new baselines * avoid temporary objects --- src/compiler/transformers/esnext.ts | 128 +++++----- tests/baselines/reference/callChain.2.js | 8 +- tests/baselines/reference/callChain.3.js | 12 +- tests/baselines/reference/callChain.js | 54 ++-- .../reference/controlFlowNullishCoalesce.js | 4 +- .../reference/controlFlowOptionalChain.js | 230 ++++++++---------- .../reference/elementAccessChain.2.js | 12 +- .../reference/elementAccessChain.3.js | 49 ++-- .../baselines/reference/elementAccessChain.js | 26 +- .../reference/exhaustiveSwitchStatements1.js | 4 +- .../reference/nullishCoalescingOperator1.js | 38 +-- .../reference/nullishCoalescingOperator10.js | 2 +- .../reference/nullishCoalescingOperator11.js | 2 +- .../reference/nullishCoalescingOperator12.js | 4 +- .../reference/nullishCoalescingOperator2.js | 18 +- .../reference/nullishCoalescingOperator3.js | 2 +- .../reference/nullishCoalescingOperator4.js | 2 +- .../reference/nullishCoalescingOperator5.js | 24 +- .../reference/nullishCoalescingOperator6.js | 2 +- .../reference/nullishCoalescingOperator7.js | 4 +- .../reference/nullishCoalescingOperator8.js | 6 +- .../reference/nullishCoalescingOperator9.js | 2 +- .../nullishCoalescingOperator_not_strict.js | 18 +- .../reference/optionalChainingInference.js | 17 +- .../reference/propertyAccessChain.2.js | 8 +- .../reference/propertyAccessChain.3.js | 49 ++-- .../reference/propertyAccessChain.js | 16 +- tests/baselines/reference/superMethodCall.js | 44 ++++ .../reference/superMethodCall.symbols | 30 +++ .../baselines/reference/superMethodCall.types | 32 +++ tests/baselines/reference/thisMethodCall.js | 17 ++ .../reference/thisMethodCall.symbols | 16 ++ .../baselines/reference/thisMethodCall.types | 17 ++ .../reference/thisTypeOptionalCall.js | 3 +- .../callChain/superMethodCall.ts | 15 ++ .../callChain/thisMethodCall.ts | 8 + 36 files changed, 533 insertions(+), 390 deletions(-) create mode 100644 tests/baselines/reference/superMethodCall.js create mode 100644 tests/baselines/reference/superMethodCall.symbols create mode 100644 tests/baselines/reference/superMethodCall.types create mode 100644 tests/baselines/reference/thisMethodCall.js create mode 100644 tests/baselines/reference/thisMethodCall.symbols create mode 100644 tests/baselines/reference/thisMethodCall.types create mode 100644 tests/cases/conformance/expressions/optionalChaining/callChain/superMethodCall.ts create mode 100644 tests/cases/conformance/expressions/optionalChaining/callChain/thisMethodCall.ts diff --git a/src/compiler/transformers/esnext.ts b/src/compiler/transformers/esnext.ts index a138907e236..ab3ecdc9228 100644 --- a/src/compiler/transformers/esnext.ts +++ b/src/compiler/transformers/esnext.ts @@ -58,43 +58,29 @@ namespace ts { return updateParen(node, expression); } - function visitNonOptionalPropertyAccessExpression(node: PropertyAccessExpression, captureThisArg: boolean): Expression { + function visitNonOptionalPropertyOrElementAccessExpression(node: AccessExpression, captureThisArg: boolean): Expression { if (isOptionalChain(node)) { // If `node` is an optional chain, then it is the outermost chain of an optional expression. return visitOptionalExpression(node, captureThisArg); } - let expression = visitNode(node.expression, visitor, isExpression); + let expression: Expression = visitNode(node.expression, visitor, isExpression); Debug.assertNotNode(expression, isSyntheticReference); let thisArg: Expression | undefined; if (captureThisArg) { - // `a.b` -> { expression: `(_a = a).b`, thisArg: `_a` } - thisArg = createTempVariable(hoistVariableDeclaration); - expression = createParen(createAssignment(thisArg, expression)); + if (shouldCaptureInTempVariable(expression)) { + thisArg = createTempVariable(hoistVariableDeclaration); + expression = createAssignment(thisArg, expression); + } + else { + thisArg = expression; + } } - expression = updatePropertyAccess(node, expression, visitNode(node.name, visitor, isIdentifier)); - return thisArg ? createSyntheticReferenceExpression(expression, thisArg) : expression; - } - - function visitNonOptionalElementAccessExpression(node: ElementAccessExpression, captureThisArg: boolean): Expression { - if (isOptionalChain(node)) { - // If `node` is an optional chain, then it is the outermost chain of an optional expression. - return visitOptionalExpression(node, captureThisArg); - } - - let expression = visitNode(node.expression, visitor, isExpression); - Debug.assertNotNode(expression, isSyntheticReference); - - let thisArg: Expression | undefined; - if (captureThisArg) { - // `a[b]` -> { expression: `(_a = a)[b]`, thisArg: `_a` } - thisArg = createTempVariable(hoistVariableDeclaration); - expression = createParen(createAssignment(thisArg, expression)); - } - - expression = updateElementAccess(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); + expression = node.kind === SyntaxKind.PropertyAccessExpression + ? updatePropertyAccess(node, expression, visitNode(node.name, visitor, isIdentifier)) + : updateElementAccess(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); return thisArg ? createSyntheticReferenceExpression(expression, thisArg) : expression; } @@ -109,8 +95,8 @@ namespace ts { function visitNonOptionalExpression(node: Expression, captureThisArg: boolean): Expression { switch (node.kind) { case SyntaxKind.ParenthesizedExpression: return visitNonOptionalParenthesizedExpression(node as ParenthesizedExpression, captureThisArg); - case SyntaxKind.PropertyAccessExpression: return visitNonOptionalPropertyAccessExpression(node as PropertyAccessExpression, captureThisArg); - case SyntaxKind.ElementAccessExpression: return visitNonOptionalElementAccessExpression(node as ElementAccessExpression, captureThisArg); + case SyntaxKind.PropertyAccessExpression: + case SyntaxKind.ElementAccessExpression: return visitNonOptionalPropertyOrElementAccessExpression(node as AccessExpression, captureThisArg); case SyntaxKind.CallExpression: return visitNonOptionalCallExpression(node as CallExpression, captureThisArg); default: return visitNode(node, visitor, isExpression); } @@ -119,39 +105,38 @@ namespace ts { function visitOptionalExpression(node: OptionalChain, captureThisArg: boolean): Expression { const { expression, chain } = flattenChain(node); const left = visitNonOptionalExpression(expression, isCallChain(chain[0])); - const temp = createTempVariable(hoistVariableDeclaration); const leftThisArg = isSyntheticReference(left) ? left.thisArg : undefined; - const leftExpression = isSyntheticReference(left) ? left.expression : left; - let rightExpression: Expression = temp; + let leftExpression = isSyntheticReference(left) ? left.expression : left; + let capturedLeft: Expression = leftExpression; + if (shouldCaptureInTempVariable(leftExpression)) { + capturedLeft = createTempVariable(hoistVariableDeclaration); + leftExpression = createAssignment(capturedLeft, leftExpression); + } + let rightExpression = capturedLeft; let thisArg: Expression | undefined; for (let i = 0; i < chain.length; i++) { const segment = chain[i]; switch (segment.kind) { case SyntaxKind.PropertyAccessExpression: - if (i === chain.length - 1 && captureThisArg) { - thisArg = createTempVariable(hoistVariableDeclaration); - rightExpression = createParen(createAssignment(thisArg, rightExpression)); - } - rightExpression = createPropertyAccess( - rightExpression, - visitNode(segment.name, visitor, isIdentifier) - ); - break; case SyntaxKind.ElementAccessExpression: if (i === chain.length - 1 && captureThisArg) { - thisArg = createTempVariable(hoistVariableDeclaration); - rightExpression = createParen(createAssignment(thisArg, rightExpression)); + if (shouldCaptureInTempVariable(rightExpression)) { + thisArg = createTempVariable(hoistVariableDeclaration); + rightExpression = createAssignment(thisArg, rightExpression); + } + else { + thisArg = rightExpression; + } } - rightExpression = createElementAccess( - rightExpression, - visitNode(segment.argumentExpression, visitor, isExpression) - ); + rightExpression = segment.kind === SyntaxKind.PropertyAccessExpression + ? createPropertyAccess(rightExpression, visitNode(segment.name, visitor, isIdentifier)) + : createElementAccess(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); break; case SyntaxKind.CallExpression: if (i === 0 && leftThisArg) { rightExpression = createFunctionCall( rightExpression, - leftThisArg, + leftThisArg.kind === SyntaxKind.SuperKeyword ? createThis() : leftThisArg, visitNodes(segment.arguments, visitor, isExpression) ); } @@ -168,48 +153,49 @@ namespace ts { } const target = createConditional( - createLogicalOr( - createStrictEquality(createAssignment(temp, leftExpression), createNull()), - createStrictEquality(temp, createVoidZero()) - ), + createNotNullCondition(leftExpression, capturedLeft, /*invert*/ true), createVoidZero(), - rightExpression + rightExpression, ); return thisArg ? createSyntheticReferenceExpression(target, thisArg) : target; } - function createNotNullCondition(node: Expression) { + function createNotNullCondition(left: Expression, right: Expression, invert?: boolean) { return createBinary( createBinary( - node, - createToken(SyntaxKind.ExclamationEqualsEqualsToken), + left, + createToken(invert ? SyntaxKind.EqualsEqualsEqualsToken : SyntaxKind.ExclamationEqualsEqualsToken), createNull() ), - createToken(SyntaxKind.AmpersandAmpersandToken), + createToken(invert ? SyntaxKind.BarBarToken : SyntaxKind.AmpersandAmpersandToken), createBinary( - node, - createToken(SyntaxKind.ExclamationEqualsEqualsToken), + right, + createToken(invert ? SyntaxKind.EqualsEqualsEqualsToken : SyntaxKind.ExclamationEqualsEqualsToken), createVoidZero() ) ); } function transformNullishCoalescingExpression(node: BinaryExpression) { - const expressions: Expression[] = []; let left = visitNode(node.left, visitor, isExpression); - if (!isIdentifier(left)) { - const temp = createTempVariable(hoistVariableDeclaration); - expressions.push(createAssignment(temp, left)); - left = temp; + let right = left; + if (shouldCaptureInTempVariable(left)) { + right = createTempVariable(hoistVariableDeclaration); + left = createAssignment(right, left); } - expressions.push( - createParen( - createConditional( - createNotNullCondition(left), - left, - visitNode(node.right, visitor, isExpression))) - ); - return inlineExpressions(expressions); + return createConditional( + createNotNullCondition(left, right), + right, + visitNode(node.right, visitor, isExpression), + ); + } + + function shouldCaptureInTempVariable(expression: Expression): boolean { + // don't capture identifiers and `this` in a temporary variable + // `super` cannot be captured as it's no real variable + return !isIdentifier(expression) && + expression.kind !== SyntaxKind.ThisKeyword && + expression.kind !== SyntaxKind.SuperKeyword; } } } diff --git a/tests/baselines/reference/callChain.2.js b/tests/baselines/reference/callChain.2.js index a44115ef916..89070f41003 100644 --- a/tests/baselines/reference/callChain.2.js +++ b/tests/baselines/reference/callChain.2.js @@ -10,7 +10,7 @@ o3.b?.().c; //// [callChain.2.js] -var _a, _b, _c, _d; -(_a = o1) === null || _a === void 0 ? void 0 : _a(); -(_b = o2) === null || _b === void 0 ? void 0 : _b.b(); -(_d = (_c = o3).b) === null || _d === void 0 ? void 0 : _d.call(_c).c; +var _a; +o1 === null || o1 === void 0 ? void 0 : o1(); +o2 === null || o2 === void 0 ? void 0 : o2.b(); +(_a = o3.b) === null || _a === void 0 ? void 0 : _a.call(o3).c; diff --git a/tests/baselines/reference/callChain.3.js b/tests/baselines/reference/callChain.3.js index 2a6685d0d53..b34458a26e7 100644 --- a/tests/baselines/reference/callChain.3.js +++ b/tests/baselines/reference/callChain.3.js @@ -12,11 +12,11 @@ t1 = a!.m!({x: 12}); //// [callChain.3.js] "use strict"; -var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q; -var n1 = (_c = (_a = a) === null || _a === void 0 ? void 0 : (_b = _a).m) === null || _c === void 0 ? void 0 : _c.call(_b, { x: 12 }); // should be an error (`undefined` is not assignable to `number`) -var n2 = (_f = (_d = a) === null || _d === void 0 ? void 0 : (_e = _d).m) === null || _f === void 0 ? void 0 : _f.call(_e, { x: absorb() }); // likewise -var n3 = (_j = (_g = a) === null || _g === void 0 ? void 0 : (_h = _g).m) === null || _j === void 0 ? void 0 : _j.call(_h, { x: 12 }); // should be ok -var n4 = (_m = (_k = a) === null || _k === void 0 ? void 0 : (_l = _k).m) === null || _m === void 0 ? void 0 : _m.call(_l, { x: absorb() }); // likewise +var _a, _b, _c, _d, _e; +var n1 = (_a = a === null || a === void 0 ? void 0 : a.m) === null || _a === void 0 ? void 0 : _a.call(a, { x: 12 }); // should be an error (`undefined` is not assignable to `number`) +var n2 = (_b = a === null || a === void 0 ? void 0 : a.m) === null || _b === void 0 ? void 0 : _b.call(a, { x: absorb() }); // likewise +var n3 = (_c = a === null || a === void 0 ? void 0 : a.m) === null || _c === void 0 ? void 0 : _c.call(a, { x: 12 }); // should be ok +var n4 = (_d = a === null || a === void 0 ? void 0 : a.m) === null || _d === void 0 ? void 0 : _d.call(a, { x: absorb() }); // likewise // Also a test showing `!` vs `?` for good measure -var t1 = (_q = (_o = a) === null || _o === void 0 ? void 0 : (_p = _o).m) === null || _q === void 0 ? void 0 : _q.call(_p, { x: 12 }); +var t1 = (_e = a === null || a === void 0 ? void 0 : a.m) === null || _e === void 0 ? void 0 : _e.call(a, { x: 12 }); t1 = a.m({ x: 12 }); diff --git a/tests/baselines/reference/callChain.js b/tests/baselines/reference/callChain.js index 439c38e8b83..f67166dcde3 100644 --- a/tests/baselines/reference/callChain.js +++ b/tests/baselines/reference/callChain.js @@ -46,30 +46,30 @@ var __spreadArrays = (this && this.__spreadArrays) || function () { r[k] = a[j]; return r; }; -var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13; -(_a = o1) === null || _a === void 0 ? void 0 : _a(); -(_b = o1) === null || _b === void 0 ? void 0 : _b(1); -(_c = o1) === null || _c === void 0 ? void 0 : _c.apply(void 0, [1, 2]); -(_d = o1) === null || _d === void 0 ? void 0 : _d.apply(void 0, __spreadArrays([1], [2, 3], [4])); -(_e = o2) === null || _e === void 0 ? void 0 : _e.b(); -(_f = o2) === null || _f === void 0 ? void 0 : _f.b(1); -(_g = o2) === null || _g === void 0 ? void 0 : _g.b.apply(_g, [1, 2]); -(_h = o2) === null || _h === void 0 ? void 0 : _h.b.apply(_h, __spreadArrays([1], [2, 3], [4])); -(_j = o2) === null || _j === void 0 ? void 0 : _j["b"](); -(_k = o2) === null || _k === void 0 ? void 0 : _k["b"](1); -(_l = o2) === null || _l === void 0 ? void 0 : _l["b"].apply(_l, [1, 2]); -(_m = o2) === null || _m === void 0 ? void 0 : _m["b"].apply(_m, __spreadArrays([1], [2, 3], [4])); -(_p = (_o = o3).b) === null || _p === void 0 ? void 0 : _p.call(_o).c; -(_r = (_q = o3).b) === null || _r === void 0 ? void 0 : _r.call(_q, 1).c; -(_t = (_s = o3).b) === null || _t === void 0 ? void 0 : _t.call.apply(_t, __spreadArrays([_s], [1, 2])).c; -(_v = (_u = o3).b) === null || _v === void 0 ? void 0 : _v.call.apply(_v, __spreadArrays([_u, 1], [2, 3], [4])).c; -(_x = (_w = o3).b) === null || _x === void 0 ? void 0 : _x.call(_w)["c"]; -(_z = (_y = o3).b) === null || _z === void 0 ? void 0 : _z.call(_y, 1)["c"]; -(_1 = (_0 = o3).b) === null || _1 === void 0 ? void 0 : _1.call.apply(_1, __spreadArrays([_0], [1, 2]))["c"]; -(_3 = (_2 = o3).b) === null || _3 === void 0 ? void 0 : _3.call.apply(_3, __spreadArrays([_2, 1], [2, 3], [4]))["c"]; -(_5 = (_4 = o3)["b"]) === null || _5 === void 0 ? void 0 : _5.call(_4).c; -(_7 = (_6 = o3)["b"]) === null || _7 === void 0 ? void 0 : _7.call(_6, 1).c; -(_9 = (_8 = o3)["b"]) === null || _9 === void 0 ? void 0 : _9.call.apply(_9, __spreadArrays([_8], [1, 2])).c; -(_11 = (_10 = o3)["b"]) === null || _11 === void 0 ? void 0 : _11.call.apply(_11, __spreadArrays([_10, 1], [2, 3], [4])).c; -var v = (_12 = o4) === null || _12 === void 0 ? void 0 : _12(incr); -(_13 = o5()) === null || _13 === void 0 ? void 0 : _13(); +var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o; +o1 === null || o1 === void 0 ? void 0 : o1(); +o1 === null || o1 === void 0 ? void 0 : o1(1); +o1 === null || o1 === void 0 ? void 0 : o1.apply(void 0, [1, 2]); +o1 === null || o1 === void 0 ? void 0 : o1.apply(void 0, __spreadArrays([1], [2, 3], [4])); +o2 === null || o2 === void 0 ? void 0 : o2.b(); +o2 === null || o2 === void 0 ? void 0 : o2.b(1); +o2 === null || o2 === void 0 ? void 0 : o2.b.apply(o2, [1, 2]); +o2 === null || o2 === void 0 ? void 0 : o2.b.apply(o2, __spreadArrays([1], [2, 3], [4])); +o2 === null || o2 === void 0 ? void 0 : o2["b"](); +o2 === null || o2 === void 0 ? void 0 : o2["b"](1); +o2 === null || o2 === void 0 ? void 0 : o2["b"].apply(o2, [1, 2]); +o2 === null || o2 === void 0 ? void 0 : o2["b"].apply(o2, __spreadArrays([1], [2, 3], [4])); +(_a = o3.b) === null || _a === void 0 ? void 0 : _a.call(o3).c; +(_b = o3.b) === null || _b === void 0 ? void 0 : _b.call(o3, 1).c; +(_c = o3.b) === null || _c === void 0 ? void 0 : _c.call.apply(_c, __spreadArrays([o3], [1, 2])).c; +(_d = o3.b) === null || _d === void 0 ? void 0 : _d.call.apply(_d, __spreadArrays([o3, 1], [2, 3], [4])).c; +(_e = o3.b) === null || _e === void 0 ? void 0 : _e.call(o3)["c"]; +(_f = o3.b) === null || _f === void 0 ? void 0 : _f.call(o3, 1)["c"]; +(_g = o3.b) === null || _g === void 0 ? void 0 : _g.call.apply(_g, __spreadArrays([o3], [1, 2]))["c"]; +(_h = o3.b) === null || _h === void 0 ? void 0 : _h.call.apply(_h, __spreadArrays([o3, 1], [2, 3], [4]))["c"]; +(_j = o3["b"]) === null || _j === void 0 ? void 0 : _j.call(o3).c; +(_k = o3["b"]) === null || _k === void 0 ? void 0 : _k.call(o3, 1).c; +(_l = o3["b"]) === null || _l === void 0 ? void 0 : _l.call.apply(_l, __spreadArrays([o3], [1, 2])).c; +(_m = o3["b"]) === null || _m === void 0 ? void 0 : _m.call.apply(_m, __spreadArrays([o3, 1], [2, 3], [4])).c; +var v = o4 === null || o4 === void 0 ? void 0 : o4(incr); +(_o = o5()) === null || _o === void 0 ? void 0 : _o(); diff --git a/tests/baselines/reference/controlFlowNullishCoalesce.js b/tests/baselines/reference/controlFlowNullishCoalesce.js index f49414771d3..75dfcfcc03f 100644 --- a/tests/baselines/reference/controlFlowNullishCoalesce.js +++ b/tests/baselines/reference/controlFlowNullishCoalesce.js @@ -17,9 +17,9 @@ if (x = o ?? true) { "use strict"; // assignments in shortcutting rhs var a; -(o !== null && o !== void 0 ? o : (a = 1)); +o !== null && o !== void 0 ? o : (a = 1); a.toString(); var x; -if (x = (o !== null && o !== void 0 ? o : true)) { +if (x = o !== null && o !== void 0 ? o : true) { x; } diff --git a/tests/baselines/reference/controlFlowOptionalChain.js b/tests/baselines/reference/controlFlowOptionalChain.js index 3bb2bab1c0d..a3ab92334a9 100644 --- a/tests/baselines/reference/controlFlowOptionalChain.js +++ b/tests/baselines/reference/controlFlowOptionalChain.js @@ -530,20 +530,20 @@ function extractCoordinates(f: Feature): number[] { //// [controlFlowOptionalChain.js] "use strict"; -var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10; +var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t; var a; -(_a = o) === null || _a === void 0 ? void 0 : _a[a = 1]; +o === null || o === void 0 ? void 0 : o[a = 1]; a.toString(); var b; -(_b = o) === null || _b === void 0 ? void 0 : _b.x[b = 1]; +o === null || o === void 0 ? void 0 : o.x[b = 1]; b.toString(); var c; -(_c = o) === null || _c === void 0 ? void 0 : _c(c = 1); +o === null || o === void 0 ? void 0 : o(c = 1); c.toString(); var d; -(_d = o) === null || _d === void 0 ? void 0 : _d.x(d = 1); +o === null || o === void 0 ? void 0 : o.x(d = 1); d.toString(); -if ((_e = f) === null || _e === void 0 ? void 0 : _e(x)) { +if (f === null || f === void 0 ? void 0 : f(x)) { x; // number f; // (x: any) => x is number f(x); @@ -556,262 +556,253 @@ else { x; f; f(x); -if ((_f = o2) === null || _f === void 0 ? void 0 : _f.f(x)) { +if (o2 === null || o2 === void 0 ? void 0 : o2.f(x)) { x; // number o2.f; // (x: any) => x is number - (_g = o2) === null || _g === void 0 ? void 0 : _g.f; - (_h = o2) === null || _h === void 0 ? void 0 : _h.f(x); + o2 === null || o2 === void 0 ? void 0 : o2.f; + o2 === null || o2 === void 0 ? void 0 : o2.f(x); } else { x; o2; - (_j = o2) === null || _j === void 0 ? void 0 : _j.f; + o2 === null || o2 === void 0 ? void 0 : o2.f; o2.f; } x; o2; -(_k = o2) === null || _k === void 0 ? void 0 : _k.f; +o2 === null || o2 === void 0 ? void 0 : o2.f; o2.f; -if (((_l = o3) === null || _l === void 0 ? void 0 : _l.x) === 1) { +if ((o3 === null || o3 === void 0 ? void 0 : o3.x) === 1) { o3; o3.x; - (_m = o3) === null || _m === void 0 ? void 0 : _m.x; + o3 === null || o3 === void 0 ? void 0 : o3.x; } else { o3; - (_o = o3) === null || _o === void 0 ? void 0 : _o.x; + o3 === null || o3 === void 0 ? void 0 : o3.x; o3.x; } o3; -(_p = o3) === null || _p === void 0 ? void 0 : _p.x; +o3 === null || o3 === void 0 ? void 0 : o3.x; o3.x; -if ((_q = o4.x) === null || _q === void 0 ? void 0 : _q.y) { +if ((_a = o4.x) === null || _a === void 0 ? void 0 : _a.y) { o4.x; // { y: boolean } o4.x.y; // true - (_r = o4.x) === null || _r === void 0 ? void 0 : _r.y; // true + (_b = o4.x) === null || _b === void 0 ? void 0 : _b.y; // true } else { o4.x; - (_s = o4.x) === null || _s === void 0 ? void 0 : _s.y; + (_c = o4.x) === null || _c === void 0 ? void 0 : _c.y; o4.x.y; } o4.x; -(_t = o4.x) === null || _t === void 0 ? void 0 : _t.y; +(_d = o4.x) === null || _d === void 0 ? void 0 : _d.y; o4.x.y; -if ((_v = (_u = o5.x) === null || _u === void 0 ? void 0 : _u.y.z) === null || _v === void 0 ? void 0 : _v.w) { +if ((_f = (_e = o5.x) === null || _e === void 0 ? void 0 : _e.y.z) === null || _f === void 0 ? void 0 : _f.w) { o5.x; o5.x.y; o5.x.y.z; o5.x.y.z.w; // true - (_w = o5.x.y.z) === null || _w === void 0 ? void 0 : _w.w; // true - (_x = o5.x) === null || _x === void 0 ? void 0 : _x.y.z.w; // true - (_z = (_y = o5.x) === null || _y === void 0 ? void 0 : _y.y.z) === null || _z === void 0 ? void 0 : _z.w; // true + (_g = o5.x.y.z) === null || _g === void 0 ? void 0 : _g.w; // true + (_h = o5.x) === null || _h === void 0 ? void 0 : _h.y.z.w; // true + (_k = (_j = o5.x) === null || _j === void 0 ? void 0 : _j.y.z) === null || _k === void 0 ? void 0 : _k.w; // true } else { o5.x; - (_0 = o5.x) === null || _0 === void 0 ? void 0 : _0.y; - (_1 = o5.x) === null || _1 === void 0 ? void 0 : _1.y.z; - (_3 = (_2 = o5.x) === null || _2 === void 0 ? void 0 : _2.y.z) === null || _3 === void 0 ? void 0 : _3.w; + (_l = o5.x) === null || _l === void 0 ? void 0 : _l.y; + (_m = o5.x) === null || _m === void 0 ? void 0 : _m.y.z; + (_p = (_o = o5.x) === null || _o === void 0 ? void 0 : _o.y.z) === null || _p === void 0 ? void 0 : _p.w; o5.x.y; o5.x.y.z.w; } o5.x; -(_4 = o5.x) === null || _4 === void 0 ? void 0 : _4.y; -(_5 = o5.x) === null || _5 === void 0 ? void 0 : _5.y.z; -(_7 = (_6 = o5.x) === null || _6 === void 0 ? void 0 : _6.y.z) === null || _7 === void 0 ? void 0 : _7.w; +(_q = o5.x) === null || _q === void 0 ? void 0 : _q.y; +(_r = o5.x) === null || _r === void 0 ? void 0 : _r.y.z; +(_t = (_s = o5.x) === null || _s === void 0 ? void 0 : _s.y.z) === null || _t === void 0 ? void 0 : _t.w; o5.x.y; o5.x.y.z.w; -if ((_8 = o6) === null || _8 === void 0 ? void 0 : _8.f()) { +if (o6 === null || o6 === void 0 ? void 0 : o6.f()) { o6; // Derived o6.f; } else { o6; - (_9 = o6) === null || _9 === void 0 ? void 0 : _9.f; + o6 === null || o6 === void 0 ? void 0 : o6.f; o6.f; } o6; -(_10 = o6) === null || _10 === void 0 ? void 0 : _10.f; +o6 === null || o6 === void 0 ? void 0 : o6.f; o6.f; function f01(x) { - var _a, _b, _c, _d; if (!!true) { - (_a = isString) === null || _a === void 0 ? void 0 : _a(x); + isString === null || isString === void 0 ? void 0 : isString(x); x; } if (!!true) { - (_b = maybeIsString) === null || _b === void 0 ? void 0 : _b(x); + maybeIsString === null || maybeIsString === void 0 ? void 0 : maybeIsString(x); x; } if (!!true) { isDefined(maybeIsString); - (_c = maybeIsString) === null || _c === void 0 ? void 0 : _c(x); + maybeIsString === null || maybeIsString === void 0 ? void 0 : maybeIsString(x); x; } if (!!true) { - (_d = maybeNever) === null || _d === void 0 ? void 0 : _d(); + maybeNever === null || maybeNever === void 0 ? void 0 : maybeNever(); x; } } function f10(o, value) { - var _a, _b, _c, _d, _e, _f; - if (((_a = o) === null || _a === void 0 ? void 0 : _a.foo) === value) { + if ((o === null || o === void 0 ? void 0 : o.foo) === value) { o.foo; } - if (((_b = o) === null || _b === void 0 ? void 0 : _b["foo"]) === value) { + if ((o === null || o === void 0 ? void 0 : o["foo"]) === value) { o["foo"]; } - if (((_c = o) === null || _c === void 0 ? void 0 : _c.bar()) === value) { + if ((o === null || o === void 0 ? void 0 : o.bar()) === value) { o.bar; } - if (((_d = o) === null || _d === void 0 ? void 0 : _d.foo) == value) { + if ((o === null || o === void 0 ? void 0 : o.foo) == value) { o.foo; } - if (((_e = o) === null || _e === void 0 ? void 0 : _e["foo"]) == value) { + if ((o === null || o === void 0 ? void 0 : o["foo"]) == value) { o["foo"]; } - if (((_f = o) === null || _f === void 0 ? void 0 : _f.bar()) == value) { + if ((o === null || o === void 0 ? void 0 : o.bar()) == value) { o.bar; } } function f11(o, value) { - var _a, _b, _c, _d, _e, _f; - if (((_a = o) === null || _a === void 0 ? void 0 : _a.foo) === value) { + if ((o === null || o === void 0 ? void 0 : o.foo) === value) { o.foo; } - if (((_b = o) === null || _b === void 0 ? void 0 : _b["foo"]) === value) { + if ((o === null || o === void 0 ? void 0 : o["foo"]) === value) { o["foo"]; } - if (((_c = o) === null || _c === void 0 ? void 0 : _c.bar()) === value) { + if ((o === null || o === void 0 ? void 0 : o.bar()) === value) { o.bar; } - if (((_d = o) === null || _d === void 0 ? void 0 : _d.foo) == value) { + if ((o === null || o === void 0 ? void 0 : o.foo) == value) { o.foo; } - if (((_e = o) === null || _e === void 0 ? void 0 : _e["foo"]) == value) { + if ((o === null || o === void 0 ? void 0 : o["foo"]) == value) { o["foo"]; } - if (((_f = o) === null || _f === void 0 ? void 0 : _f.bar()) == value) { + if ((o === null || o === void 0 ? void 0 : o.bar()) == value) { o.bar; } } function f12(o, value) { - var _a, _b, _c, _d, _e, _f; - if (((_a = o) === null || _a === void 0 ? void 0 : _a.foo) === value) { + if ((o === null || o === void 0 ? void 0 : o.foo) === value) { o.foo; // Error } - if (((_b = o) === null || _b === void 0 ? void 0 : _b["foo"]) === value) { + if ((o === null || o === void 0 ? void 0 : o["foo"]) === value) { o["foo"]; // Error } - if (((_c = o) === null || _c === void 0 ? void 0 : _c.bar()) === value) { + if ((o === null || o === void 0 ? void 0 : o.bar()) === value) { o.bar; // Error } - if (((_d = o) === null || _d === void 0 ? void 0 : _d.foo) == value) { + if ((o === null || o === void 0 ? void 0 : o.foo) == value) { o.foo; // Error } - if (((_e = o) === null || _e === void 0 ? void 0 : _e["foo"]) == value) { + if ((o === null || o === void 0 ? void 0 : o["foo"]) == value) { o["foo"]; // Error } - if (((_f = o) === null || _f === void 0 ? void 0 : _f.bar()) == value) { + if ((o === null || o === void 0 ? void 0 : o.bar()) == value) { o.bar; // Error } } function f12a(o, value) { - var _a, _b, _c, _d, _e, _f; - if (((_a = o) === null || _a === void 0 ? void 0 : _a.foo) === value) { + if ((o === null || o === void 0 ? void 0 : o.foo) === value) { o.foo; } - if (((_b = o) === null || _b === void 0 ? void 0 : _b["foo"]) === value) { + if ((o === null || o === void 0 ? void 0 : o["foo"]) === value) { o["foo"]; } - if (((_c = o) === null || _c === void 0 ? void 0 : _c.bar()) === value) { + if ((o === null || o === void 0 ? void 0 : o.bar()) === value) { o.bar; } - if (((_d = o) === null || _d === void 0 ? void 0 : _d.foo) == value) { + if ((o === null || o === void 0 ? void 0 : o.foo) == value) { o.foo; // Error } - if (((_e = o) === null || _e === void 0 ? void 0 : _e["foo"]) == value) { + if ((o === null || o === void 0 ? void 0 : o["foo"]) == value) { o["foo"]; // Error } - if (((_f = o) === null || _f === void 0 ? void 0 : _f.bar()) == value) { + if ((o === null || o === void 0 ? void 0 : o.bar()) == value) { o.bar; // Error } } function f13(o) { - var _a, _b, _c, _d, _e, _f; - if (((_a = o) === null || _a === void 0 ? void 0 : _a.foo) !== undefined) { + if ((o === null || o === void 0 ? void 0 : o.foo) !== undefined) { o.foo; } - if (((_b = o) === null || _b === void 0 ? void 0 : _b["foo"]) !== undefined) { + if ((o === null || o === void 0 ? void 0 : o["foo"]) !== undefined) { o["foo"]; } - if (((_c = o) === null || _c === void 0 ? void 0 : _c.bar()) !== undefined) { + if ((o === null || o === void 0 ? void 0 : o.bar()) !== undefined) { o.bar; } - if (((_d = o) === null || _d === void 0 ? void 0 : _d.foo) != undefined) { + if ((o === null || o === void 0 ? void 0 : o.foo) != undefined) { o.foo; } - if (((_e = o) === null || _e === void 0 ? void 0 : _e["foo"]) != undefined) { + if ((o === null || o === void 0 ? void 0 : o["foo"]) != undefined) { o["foo"]; } - if (((_f = o) === null || _f === void 0 ? void 0 : _f.bar()) != undefined) { + if ((o === null || o === void 0 ? void 0 : o.bar()) != undefined) { o.bar; } } function f13a(o) { - var _a, _b, _c, _d, _e, _f; - if (((_a = o) === null || _a === void 0 ? void 0 : _a.foo) !== null) { + if ((o === null || o === void 0 ? void 0 : o.foo) !== null) { o.foo; // Error } - if (((_b = o) === null || _b === void 0 ? void 0 : _b["foo"]) !== null) { + if ((o === null || o === void 0 ? void 0 : o["foo"]) !== null) { o["foo"]; // Error } - if (((_c = o) === null || _c === void 0 ? void 0 : _c.bar()) !== null) { + if ((o === null || o === void 0 ? void 0 : o.bar()) !== null) { o.bar; // Error } - if (((_d = o) === null || _d === void 0 ? void 0 : _d.foo) != null) { + if ((o === null || o === void 0 ? void 0 : o.foo) != null) { o.foo; } - if (((_e = o) === null || _e === void 0 ? void 0 : _e["foo"]) != null) { + if ((o === null || o === void 0 ? void 0 : o["foo"]) != null) { o["foo"]; } - if (((_f = o) === null || _f === void 0 ? void 0 : _f.bar()) != null) { + if ((o === null || o === void 0 ? void 0 : o.bar()) != null) { o.bar; } } function f14(o) { - var _a, _b, _c; - if (((_a = o) === null || _a === void 0 ? void 0 : _a.foo) !== undefined) { + if ((o === null || o === void 0 ? void 0 : o.foo) !== undefined) { o.foo; } - if (((_b = o) === null || _b === void 0 ? void 0 : _b["foo"]) !== undefined) { + if ((o === null || o === void 0 ? void 0 : o["foo"]) !== undefined) { o["foo"]; } - if (((_c = o) === null || _c === void 0 ? void 0 : _c.bar()) !== undefined) { + if ((o === null || o === void 0 ? void 0 : o.bar()) !== undefined) { o.bar; } } function f15(o, value) { - var _a, _b, _c, _d; - if (((_a = o) === null || _a === void 0 ? void 0 : _a.foo) === value) { + if ((o === null || o === void 0 ? void 0 : o.foo) === value) { o.foo; } else { o.foo; // Error } - if (((_b = o) === null || _b === void 0 ? void 0 : _b.foo) !== value) { + if ((o === null || o === void 0 ? void 0 : o.foo) !== value) { o.foo; // Error } else { o.foo; } - if (((_c = o) === null || _c === void 0 ? void 0 : _c.foo) == value) { + if ((o === null || o === void 0 ? void 0 : o.foo) == value) { o.foo; } else { o.foo; // Error } - if (((_d = o) === null || _d === void 0 ? void 0 : _d.foo) != value) { + if ((o === null || o === void 0 ? void 0 : o.foo) != value) { o.foo; // Error } else { @@ -819,26 +810,25 @@ function f15(o, value) { } } function f16(o) { - var _a, _b, _c, _d; - if (((_a = o) === null || _a === void 0 ? void 0 : _a.foo) === undefined) { + if ((o === null || o === void 0 ? void 0 : o.foo) === undefined) { o.foo; // Error } else { o.foo; } - if (((_b = o) === null || _b === void 0 ? void 0 : _b.foo) !== undefined) { + if ((o === null || o === void 0 ? void 0 : o.foo) !== undefined) { o.foo; } else { o.foo; // Error } - if (((_c = o) === null || _c === void 0 ? void 0 : _c.foo) == undefined) { + if ((o === null || o === void 0 ? void 0 : o.foo) == undefined) { o.foo; // Error } else { o.foo; } - if (((_d = o) === null || _d === void 0 ? void 0 : _d.foo) != undefined) { + if ((o === null || o === void 0 ? void 0 : o.foo) != undefined) { o.foo; } else { @@ -846,56 +836,53 @@ function f16(o) { } } function f20(o) { - var _a, _b, _c, _d; - if (typeof ((_a = o) === null || _a === void 0 ? void 0 : _a.foo) === "number") { + if (typeof (o === null || o === void 0 ? void 0 : o.foo) === "number") { o.foo; } - if (typeof ((_b = o) === null || _b === void 0 ? void 0 : _b["foo"]) === "number") { + if (typeof (o === null || o === void 0 ? void 0 : o["foo"]) === "number") { o["foo"]; } - if (typeof ((_c = o) === null || _c === void 0 ? void 0 : _c.bar()) === "number") { + if (typeof (o === null || o === void 0 ? void 0 : o.bar()) === "number") { o.bar; } - if (((_d = o) === null || _d === void 0 ? void 0 : _d.baz) instanceof Error) { + if ((o === null || o === void 0 ? void 0 : o.baz) instanceof Error) { o.baz; } } function f21(o) { - var _a, _b, _c, _d; - if (typeof ((_a = o) === null || _a === void 0 ? void 0 : _a.foo) === "number") { + if (typeof (o === null || o === void 0 ? void 0 : o.foo) === "number") { o.foo; } - if (typeof ((_b = o) === null || _b === void 0 ? void 0 : _b["foo"]) === "number") { + if (typeof (o === null || o === void 0 ? void 0 : o["foo"]) === "number") { o["foo"]; } - if (typeof ((_c = o) === null || _c === void 0 ? void 0 : _c.bar()) === "number") { + if (typeof (o === null || o === void 0 ? void 0 : o.bar()) === "number") { o.bar; } - if (((_d = o) === null || _d === void 0 ? void 0 : _d.baz) instanceof Error) { + if ((o === null || o === void 0 ? void 0 : o.baz) instanceof Error) { o.baz; } } function f22(o) { - var _a, _b, _c, _d; - if (typeof ((_a = o) === null || _a === void 0 ? void 0 : _a.foo) === "number") { + if (typeof (o === null || o === void 0 ? void 0 : o.foo) === "number") { o.foo; } else { o.foo; // Error } - if (typeof ((_b = o) === null || _b === void 0 ? void 0 : _b.foo) !== "number") { + if (typeof (o === null || o === void 0 ? void 0 : o.foo) !== "number") { o.foo; // Error } else { o.foo; } - if (typeof ((_c = o) === null || _c === void 0 ? void 0 : _c.foo) == "number") { + if (typeof (o === null || o === void 0 ? void 0 : o.foo) == "number") { o.foo; } else { o.foo; // Error } - if (typeof ((_d = o) === null || _d === void 0 ? void 0 : _d.foo) != "number") { + if (typeof (o === null || o === void 0 ? void 0 : o.foo) != "number") { o.foo; // Error } else { @@ -903,26 +890,25 @@ function f22(o) { } } function f23(o) { - var _a, _b, _c, _d; - if (typeof ((_a = o) === null || _a === void 0 ? void 0 : _a.foo) === "undefined") { + if (typeof (o === null || o === void 0 ? void 0 : o.foo) === "undefined") { o.foo; // Error } else { o.foo; } - if (typeof ((_b = o) === null || _b === void 0 ? void 0 : _b.foo) !== "undefined") { + if (typeof (o === null || o === void 0 ? void 0 : o.foo) !== "undefined") { o.foo; } else { o.foo; // Error } - if (typeof ((_c = o) === null || _c === void 0 ? void 0 : _c.foo) == "undefined") { + if (typeof (o === null || o === void 0 ? void 0 : o.foo) == "undefined") { o.foo; // Error } else { o.foo; } - if (typeof ((_d = o) === null || _d === void 0 ? void 0 : _d.foo) != "undefined") { + if (typeof (o === null || o === void 0 ? void 0 : o.foo) != "undefined") { o.foo; } else { @@ -930,27 +916,25 @@ function f23(o) { } } function f30(o) { - var _a, _b, _c, _d; if (!!true) { - assert((_a = o) === null || _a === void 0 ? void 0 : _a.foo); + assert(o === null || o === void 0 ? void 0 : o.foo); o.foo; } if (!!true) { - assert(((_b = o) === null || _b === void 0 ? void 0 : _b.foo) === 42); + assert((o === null || o === void 0 ? void 0 : o.foo) === 42); o.foo; } if (!!true) { - assert(typeof ((_c = o) === null || _c === void 0 ? void 0 : _c.foo) === "number"); + assert(typeof (o === null || o === void 0 ? void 0 : o.foo) === "number"); o.foo; } if (!!true) { - assertNonNull((_d = o) === null || _d === void 0 ? void 0 : _d.foo); + assertNonNull(o === null || o === void 0 ? void 0 : o.foo); o.foo; } } function f40(o) { - var _a; - switch ((_a = o) === null || _a === void 0 ? void 0 : _a.foo) { + switch (o === null || o === void 0 ? void 0 : o.foo) { case "abc": o.foo; break; @@ -966,8 +950,7 @@ function f40(o) { } } function f41(o) { - var _a; - switch (typeof ((_a = o) === null || _a === void 0 ? void 0 : _a.foo)) { + switch (typeof (o === null || o === void 0 ? void 0 : o.foo)) { case "string": o.foo; break; @@ -983,8 +966,7 @@ function f41(o) { } } function getArea(shape) { - var _a; - switch ((_a = shape) === null || _a === void 0 ? void 0 : _a.type) { + switch (shape === null || shape === void 0 ? void 0 : shape.type) { case 'circle': return Math.PI * Math.pow(shape.radius, 2); case 'rectangle': diff --git a/tests/baselines/reference/elementAccessChain.2.js b/tests/baselines/reference/elementAccessChain.2.js index 4212e5a20b1..5683b736dc3 100644 --- a/tests/baselines/reference/elementAccessChain.2.js +++ b/tests/baselines/reference/elementAccessChain.2.js @@ -12,9 +12,9 @@ o3.b?.["c"]; //// [elementAccessChain.2.js] -var _a, _b, _c, _d, _e; -(_a = o1) === null || _a === void 0 ? void 0 : _a["b"]; -(_b = o2) === null || _b === void 0 ? void 0 : _b["b"].c; -(_c = o2) === null || _c === void 0 ? void 0 : _c.b["c"]; -(_d = o3["b"]) === null || _d === void 0 ? void 0 : _d.c; -(_e = o3.b) === null || _e === void 0 ? void 0 : _e["c"]; +var _a, _b; +o1 === null || o1 === void 0 ? void 0 : o1["b"]; +o2 === null || o2 === void 0 ? void 0 : o2["b"].c; +o2 === null || o2 === void 0 ? void 0 : o2.b["c"]; +(_a = o3["b"]) === null || _a === void 0 ? void 0 : _a.c; +(_b = o3.b) === null || _b === void 0 ? void 0 : _b["c"]; diff --git a/tests/baselines/reference/elementAccessChain.3.js b/tests/baselines/reference/elementAccessChain.3.js index 4d0dd250157..53e002ef3bf 100644 --- a/tests/baselines/reference/elementAccessChain.3.js +++ b/tests/baselines/reference/elementAccessChain.3.js @@ -42,34 +42,33 @@ var __rest = (this && this.__rest) || function (s, e) { } return t; }; -var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x; -((_a = obj) === null || _a === void 0 ? void 0 : _a["a"])++; -((_b = obj) === null || _b === void 0 ? void 0 : _b.a["b"])++; -((_c = obj) === null || _c === void 0 ? void 0 : _c["a"])--; -((_d = obj) === null || _d === void 0 ? void 0 : _d.a["b"])--; -++((_e = obj) === null || _e === void 0 ? void 0 : _e["a"]); -++((_f = obj) === null || _f === void 0 ? void 0 : _f.a["b"]); ---((_g = obj) === null || _g === void 0 ? void 0 : _g["a"]); ---((_h = obj) === null || _h === void 0 ? void 0 : _h.a["b"]); -(_j = obj) === null || _j === void 0 ? void 0 : _j["a"] = 1; -(_k = obj) === null || _k === void 0 ? void 0 : _k.a["b"] = 1; -(_l = obj) === null || _l === void 0 ? void 0 : _l["a"] += 1; -(_m = obj) === null || _m === void 0 ? void 0 : _m.a["b"] += 1; -for ((_o = obj) === null || _o === void 0 ? void 0 : _o["a"] in {}) +(obj === null || obj === void 0 ? void 0 : obj["a"])++; +(obj === null || obj === void 0 ? void 0 : obj.a["b"])++; +(obj === null || obj === void 0 ? void 0 : obj["a"])--; +(obj === null || obj === void 0 ? void 0 : obj.a["b"])--; +++(obj === null || obj === void 0 ? void 0 : obj["a"]); +++(obj === null || obj === void 0 ? void 0 : obj.a["b"]); +--(obj === null || obj === void 0 ? void 0 : obj["a"]); +--(obj === null || obj === void 0 ? void 0 : obj.a["b"]); +obj === null || obj === void 0 ? void 0 : obj["a"] = 1; +obj === null || obj === void 0 ? void 0 : obj.a["b"] = 1; +obj === null || obj === void 0 ? void 0 : obj["a"] += 1; +obj === null || obj === void 0 ? void 0 : obj.a["b"] += 1; +for (obj === null || obj === void 0 ? void 0 : obj["a"] in {}) ; -for ((_p = obj) === null || _p === void 0 ? void 0 : _p.a["b"] in {}) +for (obj === null || obj === void 0 ? void 0 : obj.a["b"] in {}) ; -for (var _i = 0, _y = []; _i < _y.length; _i++) { - (_q = obj) === null || _q === void 0 ? void 0 : _q["a"] = _y[_i]; +for (var _i = 0, _a = []; _i < _a.length; _i++) { + obj === null || obj === void 0 ? void 0 : obj["a"] = _a[_i]; ; } -for (var _z = 0, _0 = []; _z < _0.length; _z++) { - (_r = obj) === null || _r === void 0 ? void 0 : _r.a["b"] = _0[_z]; +for (var _b = 0, _c = []; _b < _c.length; _b++) { + obj === null || obj === void 0 ? void 0 : obj.a["b"] = _c[_b]; ; } -((_s = obj) === null || _s === void 0 ? void 0 : _s["a"] = { a: 1 }.a); -((_t = obj) === null || _t === void 0 ? void 0 : _t.a["b"] = { a: 1 }.a); -((_u = obj) === null || _u === void 0 ? void 0 : _u["a"] = __rest({ a: 1 }, [])); -((_v = obj) === null || _v === void 0 ? void 0 : _v.a["b"] = __rest({ a: 1 }, [])); -(_w = obj) === null || _w === void 0 ? void 0 : _w["a"] = [].slice(0); -(_x = obj) === null || _x === void 0 ? void 0 : _x.a["b"] = [].slice(0); +(obj === null || obj === void 0 ? void 0 : obj["a"] = { a: 1 }.a); +(obj === null || obj === void 0 ? void 0 : obj.a["b"] = { a: 1 }.a); +(obj === null || obj === void 0 ? void 0 : obj["a"] = __rest({ a: 1 }, [])); +(obj === null || obj === void 0 ? void 0 : obj.a["b"] = __rest({ a: 1 }, [])); +obj === null || obj === void 0 ? void 0 : obj["a"] = [].slice(0); +obj === null || obj === void 0 ? void 0 : obj.a["b"] = [].slice(0); diff --git a/tests/baselines/reference/elementAccessChain.js b/tests/baselines/reference/elementAccessChain.js index e01480eb68b..5dd4e79b918 100644 --- a/tests/baselines/reference/elementAccessChain.js +++ b/tests/baselines/reference/elementAccessChain.js @@ -26,16 +26,16 @@ o6()?.["x"]; //// [elementAccessChain.js] "use strict"; -var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x; -(_a = o1) === null || _a === void 0 ? void 0 : _a["b"]; -(_b = o2) === null || _b === void 0 ? void 0 : _b["b"].c; -(_c = o2) === null || _c === void 0 ? void 0 : _c.b["c"]; -(_d = o3["b"]) === null || _d === void 0 ? void 0 : _d.c; -(_e = o3.b) === null || _e === void 0 ? void 0 : _e["c"]; -(_g = (_f = o4.b) === null || _f === void 0 ? void 0 : _f["c"].d) === null || _g === void 0 ? void 0 : _g.e; -(_j = (_h = o4.b) === null || _h === void 0 ? void 0 : _h["c"].d) === null || _j === void 0 ? void 0 : _j["e"]; -(_m = (_l = (_k = o5).b) === null || _l === void 0 ? void 0 : _l.call(_k)["c"].d) === null || _m === void 0 ? void 0 : _m.e; -(_q = (_p = (_o = o5).b) === null || _p === void 0 ? void 0 : _p.call(_o)["c"].d) === null || _q === void 0 ? void 0 : _q["e"]; -(_t = (_s = (_r = o5)["b"]) === null || _s === void 0 ? void 0 : _s.call(_r)["c"].d) === null || _t === void 0 ? void 0 : _t.e; -(_w = (_v = (_u = o5)["b"]) === null || _v === void 0 ? void 0 : _v.call(_u)["c"].d) === null || _w === void 0 ? void 0 : _w["e"]; -(_x = o6()) === null || _x === void 0 ? void 0 : _x["x"]; +var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q; +o1 === null || o1 === void 0 ? void 0 : o1["b"]; +o2 === null || o2 === void 0 ? void 0 : o2["b"].c; +o2 === null || o2 === void 0 ? void 0 : o2.b["c"]; +(_a = o3["b"]) === null || _a === void 0 ? void 0 : _a.c; +(_b = o3.b) === null || _b === void 0 ? void 0 : _b["c"]; +(_d = (_c = o4.b) === null || _c === void 0 ? void 0 : _c["c"].d) === null || _d === void 0 ? void 0 : _d.e; +(_f = (_e = o4.b) === null || _e === void 0 ? void 0 : _e["c"].d) === null || _f === void 0 ? void 0 : _f["e"]; +(_h = (_g = o5.b) === null || _g === void 0 ? void 0 : _g.call(o5)["c"].d) === null || _h === void 0 ? void 0 : _h.e; +(_k = (_j = o5.b) === null || _j === void 0 ? void 0 : _j.call(o5)["c"].d) === null || _k === void 0 ? void 0 : _k["e"]; +(_m = (_l = o5["b"]) === null || _l === void 0 ? void 0 : _l.call(o5)["c"].d) === null || _m === void 0 ? void 0 : _m.e; +(_p = (_o = o5["b"]) === null || _o === void 0 ? void 0 : _o.call(o5)["c"].d) === null || _p === void 0 ? void 0 : _p["e"]; +(_q = o6()) === null || _q === void 0 ? void 0 : _q["x"]; diff --git a/tests/baselines/reference/exhaustiveSwitchStatements1.js b/tests/baselines/reference/exhaustiveSwitchStatements1.js index e2287cd4f81..d172b00b847 100644 --- a/tests/baselines/reference/exhaustiveSwitchStatements1.js +++ b/tests/baselines/reference/exhaustiveSwitchStatements1.js @@ -428,8 +428,8 @@ var Animal; Animal[Animal["CAT"] = 1] = "CAT"; })(Animal || (Animal = {})); function expression() { - var _a, _b; - switch ((_b = (_a = zoo) === null || _a === void 0 ? void 0 : _a.animal, (_b !== null && _b !== void 0 ? _b : Animal.DOG))) { + var _a; + switch ((_a = zoo === null || zoo === void 0 ? void 0 : zoo.animal) !== null && _a !== void 0 ? _a : Animal.DOG) { case Animal.DOG: return Animal.DOG; case Animal.CAT: return Animal.CAT; } diff --git a/tests/baselines/reference/nullishCoalescingOperator1.js b/tests/baselines/reference/nullishCoalescingOperator1.js index 9b857a1473d..c138222970c 100644 --- a/tests/baselines/reference/nullishCoalescingOperator1.js +++ b/tests/baselines/reference/nullishCoalescingOperator1.js @@ -68,33 +68,33 @@ else { //// [nullishCoalescingOperator1.js] "use strict"; var _a; -var aa1 = (a1 !== null && a1 !== void 0 ? a1 : 'whatever'); -var aa2 = (a2 !== null && a2 !== void 0 ? a2 : 'whatever'); -var aa3 = (a3 !== null && a3 !== void 0 ? a3 : 'whatever'); -var aa4 = (a4 !== null && a4 !== void 0 ? a4 : 'whatever'); -var bb1 = (b1 !== null && b1 !== void 0 ? b1 : 1); -var bb2 = (b2 !== null && b2 !== void 0 ? b2 : 1); -var bb3 = (b3 !== null && b3 !== void 0 ? b3 : 1); -var bb4 = (b4 !== null && b4 !== void 0 ? b4 : 1); -var cc1 = (c1 !== null && c1 !== void 0 ? c1 : true); -var cc2 = (c2 !== null && c2 !== void 0 ? c2 : true); -var cc3 = (c3 !== null && c3 !== void 0 ? c3 : true); -var cc4 = (c4 !== null && c4 !== void 0 ? c4 : true); -var dd1 = (d1 !== null && d1 !== void 0 ? d1 : { b: 1 }); -var dd2 = (d2 !== null && d2 !== void 0 ? d2 : { b: 1 }); -var dd3 = (d3 !== null && d3 !== void 0 ? d3 : { b: 1 }); -var dd4 = (d4 !== null && d4 !== void 0 ? d4 : { b: 1 }); +var aa1 = a1 !== null && a1 !== void 0 ? a1 : 'whatever'; +var aa2 = a2 !== null && a2 !== void 0 ? a2 : 'whatever'; +var aa3 = a3 !== null && a3 !== void 0 ? a3 : 'whatever'; +var aa4 = a4 !== null && a4 !== void 0 ? a4 : 'whatever'; +var bb1 = b1 !== null && b1 !== void 0 ? b1 : 1; +var bb2 = b2 !== null && b2 !== void 0 ? b2 : 1; +var bb3 = b3 !== null && b3 !== void 0 ? b3 : 1; +var bb4 = b4 !== null && b4 !== void 0 ? b4 : 1; +var cc1 = c1 !== null && c1 !== void 0 ? c1 : true; +var cc2 = c2 !== null && c2 !== void 0 ? c2 : true; +var cc3 = c3 !== null && c3 !== void 0 ? c3 : true; +var cc4 = c4 !== null && c4 !== void 0 ? c4 : true; +var dd1 = d1 !== null && d1 !== void 0 ? d1 : { b: 1 }; +var dd2 = d2 !== null && d2 !== void 0 ? d2 : { b: 1 }; +var dd3 = d3 !== null && d3 !== void 0 ? d3 : { b: 1 }; +var dd4 = d4 !== null && d4 !== void 0 ? d4 : { b: 1 }; var maybeBool = false; -if (!((maybeBool !== null && maybeBool !== void 0 ? maybeBool : true))) { +if (!(maybeBool !== null && maybeBool !== void 0 ? maybeBool : true)) { foo(); } -if ((maybeBool !== null && maybeBool !== void 0 ? maybeBool : true)) { +if (maybeBool !== null && maybeBool !== void 0 ? maybeBool : true) { foo(); } else { foo(); } -if (_a = false, (_a !== null && _a !== void 0 ? _a : true)) { +if ((_a = false) !== null && _a !== void 0 ? _a : true) { foo(); } else { diff --git a/tests/baselines/reference/nullishCoalescingOperator10.js b/tests/baselines/reference/nullishCoalescingOperator10.js index 60556609fb5..d68dea5e960 100644 --- a/tests/baselines/reference/nullishCoalescingOperator10.js +++ b/tests/baselines/reference/nullishCoalescingOperator10.js @@ -8,4 +8,4 @@ let gg = f() ?? 'foo' //// [nullishCoalescingOperator10.js] "use strict"; var _a; -var gg = (_a = f(), (_a !== null && _a !== void 0 ? _a : 'foo')); +var gg = (_a = f()) !== null && _a !== void 0 ? _a : 'foo'; diff --git a/tests/baselines/reference/nullishCoalescingOperator11.js b/tests/baselines/reference/nullishCoalescingOperator11.js index c716d1ce88b..fbe6db295d9 100644 --- a/tests/baselines/reference/nullishCoalescingOperator11.js +++ b/tests/baselines/reference/nullishCoalescingOperator11.js @@ -8,4 +8,4 @@ let g11 = f11 ?? f11.toFixed() //// [nullishCoalescingOperator11.js] "use strict"; -var g11 = (f11 !== null && f11 !== void 0 ? f11 : f11.toFixed()); +var g11 = f11 !== null && f11 !== void 0 ? f11 : f11.toFixed(); diff --git a/tests/baselines/reference/nullishCoalescingOperator12.js b/tests/baselines/reference/nullishCoalescingOperator12.js index f648af8e0b7..4e59366d899 100644 --- a/tests/baselines/reference/nullishCoalescingOperator12.js +++ b/tests/baselines/reference/nullishCoalescingOperator12.js @@ -5,6 +5,6 @@ for (const i of obj?.arr ?? []) { } //// [nullishCoalescingOperator12.js] "use strict"; -var _a, _b; +var _a; const obj = { arr: [] }; -for (const i of (_b = (_a = obj) === null || _a === void 0 ? void 0 : _a.arr, (_b !== null && _b !== void 0 ? _b : []))) { } +for (const i of (_a = obj === null || obj === void 0 ? void 0 : obj.arr) !== null && _a !== void 0 ? _a : []) { } diff --git a/tests/baselines/reference/nullishCoalescingOperator2.js b/tests/baselines/reference/nullishCoalescingOperator2.js index e36a526c048..ee54c55b53b 100644 --- a/tests/baselines/reference/nullishCoalescingOperator2.js +++ b/tests/baselines/reference/nullishCoalescingOperator2.js @@ -22,12 +22,12 @@ const aa9 = a9 ?? 'whatever' //// [nullishCoalescingOperator2.js] "use strict"; -var aa1 = (a1 !== null && a1 !== void 0 ? a1 : 'whatever'); -var aa2 = (a2 !== null && a2 !== void 0 ? a2 : 'whatever'); -var aa3 = (a3 !== null && a3 !== void 0 ? a3 : 'whatever'); -var aa4 = (a4 !== null && a4 !== void 0 ? a4 : 'whatever'); -var aa5 = (a5 !== null && a5 !== void 0 ? a5 : 'whatever'); -var aa6 = (a6 !== null && a6 !== void 0 ? a6 : 'whatever'); -var aa7 = (a7 !== null && a7 !== void 0 ? a7 : 'whatever'); -var aa8 = (a8 !== null && a8 !== void 0 ? a8 : 'whatever'); -var aa9 = (a9 !== null && a9 !== void 0 ? a9 : 'whatever'); +var aa1 = a1 !== null && a1 !== void 0 ? a1 : 'whatever'; +var aa2 = a2 !== null && a2 !== void 0 ? a2 : 'whatever'; +var aa3 = a3 !== null && a3 !== void 0 ? a3 : 'whatever'; +var aa4 = a4 !== null && a4 !== void 0 ? a4 : 'whatever'; +var aa5 = a5 !== null && a5 !== void 0 ? a5 : 'whatever'; +var aa6 = a6 !== null && a6 !== void 0 ? a6 : 'whatever'; +var aa7 = a7 !== null && a7 !== void 0 ? a7 : 'whatever'; +var aa8 = a8 !== null && a8 !== void 0 ? a8 : 'whatever'; +var aa9 = a9 !== null && a9 !== void 0 ? a9 : 'whatever'; diff --git a/tests/baselines/reference/nullishCoalescingOperator3.js b/tests/baselines/reference/nullishCoalescingOperator3.js index c0f56552433..d444afaf591 100644 --- a/tests/baselines/reference/nullishCoalescingOperator3.js +++ b/tests/baselines/reference/nullishCoalescingOperator3.js @@ -13,4 +13,4 @@ const aa1 = a1 ?? a2 ?? a3 ?? a4 ?? a5 ?? a6 ?? 'whatever' //// [nullishCoalescingOperator3.js] "use strict"; var _a, _b, _c, _d, _e; -var aa1 = (_e = (_d = (_c = (_b = (_a = (a1 !== null && a1 !== void 0 ? a1 : a2), (_a !== null && _a !== void 0 ? _a : a3)), (_b !== null && _b !== void 0 ? _b : a4)), (_c !== null && _c !== void 0 ? _c : a5)), (_d !== null && _d !== void 0 ? _d : a6)), (_e !== null && _e !== void 0 ? _e : 'whatever')); +var aa1 = (_e = (_d = (_c = (_b = (_a = a1 !== null && a1 !== void 0 ? a1 : a2) !== null && _a !== void 0 ? _a : a3) !== null && _b !== void 0 ? _b : a4) !== null && _c !== void 0 ? _c : a5) !== null && _d !== void 0 ? _d : a6) !== null && _e !== void 0 ? _e : 'whatever'; diff --git a/tests/baselines/reference/nullishCoalescingOperator4.js b/tests/baselines/reference/nullishCoalescingOperator4.js index 0018a3880cf..e580f24ce98 100644 --- a/tests/baselines/reference/nullishCoalescingOperator4.js +++ b/tests/baselines/reference/nullishCoalescingOperator4.js @@ -6,5 +6,5 @@ const aa2 = a1 || a1.toLocaleUpperCase() //// [nullishCoalescingOperator4.js] "use strict"; -var aa1 = (a1 !== null && a1 !== void 0 ? a1 : a1.toLowerCase()); +var aa1 = a1 !== null && a1 !== void 0 ? a1 : a1.toLowerCase(); var aa2 = a1 || a1.toLocaleUpperCase(); diff --git a/tests/baselines/reference/nullishCoalescingOperator5.js b/tests/baselines/reference/nullishCoalescingOperator5.js index c74f3da0827..ff739639cac 100644 --- a/tests/baselines/reference/nullishCoalescingOperator5.js +++ b/tests/baselines/reference/nullishCoalescingOperator5.js @@ -44,26 +44,26 @@ a && (b ?? c); "use strict"; var _a, _b, _c, _d; // should be a syntax error -(a !== null && a !== void 0 ? a : b || c); +a !== null && a !== void 0 ? a : b || c; // should be a syntax error -_a = a || b, (_a !== null && _a !== void 0 ? _a : c); +(_a = a || b) !== null && _a !== void 0 ? _a : c; // should be a syntax error -(a !== null && a !== void 0 ? a : b && c); +a !== null && a !== void 0 ? a : b && c; // should be a syntax error -_b = a && b, (_b !== null && _b !== void 0 ? _b : c); +(_b = a && b) !== null && _b !== void 0 ? _b : c; // Valid according to spec -(a !== null && a !== void 0 ? a : (b || c)); +a !== null && a !== void 0 ? a : (b || c); // Valid according to spec -((a !== null && a !== void 0 ? a : b)) || c; +(a !== null && a !== void 0 ? a : b) || c; // Valid according to spec -_c = (a || b), (_c !== null && _c !== void 0 ? _c : c); +(_c = (a || b)) !== null && _c !== void 0 ? _c : c; // Valid according to spec -a || ((b !== null && b !== void 0 ? b : c)); +a || (b !== null && b !== void 0 ? b : c); // Valid according to spec -(a !== null && a !== void 0 ? a : (b && c)); +a !== null && a !== void 0 ? a : (b && c); // Valid according to spec -((a !== null && a !== void 0 ? a : b)) && c; +(a !== null && a !== void 0 ? a : b) && c; // Valid according to spec -_d = (a && b), (_d !== null && _d !== void 0 ? _d : c); +(_d = (a && b)) !== null && _d !== void 0 ? _d : c; // Valid according to spec -a && ((b !== null && b !== void 0 ? b : c)); +a && (b !== null && b !== void 0 ? b : c); diff --git a/tests/baselines/reference/nullishCoalescingOperator6.js b/tests/baselines/reference/nullishCoalescingOperator6.js index 698ccb311b6..f304a2ed682 100644 --- a/tests/baselines/reference/nullishCoalescingOperator6.js +++ b/tests/baselines/reference/nullishCoalescingOperator6.js @@ -5,5 +5,5 @@ function foo(foo: string, bar = foo ?? "bar") { } //// [nullishCoalescingOperator6.js] "use strict"; function foo(foo, bar) { - if (bar === void 0) { bar = (foo !== null && foo !== void 0 ? foo : "bar"); } + if (bar === void 0) { bar = foo !== null && foo !== void 0 ? foo : "bar"; } } diff --git a/tests/baselines/reference/nullishCoalescingOperator7.js b/tests/baselines/reference/nullishCoalescingOperator7.js index 443ec066ea5..688e0d920d6 100644 --- a/tests/baselines/reference/nullishCoalescingOperator7.js +++ b/tests/baselines/reference/nullishCoalescingOperator7.js @@ -16,7 +16,7 @@ function f () { "use strict"; var foo1 = a ? 1 : 2; var foo2 = (a !== null && a !== void 0 ? a : 'foo') ? 1 : 2; -var foo3 = (a !== null && a !== void 0 ? a : 'foo') ? ((b !== null && b !== void 0 ? b : 'bar')) : ((c !== null && c !== void 0 ? c : 'baz')); +var foo3 = (a !== null && a !== void 0 ? a : 'foo') ? (b !== null && b !== void 0 ? b : 'bar') : (c !== null && c !== void 0 ? c : 'baz'); function f() { - var foo4 = (a !== null && a !== void 0 ? a : 'foo') ? (b !== null && b !== void 0 ? b : 'bar') : (c !== null && c !== void 0 ? c : 'baz'); + var foo4 = (a !== null && a !== void 0 ? a : 'foo') ? b !== null && b !== void 0 ? b : 'bar' : c !== null && c !== void 0 ? c : 'baz'; } diff --git a/tests/baselines/reference/nullishCoalescingOperator8.js b/tests/baselines/reference/nullishCoalescingOperator8.js index 3b56a1de010..3e93fccc179 100644 --- a/tests/baselines/reference/nullishCoalescingOperator8.js +++ b/tests/baselines/reference/nullishCoalescingOperator8.js @@ -10,7 +10,7 @@ const n3 = a.m() ?? b.p ?? b.m() ?? "default";; //// [nullishCoalescingOperator8.js] "use strict"; var _a, _b, _c, _d, _e; -var n1 = (_a = a.p, (_a !== null && _a !== void 0 ? _a : "default")); -var n2 = (_b = a.m(), (_b !== null && _b !== void 0 ? _b : "default")); -var n3 = (_e = (_d = (_c = a.m(), (_c !== null && _c !== void 0 ? _c : b.p)), (_d !== null && _d !== void 0 ? _d : b.m())), (_e !== null && _e !== void 0 ? _e : "default")); +var n1 = (_a = a.p) !== null && _a !== void 0 ? _a : "default"; +var n2 = (_b = a.m()) !== null && _b !== void 0 ? _b : "default"; +var n3 = (_e = (_d = (_c = a.m()) !== null && _c !== void 0 ? _c : b.p) !== null && _d !== void 0 ? _d : b.m()) !== null && _e !== void 0 ? _e : "default"; ; diff --git a/tests/baselines/reference/nullishCoalescingOperator9.js b/tests/baselines/reference/nullishCoalescingOperator9.js index a547d28911a..7f97e10283b 100644 --- a/tests/baselines/reference/nullishCoalescingOperator9.js +++ b/tests/baselines/reference/nullishCoalescingOperator9.js @@ -8,4 +8,4 @@ let gg = f ?? (abc => { void abc.toLowerCase() }) //// [nullishCoalescingOperator9.js] "use strict"; var g = f || (function (abc) { void abc.toLowerCase(); }); -var gg = (f !== null && f !== void 0 ? f : (function (abc) { void abc.toLowerCase(); })); +var gg = f !== null && f !== void 0 ? f : (function (abc) { void abc.toLowerCase(); }); diff --git a/tests/baselines/reference/nullishCoalescingOperator_not_strict.js b/tests/baselines/reference/nullishCoalescingOperator_not_strict.js index e8e6d41291d..bc0336417e1 100644 --- a/tests/baselines/reference/nullishCoalescingOperator_not_strict.js +++ b/tests/baselines/reference/nullishCoalescingOperator_not_strict.js @@ -21,12 +21,12 @@ const aa8 = a8 ?? 'whatever' const aa9 = a9 ?? 'whatever' //// [nullishCoalescingOperator_not_strict.js] -var aa1 = (a1 !== null && a1 !== void 0 ? a1 : 'whatever'); -var aa2 = (a2 !== null && a2 !== void 0 ? a2 : 'whatever'); -var aa3 = (a3 !== null && a3 !== void 0 ? a3 : 'whatever'); -var aa4 = (a4 !== null && a4 !== void 0 ? a4 : 'whatever'); -var aa5 = (a5 !== null && a5 !== void 0 ? a5 : 'whatever'); -var aa6 = (a6 !== null && a6 !== void 0 ? a6 : 'whatever'); -var aa7 = (a7 !== null && a7 !== void 0 ? a7 : 'whatever'); -var aa8 = (a8 !== null && a8 !== void 0 ? a8 : 'whatever'); -var aa9 = (a9 !== null && a9 !== void 0 ? a9 : 'whatever'); +var aa1 = a1 !== null && a1 !== void 0 ? a1 : 'whatever'; +var aa2 = a2 !== null && a2 !== void 0 ? a2 : 'whatever'; +var aa3 = a3 !== null && a3 !== void 0 ? a3 : 'whatever'; +var aa4 = a4 !== null && a4 !== void 0 ? a4 : 'whatever'; +var aa5 = a5 !== null && a5 !== void 0 ? a5 : 'whatever'; +var aa6 = a6 !== null && a6 !== void 0 ? a6 : 'whatever'; +var aa7 = a7 !== null && a7 !== void 0 ? a7 : 'whatever'; +var aa8 = a8 !== null && a8 !== void 0 ? a8 : 'whatever'; +var aa9 = a9 !== null && a9 !== void 0 ? a9 : 'whatever'; diff --git a/tests/baselines/reference/optionalChainingInference.js b/tests/baselines/reference/optionalChainingInference.js index 2f17129d701..ab007fd5448 100644 --- a/tests/baselines/reference/optionalChainingInference.js +++ b/tests/baselines/reference/optionalChainingInference.js @@ -33,20 +33,19 @@ const v8: number = unbox(b8); //// [optionalChainingInference.js] -var _a, _b, _c, _d, _e, _f, _g, _h; -var b1 = { value: (_a = su) === null || _a === void 0 ? void 0 : _a.length }; +var b1 = { value: su === null || su === void 0 ? void 0 : su.length }; var v1 = unbox(b1); -var b2 = { value: (_b = su) === null || _b === void 0 ? void 0 : _b.length }; +var b2 = { value: su === null || su === void 0 ? void 0 : su.length }; var v2 = unbox(b2); -var b3 = { value: (_c = su) === null || _c === void 0 ? void 0 : _c.length }; +var b3 = { value: su === null || su === void 0 ? void 0 : su.length }; var v3 = unbox(b3); -var b4 = { value: (_d = fnu) === null || _d === void 0 ? void 0 : _d() }; +var b4 = { value: fnu === null || fnu === void 0 ? void 0 : fnu() }; var v4 = unbox(b4); -var b5 = { value: (_e = su) === null || _e === void 0 ? void 0 : _e["length"] }; +var b5 = { value: su === null || su === void 0 ? void 0 : su["length"] }; var v5 = unbox(b5); -var b6 = { value: (_f = osu) === null || _f === void 0 ? void 0 : _f.prop.length }; +var b6 = { value: osu === null || osu === void 0 ? void 0 : osu.prop.length }; var v6 = unbox(b6); -var b7 = { value: (_g = osu) === null || _g === void 0 ? void 0 : _g.prop["length"] }; +var b7 = { value: osu === null || osu === void 0 ? void 0 : osu.prop["length"] }; var v7 = unbox(b7); -var b8 = { value: (_h = ofnu) === null || _h === void 0 ? void 0 : _h.prop() }; +var b8 = { value: ofnu === null || ofnu === void 0 ? void 0 : ofnu.prop() }; var v8 = unbox(b8); diff --git a/tests/baselines/reference/propertyAccessChain.2.js b/tests/baselines/reference/propertyAccessChain.2.js index 939e9830b54..870f54c386b 100644 --- a/tests/baselines/reference/propertyAccessChain.2.js +++ b/tests/baselines/reference/propertyAccessChain.2.js @@ -10,7 +10,7 @@ o3.b?.c; //// [propertyAccessChain.2.js] -var _a, _b, _c; -(_a = o1) === null || _a === void 0 ? void 0 : _a.b; -(_b = o2) === null || _b === void 0 ? void 0 : _b.b.c; -(_c = o3.b) === null || _c === void 0 ? void 0 : _c.c; +var _a; +o1 === null || o1 === void 0 ? void 0 : o1.b; +o2 === null || o2 === void 0 ? void 0 : o2.b.c; +(_a = o3.b) === null || _a === void 0 ? void 0 : _a.c; diff --git a/tests/baselines/reference/propertyAccessChain.3.js b/tests/baselines/reference/propertyAccessChain.3.js index 3eedf7c2b22..6daa30bc1bf 100644 --- a/tests/baselines/reference/propertyAccessChain.3.js +++ b/tests/baselines/reference/propertyAccessChain.3.js @@ -42,34 +42,33 @@ var __rest = (this && this.__rest) || function (s, e) { } return t; }; -var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x; -((_a = obj) === null || _a === void 0 ? void 0 : _a.a)++; -((_b = obj) === null || _b === void 0 ? void 0 : _b.a.b)++; -((_c = obj) === null || _c === void 0 ? void 0 : _c.a)--; -((_d = obj) === null || _d === void 0 ? void 0 : _d.a.b)--; -++((_e = obj) === null || _e === void 0 ? void 0 : _e.a); -++((_f = obj) === null || _f === void 0 ? void 0 : _f.a.b); ---((_g = obj) === null || _g === void 0 ? void 0 : _g.a); ---((_h = obj) === null || _h === void 0 ? void 0 : _h.a.b); -(_j = obj) === null || _j === void 0 ? void 0 : _j.a = 1; -(_k = obj) === null || _k === void 0 ? void 0 : _k.a.b = 1; -(_l = obj) === null || _l === void 0 ? void 0 : _l.a += 1; -(_m = obj) === null || _m === void 0 ? void 0 : _m.a.b += 1; -for ((_o = obj) === null || _o === void 0 ? void 0 : _o.a in {}) +(obj === null || obj === void 0 ? void 0 : obj.a)++; +(obj === null || obj === void 0 ? void 0 : obj.a.b)++; +(obj === null || obj === void 0 ? void 0 : obj.a)--; +(obj === null || obj === void 0 ? void 0 : obj.a.b)--; +++(obj === null || obj === void 0 ? void 0 : obj.a); +++(obj === null || obj === void 0 ? void 0 : obj.a.b); +--(obj === null || obj === void 0 ? void 0 : obj.a); +--(obj === null || obj === void 0 ? void 0 : obj.a.b); +obj === null || obj === void 0 ? void 0 : obj.a = 1; +obj === null || obj === void 0 ? void 0 : obj.a.b = 1; +obj === null || obj === void 0 ? void 0 : obj.a += 1; +obj === null || obj === void 0 ? void 0 : obj.a.b += 1; +for (obj === null || obj === void 0 ? void 0 : obj.a in {}) ; -for ((_p = obj) === null || _p === void 0 ? void 0 : _p.a.b in {}) +for (obj === null || obj === void 0 ? void 0 : obj.a.b in {}) ; -for (var _i = 0, _y = []; _i < _y.length; _i++) { - (_q = obj) === null || _q === void 0 ? void 0 : _q.a = _y[_i]; +for (var _i = 0, _a = []; _i < _a.length; _i++) { + obj === null || obj === void 0 ? void 0 : obj.a = _a[_i]; ; } -for (var _z = 0, _0 = []; _z < _0.length; _z++) { - (_r = obj) === null || _r === void 0 ? void 0 : _r.a.b = _0[_z]; +for (var _b = 0, _c = []; _b < _c.length; _b++) { + obj === null || obj === void 0 ? void 0 : obj.a.b = _c[_b]; ; } -((_s = obj) === null || _s === void 0 ? void 0 : _s.a = { a: 1 }.a); -((_t = obj) === null || _t === void 0 ? void 0 : _t.a.b = { a: 1 }.a); -((_u = obj) === null || _u === void 0 ? void 0 : _u.a = __rest({ a: 1 }, [])); -((_v = obj) === null || _v === void 0 ? void 0 : _v.a.b = __rest({ a: 1 }, [])); -(_w = obj) === null || _w === void 0 ? void 0 : _w.a = [].slice(0); -(_x = obj) === null || _x === void 0 ? void 0 : _x.a.b = [].slice(0); +(obj === null || obj === void 0 ? void 0 : obj.a = { a: 1 }.a); +(obj === null || obj === void 0 ? void 0 : obj.a.b = { a: 1 }.a); +(obj === null || obj === void 0 ? void 0 : obj.a = __rest({ a: 1 }, [])); +(obj === null || obj === void 0 ? void 0 : obj.a.b = __rest({ a: 1 }, [])); +obj === null || obj === void 0 ? void 0 : obj.a = [].slice(0); +obj === null || obj === void 0 ? void 0 : obj.a.b = [].slice(0); diff --git a/tests/baselines/reference/propertyAccessChain.js b/tests/baselines/reference/propertyAccessChain.js index 47f4aa1c334..a2ece64f986 100644 --- a/tests/baselines/reference/propertyAccessChain.js +++ b/tests/baselines/reference/propertyAccessChain.js @@ -23,12 +23,12 @@ o1?.b ? 1 : 0; //// [propertyAccessChain.js] "use strict"; -var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; -(_a = o1) === null || _a === void 0 ? void 0 : _a.b; -(_b = o2) === null || _b === void 0 ? void 0 : _b.b.c; -(_c = o3.b) === null || _c === void 0 ? void 0 : _c.c; -(_e = (_d = o4.b) === null || _d === void 0 ? void 0 : _d.c.d) === null || _e === void 0 ? void 0 : _e.e; -(_h = (_g = (_f = o5).b) === null || _g === void 0 ? void 0 : _g.call(_f).c.d) === null || _h === void 0 ? void 0 : _h.e; -(_j = o6()) === null || _j === void 0 ? void 0 : _j.x; +var _a, _b, _c, _d, _e, _f; +o1 === null || o1 === void 0 ? void 0 : o1.b; +o2 === null || o2 === void 0 ? void 0 : o2.b.c; +(_a = o3.b) === null || _a === void 0 ? void 0 : _a.c; +(_c = (_b = o4.b) === null || _b === void 0 ? void 0 : _b.c.d) === null || _c === void 0 ? void 0 : _c.e; +(_e = (_d = o5.b) === null || _d === void 0 ? void 0 : _d.call(o5).c.d) === null || _e === void 0 ? void 0 : _e.e; +(_f = o6()) === null || _f === void 0 ? void 0 : _f.x; // GH#34109 -((_k = o1) === null || _k === void 0 ? void 0 : _k.b) ? 1 : 0; +(o1 === null || o1 === void 0 ? void 0 : o1.b) ? 1 : 0; diff --git a/tests/baselines/reference/superMethodCall.js b/tests/baselines/reference/superMethodCall.js new file mode 100644 index 00000000000..ce9af2dff00 --- /dev/null +++ b/tests/baselines/reference/superMethodCall.js @@ -0,0 +1,44 @@ +//// [superMethodCall.ts] +class Base { + method?() { } +} + +class Derived extends Base { + method() { + return super.method?.(); + } + + async asyncMethod() { + return super.method?.(); + } +} + +//// [superMethodCall.js] +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +class Base { + method() { } +} +class Derived extends Base { + method() { + var _a; + return (_a = super.method) === null || _a === void 0 ? void 0 : _a.call(this); + } + asyncMethod() { + const _super = Object.create(null, { + method: { get: () => super.method } + }); + var _a; + return __awaiter(this, void 0, void 0, function* () { + return (_a = _super.method) === null || _a === void 0 ? void 0 : _a.call(this); + }); + } +} diff --git a/tests/baselines/reference/superMethodCall.symbols b/tests/baselines/reference/superMethodCall.symbols new file mode 100644 index 00000000000..b35a813cd88 --- /dev/null +++ b/tests/baselines/reference/superMethodCall.symbols @@ -0,0 +1,30 @@ +=== tests/cases/conformance/expressions/optionalChaining/callChain/superMethodCall.ts === +class Base { +>Base : Symbol(Base, Decl(superMethodCall.ts, 0, 0)) + + method?() { } +>method : Symbol(Base.method, Decl(superMethodCall.ts, 0, 12)) +} + +class Derived extends Base { +>Derived : Symbol(Derived, Decl(superMethodCall.ts, 2, 1)) +>Base : Symbol(Base, Decl(superMethodCall.ts, 0, 0)) + + method() { +>method : Symbol(Derived.method, Decl(superMethodCall.ts, 4, 28)) + + return super.method?.(); +>super.method : Symbol(Base.method, Decl(superMethodCall.ts, 0, 12)) +>super : Symbol(Base, Decl(superMethodCall.ts, 0, 0)) +>method : Symbol(Base.method, Decl(superMethodCall.ts, 0, 12)) + } + + async asyncMethod() { +>asyncMethod : Symbol(Derived.asyncMethod, Decl(superMethodCall.ts, 7, 5)) + + return super.method?.(); +>super.method : Symbol(Base.method, Decl(superMethodCall.ts, 0, 12)) +>super : Symbol(Base, Decl(superMethodCall.ts, 0, 0)) +>method : Symbol(Base.method, Decl(superMethodCall.ts, 0, 12)) + } +} diff --git a/tests/baselines/reference/superMethodCall.types b/tests/baselines/reference/superMethodCall.types new file mode 100644 index 00000000000..16d40d19ded --- /dev/null +++ b/tests/baselines/reference/superMethodCall.types @@ -0,0 +1,32 @@ +=== tests/cases/conformance/expressions/optionalChaining/callChain/superMethodCall.ts === +class Base { +>Base : Base + + method?() { } +>method : (() => void) | undefined +} + +class Derived extends Base { +>Derived : Derived +>Base : Base + + method() { +>method : () => void | undefined + + return super.method?.(); +>super.method?.() : void | undefined +>super.method : (() => void) | undefined +>super : Base +>method : (() => void) | undefined + } + + async asyncMethod() { +>asyncMethod : () => Promise + + return super.method?.(); +>super.method?.() : void | undefined +>super.method : (() => void) | undefined +>super : Base +>method : (() => void) | undefined + } +} diff --git a/tests/baselines/reference/thisMethodCall.js b/tests/baselines/reference/thisMethodCall.js new file mode 100644 index 00000000000..d05b9dbec95 --- /dev/null +++ b/tests/baselines/reference/thisMethodCall.js @@ -0,0 +1,17 @@ +//// [thisMethodCall.ts] +class C { + method?() {} + other() { + this.method?.(); + } +} + +//// [thisMethodCall.js] +"use strict"; +class C { + method() { } + other() { + var _a; + (_a = this.method) === null || _a === void 0 ? void 0 : _a.call(this); + } +} diff --git a/tests/baselines/reference/thisMethodCall.symbols b/tests/baselines/reference/thisMethodCall.symbols new file mode 100644 index 00000000000..d4d40af3fa4 --- /dev/null +++ b/tests/baselines/reference/thisMethodCall.symbols @@ -0,0 +1,16 @@ +=== tests/cases/conformance/expressions/optionalChaining/callChain/thisMethodCall.ts === +class C { +>C : Symbol(C, Decl(thisMethodCall.ts, 0, 0)) + + method?() {} +>method : Symbol(C.method, Decl(thisMethodCall.ts, 0, 9)) + + other() { +>other : Symbol(C.other, Decl(thisMethodCall.ts, 1, 16)) + + this.method?.(); +>this.method : Symbol(C.method, Decl(thisMethodCall.ts, 0, 9)) +>this : Symbol(C, Decl(thisMethodCall.ts, 0, 0)) +>method : Symbol(C.method, Decl(thisMethodCall.ts, 0, 9)) + } +} diff --git a/tests/baselines/reference/thisMethodCall.types b/tests/baselines/reference/thisMethodCall.types new file mode 100644 index 00000000000..08e023a44d2 --- /dev/null +++ b/tests/baselines/reference/thisMethodCall.types @@ -0,0 +1,17 @@ +=== tests/cases/conformance/expressions/optionalChaining/callChain/thisMethodCall.ts === +class C { +>C : C + + method?() {} +>method : (() => void) | undefined + + other() { +>other : () => void + + this.method?.(); +>this.method?.() : void | undefined +>this.method : (() => void) | undefined +>this : this +>method : (() => void) | undefined + } +} diff --git a/tests/baselines/reference/thisTypeOptionalCall.js b/tests/baselines/reference/thisTypeOptionalCall.js index 2a7a24d6eeb..56f7e585c0f 100644 --- a/tests/baselines/reference/thisTypeOptionalCall.js +++ b/tests/baselines/reference/thisTypeOptionalCall.js @@ -5,6 +5,5 @@ function maybeBind(obj: T, fn: ((this: T, ...args: A) => //// [thisTypeOptionalCall.js] function maybeBind(obj, fn) { - var _a; - return (_a = fn) === null || _a === void 0 ? void 0 : _a.bind(obj); + return fn === null || fn === void 0 ? void 0 : fn.bind(obj); } diff --git a/tests/cases/conformance/expressions/optionalChaining/callChain/superMethodCall.ts b/tests/cases/conformance/expressions/optionalChaining/callChain/superMethodCall.ts new file mode 100644 index 00000000000..86c273d0ee2 --- /dev/null +++ b/tests/cases/conformance/expressions/optionalChaining/callChain/superMethodCall.ts @@ -0,0 +1,15 @@ +// @strict: true +// @target: ES6 +class Base { + method?() { } +} + +class Derived extends Base { + method() { + return super.method?.(); + } + + async asyncMethod() { + return super.method?.(); + } +} \ No newline at end of file diff --git a/tests/cases/conformance/expressions/optionalChaining/callChain/thisMethodCall.ts b/tests/cases/conformance/expressions/optionalChaining/callChain/thisMethodCall.ts new file mode 100644 index 00000000000..ffbbd1f31a7 --- /dev/null +++ b/tests/cases/conformance/expressions/optionalChaining/callChain/thisMethodCall.ts @@ -0,0 +1,8 @@ +// @strict: true +// @target: es6 +class C { + method?() {} + other() { + this.method?.(); + } +} \ No newline at end of file From 5321dcb09f4d37768662afcfc9ffbe1f6b24d0c9 Mon Sep 17 00:00:00 2001 From: Klaus Meinhardt Date: Fri, 15 Nov 2019 02:44:48 +0100 Subject: [PATCH 15/50] disallow 'await' and 'yield' in property and enum member initializer (#34892) * disallow 'await' and 'yield' in property and enum member initializer * accept baseline changes * Add a test for #34887 Ensures that this fixes #34887 --- src/compiler/checker.ts | 23 +------ src/compiler/parser.ts | 20 ++---- .../reference/awaitAndYield.errors.txt | 15 ++++ tests/baselines/reference/awaitAndYield.js | 16 +++++ .../awaitAndYieldInProperty.errors.txt | 68 +++++++++++++++++++ .../reference/awaitAndYieldInProperty.js | 45 ++++++++++++ .../awaitInClassInAsyncFunction.errors.txt | 18 +++++ .../reference/awaitInClassInAsyncFunction.js | 26 +++++++ .../awaitInClassInAsyncFunction.symbols | 20 ++++++ .../awaitInClassInAsyncFunction.types | 26 +++++++ .../reference/generatorTypeCheck39.errors.txt | 5 +- .../reference/generatorTypeCheck40.errors.txt | 9 --- .../reference/generatorTypeCheck55.errors.txt | 9 --- .../reference/generatorTypeCheck56.errors.txt | 13 ---- .../reference/generatorTypeCheck59.errors.txt | 5 +- .../reference/generatorTypeCheck60.errors.txt | 9 --- .../reference/generatorTypeCheck61.errors.txt | 5 +- ...cGenerators.classMethods.es2018.errors.txt | 5 +- .../compiler/awaitInClassInAsyncFunction.ts | 12 ++++ .../classes/awaitAndYieldInProperty.ts | 19 ++++++ .../cases/conformance/enums/awaitAndYield.ts | 8 +++ 21 files changed, 285 insertions(+), 91 deletions(-) create mode 100644 tests/baselines/reference/awaitAndYield.errors.txt create mode 100644 tests/baselines/reference/awaitAndYield.js create mode 100644 tests/baselines/reference/awaitAndYieldInProperty.errors.txt create mode 100644 tests/baselines/reference/awaitAndYieldInProperty.js create mode 100644 tests/baselines/reference/awaitInClassInAsyncFunction.errors.txt create mode 100644 tests/baselines/reference/awaitInClassInAsyncFunction.js create mode 100644 tests/baselines/reference/awaitInClassInAsyncFunction.symbols create mode 100644 tests/baselines/reference/awaitInClassInAsyncFunction.types delete mode 100644 tests/baselines/reference/generatorTypeCheck40.errors.txt delete mode 100644 tests/baselines/reference/generatorTypeCheck55.errors.txt delete mode 100644 tests/baselines/reference/generatorTypeCheck56.errors.txt delete mode 100644 tests/baselines/reference/generatorTypeCheck60.errors.txt create mode 100644 tests/cases/compiler/awaitInClassInAsyncFunction.ts create mode 100644 tests/cases/conformance/classes/awaitAndYieldInProperty.ts create mode 100644 tests/cases/conformance/enums/awaitAndYield.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 0ecf7d31142..d22a29e0a6b 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -26315,8 +26315,7 @@ namespace ts { const span = getSpanOfTokenAtPosition(sourceFile, node.pos); const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.await_expression_is_only_allowed_within_an_async_function); const func = getContainingFunction(node); - if (func && func.kind !== SyntaxKind.Constructor) { - Debug.assert((getFunctionFlags(func) & FunctionFlags.Async) === 0, "Enclosing function should never be an async function."); + if (func && func.kind !== SyntaxKind.Constructor && (getFunctionFlags(func) & FunctionFlags.Async) === 0) { const relatedInfo = createDiagnosticForNode(func, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); } @@ -27128,28 +27127,10 @@ namespace ts { return [ effectiveLeft, effectiveRight ]; } - function isYieldExpressionInClass(node: YieldExpression): boolean { - let current: Node = node; - let parent = node.parent; - while (parent) { - if (isFunctionLike(parent) && current === (parent).body) { - return false; - } - else if (isClassLike(current)) { - return true; - } - - current = parent; - parent = parent.parent; - } - - return false; - } - function checkYieldExpression(node: YieldExpression): Type { // Grammar checking if (produceDiagnostics) { - if (!(node.flags & NodeFlags.YieldContext) || isYieldExpressionInClass(node)) { + if (!(node.flags & NodeFlags.YieldContext)) { grammarErrorOnFirstToken(node, Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body); } diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 146b74c3cb8..49cdea63d58 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -1029,6 +1029,10 @@ namespace ts { return doInsideOfContext(NodeFlags.YieldContext | NodeFlags.AwaitContext, func); } + function doOutsideOfYieldAndAwaitContext(func: () => T): T { + return doOutsideOfContext(NodeFlags.YieldContext | NodeFlags.AwaitContext, func); + } + function inContext(flags: NodeFlags) { return (contextFlags & flags) !== 0; } @@ -5865,19 +5869,7 @@ namespace ts { node.exclamationToken = parseTokenNode>(); } node.type = parseTypeAnnotation(); - - // For instance properties specifically, since they are evaluated inside the constructor, - // we do *not * want to parse yield expressions, so we specifically turn the yield context - // off. The grammar would look something like this: - // - // MemberVariableDeclaration[Yield]: - // AccessibilityModifier_opt PropertyName TypeAnnotation_opt Initializer_opt[In]; - // AccessibilityModifier_opt static_opt PropertyName TypeAnnotation_opt Initializer_opt[In, ?Yield]; - // - // The checker may still error in the static case to explicitly disallow the yield expression. - node.initializer = hasModifier(node, ModifierFlags.Static) - ? allowInAnd(parseInitializer) - : doOutsideOfContext(NodeFlags.YieldContext | NodeFlags.DisallowInContext, parseInitializer); + node.initializer = doOutsideOfContext(NodeFlags.YieldContext | NodeFlags.AwaitContext | NodeFlags.DisallowInContext, parseInitializer); parseSemicolon(); return finishNode(node); @@ -6213,7 +6205,7 @@ namespace ts { parseExpected(SyntaxKind.EnumKeyword); node.name = parseIdentifier(); if (parseExpected(SyntaxKind.OpenBraceToken)) { - node.members = parseDelimitedList(ParsingContext.EnumMembers, parseEnumMember); + node.members = doOutsideOfYieldAndAwaitContext(() => parseDelimitedList(ParsingContext.EnumMembers, parseEnumMember)); parseExpected(SyntaxKind.CloseBraceToken); } else { diff --git a/tests/baselines/reference/awaitAndYield.errors.txt b/tests/baselines/reference/awaitAndYield.errors.txt new file mode 100644 index 00000000000..54794fb01de --- /dev/null +++ b/tests/baselines/reference/awaitAndYield.errors.txt @@ -0,0 +1,15 @@ +tests/cases/conformance/enums/awaitAndYield.ts(3,15): error TS1308: 'await' expression is only allowed within an async function. +tests/cases/conformance/enums/awaitAndYield.ts(4,15): error TS1163: A 'yield' expression is only allowed in a generator body. + + +==== tests/cases/conformance/enums/awaitAndYield.ts (2 errors) ==== + async function* test(x: Promise) { + enum E { + foo = await x, + ~~~~~ +!!! error TS1308: 'await' expression is only allowed within an async function. + baz = yield 1, + ~~~~~ +!!! error TS1163: A 'yield' expression is only allowed in a generator body. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/awaitAndYield.js b/tests/baselines/reference/awaitAndYield.js new file mode 100644 index 00000000000..34396ef795c --- /dev/null +++ b/tests/baselines/reference/awaitAndYield.js @@ -0,0 +1,16 @@ +//// [awaitAndYield.ts] +async function* test(x: Promise) { + enum E { + foo = await x, + baz = yield 1, + } +} + +//// [awaitAndYield.js] +async function* test(x) { + let E; + (function (E) { + E[E["foo"] = await x] = "foo"; + E[E["baz"] = yield 1] = "baz"; + })(E || (E = {})); +} diff --git a/tests/baselines/reference/awaitAndYieldInProperty.errors.txt b/tests/baselines/reference/awaitAndYieldInProperty.errors.txt new file mode 100644 index 00000000000..0b6634dcc88 --- /dev/null +++ b/tests/baselines/reference/awaitAndYieldInProperty.errors.txt @@ -0,0 +1,68 @@ +tests/cases/conformance/classes/awaitAndYieldInProperty.ts(3,9): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type. +tests/cases/conformance/classes/awaitAndYieldInProperty.ts(3,21): error TS1308: 'await' expression is only allowed within an async function. +tests/cases/conformance/classes/awaitAndYieldInProperty.ts(4,16): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type. +tests/cases/conformance/classes/awaitAndYieldInProperty.ts(4,28): error TS1308: 'await' expression is only allowed within an async function. +tests/cases/conformance/classes/awaitAndYieldInProperty.ts(6,9): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type. +tests/cases/conformance/classes/awaitAndYieldInProperty.ts(6,21): error TS1163: A 'yield' expression is only allowed in a generator body. +tests/cases/conformance/classes/awaitAndYieldInProperty.ts(7,16): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type. +tests/cases/conformance/classes/awaitAndYieldInProperty.ts(7,28): error TS1163: A 'yield' expression is only allowed in a generator body. +tests/cases/conformance/classes/awaitAndYieldInProperty.ts(11,9): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type. +tests/cases/conformance/classes/awaitAndYieldInProperty.ts(11,21): error TS1308: 'await' expression is only allowed within an async function. +tests/cases/conformance/classes/awaitAndYieldInProperty.ts(12,16): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type. +tests/cases/conformance/classes/awaitAndYieldInProperty.ts(12,28): error TS1308: 'await' expression is only allowed within an async function. +tests/cases/conformance/classes/awaitAndYieldInProperty.ts(14,9): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type. +tests/cases/conformance/classes/awaitAndYieldInProperty.ts(14,21): error TS1163: A 'yield' expression is only allowed in a generator body. +tests/cases/conformance/classes/awaitAndYieldInProperty.ts(15,16): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type. +tests/cases/conformance/classes/awaitAndYieldInProperty.ts(15,28): error TS1163: A 'yield' expression is only allowed in a generator body. + + +==== tests/cases/conformance/classes/awaitAndYieldInProperty.ts (16 errors) ==== + async function* test(x: Promise) { + class C { + [await x] = await x; + ~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~ +!!! error TS1308: 'await' expression is only allowed within an async function. + static [await x] = await x; + ~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~ +!!! error TS1308: 'await' expression is only allowed within an async function. + + [yield 1] = yield 2; + ~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~ +!!! error TS1163: A 'yield' expression is only allowed in a generator body. + static [yield 3] = yield 4; + ~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~ +!!! error TS1163: A 'yield' expression is only allowed in a generator body. + } + + return class { + [await x] = await x; + ~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~ +!!! error TS1308: 'await' expression is only allowed within an async function. + static [await x] = await x; + ~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~ +!!! error TS1308: 'await' expression is only allowed within an async function. + + [yield 1] = yield 2; + ~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~ +!!! error TS1163: A 'yield' expression is only allowed in a generator body. + static [yield 3] = yield 4; + ~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~ +!!! error TS1163: A 'yield' expression is only allowed in a generator body. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/awaitAndYieldInProperty.js b/tests/baselines/reference/awaitAndYieldInProperty.js new file mode 100644 index 00000000000..73c04a612c2 --- /dev/null +++ b/tests/baselines/reference/awaitAndYieldInProperty.js @@ -0,0 +1,45 @@ +//// [awaitAndYieldInProperty.ts] +async function* test(x: Promise) { + class C { + [await x] = await x; + static [await x] = await x; + + [yield 1] = yield 2; + static [yield 3] = yield 4; + } + + return class { + [await x] = await x; + static [await x] = await x; + + [yield 1] = yield 2; + static [yield 3] = yield 4; + } +} + +//// [awaitAndYieldInProperty.js] +async function* test(x) { + var _a, _b, _c, _d, _e, _f, _g, _h, _j; + class C { + constructor() { + this[_a] = await x; + this[_c] = yield 2; + } + } + _a = await x, _b = await x, _c = yield 1, _d = yield 3; + C[_b] = await x; + C[_d] = yield 4; + return _j = class { + constructor() { + this[_e] = await x; + this[_g] = yield 2; + } + }, + _e = await x, + _f = await x, + _g = yield 1, + _h = yield 3, + _j[_f] = await x, + _j[_h] = yield 4, + _j; +} diff --git a/tests/baselines/reference/awaitInClassInAsyncFunction.errors.txt b/tests/baselines/reference/awaitInClassInAsyncFunction.errors.txt new file mode 100644 index 00000000000..549fbd0b748 --- /dev/null +++ b/tests/baselines/reference/awaitInClassInAsyncFunction.errors.txt @@ -0,0 +1,18 @@ +tests/cases/compiler/awaitInClassInAsyncFunction.ts(9,15): error TS1308: 'await' expression is only allowed within an async function. + + +==== tests/cases/compiler/awaitInClassInAsyncFunction.ts (1 errors) ==== + // https://github.com/microsoft/TypeScript/issues/34887 + + async function bar() { + return 2; + } + + async function foo() { + return new class { + baz = await bar(); + ~~~~~ +!!! error TS1308: 'await' expression is only allowed within an async function. + }; + } + \ No newline at end of file diff --git a/tests/baselines/reference/awaitInClassInAsyncFunction.js b/tests/baselines/reference/awaitInClassInAsyncFunction.js new file mode 100644 index 00000000000..a9d3c38f5c6 --- /dev/null +++ b/tests/baselines/reference/awaitInClassInAsyncFunction.js @@ -0,0 +1,26 @@ +//// [awaitInClassInAsyncFunction.ts] +// https://github.com/microsoft/TypeScript/issues/34887 + +async function bar() { + return 2; +} + +async function foo() { + return new class { + baz = await bar(); + }; +} + + +//// [awaitInClassInAsyncFunction.js] +// https://github.com/microsoft/TypeScript/issues/34887 +async function bar() { + return 2; +} +async function foo() { + return new class { + constructor() { + this.baz = await bar(); + } + }; +} diff --git a/tests/baselines/reference/awaitInClassInAsyncFunction.symbols b/tests/baselines/reference/awaitInClassInAsyncFunction.symbols new file mode 100644 index 00000000000..31fc7b10916 --- /dev/null +++ b/tests/baselines/reference/awaitInClassInAsyncFunction.symbols @@ -0,0 +1,20 @@ +=== tests/cases/compiler/awaitInClassInAsyncFunction.ts === +// https://github.com/microsoft/TypeScript/issues/34887 + +async function bar() { +>bar : Symbol(bar, Decl(awaitInClassInAsyncFunction.ts, 0, 0)) + + return 2; +} + +async function foo() { +>foo : Symbol(foo, Decl(awaitInClassInAsyncFunction.ts, 4, 1)) + + return new class { + baz = await bar(); +>baz : Symbol((Anonymous class).baz, Decl(awaitInClassInAsyncFunction.ts, 7, 22)) +>bar : Symbol(bar, Decl(awaitInClassInAsyncFunction.ts, 0, 0)) + + }; +} + diff --git a/tests/baselines/reference/awaitInClassInAsyncFunction.types b/tests/baselines/reference/awaitInClassInAsyncFunction.types new file mode 100644 index 00000000000..441e1f84459 --- /dev/null +++ b/tests/baselines/reference/awaitInClassInAsyncFunction.types @@ -0,0 +1,26 @@ +=== tests/cases/compiler/awaitInClassInAsyncFunction.ts === +// https://github.com/microsoft/TypeScript/issues/34887 + +async function bar() { +>bar : () => Promise + + return 2; +>2 : 2 +} + +async function foo() { +>foo : () => Promise<(Anonymous class)> + + return new class { +>new class { baz = await bar(); } : (Anonymous class) +>class { baz = await bar(); } : typeof (Anonymous class) + + baz = await bar(); +>baz : number +>await bar() : number +>bar() : Promise +>bar : () => Promise + + }; +} + diff --git a/tests/baselines/reference/generatorTypeCheck39.errors.txt b/tests/baselines/reference/generatorTypeCheck39.errors.txt index fe0162233e0..740c3634368 100644 --- a/tests/baselines/reference/generatorTypeCheck39.errors.txt +++ b/tests/baselines/reference/generatorTypeCheck39.errors.txt @@ -1,16 +1,13 @@ -tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck39.ts(5,16): error TS1163: A 'yield' expression is only allowed in a generator body. tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck39.ts(6,11): error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning. tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck39.ts(7,13): error TS1163: A 'yield' expression is only allowed in a generator body. -==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck39.ts (3 errors) ==== +==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck39.ts (2 errors) ==== function decorator(x: any) { return y => { }; } function* g() { @decorator(yield 0) - ~~~~~ -!!! error TS1163: A 'yield' expression is only allowed in a generator body. class C { ~ !!! error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning. diff --git a/tests/baselines/reference/generatorTypeCheck40.errors.txt b/tests/baselines/reference/generatorTypeCheck40.errors.txt deleted file mode 100644 index 3cc7c02fa75..00000000000 --- a/tests/baselines/reference/generatorTypeCheck40.errors.txt +++ /dev/null @@ -1,9 +0,0 @@ -tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck40.ts(2,22): error TS1163: A 'yield' expression is only allowed in a generator body. - - -==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck40.ts (1 errors) ==== - function* g() { - class C extends (yield 0) { } - ~~~~~ -!!! error TS1163: A 'yield' expression is only allowed in a generator body. - } \ No newline at end of file diff --git a/tests/baselines/reference/generatorTypeCheck55.errors.txt b/tests/baselines/reference/generatorTypeCheck55.errors.txt deleted file mode 100644 index 7856a0074ff..00000000000 --- a/tests/baselines/reference/generatorTypeCheck55.errors.txt +++ /dev/null @@ -1,9 +0,0 @@ -tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck55.ts(2,30): error TS1163: A 'yield' expression is only allowed in a generator body. - - -==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck55.ts (1 errors) ==== - function* g() { - var x = class C extends (yield) {}; - ~~~~~ -!!! error TS1163: A 'yield' expression is only allowed in a generator body. - } \ No newline at end of file diff --git a/tests/baselines/reference/generatorTypeCheck56.errors.txt b/tests/baselines/reference/generatorTypeCheck56.errors.txt deleted file mode 100644 index 20961935807..00000000000 --- a/tests/baselines/reference/generatorTypeCheck56.errors.txt +++ /dev/null @@ -1,13 +0,0 @@ -tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck56.ts(3,11): error TS1163: A 'yield' expression is only allowed in a generator body. - - -==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck56.ts (1 errors) ==== - function* g() { - var x = class C { - *[yield 0]() { - ~~~~~ -!!! error TS1163: A 'yield' expression is only allowed in a generator body. - yield 0; - } - }; - } \ No newline at end of file diff --git a/tests/baselines/reference/generatorTypeCheck59.errors.txt b/tests/baselines/reference/generatorTypeCheck59.errors.txt index 5cec6ac1f24..87a640112d0 100644 --- a/tests/baselines/reference/generatorTypeCheck59.errors.txt +++ b/tests/baselines/reference/generatorTypeCheck59.errors.txt @@ -1,13 +1,10 @@ -tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck59.ts(3,11): error TS1163: A 'yield' expression is only allowed in a generator body. tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck59.ts(4,9): error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning. -==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck59.ts (2 errors) ==== +==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck59.ts (1 errors) ==== function* g() { class C { @(yield "") - ~~~~~ -!!! error TS1163: A 'yield' expression is only allowed in a generator body. m() { } ~ !!! error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning. diff --git a/tests/baselines/reference/generatorTypeCheck60.errors.txt b/tests/baselines/reference/generatorTypeCheck60.errors.txt deleted file mode 100644 index 6f7bf465804..00000000000 --- a/tests/baselines/reference/generatorTypeCheck60.errors.txt +++ /dev/null @@ -1,9 +0,0 @@ -tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck60.ts(2,22): error TS1163: A 'yield' expression is only allowed in a generator body. - - -==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck60.ts (1 errors) ==== - function* g() { - class C extends (yield) {}; - ~~~~~ -!!! error TS1163: A 'yield' expression is only allowed in a generator body. - } \ No newline at end of file diff --git a/tests/baselines/reference/generatorTypeCheck61.errors.txt b/tests/baselines/reference/generatorTypeCheck61.errors.txt index a80949e8876..e6eda81186a 100644 --- a/tests/baselines/reference/generatorTypeCheck61.errors.txt +++ b/tests/baselines/reference/generatorTypeCheck61.errors.txt @@ -1,12 +1,9 @@ -tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck61.ts(2,7): error TS1163: A 'yield' expression is only allowed in a generator body. tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck61.ts(3,11): error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning. -==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck61.ts (2 errors) ==== +==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck61.ts (1 errors) ==== function * g() { @(yield 0) - ~~~~~ -!!! error TS1163: A 'yield' expression is only allowed in a generator body. class C {}; ~ !!! error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning. diff --git a/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018.errors.txt b/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018.errors.txt index 0a114efc26c..6af732c1b4f 100644 --- a/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018.errors.txt +++ b/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018.errors.txt @@ -20,7 +20,6 @@ tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpr tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldAsTypeIsStrictError.ts(4,16): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInClassComputedPropertyIsError.ts(2,14): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInClassComputedPropertyIsError.ts(2,14): error TS2693: 'yield' only refers to a type, but is being used as a value here. -tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInParameterInitializerIsError.ts(2,19): error TS1163: A 'yield' expression is only allowed in a generator body. tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInParameterInitializerIsError.ts(2,19): error TS2523: 'yield' expressions cannot be used in a parameter initializer. tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts(2,15): error TS1138: Parameter declaration expected. tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts(2,15): error TS2693: 'yield' only refers to a type, but is being used as a value here. @@ -77,12 +76,10 @@ tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarMissingVa !!! error TS2524: 'await' expressions cannot be used in a parameter initializer. } } -==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInParameterInitializerIsError.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInParameterInitializerIsError.ts (1 errors) ==== class C7 { async * f(a = yield) { ~~~~~ -!!! error TS1163: A 'yield' expression is only allowed in a generator body. - ~~~~~ !!! error TS2523: 'yield' expressions cannot be used in a parameter initializer. } } diff --git a/tests/cases/compiler/awaitInClassInAsyncFunction.ts b/tests/cases/compiler/awaitInClassInAsyncFunction.ts new file mode 100644 index 00000000000..4779ba5da13 --- /dev/null +++ b/tests/cases/compiler/awaitInClassInAsyncFunction.ts @@ -0,0 +1,12 @@ +// @target: esnext +// https://github.com/microsoft/TypeScript/issues/34887 + +async function bar() { + return 2; +} + +async function foo() { + return new class { + baz = await bar(); + }; +} diff --git a/tests/cases/conformance/classes/awaitAndYieldInProperty.ts b/tests/cases/conformance/classes/awaitAndYieldInProperty.ts new file mode 100644 index 00000000000..0de782de213 --- /dev/null +++ b/tests/cases/conformance/classes/awaitAndYieldInProperty.ts @@ -0,0 +1,19 @@ +// @target: es2019 +// @noTypesAndSymbols: true +async function* test(x: Promise) { + class C { + [await x] = await x; + static [await x] = await x; + + [yield 1] = yield 2; + static [yield 3] = yield 4; + } + + return class { + [await x] = await x; + static [await x] = await x; + + [yield 1] = yield 2; + static [yield 3] = yield 4; + } +} \ No newline at end of file diff --git a/tests/cases/conformance/enums/awaitAndYield.ts b/tests/cases/conformance/enums/awaitAndYield.ts new file mode 100644 index 00000000000..c6b477f3929 --- /dev/null +++ b/tests/cases/conformance/enums/awaitAndYield.ts @@ -0,0 +1,8 @@ +// @target: ES2019 +// @noTypesAndSymbols: true +async function* test(x: Promise) { + enum E { + foo = await x, + baz = yield 1, + } +} \ No newline at end of file From 3bcea0dbba5af81393a7a3de6730a22361002e59 Mon Sep 17 00:00:00 2001 From: Jack Williams Date: Fri, 15 Nov 2019 18:13:10 +0000 Subject: [PATCH 16/50] Fix #35060 (#35065) * Fix 35060 * Refactor and check ro-array to tuple case * Lint --- src/compiler/checker.ts | 31 ++-- .../arityAndOrderCompatibility01.errors.txt | 20 +-- .../readonlyArraysAndTuples.errors.txt | 4 +- ...eadonlyTupleAndArrayElaboration.errors.txt | 122 ++++++++++++++- .../readonlyTupleAndArrayElaboration.js | 80 ++++++++++ .../readonlyTupleAndArrayElaboration.symbols | 112 ++++++++++++++ .../readonlyTupleAndArrayElaboration.types | 144 ++++++++++++++++++ .../readonlyTupleAndArrayElaboration.ts | 48 ++++++ 8 files changed, 535 insertions(+), 26 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index d22a29e0a6b..27ed0388841 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -14528,32 +14528,33 @@ namespace ts { * if we have found an elaboration, or we should ignore * any other elaborations when relating the `source` and * `target` types. - * - * @param source - * @param target - * @param reportErrors */ function tryElaborateArrayLikeErrors(source: Type, target: Type, reportErrors: boolean): boolean { - if (isTupleLikeType(source)) { - const sourceTuple: TupleType | undefined = (source as TupleTypeReference).target; - if (sourceTuple && sourceTuple.readonly && isArrayOrTupleLikeType(target) && - (!isReadonlyArrayType(target) || isTupleType(target) && !target.target.readonly)) { + /** + * The spec for elaboration is: + * - If the source is a readonly tuple and the target is a mutable array or tuple, elaborate on mutability and skip property elaborations. + * - If the source is a tuple then skip property elaborations if the target is an array or tuple. + * - If the source is a readonly array and the target is a mutable array or tuple, elaborate on mutability and skip property elaborations. + * - If the source an array then skip property elaborations if the target is a tuple. + */ + if (isTupleType(source)) { + if (source.target.readonly && isMutableArrayOrTuple(target)) { if (reportErrors) { reportError(Diagnostics.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1, typeToString(source), typeToString(target)); } return false; } - return isArrayLikeType(target); + return isTupleType(target) || isArrayType(target); } - if (isTupleLikeType(target)) { - return isArrayLikeType(source); - } - if (isReadonlyArrayType(source) && isArrayType(target) && !isReadonlyArrayType(target)) { + if (isReadonlyArrayType(source) && isMutableArrayOrTuple(target)) { if (reportErrors) { reportError(Diagnostics.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1, typeToString(source), typeToString(target)); } return false; } + if (isTupleType(target)) { + return isArrayType(source); + } return true; } @@ -16565,6 +16566,10 @@ namespace ts { return !!(getObjectFlags(type) & ObjectFlags.Reference) && (type).target === globalReadonlyArrayType; } + function isMutableArrayOrTuple(type: Type): boolean { + return isArrayType(type) && !isReadonlyArrayType(type) || isTupleType(type) && !type.target.readonly; + } + function getElementTypeOfArrayType(type: Type): Type | undefined { return isArrayType(type) ? getTypeArguments(type as TypeReference)[0] : undefined; } diff --git a/tests/baselines/reference/arityAndOrderCompatibility01.errors.txt b/tests/baselines/reference/arityAndOrderCompatibility01.errors.txt index b34b8896919..31caaef4228 100644 --- a/tests/baselines/reference/arityAndOrderCompatibility01.errors.txt +++ b/tests/baselines/reference/arityAndOrderCompatibility01.errors.txt @@ -2,30 +2,30 @@ tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(15,12): erro tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(17,5): error TS2461: Type '{ 0: string; 1: number; length: 2; }' is not an array type. tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(18,5): error TS2741: Property '2' is missing in type '[string, number]' but required in type '[number, number, number]'. tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(19,5): error TS2741: Property '2' is missing in type 'StrNum' but required in type '[number, number, number]'. -tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(20,5): error TS2740: Type '{ 0: string; 1: number; length: 2; }' is missing the following properties from type '[number, number, number]': 2, pop, push, concat, and 16 more. +tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(20,5): error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[number, number, number]'. tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(21,5): error TS2741: Property '2' is missing in type '[string, number]' but required in type '[string, number, number]'. tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(22,5): error TS2741: Property '2' is missing in type 'StrNum' but required in type '[string, number, number]'. -tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(23,5): error TS2740: Type '{ 0: string; 1: number; length: 2; }' is missing the following properties from type '[string, number, number]': 2, pop, push, concat, and 16 more. +tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(23,5): error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[string, number, number]'. tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(24,5): error TS2322: Type '[string, number]' is not assignable to type '[number]'. Types of property '0' are incompatible. Type 'string' is not assignable to type 'number'. tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(25,5): error TS2322: Type 'StrNum' is not assignable to type '[number]'. Types of property '0' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(26,5): error TS2740: Type '{ 0: string; 1: number; length: 2; }' is missing the following properties from type '[number]': pop, push, concat, join, and 15 more. +tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(26,5): error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[number]'. tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(27,5): error TS2322: Type '[string, number]' is not assignable to type '[string]'. Types of property 'length' are incompatible. Type '2' is not assignable to type '1'. tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(28,5): error TS2322: Type 'StrNum' is not assignable to type '[string]'. Types of property 'length' are incompatible. Type '2' is not assignable to type '1'. -tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(29,5): error TS2740: Type '{ 0: string; 1: number; length: 2; }' is missing the following properties from type '[string]': pop, push, concat, join, and 15 more. +tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(29,5): error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[string]'. tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(30,5): error TS2322: Type '[string, number]' is not assignable to type '[number, string]'. Type 'string' is not assignable to type 'number'. tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(31,5): error TS2322: Type 'StrNum' is not assignable to type '[number, string]'. Types of property '0' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(32,5): error TS2740: Type '{ 0: string; 1: number; length: 2; }' is missing the following properties from type '[number, string]': pop, push, concat, join, and 15 more. +tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(32,5): error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[number, string]'. ==== tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts (17 errors) ==== @@ -58,7 +58,7 @@ tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(32,5): error !!! error TS2741: Property '2' is missing in type 'StrNum' but required in type '[number, number, number]'. var j3: [number, number, number] = z; ~~ -!!! error TS2740: Type '{ 0: string; 1: number; length: 2; }' is missing the following properties from type '[number, number, number]': 2, pop, push, concat, and 16 more. +!!! error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[number, number, number]'. var k1: [string, number, number] = x; ~~ !!! error TS2741: Property '2' is missing in type '[string, number]' but required in type '[string, number, number]'. @@ -67,7 +67,7 @@ tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(32,5): error !!! error TS2741: Property '2' is missing in type 'StrNum' but required in type '[string, number, number]'. var k3: [string, number, number] = z; ~~ -!!! error TS2740: Type '{ 0: string; 1: number; length: 2; }' is missing the following properties from type '[string, number, number]': 2, pop, push, concat, and 16 more. +!!! error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[string, number, number]'. var l1: [number] = x; ~~ !!! error TS2322: Type '[string, number]' is not assignable to type '[number]'. @@ -80,7 +80,7 @@ tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(32,5): error !!! error TS2322: Type 'string' is not assignable to type 'number'. var l3: [number] = z; ~~ -!!! error TS2740: Type '{ 0: string; 1: number; length: 2; }' is missing the following properties from type '[number]': pop, push, concat, join, and 15 more. +!!! error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[number]'. var m1: [string] = x; ~~ !!! error TS2322: Type '[string, number]' is not assignable to type '[string]'. @@ -93,7 +93,7 @@ tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(32,5): error !!! error TS2322: Type '2' is not assignable to type '1'. var m3: [string] = z; ~~ -!!! error TS2740: Type '{ 0: string; 1: number; length: 2; }' is missing the following properties from type '[string]': pop, push, concat, join, and 15 more. +!!! error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[string]'. var n1: [number, string] = x; ~~ !!! error TS2322: Type '[string, number]' is not assignable to type '[number, string]'. @@ -105,7 +105,7 @@ tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(32,5): error !!! error TS2322: Type 'string' is not assignable to type 'number'. var n3: [number, string] = z; ~~ -!!! error TS2740: Type '{ 0: string; 1: number; length: 2; }' is missing the following properties from type '[number, string]': pop, push, concat, join, and 15 more. +!!! error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[number, string]'. var o1: [string, number] = x; var o2: [string, number] = y; var o3: [string, number] = y; diff --git a/tests/baselines/reference/readonlyArraysAndTuples.errors.txt b/tests/baselines/reference/readonlyArraysAndTuples.errors.txt index 39f377f4ee9..8a18ff29a97 100644 --- a/tests/baselines/reference/readonlyArraysAndTuples.errors.txt +++ b/tests/baselines/reference/readonlyArraysAndTuples.errors.txt @@ -5,7 +5,7 @@ tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(12,12): error TS1 tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(15,5): error TS4104: The type 'readonly string[]' is 'readonly' and cannot be assigned to the mutable type 'string[]'. tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(17,5): error TS4104: The type 'readonly [string, string]' is 'readonly' and cannot be assigned to the mutable type 'string[]'. tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(21,5): error TS2739: Type 'string[]' is missing the following properties from type '[string, string]': 0, 1 -tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(22,5): error TS2740: Type 'readonly string[]' is missing the following properties from type '[string, string]': 0, 1, pop, push, and 5 more. +tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(22,5): error TS4104: The type 'readonly string[]' is 'readonly' and cannot be assigned to the mutable type '[string, string]'. tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(23,5): error TS4104: The type 'readonly [string, string]' is 'readonly' and cannot be assigned to the mutable type '[string, string]'. tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(24,5): error TS2739: Type 'string[]' is missing the following properties from type 'readonly [string, string]': 0, 1 tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(25,5): error TS2739: Type 'readonly string[]' is missing the following properties from type 'readonly [string, string]': 0, 1 @@ -56,7 +56,7 @@ tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(36,8): error TS25 !!! error TS2739: Type 'string[]' is missing the following properties from type '[string, string]': 0, 1 mt = ra; // Error ~~ -!!! error TS2740: Type 'readonly string[]' is missing the following properties from type '[string, string]': 0, 1, pop, push, and 5 more. +!!! error TS4104: The type 'readonly string[]' is 'readonly' and cannot be assigned to the mutable type '[string, string]'. mt = rt; // Error ~~ !!! error TS4104: The type 'readonly [string, string]' is 'readonly' and cannot be assigned to the mutable type '[string, string]'. diff --git a/tests/baselines/reference/readonlyTupleAndArrayElaboration.errors.txt b/tests/baselines/reference/readonlyTupleAndArrayElaboration.errors.txt index 5f343e2dfda..3f328deb405 100644 --- a/tests/baselines/reference/readonlyTupleAndArrayElaboration.errors.txt +++ b/tests/baselines/reference/readonlyTupleAndArrayElaboration.errors.txt @@ -10,9 +10,37 @@ tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(23,9): error TS2345: Ar The type 'readonly number[]' is 'readonly' and cannot be assigned to the mutable type 'number[]'. tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(24,9): error TS2345: Argument of type 'readonly number[]' is not assignable to parameter of type 'number[]'. The type 'readonly number[]' is 'readonly' and cannot be assigned to the mutable type 'number[]'. +tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(27,7): error TS2322: Type 'readonly [1]' is not assignable to type 'readonly []'. + Types of property 'length' are incompatible. + Type '1' is not assignable to type '0'. +tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(30,7): error TS4104: The type 'readonly [1]' is 'readonly' and cannot be assigned to the mutable type '[]'. +tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(33,7): error TS2322: Type '[1]' is not assignable to type 'readonly []'. + Types of property 'length' are incompatible. + Type '1' is not assignable to type '0'. +tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(36,7): error TS2322: Type '[1]' is not assignable to type '[]'. + Types of property 'length' are incompatible. + Type '1' is not assignable to type '0'. +tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(39,7): error TS2322: Type 'readonly number[]' is not assignable to type 'readonly boolean[]'. + Type 'number' is not assignable to type 'boolean'. +tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(42,7): error TS4104: The type 'readonly number[]' is 'readonly' and cannot be assigned to the mutable type 'boolean[]'. +tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(45,7): error TS2322: Type 'number[]' is not assignable to type 'readonly boolean[]'. + Type 'number' is not assignable to type 'boolean'. +tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(48,7): error TS2322: Type 'number[]' is not assignable to type 'boolean[]'. + Type 'number' is not assignable to type 'boolean'. +tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(51,7): error TS2322: Type 'readonly [1]' is not assignable to type 'readonly boolean[]'. + Type '1' is not assignable to type 'boolean'. +tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(54,7): error TS4104: The type 'readonly [1]' is 'readonly' and cannot be assigned to the mutable type 'number[]'. +tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(57,7): error TS2322: Type '[1]' is not assignable to type 'readonly boolean[]'. + Type '1' is not assignable to type 'boolean'. +tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(60,7): error TS2322: Type '[1]' is not assignable to type 'boolean[]'. + Type '1' is not assignable to type 'boolean'. +tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(63,7): error TS2741: Property '0' is missing in type 'readonly number[]' but required in type 'readonly [1]'. +tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(66,7): error TS4104: The type 'readonly number[]' is 'readonly' and cannot be assigned to the mutable type '[1]'. +tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(69,7): error TS2741: Property '0' is missing in type 'number[]' but required in type 'readonly [1]'. +tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(72,7): error TS2741: Property '0' is missing in type 'number[]' but required in type '[1]'. -==== tests/cases/compiler/readonlyTupleAndArrayElaboration.ts (6 errors) ==== +==== tests/cases/compiler/readonlyTupleAndArrayElaboration.ts (22 errors) ==== // @strict // #Repro from #30839 @@ -55,4 +83,96 @@ tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(24,9): error TS2345: Ar ~ !!! error TS2345: Argument of type 'readonly number[]' is not assignable to parameter of type 'number[]'. !!! error TS2345: The type 'readonly number[]' is 'readonly' and cannot be assigned to the mutable type 'number[]'. + + const t1: readonly [1] = [1]; + const t2: readonly [] = t1; + ~~ +!!! error TS2322: Type 'readonly [1]' is not assignable to type 'readonly []'. +!!! error TS2322: Types of property 'length' are incompatible. +!!! error TS2322: Type '1' is not assignable to type '0'. + + const t3: readonly [1] = [1]; + const t4: [] = t3; + ~~ +!!! error TS4104: The type 'readonly [1]' is 'readonly' and cannot be assigned to the mutable type '[]'. + + const t5: [1] = [1]; + const t6: readonly [] = t5; + ~~ +!!! error TS2322: Type '[1]' is not assignable to type 'readonly []'. +!!! error TS2322: Types of property 'length' are incompatible. +!!! error TS2322: Type '1' is not assignable to type '0'. + + const t7: [1] = [1]; + const t8: [] = t7; + ~~ +!!! error TS2322: Type '[1]' is not assignable to type '[]'. +!!! error TS2322: Types of property 'length' are incompatible. +!!! error TS2322: Type '1' is not assignable to type '0'. + + const a1: readonly number[] = [1]; + const a2: readonly boolean[] = a1; + ~~ +!!! error TS2322: Type 'readonly number[]' is not assignable to type 'readonly boolean[]'. +!!! error TS2322: Type 'number' is not assignable to type 'boolean'. + + const a3: readonly number[] = [1]; + const a4: boolean[] = a3; + ~~ +!!! error TS4104: The type 'readonly number[]' is 'readonly' and cannot be assigned to the mutable type 'boolean[]'. + + const a5: number[] = [1]; + const a6: readonly boolean [] = a5; + ~~ +!!! error TS2322: Type 'number[]' is not assignable to type 'readonly boolean[]'. +!!! error TS2322: Type 'number' is not assignable to type 'boolean'. + + const a7: number[] = [1]; + const a8: boolean[] = a7; + ~~ +!!! error TS2322: Type 'number[]' is not assignable to type 'boolean[]'. +!!! error TS2322: Type 'number' is not assignable to type 'boolean'. + + const ta1: readonly [1] = [1]; + const ta2: readonly boolean[] = ta1; + ~~~ +!!! error TS2322: Type 'readonly [1]' is not assignable to type 'readonly boolean[]'. +!!! error TS2322: Type '1' is not assignable to type 'boolean'. + + const ta3: readonly [1] = [1]; + const ta4: number[] = ta3; + ~~~ +!!! error TS4104: The type 'readonly [1]' is 'readonly' and cannot be assigned to the mutable type 'number[]'. + + const ta5: [1] = [1]; + const ta6: readonly boolean[] = ta5; + ~~~ +!!! error TS2322: Type '[1]' is not assignable to type 'readonly boolean[]'. +!!! error TS2322: Type '1' is not assignable to type 'boolean'. + + const ta7: [1] = [1]; + const ta8: boolean[] = ta7; + ~~~ +!!! error TS2322: Type '[1]' is not assignable to type 'boolean[]'. +!!! error TS2322: Type '1' is not assignable to type 'boolean'. + + const at1: readonly number[] = [1]; + const at2: readonly [1] = at1; + ~~~ +!!! error TS2741: Property '0' is missing in type 'readonly number[]' but required in type 'readonly [1]'. + + const at3: readonly number[] = [1]; + const at4: [1] = at3; + ~~~ +!!! error TS4104: The type 'readonly number[]' is 'readonly' and cannot be assigned to the mutable type '[1]'. + + const at5: number[] = [1]; + const at6: readonly [1] = at5; + ~~~ +!!! error TS2741: Property '0' is missing in type 'number[]' but required in type 'readonly [1]'. + + const at7: number[] = [1]; + const at8: [1] = at7; + ~~~ +!!! error TS2741: Property '0' is missing in type 'number[]' but required in type '[1]'. \ No newline at end of file diff --git a/tests/baselines/reference/readonlyTupleAndArrayElaboration.js b/tests/baselines/reference/readonlyTupleAndArrayElaboration.js index 7687dc176fd..9c4a552df4c 100644 --- a/tests/baselines/reference/readonlyTupleAndArrayElaboration.js +++ b/tests/baselines/reference/readonlyTupleAndArrayElaboration.js @@ -23,6 +23,54 @@ declare const c: ReadonlyArray; arryFn2(a); arryFn2(b); arryFn2(c); + +const t1: readonly [1] = [1]; +const t2: readonly [] = t1; + +const t3: readonly [1] = [1]; +const t4: [] = t3; + +const t5: [1] = [1]; +const t6: readonly [] = t5; + +const t7: [1] = [1]; +const t8: [] = t7; + +const a1: readonly number[] = [1]; +const a2: readonly boolean[] = a1; + +const a3: readonly number[] = [1]; +const a4: boolean[] = a3; + +const a5: number[] = [1]; +const a6: readonly boolean [] = a5; + +const a7: number[] = [1]; +const a8: boolean[] = a7; + +const ta1: readonly [1] = [1]; +const ta2: readonly boolean[] = ta1; + +const ta3: readonly [1] = [1]; +const ta4: number[] = ta3; + +const ta5: [1] = [1]; +const ta6: readonly boolean[] = ta5; + +const ta7: [1] = [1]; +const ta8: boolean[] = ta7; + +const at1: readonly number[] = [1]; +const at2: readonly [1] = at1; + +const at3: readonly number[] = [1]; +const at4: [1] = at3; + +const at5: number[] = [1]; +const at6: readonly [1] = at5; + +const at7: number[] = [1]; +const at8: [1] = at7; //// [readonlyTupleAndArrayElaboration.js] @@ -39,3 +87,35 @@ arryFn2(point); arryFn2(a); arryFn2(b); arryFn2(c); +var t1 = [1]; +var t2 = t1; +var t3 = [1]; +var t4 = t3; +var t5 = [1]; +var t6 = t5; +var t7 = [1]; +var t8 = t7; +var a1 = [1]; +var a2 = a1; +var a3 = [1]; +var a4 = a3; +var a5 = [1]; +var a6 = a5; +var a7 = [1]; +var a8 = a7; +var ta1 = [1]; +var ta2 = ta1; +var ta3 = [1]; +var ta4 = ta3; +var ta5 = [1]; +var ta6 = ta5; +var ta7 = [1]; +var ta8 = ta7; +var at1 = [1]; +var at2 = at1; +var at3 = [1]; +var at4 = at3; +var at5 = [1]; +var at6 = at5; +var at7 = [1]; +var at8 = at7; diff --git a/tests/baselines/reference/readonlyTupleAndArrayElaboration.symbols b/tests/baselines/reference/readonlyTupleAndArrayElaboration.symbols index bbda544f3c7..bc9544a884a 100644 --- a/tests/baselines/reference/readonlyTupleAndArrayElaboration.symbols +++ b/tests/baselines/reference/readonlyTupleAndArrayElaboration.symbols @@ -62,3 +62,115 @@ arryFn2(c); >arryFn2 : Symbol(arryFn2, Decl(readonlyTupleAndArrayElaboration.ts, 12, 14)) >c : Symbol(c, Decl(readonlyTupleAndArrayElaboration.ts, 19, 13)) +const t1: readonly [1] = [1]; +>t1 : Symbol(t1, Decl(readonlyTupleAndArrayElaboration.ts, 25, 5)) + +const t2: readonly [] = t1; +>t2 : Symbol(t2, Decl(readonlyTupleAndArrayElaboration.ts, 26, 5)) +>t1 : Symbol(t1, Decl(readonlyTupleAndArrayElaboration.ts, 25, 5)) + +const t3: readonly [1] = [1]; +>t3 : Symbol(t3, Decl(readonlyTupleAndArrayElaboration.ts, 28, 5)) + +const t4: [] = t3; +>t4 : Symbol(t4, Decl(readonlyTupleAndArrayElaboration.ts, 29, 5)) +>t3 : Symbol(t3, Decl(readonlyTupleAndArrayElaboration.ts, 28, 5)) + +const t5: [1] = [1]; +>t5 : Symbol(t5, Decl(readonlyTupleAndArrayElaboration.ts, 31, 5)) + +const t6: readonly [] = t5; +>t6 : Symbol(t6, Decl(readonlyTupleAndArrayElaboration.ts, 32, 5)) +>t5 : Symbol(t5, Decl(readonlyTupleAndArrayElaboration.ts, 31, 5)) + +const t7: [1] = [1]; +>t7 : Symbol(t7, Decl(readonlyTupleAndArrayElaboration.ts, 34, 5)) + +const t8: [] = t7; +>t8 : Symbol(t8, Decl(readonlyTupleAndArrayElaboration.ts, 35, 5)) +>t7 : Symbol(t7, Decl(readonlyTupleAndArrayElaboration.ts, 34, 5)) + +const a1: readonly number[] = [1]; +>a1 : Symbol(a1, Decl(readonlyTupleAndArrayElaboration.ts, 37, 5)) + +const a2: readonly boolean[] = a1; +>a2 : Symbol(a2, Decl(readonlyTupleAndArrayElaboration.ts, 38, 5)) +>a1 : Symbol(a1, Decl(readonlyTupleAndArrayElaboration.ts, 37, 5)) + +const a3: readonly number[] = [1]; +>a3 : Symbol(a3, Decl(readonlyTupleAndArrayElaboration.ts, 40, 5)) + +const a4: boolean[] = a3; +>a4 : Symbol(a4, Decl(readonlyTupleAndArrayElaboration.ts, 41, 5)) +>a3 : Symbol(a3, Decl(readonlyTupleAndArrayElaboration.ts, 40, 5)) + +const a5: number[] = [1]; +>a5 : Symbol(a5, Decl(readonlyTupleAndArrayElaboration.ts, 43, 5)) + +const a6: readonly boolean [] = a5; +>a6 : Symbol(a6, Decl(readonlyTupleAndArrayElaboration.ts, 44, 5)) +>a5 : Symbol(a5, Decl(readonlyTupleAndArrayElaboration.ts, 43, 5)) + +const a7: number[] = [1]; +>a7 : Symbol(a7, Decl(readonlyTupleAndArrayElaboration.ts, 46, 5)) + +const a8: boolean[] = a7; +>a8 : Symbol(a8, Decl(readonlyTupleAndArrayElaboration.ts, 47, 5)) +>a7 : Symbol(a7, Decl(readonlyTupleAndArrayElaboration.ts, 46, 5)) + +const ta1: readonly [1] = [1]; +>ta1 : Symbol(ta1, Decl(readonlyTupleAndArrayElaboration.ts, 49, 5)) + +const ta2: readonly boolean[] = ta1; +>ta2 : Symbol(ta2, Decl(readonlyTupleAndArrayElaboration.ts, 50, 5)) +>ta1 : Symbol(ta1, Decl(readonlyTupleAndArrayElaboration.ts, 49, 5)) + +const ta3: readonly [1] = [1]; +>ta3 : Symbol(ta3, Decl(readonlyTupleAndArrayElaboration.ts, 52, 5)) + +const ta4: number[] = ta3; +>ta4 : Symbol(ta4, Decl(readonlyTupleAndArrayElaboration.ts, 53, 5)) +>ta3 : Symbol(ta3, Decl(readonlyTupleAndArrayElaboration.ts, 52, 5)) + +const ta5: [1] = [1]; +>ta5 : Symbol(ta5, Decl(readonlyTupleAndArrayElaboration.ts, 55, 5)) + +const ta6: readonly boolean[] = ta5; +>ta6 : Symbol(ta6, Decl(readonlyTupleAndArrayElaboration.ts, 56, 5)) +>ta5 : Symbol(ta5, Decl(readonlyTupleAndArrayElaboration.ts, 55, 5)) + +const ta7: [1] = [1]; +>ta7 : Symbol(ta7, Decl(readonlyTupleAndArrayElaboration.ts, 58, 5)) + +const ta8: boolean[] = ta7; +>ta8 : Symbol(ta8, Decl(readonlyTupleAndArrayElaboration.ts, 59, 5)) +>ta7 : Symbol(ta7, Decl(readonlyTupleAndArrayElaboration.ts, 58, 5)) + +const at1: readonly number[] = [1]; +>at1 : Symbol(at1, Decl(readonlyTupleAndArrayElaboration.ts, 61, 5)) + +const at2: readonly [1] = at1; +>at2 : Symbol(at2, Decl(readonlyTupleAndArrayElaboration.ts, 62, 5)) +>at1 : Symbol(at1, Decl(readonlyTupleAndArrayElaboration.ts, 61, 5)) + +const at3: readonly number[] = [1]; +>at3 : Symbol(at3, Decl(readonlyTupleAndArrayElaboration.ts, 64, 5)) + +const at4: [1] = at3; +>at4 : Symbol(at4, Decl(readonlyTupleAndArrayElaboration.ts, 65, 5)) +>at3 : Symbol(at3, Decl(readonlyTupleAndArrayElaboration.ts, 64, 5)) + +const at5: number[] = [1]; +>at5 : Symbol(at5, Decl(readonlyTupleAndArrayElaboration.ts, 67, 5)) + +const at6: readonly [1] = at5; +>at6 : Symbol(at6, Decl(readonlyTupleAndArrayElaboration.ts, 68, 5)) +>at5 : Symbol(at5, Decl(readonlyTupleAndArrayElaboration.ts, 67, 5)) + +const at7: number[] = [1]; +>at7 : Symbol(at7, Decl(readonlyTupleAndArrayElaboration.ts, 70, 5)) + +const at8: [1] = at7; +>at8 : Symbol(at8, Decl(readonlyTupleAndArrayElaboration.ts, 71, 5)) +>at7 : Symbol(at7, Decl(readonlyTupleAndArrayElaboration.ts, 70, 5)) + diff --git a/tests/baselines/reference/readonlyTupleAndArrayElaboration.types b/tests/baselines/reference/readonlyTupleAndArrayElaboration.types index 8634cbc7229..375621cfa3f 100644 --- a/tests/baselines/reference/readonlyTupleAndArrayElaboration.types +++ b/tests/baselines/reference/readonlyTupleAndArrayElaboration.types @@ -75,3 +75,147 @@ arryFn2(c); >arryFn2 : (x: number[]) => void >c : readonly number[] +const t1: readonly [1] = [1]; +>t1 : readonly [1] +>[1] : [1] +>1 : 1 + +const t2: readonly [] = t1; +>t2 : readonly [] +>t1 : readonly [1] + +const t3: readonly [1] = [1]; +>t3 : readonly [1] +>[1] : [1] +>1 : 1 + +const t4: [] = t3; +>t4 : [] +>t3 : readonly [1] + +const t5: [1] = [1]; +>t5 : [1] +>[1] : [1] +>1 : 1 + +const t6: readonly [] = t5; +>t6 : readonly [] +>t5 : [1] + +const t7: [1] = [1]; +>t7 : [1] +>[1] : [1] +>1 : 1 + +const t8: [] = t7; +>t8 : [] +>t7 : [1] + +const a1: readonly number[] = [1]; +>a1 : readonly number[] +>[1] : number[] +>1 : 1 + +const a2: readonly boolean[] = a1; +>a2 : readonly boolean[] +>a1 : readonly number[] + +const a3: readonly number[] = [1]; +>a3 : readonly number[] +>[1] : number[] +>1 : 1 + +const a4: boolean[] = a3; +>a4 : boolean[] +>a3 : readonly number[] + +const a5: number[] = [1]; +>a5 : number[] +>[1] : number[] +>1 : 1 + +const a6: readonly boolean [] = a5; +>a6 : readonly boolean[] +>a5 : number[] + +const a7: number[] = [1]; +>a7 : number[] +>[1] : number[] +>1 : 1 + +const a8: boolean[] = a7; +>a8 : boolean[] +>a7 : number[] + +const ta1: readonly [1] = [1]; +>ta1 : readonly [1] +>[1] : [1] +>1 : 1 + +const ta2: readonly boolean[] = ta1; +>ta2 : readonly boolean[] +>ta1 : readonly [1] + +const ta3: readonly [1] = [1]; +>ta3 : readonly [1] +>[1] : [1] +>1 : 1 + +const ta4: number[] = ta3; +>ta4 : number[] +>ta3 : readonly [1] + +const ta5: [1] = [1]; +>ta5 : [1] +>[1] : [1] +>1 : 1 + +const ta6: readonly boolean[] = ta5; +>ta6 : readonly boolean[] +>ta5 : [1] + +const ta7: [1] = [1]; +>ta7 : [1] +>[1] : [1] +>1 : 1 + +const ta8: boolean[] = ta7; +>ta8 : boolean[] +>ta7 : [1] + +const at1: readonly number[] = [1]; +>at1 : readonly number[] +>[1] : number[] +>1 : 1 + +const at2: readonly [1] = at1; +>at2 : readonly [1] +>at1 : readonly number[] + +const at3: readonly number[] = [1]; +>at3 : readonly number[] +>[1] : number[] +>1 : 1 + +const at4: [1] = at3; +>at4 : [1] +>at3 : readonly number[] + +const at5: number[] = [1]; +>at5 : number[] +>[1] : number[] +>1 : 1 + +const at6: readonly [1] = at5; +>at6 : readonly [1] +>at5 : number[] + +const at7: number[] = [1]; +>at7 : number[] +>[1] : number[] +>1 : 1 + +const at8: [1] = at7; +>at8 : [1] +>at7 : number[] + diff --git a/tests/cases/compiler/readonlyTupleAndArrayElaboration.ts b/tests/cases/compiler/readonlyTupleAndArrayElaboration.ts index 9f52d8832ae..11e3290e3d1 100644 --- a/tests/cases/compiler/readonlyTupleAndArrayElaboration.ts +++ b/tests/cases/compiler/readonlyTupleAndArrayElaboration.ts @@ -22,3 +22,51 @@ declare const c: ReadonlyArray; arryFn2(a); arryFn2(b); arryFn2(c); + +const t1: readonly [1] = [1]; +const t2: readonly [] = t1; + +const t3: readonly [1] = [1]; +const t4: [] = t3; + +const t5: [1] = [1]; +const t6: readonly [] = t5; + +const t7: [1] = [1]; +const t8: [] = t7; + +const a1: readonly number[] = [1]; +const a2: readonly boolean[] = a1; + +const a3: readonly number[] = [1]; +const a4: boolean[] = a3; + +const a5: number[] = [1]; +const a6: readonly boolean [] = a5; + +const a7: number[] = [1]; +const a8: boolean[] = a7; + +const ta1: readonly [1] = [1]; +const ta2: readonly boolean[] = ta1; + +const ta3: readonly [1] = [1]; +const ta4: number[] = ta3; + +const ta5: [1] = [1]; +const ta6: readonly boolean[] = ta5; + +const ta7: [1] = [1]; +const ta8: boolean[] = ta7; + +const at1: readonly number[] = [1]; +const at2: readonly [1] = at1; + +const at3: readonly number[] = [1]; +const at4: [1] = at3; + +const at5: number[] = [1]; +const at6: readonly [1] = at5; + +const at7: number[] = [1]; +const at8: [1] = at7; From 48fa3a5f18a7090a7b3fb8836159fee7e48a8013 Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Fri, 15 Nov 2019 10:31:30 -0800 Subject: [PATCH 17/50] Update LKG (#35128) --- lib/cs/diagnosticMessages.generated.json | 2 +- lib/de/diagnosticMessages.generated.json | 2 +- lib/es/diagnosticMessages.generated.json | 4 +- lib/fr/diagnosticMessages.generated.json | 6 +- lib/ja/diagnosticMessages.generated.json | 30 +- lib/lib.dom.d.ts | 4 +- lib/lib.es5.d.ts | 16 +- lib/lib.webworker.d.ts | 4 +- lib/pl/diagnosticMessages.generated.json | 8 +- lib/protocol.d.ts | 12 +- lib/ru/diagnosticMessages.generated.json | 30 +- lib/tr/diagnosticMessages.generated.json | 2 +- lib/tsc.js | 3360 +++++++++------- lib/tsserver.js | 3981 +++++++++++-------- lib/tsserverlibrary.d.ts | 35 +- lib/tsserverlibrary.js | 3940 ++++++++++-------- lib/typescript.d.ts | 13 +- lib/typescript.js | 3757 +++++++++-------- lib/typescriptServices.d.ts | 13 +- lib/typescriptServices.js | 3757 +++++++++-------- lib/typingsInstaller.js | 3551 +++++++++-------- lib/zh-cn/diagnosticMessages.generated.json | 4 +- 22 files changed, 12767 insertions(+), 9764 deletions(-) diff --git a/lib/cs/diagnosticMessages.generated.json b/lib/cs/diagnosticMessages.generated.json index 32a067f4fe8..fabd59da8cd 100644 --- a/lib/cs/diagnosticMessages.generated.json +++ b/lib/cs/diagnosticMessages.generated.json @@ -441,7 +441,7 @@ "Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391": "Implementace funkce chybí nebo nenásleduje hned po deklaraci.", "Function_implementation_name_must_be_0_2389": "Název implementace funkce musí být {0}.", "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024": "Funkce implicitně obsahuje návratový typ any, protože neobsahuje anotaci návratového typu a odkazuje se na ni přímo nebo nepřímo v jednom z jejích návratových výrazů.", - "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "Ve funkci chybí koncový návratový příkaz a návratový typ neobsahuje undefined.", + "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "Ve funkci chybí koncový příkaz return a návratový typ neobsahuje undefined.", "Function_overload_must_be_static_2387": "Přetížení funkce musí být statické.", "Function_overload_must_not_be_static_2388": "Přetížení funkce nesmí být statické.", "Generate_get_and_set_accessors_95046": "Generovat přístupové objekty get a set", diff --git a/lib/de/diagnosticMessages.generated.json b/lib/de/diagnosticMessages.generated.json index f7bf53b6755..d010e950339 100644 --- a/lib/de/diagnosticMessages.generated.json +++ b/lib/de/diagnosticMessages.generated.json @@ -1032,7 +1032,7 @@ "await_expression_is_only_allowed_within_an_async_function_1308": "Der Ausdruck \"await\" ist nur in einer asynchronen Funktion zulässig.", "await_expressions_cannot_be_used_in_a_parameter_initializer_2524": "await-Ausdrücke dürfen nicht in einem Parameterinitialisierer verwendet werden.", "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106": "Die Option \"baseUrl\" ist auf \"{0}\" festgelegt. Dieser Wert wird verwendet, um den nicht relativen Modulnamen \"{1}\" aufzulösen.", - "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312": "\"=\" kann nur in einer Objektliteraleigenschaft innerhalb eines Destrukturierungsauftrags verwendet werden.", + "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312": "\"=\" kann nur in einer Objektliteraleigenschaft innerhalb eines Destrukturierungszuweisung verwendet werden.", "case_or_default_expected_1130": "\"case\" oder \"default\" wurde erwartet.", "class_expressions_are_not_currently_supported_9003": "class-Ausdrücke werden zurzeit nicht unterstützt.", "const_declarations_can_only_be_declared_inside_a_block_1156": "const-Deklarationen können nur innerhalb eines Blocks deklariert werden.", diff --git a/lib/es/diagnosticMessages.generated.json b/lib/es/diagnosticMessages.generated.json index 52840b1208e..c0ce6ef5b8d 100644 --- a/lib/es/diagnosticMessages.generated.json +++ b/lib/es/diagnosticMessages.generated.json @@ -441,7 +441,7 @@ "Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391": "Falta la implementación de función o no sigue inmediatamente a la declaración.", "Function_implementation_name_must_be_0_2389": "El nombre de la implementación de función debe ser '{0}'.", "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024": "La función tiene el tipo de valor devuelto \"any\" implícitamente porque no tiene una anotación de tipo de valor devuelto y se hace referencia a ella directa o indirectamente en una de sus expresiones return.", - "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "Falta la instrucción return final en la función y el tipo de valor devuelto no incluye 'undefined'.", + "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "Falta la instrucción \"return\" final en la función y el tipo de valor devuelto no incluye 'undefined'.", "Function_overload_must_be_static_2387": "La sobrecarga de función debe ser estática.", "Function_overload_must_not_be_static_2388": "La sobrecarga de función no debe ser estática.", "Generate_get_and_set_accessors_95046": "Generar los descriptores de acceso \"get\" y \"set\"", @@ -453,7 +453,7 @@ "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220": "Los generadores solo están disponibles cuando el destino es ECMAScript 2015 o una versión posterior.", "Generic_type_0_requires_1_type_argument_s_2314": "El tipo genérico '{0}' requiere los siguientes argumentos de tipo: {1}.", "Generic_type_0_requires_between_1_and_2_type_arguments_2707": "El tipo genérico \"{0}\" requiere entre {1} y {2} argumentos de tipo.", - "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550": "La creación de instancias de tipo genérico es excesivamente profunda y posiblemente infinita.", + "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550": "La creación de una instancia de tipo genérico es excesivamente profunda y posiblemente infinita.", "Getter_and_setter_accessors_do_not_agree_in_visibility_2379": "Los descriptores de acceso de captador y establecedor no se corresponden respecto a la visibilidad.", "Global_module_exports_may_only_appear_at_top_level_1316": "Las exportaciones de módulos globales solo pueden aparecer en el nivel superior.", "Global_module_exports_may_only_appear_in_declaration_files_1315": "Las exportaciones de módulos globales solo pueden aparecer en archivos de declaración.", diff --git a/lib/fr/diagnosticMessages.generated.json b/lib/fr/diagnosticMessages.generated.json index 1699b44df8b..7a84aae4982 100644 --- a/lib/fr/diagnosticMessages.generated.json +++ b/lib/fr/diagnosticMessages.generated.json @@ -142,7 +142,7 @@ "An_async_iterator_must_have_a_next_method_2519": "Un itérateur asynchrone doit comporter une méthode 'next()'.", "An_element_access_expression_should_take_an_argument_1011": "Une expression d'accès à un élément doit accepter un argument.", "An_enum_member_cannot_have_a_numeric_name_2452": "Un membre enum ne peut pas avoir un nom numérique.", - "An_export_assignment_can_only_be_used_in_a_module_1231": "Une attribution d'exportation peut uniquement être utilisée dans un module.", + "An_export_assignment_can_only_be_used_in_a_module_1231": "Une affectation d'exportation peut uniquement être utilisée dans un module.", "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309": "Impossible d'utiliser une assignation d'exportation dans un module comportant d'autres éléments exportés.", "An_export_assignment_cannot_be_used_in_a_namespace_1063": "Une affectation d'exportation ne peut pas être utilisée dans un espace de noms.", "An_export_assignment_cannot_have_modifiers_1120": "Une assignation d'exportation ne peut pas avoir de modificateurs.", @@ -594,7 +594,7 @@ "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003": "Aucune entrée dans le fichier config '{0}'. Les chemins 'include' spécifiés étaient '{1}' et les chemins 'exclude' étaient '{2}'.", "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515": "La classe non abstraite '{0}' n'implémente pas le membre abstrait '{1}' hérité de la classe '{2}'.", "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653": "L'expression de classe non abstraite '{0}' n'implémente pas le membre abstrait hérité '{0}' de la classe '{1}'.", - "Not_all_code_paths_return_a_value_7030": "Les chemins de code ne retournent pas tous une valeur.", + "Not_all_code_paths_return_a_value_7030": "Les chemins du code ne retournent pas tous une valeur.", "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413": "Impossible d'assigner le type d'index numérique '{0}' au type d'index de chaîne '{1}'.", "Numeric_separators_are_not_allowed_here_6188": "Les séparateurs numériques ne sont pas autorisés ici.", "Object_is_of_type_unknown_2571": "L'objet est de type 'unknown'.", @@ -745,7 +745,7 @@ "Remove_unused_label_95053": "Supprimer l'étiquette inutilisée", "Remove_variable_statement_90010": "Supprimer l'instruction de variable", "Replace_import_with_0_95015": "Remplacez l'importation par '{0}'.", - "Report_error_when_not_all_code_paths_in_function_return_a_value_6075": "Signalez une erreur quand les chemins de code de la fonction ne retournent pas tous une valeur.", + "Report_error_when_not_all_code_paths_in_function_return_a_value_6075": "Signalez une erreur quand les chemins du code de la fonction ne retournent pas tous une valeur.", "Report_errors_for_fallthrough_cases_in_switch_statement_6076": "Signalez les erreurs pour les case avec fallthrough dans une instruction switch.", "Report_errors_in_js_files_8019": "Signalez les erreurs dans les fichiers .js.", "Report_errors_on_unused_locals_6134": "Signaler les erreurs sur les variables locales inutilisées.", diff --git a/lib/ja/diagnosticMessages.generated.json b/lib/ja/diagnosticMessages.generated.json index d3029982ca6..751357dbc01 100644 --- a/lib/ja/diagnosticMessages.generated.json +++ b/lib/ja/diagnosticMessages.generated.json @@ -130,7 +130,7 @@ "Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209": "'--isolatedModules' フラグが指定されている場合、アンビエント const 列挙型は使用できません。", "Ambient_module_declaration_cannot_specify_relative_module_name_2436": "アンビエント モジュール宣言では、相対モジュール名を指定できません。", "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435": "アンビエント モジュールを、他のモジュールまたは名前空間内の入れ子にすることはできません。", - "An_AMD_module_cannot_have_multiple_name_assignments_2458": "AMD モジュールに複数の名前を割り当てることはできません。", + "An_AMD_module_cannot_have_multiple_name_assignments_2458": "AMD モジュールに複数の名前を代入することはできません。", "An_abstract_accessor_cannot_have_an_implementation_1318": "抽象アクセサーに実装を含めることはできません。", "An_accessor_cannot_be_declared_in_an_ambient_context_1086": "環境コンテキストではアクセサーは宣言できません。", "An_accessor_cannot_have_type_parameters_1094": "アクセサーに型パラメーターを指定することはできません。", @@ -142,10 +142,10 @@ "An_async_iterator_must_have_a_next_method_2519": "非同期反復子には 'next()' メソッドが必要です。", "An_element_access_expression_should_take_an_argument_1011": "要素アクセス式では、引数を取る必要があります。", "An_enum_member_cannot_have_a_numeric_name_2452": "列挙型メンバーに数値名を含めることはできません。", - "An_export_assignment_can_only_be_used_in_a_module_1231": "エクスポートの割り当てはモジュールでのみ使用可能です。", - "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309": "エクスポートの割り当ては、エクスポートされた他の要素を含むモジュールでは使用できません。", - "An_export_assignment_cannot_be_used_in_a_namespace_1063": "エクスポートの割り当ては、名前空間では使用できません。", - "An_export_assignment_cannot_have_modifiers_1120": "エクスポートの割り当てに修飾子を指定することはできません。", + "An_export_assignment_can_only_be_used_in_a_module_1231": "エクスポートの代入はモジュールでのみ使用可能です。", + "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309": "エクスポートの代入は、エクスポートされた他の要素を含むモジュールでは使用できません。", + "An_export_assignment_cannot_be_used_in_a_namespace_1063": "エクスポートの代入は、名前空間では使用できません。", + "An_export_assignment_cannot_have_modifiers_1120": "エクスポートの代入に修飾子を指定することはできません。", "An_export_declaration_can_only_be_used_in_a_module_1233": "エクスポート宣言はモジュールでのみ使用可能です。", "An_export_declaration_cannot_have_modifiers_1193": "エクスポート宣言に修飾子を指定することはできません。", "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198": "拡張された Unicode エスケープ値は 0x0 と 0x10FFFF の間 (両端を含む) でなければなりません。", @@ -389,8 +389,8 @@ "Experimental_Options_6177": "試験的なオプション", "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219": "デコレーターの実験的なサポートは将来のリリースで変更になる可能性がある機能です。'experimentalDecorators' オプションを設定してこの警告を削除します。", "Explicitly_specified_module_resolution_kind_Colon_0_6087": "明示的に指定されたモジュール解決の種類 '{0}'。", - "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203": "ECMAScript モジュールを対象にする場合は、エクスポート割り当てを使用できません。代わりに 'export default' または別のモジュール書式の使用をご検討ください。", - "Export_assignment_is_not_supported_when_module_flag_is_system_1218": "割り当てのエクスポートは、'--module' フラグが 'system' の場合にはサポートされません。", + "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203": "ECMAScript モジュールを対象にする場合は、エクスポート代入を使用できません。代わりに 'export default' または別のモジュール書式の使用をご検討ください。", + "Export_assignment_is_not_supported_when_module_flag_is_system_1218": "代入のエクスポートは、'--module' フラグが 'system' の場合にはサポートされません。", "Export_declaration_conflicts_with_exported_declaration_of_0_2484": "エクスポート宣言が、'{0}' のエクスポートされた宣言と競合しています。", "Export_declarations_are_not_permitted_in_a_namespace_1194": "エクスポート宣言は名前空間でサポートされません。", "Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_2656": "エクスポートされた外部パッケージの型指定のファイル '{0}' はモジュールではありません。パッケージ定義を更新する場合は、パッケージの作成者にお問い合わせください。", @@ -399,7 +399,7 @@ "Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023": "エクスポートされた変数 '{0}' が外部モジュール {2} の名前 '{1}' を持っているか使用していますが、名前を指定することはできません。", "Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024": "エクスポートされた変数 '{0}' がプライベート モジュール '{2}' の名前 '{1}' を持っているか、使用しています。", "Exported_variable_0_has_or_is_using_private_name_1_4025": "エクスポートされた変数 '{0}' がプライベート名 '{1}' を持っているか、使用しています。", - "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666": "エクスポートとエクスポートの割り当てはモジュールの拡張では許可されていません。", + "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666": "エクスポートとエクスポートの代入はモジュールの拡張では許可されていません。", "Expression_expected_1109": "式が必要です。", "Expression_or_comma_expected_1137": "式またはコンマが必要です。", "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402": "式は、コンパイラが基底クラスの参照をキャプチャするために使用する '_super' に解決されます。", @@ -473,7 +473,7 @@ "Implement_interface_0_90006": "インターフェイス '{0}' を実装する", "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019": "エクスポートされたクラス '{0}' の Implements 句がプライベート名 '{1}' を持っているか、使用しています。", "Import_0_from_module_1_90013": "モジュール \"{1}\" から '{0}' をインポートする", - "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202": "ECMAScript モジュールを対象にする場合は、インポート割り当てを使用できません。代わりに 'import * as ns from \"mod\"'、'import {a} from \"mod\"'、'import d from \"mod\"' などのモジュール書式の使用をご検討ください。", + "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202": "ECMAScript モジュールを対象にする場合は、インポート代入を使用できません。代わりに 'import * as ns from \"mod\"'、'import {a} from \"mod\"'、'import d from \"mod\"' などのモジュール書式の使用をご検討ください。", "Import_declaration_0_is_using_private_name_1_4000": "インポート宣言 '{0}' がプライベート名 '{1}' を使用しています。", "Import_declaration_conflicts_with_local_declaration_of_0_2440": "インポート宣言が、'{0}' のローカル宣言と競合しています。", "Import_declarations_in_a_namespace_cannot_reference_a_module_1147": "名前空間内のインポート宣言は、モジュールを参照できません。", @@ -536,7 +536,7 @@ "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001": "JSX 要素に同じ名前の複数の属性を指定することはできません。", "JSX_expressions_must_have_one_parent_element_2657": "JSX 式には 1 つの親要素が必要です。", "JSX_fragment_has_no_corresponding_closing_tag_17014": "JSX フラグメントには対応する終了タグがありません。", - "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017": "JSX フラグメントはインライン JSX ファクトリ プラグマの使用時にサポートされていません", + "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017": "JSX フラグメントはインライン JSX ファクトリ pragma の使用時にサポートされていません", "JSX_fragment_is_not_supported_when_using_jsxFactory_17016": "--jsxFactory を使う場合、JSX フラグメントはサポートされません", "JSX_spread_child_must_be_an_array_type_2609": "JSX スプレッドの子は、配列型でなければなりません。", "Jump_target_cannot_cross_function_boundary_1107": "ジャンプ先は関数の境界を越えることはできません。", @@ -714,7 +714,7 @@ "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033": "エクスポートされたインターフェイスのプロパティ '{0}' が、プライベート名 '{1}' を持っているか、使用しています。", "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412": "型 '{1}' のプロパティ '{0}' を数値インデックス型 '{2}' に割り当てることはできません。", "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411": "型 '{1}' のプロパティ '{0}' を文字列インデックス型 '{2}' に割り当てることはできません。", - "Property_assignment_expected_1136": "プロパティの割り当てが必要です。", + "Property_assignment_expected_1136": "プロパティの代入が必要です。", "Property_destructuring_pattern_expected_1180": "プロパティの非構造化パターンが必要です。", "Property_or_signature_expected_1131": "プロパティまたはシグネチャが必要です。", "Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328": "プロパティ値には、文字列リテラル、数値リテラル、'true'、'false'、'null'、オブジェクト リテラルまたは配列リテラルのみ使用できます。", @@ -850,7 +850,7 @@ "The_character_set_of_the_input_files_6163": "入力ファイルの文字セット。", "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563": "含まれている関数またはモジュールの本体は、制御フロー解析には大きすぎます。", "The_current_host_does_not_support_the_0_option_5001": "現在のホストは '{0}' オプションをサポートしていません。", - "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714": "エクスポートの割り当ての式は、環境コンテキストの識別子または修飾名にする必要があります。", + "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714": "エクスポートの代入の式は、環境コンテキストの識別子または修飾名にする必要があります。", "The_files_list_in_config_file_0_is_empty_18002": "構成ファイル '{0}' の 'files' リストが空です。", "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060": "Promise では、'then' メソッドの最初のパラメーターはコールバックでなければなりません。", "The_global_type_JSX_0_may_not_have_more_than_one_property_2608": "グローバル型 'JSX.{0}' には複数のプロパティが含まれていない可能性があります。", @@ -882,7 +882,7 @@ "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359": "instanceof' 式の右辺には、'any' 型、または 'Function' インターフェイス型に割り当てることができる型を指定してください。", "The_specified_path_does_not_exist_Colon_0_5058": "指定されたパスがありません: '{0}'。", "The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541": "代入式のターゲットは、変数またはプロパティ アクセスである必要があります。", - "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701": "オブジェクトの残り部分の割り当ての対象は、変数またはプロパティ アクセスである必要があります。", + "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701": "オブジェクトの残り部分の代入の対象は、変数またはプロパティ アクセスである必要があります。", "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684": "型 '{0}' の 'this' コンテキストを型 '{1}' のメソッドの 'this' に割り当てることはできません。", "The_this_types_of_each_signature_are_incompatible_2685": "各シグネチャの 'this' 型に互換性がありません。", "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453": "型パラメーター '{0}' の型引数を使用法から推論することはできません。型引数を明示的に指定してください。", @@ -1032,14 +1032,14 @@ "await_expression_is_only_allowed_within_an_async_function_1308": "'await' 式は、非同期関数内でのみ使用できます。", "await_expressions_cannot_be_used_in_a_parameter_initializer_2524": "'await' 式は、パラメーター初期化子では使用できません。", "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106": "'baseUrl' オプションは '{0}' に設定され、この値を使用して非相対モジュール名 '{1}' を解決します。", - "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312": "'=' は、非構造化割り当て内のオブジェクト リテラル プロパティでのみ使用できます。", + "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312": "'=' は、非構造化代入内のオブジェクト リテラル プロパティでのみ使用できます。", "case_or_default_expected_1130": "'case' または 'default' が必要です。", "class_expressions_are_not_currently_supported_9003": "'class' 式は現在サポートされていません。", "const_declarations_can_only_be_declared_inside_a_block_1156": "'const' 宣言は、ブロック内でのみ宣言できます。", "const_declarations_must_be_initialized_1155": "'const' 宣言は初期化する必要があります。", "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477": "'const' 列挙型メンバーの初期化子が、無限値に評価されました。", "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478": "'const' 列挙型メンバーの初期化子が、許可されない値 'NaN' に評価されました。", - "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475": "'const' 列挙型は、プロパティまたはインデックスのアクセス式、インポート宣言またはエクスポートの割り当ての右辺、型のクエリにのみ使用できます。", + "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475": "'const' 列挙型は、プロパティまたはインデックスのアクセス式、インポート宣言またはエクスポートの代入の右辺、型のクエリにのみ使用できます。", "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102": "厳格モードでは 'delete' を識別子で呼び出すことはできません。", "delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360": "これを削除します - プロジェクト '{0}' は、以前にビルドされているため、最新の状態です", "enum_declarations_can_only_be_used_in_a_ts_file_8015": "'列挙型宣言' を使用できるのは .ts ファイル内のみです。", diff --git a/lib/lib.dom.d.ts b/lib/lib.dom.d.ts index da1ba2985dc..4217884bca4 100644 --- a/lib/lib.dom.d.ts +++ b/lib/lib.dom.d.ts @@ -9782,7 +9782,7 @@ interface ImageData { declare var ImageData: { prototype: ImageData; new(width: number, height: number): ImageData; - new(array: Uint8ClampedArray, width: number, height: number): ImageData; + new(array: Uint8ClampedArray, width: number, height?: number): ImageData; }; interface InnerHTML { @@ -19103,7 +19103,7 @@ declare namespace WebAssembly { var Instance: { prototype: Instance; - new(module: Module, importObject?: any): Instance; + new(module: Module, importObject?: Imports): Instance; }; interface LinkError { diff --git a/lib/lib.es5.d.ts b/lib/lib.es5.d.ts index 13bf9bb239e..a9b9f5b0aea 100644 --- a/lib/lib.es5.d.ts +++ b/lib/lib.es5.d.ts @@ -702,8 +702,8 @@ interface Math { /** Returns a pseudorandom number between 0 and 1. */ random(): number; /** - * Returns a supplied numeric expression rounded to the nearest number. - * @param x The value to be rounded to the nearest number. + * Returns a supplied numeric expression rounded to the nearest integer. + * @param x The value to be rounded to the nearest integer. */ round(x: number): number; /** @@ -893,12 +893,12 @@ interface DateConstructor { /** * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param month The month as an number between 0 and 11 (January to December). - * @param date The date as an number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. An number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. An number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. An number from 0 to 59 that specifies the seconds. - * @param ms An number from 0 to 999 that specifies the milliseconds. + * @param month The month as a number between 0 and 11 (January to December). + * @param date The date as a number between 1 and 31. + * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms A number from 0 to 999 that specifies the milliseconds. */ UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; diff --git a/lib/lib.webworker.d.ts b/lib/lib.webworker.d.ts index 57e9b28b531..efc1de2e994 100644 --- a/lib/lib.webworker.d.ts +++ b/lib/lib.webworker.d.ts @@ -2222,7 +2222,7 @@ interface ImageData { declare var ImageData: { prototype: ImageData; new(width: number, height: number): ImageData; - new(array: Uint8ClampedArray, width: number, height: number): ImageData; + new(array: Uint8ClampedArray, width: number, height?: number): ImageData; }; /** This Channel Messaging API interface allows us to create a new message channel and send data through it via its two MessagePort properties. */ @@ -5629,7 +5629,7 @@ declare namespace WebAssembly { var Instance: { prototype: Instance; - new(module: Module, importObject?: any): Instance; + new(module: Module, importObject?: Imports): Instance; }; interface Memory { diff --git a/lib/pl/diagnosticMessages.generated.json b/lib/pl/diagnosticMessages.generated.json index 9d219542c86..e625476e041 100644 --- a/lib/pl/diagnosticMessages.generated.json +++ b/lib/pl/diagnosticMessages.generated.json @@ -30,7 +30,7 @@ "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249": "Dekorator może dekorować jedynie implementację metody, a nie przeciążenie.", "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113": "Klauzula „default” nie może występować więcej niż raz w instrukcji „switch”.", "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319": "Eksport domyślny może być używany tylko w module w stylu języka ECMAScript.", - "A_definite_assignment_assertion_is_not_permitted_in_this_context_1255": "Asercja określonego przydziału „!” nie jest dozwolona w tym kontekście.", + "A_definite_assignment_assertion_is_not_permitted_in_this_context_1255": "Asercja określonego przypisania „!” nie jest dozwolona w tym kontekście.", "A_destructuring_declaration_must_have_an_initializer_1182": "Deklaracja usuwająca strukturę musi mieć inicjator.", "A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declarat_2712": "Wywołanie dynamicznego importowania w wersji ES5/ES3 wymaga konstruktora „Promise”. Upewnij się, że masz deklarację dla konstruktora „Promise”, lub uwzględnij wartość „ES2015” w opcji „--lib”.", "A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711": "Wywołanie dynamicznego importowania zwraca element „Promise”. Upewnij się, że masz deklarację elementu „Promise” lub uwzględnij wartość „ES2015” w opcji „--lib”.", @@ -441,7 +441,7 @@ "Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391": "Brak implementacji funkcji lub nie występuje ona bezpośrednio po deklaracji.", "Function_implementation_name_must_be_0_2389": "Implementacja funkcji musi mieć nazwę „{0}”.", "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024": "Dla funkcji niejawnie określono zwracany typ „any”, ponieważ nie zawiera ona adnotacji zwracanego typu i jest przywoływana bezpośrednio lub pośrednio w jednym z jej zwracanych wyrażeń.", - "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "Funkcja nie zawiera końcowej instrukcji „return”, a zwracany typ nie obejmuje wartości „undefined”.", + "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "Funkcja nie zawiera końcowej instrukcji return, a zwracany typ nie obejmuje wartości „undefined”.", "Function_overload_must_be_static_2387": "Przeciążenie funkcji musi być statyczne.", "Function_overload_must_not_be_static_2388": "Przeciążenie funkcji nie może być statyczne.", "Generate_get_and_set_accessors_95046": "Generuj metody dostępu „get” i „set”.", @@ -594,7 +594,7 @@ "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003": "Nie można znaleźć danych wejściowych w pliku konfiguracji „{0}”. Określone ścieżki „include” to „{1}”, a „exclude” to „{2}”.", "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515": "Klasa nieabstrakcyjna „{0}” nie implementuje odziedziczonej abstrakcyjnej składowej „{1}” z klasy „{2}”.", "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653": "Wyrażenie klasy nieabstrakcyjnej nie implementuje odziedziczonej abstrakcyjnej składowej „{0}” z klasy „{1}”.", - "Not_all_code_paths_return_a_value_7030": "Nie wszystkie ścieżki kodu zwracają wartość.", + "Not_all_code_paths_return_a_value_7030": "Nie wszystkie ścieżki w kodzie zwracają wartość.", "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413": "Nie można przypisać typu indeksu numerycznego „{0}” do typu indeksu ciągu „{1}”.", "Numeric_separators_are_not_allowed_here_6188": "Separatory liczbowe nie są dozwolone w tym miejscu.", "Object_is_of_type_unknown_2571": "Obiekt jest typu „nieznany”.", @@ -745,7 +745,7 @@ "Remove_unused_label_95053": "Usuń nieużywaną etykietę", "Remove_variable_statement_90010": "Usuń instrukcję zmiennej", "Replace_import_with_0_95015": "Zamień import na element „{0}”.", - "Report_error_when_not_all_code_paths_in_function_return_a_value_6075": "Zgłoś błąd, gdy nie wszystkie ścieżki kodu zwracają wartość.", + "Report_error_when_not_all_code_paths_in_function_return_a_value_6075": "Zgłoś błąd, gdy nie wszystkie ścieżki w kodzie zwracają wartość.", "Report_errors_for_fallthrough_cases_in_switch_statement_6076": "Zgłoś błędy dla przepuszczających klauzul case w instrukcji switch.", "Report_errors_in_js_files_8019": "Zgłaszaj błędy w plikach js.", "Report_errors_on_unused_locals_6134": "Raportuj błędy dla nieużywanych elementów lokalnych.", diff --git a/lib/protocol.d.ts b/lib/protocol.d.ts index def3c67bdf0..cf95f63f5ce 100644 --- a/lib/protocol.d.ts +++ b/lib/protocol.d.ts @@ -652,9 +652,11 @@ declare namespace ts.server.protocol { interface DefinitionResponse extends Response { body?: FileSpanWithContext[]; } - interface DefinitionInfoAndBoundSpanReponse extends Response { + interface DefinitionInfoAndBoundSpanResponse extends Response { body?: DefinitionInfoAndBoundSpan; } + /** @deprecated Use `DefinitionInfoAndBoundSpanResponse` instead. */ + type DefinitionInfoAndBoundSpanReponse = DefinitionInfoAndBoundSpanResponse; /** * Definition response message. Gives text range for definition. */ @@ -2317,7 +2319,13 @@ declare namespace ts.server.protocol { * For those entries, The `insertText` and `replacementSpan` properties will be set to change from `.x` property access to `["x"]`. */ readonly includeCompletionsWithInsertText?: boolean; - readonly importModuleSpecifierPreference?: "relative" | "non-relative"; + /** + * Unless this option is `false`, or `includeCompletionsWithInsertText` is not enabled, + * member completion lists triggered with `.` will include entries on potentially-null and potentially-undefined + * values, with insertion text to replace preceding `.` tokens with `?.`. + */ + readonly includeAutomaticOptionalChainCompletions?: boolean; + readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative"; readonly allowTextChangesInNewFiles?: boolean; readonly lazyConfiguredProjectsFromExternalProject?: boolean; readonly providePrefixAndSuffixTextForRename?: boolean; diff --git a/lib/ru/diagnosticMessages.generated.json b/lib/ru/diagnosticMessages.generated.json index 468fd47b888..f66fa953ac1 100644 --- a/lib/ru/diagnosticMessages.generated.json +++ b/lib/ru/diagnosticMessages.generated.json @@ -30,7 +30,7 @@ "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249": "Декоратор может только декорировать реализацию метода, а не перегрузку.", "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113": "Предложение default не может повторяться в операторе switch.", "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319": "Экспорт по умолчанию можно использовать только в модуле в стиле ECMAScript.", - "A_definite_assignment_assertion_is_not_permitted_in_this_context_1255": "Утверждение определенного присваивания \"!\" запрещено в этом контексте.", + "A_definite_assignment_assertion_is_not_permitted_in_this_context_1255": "Утверждение определенного назначения \"!\" запрещено в этом контексте.", "A_destructuring_declaration_must_have_an_initializer_1182": "Объявление деструктурирования должно включать инициализатор.", "A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declarat_2712": "Для вызова динамического импорта в ES5/ES3 требуется конструктор \"Promise\". Объявите конструктор \"Promise\" или включите \"ES2015\" в параметр \"--lib\".", "A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711": "Вызов динамического импорта возвращает конструктор \"Promise\". Объявите конструктор \"Promise\" или включите \"ES2015\" в параметр \"--lib\".", @@ -103,8 +103,8 @@ "Add_all_missing_super_calls_95039": "Добавить все отсутствующие вызовы super", "Add_async_modifier_to_containing_function_90029": "Добавьте модификатор async в содержащую функцию", "Add_braces_to_arrow_function_95059": "Добавить скобки в стрелочную функцию", - "Add_definite_assignment_assertion_to_property_0_95020": "Добавить утверждение определенного присваивания к свойству \"{0}\"", - "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028": "Добавить утверждения определенного присваивания ко всем неинициализированным свойствам", + "Add_definite_assignment_assertion_to_property_0_95020": "Добавить утверждение определенного назначения к свойству \"{0}\"", + "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028": "Добавить утверждения определенного назначения ко всем неинициализированным свойствам", "Add_index_signature_for_property_0_90017": "Добавьте сигнатуру индекса для свойства \"{0}\"", "Add_initializer_to_property_0_95019": "Добавить инициализатор к свойству \"{0}\"", "Add_initializers_to_all_uninitialized_properties_95027": "Добавить инициализаторы ко всем неинициализированным свойствам", @@ -130,7 +130,7 @@ "Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209": "Перечисление внешних констант не разрешено, если задан флаг \"--isolatedModules\".", "Ambient_module_declaration_cannot_specify_relative_module_name_2436": "Объявление окружающего модуля не может содержать относительное имя модуля.", "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435": "Внешний модуль не может быть вложен в другие модули или пространства имен.", - "An_AMD_module_cannot_have_multiple_name_assignments_2458": "Модуль AMD не может иметь несколько присваиваний имен.", + "An_AMD_module_cannot_have_multiple_name_assignments_2458": "Модуль AMD не может иметь несколько назначений имен.", "An_abstract_accessor_cannot_have_an_implementation_1318": "У абстрактного метода доступа не может быть реализации.", "An_accessor_cannot_be_declared_in_an_ambient_context_1086": "Метод доступа нельзя объявить в окружающем контексте.", "An_accessor_cannot_have_type_parameters_1094": "Метод доступа не может иметь параметры типа.", @@ -142,10 +142,10 @@ "An_async_iterator_must_have_a_next_method_2519": "В асинхронном итераторе должен быть метод next().", "An_element_access_expression_should_take_an_argument_1011": "Выражение доступа к элементу должно принимать аргумент.", "An_enum_member_cannot_have_a_numeric_name_2452": "Имя элемента перечисления не может быть числовым.", - "An_export_assignment_can_only_be_used_in_a_module_1231": "Присваивание экспорта может быть использовано только в модуле.", - "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309": "Присваивание экспорта нельзя использовать в модуле с другими экспортированными элементами.", - "An_export_assignment_cannot_be_used_in_a_namespace_1063": "Присваивание экспорта нельзя использовать в пространстве имен.", - "An_export_assignment_cannot_have_modifiers_1120": "Присваивание экспорта не может иметь модификаторы.", + "An_export_assignment_can_only_be_used_in_a_module_1231": "Назначение экспорта может быть использовано только в модуле.", + "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309": "Назначение экспорта нельзя использовать в модуле с другими экспортированными элементами.", + "An_export_assignment_cannot_be_used_in_a_namespace_1063": "Назначение экспорта нельзя использовать в пространстве имен.", + "An_export_assignment_cannot_have_modifiers_1120": "Назначение экспорта не может иметь модификаторы.", "An_export_declaration_can_only_be_used_in_a_module_1233": "Объявление экспорта может быть использовано только в модуле.", "An_export_declaration_cannot_have_modifiers_1193": "Объявление экспорта не может иметь модификаторы.", "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198": "Расширенное escape-значение в Юникоде должно быть в пределах от 0x0 до 0x10FFFF включительно.", @@ -390,7 +390,7 @@ "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219": "Экспериментальная поддержка для декораторов — это функция, которая будет изменена в будущем выпуске. Задайте параметр experimentalDecorators, чтобы удалить это предупреждение.", "Explicitly_specified_module_resolution_kind_Colon_0_6087": "Явно указанный тип разрешения модуля: \"{0}\".", "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203": "Назначение экспорта невозможно использовать при разработке для модулей ECMAScript. Попробуйте использовать \"export default\" или другой формат модуля.", - "Export_assignment_is_not_supported_when_module_flag_is_system_1218": "Присваивание экспорта не поддерживается, если флаг \"--module\" имеет значение \"system\".", + "Export_assignment_is_not_supported_when_module_flag_is_system_1218": "Назначение экспорта не поддерживается, если флаг \"--module\" имеет значение \"system\".", "Export_declaration_conflicts_with_exported_declaration_of_0_2484": "Объявление экспорта конфликтует с экспортированным объявлением \"{0}\".", "Export_declarations_are_not_permitted_in_a_namespace_1194": "Объявления экспорта не разрешены в пространстве имен.", "Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_2656": "Файл экспортированных внешних типизаций пакета \"{0}\" не является модулем. Обратитесь к автору пакета для обновления определения пакета.", @@ -441,7 +441,7 @@ "Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391": "Реализация функции отсутствует либо не идет сразу после объявления.", "Function_implementation_name_must_be_0_2389": "Имя реализации функции должно иметь значение \"{0}\".", "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024": "Функция неявно имеет тип возвращаемого значения any, так как у нее нет заметки с типом возвращаемого значения, а также на нее прямо или косвенно указывает ссылка в одном из ее выражений \"return\".", - "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "В функции отсутствует завершающий оператор возвращаемого значения, а тип возвращаемого значения не включает undefined.", + "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "В функции отсутствует завершающий оператор return, а тип возвращаемого значения не включает \"undefined\".", "Function_overload_must_be_static_2387": "Перегрузка функции должна быть статической.", "Function_overload_must_not_be_static_2388": "Перегрузка функции не должна быть статической.", "Generate_get_and_set_accessors_95046": "Создать методы доступа get и set", @@ -594,7 +594,7 @@ "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003": "Не удалось найти входные данные в файле конфигурации \"{0}\". Указанные пути \"include\": \"{1}\", пути \"exclude\": \"{2}\".", "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515": "Класс \"{0}\", не являющийся абстрактным, не реализует наследуемый абстрактный элемент \"{1}\" класса \"{2}\".", "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653": "Выражение неабстрактного класса не реализует унаследованный абстрактный элемент \"{0}\" класса \"{1}\".", - "Not_all_code_paths_return_a_value_7030": "Не все пути кода возвращают значение.", + "Not_all_code_paths_return_a_value_7030": "Не все пути к коду возвращают значение.", "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413": "Тип числового индекса \"{0}\" нельзя назначить типу строкового индекса \"{1}\".", "Numeric_separators_are_not_allowed_here_6188": "Числовые разделители здесь запрещены.", "Object_is_of_type_unknown_2571": "Объект имеет тип \"Неизвестный\".", @@ -714,7 +714,7 @@ "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033": "Свойство \"{0}\" экспортированного интерфейса имеет или использует закрытое имя \"{1}\".", "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412": "Свойство \"{0}\" типа \"{1}\" нельзя назначить типу числового индекса \"{2}\".", "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411": "Свойство \"{0}\" типа \"{1}\" нельзя назначить типу строкового индекса \"{2}\".", - "Property_assignment_expected_1136": "Ожидалось присваивание свойства.", + "Property_assignment_expected_1136": "Ожидалось назначение свойства.", "Property_destructuring_pattern_expected_1180": "Ожидался шаблон деструктурирования свойства.", "Property_or_signature_expected_1131": "Ожидалось свойство или сигнатура.", "Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328": "Значение свойства может быть только строковым или числовым литералом, True, False, Null, объектным литералом либо литералом массива.", @@ -745,7 +745,7 @@ "Remove_unused_label_95053": "Удалить неиспользуемую метку", "Remove_variable_statement_90010": "Удалить оператор с переменной", "Replace_import_with_0_95015": "Замена импорта на \"{0}\".", - "Report_error_when_not_all_code_paths_in_function_return_a_value_6075": "Сообщать об ошибке, если не все пути кода в функции возвращают значение.", + "Report_error_when_not_all_code_paths_in_function_return_a_value_6075": "Сообщать об ошибке, если не все пути к коду в функции возвращают значение.", "Report_errors_for_fallthrough_cases_in_switch_statement_6076": "Сообщать об ошибках для случаев передачи управления в операторе switch.", "Report_errors_in_js_files_8019": "Сообщать об ошибках в JS-файлах.", "Report_errors_on_unused_locals_6134": "Сообщать об ошибках в неиспользованных локальных переменных.", @@ -850,7 +850,7 @@ "The_character_set_of_the_input_files_6163": "Кодировка входных файлов.", "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563": "Содержащая функция или текст модуля слишком велики для анализа потока управления.", "The_current_host_does_not_support_the_0_option_5001": "Текущий узел не поддерживает параметр \"{0}\".", - "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714": "Выражение присваивания экспорта должно представлять собой идентификатор или полное имя в окружающем контексте.", + "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714": "Выражение назначения экспорта должно представлять собой идентификатор или полное имя в окружающем контексте.", "The_files_list_in_config_file_0_is_empty_18002": "Список \"files\" в файле конфигурации \"{0}\" пуст.", "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060": "Первым параметром метода then класса promise должен быть обратный вызов.", "The_global_type_JSX_0_may_not_have_more_than_one_property_2608": "Глобальный тип \"JSX.{0}\" не может иметь больше одного свойства.", @@ -1039,7 +1039,7 @@ "const_declarations_must_be_initialized_1155": "Объявления \"const\" должны быть инициализированы.", "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477": "Инициализатор элементов перечисления const был вычислен в неконечное значение.", "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478": "Инициализатор элементов перечисления const был вычислен в запрещенное значение NaN.", - "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475": "Перечисления const можно использовать только в выражениях доступа к свойству или индексу, а также в правой части объявления импорта, присваивания экспорта или запроса типа.", + "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475": "Перечисления const можно использовать только в выражениях доступа к свойству или индексу, а также в правой части объявления импорта, назначения экспорта или запроса типа.", "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102": "Невозможно вызвать оператор delete с идентификатором в строгом режиме.", "delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360": "удалить это — проект \"{0}\" не требует обновления, так как был собран ранее", "enum_declarations_can_only_be_used_in_a_ts_file_8015": "Объявления перечислений можно использовать только в TS-файле.", diff --git a/lib/tr/diagnosticMessages.generated.json b/lib/tr/diagnosticMessages.generated.json index 892fc74d391..dc52ec079ef 100644 --- a/lib/tr/diagnosticMessages.generated.json +++ b/lib/tr/diagnosticMessages.generated.json @@ -453,7 +453,7 @@ "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220": "Oluşturucular yalnızca ECMEAScript 2015 veya üstü hedeflenirken kullanılabilir.", "Generic_type_0_requires_1_type_argument_s_2314": "'{0}' genel türü, {1} tür bağımsız değişkenini gerektiriyor.", "Generic_type_0_requires_between_1_and_2_type_arguments_2707": "'{0}' genel türü {1} ile {2} arasında bağımsız değişken gerektirir.", - "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550": "Genel tür oluşturma işlemi, fazla ayrıntılı ve büyük olasılıkla sınırsız.", + "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550": "Genel tür örneği oluşturma işlemi, fazla ayrıntılı ve büyük olasılıkla sınırsız.", "Getter_and_setter_accessors_do_not_agree_in_visibility_2379": "Alıcı ve ayarlayıcı erişimcileri görünürlükte anlaşamıyor.", "Global_module_exports_may_only_appear_at_top_level_1316": "Genel modül dışarı aktarmaları yalnızca en üst düzeyde görünebilir.", "Global_module_exports_may_only_appear_in_declaration_files_1315": "Genel modül dışarı aktarmaları yalnızca bildirim dosyalarında görünebilir.", diff --git a/lib/tsc.js b/lib/tsc.js index 0b8d4130e00..253098e4d4d 100644 --- a/lib/tsc.js +++ b/lib/tsc.js @@ -66,19 +66,25 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook }; var ts; (function (ts) { - ts.versionMajorMinor = "3.7"; + ts.versionMajorMinor = "3.8"; ts.version = ts.versionMajorMinor + ".0-dev"; })(ts || (ts = {})); (function (ts) { - ts.emptyArray = []; - function createDictionaryObject() { - var map = Object.create(null); - map.__ = undefined; - delete map.__; - return map; + function tryGetNativeMap() { + return typeof Map !== "undefined" && "entries" in Map.prototype ? Map : undefined; } + ts.tryGetNativeMap = tryGetNativeMap; +})(ts || (ts = {})); +(function (ts) { + ts.emptyArray = []; + ts.Map = ts.tryGetNativeMap() || (function () { + if (typeof ts.createMapShim === "function") { + return ts.createMapShim(); + } + throw new Error("TypeScript requires an environment that provides a compatible native Map implementation."); + })(); function createMap() { - return new ts.MapCtr(); + return new ts.Map(); } ts.createMap = createMap; function createMapFromEntries(entries) { @@ -91,7 +97,7 @@ var ts; } ts.createMapFromEntries = createMapFromEntries; function createMapFromTemplate(template) { - var map = new ts.MapCtr(); + var map = new ts.Map(); for (var key in template) { if (hasOwnProperty.call(template, key)) { map.set(key, template[key]); @@ -100,121 +106,6 @@ var ts; return map; } ts.createMapFromTemplate = createMapFromTemplate; - ts.MapCtr = typeof Map !== "undefined" && "entries" in Map.prototype ? Map : shimMap(); - function shimMap() { - var MapIterator = (function () { - function MapIterator(currentEntry, selector) { - this.currentEntry = currentEntry; - this.selector = selector; - } - MapIterator.prototype.next = function () { - while (this.currentEntry) { - var skipNext = !!this.currentEntry.skipNext; - this.currentEntry = this.currentEntry.nextEntry; - if (!skipNext) { - break; - } - } - if (this.currentEntry) { - return { value: this.selector(this.currentEntry.key, this.currentEntry.value), done: false }; - } - else { - return { value: undefined, done: true }; - } - }; - return MapIterator; - }()); - return (function () { - function class_1() { - this.data = createDictionaryObject(); - this.size = 0; - this.firstEntry = {}; - this.lastEntry = this.firstEntry; - } - class_1.prototype.get = function (key) { - var entry = this.data[key]; - return entry && entry.value; - }; - class_1.prototype.set = function (key, value) { - if (!this.has(key)) { - this.size++; - var newEntry = { - key: key, - value: value - }; - this.data[key] = newEntry; - var previousLastEntry = this.lastEntry; - previousLastEntry.nextEntry = newEntry; - newEntry.previousEntry = previousLastEntry; - this.lastEntry = newEntry; - } - else { - this.data[key].value = value; - } - return this; - }; - class_1.prototype.has = function (key) { - return key in this.data; - }; - class_1.prototype.delete = function (key) { - if (this.has(key)) { - this.size--; - var entry = this.data[key]; - delete this.data[key]; - var previousEntry = entry.previousEntry; - previousEntry.nextEntry = entry.nextEntry; - if (entry.nextEntry) { - entry.nextEntry.previousEntry = previousEntry; - } - if (this.lastEntry === entry) { - this.lastEntry = previousEntry; - } - entry.previousEntry = undefined; - entry.nextEntry = previousEntry; - entry.skipNext = true; - return true; - } - return false; - }; - class_1.prototype.clear = function () { - this.data = createDictionaryObject(); - this.size = 0; - var firstEntry = this.firstEntry; - var currentEntry = firstEntry.nextEntry; - while (currentEntry) { - var nextEntry = currentEntry.nextEntry; - currentEntry.previousEntry = undefined; - currentEntry.nextEntry = firstEntry; - currentEntry.skipNext = true; - currentEntry = nextEntry; - } - firstEntry.nextEntry = undefined; - this.lastEntry = firstEntry; - }; - class_1.prototype.keys = function () { - return new MapIterator(this.firstEntry, function (key) { return key; }); - }; - class_1.prototype.values = function () { - return new MapIterator(this.firstEntry, function (_key, value) { return value; }); - }; - class_1.prototype.entries = function () { - return new MapIterator(this.firstEntry, function (key, value) { return [key, value]; }); - }; - class_1.prototype.forEach = function (action) { - var iterator = this.entries(); - while (true) { - var iterResult = iterator.next(); - if (iterResult.done) { - break; - } - var _a = iterResult.value, key = _a[0], value = _a[1]; - action(value, key); - } - }; - return class_1; - }()); - } - ts.shimMap = shimMap; function length(array) { return array ? array.length : 0; } @@ -1552,20 +1443,6 @@ var ts; return str.indexOf(substring) !== -1; } ts.stringContains = stringContains; - function fileExtensionIs(path, extension) { - return path.length > extension.length && endsWith(path, extension); - } - ts.fileExtensionIs = fileExtensionIs; - function fileExtensionIsOneOf(path, extensions) { - for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) { - var extension = extensions_1[_i]; - if (fileExtensionIs(path, extension)) { - return true; - } - } - return false; - } - ts.fileExtensionIsOneOf = fileExtensionIsOneOf; function removeMinAndVersionNumbers(fileName) { var trailingMinOrVersion = /[.-]((min)|(\d+(\.\d+)*))$/; return fileName.replace(trailingMinOrVersion, "").replace(trailingMinOrVersion, ""); @@ -1855,11 +1732,14 @@ var ts; if (isFlags) { var result = ""; var remainingFlags = value; - for (var i = members.length - 1; i >= 0 && remainingFlags !== 0; i--) { - var _a = members[i], enumValue = _a[0], enumName = _a[1]; - if (enumValue !== 0 && (remainingFlags & enumValue) === enumValue) { + for (var _i = 0, members_1 = members; _i < members_1.length; _i++) { + var _a = members_1[_i], enumValue = _a[0], enumName = _a[1]; + if (enumValue > value) { + break; + } + if (enumValue !== 0 && enumValue & value) { + result = "" + result + (result ? "|" : "") + enumName; remainingFlags &= ~enumValue; - result = "" + enumName + (result ? "|" : "") + result; } } if (remainingFlags === 0) { @@ -1867,8 +1747,8 @@ var ts; } } else { - for (var _i = 0, members_1 = members; _i < members_1.length; _i++) { - var _b = members_1[_i], enumValue = _b[0], enumName = _b[1]; + for (var _b = 0, members_2 = members; _b < members_2.length; _b++) { + var _c = members_2[_b], enumValue = _c[0], enumName = _c[1]; if (enumValue === value) { return enumName; } @@ -1942,6 +1822,33 @@ var ts; ? function (node, message) { return assert(node === undefined, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was unexpected'."; }, Debug.assertMissingNode); } : ts.noop; var isDebugInfoEnabled = false; + var extendedDebugModule; + function extendedDebug() { + enableDebugInfo(); + if (!extendedDebugModule) { + throw new Error("Debugging helpers could not be loaded."); + } + return extendedDebugModule; + } + function printControlFlowGraph(flowNode) { + return console.log(formatControlFlowGraph(flowNode)); + } + Debug.printControlFlowGraph = printControlFlowGraph; + function formatControlFlowGraph(flowNode) { + return extendedDebug().formatControlFlowGraph(flowNode); + } + Debug.formatControlFlowGraph = formatControlFlowGraph; + function attachFlowNodeDebugInfo(flowNode) { + if (isDebugInfoEnabled) { + if (!("__debugFlowFlags" in flowNode)) { + Object.defineProperties(flowNode, { + __debugFlowFlags: { get: function () { return formatEnum(this.flags, ts.FlowFlags, true); } }, + __debugToString: { value: function () { return formatControlFlowGraph(this); } } + }); + } + } + } + Debug.attachFlowNodeDebugInfo = attachFlowNodeDebugInfo; function enableDebugInfo() { if (isDebugInfoEnabled) return; @@ -1981,6 +1888,18 @@ var ts; }); } } + try { + if (ts.sys && ts.sys.require) { + var basePath = ts.getDirectoryPath(ts.resolvePath(ts.sys.getExecutingFilePath())); + var result = ts.sys.require(basePath, "./compiler-debug"); + if (!result.error) { + result.module.init(ts); + extendedDebugModule = result.module; + } + } + } + catch (_a) { + } isDebugInfoEnabled = true; } Debug.enableDebugInfo = enableDebugInfo; @@ -2102,8 +2021,6 @@ var ts; etwModule = undefined; } ts.perfLogger = etwModule && etwModule.logEvent ? etwModule : nullLogger; - var args = typeof process === "undefined" ? [] : process.argv; - ts.perfLogger.logInfoEvent("Starting TypeScript v" + ts.versionMajorMinor + " with command line: " + JSON.stringify(args)); })(ts || (ts = {})); var ts; (function (ts) { @@ -2406,6 +2323,7 @@ var ts; ExitStatus[ExitStatus["DiagnosticsPresent_OutputsSkipped"] = 1] = "DiagnosticsPresent_OutputsSkipped"; ExitStatus[ExitStatus["DiagnosticsPresent_OutputsGenerated"] = 2] = "DiagnosticsPresent_OutputsGenerated"; ExitStatus[ExitStatus["InvalidProject_OutputsSkipped"] = 3] = "InvalidProject_OutputsSkipped"; + ExitStatus[ExitStatus["ProjectReferenceCycle_OutputsSkipped"] = 4] = "ProjectReferenceCycle_OutputsSkipped"; ExitStatus[ExitStatus["ProjectReferenceCycle_OutputsSkupped"] = 4] = "ProjectReferenceCycle_OutputsSkupped"; })(ExitStatus = ts.ExitStatus || (ts.ExitStatus = {})); var TypeReferenceSerializationKind; @@ -2832,24 +2750,10 @@ var ts; } } ts.createRecursiveDirectoryWatcher = createRecursiveDirectoryWatcher; - function recursiveCreateDirectory(directoryPath, sys) { - var basePath = ts.getDirectoryPath(directoryPath); - var shouldCreateParent = basePath !== "" && directoryPath !== basePath && !sys.directoryExists(basePath); - if (shouldCreateParent) { - recursiveCreateDirectory(basePath, sys); - } - if (shouldCreateParent || !sys.directoryExists(directoryPath)) { - sys.createDirectory(directoryPath); - } - } function patchWriteFileEnsuringDirectory(sys) { var originalWriteFile = sys.writeFile; sys.writeFile = function (path, data, writeBom) { - var directoryPath = ts.getDirectoryPath(ts.normalizeSlashes(path)); - if (directoryPath && !sys.directoryExists(directoryPath)) { - recursiveCreateDirectory(directoryPath, sys); - } - originalWriteFile.call(sys, path, data, writeBom); + return ts.writeFileEnsuringDirectories(path, data, !!writeBom, function (path, data, writeByteOrderMark) { return originalWriteFile.call(sys, path, data, writeByteOrderMark); }, function (path) { return sys.createDirectory(path); }, function (path) { return sys.directoryExists(path); }); }; } ts.patchWriteFileEnsuringDirectory = patchWriteFileEnsuringDirectory; @@ -2983,6 +2887,15 @@ var ts; bufferFrom: bufferFrom, base64decode: function (input) { return bufferFrom(input, "base64").toString("utf8"); }, base64encode: function (input) { return bufferFrom(input).toString("base64"); }, + require: function (baseDir, moduleName) { + try { + var modulePath = ts.resolveJSModule(moduleName, baseDir, nodeSystem); + return { module: require(modulePath), modulePath: modulePath, error: undefined }; + } + catch (error) { + return { module: undefined, modulePath: undefined, error: error }; + } + } }; return nodeSystem; function enableCPUProfiler(path, cb) { @@ -3486,6 +3399,468 @@ var ts; } })(ts || (ts = {})); var ts; +(function (ts) { + ts.directorySeparator = "/"; + var altDirectorySeparator = "\\"; + var urlSchemeSeparator = "://"; + var backslashRegExp = /\\/g; + function isAnyDirectorySeparator(charCode) { + return charCode === 47 || charCode === 92; + } + ts.isAnyDirectorySeparator = isAnyDirectorySeparator; + function isUrl(path) { + return getEncodedRootLength(path) < 0; + } + ts.isUrl = isUrl; + function isRootedDiskPath(path) { + return getEncodedRootLength(path) > 0; + } + ts.isRootedDiskPath = isRootedDiskPath; + function isDiskPathRoot(path) { + var rootLength = getEncodedRootLength(path); + return rootLength > 0 && rootLength === path.length; + } + ts.isDiskPathRoot = isDiskPathRoot; + function pathIsAbsolute(path) { + return getEncodedRootLength(path) !== 0; + } + ts.pathIsAbsolute = pathIsAbsolute; + function pathIsRelative(path) { + return /^\.\.?($|[\\/])/.test(path); + } + ts.pathIsRelative = pathIsRelative; + function hasExtension(fileName) { + return ts.stringContains(getBaseFileName(fileName), "."); + } + ts.hasExtension = hasExtension; + function fileExtensionIs(path, extension) { + return path.length > extension.length && ts.endsWith(path, extension); + } + ts.fileExtensionIs = fileExtensionIs; + function fileExtensionIsOneOf(path, extensions) { + for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) { + var extension = extensions_1[_i]; + if (fileExtensionIs(path, extension)) { + return true; + } + } + return false; + } + ts.fileExtensionIsOneOf = fileExtensionIsOneOf; + function hasTrailingDirectorySeparator(path) { + return path.length > 0 && isAnyDirectorySeparator(path.charCodeAt(path.length - 1)); + } + ts.hasTrailingDirectorySeparator = hasTrailingDirectorySeparator; + function isVolumeCharacter(charCode) { + return (charCode >= 97 && charCode <= 122) || + (charCode >= 65 && charCode <= 90); + } + function getFileUrlVolumeSeparatorEnd(url, start) { + var ch0 = url.charCodeAt(start); + if (ch0 === 58) + return start + 1; + if (ch0 === 37 && url.charCodeAt(start + 1) === 51) { + var ch2 = url.charCodeAt(start + 2); + if (ch2 === 97 || ch2 === 65) + return start + 3; + } + return -1; + } + function getEncodedRootLength(path) { + if (!path) + return 0; + var ch0 = path.charCodeAt(0); + if (ch0 === 47 || ch0 === 92) { + if (path.charCodeAt(1) !== ch0) + return 1; + var p1 = path.indexOf(ch0 === 47 ? ts.directorySeparator : altDirectorySeparator, 2); + if (p1 < 0) + return path.length; + return p1 + 1; + } + if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58) { + var ch2 = path.charCodeAt(2); + if (ch2 === 47 || ch2 === 92) + return 3; + if (path.length === 2) + return 2; + } + var schemeEnd = path.indexOf(urlSchemeSeparator); + if (schemeEnd !== -1) { + var authorityStart = schemeEnd + urlSchemeSeparator.length; + var authorityEnd = path.indexOf(ts.directorySeparator, authorityStart); + if (authorityEnd !== -1) { + var scheme = path.slice(0, schemeEnd); + var authority = path.slice(authorityStart, authorityEnd); + if (scheme === "file" && (authority === "" || authority === "localhost") && + isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) { + var volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2); + if (volumeSeparatorEnd !== -1) { + if (path.charCodeAt(volumeSeparatorEnd) === 47) { + return ~(volumeSeparatorEnd + 1); + } + if (volumeSeparatorEnd === path.length) { + return ~volumeSeparatorEnd; + } + } + } + return ~(authorityEnd + 1); + } + return ~path.length; + } + return 0; + } + function getRootLength(path) { + var rootLength = getEncodedRootLength(path); + return rootLength < 0 ? ~rootLength : rootLength; + } + ts.getRootLength = getRootLength; + function getDirectoryPath(path) { + path = normalizeSlashes(path); + var rootLength = getRootLength(path); + if (rootLength === path.length) + return path; + path = removeTrailingDirectorySeparator(path); + return path.slice(0, Math.max(rootLength, path.lastIndexOf(ts.directorySeparator))); + } + ts.getDirectoryPath = getDirectoryPath; + function getBaseFileName(path, extensions, ignoreCase) { + path = normalizeSlashes(path); + var rootLength = getRootLength(path); + if (rootLength === path.length) + return ""; + path = removeTrailingDirectorySeparator(path); + var name = path.slice(Math.max(getRootLength(path), path.lastIndexOf(ts.directorySeparator) + 1)); + var extension = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(name, extensions, ignoreCase) : undefined; + return extension ? name.slice(0, name.length - extension.length) : name; + } + ts.getBaseFileName = getBaseFileName; + function tryGetExtensionFromPath(path, extension, stringEqualityComparer) { + if (!ts.startsWith(extension, ".")) + extension = "." + extension; + if (path.length >= extension.length && path.charCodeAt(path.length - extension.length) === 46) { + var pathExtension = path.slice(path.length - extension.length); + if (stringEqualityComparer(pathExtension, extension)) { + return pathExtension; + } + } + } + function getAnyExtensionFromPathWorker(path, extensions, stringEqualityComparer) { + if (typeof extensions === "string") { + return tryGetExtensionFromPath(path, extensions, stringEqualityComparer) || ""; + } + for (var _i = 0, extensions_2 = extensions; _i < extensions_2.length; _i++) { + var extension = extensions_2[_i]; + var result = tryGetExtensionFromPath(path, extension, stringEqualityComparer); + if (result) + return result; + } + return ""; + } + function getAnyExtensionFromPath(path, extensions, ignoreCase) { + if (extensions) { + return getAnyExtensionFromPathWorker(removeTrailingDirectorySeparator(path), extensions, ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive); + } + var baseFileName = getBaseFileName(path); + var extensionIndex = baseFileName.lastIndexOf("."); + if (extensionIndex >= 0) { + return baseFileName.substring(extensionIndex); + } + return ""; + } + ts.getAnyExtensionFromPath = getAnyExtensionFromPath; + function pathComponents(path, rootLength) { + var root = path.substring(0, rootLength); + var rest = path.substring(rootLength).split(ts.directorySeparator); + if (rest.length && !ts.lastOrUndefined(rest)) + rest.pop(); + return __spreadArrays([root], rest); + } + function getPathComponents(path, currentDirectory) { + if (currentDirectory === void 0) { currentDirectory = ""; } + path = combinePaths(currentDirectory, path); + return pathComponents(path, getRootLength(path)); + } + ts.getPathComponents = getPathComponents; + function getPathFromPathComponents(pathComponents) { + if (pathComponents.length === 0) + return ""; + var root = pathComponents[0] && ensureTrailingDirectorySeparator(pathComponents[0]); + return root + pathComponents.slice(1).join(ts.directorySeparator); + } + ts.getPathFromPathComponents = getPathFromPathComponents; + function normalizeSlashes(path) { + return path.replace(backslashRegExp, ts.directorySeparator); + } + ts.normalizeSlashes = normalizeSlashes; + function reducePathComponents(components) { + if (!ts.some(components)) + return []; + var reduced = [components[0]]; + for (var i = 1; i < components.length; i++) { + var component = components[i]; + if (!component) + continue; + if (component === ".") + continue; + if (component === "..") { + if (reduced.length > 1) { + if (reduced[reduced.length - 1] !== "..") { + reduced.pop(); + continue; + } + } + else if (reduced[0]) + continue; + } + reduced.push(component); + } + return reduced; + } + ts.reducePathComponents = reducePathComponents; + function combinePaths(path) { + var paths = []; + for (var _i = 1; _i < arguments.length; _i++) { + paths[_i - 1] = arguments[_i]; + } + if (path) + path = normalizeSlashes(path); + for (var _a = 0, paths_1 = paths; _a < paths_1.length; _a++) { + var relativePath = paths_1[_a]; + if (!relativePath) + continue; + relativePath = normalizeSlashes(relativePath); + if (!path || getRootLength(relativePath) !== 0) { + path = relativePath; + } + else { + path = ensureTrailingDirectorySeparator(path) + relativePath; + } + } + return path; + } + ts.combinePaths = combinePaths; + function resolvePath(path) { + var paths = []; + for (var _i = 1; _i < arguments.length; _i++) { + paths[_i - 1] = arguments[_i]; + } + return normalizePath(ts.some(paths) ? combinePaths.apply(void 0, __spreadArrays([path], paths)) : normalizeSlashes(path)); + } + ts.resolvePath = resolvePath; + function getNormalizedPathComponents(path, currentDirectory) { + return reducePathComponents(getPathComponents(path, currentDirectory)); + } + ts.getNormalizedPathComponents = getNormalizedPathComponents; + function getNormalizedAbsolutePath(fileName, currentDirectory) { + return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory)); + } + ts.getNormalizedAbsolutePath = getNormalizedAbsolutePath; + function normalizePath(path) { + path = normalizeSlashes(path); + var normalized = getPathFromPathComponents(reducePathComponents(getPathComponents(path))); + return normalized && hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(normalized) : normalized; + } + ts.normalizePath = normalizePath; + function getPathWithoutRoot(pathComponents) { + if (pathComponents.length === 0) + return ""; + return pathComponents.slice(1).join(ts.directorySeparator); + } + function getNormalizedAbsolutePathWithoutRoot(fileName, currentDirectory) { + return getPathWithoutRoot(getNormalizedPathComponents(fileName, currentDirectory)); + } + ts.getNormalizedAbsolutePathWithoutRoot = getNormalizedAbsolutePathWithoutRoot; + function toPath(fileName, basePath, getCanonicalFileName) { + var nonCanonicalizedPath = isRootedDiskPath(fileName) + ? normalizePath(fileName) + : getNormalizedAbsolutePath(fileName, basePath); + return getCanonicalFileName(nonCanonicalizedPath); + } + ts.toPath = toPath; + function normalizePathAndParts(path) { + path = normalizeSlashes(path); + var _a = reducePathComponents(getPathComponents(path)), root = _a[0], parts = _a.slice(1); + if (parts.length) { + var joinedParts = root + parts.join(ts.directorySeparator); + return { path: hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(joinedParts) : joinedParts, parts: parts }; + } + else { + return { path: root, parts: parts }; + } + } + ts.normalizePathAndParts = normalizePathAndParts; + function removeTrailingDirectorySeparator(path) { + if (hasTrailingDirectorySeparator(path)) { + return path.substr(0, path.length - 1); + } + return path; + } + ts.removeTrailingDirectorySeparator = removeTrailingDirectorySeparator; + function ensureTrailingDirectorySeparator(path) { + if (!hasTrailingDirectorySeparator(path)) { + return path + ts.directorySeparator; + } + return path; + } + ts.ensureTrailingDirectorySeparator = ensureTrailingDirectorySeparator; + function ensurePathIsNonModuleName(path) { + return !pathIsAbsolute(path) && !pathIsRelative(path) ? "./" + path : path; + } + ts.ensurePathIsNonModuleName = ensurePathIsNonModuleName; + function changeAnyExtension(path, ext, extensions, ignoreCase) { + var pathext = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(path, extensions, ignoreCase) : getAnyExtensionFromPath(path); + return pathext ? path.slice(0, path.length - pathext.length) + (ts.startsWith(ext, ".") ? ext : "." + ext) : path; + } + ts.changeAnyExtension = changeAnyExtension; + var relativePathSegmentRegExp = /(^|\/)\.{0,2}($|\/)/; + function comparePathsWorker(a, b, componentComparer) { + if (a === b) + return 0; + if (a === undefined) + return -1; + if (b === undefined) + return 1; + var aRoot = a.substring(0, getRootLength(a)); + var bRoot = b.substring(0, getRootLength(b)); + var result = ts.compareStringsCaseInsensitive(aRoot, bRoot); + if (result !== 0) { + return result; + } + var aRest = a.substring(aRoot.length); + var bRest = b.substring(bRoot.length); + if (!relativePathSegmentRegExp.test(aRest) && !relativePathSegmentRegExp.test(bRest)) { + return componentComparer(aRest, bRest); + } + var aComponents = reducePathComponents(getPathComponents(a)); + var bComponents = reducePathComponents(getPathComponents(b)); + var sharedLength = Math.min(aComponents.length, bComponents.length); + for (var i = 1; i < sharedLength; i++) { + var result_1 = componentComparer(aComponents[i], bComponents[i]); + if (result_1 !== 0) { + return result_1; + } + } + return ts.compareValues(aComponents.length, bComponents.length); + } + function comparePathsCaseSensitive(a, b) { + return comparePathsWorker(a, b, ts.compareStringsCaseSensitive); + } + ts.comparePathsCaseSensitive = comparePathsCaseSensitive; + function comparePathsCaseInsensitive(a, b) { + return comparePathsWorker(a, b, ts.compareStringsCaseInsensitive); + } + ts.comparePathsCaseInsensitive = comparePathsCaseInsensitive; + function comparePaths(a, b, currentDirectory, ignoreCase) { + if (typeof currentDirectory === "string") { + a = combinePaths(currentDirectory, a); + b = combinePaths(currentDirectory, b); + } + else if (typeof currentDirectory === "boolean") { + ignoreCase = currentDirectory; + } + return comparePathsWorker(a, b, ts.getStringComparer(ignoreCase)); + } + ts.comparePaths = comparePaths; + function containsPath(parent, child, currentDirectory, ignoreCase) { + if (typeof currentDirectory === "string") { + parent = combinePaths(currentDirectory, parent); + child = combinePaths(currentDirectory, child); + } + else if (typeof currentDirectory === "boolean") { + ignoreCase = currentDirectory; + } + if (parent === undefined || child === undefined) + return false; + if (parent === child) + return true; + var parentComponents = reducePathComponents(getPathComponents(parent)); + var childComponents = reducePathComponents(getPathComponents(child)); + if (childComponents.length < parentComponents.length) { + return false; + } + var componentEqualityComparer = ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive; + for (var i = 0; i < parentComponents.length; i++) { + var equalityComparer = i === 0 ? ts.equateStringsCaseInsensitive : componentEqualityComparer; + if (!equalityComparer(parentComponents[i], childComponents[i])) { + return false; + } + } + return true; + } + ts.containsPath = containsPath; + function startsWithDirectory(fileName, directoryName, getCanonicalFileName) { + var canonicalFileName = getCanonicalFileName(fileName); + var canonicalDirectoryName = getCanonicalFileName(directoryName); + return ts.startsWith(canonicalFileName, canonicalDirectoryName + "/") || ts.startsWith(canonicalFileName, canonicalDirectoryName + "\\"); + } + ts.startsWithDirectory = startsWithDirectory; + function getPathComponentsRelativeTo(from, to, stringEqualityComparer, getCanonicalFileName) { + var fromComponents = reducePathComponents(getPathComponents(from)); + var toComponents = reducePathComponents(getPathComponents(to)); + var start; + for (start = 0; start < fromComponents.length && start < toComponents.length; start++) { + var fromComponent = getCanonicalFileName(fromComponents[start]); + var toComponent = getCanonicalFileName(toComponents[start]); + var comparer = start === 0 ? ts.equateStringsCaseInsensitive : stringEqualityComparer; + if (!comparer(fromComponent, toComponent)) + break; + } + if (start === 0) { + return toComponents; + } + var components = toComponents.slice(start); + var relative = []; + for (; start < fromComponents.length; start++) { + relative.push(".."); + } + return __spreadArrays([""], relative, components); + } + ts.getPathComponentsRelativeTo = getPathComponentsRelativeTo; + function getRelativePathFromDirectory(fromDirectory, to, getCanonicalFileNameOrIgnoreCase) { + ts.Debug.assert((getRootLength(fromDirectory) > 0) === (getRootLength(to) > 0), "Paths must either both be absolute or both be relative"); + var getCanonicalFileName = typeof getCanonicalFileNameOrIgnoreCase === "function" ? getCanonicalFileNameOrIgnoreCase : ts.identity; + var ignoreCase = typeof getCanonicalFileNameOrIgnoreCase === "boolean" ? getCanonicalFileNameOrIgnoreCase : false; + var pathComponents = getPathComponentsRelativeTo(fromDirectory, to, ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive, getCanonicalFileName); + return getPathFromPathComponents(pathComponents); + } + ts.getRelativePathFromDirectory = getRelativePathFromDirectory; + function convertToRelativePath(absoluteOrRelativePath, basePath, getCanonicalFileName) { + return !isRootedDiskPath(absoluteOrRelativePath) + ? absoluteOrRelativePath + : getRelativePathToDirectoryOrUrl(basePath, absoluteOrRelativePath, basePath, getCanonicalFileName, false); + } + ts.convertToRelativePath = convertToRelativePath; + function getRelativePathFromFile(from, to, getCanonicalFileName) { + return ensurePathIsNonModuleName(getRelativePathFromDirectory(getDirectoryPath(from), to, getCanonicalFileName)); + } + ts.getRelativePathFromFile = getRelativePathFromFile; + function getRelativePathToDirectoryOrUrl(directoryPathOrUrl, relativeOrAbsolutePath, currentDirectory, getCanonicalFileName, isAbsolutePathAnUrl) { + var pathComponents = getPathComponentsRelativeTo(resolvePath(currentDirectory, directoryPathOrUrl), resolvePath(currentDirectory, relativeOrAbsolutePath), ts.equateStringsCaseSensitive, getCanonicalFileName); + var firstComponent = pathComponents[0]; + if (isAbsolutePathAnUrl && isRootedDiskPath(firstComponent)) { + var prefix = firstComponent.charAt(0) === ts.directorySeparator ? "file://" : "file:///"; + pathComponents[0] = prefix + firstComponent; + } + return getPathFromPathComponents(pathComponents); + } + ts.getRelativePathToDirectoryOrUrl = getRelativePathToDirectoryOrUrl; + function forEachAncestorDirectory(directory, callback) { + while (true) { + var result = callback(directory); + if (result !== undefined) { + return result; + } + var parentPath = getDirectoryPath(directory); + if (parentPath === directory) { + return undefined; + } + directory = parentPath; + } + } + ts.forEachAncestorDirectory = forEachAncestorDirectory; +})(ts || (ts = {})); +var ts; (function (ts) { function diag(code, category, key, message, reportsUnnecessary, elidedInCompatabilityPyramid) { return { code: code, category: category, key: key, message: message, reportsUnnecessary: reportsUnnecessary, elidedInCompatabilityPyramid: elidedInCompatabilityPyramid }; @@ -3509,7 +3884,7 @@ var ts; An_index_signature_parameter_cannot_have_an_initializer: diag(1020, ts.DiagnosticCategory.Error, "An_index_signature_parameter_cannot_have_an_initializer_1020", "An index signature parameter cannot have an initializer."), An_index_signature_must_have_a_type_annotation: diag(1021, ts.DiagnosticCategory.Error, "An_index_signature_must_have_a_type_annotation_1021", "An index signature must have a type annotation."), An_index_signature_parameter_must_have_a_type_annotation: diag(1022, ts.DiagnosticCategory.Error, "An_index_signature_parameter_must_have_a_type_annotation_1022", "An index signature parameter must have a type annotation."), - An_index_signature_parameter_type_must_be_string_or_number: diag(1023, ts.DiagnosticCategory.Error, "An_index_signature_parameter_type_must_be_string_or_number_1023", "An index signature parameter type must be 'string' or 'number'."), + An_index_signature_parameter_type_must_be_either_string_or_number: diag(1023, ts.DiagnosticCategory.Error, "An_index_signature_parameter_type_must_be_either_string_or_number_1023", "An index signature parameter type must be either 'string' or 'number'."), readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature: diag(1024, ts.DiagnosticCategory.Error, "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024", "'readonly' modifier can only appear on a property declaration or index signature."), Accessibility_modifier_already_seen: diag(1028, ts.DiagnosticCategory.Error, "Accessibility_modifier_already_seen_1028", "Accessibility modifier already seen."), _0_modifier_must_precede_1_modifier: diag(1029, ts.DiagnosticCategory.Error, "_0_modifier_must_precede_1_modifier_1029", "'{0}' modifier must precede '{1}' modifier."), @@ -3717,7 +4092,7 @@ var ts; Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1320, ts.DiagnosticCategory.Error, "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."), Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1321, ts.DiagnosticCategory.Error, "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."), Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1322, ts.DiagnosticCategory.Error, "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."), - Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext: diag(1323, ts.DiagnosticCategory.Error, "Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323", "Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'."), + Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_commonjs_amd_system_or_umd: diag(1323, ts.DiagnosticCategory.Error, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_commonjs_amd_system_or_umd_1323", "Dynamic imports are only supported when the '--module' flag is set to 'esnext', 'commonjs', 'amd', 'system', or 'umd'."), Dynamic_import_must_have_one_specifier_as_an_argument: diag(1324, ts.DiagnosticCategory.Error, "Dynamic_import_must_have_one_specifier_as_an_argument_1324", "Dynamic import must have one specifier as an argument."), Specifier_of_dynamic_import_cannot_be_spread_element: diag(1325, ts.DiagnosticCategory.Error, "Specifier_of_dynamic_import_cannot_be_spread_element_1325", "Specifier of dynamic import cannot be spread element."), Dynamic_import_cannot_have_type_arguments: diag(1326, ts.DiagnosticCategory.Error, "Dynamic_import_cannot_have_type_arguments_1326", "Dynamic import cannot have type arguments"), @@ -3753,6 +4128,7 @@ var ts; An_enum_member_name_must_be_followed_by_a_or: diag(1357, ts.DiagnosticCategory.Error, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."), Tagged_template_expressions_are_not_permitted_in_an_optional_chain: diag(1358, ts.DiagnosticCategory.Error, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."), Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here: diag(1359, ts.DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359", "Identifier expected. '{0}' is a reserved word that cannot be used here."), + Did_you_mean_to_parenthesize_this_function_type: diag(1360, ts.DiagnosticCategory.Error, "Did_you_mean_to_parenthesize_this_function_type_1360", "Did you mean to parenthesize this function type?"), The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."), The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."), Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", undefined, true), @@ -3880,7 +4256,6 @@ var ts; Class_0_incorrectly_implements_interface_1: diag(2420, ts.DiagnosticCategory.Error, "Class_0_incorrectly_implements_interface_1_2420", "Class '{0}' incorrectly implements interface '{1}'."), A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2422, ts.DiagnosticCategory.Error, "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422", "A class can only implement an object type or intersection of object types with statically known members."), Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: diag(2423, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423", "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."), - Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: diag(2424, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424", "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property."), Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: diag(2425, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425", "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."), Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: diag(2426, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426", "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."), Interface_name_cannot_be_0: diag(2427, ts.DiagnosticCategory.Error, "Interface_name_cannot_be_0_2427", "Interface name cannot be '{0}'."), @@ -4050,8 +4425,8 @@ var ts; JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: diag(2607, ts.DiagnosticCategory.Error, "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", "JSX element class does not support attributes because it does not have a '{0}' property."), The_global_type_JSX_0_may_not_have_more_than_one_property: diag(2608, ts.DiagnosticCategory.Error, "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", "The global type 'JSX.{0}' may not have more than one property."), JSX_spread_child_must_be_an_array_type: diag(2609, ts.DiagnosticCategory.Error, "JSX_spread_child_must_be_an_array_type_2609", "JSX spread child must be an array type."), - Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_property: diag(2610, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_proper_2610", "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member property."), - Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_accessor: diag(2611, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_access_2611", "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member accessor."), + _0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property: diag(2610, ts.DiagnosticCategory.Error, "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610", "'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property."), + _0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor: diag(2611, ts.DiagnosticCategory.Error, "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611", "'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor."), Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration: diag(2612, ts.DiagnosticCategory.Error, "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612", "Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration."), Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead: diag(2613, ts.DiagnosticCategory.Error, "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613", "Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"), Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead: diag(2614, ts.DiagnosticCategory.Error, "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614", "Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"), @@ -4274,6 +4649,8 @@ var ts; Parameter_0_of_accessor_has_or_is_using_private_name_1: diag(4106, ts.DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106", "Parameter '{0}' of accessor has or is using private name '{1}'."), Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2: diag(4107, ts.DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107", "Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."), Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4108, ts.DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108", "Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."), + Type_arguments_for_0_circularly_reference_themselves: diag(4109, ts.DiagnosticCategory.Error, "Type_arguments_for_0_circularly_reference_themselves_4109", "Type arguments for '{0}' circularly reference themselves."), + Tuple_type_arguments_circularly_reference_themselves: diag(4110, ts.DiagnosticCategory.Error, "Tuple_type_arguments_circularly_reference_themselves_4110", "Tuple type arguments circularly reference themselves."), The_current_host_does_not_support_the_0_option: diag(5001, ts.DiagnosticCategory.Error, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."), Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, ts.DiagnosticCategory.Error, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."), File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, ts.DiagnosticCategory.Error, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."), @@ -4281,6 +4658,7 @@ var ts; Failed_to_parse_file_0_Colon_1: diag(5014, ts.DiagnosticCategory.Error, "Failed_to_parse_file_0_Colon_1_5014", "Failed to parse file '{0}': {1}."), Unknown_compiler_option_0: diag(5023, ts.DiagnosticCategory.Error, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."), Compiler_option_0_requires_a_value_of_type_1: diag(5024, ts.DiagnosticCategory.Error, "Compiler_option_0_requires_a_value_of_type_1_5024", "Compiler option '{0}' requires a value of type {1}."), + Unknown_compiler_option_0_Did_you_mean_1: diag(5025, ts.DiagnosticCategory.Error, "Unknown_compiler_option_0_Did_you_mean_1_5025", "Unknown compiler option '{0}'. Did you mean '{1}'?"), Could_not_write_file_0_Colon_1: diag(5033, ts.DiagnosticCategory.Error, "Could_not_write_file_0_Colon_1_5033", "Could not write file '{0}': {1}."), Option_project_cannot_be_mixed_with_source_files_on_a_command_line: diag(5042, ts.DiagnosticCategory.Error, "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042", "Option 'project' cannot be mixed with source files on a command line."), Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher: diag(5047, ts.DiagnosticCategory.Error, "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047", "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."), @@ -4311,6 +4689,7 @@ var ts; Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified: diag(5074, ts.DiagnosticCategory.Error, "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074", "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option `--tsBuildInfoFile` is specified."), _0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2: diag(5075, ts.DiagnosticCategory.Error, "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075", "'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."), _0_and_1_operations_cannot_be_mixed_without_parentheses: diag(5076, ts.DiagnosticCategory.Error, "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076", "'{0}' and '{1}' operations cannot be mixed without parentheses."), + Unknown_build_option_0_Did_you_mean_1: diag(5077, ts.DiagnosticCategory.Error, "Unknown_build_option_0_Did_you_mean_1_5077", "Unknown build option '{0}'. Did you mean '{1}'?"), Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6000, ts.DiagnosticCategory.Message, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."), Concatenate_and_emit_output_to_single_file: diag(6001, ts.DiagnosticCategory.Message, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."), Generates_corresponding_d_ts_file: diag(6002, ts.DiagnosticCategory.Message, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), @@ -4357,7 +4736,7 @@ var ts; Corrupted_locale_file_0: diag(6051, ts.DiagnosticCategory.Error, "Corrupted_locale_file_0_6051", "Corrupted locale file {0}."), Raise_error_on_expressions_and_declarations_with_an_implied_any_type: diag(6052, ts.DiagnosticCategory.Message, "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052", "Raise error on expressions and declarations with an implied 'any' type."), File_0_not_found: diag(6053, ts.DiagnosticCategory.Error, "File_0_not_found_6053", "File '{0}' not found."), - File_0_has_unsupported_extension_The_only_supported_extensions_are_1: diag(6054, ts.DiagnosticCategory.Error, "File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054", "File '{0}' has unsupported extension. The only supported extensions are {1}."), + File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1: diag(6054, ts.DiagnosticCategory.Error, "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054", "File '{0}' has an unsupported extension. The only supported extensions are {1}."), Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: diag(6055, ts.DiagnosticCategory.Message, "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055", "Suppress noImplicitAny errors for indexing objects lacking index signatures."), Do_not_emit_declarations_for_code_that_has_an_internal_annotation: diag(6056, ts.DiagnosticCategory.Message, "Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056", "Do not emit declarations for code that has an '@internal' annotation."), Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: diag(6058, ts.DiagnosticCategory.Message, "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058", "Specify the root directory of input files. Use to control the output directory structure with --outDir."), @@ -4565,6 +4944,8 @@ var ts; The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", "The expected type comes from property '{0}' which is declared here on type '{1}'"), The_expected_type_comes_from_this_index_signature: diag(6501, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."), The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."), + Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing: diag(6503, ts.DiagnosticCategory.Message, "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503", "Print names of files that are part of the compilation and then stop processing."), + File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option: diag(6504, ts.DiagnosticCategory.Error, "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504", "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"), Variable_0_implicitly_has_an_1_type: diag(7005, ts.DiagnosticCategory.Error, "Variable_0_implicitly_has_an_1_type_7005", "Variable '{0}' implicitly has an '{1}' type."), Parameter_0_implicitly_has_an_1_type: diag(7006, ts.DiagnosticCategory.Error, "Parameter_0_implicitly_has_an_1_type_7006", "Parameter '{0}' implicitly has an '{1}' type."), Member_0_implicitly_has_an_1_type: diag(7008, ts.DiagnosticCategory.Error, "Member_0_implicitly_has_an_1_type_7008", "Member '{0}' implicitly has an '{1}' type."), @@ -4668,6 +5049,7 @@ var ts; Expected_corresponding_closing_tag_for_JSX_fragment: diag(17015, ts.DiagnosticCategory.Error, "Expected_corresponding_closing_tag_for_JSX_fragment_17015", "Expected corresponding closing tag for JSX fragment."), JSX_fragment_is_not_supported_when_using_jsxFactory: diag(17016, ts.DiagnosticCategory.Error, "JSX_fragment_is_not_supported_when_using_jsxFactory_17016", "JSX fragment is not supported when using --jsxFactory"), JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma: diag(17017, ts.DiagnosticCategory.Error, "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017", "JSX fragment is not supported when using an inline JSX factory pragma"), + Unknown_type_acquisition_option_0_Did_you_mean_1: diag(17018, ts.DiagnosticCategory.Error, "Unknown_type_acquisition_option_0_Did_you_mean_1_17018", "Unknown type acquisition option '{0}'. Did you mean '{1}'?"), Circularity_detected_while_resolving_configuration_Colon_0: diag(18000, ts.DiagnosticCategory.Error, "Circularity_detected_while_resolving_configuration_Colon_0_18000", "Circularity detected while resolving configuration: {0}"), A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not: diag(18001, ts.DiagnosticCategory.Error, "A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not_18001", "A path in an 'extends' option must be relative or rooted, but '{0}' is not."), The_files_list_in_config_file_0_is_empty: diag(18002, ts.DiagnosticCategory.Error, "The_files_list_in_config_file_0_is_empty_18002", "The 'files' list in config file '{0}' is empty."), @@ -6684,7 +7066,7 @@ var ts; } ts.getDeclarationOfKind = getDeclarationOfKind; function createUnderscoreEscapedMap() { - return new ts.MapCtr(); + return new ts.Map(); } ts.createUnderscoreEscapedMap = createUnderscoreEscapedMap; function hasEntries(map) { @@ -6738,13 +7120,6 @@ var ts; reportPrivateInBaseOfClassExpression: ts.noop, }; } - function toPath(fileName, basePath, getCanonicalFileName) { - var nonCanonicalizedPath = ts.isRootedDiskPath(fileName) - ? ts.normalizePath(fileName) - : ts.getNormalizedAbsolutePath(fileName, basePath); - return getCanonicalFileName(nonCanonicalizedPath); - } - ts.toPath = toPath; function changesAffectModuleResolution(oldOptions, newOptions) { return oldOptions.configFilePath !== newOptions.configFilePath || optionsHaveModuleResolutionChanges(oldOptions, newOptions); @@ -7450,6 +7825,11 @@ var ts; break; case 201: return getErrorSpanForArrowFunction(sourceFile, node); + case 275: + case 276: + var start = ts.skipTrivia(sourceFile.text, node.pos); + var end = node.statements.length > 0 ? node.statements[0].pos : node.end; + return ts.createTextSpanFromBounds(start, end); } if (errorNode === undefined) { return getSpanOfTokenAtPosition(sourceFile, node.pos); @@ -8191,7 +8571,7 @@ var ts; (node.typeArguments[0].kind === 142 || node.typeArguments[0].kind === 139); } ts.isJSDocIndexSignature = isJSDocIndexSignature; - function isRequireCall(callExpression, checkArgumentIsStringLiteralLike) { + function isRequireCall(callExpression, requireStringLiteralLikeArgument) { if (callExpression.kind !== 195) { return false; } @@ -8203,7 +8583,7 @@ var ts; return false; } var arg = args[0]; - return !checkArgumentIsStringLiteralLike || ts.isStringLiteralLike(arg); + return !requireStringLiteralLikeArgument || ts.isStringLiteralLike(arg); } ts.isRequireCall = isRequireCall; function isSingleOrDoubleQuote(charCode) { @@ -8389,13 +8769,6 @@ var ts; isBindableStaticNameExpression(expr.arguments[0], true); } ts.isBindableObjectDefinePropertyCall = isBindableObjectDefinePropertyCall; - function isBindableStaticElementAccessExpression(node, excludeThisKeyword) { - return isLiteralLikeElementAccess(node) - && ((!excludeThisKeyword && node.expression.kind === 103) || - isEntityNameExpression(node.expression) || - isBindableStaticElementAccessExpression(node.expression, true)); - } - ts.isBindableStaticElementAccessExpression = isBindableStaticElementAccessExpression; function isLiteralLikeAccess(node) { return ts.isPropertyAccessExpression(node) || isLiteralLikeElementAccess(node); } @@ -8410,6 +8783,13 @@ var ts; || isBindableStaticElementAccessExpression(node, excludeThisKeyword); } ts.isBindableStaticAccessExpression = isBindableStaticAccessExpression; + function isBindableStaticElementAccessExpression(node, excludeThisKeyword) { + return isLiteralLikeElementAccess(node) + && ((!excludeThisKeyword && node.expression.kind === 103) || + isEntityNameExpression(node.expression) || + isBindableStaticAccessExpression(node.expression, true)); + } + ts.isBindableStaticElementAccessExpression = isBindableStaticElementAccessExpression; function isBindableStaticNameExpression(node, excludeThisKeyword) { return isEntityNameExpression(node) || isBindableStaticAccessExpression(node, excludeThisKeyword); } @@ -8438,7 +8818,7 @@ var ts; if (expr.operatorToken.kind !== 62 || !isAccessExpression(expr.left)) { return 0; } - if (isBindableStaticNameExpression(expr.left.expression) && getElementOrPropertyAccessName(expr.left) === "prototype" && ts.isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) { + if (isBindableStaticNameExpression(expr.left.expression, true) && getElementOrPropertyAccessName(expr.left) === "prototype" && ts.isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) { return 6; } return getAssignmentDeclarationPropertyAccessKind(expr.left); @@ -8486,11 +8866,14 @@ var ts; nextToLast = nextToLast.expression; } var id = nextToLast.expression; - if (id.escapedText === "exports" || - id.escapedText === "module" && getElementOrPropertyAccessName(nextToLast) === "exports") { + if ((id.escapedText === "exports" || + id.escapedText === "module" && getElementOrPropertyAccessName(nextToLast) === "exports") && + isBindableStaticAccessExpression(lhs)) { return 1; } - return 5; + if (isBindableStaticNameExpression(lhs, true) || (ts.isElementAccessExpression(lhs) && isDynamicName(lhs) && lhs.expression.kind !== 103)) { + return 5; + } } return 0; } @@ -9709,7 +10092,7 @@ var ts; ts.getExternalModuleNameFromDeclaration = getExternalModuleNameFromDeclaration; function getExternalModuleNameFromPath(host, fileName, referencePath) { var getCanonicalFileName = function (f) { return host.getCanonicalFileName(f); }; - var dir = toPath(referencePath ? ts.getDirectoryPath(referencePath) : host.getCommonSourceDirectory(), host.getCurrentDirectory(), getCanonicalFileName); + var dir = ts.toPath(referencePath ? ts.getDirectoryPath(referencePath) : host.getCommonSourceDirectory(), host.getCurrentDirectory(), getCanonicalFileName); var filePath = ts.getNormalizedAbsolutePath(fileName, host.getCurrentDirectory()); var relativePath = ts.getRelativePathToDirectoryOrUrl(dir, filePath, dir, getCanonicalFileName, false); var extensionless = ts.removeFileExtension(relativePath); @@ -9781,6 +10164,23 @@ var ts; }, sourceFiles); } ts.writeFile = writeFile; + function ensureDirectoriesExist(directoryPath, createDirectory, directoryExists) { + if (directoryPath.length > ts.getRootLength(directoryPath) && !directoryExists(directoryPath)) { + var parentDirectory = ts.getDirectoryPath(directoryPath); + ensureDirectoriesExist(parentDirectory, createDirectory, directoryExists); + createDirectory(directoryPath); + } + } + function writeFileEnsuringDirectories(path, data, writeByteOrderMark, writeFile, createDirectory, directoryExists) { + try { + writeFile(path, data, writeByteOrderMark); + } + catch (_a) { + ensureDirectoriesExist(ts.getDirectoryPath(ts.normalizePath(path)), createDirectory, directoryExists); + writeFile(path, data, writeByteOrderMark); + } + } + ts.writeFileEnsuringDirectories = writeFileEnsuringDirectories; function getLineOfLocalPosition(currentSourceFile, pos) { return ts.getLineAndCharacterOfPosition(currentSourceFile, pos).line; } @@ -10159,6 +10559,23 @@ var ts; return node.kind === 75 || isPropertyAccessEntityNameExpression(node); } ts.isEntityNameExpression = isEntityNameExpression; + function getFirstIdentifier(node) { + switch (node.kind) { + case 75: + return node; + case 152: + do { + node = node.left; + } while (node.kind !== 75); + return node; + case 193: + do { + node = node.expression; + } while (node.kind !== 75); + return node; + } + } + ts.getFirstIdentifier = getFirstIdentifier; function isDottedName(node) { return node.kind === 75 || node.kind === 103 || node.kind === 193 && isDottedName(node.expression) || @@ -10587,20 +11004,6 @@ var ts; }); } ts.mutateMap = mutateMap; - function forEachAncestorDirectory(directory, callback) { - while (true) { - var result = callback(directory); - if (result !== undefined) { - return result; - } - var parentPath = ts.getDirectoryPath(directory); - if (parentPath === directory) { - return undefined; - } - directory = parentPath; - } - } - ts.forEachAncestorDirectory = forEachAncestorDirectory; function isAbstractConstructorType(type) { return !!(getObjectFlags(type) & 16) && !!type.symbol && isAbstractConstructorSymbol(type.symbol); } @@ -10626,7 +11029,7 @@ var ts; } ts.typeHasCallOrConstructSignatures = typeHasCallOrConstructSignatures; function forSomeAncestorDirectory(directory, callback) { - return !!forEachAncestorDirectory(directory, function (d) { return callback(d) ? true : undefined; }); + return !!ts.forEachAncestorDirectory(directory, function (d) { return callback(d) ? true : undefined; }); } ts.forSomeAncestorDirectory = forSomeAncestorDirectory; function isUMDExportSymbol(symbol) { @@ -11488,11 +11891,31 @@ var ts; } ts.isCallChain = isCallChain; function isOptionalChain(node) { - return isPropertyAccessChain(node) - || isElementAccessChain(node) - || isCallChain(node); + var kind = node.kind; + return !!(node.flags & 32) && + (kind === 193 + || kind === 194 + || kind === 195); } ts.isOptionalChain = isOptionalChain; + function isOptionalChainRoot(node) { + return isOptionalChain(node) && !!node.questionDotToken; + } + ts.isOptionalChainRoot = isOptionalChainRoot; + function isExpressionOfOptionalChainRoot(node) { + return isOptionalChainRoot(node.parent) && node.parent.expression === node; + } + ts.isExpressionOfOptionalChainRoot = isExpressionOfOptionalChainRoot; + function isOutermostOptionalChain(node) { + return !isOptionalChain(node.parent) + || isOptionalChainRoot(node.parent) + || node !== node.parent.expression; + } + ts.isOutermostOptionalChain = isOutermostOptionalChain; + function isNullishCoalesce(node) { + return node.kind === 208 && node.operatorToken.kind === 60; + } + ts.isNullishCoalesce = isNullishCoalesce; function isNewExpression(node) { return node.kind === 196; } @@ -12647,10 +13070,6 @@ var ts; return node.kind === 162; } ts.isGetAccessor = isGetAccessor; - function isOptionalChainRoot(node) { - return ts.isOptionalChain(node) && !!node.questionDotToken; - } - ts.isOptionalChainRoot = isOptionalChainRoot; function hasJSDocNodes(node) { var jsDoc = node.jsDoc; return !!jsDoc && jsDoc.length > 0; @@ -12725,7 +13144,12 @@ var ts; this.checker = checker; } } - function Signature() { } + function Signature(checker, flags) { + this.flags = flags; + if (ts.Debug.isDebugging) { + this.checker = checker; + } + } function Node(kind, pos, end) { this.pos = pos; this.end = end; @@ -12998,195 +13422,6 @@ var ts; return true; } ts.hasZeroOrOneAsteriskCharacter = hasZeroOrOneAsteriskCharacter; - ts.directorySeparator = "/"; - var altDirectorySeparator = "\\"; - var urlSchemeSeparator = "://"; - var backslashRegExp = /\\/g; - function normalizeSlashes(path) { - return path.replace(backslashRegExp, ts.directorySeparator); - } - ts.normalizeSlashes = normalizeSlashes; - function isVolumeCharacter(charCode) { - return (charCode >= 97 && charCode <= 122) || - (charCode >= 65 && charCode <= 90); - } - function getFileUrlVolumeSeparatorEnd(url, start) { - var ch0 = url.charCodeAt(start); - if (ch0 === 58) - return start + 1; - if (ch0 === 37 && url.charCodeAt(start + 1) === 51) { - var ch2 = url.charCodeAt(start + 2); - if (ch2 === 97 || ch2 === 65) - return start + 3; - } - return -1; - } - function getEncodedRootLength(path) { - if (!path) - return 0; - var ch0 = path.charCodeAt(0); - if (ch0 === 47 || ch0 === 92) { - if (path.charCodeAt(1) !== ch0) - return 1; - var p1 = path.indexOf(ch0 === 47 ? ts.directorySeparator : altDirectorySeparator, 2); - if (p1 < 0) - return path.length; - return p1 + 1; - } - if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58) { - var ch2 = path.charCodeAt(2); - if (ch2 === 47 || ch2 === 92) - return 3; - if (path.length === 2) - return 2; - } - var schemeEnd = path.indexOf(urlSchemeSeparator); - if (schemeEnd !== -1) { - var authorityStart = schemeEnd + urlSchemeSeparator.length; - var authorityEnd = path.indexOf(ts.directorySeparator, authorityStart); - if (authorityEnd !== -1) { - var scheme = path.slice(0, schemeEnd); - var authority = path.slice(authorityStart, authorityEnd); - if (scheme === "file" && (authority === "" || authority === "localhost") && - isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) { - var volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2); - if (volumeSeparatorEnd !== -1) { - if (path.charCodeAt(volumeSeparatorEnd) === 47) { - return ~(volumeSeparatorEnd + 1); - } - if (volumeSeparatorEnd === path.length) { - return ~volumeSeparatorEnd; - } - } - } - return ~(authorityEnd + 1); - } - return ~path.length; - } - return 0; - } - function getRootLength(path) { - var rootLength = getEncodedRootLength(path); - return rootLength < 0 ? ~rootLength : rootLength; - } - ts.getRootLength = getRootLength; - function normalizePath(path) { - return ts.resolvePath(path); - } - ts.normalizePath = normalizePath; - function normalizePathAndParts(path) { - path = normalizeSlashes(path); - var _a = reducePathComponents(getPathComponents(path)), root = _a[0], parts = _a.slice(1); - if (parts.length) { - var joinedParts = root + parts.join(ts.directorySeparator); - return { path: ts.hasTrailingDirectorySeparator(path) ? ts.ensureTrailingDirectorySeparator(joinedParts) : joinedParts, parts: parts }; - } - else { - return { path: root, parts: parts }; - } - } - ts.normalizePathAndParts = normalizePathAndParts; - function getDirectoryPath(path) { - path = normalizeSlashes(path); - var rootLength = getRootLength(path); - if (rootLength === path.length) - return path; - path = ts.removeTrailingDirectorySeparator(path); - return path.slice(0, Math.max(rootLength, path.lastIndexOf(ts.directorySeparator))); - } - ts.getDirectoryPath = getDirectoryPath; - function startsWithDirectory(fileName, directoryName, getCanonicalFileName) { - var canonicalFileName = getCanonicalFileName(fileName); - var canonicalDirectoryName = getCanonicalFileName(directoryName); - return ts.startsWith(canonicalFileName, canonicalDirectoryName + "/") || ts.startsWith(canonicalFileName, canonicalDirectoryName + "\\"); - } - ts.startsWithDirectory = startsWithDirectory; - function isUrl(path) { - return getEncodedRootLength(path) < 0; - } - ts.isUrl = isUrl; - function pathIsRelative(path) { - return /^\.\.?($|[\\/])/.test(path); - } - ts.pathIsRelative = pathIsRelative; - function isRootedDiskPath(path) { - return getEncodedRootLength(path) > 0; - } - ts.isRootedDiskPath = isRootedDiskPath; - function isDiskPathRoot(path) { - var rootLength = getEncodedRootLength(path); - return rootLength > 0 && rootLength === path.length; - } - ts.isDiskPathRoot = isDiskPathRoot; - function convertToRelativePath(absoluteOrRelativePath, basePath, getCanonicalFileName) { - return !isRootedDiskPath(absoluteOrRelativePath) - ? absoluteOrRelativePath - : ts.getRelativePathToDirectoryOrUrl(basePath, absoluteOrRelativePath, basePath, getCanonicalFileName, false); - } - ts.convertToRelativePath = convertToRelativePath; - function pathComponents(path, rootLength) { - var root = path.substring(0, rootLength); - var rest = path.substring(rootLength).split(ts.directorySeparator); - if (rest.length && !ts.lastOrUndefined(rest)) - rest.pop(); - return __spreadArrays([root], rest); - } - function getPathComponents(path, currentDirectory) { - if (currentDirectory === void 0) { currentDirectory = ""; } - path = ts.combinePaths(currentDirectory, path); - var rootLength = getRootLength(path); - return pathComponents(path, rootLength); - } - ts.getPathComponents = getPathComponents; - function reducePathComponents(components) { - if (!ts.some(components)) - return []; - var reduced = [components[0]]; - for (var i = 1; i < components.length; i++) { - var component = components[i]; - if (!component) - continue; - if (component === ".") - continue; - if (component === "..") { - if (reduced.length > 1) { - if (reduced[reduced.length - 1] !== "..") { - reduced.pop(); - continue; - } - } - else if (reduced[0]) - continue; - } - reduced.push(component); - } - return reduced; - } - ts.reducePathComponents = reducePathComponents; - function getNormalizedPathComponents(path, currentDirectory) { - return reducePathComponents(getPathComponents(path, currentDirectory)); - } - ts.getNormalizedPathComponents = getNormalizedPathComponents; - function getNormalizedAbsolutePath(fileName, currentDirectory) { - return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory)); - } - ts.getNormalizedAbsolutePath = getNormalizedAbsolutePath; - function getPathFromPathComponents(pathComponents) { - if (pathComponents.length === 0) - return ""; - var root = pathComponents[0] && ts.ensureTrailingDirectorySeparator(pathComponents[0]); - return root + pathComponents.slice(1).join(ts.directorySeparator); - } - ts.getPathFromPathComponents = getPathFromPathComponents; - function getNormalizedAbsolutePathWithoutRoot(fileName, currentDirectory) { - return getPathWithoutRoot(getNormalizedPathComponents(fileName, currentDirectory)); - } - ts.getNormalizedAbsolutePathWithoutRoot = getNormalizedAbsolutePathWithoutRoot; - function getPathWithoutRoot(pathComponents) { - if (pathComponents.length === 0) - return ""; - return pathComponents.slice(1).join(ts.directorySeparator); - } function discoverProbableSymlinks(files, getCanonicalFileName, cwd) { var result = ts.createMap(); var symlinks = ts.flatten(ts.mapDefined(files, function (sf) { @@ -13203,214 +13438,23 @@ var ts; } ts.discoverProbableSymlinks = discoverProbableSymlinks; function guessDirectorySymlink(a, b, cwd, getCanonicalFileName) { - var aParts = getPathComponents(ts.toPath(a, cwd, getCanonicalFileName)); - var bParts = getPathComponents(ts.toPath(b, cwd, getCanonicalFileName)); + var aParts = ts.getPathComponents(ts.toPath(a, cwd, getCanonicalFileName)); + var bParts = ts.getPathComponents(ts.toPath(b, cwd, getCanonicalFileName)); while (!isNodeModulesOrScopedPackageDirectory(aParts[aParts.length - 2], getCanonicalFileName) && !isNodeModulesOrScopedPackageDirectory(bParts[bParts.length - 2], getCanonicalFileName) && getCanonicalFileName(aParts[aParts.length - 1]) === getCanonicalFileName(bParts[bParts.length - 1])) { aParts.pop(); bParts.pop(); } - return [getPathFromPathComponents(aParts), getPathFromPathComponents(bParts)]; + return [ts.getPathFromPathComponents(aParts), ts.getPathFromPathComponents(bParts)]; } function isNodeModulesOrScopedPackageDirectory(s, getCanonicalFileName) { return getCanonicalFileName(s) === "node_modules" || ts.startsWith(s, "@"); } })(ts || (ts = {})); (function (ts) { - function getPathComponentsRelativeTo(from, to, stringEqualityComparer, getCanonicalFileName) { - var fromComponents = ts.reducePathComponents(ts.getPathComponents(from)); - var toComponents = ts.reducePathComponents(ts.getPathComponents(to)); - var start; - for (start = 0; start < fromComponents.length && start < toComponents.length; start++) { - var fromComponent = getCanonicalFileName(fromComponents[start]); - var toComponent = getCanonicalFileName(toComponents[start]); - var comparer = start === 0 ? ts.equateStringsCaseInsensitive : stringEqualityComparer; - if (!comparer(fromComponent, toComponent)) - break; - } - if (start === 0) { - return toComponents; - } - var components = toComponents.slice(start); - var relative = []; - for (; start < fromComponents.length; start++) { - relative.push(".."); - } - return __spreadArrays([""], relative, components); - } - ts.getPathComponentsRelativeTo = getPathComponentsRelativeTo; - function getRelativePathFromFile(from, to, getCanonicalFileName) { - return ensurePathIsNonModuleName(getRelativePathFromDirectory(ts.getDirectoryPath(from), to, getCanonicalFileName)); - } - ts.getRelativePathFromFile = getRelativePathFromFile; - function getRelativePathFromDirectory(fromDirectory, to, getCanonicalFileNameOrIgnoreCase) { - ts.Debug.assert((ts.getRootLength(fromDirectory) > 0) === (ts.getRootLength(to) > 0), "Paths must either both be absolute or both be relative"); - var getCanonicalFileName = typeof getCanonicalFileNameOrIgnoreCase === "function" ? getCanonicalFileNameOrIgnoreCase : ts.identity; - var ignoreCase = typeof getCanonicalFileNameOrIgnoreCase === "boolean" ? getCanonicalFileNameOrIgnoreCase : false; - var pathComponents = getPathComponentsRelativeTo(fromDirectory, to, ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive, getCanonicalFileName); - return ts.getPathFromPathComponents(pathComponents); - } - ts.getRelativePathFromDirectory = getRelativePathFromDirectory; - function getRelativePathToDirectoryOrUrl(directoryPathOrUrl, relativeOrAbsolutePath, currentDirectory, getCanonicalFileName, isAbsolutePathAnUrl) { - var pathComponents = getPathComponentsRelativeTo(resolvePath(currentDirectory, directoryPathOrUrl), resolvePath(currentDirectory, relativeOrAbsolutePath), ts.equateStringsCaseSensitive, getCanonicalFileName); - var firstComponent = pathComponents[0]; - if (isAbsolutePathAnUrl && ts.isRootedDiskPath(firstComponent)) { - var prefix = firstComponent.charAt(0) === ts.directorySeparator ? "file://" : "file:///"; - pathComponents[0] = prefix + firstComponent; - } - return ts.getPathFromPathComponents(pathComponents); - } - ts.getRelativePathToDirectoryOrUrl = getRelativePathToDirectoryOrUrl; - function ensurePathIsNonModuleName(path) { - return ts.getRootLength(path) === 0 && !ts.pathIsRelative(path) ? "./" + path : path; - } - ts.ensurePathIsNonModuleName = ensurePathIsNonModuleName; - function getBaseFileName(path, extensions, ignoreCase) { - path = ts.normalizeSlashes(path); - var rootLength = ts.getRootLength(path); - if (rootLength === path.length) - return ""; - path = removeTrailingDirectorySeparator(path); - var name = path.slice(Math.max(ts.getRootLength(path), path.lastIndexOf(ts.directorySeparator) + 1)); - var extension = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(name, extensions, ignoreCase) : undefined; - return extension ? name.slice(0, name.length - extension.length) : name; - } - ts.getBaseFileName = getBaseFileName; - function combinePaths(path) { - var paths = []; - for (var _i = 1; _i < arguments.length; _i++) { - paths[_i - 1] = arguments[_i]; - } - if (path) - path = ts.normalizeSlashes(path); - for (var _a = 0, paths_1 = paths; _a < paths_1.length; _a++) { - var relativePath = paths_1[_a]; - if (!relativePath) - continue; - relativePath = ts.normalizeSlashes(relativePath); - if (!path || ts.getRootLength(relativePath) !== 0) { - path = relativePath; - } - else { - path = ensureTrailingDirectorySeparator(path) + relativePath; - } - } - return path; - } - ts.combinePaths = combinePaths; - function resolvePath(path) { - var paths = []; - for (var _i = 1; _i < arguments.length; _i++) { - paths[_i - 1] = arguments[_i]; - } - var combined = ts.some(paths) ? combinePaths.apply(void 0, __spreadArrays([path], paths)) : ts.normalizeSlashes(path); - var normalized = ts.getPathFromPathComponents(ts.reducePathComponents(ts.getPathComponents(combined))); - return normalized && hasTrailingDirectorySeparator(combined) ? ensureTrailingDirectorySeparator(normalized) : normalized; - } - ts.resolvePath = resolvePath; - function hasTrailingDirectorySeparator(path) { - if (path.length === 0) - return false; - var ch = path.charCodeAt(path.length - 1); - return ch === 47 || ch === 92; - } - ts.hasTrailingDirectorySeparator = hasTrailingDirectorySeparator; - function removeTrailingDirectorySeparator(path) { - if (hasTrailingDirectorySeparator(path)) { - return path.substr(0, path.length - 1); - } - return path; - } - ts.removeTrailingDirectorySeparator = removeTrailingDirectorySeparator; - function ensureTrailingDirectorySeparator(path) { - if (!hasTrailingDirectorySeparator(path)) { - return path + ts.directorySeparator; - } - return path; - } - ts.ensureTrailingDirectorySeparator = ensureTrailingDirectorySeparator; - var relativePathSegmentRegExp = /(^|\/)\.{0,2}($|\/)/; - function comparePathsWorker(a, b, componentComparer) { - if (a === b) - return 0; - if (a === undefined) - return -1; - if (b === undefined) - return 1; - var aRoot = a.substring(0, ts.getRootLength(a)); - var bRoot = b.substring(0, ts.getRootLength(b)); - var result = ts.compareStringsCaseInsensitive(aRoot, bRoot); - if (result !== 0) { - return result; - } - var aRest = a.substring(aRoot.length); - var bRest = b.substring(bRoot.length); - if (!relativePathSegmentRegExp.test(aRest) && !relativePathSegmentRegExp.test(bRest)) { - return componentComparer(aRest, bRest); - } - var aComponents = ts.reducePathComponents(ts.getPathComponents(a)); - var bComponents = ts.reducePathComponents(ts.getPathComponents(b)); - var sharedLength = Math.min(aComponents.length, bComponents.length); - for (var i = 1; i < sharedLength; i++) { - var result_1 = componentComparer(aComponents[i], bComponents[i]); - if (result_1 !== 0) { - return result_1; - } - } - return ts.compareValues(aComponents.length, bComponents.length); - } - function comparePathsCaseSensitive(a, b) { - return comparePathsWorker(a, b, ts.compareStringsCaseSensitive); - } - ts.comparePathsCaseSensitive = comparePathsCaseSensitive; - function comparePathsCaseInsensitive(a, b) { - return comparePathsWorker(a, b, ts.compareStringsCaseInsensitive); - } - ts.comparePathsCaseInsensitive = comparePathsCaseInsensitive; - function comparePaths(a, b, currentDirectory, ignoreCase) { - if (typeof currentDirectory === "string") { - a = combinePaths(currentDirectory, a); - b = combinePaths(currentDirectory, b); - } - else if (typeof currentDirectory === "boolean") { - ignoreCase = currentDirectory; - } - return comparePathsWorker(a, b, ts.getStringComparer(ignoreCase)); - } - ts.comparePaths = comparePaths; - function containsPath(parent, child, currentDirectory, ignoreCase) { - if (typeof currentDirectory === "string") { - parent = combinePaths(currentDirectory, parent); - child = combinePaths(currentDirectory, child); - } - else if (typeof currentDirectory === "boolean") { - ignoreCase = currentDirectory; - } - if (parent === undefined || child === undefined) - return false; - if (parent === child) - return true; - var parentComponents = ts.reducePathComponents(ts.getPathComponents(parent)); - var childComponents = ts.reducePathComponents(ts.getPathComponents(child)); - if (childComponents.length < parentComponents.length) { - return false; - } - var componentEqualityComparer = ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive; - for (var i = 0; i < parentComponents.length; i++) { - var equalityComparer = i === 0 ? ts.equateStringsCaseInsensitive : componentEqualityComparer; - if (!equalityComparer(parentComponents[i], childComponents[i])) { - return false; - } - } - return true; - } - ts.containsPath = containsPath; - function isDirectorySeparator(charCode) { - return charCode === 47 || charCode === 92; - } function stripLeadingDirectorySeparator(s) { - return isDirectorySeparator(s.charCodeAt(0)) ? s.slice(1) : undefined; + return ts.isAnyDirectorySeparator(s.charCodeAt(0)) ? s.slice(1) : undefined; } function tryRemoveDirectoryPrefix(path, dirPath, getCanonicalFileName) { var withoutPrefix = ts.tryRemovePrefix(path, dirPath, getCanonicalFileName); @@ -13426,10 +13470,6 @@ var ts; return "\\" + match; } var wildcardCharCodes = [42, 63]; - function hasExtension(fileName) { - return ts.stringContains(getBaseFileName(fileName), "."); - } - ts.hasExtension = hasExtension; ts.commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"]; var implicitExcludePathRegexPattern = "(?!(" + ts.commonPackageFolders.join("|") + ")(/|$))"; var filesMatcher = { @@ -13484,7 +13524,7 @@ var ts; if (usage !== "exclude" && lastComponent === "**") { return undefined; } - components[0] = removeTrailingDirectorySeparator(components[0]); + components[0] = ts.removeTrailingDirectorySeparator(components[0]); if (isImplicitGlob(lastComponent)) { components.push("**", "*"); } @@ -13536,7 +13576,7 @@ var ts; function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory) { path = ts.normalizePath(path); currentDirectory = ts.normalizePath(currentDirectory); - var absolutePath = combinePaths(currentDirectory, path); + var absolutePath = ts.combinePaths(currentDirectory, path); return { includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^" + pattern + "$"; }), includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"), @@ -13562,7 +13602,7 @@ var ts; var toCanonical = ts.createGetCanonicalFileName(useCaseSensitiveFileNames); for (var _i = 0, _a = patterns.basePaths; _i < _a.length; _i++) { var basePath = _a[_i]; - visitDirectory(basePath, combinePaths(currentDirectory, basePath), depth); + visitDirectory(basePath, ts.combinePaths(currentDirectory, basePath), depth); } return ts.flatten(results); function visitDirectory(path, absolutePath, depth) { @@ -13572,8 +13612,8 @@ var ts; visited.set(canonicalPath, true); var _a = getFileSystemEntries(path), files = _a.files, directories = _a.directories; var _loop_1 = function (current) { - var name = combinePaths(path, current); - var absoluteName = combinePaths(absolutePath, current); + var name = ts.combinePaths(path, current); + var absoluteName = ts.combinePaths(absolutePath, current); if (extensions && !ts.fileExtensionIsOneOf(name, extensions)) return "continue"; if (excludeRegex && excludeRegex.test(absoluteName)) @@ -13600,8 +13640,8 @@ var ts; } for (var _c = 0, _d = ts.sort(directories, ts.compareStringsCaseSensitive); _c < _d.length; _c++) { var current = _d[_c]; - var name = combinePaths(path, current); - var absoluteName = combinePaths(absolutePath, current); + var name = ts.combinePaths(path, current); + var absoluteName = ts.combinePaths(absolutePath, current); if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) && (!excludeRegex || !excludeRegex.test(absoluteName))) { visitDirectory(name, absoluteName, depth); @@ -13616,12 +13656,12 @@ var ts; var includeBasePaths = []; for (var _i = 0, includes_1 = includes; _i < includes_1.length; _i++) { var include = includes_1[_i]; - var absolute = ts.isRootedDiskPath(include) ? include : ts.normalizePath(combinePaths(path, include)); + var absolute = ts.isRootedDiskPath(include) ? include : ts.normalizePath(ts.combinePaths(path, include)); includeBasePaths.push(getIncludeBasePath(absolute)); } includeBasePaths.sort(ts.getStringComparer(!useCaseSensitiveFileNames)); var _loop_2 = function (includeBasePath) { - if (ts.every(basePaths, function (basePath) { return !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames); })) { + if (ts.every(basePaths, function (basePath) { return !ts.containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames); })) { basePaths.push(includeBasePath); } }; @@ -13635,9 +13675,9 @@ var ts; function getIncludeBasePath(absolute) { var wildcardOffset = ts.indexOfAnyCharCode(absolute, wildcardCharCodes); if (wildcardOffset < 0) { - return !hasExtension(absolute) + return !ts.hasExtension(absolute) ? absolute - : removeTrailingDirectorySeparator(ts.getDirectoryPath(absolute)); + : ts.removeTrailingDirectorySeparator(ts.getDirectoryPath(absolute)); } return absolute.substring(0, absolute.lastIndexOf(ts.directorySeparator, wildcardOffset)); } @@ -13699,10 +13739,6 @@ var ts; return ts.some(ts.supportedJSExtensions, function (extension) { return ts.fileExtensionIs(fileName, extension); }); } ts.hasJSFileExtension = hasJSFileExtension; - function hasJSOrJsonFileExtension(fileName) { - return ts.supportedJSAndJsonExtensions.some(function (ext) { return ts.fileExtensionIs(fileName, ext); }); - } - ts.hasJSOrJsonFileExtension = hasJSOrJsonFileExtension; function hasTSFileExtension(fileName) { return ts.some(ts.supportedTSExtensions, function (extension) { return ts.fileExtensionIs(fileName, extension); }); } @@ -13772,14 +13808,9 @@ var ts; } ts.removeExtension = removeExtension; function changeExtension(path, newExtension) { - return changeAnyExtension(path, newExtension, extensionsToRemove, false); + return ts.changeAnyExtension(path, newExtension, extensionsToRemove, false); } ts.changeExtension = changeExtension; - function changeAnyExtension(path, ext, extensions, ignoreCase) { - var pathext = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(path, extensions, ignoreCase) : getAnyExtensionFromPath(path); - return pathext ? path.slice(0, path.length - pathext.length) + (ts.startsWith(ext, ".") ? ext : "." + ext) : path; - } - ts.changeAnyExtension = changeAnyExtension; function tryParsePattern(pattern) { ts.Debug.assert(ts.hasZeroOrOneAsteriskCharacter(pattern)); var indexOfStar = pattern.indexOf("*"); @@ -13814,34 +13845,6 @@ var ts; return ts.find(extensionsToRemove, function (e) { return ts.fileExtensionIs(path, e); }); } ts.tryGetExtensionFromPath = tryGetExtensionFromPath; - function getAnyExtensionFromPathWorker(path, extensions, stringEqualityComparer) { - if (typeof extensions === "string") - extensions = [extensions]; - for (var _i = 0, extensions_2 = extensions; _i < extensions_2.length; _i++) { - var extension = extensions_2[_i]; - if (!ts.startsWith(extension, ".")) - extension = "." + extension; - if (path.length >= extension.length && path.charAt(path.length - extension.length) === ".") { - var pathExtension = path.slice(path.length - extension.length); - if (stringEqualityComparer(pathExtension, extension)) { - return pathExtension; - } - } - } - return ""; - } - function getAnyExtensionFromPath(path, extensions, ignoreCase) { - if (extensions) { - return getAnyExtensionFromPathWorker(path, extensions, ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive); - } - var baseFileName = getBaseFileName(path); - var extensionIndex = baseFileName.lastIndexOf("."); - if (extensionIndex >= 0) { - return baseFileName.substring(extensionIndex); - } - return ""; - } - ts.getAnyExtensionFromPath = getAnyExtensionFromPath; function isCheckJsEnabledForFile(sourceFile, compilerOptions) { return sourceFile.checkJsDirective ? sourceFile.checkJsDirective.enabled : compilerOptions.checkJs; } @@ -14865,6 +14868,9 @@ var ts; function doInYieldAndAwaitContext(func) { return doInsideOfContext(8192 | 32768, func); } + function doOutsideOfYieldAndAwaitContext(func) { + return doOutsideOfContext(8192 | 32768, func); + } function inContext(flags) { return (contextFlags & flags) !== 0; } @@ -18315,9 +18321,7 @@ var ts; node.exclamationToken = parseTokenNode(); } node.type = parseTypeAnnotation(); - node.initializer = ts.hasModifier(node, 32) - ? allowInAnd(parseInitializer) - : doOutsideOfContext(8192 | 4096, parseInitializer); + node.initializer = doOutsideOfContext(8192 | 32768 | 4096, parseInitializer); parseSemicolon(); return finishNode(node); } @@ -18561,7 +18565,7 @@ var ts; parseExpected(87); node.name = parseIdentifier(); if (parseExpected(18)) { - node.members = parseDelimitedList(6, parseEnumMember); + node.members = doOutsideOfYieldAndAwaitContext(function () { return parseDelimitedList(6, parseEnumMember); }); parseExpected(19); } else { @@ -20280,6 +20284,15 @@ var ts; isCommandLineOnly: true, description: ts.Diagnostics.Print_the_final_configuration_instead_of_building }, + { + name: "listFilesOnly", + type: "boolean", + category: ts.Diagnostics.Command_line_Options, + affectsSemanticDiagnostics: true, + affectsEmit: true, + isCommandLineOnly: true, + description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing + }, { name: "target", shortName: "t", @@ -21076,8 +21089,7 @@ var ts; } } ts.parseListTypeOption = parseListTypeOption; - function parseCommandLineWorker(getOptionNameMap, _a, commandLine, readFile) { - var unknownOptionDiagnostic = _a[0], optionTypeMismatchDiagnostic = _a[1]; + function parseCommandLineWorker(getOptionNameMap, diagnostics, commandLine, readFile) { var options = {}; var fileNames = []; var errors = []; @@ -21103,7 +21115,7 @@ var ts; } else { if (!args[i] && opt.type !== "boolean") { - errors.push(ts.createCompilerDiagnostic(optionTypeMismatchDiagnostic, opt.name)); + errors.push(ts.createCompilerDiagnostic(diagnostics.optionTypeMismatchDiagnostic, opt.name)); } switch (opt.type) { case "number": @@ -21136,7 +21148,13 @@ var ts; } } else { - errors.push(ts.createCompilerDiagnostic(unknownOptionDiagnostic, s)); + var possibleOption = ts.getSpellingSuggestion(s, ts.optionDeclarations, function (opt) { return "--" + opt.name; }); + if (possibleOption) { + errors.push(ts.createCompilerDiagnostic(diagnostics.unknownDidYouMeanDiagnostic, s, possibleOption.name)); + } + else { + errors.push(ts.createCompilerDiagnostic(diagnostics.unknownOptionDiagnostic, s)); + } } } else { @@ -21179,11 +21197,13 @@ var ts; parseStrings(args); } } + var compilerOptionsDefaultDiagnostics = { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_compiler_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_compiler_option_0_Did_you_mean_1, + optionTypeMismatchDiagnostic: ts.Diagnostics.Compiler_option_0_expects_an_argument + }; function parseCommandLine(commandLine, readFile) { - return parseCommandLineWorker(getOptionNameMap, [ - ts.Diagnostics.Unknown_compiler_option_0, - ts.Diagnostics.Compiler_option_0_expects_an_argument - ], commandLine, readFile); + return parseCommandLineWorker(getOptionNameMap, compilerOptionsDefaultDiagnostics, commandLine, readFile); } ts.parseCommandLine = parseCommandLine; function getOptionFromName(optionName, allowShort) { @@ -21205,10 +21225,11 @@ var ts; function parseBuildCommand(args) { var buildOptionNameMap; var returnBuildOptionNameMap = function () { return (buildOptionNameMap || (buildOptionNameMap = createOptionNameMap(ts.buildOpts))); }; - var _a = parseCommandLineWorker(returnBuildOptionNameMap, [ - ts.Diagnostics.Unknown_build_option_0, - ts.Diagnostics.Build_option_0_requires_a_value_of_type_1 - ], args), options = _a.options, projects = _a.fileNames, errors = _a.errors; + var _a = parseCommandLineWorker(returnBuildOptionNameMap, { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_build_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_build_option_0_Did_you_mean_1, + optionTypeMismatchDiagnostic: ts.Diagnostics.Build_option_0_requires_a_value_of_type_1 + }, args), options = _a.options, projects = _a.fileNames, errors = _a.errors; var buildOptions = options; if (projects.length === 0) { projects.push("."); @@ -21236,92 +21257,7 @@ var ts; var diagnostic = ts.createCompilerDiagnostic.apply(undefined, arguments); return diagnostic.messageText; } - function printVersion() { - ts.sys.write(getDiagnosticText(ts.Diagnostics.Version_0, ts.version) + ts.sys.newLine); - } - ts.printVersion = printVersion; - function printHelp(optionsList, syntaxPrefix) { - if (syntaxPrefix === void 0) { syntaxPrefix = ""; } - var output = []; - var syntaxLength = getDiagnosticText(ts.Diagnostics.Syntax_Colon_0, "").length; - var examplesLength = getDiagnosticText(ts.Diagnostics.Examples_Colon_0, "").length; - var marginLength = Math.max(syntaxLength, examplesLength); - var syntax = makePadding(marginLength - syntaxLength); - syntax += "tsc " + syntaxPrefix + "[" + getDiagnosticText(ts.Diagnostics.options) + "] [" + getDiagnosticText(ts.Diagnostics.file) + "...]"; - output.push(getDiagnosticText(ts.Diagnostics.Syntax_Colon_0, syntax)); - output.push(ts.sys.newLine + ts.sys.newLine); - var padding = makePadding(marginLength); - output.push(getDiagnosticText(ts.Diagnostics.Examples_Colon_0, makePadding(marginLength - examplesLength) + "tsc hello.ts") + ts.sys.newLine); - output.push(padding + "tsc --outFile file.js file.ts" + ts.sys.newLine); - output.push(padding + "tsc @args.txt" + ts.sys.newLine); - output.push(padding + "tsc --build tsconfig.json" + ts.sys.newLine); - output.push(ts.sys.newLine); - output.push(getDiagnosticText(ts.Diagnostics.Options_Colon) + ts.sys.newLine); - marginLength = 0; - var usageColumn = []; - var descriptionColumn = []; - var optionsDescriptionMap = ts.createMap(); - for (var _i = 0, optionsList_1 = optionsList; _i < optionsList_1.length; _i++) { - var option = optionsList_1[_i]; - if (!option.description) { - continue; - } - var usageText_1 = " "; - if (option.shortName) { - usageText_1 += "-" + option.shortName; - usageText_1 += getParamType(option); - usageText_1 += ", "; - } - usageText_1 += "--" + option.name; - usageText_1 += getParamType(option); - usageColumn.push(usageText_1); - var description = void 0; - if (option.name === "lib") { - description = getDiagnosticText(option.description); - var element = option.element; - var typeMap = element.type; - optionsDescriptionMap.set(description, ts.arrayFrom(typeMap.keys()).map(function (key) { return "'" + key + "'"; })); - } - else { - description = getDiagnosticText(option.description); - } - descriptionColumn.push(description); - marginLength = Math.max(usageText_1.length, marginLength); - } - var usageText = " @<" + getDiagnosticText(ts.Diagnostics.file) + ">"; - usageColumn.push(usageText); - descriptionColumn.push(getDiagnosticText(ts.Diagnostics.Insert_command_line_options_and_files_from_a_file)); - marginLength = Math.max(usageText.length, marginLength); - for (var i = 0; i < usageColumn.length; i++) { - var usage = usageColumn[i]; - var description = descriptionColumn[i]; - var kindsList = optionsDescriptionMap.get(description); - output.push(usage + makePadding(marginLength - usage.length + 2) + description + ts.sys.newLine); - if (kindsList) { - output.push(makePadding(marginLength + 4)); - for (var _a = 0, kindsList_1 = kindsList; _a < kindsList_1.length; _a++) { - var kind = kindsList_1[_a]; - output.push(kind + " "); - } - output.push(ts.sys.newLine); - } - } - for (var _b = 0, output_1 = output; _b < output_1.length; _b++) { - var line = output_1[_b]; - ts.sys.write(line); - } - return; - function getParamType(option) { - if (option.paramType !== undefined) { - return " " + getDiagnosticText(option.paramType); - } - return ""; - } - function makePadding(paddingLength) { - return Array(paddingLength + 1).join(" "); - } - } - ts.printHelp = printHelp; + ts.getDiagnosticText = getDiagnosticText; function getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host, extendedConfigCache) { var configFileText; try { @@ -21387,19 +21323,28 @@ var ts; name: "compilerOptions", type: "object", elementOptions: commandLineOptionsToMap(ts.optionDeclarations), - extraKeyDiagnosticMessage: ts.Diagnostics.Unknown_compiler_option_0 + extraKeyDiagnostics: { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_compiler_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_compiler_option_0_Did_you_mean_1 + }, }, { name: "typingOptions", type: "object", elementOptions: commandLineOptionsToMap(ts.typeAcquisitionDeclarations), - extraKeyDiagnosticMessage: ts.Diagnostics.Unknown_type_acquisition_option_0 + extraKeyDiagnostics: { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1 + }, }, { name: "typeAcquisition", type: "object", elementOptions: commandLineOptionsToMap(ts.typeAcquisitionDeclarations), - extraKeyDiagnosticMessage: ts.Diagnostics.Unknown_type_acquisition_option_0 + extraKeyDiagnostics: { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1 + } }, { name: "extends", @@ -21455,7 +21400,7 @@ var ts; function isRootOptionMap(knownOptions) { return knownRootOptions && knownRootOptions.elementOptions === knownOptions; } - function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnosticMessage, parentOption) { + function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnostics, parentOption) { var result = returnValue ? {} : undefined; for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var element = _a[_i]; @@ -21472,8 +21417,19 @@ var ts; var textOfKey = ts.getTextOfPropertyName(element.name); var keyText = textOfKey && ts.unescapeLeadingUnderscores(textOfKey); var option = keyText && knownOptions ? knownOptions.get(keyText) : undefined; - if (keyText && extraKeyDiagnosticMessage && !option) { - errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnosticMessage, keyText)); + if (keyText && extraKeyDiagnostics && !option) { + if (knownOptions) { + var possibleOption = ts.getSpellingSuggestion(keyText, ts.arrayFrom(knownOptions.keys()), ts.identity); + if (possibleOption) { + errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnostics.unknownDidYouMeanDiagnostic, keyText, possibleOption)); + } + else { + errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnostics.unknownOptionDiagnostic, keyText)); + } + } + else { + errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnostics.unknownOptionDiagnostic, keyText)); + } } var value = convertPropertyValueToJson(element.initializer, option); if (typeof keyText !== "undefined") { @@ -21544,8 +21500,8 @@ var ts; reportInvalidOptionValue(option && option.type !== "object"); var objectLiteralExpression = valueExpression; if (option) { - var _a = option, elementOptions = _a.elementOptions, extraKeyDiagnosticMessage = _a.extraKeyDiagnosticMessage, optionName = _a.name; - return convertObjectLiteralExpressionToJson(objectLiteralExpression, elementOptions, extraKeyDiagnosticMessage, optionName); + var _a = option, elementOptions = _a.elementOptions, extraKeyDiagnostics = _a.extraKeyDiagnostics, optionName = _a.name; + return convertObjectLiteralExpressionToJson(objectLiteralExpression, elementOptions, extraKeyDiagnostics, optionName); } else { return convertObjectLiteralExpressionToJson(objectLiteralExpression, undefined, undefined, undefined); @@ -21591,7 +21547,7 @@ var ts; } function convertToTSConfig(configParseResult, configFileName, host) { var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames); - var files = ts.map(ts.filter(configParseResult.fileNames, (!configParseResult.configFileSpecs || !configParseResult.configFileSpecs.validatedIncludeSpecs) ? function (_) { return true; } : matchesSpecs(configFileName, configParseResult.configFileSpecs.validatedIncludeSpecs, configParseResult.configFileSpecs.validatedExcludeSpecs)), function (f) { return ts.getRelativePathFromFile(ts.getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), ts.getNormalizedAbsolutePath(f, host.getCurrentDirectory()), getCanonicalFileName); }); + var files = ts.map(ts.filter(configParseResult.fileNames, (!configParseResult.configFileSpecs || !configParseResult.configFileSpecs.validatedIncludeSpecs) ? function (_) { return true; } : matchesSpecs(configFileName, configParseResult.configFileSpecs.validatedIncludeSpecs, configParseResult.configFileSpecs.validatedExcludeSpecs, host)), function (f) { return ts.getRelativePathFromFile(ts.getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), ts.getNormalizedAbsolutePath(f, host.getCurrentDirectory()), getCanonicalFileName); }); var optionMap = serializeCompilerOptions(configParseResult.options, { configFilePath: ts.getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), useCaseSensitiveFileNames: host.useCaseSensitiveFileNames }); var config = __assign(__assign({ compilerOptions: __assign(__assign({}, ts.arrayFrom(optionMap.entries()).reduce(function (prev, cur) { var _a; @@ -21612,12 +21568,12 @@ var ts; return undefined; return specs; } - function matchesSpecs(path, includeSpecs, excludeSpecs) { + function matchesSpecs(path, includeSpecs, excludeSpecs, host) { if (!includeSpecs) return function (_) { return true; }; - var patterns = ts.getFileMatcherPatterns(path, excludeSpecs, includeSpecs, ts.sys.useCaseSensitiveFileNames, ts.sys.getCurrentDirectory()); - var excludeRe = patterns.excludePattern && ts.getRegexFromPattern(patterns.excludePattern, ts.sys.useCaseSensitiveFileNames); - var includeRe = patterns.includeFilePattern && ts.getRegexFromPattern(patterns.includeFilePattern, ts.sys.useCaseSensitiveFileNames); + var patterns = ts.getFileMatcherPatterns(path, excludeSpecs, includeSpecs, host.useCaseSensitiveFileNames, host.getCurrentDirectory()); + var excludeRe = patterns.excludePattern && ts.getRegexFromPattern(patterns.excludePattern, host.useCaseSensitiveFileNames); + var includeRe = patterns.includeFilePattern && ts.getRegexFromPattern(patterns.includeFilePattern, host.useCaseSensitiveFileNames); if (includeRe) { if (excludeRe) { return function (path) { return !(includeRe.test(path) && !excludeRe.test(path)); }; @@ -21775,6 +21731,34 @@ var ts; } } ts.generateTSConfig = generateTSConfig; + function convertToOptionsWithAbsolutePaths(options, toAbsolutePath) { + var result = {}; + var optionsNameMap = getOptionNameMap().optionNameMap; + for (var name in options) { + if (ts.hasProperty(options, name)) { + result[name] = convertToOptionValueWithAbsolutePaths(optionsNameMap.get(name.toLowerCase()), options[name], toAbsolutePath); + } + } + if (result.configFilePath) { + result.configFilePath = toAbsolutePath(result.configFilePath); + } + return result; + } + ts.convertToOptionsWithAbsolutePaths = convertToOptionsWithAbsolutePaths; + function convertToOptionValueWithAbsolutePaths(option, value, toAbsolutePath) { + if (option) { + if (option.type === "list") { + var values = value; + if (option.element.isFilePath && values.length) { + return values.map(toAbsolutePath); + } + } + else if (option.isFilePath) { + return toAbsolutePath(value); + } + } + return value; + } function parseJsonConfigFileContent(json, host, basePath, existingOptions, configFileName, resolutionStack, extraFileExtensions, extendedConfigCache) { return parseJsonConfigFileContentWorker(json, undefined, host, basePath, existingOptions, configFileName, resolutionStack, extraFileExtensions, extendedConfigCache); } @@ -22125,7 +22109,7 @@ var ts; } function convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName) { var options = getDefaultCompilerOptions(configFileName); - convertOptionsFromJson(ts.optionDeclarations, jsonOptions, basePath, options, ts.Diagnostics.Unknown_compiler_option_0, errors); + convertOptionsFromJson(ts.optionDeclarations, jsonOptions, basePath, options, compilerOptionsDefaultDiagnostics, errors); if (configFileName) { options.configFilePath = ts.normalizeSlashes(configFileName); } @@ -22137,10 +22121,14 @@ var ts; function convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName) { var options = getDefaultTypeAcquisition(configFileName); var typeAcquisition = convertEnableAutoDiscoveryToEnable(jsonOptions); - convertOptionsFromJson(ts.typeAcquisitionDeclarations, typeAcquisition, basePath, options, ts.Diagnostics.Unknown_type_acquisition_option_0, errors); + var diagnostics = { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1, + }; + convertOptionsFromJson(ts.typeAcquisitionDeclarations, typeAcquisition, basePath, options, diagnostics, errors); return options; } - function convertOptionsFromJson(optionDeclarations, jsonOptions, basePath, defaultOptions, diagnosticMessage, errors) { + function convertOptionsFromJson(optionDeclarations, jsonOptions, basePath, defaultOptions, diagnostics, errors) { if (!jsonOptions) { return; } @@ -22151,7 +22139,13 @@ var ts; defaultOptions[opt.name] = convertJsonOption(opt, jsonOptions[id], basePath, errors); } else { - errors.push(ts.createCompilerDiagnostic(diagnosticMessage, id)); + var possibleOption = ts.getSpellingSuggestion(id, optionDeclarations, function (opt) { return opt.name; }); + if (possibleOption) { + errors.push(ts.createCompilerDiagnostic(diagnostics.unknownDidYouMeanDiagnostic, id, possibleOption.name)); + } + else { + errors.push(ts.createCompilerDiagnostic(diagnostics.unknownOptionDiagnostic, id)); + } } } } @@ -22187,7 +22181,7 @@ var ts; } function normalizeNonListOptionValue(option, basePath, value) { if (option.isFilePath) { - value = ts.normalizePath(ts.combinePaths(basePath, value)); + value = ts.getNormalizedAbsolutePath(value, basePath); if (value === "") { value = "."; } @@ -23604,7 +23598,10 @@ var ts; } return 1; } - var flowNodeCreated = ts.identity; + function initFlowNode(node) { + ts.Debug.attachFlowNodeDebugInfo(node); + return node; + } var binder = createBinder(); function bindSourceFile(file, options) { ts.performance.mark("beforeBind"); @@ -23632,6 +23629,7 @@ var ts; var currentReturnTarget; var currentTrueTarget; var currentFalseTarget; + var currentExceptionTarget; var preSwitchCaseFlow; var activeLabels; var hasExplicitReturn; @@ -23656,6 +23654,8 @@ var ts; symbolCount = 0; skipTransformFlagAggregation = file.isDeclarationFile; Symbol = ts.objectAllocator.getSymbolConstructor(); + ts.Debug.attachFlowNodeDebugInfo(unreachableFlow); + ts.Debug.attachFlowNodeDebugInfo(reportedUnreachableFlow); if (!file.locals) { bind(file); file.symbolCount = symbolCount; @@ -23678,6 +23678,7 @@ var ts; currentReturnTarget = undefined; currentTrueTarget = undefined; currentFalseTarget = undefined; + currentExceptionTarget = undefined; activeLabels = undefined; hasExplicitReturn = false; emitFlags = 0; @@ -23906,27 +23907,27 @@ var ts; blockScopeContainer.locals = undefined; } if (containerFlags & 4) { - var saveFlowNodeCreated = flowNodeCreated; var saveCurrentFlow = currentFlow; var saveBreakTarget = currentBreakTarget; var saveContinueTarget = currentContinueTarget; var saveReturnTarget = currentReturnTarget; + var saveExceptionTarget = currentExceptionTarget; var saveActiveLabels = activeLabels; var saveHasExplicitReturn = hasExplicitReturn; var isIIFE = containerFlags & 16 && !ts.hasModifier(node, 256) && !node.asteriskToken && !!ts.getImmediatelyInvokedFunctionExpression(node); if (!isIIFE) { - currentFlow = { flags: 2 }; + currentFlow = initFlowNode({ flags: 2 }); if (containerFlags & (16 | 128)) { currentFlow.node = node; } } currentReturnTarget = isIIFE || node.kind === 161 ? createBranchLabel() : undefined; + currentExceptionTarget = undefined; currentBreakTarget = undefined; currentContinueTarget = undefined; activeLabels = undefined; hasExplicitReturn = false; - flowNodeCreated = ts.identity; bindChildren(node); node.flags &= ~2816; if (!(currentFlow.flags & 1) && containerFlags & 8 && ts.nodeIsPresent(node.body)) { @@ -23951,9 +23952,9 @@ var ts; currentBreakTarget = saveBreakTarget; currentContinueTarget = saveContinueTarget; currentReturnTarget = saveReturnTarget; + currentExceptionTarget = saveExceptionTarget; activeLabels = saveActiveLabels; hasExplicitReturn = saveHasExplicitReturn; - flowNodeCreated = saveFlowNodeCreated; } else if (containerFlags & 64) { seenThisKeyword = false; @@ -24094,9 +24095,6 @@ var ts; case 309: bindJSDocTypeAlias(node); break; - case 307: - bindJSDocClassTag(node); - break; case 288: { bindEachFunctionsFirst(node.statements); bind(node.endOfFileToken); @@ -24135,9 +24133,8 @@ var ts; function isNarrowableReference(expr) { return expr.kind === 75 || expr.kind === 103 || expr.kind === 101 || (ts.isPropertyAccessExpression(expr) || ts.isNonNullExpression(expr) || ts.isParenthesizedExpression(expr)) && isNarrowableReference(expr.expression) || - ts.isElementAccessExpression(expr) && - ts.isStringOrNumericLiteralLike(expr.argumentExpression) && - isNarrowableReference(expr.expression); + ts.isElementAccessExpression(expr) && ts.isStringOrNumericLiteralLike(expr.argumentExpression) && isNarrowableReference(expr.expression) || + ts.isOptionalChain(expr); } function hasNarrowableArgument(expr) { if (expr.arguments) { @@ -24194,10 +24191,10 @@ var ts; return isNarrowableReference(expr); } function createBranchLabel() { - return { flags: 4, antecedents: undefined }; + return initFlowNode({ flags: 4, antecedents: undefined }); } function createLoopLabel() { - return { flags: 8, antecedents: undefined }; + return initFlowNode({ flags: 8, antecedents: undefined }); } function setFlowNodeReferenced(flow) { flow.flags |= flow.flags & 1024 ? 2048 : 1024; @@ -24215,36 +24212,32 @@ var ts; if (!expression) { return flags & 32 ? antecedent : unreachableFlow; } - if (expression.kind === 105 && flags & 64 || - expression.kind === 90 && flags & 32) { - if (!ts.isOptionalChainRoot(expression.parent)) { - return unreachableFlow; - } + if ((expression.kind === 105 && flags & 64 || + expression.kind === 90 && flags & 32) && + !ts.isExpressionOfOptionalChainRoot(expression) && !ts.isNullishCoalesce(expression.parent)) { + return unreachableFlow; } if (!isNarrowingExpression(expression)) { return antecedent; } setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: flags, antecedent: antecedent, node: expression }); + return initFlowNode({ flags: flags, antecedent: antecedent, node: expression }); } function createFlowSwitchClause(antecedent, switchStatement, clauseStart, clauseEnd) { - if (!isNarrowingExpression(switchStatement.expression)) { - return antecedent; - } setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: 128, antecedent: antecedent, switchStatement: switchStatement, clauseStart: clauseStart, clauseEnd: clauseEnd }); + return initFlowNode({ flags: 128, antecedent: antecedent, switchStatement: switchStatement, clauseStart: clauseStart, clauseEnd: clauseEnd }); } - function createFlowAssignment(antecedent, node) { + function createFlowMutation(flags, antecedent, node) { setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: 16, antecedent: antecedent, node: node }); + var result = initFlowNode({ flags: flags, antecedent: antecedent, node: node }); + if (currentExceptionTarget) { + addAntecedent(currentExceptionTarget, result); + } + return result; } function createFlowCall(antecedent, node) { setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: 512, antecedent: antecedent, node: node }); - } - function createFlowArrayMutation(antecedent, node) { - setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: 256, antecedent: antecedent, node: node }); + return initFlowNode({ flags: 512, antecedent: antecedent, node: node }); } function finishFlowLabel(flow) { var antecedents = flow.antecedents; @@ -24304,7 +24297,7 @@ var ts; } function bindCondition(node, trueTarget, falseTarget) { doWithConditionalBranches(bind, node, trueTarget, falseTarget); - if (!node || !isLogicalExpression(node) && !(ts.isOptionalChain(node) && isOutermostOptionalChain(node))) { + if (!node || !isLogicalExpression(node) && !(ts.isOptionalChain(node) && ts.isOutermostOptionalChain(node))) { addAntecedent(trueTarget, createFlowCondition(32, currentFlow, node)); addAntecedent(falseTarget, createFlowCondition(64, currentFlow, node)); } @@ -24433,46 +24426,25 @@ var ts; } function bindTryStatement(node) { var preFinallyLabel = createBranchLabel(); - var preTryFlow = currentFlow; - var tryPriors = []; - var oldFlowNodeCreated = flowNodeCreated; - if (node.catchClause || node.finallyBlock) { - flowNodeCreated = function (node) { return (tryPriors.push(node), node); }; - } + var saveExceptionTarget = currentExceptionTarget; + currentExceptionTarget = createBranchLabel(); + addAntecedent(currentExceptionTarget, currentFlow); bind(node.tryBlock); - flowNodeCreated = oldFlowNodeCreated; addAntecedent(preFinallyLabel, currentFlow); var flowAfterTry = currentFlow; var flowAfterCatch = unreachableFlow; if (node.catchClause) { - currentFlow = preTryFlow; - if (tryPriors.length) { - var preCatchFlow = createBranchLabel(); - addAntecedent(preCatchFlow, currentFlow); - for (var _i = 0, tryPriors_1 = tryPriors; _i < tryPriors_1.length; _i++) { - var p = tryPriors_1[_i]; - addAntecedent(preCatchFlow, p); - } - currentFlow = finishFlowLabel(preCatchFlow); - } + currentFlow = finishFlowLabel(currentExceptionTarget); + currentExceptionTarget = createBranchLabel(); + addAntecedent(currentExceptionTarget, currentFlow); bind(node.catchClause); addAntecedent(preFinallyLabel, currentFlow); flowAfterCatch = currentFlow; } + var exceptionTarget = finishFlowLabel(currentExceptionTarget); + currentExceptionTarget = saveExceptionTarget; if (node.finallyBlock) { - var preFinallyPrior = preTryFlow; - if (!node.catchClause) { - if (tryPriors.length) { - var preFinallyFlow_1 = createBranchLabel(); - addAntecedent(preFinallyFlow_1, preTryFlow); - for (var _a = 0, tryPriors_2 = tryPriors; _a < tryPriors_2.length; _a++) { - var p = tryPriors_2[_a]; - addAntecedent(preFinallyFlow_1, p); - } - preFinallyPrior = finishFlowLabel(preFinallyFlow_1); - } - } - var preFinallyFlow = { flags: 4096, antecedent: preFinallyPrior, lock: {} }; + var preFinallyFlow = initFlowNode({ flags: 4096, antecedent: exceptionTarget, lock: {} }); addAntecedent(preFinallyLabel, preFinallyFlow); currentFlow = finishFlowLabel(preFinallyLabel); bind(node.finallyBlock); @@ -24484,7 +24456,7 @@ var ts; } } if (!(currentFlow.flags & 1)) { - var afterFinallyFlow = flowNodeCreated({ flags: 8192, antecedent: currentFlow }); + var afterFinallyFlow = initFlowNode({ flags: 8192, antecedent: currentFlow }); preFinallyFlow.lock = afterFinallyFlow; currentFlow = afterFinallyFlow; } @@ -24515,6 +24487,7 @@ var ts; var savedSubtreeTransformFlags = subtreeTransformFlags; subtreeTransformFlags = 0; var clauses = node.clauses; + var isNarrowingSwitch = isNarrowingExpression(node.parent.expression); var fallthroughFlow = unreachableFlow; for (var i = 0; i < clauses.length; i++) { var clauseStart = i; @@ -24523,14 +24496,14 @@ var ts; i++; } var preCaseLabel = createBranchLabel(); - addAntecedent(preCaseLabel, createFlowSwitchClause(preSwitchCaseFlow, node.parent, clauseStart, i + 1)); + addAntecedent(preCaseLabel, isNarrowingSwitch ? createFlowSwitchClause(preSwitchCaseFlow, node.parent, clauseStart, i + 1) : preSwitchCaseFlow); addAntecedent(preCaseLabel, fallthroughFlow); currentFlow = finishFlowLabel(preCaseLabel); var clause = clauses[i]; bind(clause); fallthroughFlow = currentFlow; if (!(currentFlow.flags & 1) && i !== clauses.length - 1 && options.noFallthroughCasesInSwitch) { - errorOnFirstToken(clause, ts.Diagnostics.Fallthrough_case_in_switch); + clause.fallthroughFlowNode = currentFlow; } } clauses.transformFlags = subtreeTransformFlags | 536870912; @@ -24591,7 +24564,7 @@ var ts; } function bindAssignmentTargetFlow(node) { if (isNarrowableReference(node)) { - currentFlow = createFlowAssignment(currentFlow, node); + currentFlow = createFlowMutation(16, currentFlow, node); } else if (node.kind === 191) { for (var _i = 0, _a = node.elements; _i < _a.length; _i++) { @@ -24672,7 +24645,7 @@ var ts; if (operator === 62 && node.left.kind === 194) { var elementAccess = node.left; if (isNarrowableOperand(elementAccess.expression)) { - currentFlow = createFlowArrayMutation(currentFlow, node); + currentFlow = createFlowMutation(256, currentFlow, node); } } } @@ -24708,7 +24681,7 @@ var ts; } } else { - currentFlow = createFlowAssignment(currentFlow, node); + currentFlow = createFlowMutation(16, currentFlow, node); } } function bindVariableDeclarationFlow(node) { @@ -24730,12 +24703,9 @@ var ts; addDeclarationToSymbol(host.symbol, host, 32); } } - function isOutermostOptionalChain(node) { - return !ts.isOptionalChain(node.parent) || ts.isOptionalChainRoot(node.parent) || node !== node.parent.expression; - } function bindOptionalExpression(node, trueTarget, falseTarget) { doWithConditionalBranches(bind, node, trueTarget, falseTarget); - if (!ts.isOptionalChain(node) || isOutermostOptionalChain(node)) { + if (!ts.isOptionalChain(node) || ts.isOutermostOptionalChain(node)) { addAntecedent(trueTarget, createFlowCondition(32, currentFlow, node)); addAntecedent(falseTarget, createFlowCondition(64, currentFlow, node)); } @@ -24762,7 +24732,7 @@ var ts; currentFlow = finishFlowLabel(preChainLabel); } doWithConditionalBranches(bindOptionalChainRest, node, trueTarget, falseTarget); - if (isOutermostOptionalChain(node)) { + if (ts.isOutermostOptionalChain(node)) { addAntecedent(trueTarget, createFlowCondition(32, currentFlow, node)); addAntecedent(falseTarget, createFlowCondition(64, currentFlow, node)); } @@ -24803,7 +24773,7 @@ var ts; if (node.expression.kind === 193) { var propertyAccess = node.expression; if (isNarrowableOperand(propertyAccess.expression) && ts.isPushOrUnshiftIdentifier(propertyAccess.name)) { - currentFlow = createFlowArrayMutation(currentFlow, node); + currentFlow = createFlowMutation(256, currentFlow, node); } } } @@ -25046,7 +25016,7 @@ var ts; var host = ts.getJSDocHost(typeAlias); container = ts.findAncestor(host.parent, function (n) { return !!(getContainerFlags(n) & 1); }) || file; blockScopeContainer = ts.getEnclosingBlockScopeContainer(host) || file; - currentFlow = { flags: 2 }; + currentFlow = initFlowNode({ flags: 2 }); parent = typeAlias; bind(typeAlias.typeExpression); var declName = ts.getNameOfDeclaration(typeAlias); @@ -25058,7 +25028,12 @@ var ts; switch (ts.getAssignmentDeclarationPropertyAccessKind(declName.parent)) { case 1: case 2: - container = file; + if (!ts.isExternalOrCommonJsModule(file)) { + container = undefined; + } + else { + container = file; + } break; case 4: container = declName.parent.expression; @@ -25072,7 +25047,9 @@ var ts; case 0: return ts.Debug.fail("Shouldn't have detected typedef or enum on non-assignment declaration"); } - declareModuleMember(typeAlias, 524288, 788968); + if (container) { + declareModuleMember(typeAlias, 524288, 788968); + } container = oldContainer; } } @@ -25402,6 +25379,8 @@ var ts; case 302: case 185: return bindAnonymousTypeWorker(node); + case 307: + return bindJSDocClassTag(node); case 192: return bindObjectLiteralExpression(node); case 200: @@ -25599,7 +25578,8 @@ var ts; var flags = ts.exportAssignmentIsAlias(node) ? 2097152 : 4 | 1048576 | 512; - declareSymbol(file.symbol.exports, file.symbol, node, flags | 67108864, 0); + var symbol = declareSymbol(file.symbol.exports, file.symbol, node, flags | 67108864, 0); + setValueDeclaration(symbol, node); } function bindThisPropertyAssignment(node) { ts.Debug.assert(ts.isInJSFile(node)); @@ -25614,7 +25594,7 @@ var ts; constructorSymbol = lookupSymbolForPropertyAccess(l.expression.expression, thisParentContainer); } } - if (constructorSymbol) { + if (constructorSymbol && constructorSymbol.valueDeclaration) { constructorSymbol.members = constructorSymbol.members || ts.createSymbolTable(); if (ts.hasDynamicName(node)) { bindDynamicallyNamedThisPropertyAssignment(node, constructorSymbol); @@ -25681,6 +25661,9 @@ var ts; } function bindObjectDefinePrototypeProperty(node) { var namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0].expression); + if (namespaceSymbol) { + addDeclarationToSymbol(namespaceSymbol, namespaceSymbol.valueDeclaration, 32); + } bindPotentiallyNewExpandoMemberToNamespace(node, namespaceSymbol, true); } function bindPrototypePropertyAssignment(lhs, parent) { @@ -25738,7 +25721,7 @@ var ts; } }); } - if (containerIsClass && namespaceSymbol) { + if (containerIsClass && namespaceSymbol && namespaceSymbol.valueDeclaration) { addDeclarationToSymbol(namespaceSymbol, namespaceSymbol.valueDeclaration, 32); } return namespaceSymbol; @@ -26289,7 +26272,8 @@ var ts; || ts.hasModifier(node, 2270) || node.typeParameters || node.type - || !node.body) { + || !node.body + || node.questionToken) { transformFlags |= 1; } if (subtreeFlags & 8192) { @@ -26320,7 +26304,7 @@ var ts; } function computePropertyDeclaration(node, subtreeFlags) { var transformFlags = subtreeFlags | 1048576; - if (ts.some(node.decorators) || ts.hasModifier(node, 2270) || node.type) { + if (ts.some(node.decorators) || ts.hasModifier(node, 2270) || node.type || node.questionToken) { transformFlags |= 1; } if (ts.isComputedPropertyName(node.name) || (ts.hasStaticModifier(node) && node.initializer)) { @@ -27000,11 +26984,11 @@ var ts; undefinedSymbol.declarations = []; var globalThisSymbol = createSymbol(1536, "globalThis", 8); globalThisSymbol.exports = globals; + globalThisSymbol.declarations = []; globals.set(globalThisSymbol.escapedName, globalThisSymbol); var argumentsSymbol = createSymbol(4, "arguments"); var requireSymbol = createSymbol(4, "require"); var apparentArgumentCount; - var pooledOptionalTypeResult = { isOptional: false, type: undefined }; var checker = { getNodeCount: function () { return ts.sum(host.getSourceFiles(), "nodeCount"); }, getIdentifierCount: function () { return ts.sum(host.getSourceFiles(), "identifierCount"); }, @@ -27118,9 +27102,9 @@ var ts; }, getAugmentedPropertiesOfType: getAugmentedPropertiesOfType, getRootSymbols: getRootSymbols, - getContextualType: function (nodeIn) { + getContextualType: function (nodeIn, contextFlags) { var node = ts.getParseTreeNode(nodeIn, ts.isExpression); - return node ? getContextualType(node) : undefined; + return node ? getContextualType(node, contextFlags) : undefined; }, getContextualTypeForObjectLiteralElement: function (nodeIn) { var node = ts.getParseTreeNode(nodeIn, ts.isObjectLiteralElementLike); @@ -27169,7 +27153,7 @@ var ts; getEmitResolver: getEmitResolver, getExportsOfModule: getExportsOfModuleAsArray, getExportsAndPropertiesOfModule: getExportsAndPropertiesOfModule, - getSymbolWalker: ts.createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignature, getReturnTypeOfSignature, getBaseTypes, resolveStructuredTypeMembers, getTypeOfSymbol, getResolvedSymbol, getIndexTypeOfStructuredType, getConstraintOfTypeParameter, getFirstIdentifier, getTypeArguments), + getSymbolWalker: ts.createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignature, getReturnTypeOfSignature, getBaseTypes, resolveStructuredTypeMembers, getTypeOfSymbol, getResolvedSymbol, getIndexTypeOfStructuredType, getConstraintOfTypeParameter, ts.getFirstIdentifier, getTypeArguments), getAmbientModules: getAmbientModules, getJsxIntrinsicTagNamesAt: getJsxIntrinsicTagNamesAt, isOptionalParameter: function (nodeIn) { @@ -27292,10 +27276,10 @@ var ts; var errorType = createIntrinsicType(1, "error"); var unknownType = createIntrinsicType(2, "unknown"); var undefinedType = createIntrinsicType(32768, "undefined"); - var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768, "undefined", 262144); + var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768, "undefined", 524288); var optionalType = createIntrinsicType(32768, "undefined"); var nullType = createIntrinsicType(65536, "null"); - var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536, "null", 262144); + var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536, "null", 524288); var stringType = createIntrinsicType(4, "string"); var numberType = createIntrinsicType(8, "number"); var bigintType = createIntrinsicType(64, "bigint"); @@ -27319,7 +27303,7 @@ var ts; var voidType = createIntrinsicType(16384, "void"); var neverType = createIntrinsicType(131072, "never"); var silentNeverType = createIntrinsicType(131072, "never"); - var nonInferrableType = createIntrinsicType(131072, "never", 1048576); + var nonInferrableType = createIntrinsicType(131072, "never", 2097152); var implicitNeverType = createIntrinsicType(131072, "never"); var unreachableNeverType = createIntrinsicType(131072, "never"); var nonPrimitiveType = createIntrinsicType(67108864, "object"); @@ -27335,7 +27319,7 @@ var ts; var emptyGenericType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); emptyGenericType.instantiations = ts.createMap(); var anyFunctionType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); - anyFunctionType.objectFlags |= 1048576; + anyFunctionType.objectFlags |= 2097152; var noConstraintType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); var circularConstraintType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); var resolvingDefaultType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); @@ -27344,10 +27328,10 @@ var ts; markerSubType.constraint = markerSuperType; var markerOtherType = createTypeParameter(); var noTypePredicate = createTypePredicate(1, "<>", 0, anyType); - var anySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, undefined, 0, false, false); - var unknownSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, errorType, undefined, 0, false, false); - var resolvingSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, undefined, 0, false, false); - var silentNeverSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, silentNeverType, undefined, 0, false, false); + var anySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, undefined, 0, 0); + var unknownSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, errorType, undefined, 0, 0); + var resolvingSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, undefined, 0, 0); + var silentNeverSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, silentNeverType, undefined, 0, 0); var enumNumberIndexInfo = createIndexInfo(stringType, true); var iterationTypesCache = ts.createMap(); var noIterationTypes = { @@ -27491,7 +27475,7 @@ var ts; var chosenpragma = ts.isArray(jsxPragma) ? jsxPragma[0] : jsxPragma; file.localJsxFactory = ts.parseIsolatedEntityName(chosenpragma.arguments.factory, languageVersion); if (file.localJsxFactory) { - return file.localJsxNamespace = getFirstIdentifier(file.localJsxFactory).escapedText; + return file.localJsxNamespace = ts.getFirstIdentifier(file.localJsxFactory).escapedText; } } } @@ -27501,7 +27485,7 @@ var ts; if (compilerOptions.jsxFactory) { _jsxFactoryEntity = ts.parseIsolatedEntityName(compilerOptions.jsxFactory, languageVersion); if (_jsxFactoryEntity) { - _jsxNamespace = getFirstIdentifier(_jsxFactoryEntity).escapedText; + _jsxNamespace = ts.getFirstIdentifier(_jsxFactoryEntity).escapedText; } } else if (compilerOptions.reactNamespace) { @@ -28736,7 +28720,7 @@ var ts; var namespaceMeaning = 1920 | (ts.isInJSFile(name) ? meaning & 111551 : 0); var symbol; if (name.kind === 75) { - var message = meaning === namespaceMeaning ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(getFirstIdentifier(name)); + var message = meaning === namespaceMeaning ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(ts.getFirstIdentifier(name)); var symbolFromJSPrototype = ts.isInJSFile(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined; symbol = resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, true); if (!symbol) { @@ -28834,7 +28818,12 @@ var ts; return undefined; } var init = ts.isVariableDeclaration(decl) ? ts.getDeclaredExpandoInitializer(decl) : ts.getAssignedExpandoInitializer(decl); - return init && getSymbolOfNode(init) || undefined; + if (init) { + var initSymbol = getSymbolOfNode(init); + if (initSymbol) { + return mergeJSSymbols(initSymbol, symbol); + } + } } function resolveExternalModuleName(location, moduleReferenceExpression, ignoreErrors) { return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ignoreErrors ? undefined : ts.Diagnostics.Cannot_find_module_0); @@ -29224,8 +29213,8 @@ var ts; } function findConstructorDeclaration(node) { var members = node.members; - for (var _i = 0, members_2 = members; _i < members_2.length; _i++) { - var member = members_2[_i]; + for (var _i = 0, members_3 = members; _i < members_3.length; _i++) { + var member = members_3[_i]; if (member.kind === 161 && ts.nodeIsPresent(member.body)) { return member; } @@ -29569,7 +29558,7 @@ var ts; else { meaning = 788968; } - var firstIdentifier = getFirstIdentifier(entityName); + var firstIdentifier = ts.getFirstIdentifier(entityName); var symbol = resolveName(enclosingDeclaration, firstIdentifier.escapedText, meaning, undefined, undefined, false); return (symbol && hasVisibleDeclarations(symbol, true)) || { accessibility: 1, @@ -30047,7 +30036,6 @@ var ts; else if (context.flags & 2048 && type.symbol.valueDeclaration && ts.isClassLike(type.symbol.valueDeclaration) && - ts.findAncestor(type.symbol.valueDeclaration, function (d) { return d === ts.getSourceFileOfNode(context.enclosingDeclaration); }) && !isValueSymbolAccessible(type.symbol, context.enclosingDeclaration)) { return createAnonymousTypeNode(type); } @@ -30201,9 +30189,9 @@ var ts; } } } - var propertyName = symbolToName(propertySymbol, context, 111551, true); - context.approximateLength += (ts.symbolName(propertySymbol).length + 1); context.enclosingDeclaration = saveEnclosingDeclaration; + var propertyName = getPropertyNameNodeForSymbol(propertySymbol, context); + context.approximateLength += (ts.symbolName(propertySymbol).length + 1); var optionalToken = propertySymbol.flags & 16777216 ? ts.createToken(57) : undefined; if (propertySymbol.flags & (16 | 8192) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) { var signatures = getSignaturesOfType(filterType(propertyType, function (t) { return !(t.flags & 32768); }), 0); @@ -30391,7 +30379,7 @@ var ts; function trackComputedName(accessExpression, enclosingDeclaration, context) { if (!context.tracker.trackSymbol) return; - var firstIdentifier = getFirstIdentifier(accessExpression); + var firstIdentifier = ts.getFirstIdentifier(accessExpression); var name = resolveName(firstIdentifier, firstIdentifier.escapedText, 111551 | 1048576, undefined, undefined, true); if (name) { context.tracker.trackSymbol(name, enclosingDeclaration, 111551); @@ -30732,21 +30720,33 @@ var ts; } } } + function isSingleQuotedStringNamed(d) { + var name = ts.getNameOfDeclaration(d); + if (name && ts.isStringLiteral(name) && (name.singleQuote || + (!ts.nodeIsSynthesized(name) && ts.startsWith(ts.getTextOfNode(name, false), "'")))) { + return true; + } + return false; + } function getPropertyNameNodeForSymbol(symbol, context) { - var fromNameType = getPropertyNameNodeForSymbolFromNameType(symbol, context); + var singleQuote = !!ts.length(symbol.declarations) && ts.every(symbol.declarations, isSingleQuotedStringNamed); + var fromNameType = getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote); if (fromNameType) { return fromNameType; } + if (ts.isKnownSymbol(symbol)) { + return ts.createComputedPropertyName(ts.createPropertyAccess(ts.createIdentifier("Symbol"), symbol.escapedName.substr(3))); + } var rawName = ts.unescapeLeadingUnderscores(symbol.escapedName); - return createPropertyNameNodeForIdentifierOrLiteral(rawName); + return createPropertyNameNodeForIdentifierOrLiteral(rawName, singleQuote); } - function getPropertyNameNodeForSymbolFromNameType(symbol, context) { + function getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote) { var nameType = symbol.nameType; if (nameType) { if (nameType.flags & 384) { var name = "" + nameType.value; if (!ts.isIdentifierText(name, compilerOptions.target) && !isNumericLiteralName(name)) { - return ts.createLiteral(name); + return ts.createLiteral(name, !!singleQuote); } if (isNumericLiteralName(name) && ts.startsWith(name, "-")) { return ts.createComputedPropertyName(ts.createLiteral(+name)); @@ -30758,8 +30758,8 @@ var ts; } } } - function createPropertyNameNodeForIdentifierOrLiteral(name) { - return ts.isIdentifierText(name, compilerOptions.target) ? ts.createIdentifier(name) : ts.createLiteral(isNumericLiteralName(name) ? +name : name); + function createPropertyNameNodeForIdentifierOrLiteral(name, singleQuote) { + return ts.isIdentifierText(name, compilerOptions.target) ? ts.createIdentifier(name) : ts.createLiteral(isNumericLiteralName(name) ? +name : name, !!singleQuote); } function cloneNodeBuilderContext(context) { var initial = __assign({}, context); @@ -30782,7 +30782,7 @@ var ts; var visitedSymbols = ts.createMap(); var deferredPrivates; var oldcontext = context; - context = __assign(__assign({}, oldcontext), { usedSymbolNames: ts.mapMap(symbolTable, function (_symbol, name) { return [ts.unescapeLeadingUnderscores(name), true]; }), remappedSymbolNames: ts.createMap(), tracker: __assign(__assign({}, oldcontext.tracker), { trackSymbol: function (sym, decl, meaning) { + context = __assign(__assign({}, oldcontext), { usedSymbolNames: ts.createMap(), remappedSymbolNames: ts.createMap(), tracker: __assign(__assign({}, oldcontext.tracker), { trackSymbol: function (sym, decl, meaning) { var accessibleResult = isSymbolAccessible(sym, decl, meaning, false); if (accessibleResult.accessibility === 0) { var chain = lookupSymbolChainWorker(sym, context, meaning); @@ -30799,6 +30799,10 @@ var ts; context.usedSymbolNames.set(name, true); }); } + ts.forEachEntry(symbolTable, function (symbol, name) { + var baseName = ts.unescapeLeadingUnderscores(name); + void getInternalSymbolName(symbol, baseName); + }); var addingDeclare = !bundled; var exportEquals = symbolTable.get("export="); if (exportEquals && symbolTable.size > 1 && exportEquals.flags & 2097152) { @@ -30951,7 +30955,11 @@ var ts; isPrivate = true; } var modifierFlags = (!isPrivate ? 1 : 0) | (isDefault && !needsPostExportDefault ? 512 : 0); - if (symbol.flags & 16) { + var isConstMergedWithNS = symbol.flags & 1536 && + symbol.flags & (2 | 1 | 4) && + symbol.escapedName !== "export="; + var isConstMergedWithNSPrintableAsSignatureMerge = isConstMergedWithNS && isTypeRepresentableAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol); + if (symbol.flags & 16 || isConstMergedWithNSPrintableAsSignatureMerge) { serializeAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol, getInternalSymbolName(symbol, symbolName), modifierFlags); } if (symbol.flags & 524288) { @@ -30960,7 +30968,8 @@ var ts; if (symbol.flags & (2 | 1 | 4) && symbol.escapedName !== "export=" && !(symbol.flags & 4194304) - && !(symbol.flags & 32)) { + && !(symbol.flags & 32) + && !isConstMergedWithNSPrintableAsSignatureMerge) { serializeVariableOrProperty(symbol, symbolName, isPrivate, needsPostExportDefault, propertyAsAlias, modifierFlags); } if (symbol.flags & 384) { @@ -30974,7 +30983,7 @@ var ts; serializeAsClass(symbol, getInternalSymbolName(symbol, symbolName), modifierFlags); } } - if (symbol.flags & (512 | 1024)) { + if ((symbol.flags & (512 | 1024) && (!isConstMergedWithNS || isTypeOnlyNamespace(symbol))) || isConstMergedWithNSPrintableAsSignatureMerge) { serializeModule(symbol, symbolName, modifierFlags); } if (symbol.flags & 64) { @@ -31000,7 +31009,10 @@ var ts; } } function includePrivateSymbol(symbol) { + if (ts.some(symbol.declarations, ts.isParameterDeclaration)) + return; ts.Debug.assertDefined(deferredPrivates); + getUnusedName(ts.unescapeLeadingUnderscores(symbol.escapedName), symbol); deferredPrivates.set("" + getSymbolId(symbol), symbol); } function isExportingScope(enclosingDeclaration) { @@ -31053,22 +31065,31 @@ var ts; var heritageClauses = !ts.length(baseTypes) ? undefined : [ts.createHeritageClause(89, ts.mapDefined(baseTypes, function (b) { return trySerializeAsTypeReference(b); }))]; addResult(ts.createInterfaceDeclaration(undefined, undefined, getInternalSymbolName(symbol, symbolName), typeParamDecls, heritageClauses, __spreadArrays(indexSignatures, constructSignatures, callSignatures, members)), modifierFlags); } + function getNamespaceMembersForSerialization(symbol) { + return !symbol.exports ? [] : ts.filter(ts.arrayFrom((symbol.exports).values()), function (p) { return !((p.flags & 4194304) || (p.escapedName === "prototype")); }); + } + function isTypeOnlyNamespace(symbol) { + return ts.every(getNamespaceMembersForSerialization(symbol), function (m) { return !(resolveSymbol(m).flags & 111551); }); + } function serializeModule(symbol, symbolName, modifierFlags) { - var members = !symbol.exports ? [] : ts.filter(ts.arrayFrom((symbol.exports).values()), function (p) { return !((p.flags & 4194304) || (p.escapedName === "prototype")); }); + var members = getNamespaceMembersForSerialization(symbol); var locationMap = ts.arrayToMultiMap(members, function (m) { return m.parent && m.parent === symbol ? "real" : "merged"; }); var realMembers = locationMap.get("real") || ts.emptyArray; var mergedMembers = locationMap.get("merged") || ts.emptyArray; if (ts.length(realMembers)) { var localName = getInternalSymbolName(symbol, symbolName); - serializeAsNamespaceDeclaration(realMembers, localName, modifierFlags, false); + serializeAsNamespaceDeclaration(realMembers, localName, modifierFlags, !!(symbol.flags & (16 | 67108864))); } if (ts.length(mergedMembers)) { var localName = getInternalSymbolName(symbol, symbolName); - ts.forEach(mergedMembers, includePrivateSymbol); var nsBody = ts.createModuleBlock([ts.createExportDeclaration(undefined, undefined, ts.createNamedExports(ts.map(ts.filter(mergedMembers, function (n) { return n.escapedName !== "export="; }), function (s) { var name = ts.unescapeLeadingUnderscores(s.escapedName); var localName = getInternalSymbolName(s, name); - return ts.createExportSpecifier(name === localName ? undefined : localName, name); + var aliasDecl = s.declarations && getDeclarationOfAliasSymbol(s); + var target = aliasDecl && getTargetOfAliasDeclaration(aliasDecl, true); + includePrivateSymbol(target || s); + var targetName = target ? getInternalSymbolName(target, ts.unescapeLeadingUnderscores(target.escapedName)) : localName; + return ts.createExportSpecifier(name === targetName ? undefined : targetName, name); })))]); addResult(ts.createModuleDeclaration(undefined, undefined, ts.createIdentifier(localName), nsBody, 16), 0); } @@ -31200,7 +31221,7 @@ var ts; addResult(ts.createNamespaceExportDeclaration(ts.idText(node.name)), 0); break; case 254: - addResult(ts.createImportDeclaration(undefined, undefined, ts.createImportClause(ts.createIdentifier(localName), undefined), ts.createLiteral(getSpecifierForModuleSymbol(target.parent, context))), 0); + addResult(ts.createImportDeclaration(undefined, undefined, ts.createImportClause(ts.createIdentifier(localName), undefined), ts.createLiteral(getSpecifierForModuleSymbol(target.parent || target, context))), 0); break; case 255: addResult(ts.createImportDeclaration(undefined, undefined, ts.createImportClause(undefined, ts.createNamespaceImport(ts.createIdentifier(localName))), ts.createLiteral(getSpecifierForModuleSymbol(target, context))), 0); @@ -31208,7 +31229,7 @@ var ts; case 257: addResult(ts.createImportDeclaration(undefined, undefined, ts.createImportClause(undefined, ts.createNamedImports([ ts.createImportSpecifier(localName !== verbatimTargetName ? ts.createIdentifier(verbatimTargetName) : undefined, ts.createIdentifier(localName)) - ])), ts.createLiteral(getSpecifierForModuleSymbol(target.parent, context))), 0); + ])), ts.createLiteral(getSpecifierForModuleSymbol(target.parent || target, context))), 0); break; case 261: var specifier = node.parent.parent.moduleSpecifier; @@ -31218,6 +31239,7 @@ var ts; serializeMaybeAliasAssignment(symbol); break; case 208: + case 193: if (symbol.escapedName === "default" || symbol.escapedName === "export=") { serializeMaybeAliasAssignment(symbol); } @@ -31225,8 +31247,6 @@ var ts; serializeExportSpecifier(localName, targetName); } break; - case 193: - break; default: return ts.Debug.failBadSyntaxKind(node, "Unhandled alias declaration kind in symbol serializer!"); } @@ -31244,7 +31264,7 @@ var ts; var isExportAssignment = isExportEquals || isDefault; var aliasDecl = symbol.declarations && getDeclarationOfAliasSymbol(symbol); var target = aliasDecl && getTargetOfAliasDeclaration(aliasDecl, true); - if (target) { + if (target && ts.length(target.declarations) && ts.some(target.declarations, function (d) { return ts.getSourceFileOfNode(d) === ts.getSourceFileOfNode(enclosingDeclaration); })) { var expr = isExportAssignment ? ts.getExportAssignmentExpression(aliasDecl) : ts.getPropertyAssignmentAliasLikeExpression(aliasDecl); var first_1 = ts.isEntityNameExpression(expr) ? getFirstNonModuleExportsIdentifier(expr) : undefined; var referenced = first_1 && resolveEntityName(first_1, 67108863, true, true, enclosingDeclaration); @@ -31296,6 +31316,7 @@ var ts; return ts.getObjectFlags(typeToSerialize) & (16 | 32) && !getIndexInfoOfType(typeToSerialize, 0) && !getIndexInfoOfType(typeToSerialize, 1) && + !!(ts.length(getPropertiesOfType(typeToSerialize)) || ts.length(getSignaturesOfType(typeToSerialize, 0))) && !ts.length(getSignaturesOfType(typeToSerialize, 1)) && !getDeclarationWithTypeAnnotation(hostSymbol) && !(typeToSerialize.symbol && ts.some(typeToSerialize.symbol.declarations, function (d) { return ts.getSourceFileOfNode(d) !== ctxSrc; })) && @@ -31404,7 +31425,7 @@ var ts; return ts.updateImportTypeNode(node, ts.updateLiteralTypeNode(node.argument, rewriteModuleSpecifier(node, node.argument.literal)), node.qualifier, ts.visitNodes(node.typeArguments, visitExistingNodeTreeSymbols, ts.isTypeNode), node.isTypeOf); } if (ts.isEntityName(node) || ts.isEntityNameExpression(node)) { - var leftmost = getFirstIdentifier(node); + var leftmost = ts.getFirstIdentifier(node); var sym = resolveEntityName(leftmost, 67108863, true, true); if (sym) { includePrivateSymbol(sym); @@ -31530,11 +31551,8 @@ var ts; return context.remappedSymbolNames.get("" + getSymbolId(symbol)); } } - if (input === "default") { - input = "_default"; - } - else if (input === "export=") { - input = "_exports"; + if (symbol) { + input = getNameCandidateWorker(symbol, input); } var i = 0; var original = input; @@ -31548,17 +31566,28 @@ var ts; } return input; } - function getInternalSymbolName(symbol, localName) { - if (context.remappedSymbolNames.has("" + getSymbolId(symbol))) { - return context.remappedSymbolNames.get("" + getSymbolId(symbol)); - } + function getNameCandidateWorker(symbol, localName) { if (localName === "default" || localName === "__class" || localName === "__function") { var flags = context.flags; context.flags |= 16777216; var nameCandidate = getNameOfSymbolAsWritten(symbol, context); context.flags = flags; - localName = ts.isIdentifierText(nameCandidate, languageVersion) && !ts.isStringANonContextualKeyword(nameCandidate) ? nameCandidate : getUnusedName("_default", symbol); + localName = nameCandidate.length > 0 && ts.isSingleOrDoubleQuote(nameCandidate.charCodeAt(0)) ? ts.stripQuotes(nameCandidate) : nameCandidate; } + if (localName === "default") { + localName = "_default"; + } + else if (localName === "export=") { + localName = "_exports"; + } + localName = ts.isIdentifierText(localName, languageVersion) && !ts.isStringANonContextualKeyword(localName) ? localName : "_" + localName.replace(/[^a-zA-Z0-9]/g, "_"); + return localName; + } + function getInternalSymbolName(symbol, localName) { + if (context.remappedSymbolNames.has("" + getSymbolId(symbol))) { + return context.remappedSymbolNames.get("" + getSymbolId(symbol)); + } + localName = getNameCandidateWorker(symbol, localName); context.remappedSymbolNames.set("" + getSymbolId(symbol), localName); return localName; } @@ -31793,7 +31822,7 @@ var ts; } if (ts.isInternalModuleImportEqualsDeclaration(declaration)) { var internalModuleReference = declaration.moduleReference; - var firstIdentifier = getFirstIdentifier(internalModuleReference); + var firstIdentifier = ts.getFirstIdentifier(internalModuleReference); var importSymbol = resolveName(declaration, firstIdentifier.escapedText, 111551 | 788968 | 1920, undefined, undefined, false); var id = importSymbol && "" + getSymbolId(importSymbol); if (importSymbol && !visited.has(id)) { @@ -31845,6 +31874,8 @@ var ts; return !!target.immediateBaseConstraint; case 6: return !!getSymbolLinks(target).resolvedJSDocType; + case 7: + return !!target.resolvedTypeArguments; } return ts.Debug.assertNever(propertyName); } @@ -31919,7 +31950,9 @@ var ts; } var stringIndexInfo = getIndexInfoOfType(source, 0); var numberIndexInfo = getIndexInfoOfType(source, 1); - return createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, stringIndexInfo, numberIndexInfo); + var result = createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, stringIndexInfo, numberIndexInfo); + result.objectFlags |= 131072; + return result; } function getFlowTypeOfDestructuring(node, declaredType) { var reference = getSyntheticElementAccess(node); @@ -32258,23 +32291,23 @@ var ts; kind === 2 && symbol.escapedName === "export=") { var exportedType_1 = resolveStructuredTypeMembers(type); - var members_3 = ts.createSymbolTable(); - ts.copyEntries(exportedType_1.members, members_3); + var members_4 = ts.createSymbolTable(); + ts.copyEntries(exportedType_1.members, members_4); if (resolvedSymbol && !resolvedSymbol.exports) { resolvedSymbol.exports = ts.createSymbolTable(); } (resolvedSymbol || symbol).exports.forEach(function (s, name) { - if (members_3.has(name)) { + if (members_4.has(name)) { var exportedMember = exportedType_1.members.get(name); var union = createSymbol(s.flags | exportedMember.flags, name); union.type = getUnionType([getTypeOfSymbol(s), getTypeOfSymbol(exportedMember)]); - members_3.set(name, union); + members_4.set(name, union); } else { - members_3.set(name, s); + members_4.set(name, s); } }); - var result = createAnonymousType(exportedType_1.symbol, members_3, exportedType_1.callSignatures, exportedType_1.constructSignatures, exportedType_1.stringIndexInfo, exportedType_1.numberIndexInfo); + var result = createAnonymousType(exportedType_1.symbol, members_4, exportedType_1.callSignatures, exportedType_1.constructSignatures, exportedType_1.stringIndexInfo, exportedType_1.numberIndexInfo); result.objectFlags |= (ts.getObjectFlags(type) & 16384); return result; } @@ -32327,7 +32360,7 @@ var ts; function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) { var members = ts.createSymbolTable(); var stringIndexInfo; - var objectFlags = 128 | 524288; + var objectFlags = 128 | 1048576; ts.forEach(pattern.elements, function (e) { var name = e.propertyName || e.name; if (e.dotDotDotToken) { @@ -32439,14 +32472,10 @@ var ts; if (!declaration.statements.length) { return emptyObjectType; } - var type_1 = getWidenedLiteralType(checkExpression(declaration.statements[0].expression)); - if (type_1.flags & 524288) { - return getRegularTypeOfObjectLiteral(type_1); - } - return type_1; + return getWidenedType(getWidenedLiteralType(checkExpression(declaration.statements[0].expression))); } if (!pushTypeResolution(symbol, 0)) { - if (symbol.flags & 512) { + if (symbol.flags & 512 && !(symbol.flags & 67108864)) { return getTypeOfFuncClassEnumModule(symbol); } return reportCircularityError(symbol); @@ -32510,7 +32539,7 @@ var ts; return ts.Debug.fail("Unhandled declaration kind! " + ts.Debug.formatSyntaxKind(declaration.kind) + " for " + ts.Debug.formatSymbol(symbol)); } if (!popTypeResolution()) { - if (symbol.flags & 512) { + if (symbol.flags & 512 && !(symbol.flags & 67108864)) { return getTypeOfFuncClassEnumModule(symbol); } return reportCircularityError(symbol); @@ -32589,7 +32618,9 @@ var ts; } else { ts.Debug.assert(!!getter, "there must exist a getter as we are current checking either setter or getter in this function"); - errorOrSuggestion(noImplicitAny, getter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation, symbolToString(symbol)); + if (!isPrivateWithinAmbient(getter)) { + errorOrSuggestion(noImplicitAny, getter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation, symbolToString(symbol)); + } } return anyType; } @@ -32634,11 +32665,11 @@ var ts; return errorType; } var exportEquals = getMergedSymbol(symbol.exports.get("export=")); - var type_2 = getWidenedTypeForAssignmentDeclaration(exportEquals, exportEquals === resolvedModule ? undefined : resolvedModule); + var type_1 = getWidenedTypeForAssignmentDeclaration(exportEquals, exportEquals === resolvedModule ? undefined : resolvedModule); if (!popTypeResolution()) { return reportCircularityError(symbol); } - return type_2; + return type_1; } } var type = createObjectType(16, symbol); @@ -32807,6 +32838,7 @@ var ts; } function getOuterTypeParametersOfClassOrInterface(symbol) { var declaration = symbol.flags & 32 ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 245); + ts.Debug.assert(!!declaration, "Class was missing valueDeclaration -OR- non-class had no interface declarations"); return getOuterTypeParameters(declaration); } function getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol) { @@ -32831,7 +32863,7 @@ var ts; var signatures = getSignaturesOfType(type, 1); if (signatures.length === 1) { var s = signatures[0]; - return !s.typeParameters && s.parameters.length === 1 && s.hasRestParameter && getElementTypeOfArrayType(getTypeOfParameter(s.parameters[0])) === anyType; + return !s.typeParameters && s.parameters.length === 1 && signatureHasRestParameter(s) && getElementTypeOfArrayType(getTypeOfParameter(s.parameters[0])) === anyType; } return false; } @@ -33402,8 +33434,8 @@ var ts; var decl = _a[_i]; var members = ts.getMembersOfDeclaration(decl); if (members) { - for (var _b = 0, members_4 = members; _b < members_4.length; _b++) { - var member = members_4[_b]; + for (var _b = 0, members_5 = members; _b < members_5.length; _b++) { + var member = members_5[_b]; if (isStatic === ts.hasStaticModifier(member) && hasLateBindableName(member)) { lateBindMember(symbol, earlySymbols, lateSymbols, member); } @@ -33520,8 +33552,8 @@ var ts; var paddedTypeArguments = typeArguments.length === typeParameters.length ? typeArguments : ts.concatenate(typeArguments, [type]); resolveObjectTypeMembers(type, source, typeParameters, paddedTypeArguments); } - function createSignature(declaration, typeParameters, thisParameter, parameters, resolvedReturnType, resolvedTypePredicate, minArgumentCount, hasRestParameter, hasLiteralTypes) { - var sig = new Signature(checker); + function createSignature(declaration, typeParameters, thisParameter, parameters, resolvedReturnType, resolvedTypePredicate, minArgumentCount, flags) { + var sig = new Signature(checker, flags); sig.declaration = declaration; sig.typeParameters = typeParameters; sig.parameters = parameters; @@ -33529,14 +33561,12 @@ var ts; sig.resolvedReturnType = resolvedReturnType; sig.resolvedTypePredicate = resolvedTypePredicate; sig.minArgumentCount = minArgumentCount; - sig.hasRestParameter = hasRestParameter; - sig.hasLiteralTypes = hasLiteralTypes; sig.target = undefined; sig.mapper = undefined; return sig; } function cloneSignature(sig) { - var result = createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, undefined, undefined, sig.minArgumentCount, sig.hasRestParameter, sig.hasLiteralTypes); + var result = createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, undefined, undefined, sig.minArgumentCount, sig.flags & 3); result.target = sig.target; result.mapper = sig.mapper; return result; @@ -33548,13 +33578,25 @@ var ts; result.mapper = undefined; return result; } - function createOptionalCallSignature(signature) { + function getOptionalCallSignature(signature, callChainFlags) { + if ((signature.flags & 12) === callChainFlags) { + return signature; + } + if (!signature.optionalCallSignatureCache) { + signature.optionalCallSignatureCache = {}; + } + var key = callChainFlags === 4 ? "inner" : "outer"; + return signature.optionalCallSignatureCache[key] + || (signature.optionalCallSignatureCache[key] = createOptionalCallSignature(signature, callChainFlags)); + } + function createOptionalCallSignature(signature, callChainFlags) { + ts.Debug.assert(callChainFlags === 4 || callChainFlags === 8, "An optional call signature can either be for an inner call chain or an outer call chain, but not both."); var result = cloneSignature(signature); - result.isOptionalCall = true; + result.flags |= callChainFlags; return result; } function getExpandedParameters(sig) { - if (sig.hasRestParameter) { + if (signatureHasRestParameter(sig)) { var restIndex_1 = sig.parameters.length - 1; var restParameter = sig.parameters[restIndex_1]; var restType = getTypeOfSymbol(restParameter); @@ -33579,7 +33621,7 @@ var ts; var baseConstructorType = getBaseConstructorTypeOfClass(classType); var baseSignatures = getSignaturesOfType(baseConstructorType, 1); if (baseSignatures.length === 0) { - return [createSignature(undefined, classType.localTypeParameters, undefined, ts.emptyArray, classType, undefined, 0, false, false)]; + return [createSignature(undefined, classType.localTypeParameters, undefined, ts.emptyArray, classType, undefined, 0, 0)]; } var baseTypeNode = getBaseTypeNodeOfClass(classType); var isJavaScript = ts.isInJSFile(baseTypeNode); @@ -33726,9 +33768,7 @@ var ts; var params = combineUnionParameters(left, right); var thisParam = combineUnionThisParam(left.thisParameter, right.thisParameter); var minArgCount = Math.max(left.minArgumentCount, right.minArgumentCount); - var hasRestParam = left.hasRestParameter || right.hasRestParameter; - var hasLiteralTypes = left.hasLiteralTypes || right.hasLiteralTypes; - var result = createSignature(declaration, left.typeParameters || right.typeParameters, thisParam, params, undefined, undefined, minArgCount, hasRestParam, hasLiteralTypes); + var result = createSignature(declaration, left.typeParameters || right.typeParameters, thisParam, params, undefined, undefined, minArgCount, (left.flags | right.flags) & 3); result.unionSignatures = ts.concatenate(left.unionSignatures || [left], [right]); return result; } @@ -33883,7 +33923,7 @@ var ts; var constructSignatures = symbol.members ? getSignaturesOfSymbol(symbol.members.get("__constructor")) : ts.emptyArray; if (symbol.flags & 16) { constructSignatures = ts.addRange(constructSignatures.slice(), ts.mapDefined(type.callSignatures, function (sig) { return isJSConstructor(sig.declaration) ? - createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, classType_1, undefined, sig.minArgumentCount, sig.hasRestParameter, sig.hasLiteralTypes) : + createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, classType_1, undefined, sig.minArgumentCount, sig.flags & 3) : undefined; })); } if (!constructSignatures.length) { @@ -34325,8 +34365,8 @@ var ts; var types = t.types; var baseTypes = []; for (var _i = 0, types_6 = types; _i < types_6.length; _i++) { - var type_3 = types_6[_i]; - var baseType = getBaseConstraint(type_3); + var type_2 = types_6[_i]; + var baseType = getBaseConstraint(type_2); if (baseType) { baseTypes.push(baseType); } @@ -34706,7 +34746,7 @@ var ts; var links = getNodeLinks(declaration); if (!links.resolvedSignature) { var parameters = []; - var hasLiteralTypes = false; + var flags = 0; var minArgumentCount = 0; var thisParameter = void 0; var hasThisParameter = false; @@ -34733,7 +34773,7 @@ var ts; parameters.push(paramSymbol); } if (type && type.kind === 186) { - hasLiteralTypes = true; + flags |= 2; } var isOptionalParameter_1 = isOptionalJSDocParameterTag(param) || param.initializer || param.questionToken || param.dotDotDotToken || @@ -34757,8 +34797,10 @@ var ts; getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : undefined; var typeParameters = classType ? classType.localTypeParameters : getTypeParametersFromDeclaration(declaration); - var hasRestLikeParameter = ts.hasRestParameter(declaration) || ts.isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters); - links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, undefined, undefined, minArgumentCount, hasRestLikeParameter, hasLiteralTypes); + if (ts.hasRestParameter(declaration) || ts.isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters)) { + flags |= 1; + } + links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, undefined, undefined, minArgumentCount, flags); } return links.resolvedSignature; } @@ -34891,8 +34933,11 @@ var ts; signature.unionSignatures ? getUnionType(ts.map(signature.unionSignatures, getReturnTypeOfSignature), 2) : getReturnTypeFromAnnotation(signature.declaration) || (ts.nodeIsMissing(signature.declaration.body) ? anyType : getReturnTypeFromBody(signature.declaration)); - if (signature.isOptionalCall) { - type = propagateOptionalTypeMarker(type, true); + if (signature.flags & 4) { + type = addOptionalTypeMarker(type); + } + else if (signature.flags & 8) { + type = getOptionalType(type); } if (!popTypeResolution()) { if (signature.declaration) { @@ -34948,7 +34993,7 @@ var ts; return tryGetRestTypeOfSignature(signature) || anyType; } function tryGetRestTypeOfSignature(signature) { - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var sigRestType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); var restType = isTupleType(sigRestType) ? getRestTypeOfTupleType(sigRestType) : sigRestType; return restType && getIndexTypeOfType(restType, 1); @@ -35137,7 +35182,7 @@ var ts; result |= ts.getObjectFlags(type); } } - return result & 1835008; + return result & 3670016; } function createTypeReference(target, typeArguments) { var id = getTypeListId(typeArguments); @@ -35171,13 +35216,25 @@ var ts; return type; } function getTypeArguments(type) { + var _a, _b; if (!type.resolvedTypeArguments) { + if (!pushTypeResolution(type, 7)) { + return ((_a = type.target.localTypeParameters) === null || _a === void 0 ? void 0 : _a.map(function () { return errorType; })) || ts.emptyArray; + } var node = type.node; var typeArguments = !node ? ts.emptyArray : node.kind === 168 ? ts.concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments(node, type.target.localTypeParameters)) : node.kind === 173 ? [getTypeFromTypeNode(node.elementType)] : ts.map(node.elementTypes, getTypeFromTypeNode); - type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments; + if (popTypeResolution()) { + type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments; + } + else { + type.resolvedTypeArguments = ((_b = type.target.localTypeParameters) === null || _b === void 0 ? void 0 : _b.map(function () { return errorType; })) || ts.emptyArray; + error(type.node || currentNode, type.target.symbol + ? ts.Diagnostics.Type_arguments_for_0_circularly_reference_themselves + : ts.Diagnostics.Tuple_type_arguments_circularly_reference_themselves, type.target.symbol && symbolToString(type.target.symbol)); + } } return type.resolvedTypeArguments; } @@ -35278,7 +35335,7 @@ var ts; errorType; } if (symbol.flags & 111551 && isJSDocTypeReference(node)) { - var jsdocType = getTypeFromJSAlias(node, symbol); + var jsdocType = getTypeFromJSDocValueReference(node, symbol); if (jsdocType) { return jsdocType; } @@ -35289,14 +35346,25 @@ var ts; } return errorType; } - function getTypeFromJSAlias(node, symbol) { + function getTypeFromJSDocValueReference(node, symbol) { var valueType = getTypeOfSymbol(symbol); - var typeType = valueType.symbol && - valueType.symbol !== symbol && - getTypeReferenceType(node, valueType.symbol); - if (typeType) { - return getSymbolLinks(symbol).resolvedJSDocType = typeType; + var typeType = valueType; + if (symbol.valueDeclaration) { + var decl = ts.getRootDeclaration(symbol.valueDeclaration); + var isRequireAlias = false; + if (ts.isVariableDeclaration(decl) && decl.initializer) { + var expr = decl.initializer; + while (ts.isPropertyAccessExpression(expr)) { + expr = expr.expression; + } + isRequireAlias = ts.isCallExpression(expr) && ts.isRequireCall(expr, true) && !!valueType.symbol; + } + var isImportTypeWithQualifier = node.kind === 187 && node.qualifier; + if (isRequireAlias || isImportTypeWithQualifier) { + typeType = getTypeReferenceType(node, valueType.symbol); + } } + return getSymbolLinks(symbol).resolvedJSDocType = typeType; } function getSubstitutionType(typeVariable, substitute) { if (substitute.flags & 3 || substitute === typeVariable) { @@ -35703,7 +35771,7 @@ var ts; if (type === wildcardType) includes |= 4194304; if (!strictNullChecks && flags & 98304) { - if (!(ts.getObjectFlags(type) & 262144)) + if (!(ts.getObjectFlags(type) & 524288)) includes |= 2097152; } else { @@ -35816,7 +35884,7 @@ var ts; neverType; } } - return getUnionTypeFromSortedList(typeSet, includes & 66994211 ? 0 : 131072, aliasSymbol, aliasTypeArguments); + return getUnionTypeFromSortedList(typeSet, includes & 66994211 ? 0 : 262144, aliasSymbol, aliasTypeArguments); } function getUnionTypePredicate(signatures) { var first; @@ -35947,14 +36015,14 @@ var ts; } function intersectUnionsOfPrimitiveTypes(types) { var unionTypes; - var index = ts.findIndex(types, function (t) { return !!(ts.getObjectFlags(t) & 131072); }); + var index = ts.findIndex(types, function (t) { return !!(ts.getObjectFlags(t) & 262144); }); if (index < 0) { return false; } var i = index + 1; while (i < types.length) { var t = types[i]; - if (ts.getObjectFlags(t) & 131072) { + if (ts.getObjectFlags(t) & 262144) { (unionTypes || (unionTypes = [types[index]])).push(t); ts.orderedRemoveItemAt(types, i); } @@ -35978,7 +36046,7 @@ var ts; } } } - types[index] = getUnionTypeFromSortedList(result, 131072); + types[index] = getUnionTypeFromSortedList(result, 262144); return true; } function createIntersectionType(types, aliasSymbol, aliasTypeArguments) { @@ -36682,7 +36750,7 @@ var ts; } function getAliasSymbolForTypeNode(node) { var host = node.parent; - while (ts.isParenthesizedTypeNode(host)) { + while (ts.isParenthesizedTypeNode(host) || ts.isTypeOperatorNode(host) && host.operator === 137) { host = host.parent; } return ts.isTypeAlias(host) ? getSymbolOfNode(host) : undefined; @@ -36774,7 +36842,7 @@ var ts; } } var spread = createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, getIndexInfoWithReadonly(stringIndexInfo, readonly), getIndexInfoWithReadonly(numberIndexInfo, readonly)); - spread.objectFlags |= 128 | 524288 | 1024 | objectFlags; + spread.objectFlags |= 128 | 1048576 | 1024 | objectFlags; return spread; } function isSpreadableProperty(prop) { @@ -37065,7 +37133,7 @@ var ts; tp.mapper = mapper; } } - var result = createSignature(signature.declaration, freshTypeParameters, signature.thisParameter && instantiateSymbol(signature.thisParameter, mapper), instantiateList(signature.parameters, mapper, instantiateSymbol), undefined, undefined, signature.minArgumentCount, signature.hasRestParameter, signature.hasLiteralTypes); + var result = createSignature(signature.declaration, freshTypeParameters, signature.thisParameter && instantiateSymbol(signature.thisParameter, mapper), instantiateList(signature.parameters, mapper, instantiateSymbol), undefined, undefined, signature.minArgumentCount, signature.flags & 3); result.target = signature; result.mapper = mapper; return result; @@ -37846,14 +37914,14 @@ var ts; return checkTypeRelatedTo(source, target, comparableRelation, errorNode, headMessage, containingMessageChain); } function isSignatureAssignableTo(source, target, ignoreReturnTypes) { - return compareSignaturesRelated(source, target, 0, ignoreReturnTypes, false, undefined, undefined, compareTypesAssignable) !== 0; + return compareSignaturesRelated(source, target, 0, ignoreReturnTypes, false, undefined, undefined, compareTypesAssignable, undefined) !== 0; } function isAnySignature(s) { return !s.typeParameters && (!s.thisParameter || isTypeAny(getTypeOfParameter(s.thisParameter))) && s.parameters.length === 1 && - s.hasRestParameter && (getTypeOfParameter(s.parameters[0]) === anyArrayType || isTypeAny(getTypeOfParameter(s.parameters[0]))) && + signatureHasRestParameter(s) && (getTypeOfParameter(s.parameters[0]) === anyArrayType || isTypeAny(getTypeOfParameter(s.parameters[0]))) && isTypeAny(getReturnTypeOfSignature(s)); } - function compareSignaturesRelated(source, target, callbackCheck, ignoreReturnTypes, reportErrors, errorReporter, incompatibleErrorReporter, compareTypes) { + function compareSignaturesRelated(source, target, callbackCheck, ignoreReturnTypes, reportErrors, errorReporter, incompatibleErrorReporter, compareTypes, reportUnreliableMarkers) { if (source === target) { return -1; } @@ -37871,6 +37939,9 @@ var ts; var sourceCount = getParameterCount(source); var sourceRestType = getNonArrayRestType(source); var targetRestType = getNonArrayRestType(target); + if (sourceRestType || targetRestType) { + void instantiateType(sourceRestType || targetRestType, reportUnreliableMarkers); + } if (sourceRestType && targetRestType && sourceCount !== targetCount) { return 0; } @@ -37903,7 +37974,7 @@ var ts; var callbacks = sourceSig && targetSig && !getTypePredicateOfSignature(sourceSig) && !getTypePredicateOfSignature(targetSig) && (getFalsyFlags(sourceType) & 98304) === (getFalsyFlags(targetType) & 98304); var related = callbacks ? - compareSignaturesRelated(targetSig, sourceSig, strictVariance ? 2 : 1, false, reportErrors, errorReporter, incompatibleErrorReporter, compareTypes) : + compareSignaturesRelated(targetSig, sourceSig, strictVariance ? 2 : 1, false, reportErrors, errorReporter, incompatibleErrorReporter, compareTypes, reportUnreliableMarkers) : !callbackCheck && !strictVariance && compareTypes(sourceType, targetType, false) || compareTypes(targetType, sourceType, reportErrors); if (!related) { if (reportErrors) { @@ -37915,13 +37986,13 @@ var ts; } if (!ignoreReturnTypes) { var targetReturnType = isResolvingReturnTypeOfSignature(target) ? anyType - : target.declaration && isJSConstructor(target.declaration) ? getDeclaredTypeOfClassOrInterface(target.declaration.symbol) + : target.declaration && isJSConstructor(target.declaration) ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(target.declaration.symbol)) : getReturnTypeOfSignature(target); if (targetReturnType === voidType) { return result; } var sourceReturnType = isResolvingReturnTypeOfSignature(source) ? anyType - : source.declaration && isJSConstructor(source.declaration) ? getDeclaredTypeOfClassOrInterface(source.declaration.symbol) + : source.declaration && isJSConstructor(source.declaration) ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(source.declaration.symbol)) : getReturnTypeOfSignature(source); var targetTypePredicate = getTypePredicateOfSignature(target); if (targetTypePredicate) { @@ -38100,7 +38171,7 @@ var ts; return true; } if (source.flags & 524288 && target.flags & 524288) { - var related = relation.get(getRelationKey(source, target, relation)); + var related = relation.get(getRelationKey(source, target, false, relation)); if (related !== undefined) { return !!(related & 1); } @@ -38417,7 +38488,7 @@ var ts; var isIntersectionConstituent = !!isApparentIntersectionConstituent; if (source.flags & 1048576) { result = relation === comparableRelation ? - someTypeRelatedToType(source, target, reportErrors && !(source.flags & 131068), isIntersectionConstituent) : + someTypeRelatedToType(source, target, reportErrors && !(source.flags & 131068)) : eachTypeRelatedToType(source, target, reportErrors && !(source.flags & 131068)); } else { @@ -38440,7 +38511,7 @@ var ts; } } else if (source.flags & 2097152) { - result = someTypeRelatedToType(source, target, false, true); + result = someTypeRelatedToType(source, target, false); } if (!result && (source.flags & 66846720 || target.flags & 66846720)) { if (result = recursiveTypeRelatedTo(source, target, reportErrors, isIntersectionConstituent)) { @@ -38528,7 +38599,7 @@ var ts; if (!errorNode) return { value: ts.Debug.fail() }; if (ts.isJsxAttributes(errorNode) || ts.isJsxOpeningLikeElement(errorNode) || ts.isJsxOpeningLikeElement(errorNode.parent)) { - if (prop.valueDeclaration && ts.isJsxAttribute(prop.valueDeclaration)) { + if (prop.valueDeclaration && ts.isJsxAttribute(prop.valueDeclaration) && ts.getSourceFileOfNode(errorNode) === ts.getSourceFileOfNode(prop.valueDeclaration.name)) { errorNode = prop.valueDeclaration.name; } reportError(ts.Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(prop), typeToString(errorTarget)); @@ -38536,7 +38607,7 @@ var ts; else { var objectLiteralDeclaration_1 = source.symbol && ts.firstOrUndefined(source.symbol.declarations); var suggestion = void 0; - if (prop.valueDeclaration && ts.findAncestor(prop.valueDeclaration, function (d) { return d === objectLiteralDeclaration_1; })) { + if (prop.valueDeclaration && ts.findAncestor(prop.valueDeclaration, function (d) { return d === objectLiteralDeclaration_1; }) && ts.getSourceFileOfNode(objectLiteralDeclaration_1) === ts.getSourceFileOfNode(errorNode)) { var propDeclaration = prop.valueDeclaration; ts.Debug.assertNode(propDeclaration, ts.isObjectLiteralElementLike); errorNode = propDeclaration; @@ -38691,14 +38762,14 @@ var ts; } return result; } - function someTypeRelatedToType(source, target, reportErrors, isIntersectionConstituent) { + function someTypeRelatedToType(source, target, reportErrors) { var sourceTypes = source.types; if (source.flags & 1048576 && containsType(sourceTypes, target)) { return -1; } var len = sourceTypes.length; for (var i = 0; i < len; i++) { - var related = isRelatedTo(sourceTypes[i], target, reportErrors && i === len - 1, undefined, isIntersectionConstituent); + var related = isRelatedTo(sourceTypes[i], target, reportErrors && i === len - 1); if (related) { return related; } @@ -38767,7 +38838,7 @@ var ts; if (overflow) { return 0; } - var id = getRelationKey(source, target, relation); + var id = getRelationKey(source, target, isIntersectionConstituent, relation); var entry = relation.get(id); if (entry !== undefined) { if (reportErrors && entry & 2 && !(entry & 4)) { @@ -39530,7 +39601,7 @@ var ts; return function (source, target) { return reportIncompatibleError(ts.Diagnostics.Construct_signature_return_types_0_and_1_are_incompatible, typeToString(source), typeToString(target)); }; } function signatureRelatedTo(source, target, erase, reportErrors, incompatibleReporter) { - return compareSignaturesRelated(erase ? getErasedSignature(source) : source, erase ? getErasedSignature(target) : target, 0, false, reportErrors, reportError, incompatibleReporter, isRelatedTo); + return compareSignaturesRelated(erase ? getErasedSignature(source) : source, erase ? getErasedSignature(target) : target, 0, false, reportErrors, reportError, incompatibleReporter, isRelatedTo, reportUnreliableMarkers); } function signaturesIdenticalTo(source, target, kind) { var sourceSignatures = getSignaturesOfType(source, kind); @@ -39781,17 +39852,18 @@ var ts; } return result; } - function getRelationKey(source, target, relation) { + function getRelationKey(source, target, isIntersectionConstituent, relation) { if (relation === identityRelation && source.id > target.id) { var temp = source; source = target; target = temp; } + var intersection = isIntersectionConstituent ? "&" : ""; if (isTypeReferenceWithGenericArguments(source) && isTypeReferenceWithGenericArguments(target)) { var typeParameters = []; - return getTypeReferenceId(source, typeParameters) + "," + getTypeReferenceId(target, typeParameters); + return getTypeReferenceId(source, typeParameters) + "," + getTypeReferenceId(target, typeParameters) + intersection; } - return source.id + "," + target.id; + return source.id + "," + target.id + intersection; } function forEachProperty(prop, callback) { if (ts.getCheckFlags(prop) & 6) { @@ -39825,7 +39897,7 @@ var ts; !hasBaseType(checkClass, getDeclaringClass(p)) : false; }) ? undefined : checkClass; } function isDeeplyNestedType(type, stack, depth) { - if (depth >= 5 && type.flags & 524288) { + if (depth >= 5 && type.flags & 524288 && !isObjectOrArrayLiteralType(type)) { var symbol = type.symbol; if (symbol) { var count = 0; @@ -40164,33 +40236,19 @@ var ts; function addOptionalTypeMarker(type) { return strictNullChecks ? getUnionType([type, optionalType]) : type; } + function isNotOptionalTypeMarker(type) { + return type !== optionalType; + } function removeOptionalTypeMarker(type) { - return strictNullChecks ? filterType(type, function (t) { return t !== optionalType; }) : type; + return strictNullChecks ? filterType(type, isNotOptionalTypeMarker) : type; } - function propagateOptionalTypeMarker(type, wasOptional) { - return wasOptional ? addOptionalTypeMarker(type) : type; + function propagateOptionalTypeMarker(type, node, wasOptional) { + return wasOptional ? ts.isOutermostOptionalChain(node) ? getOptionalType(type) : addOptionalTypeMarker(type) : type; } - function createPooledOptionalTypeResult(isOptional, type) { - pooledOptionalTypeResult.isOptional = isOptional; - pooledOptionalTypeResult.type = type; - return pooledOptionalTypeResult; - } - function checkOptionalExpression(parent, expression, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic) { - var isOptional = false; - var type = checkExpression(expression); - if (ts.isOptionalChain(parent)) { - if (parent.questionDotToken) { - isOptional = isNullableType(type); - return createPooledOptionalTypeResult(isOptional, isOptional ? getNonNullableType(type) : type); - } - var nonOptionalType = removeOptionalTypeMarker(type); - if (nonOptionalType !== type) { - isOptional = true; - type = nonOptionalType; - } - } - type = checkNonNullType(type, expression, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic); - return createPooledOptionalTypeResult(isOptional, type); + function getOptionalExpressionType(exprType, expression) { + return ts.isExpressionOfOptionalChainRoot(expression) ? getNonNullableType(exprType) : + ts.isOptionalChain(expression) ? removeOptionalTypeMarker(exprType) : + exprType; } function isCoercibleUnderDoubleEquals(source, target) { return ((source.flags & (8 | 4 | 512)) !== 0) @@ -40313,14 +40371,14 @@ var ts; var stringIndexInfo = getIndexInfoOfType(type, 0); var numberIndexInfo = getIndexInfoOfType(type, 1); var result = createAnonymousType(type.symbol, members, ts.emptyArray, ts.emptyArray, stringIndexInfo && createIndexInfo(getWidenedType(stringIndexInfo.type), stringIndexInfo.isReadonly), numberIndexInfo && createIndexInfo(getWidenedType(numberIndexInfo.type), numberIndexInfo.isReadonly)); - result.objectFlags |= (ts.getObjectFlags(type) & (16384 | 1048576)); + result.objectFlags |= (ts.getObjectFlags(type) & (16384 | 2097152)); return result; } function getWidenedType(type) { return getWidenedTypeWithContext(type, undefined); } function getWidenedTypeWithContext(type, context) { - if (ts.getObjectFlags(type) & 786432) { + if (ts.getObjectFlags(type) & 1572864) { if (context === undefined && type.widened) { return type.widened; } @@ -40351,7 +40409,7 @@ var ts; } function reportWideningErrorsInType(type) { var errorReported = false; - if (ts.getObjectFlags(type) & 262144) { + if (ts.getObjectFlags(type) & 524288) { if (type.flags & 1048576) { if (ts.some(type.types, isEmptyObjectType)) { errorReported = true; @@ -40377,7 +40435,7 @@ var ts; for (var _d = 0, _e = getPropertiesOfObjectType(type); _d < _e.length; _d++) { var p = _e[_d]; var t = getTypeOfSymbol(p); - if (ts.getObjectFlags(t) & 262144) { + if (ts.getObjectFlags(t) & 524288) { if (!reportWideningErrorsInType(t)) { error(p.valueDeclaration, ts.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, symbolToString(p), typeToString(getWidenedType(t))); } @@ -40455,7 +40513,7 @@ var ts; errorOrSuggestion(noImplicitAny, declaration, diagnostic, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)), typeAsString); } function reportErrorsFromWidening(declaration, type, wideningKind) { - if (produceDiagnostics && noImplicitAny && ts.getObjectFlags(type) & 262144) { + if (produceDiagnostics && noImplicitAny && ts.getObjectFlags(type) & 524288) { if (!reportWideningErrorsInType(type)) { reportImplicitAny(declaration, type, wideningKind); } @@ -40568,7 +40626,7 @@ var ts; return !!(type.flags & 63176704 || objectFlags & 4 && (type.node || ts.forEach(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 && type.symbol && type.symbol.flags & (16 | 8192 | 32 | 2048 | 4096) && type.symbol.declarations || - objectFlags & 32 || + objectFlags & (32 | 131072) || type.flags & 3145728 && !(type.flags & 1024) && couldUnionOrIntersectionContainTypeVariables(type)); } function couldUnionOrIntersectionContainTypeVariables(type) { @@ -40612,7 +40670,7 @@ var ts; return type; } function isPartiallyInferableType(type) { - return !(ts.getObjectFlags(type) & 1048576) || + return !(ts.getObjectFlags(type) & 2097152) || isObjectLiteralType(type) && ts.some(getPropertiesOfType(type), function (prop) { return isPartiallyInferableType(getTypeOfSymbol(prop)); }); } function createReverseMappedType(source, target, constraint) { @@ -40738,10 +40796,7 @@ var ts; } target = getUnionType(targets); if (sources.length === 0) { - var savePriority = priority; - priority |= 1; - inferFromTypes(source, target); - priority = savePriority; + inferWithPriority(source, target, 1); return; } source = getUnionType(sources); @@ -40760,7 +40815,7 @@ var ts; target = getActualTypeVariable(target); } if (target.flags & 8650752) { - if (ts.getObjectFlags(source) & 1048576 || source === silentNeverType || (priority & 16 && (source === autoType || source === autoArrayType))) { + if (ts.getObjectFlags(source) & 2097152 || source === silentNeverType || (priority & 16 && (source === autoType || source === autoArrayType))) { return; } var inference = getInferenceInfoForType(target); @@ -40821,10 +40876,7 @@ var ts; else if ((isLiteralType(source) || source.flags & 4) && target.flags & 4194304) { var empty = createEmptyObjectTypeFromStringLiteral(source); contravariant = !contravariant; - var savePriority = priority; - priority |= 32; - inferFromTypes(empty, target.type); - priority = savePriority; + inferWithPriority(empty, target.type, 32); contravariant = !contravariant; } else if (source.flags & 8388608 && target.flags & 8388608) { @@ -40865,6 +40917,12 @@ var ts; } } } + function inferWithPriority(source, target, newPriority) { + var savePriority = priority; + priority |= newPriority; + inferFromTypes(source, target); + priority = savePriority; + } function invokeOnce(source, target, action) { var key = source.id + "," + target.id; var status = visited && visited.get(key); @@ -40930,6 +40988,18 @@ var ts; } return undefined; } + function getSingleTypeVariableFromIntersectionTypes(types) { + var typeVariable; + for (var _i = 0, types_13 = types; _i < types_13.length; _i++) { + var type = types_13[_i]; + var t = type.flags & 2097152 && ts.find(type.types, function (t) { return !!getInferenceInfoForType(t); }); + if (!t || typeVariable && t !== typeVariable) { + return undefined; + } + typeVariable = t; + } + return typeVariable; + } function inferToMultipleTypes(source, targets, targetFlags) { var typeVariableCount = 0; if (targetFlags & 1048576) { @@ -40955,6 +41025,13 @@ var ts; } } } + if (typeVariableCount === 0) { + var intersectionTypeVariable = getSingleTypeVariableFromIntersectionTypes(targets); + if (intersectionTypeVariable) { + inferWithPriority(source, intersectionTypeVariable, 1); + } + return; + } if (typeVariableCount === 1 && !inferenceCircularity) { var unmatched = ts.flatMap(sources, function (s, i) { return matched_1[i] ? undefined : s; }); if (unmatched.length) { @@ -40975,15 +41052,12 @@ var ts; } } if (targetFlags & 2097152 ? typeVariableCount === 1 : typeVariableCount > 0) { - var savePriority = priority; - priority |= 1; for (var _b = 0, targets_4 = targets; _b < targets_4.length; _b++) { var t = targets_4[_b]; if (getInferenceInfoForType(t)) { - inferFromTypes(source, t); + inferWithPriority(source, t, 1); } } - priority = savePriority; } } function inferToMappedType(source, target, constraintType) { @@ -41000,20 +41074,15 @@ var ts; if (inference && !inference.isFixed) { var inferredType = inferTypeForHomomorphicMappedType(source, target, constraintType); if (inferredType) { - var savePriority = priority; - priority |= ts.getObjectFlags(source) & 1048576 ? - 4 : 2; - inferFromTypes(inferredType, inference.typeParameter); - priority = savePriority; + inferWithPriority(inferredType, inference.typeParameter, ts.getObjectFlags(source) & 2097152 ? + 4 : + 2); } } return true; } if (constraintType.flags & 262144) { - var savePriority = priority; - priority |= 8; - inferFromTypes(getIndexType(source), constraintType); - priority = savePriority; + inferWithPriority(getIndexType(source), constraintType, 8); var extendedConstraint = getConstraintOfType(constraintType); if (extendedConstraint && inferToMappedType(source, target, extendedConstraint)) { return true; @@ -41108,7 +41177,7 @@ var ts; var sourceLen = sourceSignatures.length; var targetLen = targetSignatures.length; var len = sourceLen < targetLen ? sourceLen : targetLen; - var skipParameters = !!(ts.getObjectFlags(source) & 1048576); + var skipParameters = !!(ts.getObjectFlags(source) & 2097152); for (var i = 0; i < len; i++) { inferFromSignature(getBaseSignature(sourceSignatures[sourceLen - len + i]), getBaseSignature(targetSignatures[targetLen - len + i]), skipParameters); } @@ -41348,6 +41417,15 @@ var ts; } return false; } + function optionalChainContainsReference(source, target) { + while (ts.isOptionalChain(source)) { + source = source.expression; + if (isMatchingReference(source, target)) { + return true; + } + } + return false; + } function containsMatchingReferenceDiscriminant(source, target) { var name; return ts.isAccessExpression(target) && @@ -41457,8 +41535,8 @@ var ts; } function getTypeFactsOfTypes(types) { var result = 0; - for (var _i = 0, types_13 = types; _i < types_13.length; _i++) { - var t = types_13[_i]; + for (var _i = 0, types_14 = types; _i < types_14.length; _i++) { + var t = types_14[_i]; result |= getTypeFacts(t); } return result; @@ -41809,8 +41887,8 @@ var ts; } function isEvolvingArrayTypeList(types) { var hasEvolvingArrayType = false; - for (var _i = 0, types_14 = types; _i < types_14.length; _i++) { - var t = types_14[_i]; + for (var _i = 0, types_15 = types; _i < types_15.length; _i++) { + var t = types_15[_i]; if (!(t.flags & 131072)) { if (!(ts.getObjectFlags(t) & 256)) { return false; @@ -41878,9 +41956,18 @@ var ts; var links = getNodeLinks(node); var signature = links.effectsSignature; if (signature === undefined) { - var funcType = node.parent.kind === 225 ? getTypeOfDottedName(node.expression, undefined) : - node.expression.kind !== 101 ? checkOptionalExpression(node, node.expression).type : - undefined; + var funcType = void 0; + if (node.parent.kind === 225) { + funcType = getTypeOfDottedName(node.expression, undefined); + } + else if (node.expression.kind !== 101) { + if (ts.isOptionalChain(node)) { + funcType = checkNonNullType(getOptionalExpressionType(checkExpression(node.expression), node.expression), node.expression); + } + else { + funcType = checkNonNullExpression(node.expression); + } + } var signatures = getSignaturesOfType(funcType && getApparentType(funcType) || unknownType, 0); var candidate = signatures.length === 1 && !signatures[0].typeParameters ? signatures[0] : ts.some(signatures, hasTypePredicateOrNeverReturnType) ? getResolvedSignature(node) : @@ -41893,6 +41980,13 @@ var ts; return !!(getTypePredicateOfSignature(signature) || signature.declaration && (getReturnTypeFromAnnotation(signature.declaration) || unknownType).flags & 131072); } + function getTypePredicateArgument(predicate, callExpression) { + if (predicate.kind === 1 || predicate.kind === 3) { + return callExpression.arguments[predicate.parameterIndex]; + } + var invokedExpression = ts.skipParentheses(callExpression.expression); + return ts.isAccessExpression(invokedExpression) ? ts.skipParentheses(invokedExpression.expression) : undefined; + } function reportFlowControlError(node) { var block = ts.findAncestor(node, ts.isFunctionOrModuleBlock); var sourceFile = ts.getSourceFileOfNode(node); @@ -41908,6 +42002,11 @@ var ts; function isUnlockedReachableFlowNode(flow) { return !(flow.flags & 4096 && flow.lock.locked) && isReachableFlowNodeWorker(flow, false); } + function isFalseExpression(expr) { + var node = ts.skipParentheses(expr); + return node.kind === 90 || node.kind === 208 && (node.operatorToken.kind === 55 && (isFalseExpression(node.left) || isFalseExpression(node.right)) || + node.operatorToken.kind === 56 && isFalseExpression(node.left) && isFalseExpression(node.right)); + } function isReachableFlowNodeWorker(flow, noCacheCheck) { while (true) { if (flow === lastFlowNode) { @@ -41927,8 +42026,17 @@ var ts; } else if (flags & 512) { var signature = getEffectsSignature(flow.node); - if (signature && getReturnTypeOfSignature(signature).flags & 131072) { - return false; + if (signature) { + var predicate = getTypePredicateOfSignature(signature); + if (predicate && predicate.kind === 3) { + var predicateArgument = flow.node.arguments[predicate.parameterIndex]; + if (predicateArgument && isFalseExpression(predicateArgument)) { + return false; + } + } + if (getReturnTypeOfSignature(signature).flags & 131072) { + return false; + } } flow = flow.antecedent; } @@ -42128,6 +42236,9 @@ var ts; } function narrowTypeByAssertion(type, expr) { var node = ts.skipParentheses(expr); + if (node.kind === 90) { + return unreachableNeverType; + } if (node.kind === 208) { if (node.operatorToken.kind === 55) { return narrowTypeByAssertion(narrowTypeByAssertion(type, node.left), node.right); @@ -42146,7 +42257,7 @@ var ts; var flowType = getTypeAtFlowNode(flow.antecedent); var type = getTypeFromFlowType(flowType); var narrowedType = predicate.type ? narrowTypeByTypePredicate(type, predicate, flow.node, true) : - predicate.kind === 3 ? narrowTypeByAssertion(type, flow.node.arguments[predicate.parameterIndex]) : + predicate.kind === 3 && predicate.parameterIndex >= 0 && predicate.parameterIndex < flow.node.arguments.length ? narrowTypeByAssertion(type, flow.node.arguments[predicate.parameterIndex]) : type; return narrowedType === type ? flowType : createFlowType(narrowedType, isIncomplete(flowType)); } @@ -42209,17 +42320,24 @@ var ts; if (isMatchingReference(reference, expr)) { type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } - else if (isMatchingReferenceDiscriminant(expr, type)) { - type = narrowTypeByDiscriminant(type, expr, function (t) { return narrowTypeBySwitchOnDiscriminant(t, flow.switchStatement, flow.clauseStart, flow.clauseEnd); }); - } else if (expr.kind === 203 && isMatchingReference(reference, expr.expression)) { type = narrowBySwitchOnTypeOf(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } - else if (containsMatchingReferenceDiscriminant(reference, expr)) { - type = declaredType; - } - else if (flow.clauseStart === flow.clauseEnd && isExhaustiveSwitchStatement(flow.switchStatement)) { - return unreachableNeverType; + else { + if (strictNullChecks) { + if (optionalChainContainsReference(expr, reference)) { + type = narrowTypeBySwitchOptionalChainContainment(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd, function (t) { return !(t.flags & (32768 | 131072)); }); + } + else if (expr.kind === 203 && optionalChainContainsReference(expr.expression, reference)) { + type = narrowTypeBySwitchOptionalChainContainment(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd, function (t) { return !(t.flags & 131072 || t.flags & 128 && t.value === "undefined"); }); + } + } + if (isMatchingReferenceDiscriminant(expr, type)) { + type = narrowTypeByDiscriminant(type, expr, function (t) { return narrowTypeBySwitchOnDiscriminant(t, flow.switchStatement, flow.clauseStart, flow.clauseEnd); }); + } + else if (containsMatchingReferenceDiscriminant(reference, expr)) { + type = declaredType; + } } return createFlowType(type, isIncomplete(flowType)); } @@ -42227,11 +42345,16 @@ var ts; var antecedentTypes = []; var subtypeReduction = false; var seenIncomplete = false; + var bypassFlow; for (var _i = 0, _a = flow.antecedents; _i < _a.length; _i++) { var antecedent = _a[_i]; if (antecedent.flags & 4096 && antecedent.lock.locked) { continue; } + if (!bypassFlow && antecedent.flags & 128 && antecedent.clauseStart === antecedent.clauseEnd) { + bypassFlow = antecedent; + continue; + } var flowType = getTypeAtFlowNode(antecedent); var type = getTypeFromFlowType(flowType); if (type === declaredType && declaredType === initialType) { @@ -42245,6 +42368,22 @@ var ts; seenIncomplete = true; } } + if (bypassFlow) { + var flowType = getTypeAtFlowNode(bypassFlow); + var type = getTypeFromFlowType(flowType); + if (!ts.contains(antecedentTypes, type) && !isExhaustiveSwitchStatement(bypassFlow.switchStatement)) { + if (type === declaredType && declaredType === initialType) { + return type; + } + antecedentTypes.push(type); + if (!isTypeSubsetOf(type, declaredType)) { + subtypeReduction = true; + } + if (isIncomplete(flowType)) { + seenIncomplete = true; + } + } + } return createFlowType(getUnionOrEvolvingArrayType(antecedentTypes, subtypeReduction ? 2 : 1), seenIncomplete); } function getTypeAtFlowLoopLabel(flow) { @@ -42323,6 +42462,9 @@ var ts; if (isMatchingReference(reference, expr)) { return getTypeWithFacts(type, assumeTrue ? 4194304 : 8388608); } + if (strictNullChecks && assumeTrue && optionalChainContainsReference(expr, reference)) { + type = getTypeWithFacts(type, 2097152); + } if (isMatchingReferenceDiscriminant(expr, declaredType)) { return narrowTypeByDiscriminant(type, expr, function (t) { return getTypeWithFacts(t, assumeTrue ? 4194304 : 8388608); }); } @@ -42371,6 +42513,14 @@ var ts; if (isMatchingReference(reference, right_1)) { return narrowTypeByEquality(type, operator_1, left_1, assumeTrue); } + if (strictNullChecks) { + if (optionalChainContainsReference(left_1, reference)) { + type = narrowTypeByOptionalChainContainment(type, operator_1, right_1, assumeTrue); + } + else if (optionalChainContainsReference(right_1, reference)) { + type = narrowTypeByOptionalChainContainment(type, operator_1, left_1, assumeTrue); + } + } if (isMatchingReferenceDiscriminant(left_1, declaredType)) { return narrowTypeByDiscriminant(type, left_1, function (t) { return narrowTypeByEquality(t, operator_1, right_1, assumeTrue); }); } @@ -42394,6 +42544,12 @@ var ts; } return type; } + function narrowTypeByOptionalChainContainment(type, operator, value, assumeTrue) { + var effectiveTrue = operator === 34 || operator === 36 ? assumeTrue : !assumeTrue; + var doubleEquals = operator === 34 || operator === 35; + var valueNonNullish = !(getTypeFacts(getTypeOfExpression(value)) & (doubleEquals ? 262144 : 65536)); + return effectiveTrue === valueNonNullish ? getTypeWithFacts(type, 2097152) : type; + } function narrowTypeByEquality(type, operator, value, assumeTrue) { if (type.flags & 1) { return type; @@ -42440,16 +42596,19 @@ var ts; return type; } function narrowTypeByTypeof(type, typeOfExpr, operator, literal, assumeTrue) { + if (operator === 35 || operator === 37) { + assumeTrue = !assumeTrue; + } var target = getReferenceCandidate(typeOfExpr.expression); if (!isMatchingReference(reference, target)) { + if (strictNullChecks && optionalChainContainsReference(target, reference) && assumeTrue === (literal.text !== "undefined")) { + return getTypeWithFacts(type, 2097152); + } if (containsMatchingReference(reference, target)) { return declaredType; } return type; } - if (operator === 35 || operator === 37) { - assumeTrue = !assumeTrue; - } if (type.flags & 1 && literal.text === "function") { return type; } @@ -42479,6 +42638,10 @@ var ts; return type; } } + function narrowTypeBySwitchOptionalChainContainment(type, switchStatement, clauseStart, clauseEnd, clauseCheck) { + var everyClauseChecks = clauseStart !== clauseEnd && ts.every(getSwitchClauseTypes(switchStatement).slice(clauseStart, clauseEnd), clauseCheck); + return everyClauseChecks ? getTypeWithFacts(type, 2097152) : type; + } function narrowTypeBySwitchOnDiscriminant(type, switchStatement, clauseStart, clauseEnd) { var switchTypes = getSwitchClauseTypes(switchStatement); if (!switchTypes.length) { @@ -42572,6 +42735,9 @@ var ts; function narrowTypeByInstanceof(type, expr, assumeTrue) { var left = getReferenceCandidate(expr.left); if (!isMatchingReference(reference, left)) { + if (assumeTrue && strictNullChecks && optionalChainContainsReference(left, reference)) { + return getTypeWithFacts(type, 2097152); + } if (containsMatchingReference(reference, left) && !isSyntheticThisPropertyAccess(reference)) { return declaredType; } @@ -42626,36 +42792,25 @@ var ts; return type; } function narrowTypeByTypePredicate(type, predicate, callExpression, assumeTrue) { - if (isTypeAny(type) && (predicate.type === globalObjectType || predicate.type === globalFunctionType)) { - return type; - } - if (predicate.kind === 1 || predicate.kind === 3) { - var predicateArgument = callExpression.arguments[predicate.parameterIndex]; - if (predicateArgument && predicate.type) { + if (predicate.type && !(isTypeAny(type) && (predicate.type === globalObjectType || predicate.type === globalFunctionType))) { + var predicateArgument = getTypePredicateArgument(predicate, callExpression); + if (predicateArgument) { if (isMatchingReference(reference, predicateArgument)) { return getNarrowedType(type, predicate.type, assumeTrue, isTypeSubtypeOf); } + if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) && + !(getTypeFacts(predicate.type) & 65536)) { + return getTypeWithFacts(type, 2097152); + } if (containsMatchingReference(reference, predicateArgument)) { return declaredType; } } } - else { - var invokedExpression = ts.skipParentheses(callExpression.expression); - if (ts.isAccessExpression(invokedExpression) && predicate.type) { - var possibleReference = ts.skipParentheses(invokedExpression.expression); - if (isMatchingReference(reference, possibleReference)) { - return getNarrowedType(type, predicate.type, assumeTrue, isTypeSubtypeOf); - } - if (containsMatchingReference(reference, possibleReference)) { - return declaredType; - } - } - } return type; } function narrowType(type, expr, assumeTrue) { - if (ts.isOptionalChainRoot(expr.parent) || + if (ts.isExpressionOfOptionalChainRoot(expr) || ts.isBinaryExpression(expr.parent) && expr.parent.operatorToken.kind === 60 && expr.parent.left === expr) { return narrowTypeByOptionality(type, expr, assumeTrue); } @@ -42893,7 +43048,19 @@ var ts; } } else if (!assumeInitialized && !(getFalsyFlags(type) & 32768) && getFalsyFlags(flowType) & 32768) { - error(node, ts.Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol)); + var diag = error(node, ts.Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol)); + if (type.symbol && type.symbol.declarations.length === 1 && ts.isFunctionTypeNode(type.symbol.declarations[0])) { + var funcTypeNode = type.symbol.declarations[0]; + var returnType = getReturnTypeFromAnnotation(funcTypeNode); + if (returnType && returnType.flags & 1048576) { + var unionTypes_3 = funcTypeNode.type.types; + if (unionTypes_3 && unionTypes_3[unionTypes_3.length - 1].kind === 145) { + var parenedFuncType = ts.getMutableClone(funcTypeNode); + parenedFuncType.end = unionTypes_3[unionTypes_3.length - 2].end; + ts.addRelatedInfo(diag, ts.createDiagnosticForNode(parenedFuncType, ts.Diagnostics.Did_you_mean_to_parenthesize_this_function_type)); + } + } + } return type; } return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType; @@ -43505,16 +43672,20 @@ var ts; } return undefined; } - function getContextualTypeForArgument(callTarget, arg) { + function getContextualTypeForArgument(callTarget, arg, contextFlags) { var args = getEffectiveCallArguments(callTarget); var argIndex = args.indexOf(arg); - return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex); + return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex, contextFlags); } - function getContextualTypeForArgumentAtIndex(callTarget, argIndex) { + function getContextualTypeForArgumentAtIndex(callTarget, argIndex, contextFlags) { var signature = getNodeLinks(callTarget).resolvedSignature === resolvingSignature ? resolvingSignature : getResolvedSignature(callTarget); if (ts.isJsxOpeningLikeElement(callTarget) && argIndex === 0) { return getEffectiveFirstArgumentForJsxSignature(signature, callTarget); } + if (contextFlags && contextFlags & 4 && signature.target) { + var baseSignature = getBaseSignature(signature.target); + return intersectTypes(getTypeAtPosition(signature, argIndex), getTypeAtPosition(baseSignature, argIndex)); + } return getTypeAtPosition(signature, argIndex); } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { @@ -43813,7 +43984,7 @@ var ts; return stringType; } case 196: - return getContextualTypeForArgument(parent, node); + return getContextualTypeForArgument(parent, node, contextFlags); case 198: case 216: return ts.isConstTypeReference(parent.type) ? undefined : getTypeFromTypeNode(parent.type); @@ -44004,8 +44175,8 @@ var ts; } var signatureList; var types = type.types; - for (var _i = 0, types_15 = types; _i < types_15.length; _i++) { - var current = types_15[_i]; + for (var _i = 0, types_16 = types; _i < types_16.length; _i++) { + var current = types_16[_i]; var signature = getContextualCallSignature(current, node); if (signature) { if (!signatureList) { @@ -44088,7 +44259,7 @@ var ts; var literalType = type.literalType; if (!literalType) { literalType = type.literalType = cloneTypeReference(type); - literalType.objectFlags |= 65536 | 524288; + literalType.objectFlags |= 65536 | 1048576; } return literalType; } @@ -44198,7 +44369,7 @@ var ts; checkTypeAssignableTo(type, getTypeFromTypeNode(enumTag.typeExpression), memberDecl); } } - objectFlags |= ts.getObjectFlags(type) & 1835008; + objectFlags |= ts.getObjectFlags(type) & 3670016; var nameType = computedNameType && isTypeUsableAsPropertyName(computedNameType) ? computedNameType : undefined; var prop = nameType ? createSymbol(4 | member.flags, getPropertyNameFromType(nameType), checkFlags | 4096) : @@ -44296,7 +44467,7 @@ var ts; var stringIndexInfo = hasComputedStringProperty ? getObjectLiteralIndexInfo(node, offset, propertiesArray, 0) : undefined; var numberIndexInfo = hasComputedNumberProperty ? getObjectLiteralIndexInfo(node, offset, propertiesArray, 1) : undefined; var result = createAnonymousType(node.symbol, propertiesTable, ts.emptyArray, ts.emptyArray, stringIndexInfo, numberIndexInfo); - result.objectFlags |= objectFlags | 128 | 524288; + result.objectFlags |= objectFlags | 128 | 1048576; if (isJSObjectLiteral) { result.objectFlags |= 16384; } @@ -44376,7 +44547,7 @@ var ts; var member = attributeDecl.symbol; if (ts.isJsxAttribute(attributeDecl)) { var exprType = checkJsxAttribute(attributeDecl, checkMode); - objectFlags |= ts.getObjectFlags(exprType) & 1835008; + objectFlags |= ts.getObjectFlags(exprType) & 3670016; var attributeSymbol = createSymbol(4 | 33554432 | member.flags, member.escapedName); attributeSymbol.declarations = member.declarations; attributeSymbol.parent = member.parent; @@ -44444,7 +44615,7 @@ var ts; function createJsxAttributesType() { objectFlags |= freshObjectLiteralFlag; var result = createAnonymousType(attributes.symbol, attributesTable, ts.emptyArray, ts.emptyArray, undefined, undefined); - result.objectFlags |= objectFlags | 128 | 524288; + result.objectFlags |= objectFlags | 128 | 1048576; return result; } } @@ -44805,8 +44976,8 @@ var ts; function symbolHasNonMethodDeclaration(symbol) { return !!forEachProperty(symbol, function (prop) { return !(prop.flags & 8192); }); } - function checkNonNullExpression(node, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic) { - return checkNonNullType(checkExpression(node), node, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic); + function checkNonNullExpression(node) { + return checkNonNullType(checkExpression(node), node); } function isNullableType(type) { return !!((strictNullChecks ? getFalsyFlags(type) : type.flags) & 98304); @@ -44814,22 +44985,34 @@ var ts; function getNonNullableTypeIfNeeded(type) { return isNullableType(type) ? getNonNullableType(type) : type; } - function checkNonNullType(type, node, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic) { + function reportObjectPossiblyNullOrUndefinedError(node, flags) { + error(node, flags & 32768 ? flags & 65536 ? + ts.Diagnostics.Object_is_possibly_null_or_undefined : + ts.Diagnostics.Object_is_possibly_undefined : + ts.Diagnostics.Object_is_possibly_null); + } + function reportCannotInvokePossiblyNullOrUndefinedError(node, flags) { + error(node, flags & 32768 ? flags & 65536 ? + ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null_or_undefined : + ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_undefined : + ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null); + } + function checkNonNullTypeWithReporter(type, node, reportError) { if (strictNullChecks && type.flags & 2) { error(node, ts.Diagnostics.Object_is_of_type_unknown); return errorType; } var kind = (strictNullChecks ? getFalsyFlags(type) : type.flags) & 98304; if (kind) { - error(node, kind & 32768 ? kind & 65536 ? - (nullOrUndefinedDiagnostic || ts.Diagnostics.Object_is_possibly_null_or_undefined) : - (undefinedDiagnostic || ts.Diagnostics.Object_is_possibly_undefined) : - (nullDiagnostic || ts.Diagnostics.Object_is_possibly_null)); + reportError(node, kind); var t = getNonNullableType(type); return t.flags & (98304 | 131072) ? errorType : t; } return type; } + function checkNonNullType(type, node) { + return checkNonNullTypeWithReporter(type, node, reportObjectPossiblyNullOrUndefinedError); + } function checkNonNullNonVoidType(type, node) { var nonNullType = checkNonNullType(type, node); if (nonNullType !== errorType && nonNullType.flags & 16384) { @@ -44838,10 +45021,16 @@ var ts; return nonNullType; } function checkPropertyAccessExpression(node) { - return checkPropertyAccessExpressionOrQualifiedName(node, node.expression, node.name); + return node.flags & 32 ? checkPropertyAccessChain(node) : + checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name); + } + function checkPropertyAccessChain(node) { + var leftType = checkExpression(node.expression); + var nonOptionalType = getOptionalExpressionType(leftType, node.expression); + return propagateOptionalTypeMarker(checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullType(nonOptionalType, node.expression), node.name), node, nonOptionalType !== leftType); } function checkQualifiedName(node) { - return checkPropertyAccessExpressionOrQualifiedName(node, node.left, node.right); + return checkPropertyAccessExpressionOrQualifiedName(node, node.left, checkNonNullExpression(node.left), node.right); } function isMethodAccessForCall(node) { while (node.parent.kind === 199) { @@ -44849,8 +45038,7 @@ var ts; } return ts.isCallOrNewExpression(node.parent) && node.parent.expression === node; } - function checkPropertyAccessExpressionOrQualifiedName(node, left, right) { - var _a = checkOptionalExpression(node, left), isOptional = _a.isOptional, leftType = _a.type; + function checkPropertyAccessExpressionOrQualifiedName(node, left, leftType, right) { var parentSymbol = getNodeLinks(left).resolvedSymbol; var assignmentKind = ts.getAssignmentTargetKind(node); var apparentType = getApparentType(assignmentKind !== 0 || isMethodAccessForCall(node) ? getWidenedType(leftType) : leftType); @@ -44903,7 +45091,7 @@ var ts; } propType = getConstraintForLocation(getTypeOfSymbol(prop), node); } - return propagateOptionalTypeMarker(getFlowTypeOfAccessExpression(node, prop, propType, right), isOptional); + return getFlowTypeOfAccessExpression(node, prop, propType, right); } function getFlowTypeOfAccessExpression(node, prop, propType, errorNode) { var assignmentKind = ts.getAssignmentTargetKind(node); @@ -45181,7 +45369,15 @@ var ts; return false; } function checkIndexedAccess(node) { - var _a = checkOptionalExpression(node, node.expression), isOptional = _a.isOptional, exprType = _a.type; + return node.flags & 32 ? checkElementAccessChain(node) : + checkElementAccessExpression(node, checkNonNullExpression(node.expression)); + } + function checkElementAccessChain(node) { + var exprType = checkExpression(node.expression); + var nonOptionalType = getOptionalExpressionType(exprType, node.expression); + return propagateOptionalTypeMarker(checkElementAccessExpression(node, checkNonNullType(nonOptionalType, node.expression)), node, nonOptionalType !== exprType); + } + function checkElementAccessExpression(node, exprType) { var objectType = ts.getAssignmentTargetKind(node) !== 0 || isMethodAccessForCall(node) ? getWidenedType(exprType) : exprType; var indexExpression = node.argumentExpression; var indexType = checkExpression(indexExpression); @@ -45197,7 +45393,7 @@ var ts; 2 | (isGenericObjectType(objectType) && !isThisTypeParameter(objectType) ? 1 : 0) : 0; var indexedAccessType = getIndexedAccessTypeOrUndefined(objectType, effectiveIndexType, node, accessFlags) || errorType; - return propagateOptionalTypeMarker(checkIndexedAccessIndexType(getFlowTypeOfAccessExpression(node, indexedAccessType.symbol, indexedAccessType, indexExpression), node), isOptional); + return checkIndexedAccessIndexType(getFlowTypeOfAccessExpression(node, indexedAccessType.symbol, indexedAccessType, indexExpression), node); } function checkThatExpressionIsProperSymbolReference(expression, expressionType, reportError) { if (expressionType === errorType) { @@ -45253,7 +45449,7 @@ var ts; resolveUntypedCall(node); return unknownSignature; } - function reorderCandidates(signatures, result, isOptionalCall) { + function reorderCandidates(signatures, result, callChainFlags) { var lastParent; var lastSymbol; var cutoffIndex = 0; @@ -45279,7 +45475,7 @@ var ts; lastParent = parent; } lastSymbol = symbol; - if (signature.hasLiteralTypes) { + if (signatureHasLiteralTypes(signature)) { specializedIndex++; spliceIndex = specializedIndex; cutoffIndex++; @@ -45287,7 +45483,7 @@ var ts; else { spliceIndex = index; } - result.splice(spliceIndex, 0, isOptionalCall ? createOptionalCallSignature(signature) : signature); + result.splice(spliceIndex, 0, callChainFlags ? getOptionalCallSignature(signature, callChainFlags) : signature); } } function isSpreadArgument(arg) { @@ -45358,7 +45554,7 @@ var ts; function hasCorrectTypeArgumentArity(signature, typeArguments) { var numTypeParameters = ts.length(signature.typeParameters); var minTypeArgumentCount = getMinTypeArgumentCount(signature.typeParameters); - return !typeArguments || + return !ts.some(typeArguments) || (typeArguments.length >= minTypeArgumentCount && typeArguments.length <= numTypeParameters); } function getSingleCallSignature(type) { @@ -45529,7 +45725,19 @@ var ts; var thisType = getThisTypeOfSignature(signature); if (thisType && thisType !== voidType && node.kind !== 196) { var thisArgumentNode = getThisArgumentOfCall(node); - var thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType; + var thisArgumentType = void 0; + if (thisArgumentNode) { + thisArgumentType = checkExpression(thisArgumentNode); + if (ts.isOptionalChainRoot(thisArgumentNode.parent)) { + thisArgumentType = getNonNullableType(thisArgumentType); + } + else if (ts.isOptionalChain(thisArgumentNode.parent)) { + thisArgumentType = removeOptionalTypeMarker(thisArgumentType); + } + } + else { + thisArgumentType = voidType; + } var errorNode = reportErrors ? (thisArgumentNode || node) : undefined; var headMessage_1 = ts.Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1; if (!checkTypeRelatedTo(thisArgumentType, thisType, relation, errorNode, headMessage_1, containingMessageChain, errorOutputContainer)) { @@ -45729,7 +45937,7 @@ var ts; if (closestSignature && getMinArgumentCount(closestSignature) > argCount && closestSignature.declaration) { var paramDecl = closestSignature.declaration.parameters[closestSignature.thisParameter ? argCount + 1 : argCount]; if (paramDecl) { - related = ts.createDiagnosticForNode(paramDecl, ts.isBindingPattern(paramDecl.name) ? ts.Diagnostics.An_argument_matching_this_binding_pattern_was_not_provided : ts.Diagnostics.An_argument_for_0_was_not_provided, !paramDecl.name ? argCount : !ts.isBindingPattern(paramDecl.name) ? ts.idText(getFirstIdentifier(paramDecl.name)) : undefined); + related = ts.createDiagnosticForNode(paramDecl, ts.isBindingPattern(paramDecl.name) ? ts.Diagnostics.An_argument_matching_this_binding_pattern_was_not_provided : ts.Diagnostics.An_argument_for_0_was_not_provided, !paramDecl.name ? argCount : !ts.isBindingPattern(paramDecl.name) ? ts.idText(ts.getFirstIdentifier(paramDecl.name)) : undefined); } } if (min < argCount && argCount < max) { @@ -45783,7 +45991,7 @@ var ts; } return ts.createDiagnosticForNodeArray(ts.getSourceFileOfNode(node), typeArguments, ts.Diagnostics.Expected_0_type_arguments_but_got_1, belowArgCount === -Infinity ? aboveArgCount : belowArgCount, argCount); } - function resolveCall(node, signatures, candidatesOutArray, checkMode, isOptionalCall, fallbackError) { + function resolveCall(node, signatures, candidatesOutArray, checkMode, callChainFlags, fallbackError) { var isTaggedTemplate = node.kind === 197; var isDecorator = node.kind === 156; var isJsxOpeningOrSelfClosingElement = ts.isJsxOpeningLikeElement(node); @@ -45796,7 +46004,7 @@ var ts; } } var candidates = candidatesOutArray || []; - reorderCandidates(signatures, candidates, isOptionalCall); + reorderCandidates(signatures, candidates, callChainFlags); if (!candidates.length) { if (reportErrors) { diagnostics.add(getDiagnosticForCallNode(node, ts.Diagnostics.Call_target_does_not_contain_any_signatures)); @@ -45909,7 +46117,7 @@ var ts; candidateForTypeArgumentError = undefined; if (isSingleNonGenericCandidate) { var candidate = candidates[0]; - if (typeArguments || !hasCorrectArity(node, args, candidate, signatureHelpTrailingComma)) { + if (ts.some(typeArguments) || !hasCorrectArity(node, args, candidate, signatureHelpTrailingComma)) { return undefined; } if (getSignatureApplicabilityError(node, args, candidate, relation, 0, false, undefined)) { @@ -45927,7 +46135,7 @@ var ts; var inferenceContext = void 0; if (candidate.typeParameters) { var typeArgumentTypes = void 0; - if (typeArguments) { + if (ts.some(typeArguments)) { typeArgumentTypes = checkTypeArguments(candidate, typeArguments, false); if (!typeArgumentTypes) { candidateForTypeArgumentError = candidate; @@ -45988,29 +46196,30 @@ var ts; var _a = ts.minAndMax(candidates, getNumNonRestParameters), minArgumentCount = _a.min, maxNonRestParam = _a.max; var parameters = []; var _loop_15 = function (i) { - var symbols = ts.mapDefined(candidates, function (_a) { - var parameters = _a.parameters, hasRestParameter = _a.hasRestParameter; - return hasRestParameter ? - i < parameters.length - 1 ? parameters[i] : ts.last(parameters) : - i < parameters.length ? parameters[i] : undefined; - }); + var symbols = ts.mapDefined(candidates, function (s) { return signatureHasRestParameter(s) ? + i < s.parameters.length - 1 ? s.parameters[i] : ts.last(s.parameters) : + i < s.parameters.length ? s.parameters[i] : undefined; }); ts.Debug.assert(symbols.length !== 0); parameters.push(createCombinedSymbolFromTypes(symbols, ts.mapDefined(candidates, function (candidate) { return tryGetTypeAtPosition(candidate, i); }))); }; for (var i = 0; i < maxNonRestParam; i++) { _loop_15(i); } - var restParameterSymbols = ts.mapDefined(candidates, function (c) { return c.hasRestParameter ? ts.last(c.parameters) : undefined; }); - var hasRestParameter = restParameterSymbols.length !== 0; - if (hasRestParameter) { + var restParameterSymbols = ts.mapDefined(candidates, function (c) { return signatureHasRestParameter(c) ? ts.last(c.parameters) : undefined; }); + var flags = 0; + if (restParameterSymbols.length !== 0) { var type = createArrayType(getUnionType(ts.mapDefined(candidates, tryGetRestTypeOfSignature), 2)); parameters.push(createCombinedSymbolForOverloadFailure(restParameterSymbols, type)); + flags |= 1; } - return createSignature(candidates[0].declaration, undefined, thisParameter, parameters, getIntersectionType(candidates.map(getReturnTypeOfSignature)), undefined, minArgumentCount, hasRestParameter, candidates.some(function (c) { return c.hasLiteralTypes; })); + if (candidates.some(signatureHasLiteralTypes)) { + flags |= 2; + } + return createSignature(candidates[0].declaration, undefined, thisParameter, parameters, getIntersectionType(candidates.map(getReturnTypeOfSignature)), undefined, minArgumentCount, flags); } function getNumNonRestParameters(signature) { var numParams = signature.parameters.length; - return signature.hasRestParameter ? numParams - 1 : numParams; + return signatureHasRestParameter(signature) ? numParams - 1 : numParams; } function createCombinedSymbolFromTypes(sources, types) { return createCombinedSymbolForOverloadFailure(sources, getUnionType(types, 2)); @@ -46077,12 +46286,24 @@ var ts; var baseTypeNode = ts.getEffectiveBaseTypeNode(ts.getContainingClass(node)); if (baseTypeNode) { var baseConstructors = getInstantiatedConstructorsForTypeArguments(superType, baseTypeNode.typeArguments, baseTypeNode); - return resolveCall(node, baseConstructors, candidatesOutArray, checkMode, false); + return resolveCall(node, baseConstructors, candidatesOutArray, checkMode, 0); } } return resolveUntypedCall(node); } - var _b = checkOptionalExpression(node, node.expression, ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null, ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_undefined, ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null_or_undefined), isOptional = _b.isOptional, funcType = _b.type; + var callChainFlags; + var funcType = checkExpression(node.expression); + if (ts.isCallChain(node)) { + var nonOptionalType = getOptionalExpressionType(funcType, node.expression); + callChainFlags = nonOptionalType === funcType ? 0 : + ts.isOutermostOptionalChain(node) ? 8 : + 4; + funcType = nonOptionalType; + } + else { + callChainFlags = 0; + } + funcType = checkNonNullTypeWithReporter(funcType, node.expression, reportCannotInvokePossiblyNullOrUndefinedError); if (funcType === silentNeverType) { return silentNeverSignature; } @@ -46122,7 +46343,7 @@ var ts; error(node, ts.Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType)); return resolveErrorCall(node); } - return resolveCall(node, callSignatures, candidatesOutArray, checkMode, isOptional); + return resolveCall(node, callSignatures, candidatesOutArray, checkMode, callChainFlags); } function isGenericFunctionReturningFunction(signature) { return !!(signature.typeParameters && isFunctionType(getReturnTypeOfSignature(signature))); @@ -46162,11 +46383,11 @@ var ts; error(node, ts.Diagnostics.Cannot_create_an_instance_of_an_abstract_class); return resolveErrorCall(node); } - return resolveCall(node, constructSignatures, candidatesOutArray, checkMode, false); + return resolveCall(node, constructSignatures, candidatesOutArray, checkMode, 0); } var callSignatures = getSignaturesOfType(expressionType, 0); if (callSignatures.length) { - var signature = resolveCall(node, callSignatures, candidatesOutArray, checkMode, false); + var signature = resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0); if (!noImplicitAny) { if (signature.declaration && !isJSConstructor(signature.declaration) && getReturnTypeOfSignature(signature) !== voidType) { error(node, ts.Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword); @@ -46248,8 +46469,8 @@ var ts; if (apparentType.flags & 1048576) { var types = apparentType.types; var hasSignatures = false; - for (var _i = 0, types_16 = types; _i < types_16.length; _i++) { - var constituent = types_16[_i]; + for (var _i = 0, types_17 = types; _i < types_17.length; _i++) { + var constituent = types_17[_i]; var signatures = getSignaturesOfType(constituent, kind); if (signatures.length !== 0) { hasSignatures = true; @@ -46333,7 +46554,7 @@ var ts; invocationError(node.tag, apparentType, 0); return resolveErrorCall(node); } - return resolveCall(node, callSignatures, candidatesOutArray, checkMode, false); + return resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0); } function getDiagnosticHeadMessageForDecoratorResolution(node) { switch (node.parent.kind) { @@ -46380,7 +46601,7 @@ var ts; invocationErrorRecovery(apparentType, 0, diag); return resolveErrorCall(node); } - return resolveCall(node, callSignatures, candidatesOutArray, checkMode, false, headMessage); + return resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0, headMessage); } function createSignatureForJSXIntrinsic(node, result) { var namespace = getJsxNamespaceAt(node); @@ -46390,7 +46611,7 @@ var ts; var declaration = ts.createFunctionTypeNode(undefined, [ts.createParameter(undefined, undefined, undefined, "props", undefined, nodeBuilder.typeToTypeNode(result, node))], returnNode ? ts.createTypeReferenceNode(returnNode, undefined) : ts.createKeywordTypeNode(124)); var parameterSymbol = createSymbol(1, "props"); parameterSymbol.type = result; - return createSignature(declaration, undefined, undefined, [parameterSymbol], typeSymbol ? getDeclaredTypeOfSymbol(typeSymbol) : errorType, undefined, 1, false, false); + return createSignature(declaration, undefined, undefined, [parameterSymbol], typeSymbol ? getDeclaredTypeOfSymbol(typeSymbol) : errorType, undefined, 1, 0); } function resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode) { if (isJsxIntrinsicIdentifier(node.tagName)) { @@ -46412,12 +46633,12 @@ var ts; error(node.tagName, ts.Diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, ts.getTextOfNode(node.tagName)); return resolveErrorCall(node); } - return resolveCall(node, signatures, candidatesOutArray, checkMode, false); + return resolveCall(node, signatures, candidatesOutArray, checkMode, 0); } function isPotentiallyUncalledDecorator(decorator, signatures) { return signatures.length && ts.every(signatures, function (signature) { return signature.minArgumentCount === 0 && - !signature.hasRestParameter && + !signatureHasRestParameter(signature) && signature.parameters.length < getDecoratorArgumentCount(decorator, signature); }); } @@ -46466,7 +46687,7 @@ var ts; return false; } function mergeJSSymbols(target, source) { - if (source && (ts.hasEntries(source.exports) || ts.hasEntries(source.members))) { + if (source) { var links = getSymbolLinks(source); if (!links.inferredClassSymbol || !links.inferredClassSymbol.has("" + getSymbolId(target))) { var inferred = isTransientSymbol(target) ? target : cloneSymbol(target); @@ -46758,7 +46979,7 @@ var ts; return type; } function getParameterNameAtPosition(signature, pos) { - var paramCount = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + var paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); if (pos < paramCount) { return signature.parameters[pos].escapedName; } @@ -46775,11 +46996,11 @@ var ts; return tryGetTypeAtPosition(signature, pos) || anyType; } function tryGetTypeAtPosition(signature, pos) { - var paramCount = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + var paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); if (pos < paramCount) { return getTypeOfParameter(signature.parameters[pos]); } - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var restType = getTypeOfSymbol(signature.parameters[paramCount]); var index = pos - paramCount; if (!isTupleType(restType) || restType.target.hasRestElement || index < getTypeArguments(restType).length) { @@ -46811,7 +47032,7 @@ var ts; } function getParameterCount(signature) { var length = signature.parameters.length; - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var restType = getTypeOfSymbol(signature.parameters[length - 1]); if (isTupleType(restType)) { return length + getTypeArguments(restType).length - 1; @@ -46820,7 +47041,7 @@ var ts; return length; } function getMinArgumentCount(signature) { - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); if (isTupleType(restType)) { var minLength = restType.target.minLength; @@ -46832,14 +47053,14 @@ var ts; return signature.minArgumentCount; } function hasEffectiveRestParameter(signature) { - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); return !isTupleType(restType) || restType.target.hasRestElement; } return false; } function getEffectiveRestType(signature) { - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); return isTupleType(restType) ? getRestArrayTypeOfTupleType(restType) : restType; } @@ -46856,7 +47077,7 @@ var ts; return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : fallbackType; } function inferFromAnnotatedParameters(signature, context, inferenceContext) { - var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + var len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); for (var i = 0; i < len; i++) { var declaration = signature.parameters[i].valueDeclaration; if (declaration.type) { @@ -46885,7 +47106,7 @@ var ts; assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter)); } } - var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + var len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); for (var i = 0; i < len; i++) { var parameter = signature.parameters[i]; if (!ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) { @@ -46893,7 +47114,7 @@ var ts; assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType); } } - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var parameter = ts.last(signature.parameters); if (isTransientSymbol(parameter) || !ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) { var contextualParameterType = getRestTypeAtPosition(context, len); @@ -47125,8 +47346,8 @@ var ts; var operandType = getTypeOfExpression(node.expression.expression); var witnesses = getSwitchClauseTypeOfWitnesses(node); var notEqualFacts_1 = getFactsFromTypeofSwitch(0, 0, witnesses, true); - var type_4 = getBaseConstraintOfType(operandType) || operandType; - return !!(filterType(type_4, function (t) { return (getTypeFacts(t) & notEqualFacts_1) === notEqualFacts_1; }).flags & 131072); + var type_3 = getBaseConstraintOfType(operandType) || operandType; + return !!(filterType(type_3, function (t) { return (getTypeFacts(t) & notEqualFacts_1) === notEqualFacts_1; }).flags & 131072); } var type = getTypeOfExpression(node.expression); if (!isLiteralType(type)) { @@ -47227,9 +47448,9 @@ var ts; return links.contextFreeType; } var returnType = getReturnTypeFromBody(node, checkMode); - var returnOnlySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, returnType, undefined, 0, false, false); + var returnOnlySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, returnType, undefined, 0, 0); var returnOnlyType = createAnonymousType(node.symbol, emptySymbols, [returnOnlySignature], ts.emptyArray, undefined, undefined); - returnOnlyType.objectFlags |= 1048576; + returnOnlyType.objectFlags |= 2097152; return links.contextFreeType = returnOnlyType; } return anyFunctionType; @@ -47425,8 +47646,7 @@ var ts; var span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos); var diagnostic = ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.await_expression_is_only_allowed_within_an_async_function); var func = ts.getContainingFunction(node); - if (func && func.kind !== 161) { - ts.Debug.assert((ts.getFunctionFlags(func) & 2) === 0, "Enclosing function should never be an async function."); + if (func && func.kind !== 161 && (ts.getFunctionFlags(func) & 2) === 0) { var relatedInfo = ts.createDiagnosticForNode(func, ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async); ts.addRelatedInfo(diagnostic, relatedInfo); } @@ -47522,8 +47742,8 @@ var ts; } if (type.flags & 3145728) { var types = type.types; - for (var _i = 0, types_17 = types; _i < types_17.length; _i++) { - var t = types_17[_i]; + for (var _i = 0, types_18 = types; _i < types_18.length; _i++) { + var t = types_18[_i]; if (maybeTypeOfKind(t, kind)) { return true; } @@ -48098,24 +48318,9 @@ var ts; } return [effectiveLeft, effectiveRight]; } - function isYieldExpressionInClass(node) { - var current = node; - var parent = node.parent; - while (parent) { - if (ts.isFunctionLike(parent) && current === parent.body) { - return false; - } - else if (ts.isClassLike(current)) { - return true; - } - current = parent; - parent = parent.parent; - } - return false; - } function checkYieldExpression(node) { if (produceDiagnostics) { - if (!(node.flags & 8192) || isYieldExpressionInClass(node)) { + if (!(node.flags & 8192)) { grammarErrorOnFirstToken(node, ts.Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body); } if (isInParameterInitializerBeforeContainingFunction(node)) { @@ -48404,13 +48609,25 @@ var ts; } } } + function getReturnTypeOfSingleNonGenericCallSignature(funcType) { + var signature = getSingleCallSignature(funcType); + if (signature && !signature.typeParameters) { + return getReturnTypeOfSignature(signature); + } + } + function getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) { + var funcType = checkExpression(expr.expression); + var nonOptionalType = getOptionalExpressionType(funcType, expr.expression); + var returnType = getReturnTypeOfSingleNonGenericCallSignature(funcType); + return returnType && propagateOptionalTypeMarker(returnType, expr, nonOptionalType !== funcType); + } function getTypeOfExpression(node, cache) { var expr = ts.skipParentheses(node); if (ts.isCallExpression(expr) && expr.expression.kind !== 101 && !ts.isRequireCall(expr, true) && !isSymbolOrSymbolForCall(expr)) { - var _a = checkOptionalExpression(expr, expr.expression), isOptional = _a.isOptional, funcType = _a.type; - var signature = getSingleCallSignature(funcType); - if (signature && !signature.typeParameters) { - return propagateOptionalTypeMarker(getReturnTypeOfSignature(signature), isOptional); + var type = ts.isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : + getReturnTypeOfSingleNonGenericCallSignature(checkNonNullExpression(expr.expression)); + if (type) { + return type; } } else if (ts.isAssertionExpression(expr) && !ts.isConstTypeReference(expr.type)) { @@ -48446,7 +48663,7 @@ var ts; (node.parent.kind === 194 && node.parent.expression === node) || ((node.kind === 75 || node.kind === 152) && isInRightSideOfImportOrExportAssignment(node) || (node.parent.kind === 171 && node.parent.exprName === node)) || - (node.parent.kind === 261 && (compilerOptions.preserveConstEnums || node.flags & 8388608)); + (node.parent.kind === 261); if (!ok) { error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query); } @@ -48637,7 +48854,7 @@ var ts; } else { if (typePredicate.parameterIndex >= 0) { - if (signature.hasRestParameter && typePredicate.parameterIndex === signature.parameters.length - 1) { + if (signatureHasRestParameter(signature) && typePredicate.parameterIndex === signature.parameters.length - 1) { error(parameterName, ts.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); } else { @@ -49596,7 +49813,7 @@ var ts; if (!checkTypeAssignableTo(promiseConstructorType, globalPromiseConstructorLikeType, returnTypeNode, ts.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value)) { return; } - var rootName = promiseConstructorName && getFirstIdentifier(promiseConstructorName); + var rootName = promiseConstructorName && ts.getFirstIdentifier(promiseConstructorName); var collidingSymbol = getSymbol(node.locals, rootName.escapedText, 111551); if (collidingSymbol) { error(collidingSymbol.valueDeclaration, ts.Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, ts.idText(rootName), ts.entityNameToString(promiseConstructorName)); @@ -49646,7 +49863,7 @@ var ts; function markEntityNameOrEntityExpressionAsReference(typeName) { if (!typeName) return; - var rootName = getFirstIdentifier(typeName); + var rootName = ts.getFirstIdentifier(typeName); var meaning = (typeName.kind === 75 ? 788968 : 1920) | 2097152; var rootSymbol = resolveName(rootName, rootName.escapedText, meaning, undefined, undefined, true); if (rootSymbol @@ -49679,8 +49896,8 @@ var ts; } function getEntityNameForDecoratorMetadataFromTypeList(types) { var commonEntityName; - for (var _i = 0, types_18 = types; _i < types_18.length; _i++) { - var typeNode = types_18[_i]; + for (var _i = 0, types_19 = types; _i < types_19.length; _i++) { + var typeNode = types_19[_i]; while (typeNode.kind === 181) { typeNode = typeNode.type; } @@ -51098,10 +51315,7 @@ var ts; firstDefaultClause = clause; } else { - var sourceFile = ts.getSourceFileOfNode(node); - var start = ts.skipTrivia(sourceFile.text, clause.pos); - var end = clause.statements.length > 0 ? clause.statements[0].pos : clause.end; - grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement); + grammarErrorOnNode(clause, ts.Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement); hasDuplicateDefaultClause = true; } } @@ -51118,6 +51332,9 @@ var ts; } } ts.forEach(clause.statements, checkSourceElement); + if (compilerOptions.noFallthroughCasesInSwitch && clause.fallthroughFlowNode && isReachableFlowNode(clause.fallthroughFlowNode)) { + error(clause, ts.Diagnostics.Fallthrough_case_in_switch); + } }); if (node.caseBlock.locals) { registerForUnusedIdentifiersCheck(node.caseBlock); @@ -51565,11 +51782,13 @@ var ts; || derived.valueDeclaration && ts.isBinaryExpression(derived.valueDeclaration)) { continue; } - if (basePropertyFlags !== 4 && derivedPropertyFlags === 4) { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_property; - } - else if (basePropertyFlags === 4 && derivedPropertyFlags !== 4) { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_accessor; + var overriddenInstanceProperty = basePropertyFlags !== 4 && derivedPropertyFlags === 4; + var overriddenInstanceAccessor = basePropertyFlags === 4 && derivedPropertyFlags !== 4; + if (overriddenInstanceProperty || overriddenInstanceAccessor) { + var errorMessage_1 = overriddenInstanceProperty ? + ts.Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property : + ts.Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor; + error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage_1, symbolToString(base), typeToString(baseType), typeToString(type)); } else { var uninitialized = ts.find(derived.declarations, function (d) { return d.kind === 158 && !d.initializer; }); @@ -51585,22 +51804,20 @@ var ts; || !ts.isIdentifier(propName) || !strictNullChecks || !isPropertyInitializedInConstructor(propName, type, constructor)) { - var errorMessage_1 = ts.Diagnostics.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration; - error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage_1, symbolToString(base), typeToString(baseType)); + var errorMessage_2 = ts.Diagnostics.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration; + error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage_2, symbolToString(base), typeToString(baseType)); } } - continue; } + continue; } else if (isPrototypeProperty(base)) { - if (isPrototypeProperty(derived)) { + if (isPrototypeProperty(derived) || derived.flags & 4) { continue; } - else if (derived.flags & 98304) { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor; - } else { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property; + ts.Debug.assert(!!(derived.flags & 98304)); + errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor; } } else if (base.flags & 98304) { @@ -52066,22 +52283,6 @@ var ts; break; } } - function getFirstIdentifier(node) { - switch (node.kind) { - case 75: - return node; - case 152: - do { - node = node.left; - } while (node.kind !== 75); - return node; - case 193: - do { - node = node.expression; - } while (node.kind !== 75); - return node; - } - } function getFirstNonModuleExportsIdentifier(node) { switch (node.kind) { case 75: @@ -52194,7 +52395,7 @@ var ts; var target = resolveAlias(getSymbolOfNode(node)); if (target !== unknownSymbol) { if (target.flags & 111551) { - var moduleName = getFirstIdentifier(node.moduleReference); + var moduleName = ts.getFirstIdentifier(node.moduleReference); if (!(resolveEntityName(moduleName, 111551 | 1920).flags & 1920)) { error(moduleName, ts.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, ts.declarationNameToString(moduleName)); } @@ -52254,7 +52455,7 @@ var ts; if (!node.parent.parent.moduleSpecifier) { var exportedName = node.propertyName || node.name; var symbol = resolveName(exportedName, exportedName.escapedText, 111551 | 788968 | 1920 | 2097152, undefined, undefined, true); - if (symbol && (symbol === undefinedSymbol || isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0])))) { + if (symbol && (symbol === undefinedSymbol || symbol === globalThisSymbol || isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0])))) { error(exportedName, ts.Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, ts.idText(exportedName)); } else { @@ -54328,10 +54529,10 @@ var ts; if (type.flags & 4 || type.flags & 8) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead, ts.getTextOfNode(parameter.name), typeToString(type), typeToString(node.type ? getTypeFromTypeNode(node.type) : anyType)); } - if (type.flags & 1048576 && allTypesAssignableToKind(type, 128, true)) { + if (type.flags & 1048576 && allTypesAssignableToKind(type, 384, true)) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead); } - return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number); + return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_either_string_or_number); } if (!node.type) { return grammarErrorOnNode(node, ts.Diagnostics.An_index_signature_must_have_a_type_annotation); @@ -55133,7 +55334,7 @@ var ts; } function checkGrammarImportCallExpression(node) { if (moduleKind === ts.ModuleKind.ES2015) { - return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext); + return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_commonjs_amd_system_or_umd); } if (node.typeArguments) { return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_cannot_have_type_arguments); @@ -55198,6 +55399,14 @@ var ts; case 2: return "nextType"; } } + function signatureHasRestParameter(s) { + return !!(s.flags & 1); + } + ts.signatureHasRestParameter = signatureHasRestParameter; + function signatureHasLiteralTypes(s) { + return !!(s.flags & 2); + } + ts.signatureHasLiteralTypes = signatureHasLiteralTypes; })(ts || (ts = {})); var ts; (function (ts) { @@ -56103,7 +56312,9 @@ var ts; } ts.createPropertyAccess = createPropertyAccess; function updatePropertyAccess(node, expression, name) { - ts.Debug.assert(!(node.flags & 32), "Cannot update a PropertyAccessChain using updatePropertyAccess. Use updatePropertyAccessChain instead."); + if (ts.isOptionalChain(node)) { + return updatePropertyAccessChain(node, expression, node.questionDotToken, name); + } return node.expression !== expression || node.name !== name ? updateNode(setEmitFlags(createPropertyAccess(expression, name), ts.getEmitFlags(node)), node) @@ -56137,7 +56348,9 @@ var ts; } ts.createElementAccess = createElementAccess; function updateElementAccess(node, expression, argumentExpression) { - ts.Debug.assert(!(node.flags & 32), "Cannot update an ElementAccessChain using updateElementAccess. Use updateElementAccessChain instead."); + if (ts.isOptionalChain(node)) { + return updateElementAccessChain(node, expression, node.questionDotToken, argumentExpression); + } return node.expression !== expression || node.argumentExpression !== argumentExpression ? updateNode(createElementAccess(expression, argumentExpression), node) @@ -56171,7 +56384,9 @@ var ts; } ts.createCall = createCall; function updateCall(node, expression, typeArguments, argumentsArray) { - ts.Debug.assert(!(node.flags & 32), "Cannot update a CallChain using updateCall. Use updateCallChain instead."); + if (ts.isOptionalChain(node)) { + return updateCallChain(node, expression, node.questionDotToken, typeArguments, argumentsArray); + } return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray @@ -56769,7 +56984,7 @@ var ts; var node = createSynthesizedNode(231); node.awaitModifier = awaitModifier; node.initializer = initializer; - node.expression = expression; + node.expression = ts.isCommaSequence(expression) ? createParen(expression) : expression; node.statement = asEmbeddedStatement(statement); return node; } @@ -58923,7 +59138,7 @@ var ts; var conditionalPrecedence = ts.getOperatorPrecedence(209, 57); var emittedCondition = ts.skipPartiallyEmittedExpressions(condition); var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition); - if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1) { + if (ts.compareValues(conditionPrecedence, conditionalPrecedence) !== 1) { return ts.createParen(condition); } return condition; @@ -59369,6 +59584,12 @@ var ts; } ts.getRestIndicatorOfBindingOrAssignmentElement = getRestIndicatorOfBindingOrAssignmentElement; function getPropertyNameOfBindingOrAssignmentElement(bindingElement) { + var propertyName = tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement); + ts.Debug.assert(!!propertyName || ts.isSpreadAssignment(bindingElement), "Invalid property name for binding element."); + return propertyName; + } + ts.getPropertyNameOfBindingOrAssignmentElement = getPropertyNameOfBindingOrAssignmentElement; + function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { case 190: if (bindingElement.propertyName) { @@ -59395,9 +59616,8 @@ var ts; ? target.expression : target; } - ts.Debug.fail("Invalid property name for binding element."); } - ts.getPropertyNameOfBindingOrAssignmentElement = getPropertyNameOfBindingOrAssignmentElement; + ts.tryGetPropertyNameOfBindingOrAssignmentElement = tryGetPropertyNameOfBindingOrAssignmentElement; function isStringOrNumericLiteral(node) { var kind = node.kind; return kind === 10 @@ -61195,7 +61415,8 @@ var ts; }; if (value) { value = ts.visitNode(value, visitor, ts.isExpression); - if (ts.isIdentifier(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText)) { + if (ts.isIdentifier(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText) || + bindingOrAssignmentElementContainsNonLiteralComputedName(node)) { value = ensureIdentifier(flattenContext, value, false, location); } else if (needsValue) { @@ -61248,6 +61469,17 @@ var ts; } return false; } + function bindingOrAssignmentElementContainsNonLiteralComputedName(element) { + var propertyName = ts.tryGetPropertyNameOfBindingOrAssignmentElement(element); + if (propertyName && ts.isComputedPropertyName(propertyName) && !ts.isLiteralExpression(propertyName.expression)) { + return true; + } + var target = ts.getTargetOfBindingOrAssignmentElement(element); + return !!target && ts.isBindingOrAssignmentPattern(target) && bindingOrAssignmentPatternContainsNonLiteralComputedName(target); + } + function bindingOrAssignmentPatternContainsNonLiteralComputedName(pattern) { + return !!ts.forEach(ts.getElementsOfBindingOrAssignmentPattern(pattern), bindingOrAssignmentElementContainsNonLiteralComputedName); + } function flattenDestructuringBinding(node, visitor, context, level, rval, hoistTempVariables, skipInitializer) { if (hoistTempVariables === void 0) { hoistTempVariables = false; } var pendingExpressions; @@ -61267,7 +61499,8 @@ var ts; }; if (ts.isVariableDeclaration(node)) { var initializer = ts.getInitializerOfBindingOrAssignmentElement(node); - if (initializer && ts.isIdentifier(initializer) && bindingOrAssignmentElementAssignsToName(node, initializer.escapedText)) { + if (initializer && (ts.isIdentifier(initializer) && bindingOrAssignmentElementAssignsToName(node, initializer.escapedText) || + bindingOrAssignmentElementContainsNonLiteralComputedName(node))) { initializer = ensureIdentifier(flattenContext, initializer, false, initializer); node = ts.updateVariableDeclaration(node, node.name, node.type, initializer); } @@ -62070,8 +62303,8 @@ var ts; function generateClassElementDecorationExpressions(node, isStatic) { var members = getDecoratedClassElements(node, isStatic); var expressions; - for (var _i = 0, members_5 = members; _i < members_5.length; _i++) { - var member = members_5[_i]; + for (var _i = 0, members_6 = members; _i < members_6.length; _i++) { + var member = members_6[_i]; var expression = generateClassElementDecorationExpression(node, member); if (expression) { if (!expressions) { @@ -62337,8 +62570,8 @@ var ts; } function serializeTypeList(types) { var serializedUnion; - for (var _i = 0, types_19 = types; _i < types_19.length; _i++) { - var typeNode = types_19[_i]; + for (var _i = 0, types_20 = types; _i < types_20.length; _i++) { + var typeNode = types_20[_i]; while (typeNode.kind === 181) { typeNode = typeNode.type; } @@ -62721,7 +62954,11 @@ var ts; } } } - function shouldEmitModuleDeclaration(node) { + function shouldEmitModuleDeclaration(nodeIn) { + var node = ts.getParseTreeNode(nodeIn, ts.isModuleDeclaration); + if (!node) { + return true; + } return ts.isInstantiatedModule(node, !!compilerOptions.preserveConstEnums || !!compilerOptions.isolatedModules); } function hasNamespaceQualifiedExportName(node) { @@ -63258,7 +63495,7 @@ var ts; } function visitPropertyDeclaration(node) { ts.Debug.assert(!ts.some(node.decorators)); - var expr = getPropertyNameExpressionIfNeeded(node.name, !!node.initializer); + var expr = getPropertyNameExpressionIfNeeded(node.name, !!node.initializer || !!context.getCompilerOptions().useDefineForClassFields); if (expr && !ts.isSimpleInlineableExpression(expr)) { (pendingExpressions || (pendingExpressions = [])).push(expr); } @@ -64681,7 +64918,7 @@ var ts; } return ts.updateParen(node, expression); } - function visitNonOptionalPropertyAccessExpression(node, captureThisArg) { + function visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg) { if (ts.isOptionalChain(node)) { return visitOptionalExpression(node, captureThisArg); } @@ -64689,24 +64926,17 @@ var ts; ts.Debug.assertNotNode(expression, ts.isSyntheticReference); var thisArg; if (captureThisArg) { - thisArg = ts.createTempVariable(hoistVariableDeclaration); - expression = ts.createParen(ts.createAssignment(thisArg, expression)); + if (shouldCaptureInTempVariable(expression)) { + thisArg = ts.createTempVariable(hoistVariableDeclaration); + expression = ts.createAssignment(thisArg, expression); + } + else { + thisArg = expression; + } } - expression = ts.updatePropertyAccess(node, expression, ts.visitNode(node.name, visitor, ts.isIdentifier)); - return thisArg ? ts.createSyntheticReferenceExpression(expression, thisArg) : expression; - } - function visitNonOptionalElementAccessExpression(node, captureThisArg) { - if (ts.isOptionalChain(node)) { - return visitOptionalExpression(node, captureThisArg); - } - var expression = ts.visitNode(node.expression, visitor, ts.isExpression); - ts.Debug.assertNotNode(expression, ts.isSyntheticReference); - var thisArg; - if (captureThisArg) { - thisArg = ts.createTempVariable(hoistVariableDeclaration); - expression = ts.createParen(ts.createAssignment(thisArg, expression)); - } - expression = ts.updateElementAccess(node, expression, ts.visitNode(node.argumentExpression, visitor, ts.isExpression)); + expression = node.kind === 193 + ? ts.updatePropertyAccess(node, expression, ts.visitNode(node.name, visitor, ts.isIdentifier)) + : ts.updateElementAccess(node, expression, ts.visitNode(node.argumentExpression, visitor, ts.isExpression)); return thisArg ? ts.createSyntheticReferenceExpression(expression, thisArg) : expression; } function visitNonOptionalCallExpression(node, captureThisArg) { @@ -64718,8 +64948,8 @@ var ts; function visitNonOptionalExpression(node, captureThisArg) { switch (node.kind) { case 199: return visitNonOptionalParenthesizedExpression(node, captureThisArg); - case 193: return visitNonOptionalPropertyAccessExpression(node, captureThisArg); - case 194: return visitNonOptionalElementAccessExpression(node, captureThisArg); + case 193: + case 194: return visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg); case 195: return visitNonOptionalCallExpression(node, captureThisArg); default: return ts.visitNode(node, visitor, ts.isExpression); } @@ -64727,31 +64957,36 @@ var ts; function visitOptionalExpression(node, captureThisArg) { var _a = flattenChain(node), expression = _a.expression, chain = _a.chain; var left = visitNonOptionalExpression(expression, ts.isCallChain(chain[0])); - var temp = ts.createTempVariable(hoistVariableDeclaration); var leftThisArg = ts.isSyntheticReference(left) ? left.thisArg : undefined; var leftExpression = ts.isSyntheticReference(left) ? left.expression : left; - var rightExpression = temp; + var capturedLeft = leftExpression; + if (shouldCaptureInTempVariable(leftExpression)) { + capturedLeft = ts.createTempVariable(hoistVariableDeclaration); + leftExpression = ts.createAssignment(capturedLeft, leftExpression); + } + var rightExpression = capturedLeft; var thisArg; for (var i = 0; i < chain.length; i++) { var segment = chain[i]; switch (segment.kind) { case 193: - if (i === chain.length - 1 && captureThisArg) { - thisArg = ts.createTempVariable(hoistVariableDeclaration); - rightExpression = ts.createParen(ts.createAssignment(thisArg, rightExpression)); - } - rightExpression = ts.createPropertyAccess(rightExpression, ts.visitNode(segment.name, visitor, ts.isIdentifier)); - break; case 194: if (i === chain.length - 1 && captureThisArg) { - thisArg = ts.createTempVariable(hoistVariableDeclaration); - rightExpression = ts.createParen(ts.createAssignment(thisArg, rightExpression)); + if (shouldCaptureInTempVariable(rightExpression)) { + thisArg = ts.createTempVariable(hoistVariableDeclaration); + rightExpression = ts.createAssignment(thisArg, rightExpression); + } + else { + thisArg = rightExpression; + } } - rightExpression = ts.createElementAccess(rightExpression, ts.visitNode(segment.argumentExpression, visitor, ts.isExpression)); + rightExpression = segment.kind === 193 + ? ts.createPropertyAccess(rightExpression, ts.visitNode(segment.name, visitor, ts.isIdentifier)) + : ts.createElementAccess(rightExpression, ts.visitNode(segment.argumentExpression, visitor, ts.isExpression)); break; case 195: if (i === 0 && leftThisArg) { - rightExpression = ts.createFunctionCall(rightExpression, leftThisArg, ts.visitNodes(segment.arguments, visitor, ts.isExpression)); + rightExpression = ts.createFunctionCall(rightExpression, leftThisArg.kind === 101 ? ts.createThis() : leftThisArg, ts.visitNodes(segment.arguments, visitor, ts.isExpression)); } else { rightExpression = ts.createCall(rightExpression, undefined, ts.visitNodes(segment.arguments, visitor, ts.isExpression)); @@ -64760,22 +64995,25 @@ var ts; } ts.setOriginalNode(rightExpression, segment); } - var target = ts.createConditional(ts.createLogicalOr(ts.createStrictEquality(ts.createAssignment(temp, leftExpression), ts.createNull()), ts.createStrictEquality(temp, ts.createVoidZero())), ts.createVoidZero(), rightExpression); + var target = ts.createConditional(createNotNullCondition(leftExpression, capturedLeft, true), ts.createVoidZero(), rightExpression); return thisArg ? ts.createSyntheticReferenceExpression(target, thisArg) : target; } - function createNotNullCondition(node) { - return ts.createBinary(ts.createBinary(node, ts.createToken(37), ts.createNull()), ts.createToken(55), ts.createBinary(node, ts.createToken(37), ts.createVoidZero())); + function createNotNullCondition(left, right, invert) { + return ts.createBinary(ts.createBinary(left, ts.createToken(invert ? 36 : 37), ts.createNull()), ts.createToken(invert ? 56 : 55), ts.createBinary(right, ts.createToken(invert ? 36 : 37), ts.createVoidZero())); } function transformNullishCoalescingExpression(node) { - var expressions = []; var left = ts.visitNode(node.left, visitor, ts.isExpression); - if (!ts.isIdentifier(left)) { - var temp = ts.createTempVariable(hoistVariableDeclaration); - expressions.push(ts.createAssignment(temp, left)); - left = temp; + var right = left; + if (shouldCaptureInTempVariable(left)) { + right = ts.createTempVariable(hoistVariableDeclaration); + left = ts.createAssignment(right, left); } - expressions.push(ts.createParen(ts.createConditional(createNotNullCondition(left), left, ts.visitNode(node.right, visitor, ts.isExpression)))); - return ts.inlineExpressions(expressions); + return ts.createConditional(createNotNullCondition(left, right), right, ts.visitNode(node.right, visitor, ts.isExpression)); + } + function shouldCaptureInTempVariable(expression) { + return !ts.isIdentifier(expression) && + expression.kind !== 103 && + expression.kind !== 101; } } ts.transformESNext = transformESNext; @@ -71496,6 +71734,7 @@ var ts; var combinedStatements; if (ts.isSourceFileJS(currentSourceFile)) { combinedStatements = ts.createNodeArray(transformDeclarationsForJS(node)); + refs.forEach(referenceVisitor); emittedImports = ts.filter(combinedStatements, ts.isAnyImportSyntax); } else { @@ -73037,7 +73276,11 @@ var ts; bundleBuildInfo.js = printer.bundleFileInfo; } function emitDeclarationFileOrBundle(sourceFileOrBundle, declarationFilePath, declarationMapPath, relativeToBuildInfo) { - if (!sourceFileOrBundle || !declarationFilePath) { + if (!sourceFileOrBundle) + return; + if (!declarationFilePath) { + if (emitOnlyDtsFiles || compilerOptions.emitDeclarationOnly) + emitSkipped = true; return; } var sourceFiles = ts.isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : sourceFileOrBundle.sourceFiles; @@ -75598,8 +75841,8 @@ var ts; bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "reference", data: directive.fileName }); writeLine(); } - for (var _d = 0, types_20 = types; _d < types_20.length; _d++) { - var directive = types_20[_d]; + for (var _d = 0, types_21 = types; _d < types_21.length; _d++) { + var directive = types_21[_d]; var pos = writer.getTextPos(); writeComment("/// "); if (bundleFileInfo) @@ -77265,26 +77508,31 @@ var ts; if (existingDirectories.has(directoryPath)) { return true; } - if (system.directoryExists(directoryPath)) { + if ((compilerHost.directoryExists || system.directoryExists)(directoryPath)) { existingDirectories.set(directoryPath, true); return true; } return false; } - function ensureDirectoriesExist(directoryPath) { - if (directoryPath.length > ts.getRootLength(directoryPath) && !directoryExists(directoryPath)) { - var parentDirectory = ts.getDirectoryPath(directoryPath); - ensureDirectoriesExist(parentDirectory); - if (compilerHost.createDirectory) { - compilerHost.createDirectory(directoryPath); - } - else { - system.createDirectory(directoryPath); + function writeFile(fileName, data, writeByteOrderMark, onError) { + try { + ts.performance.mark("beforeIOWrite"); + ts.writeFileEnsuringDirectories(fileName, data, writeByteOrderMark, function (path, data, writeByteOrderMark) { return writeFileWorker(path, data, writeByteOrderMark); }, function (path) { return (compilerHost.createDirectory || system.createDirectory)(path); }, function (path) { return directoryExists(path); }); + ts.performance.mark("afterIOWrite"); + ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite"); + } + catch (e) { + if (onError) { + onError(e.message); } } } var outputFingerprints; - function writeFileIfUpdated(fileName, data, writeByteOrderMark) { + function writeFileWorker(fileName, data, writeByteOrderMark) { + if (!ts.isWatchSet(options) || !system.createHash || !system.getModifiedTime) { + system.writeFile(fileName, data, writeByteOrderMark); + return; + } if (!outputFingerprints) { outputFingerprints = ts.createMap(); } @@ -77307,25 +77555,6 @@ var ts; mtime: mtimeAfter }); } - function writeFile(fileName, data, writeByteOrderMark, onError) { - try { - ts.performance.mark("beforeIOWrite"); - ensureDirectoriesExist(ts.getDirectoryPath(ts.normalizePath(fileName))); - if (ts.isWatchSet(options) && system.createHash && system.getModifiedTime) { - writeFileIfUpdated(fileName, data, writeByteOrderMark); - } - else { - system.writeFile(fileName, data, writeByteOrderMark); - } - ts.performance.mark("afterIOWrite"); - ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite"); - } - catch (e) { - if (onError) { - onError(e.message); - } - } - } function getDefaultLibLocation() { return ts.getDirectoryPath(ts.normalizePath(system.getExecutingFilePath())); } @@ -78799,9 +79028,16 @@ var ts; } function getSourceFileFromReferenceWorker(fileName, getSourceFile, fail, refFile) { if (ts.hasExtension(fileName)) { - if (!options.allowNonTsExtensions && !ts.forEach(supportedExtensionsWithJsonIfResolveJsonModule, function (extension) { return ts.fileExtensionIs(host.getCanonicalFileName(fileName), extension); })) { - if (fail) - fail(ts.Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1, fileName, "'" + supportedExtensions.join("', '") + "'"); + var canonicalFileName_1 = host.getCanonicalFileName(fileName); + if (!options.allowNonTsExtensions && !ts.forEach(supportedExtensionsWithJsonIfResolveJsonModule, function (extension) { return ts.fileExtensionIs(canonicalFileName_1, extension); })) { + if (fail) { + if (ts.hasJSFileExtension(canonicalFileName_1)) { + fail(ts.Diagnostics.File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option, fileName); + } + else { + fail(ts.Diagnostics.File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1, fileName, "'" + supportedExtensions.join("', '") + "'"); + } + } return undefined; } var sourceFile = getSourceFile(fileName); @@ -78815,7 +79051,7 @@ var ts; fail(ts.Diagnostics.File_0_not_found, fileName); } } - else if (refFile && host.getCanonicalFileName(fileName) === host.getCanonicalFileName(refFile.fileName)) { + else if (refFile && canonicalFileName_1 === host.getCanonicalFileName(refFile.fileName)) { fail(ts.Diagnostics.A_file_cannot_have_a_reference_to_itself); } } @@ -78870,6 +79106,15 @@ var ts; function findSourceFile(fileName, path, isDefaultLib, ignoreNoDefaultLib, refFile, packageId) { if (useSourceOfProjectReferenceRedirect) { var source = getSourceOfProjectReferenceRedirect(fileName); + if (!source && + host.realpath && + options.preserveSymlinks && + ts.isDeclarationFileName(fileName) && + ts.stringContains(fileName, ts.nodeModulesPathPart)) { + var realPath = host.realpath(fileName); + if (realPath !== fileName) + source = getSourceOfProjectReferenceRedirect(realPath); + } if (source) { var file_1 = ts.isString(source) ? findSourceFile(source, toPath(source), isDefaultLib, ignoreNoDefaultLib, refFile, packageId) : @@ -79347,9 +79592,6 @@ var ts; else if (options.incremental && !options.outFile && !options.out && !options.configFilePath) { programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified)); } - if (options.noEmit && ts.isIncrementalCompilation(options)) { - createDiagnosticForOptionName(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", options.incremental ? "incremental" : "composite"); - } verifyProjectReferences(); if (options.composite) { var rootPaths = ts.arrayToSet(rootNames, toPath); @@ -80230,6 +80472,7 @@ var ts; ts.Debug.assert(state.seenAffectedFiles === undefined); state.seenAffectedFiles = ts.createMap(); } + state.emittedBuildInfo = !state.changedFilesSet.size && !state.affectedFilesPendingEmit; return state; } function convertToDiagnostics(diagnostics, newProgram, getCanonicalFileName) { @@ -80810,7 +81053,7 @@ var ts; } var state = { fileInfos: fileInfos, - compilerOptions: convertFromReusableCompilerOptions(program.options, toAbsolutePath), + compilerOptions: ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath), referencedMap: getMapOfReferencedSet(program.referencedMap, toPath), exportedModulesMap: getMapOfReferencedSet(program.exportedModulesMap, toPath), semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toPath(ts.isString(value) ? value : value[0]); }, function (value) { return ts.isString(value) ? ts.emptyArray : value[1]; }), @@ -80846,33 +81089,6 @@ var ts; } } ts.createBuildProgramUsingProgramBuildInfo = createBuildProgramUsingProgramBuildInfo; - function convertFromReusableCompilerOptions(options, toAbsolutePath) { - var result = {}; - var optionsNameMap = ts.getOptionNameMap().optionNameMap; - for (var name in options) { - if (ts.hasProperty(options, name)) { - result[name] = convertFromReusableCompilerOptionValue(optionsNameMap.get(name.toLowerCase()), options[name], toAbsolutePath); - } - } - if (result.configFilePath) { - result.configFilePath = toAbsolutePath(result.configFilePath); - } - return result; - } - function convertFromReusableCompilerOptionValue(option, value, toAbsolutePath) { - if (option) { - if (option.type === "list") { - var values = value; - if (option.element.isFilePath && values.length) { - return values.map(toAbsolutePath); - } - } - else if (option.isFilePath) { - return toAbsolutePath(value); - } - } - return value; - } function createRedirectedBuilderProgram(state, configFileParsingDiagnostics) { return { getState: ts.notImplemented, @@ -81497,7 +81713,7 @@ var ts; function getPreferencesForUpdate(compilerOptions, oldImportSpecifier) { return { relativePreference: ts.isExternalModuleNameRelative(oldImportSpecifier) ? 0 : 1, - ending: ts.hasJSOrJsonFileExtension(oldImportSpecifier) ? + ending: ts.hasJSFileExtension(oldImportSpecifier) ? 2 : ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeJs || ts.endsWith(oldImportSpecifier, "index") ? 1 : 0, }; @@ -81579,7 +81795,7 @@ var ts; var imports = _a.imports; return ts.firstDefined(imports, function (_a) { var text = _a.text; - return ts.pathIsRelative(text) ? ts.hasJSOrJsonFileExtension(text) : undefined; + return ts.pathIsRelative(text) ? ts.hasJSFileExtension(text) : undefined; }) || false; } function numberOfDirectorySeparators(str) { @@ -81706,8 +81922,11 @@ var ts; } } var moduleSpecifier = packageNameOnly ? moduleFileName : getDirectoryOrExtensionlessFileName(moduleFileName); - if (!ts.startsWith(sourceDirectory, getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex)))) + var globalTypingsCacheLocation = host.getGlobalTypingsCacheLocation && host.getGlobalTypingsCacheLocation(); + var pathToTopLevelNodeModules = getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex)); + if (!(ts.startsWith(sourceDirectory, pathToTopLevelNodeModules) || globalTypingsCacheLocation && ts.startsWith(getCanonicalFileName(globalTypingsCacheLocation), pathToTopLevelNodeModules))) { return undefined; + } var nodeModulesDirectoryName = moduleSpecifier.substring(parts.topLevelPackageNameIndex + 1); var packageName = ts.getPackageNameFromTypesPackageName(nodeModulesDirectoryName); return ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs && packageName === nodeModulesDirectoryName ? undefined : packageName; @@ -81901,7 +82120,7 @@ var ts; ts.createWatchStatusReporter = createWatchStatusReporter; function parseConfigFileWithSystem(configFileName, optionsToExtend, system, reportDiagnostic) { var host = system; - host.onUnRecoverableConfigFileDiagnostic = function (diagnostic) { return reportUnrecoverableDiagnostic(ts.sys, reportDiagnostic, diagnostic); }; + host.onUnRecoverableConfigFileDiagnostic = function (diagnostic) { return reportUnrecoverableDiagnostic(system, reportDiagnostic, diagnostic); }; var result = ts.getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host); host.onUnRecoverableConfigFileDiagnostic = undefined; return result; @@ -81925,7 +82144,7 @@ var ts; } ts.getErrorSummaryText = getErrorSummaryText; function listFiles(program, writeFileName) { - if (program.getCompilerOptions().listFiles) { + if (program.getCompilerOptions().listFiles || program.getCompilerOptions().listFilesOnly) { ts.forEach(program.getSourceFiles(), function (file) { writeFileName(file.fileName); }); @@ -81933,17 +82152,22 @@ var ts; } ts.listFiles = listFiles; function emitFilesAndReportErrors(program, reportDiagnostic, writeFileName, reportSummary, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers) { + var isListFilesOnly = !!program.getCompilerOptions().listFilesOnly; var diagnostics = program.getConfigFileParsingDiagnostics().slice(); var configFileParsingDiagnosticsLength = diagnostics.length; ts.addRange(diagnostics, program.getSyntacticDiagnostics(undefined, cancellationToken)); if (diagnostics.length === configFileParsingDiagnosticsLength) { ts.addRange(diagnostics, program.getOptionsDiagnostics(cancellationToken)); - ts.addRange(diagnostics, program.getGlobalDiagnostics(cancellationToken)); - if (diagnostics.length === configFileParsingDiagnosticsLength) { - ts.addRange(diagnostics, program.getSemanticDiagnostics(undefined, cancellationToken)); + if (!isListFilesOnly) { + ts.addRange(diagnostics, program.getGlobalDiagnostics(cancellationToken)); + if (diagnostics.length === configFileParsingDiagnosticsLength) { + ts.addRange(diagnostics, program.getSemanticDiagnostics(undefined, cancellationToken)); + } } } - var emitResult = program.emit(undefined, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers); + var emitResult = isListFilesOnly + ? { emitSkipped: true, diagnostics: ts.emptyArray } + : program.emit(undefined, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers); var emittedFiles = emitResult.emittedFiles, emitDiagnostics = emitResult.diagnostics; ts.addRange(diagnostics, emitDiagnostics); ts.sortAndDeduplicateDiagnostics(diagnostics).forEach(reportDiagnostic); @@ -82034,19 +82258,10 @@ var ts; createHash: ts.maybeBind(host, host.createHash), readDirectory: ts.maybeBind(host, host.readDirectory), }; - function ensureDirectoriesExist(directoryPath) { - if (directoryPath.length > ts.getRootLength(directoryPath) && !host.directoryExists(directoryPath)) { - var parentDirectory = ts.getDirectoryPath(directoryPath); - ensureDirectoriesExist(parentDirectory); - if (host.createDirectory) - host.createDirectory(directoryPath); - } - } function writeFile(fileName, text, writeByteOrderMark, onError) { try { ts.performance.mark("beforeIOWrite"); - ensureDirectoriesExist(ts.getDirectoryPath(ts.normalizePath(fileName))); - host.writeFile(fileName, text, writeByteOrderMark); + ts.writeFileEnsuringDirectories(fileName, text, writeByteOrderMark, function (path, data, writeByteOrderMark) { return host.writeFile(path, data, writeByteOrderMark); }, function (path) { return host.createDirectory(path); }, function (path) { return host.directoryExists(path); }); ts.performance.mark("afterIOWrite"); ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite"); } @@ -83672,30 +83887,25 @@ var ts; setupInitialBuild(state, cancellationToken); var reportQueue = true; var successfulProjects = 0; - var errorProjects = 0; while (true) { var invalidatedProject = getNextInvalidatedProject(state, buildOrder, reportQueue); if (!invalidatedProject) break; reportQueue = false; invalidatedProject.done(cancellationToken); - if (state.diagnostics.has(invalidatedProject.projectPath)) { - errorProjects++; - } - else { + if (!state.diagnostics.has(invalidatedProject.projectPath)) successfulProjects++; - } } disableCache(state); reportErrorSummary(state, buildOrder); startWatching(state, buildOrder); - return isCircularBuildOrder(buildOrder) ? - ts.ExitStatus.ProjectReferenceCycle_OutputsSkupped : - errorProjects ? - successfulProjects ? - ts.ExitStatus.DiagnosticsPresent_OutputsGenerated : - ts.ExitStatus.DiagnosticsPresent_OutputsSkipped : - ts.ExitStatus.Success; + return isCircularBuildOrder(buildOrder) + ? ts.ExitStatus.ProjectReferenceCycle_OutputsSkipped + : !buildOrder.some(function (p) { return state.diagnostics.has(toResolvedConfigFilePath(state, p)); }) + ? ts.ExitStatus.Success + : successfulProjects + ? ts.ExitStatus.DiagnosticsPresent_OutputsGenerated + : ts.ExitStatus.DiagnosticsPresent_OutputsSkipped; } function clean(state, project, onlyReferences) { var buildOrder = getBuildOrderFor(state, project, onlyReferences); @@ -83703,7 +83913,7 @@ var ts; return ts.ExitStatus.InvalidProject_OutputsSkipped; if (isCircularBuildOrder(buildOrder)) { reportErrors(state, buildOrder.circularDiagnostics); - return ts.ExitStatus.ProjectReferenceCycle_OutputsSkupped; + return ts.ExitStatus.ProjectReferenceCycle_OutputsSkipped; } var options = state.options, host = state.host; var filesToDelete = options.dry ? [] : undefined; @@ -83990,18 +84200,17 @@ var ts; }); return count; } - var reportDiagnostic = ts.createDiagnosticReporter(ts.sys); - function updateReportDiagnostic(options) { - if (shouldBePretty(options)) { - reportDiagnostic = ts.createDiagnosticReporter(ts.sys, /*pretty*/ true); - } + function updateReportDiagnostic(sys, existing, options) { + return shouldBePretty(sys, options) ? + ts.createDiagnosticReporter(sys, /*pretty*/ true) : + existing; } - function defaultIsPretty() { - return !!ts.sys.writeOutputIsTTY && ts.sys.writeOutputIsTTY(); + function defaultIsPretty(sys) { + return !!sys.writeOutputIsTTY && sys.writeOutputIsTTY(); } - function shouldBePretty(options) { + function shouldBePretty(sys, options) { if (!options || typeof options.pretty === "undefined") { - return defaultIsPretty(); + return defaultIsPretty(sys); } return options.pretty; } @@ -84023,258 +84232,395 @@ var ts; ts.sort(ts.optionDeclarations, function (a, b) { return ts.compareStringsCaseInsensitive(a.name, b.name); }) : ts.filter(ts.optionDeclarations.slice(), function (v) { return !!v.showInSimplifiedHelpView; }); } - function executeCommandLineWorker(commandLine) { + function printVersion(sys) { + sys.write(ts.getDiagnosticText(ts.Diagnostics.Version_0, ts.version) + sys.newLine); + } + function printHelp(sys, optionsList, syntaxPrefix) { + if (syntaxPrefix === void 0) { syntaxPrefix = ""; } + var output = []; + // We want to align our "syntax" and "examples" commands to a certain margin. + var syntaxLength = ts.getDiagnosticText(ts.Diagnostics.Syntax_Colon_0, "").length; + var examplesLength = ts.getDiagnosticText(ts.Diagnostics.Examples_Colon_0, "").length; + var marginLength = Math.max(syntaxLength, examplesLength); + // Build up the syntactic skeleton. + var syntax = makePadding(marginLength - syntaxLength); + syntax += "tsc " + syntaxPrefix + "[" + ts.getDiagnosticText(ts.Diagnostics.options) + "] [" + ts.getDiagnosticText(ts.Diagnostics.file) + "...]"; + output.push(ts.getDiagnosticText(ts.Diagnostics.Syntax_Colon_0, syntax)); + output.push(sys.newLine + sys.newLine); + // Build up the list of examples. + var padding = makePadding(marginLength); + output.push(ts.getDiagnosticText(ts.Diagnostics.Examples_Colon_0, makePadding(marginLength - examplesLength) + "tsc hello.ts") + sys.newLine); + output.push(padding + "tsc --outFile file.js file.ts" + sys.newLine); + output.push(padding + "tsc @args.txt" + sys.newLine); + output.push(padding + "tsc --build tsconfig.json" + sys.newLine); + output.push(sys.newLine); + output.push(ts.getDiagnosticText(ts.Diagnostics.Options_Colon) + sys.newLine); + // We want our descriptions to align at the same column in our output, + // so we keep track of the longest option usage string. + marginLength = 0; + var usageColumn = []; // Things like "-d, --declaration" go in here. + var descriptionColumn = []; + var optionsDescriptionMap = ts.createMap(); // Map between option.description and list of option.type if it is a kind + for (var _i = 0, optionsList_1 = optionsList; _i < optionsList_1.length; _i++) { + var option = optionsList_1[_i]; + // If an option lacks a description, + // it is not officially supported. + if (!option.description) { + continue; + } + var usageText_1 = " "; + if (option.shortName) { + usageText_1 += "-" + option.shortName; + usageText_1 += getParamType(option); + usageText_1 += ", "; + } + usageText_1 += "--" + option.name; + usageText_1 += getParamType(option); + usageColumn.push(usageText_1); + var description = void 0; + if (option.name === "lib") { + description = ts.getDiagnosticText(option.description); + var element = option.element; + var typeMap = element.type; + optionsDescriptionMap.set(description, ts.arrayFrom(typeMap.keys()).map(function (key) { return "'" + key + "'"; })); + } + else { + description = ts.getDiagnosticText(option.description); + } + descriptionColumn.push(description); + // Set the new margin for the description column if necessary. + marginLength = Math.max(usageText_1.length, marginLength); + } + // Special case that can't fit in the loop. + var usageText = " @<" + ts.getDiagnosticText(ts.Diagnostics.file) + ">"; + usageColumn.push(usageText); + descriptionColumn.push(ts.getDiagnosticText(ts.Diagnostics.Insert_command_line_options_and_files_from_a_file)); + marginLength = Math.max(usageText.length, marginLength); + // Print out each row, aligning all the descriptions on the same column. + for (var i = 0; i < usageColumn.length; i++) { + var usage = usageColumn[i]; + var description = descriptionColumn[i]; + var kindsList = optionsDescriptionMap.get(description); + output.push(usage + makePadding(marginLength - usage.length + 2) + description + sys.newLine); + if (kindsList) { + output.push(makePadding(marginLength + 4)); + for (var _a = 0, kindsList_1 = kindsList; _a < kindsList_1.length; _a++) { + var kind = kindsList_1[_a]; + output.push(kind + " "); + } + output.push(sys.newLine); + } + } + for (var _b = 0, output_1 = output; _b < output_1.length; _b++) { + var line = output_1[_b]; + sys.write(line); + } + return; + function getParamType(option) { + if (option.paramType !== undefined) { + return " " + ts.getDiagnosticText(option.paramType); + } + return ""; + } + function makePadding(paddingLength) { + return Array(paddingLength + 1).join(" "); + } + } + function executeCommandLineWorker(sys, cb, commandLine) { + var reportDiagnostic = ts.createDiagnosticReporter(sys); if (commandLine.options.build) { reportDiagnostic(ts.createCompilerDiagnostic(ts.Diagnostics.Option_build_must_be_the_first_command_line_argument)); - return ts.sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped); + return sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped); } // Configuration file name (if any) var configFileName; if (commandLine.options.locale) { - ts.validateLocaleAndSetLanguage(commandLine.options.locale, ts.sys, commandLine.errors); + ts.validateLocaleAndSetLanguage(commandLine.options.locale, sys, commandLine.errors); } // If there are any errors due to command line parsing and/or // setting up localization, report them and quit. if (commandLine.errors.length > 0) { commandLine.errors.forEach(reportDiagnostic); - return ts.sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped); + return sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped); } if (commandLine.options.init) { - writeConfigFile(commandLine.options, commandLine.fileNames); - return ts.sys.exit(ts.ExitStatus.Success); + writeConfigFile(sys, reportDiagnostic, commandLine.options, commandLine.fileNames); + return sys.exit(ts.ExitStatus.Success); } if (commandLine.options.version) { - ts.printVersion(); - return ts.sys.exit(ts.ExitStatus.Success); + printVersion(sys); + return sys.exit(ts.ExitStatus.Success); } if (commandLine.options.help || commandLine.options.all) { - ts.printVersion(); - ts.printHelp(getOptionsForHelp(commandLine)); - return ts.sys.exit(ts.ExitStatus.Success); + printVersion(sys); + printHelp(sys, getOptionsForHelp(commandLine)); + return sys.exit(ts.ExitStatus.Success); + } + if (commandLine.options.watch && commandLine.options.listFilesOnly) { + reportDiagnostic(ts.createCompilerDiagnostic(ts.Diagnostics.Options_0_and_1_cannot_be_combined, "watch", "listFilesOnly")); + return sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped); } if (commandLine.options.project) { if (commandLine.fileNames.length !== 0) { reportDiagnostic(ts.createCompilerDiagnostic(ts.Diagnostics.Option_project_cannot_be_mixed_with_source_files_on_a_command_line)); - return ts.sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped); + return sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped); } var fileOrDirectory = ts.normalizePath(commandLine.options.project); - if (!fileOrDirectory /* current directory "." */ || ts.sys.directoryExists(fileOrDirectory)) { + if (!fileOrDirectory /* current directory "." */ || sys.directoryExists(fileOrDirectory)) { configFileName = ts.combinePaths(fileOrDirectory, "tsconfig.json"); - if (!ts.sys.fileExists(configFileName)) { + if (!sys.fileExists(configFileName)) { reportDiagnostic(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0, commandLine.options.project)); - return ts.sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped); + return sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped); } } else { configFileName = fileOrDirectory; - if (!ts.sys.fileExists(configFileName)) { + if (!sys.fileExists(configFileName)) { reportDiagnostic(ts.createCompilerDiagnostic(ts.Diagnostics.The_specified_path_does_not_exist_Colon_0, commandLine.options.project)); - return ts.sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped); + return sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped); } } } else if (commandLine.fileNames.length === 0) { - var searchPath = ts.normalizePath(ts.sys.getCurrentDirectory()); - configFileName = ts.findConfigFile(searchPath, ts.sys.fileExists); + var searchPath = ts.normalizePath(sys.getCurrentDirectory()); + configFileName = ts.findConfigFile(searchPath, sys.fileExists); } if (commandLine.fileNames.length === 0 && !configFileName) { - ts.printVersion(); - ts.printHelp(getOptionsForHelp(commandLine)); - return ts.sys.exit(ts.ExitStatus.Success); + printVersion(sys); + printHelp(sys, getOptionsForHelp(commandLine)); + return sys.exit(ts.ExitStatus.Success); } - var commandLineOptions = commandLine.options; + var currentDirectory = sys.getCurrentDirectory(); + var commandLineOptions = ts.convertToOptionsWithAbsolutePaths(commandLine.options, function (fileName) { return ts.getNormalizedAbsolutePath(fileName, currentDirectory); }); if (configFileName) { - var configParseResult = ts.parseConfigFileWithSystem(configFileName, commandLineOptions, ts.sys, reportDiagnostic); // TODO: GH#18217 + var configParseResult = ts.parseConfigFileWithSystem(configFileName, commandLineOptions, sys, reportDiagnostic); // TODO: GH#18217 if (commandLineOptions.showConfig) { if (configParseResult.errors.length !== 0) { - updateReportDiagnostic(configParseResult.options); + reportDiagnostic = updateReportDiagnostic(sys, reportDiagnostic, configParseResult.options); configParseResult.errors.forEach(reportDiagnostic); - return ts.sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped); + return sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped); } // eslint-disable-next-line no-null/no-null - ts.sys.write(JSON.stringify(ts.convertToTSConfig(configParseResult, configFileName, ts.sys), null, 4) + ts.sys.newLine); - return ts.sys.exit(ts.ExitStatus.Success); + sys.write(JSON.stringify(ts.convertToTSConfig(configParseResult, configFileName, sys), null, 4) + sys.newLine); + return sys.exit(ts.ExitStatus.Success); } - updateReportDiagnostic(configParseResult.options); + reportDiagnostic = updateReportDiagnostic(sys, reportDiagnostic, configParseResult.options); if (ts.isWatchSet(configParseResult.options)) { - reportWatchModeWithoutSysSupport(); - createWatchOfConfigFile(configParseResult, commandLineOptions); + if (reportWatchModeWithoutSysSupport(sys, reportDiagnostic)) + return; + createWatchOfConfigFile(sys, reportDiagnostic, configParseResult, commandLineOptions); } else if (ts.isIncrementalCompilation(configParseResult.options)) { - performIncrementalCompilation(configParseResult); + performIncrementalCompilation(sys, reportDiagnostic, cb, configParseResult); } else { - performCompilation(configParseResult.fileNames, configParseResult.projectReferences, configParseResult.options, ts.getConfigFileParsingDiagnostics(configParseResult)); + performCompilation(sys, reportDiagnostic, cb, configParseResult); } } else { if (commandLineOptions.showConfig) { // eslint-disable-next-line no-null/no-null - ts.sys.write(JSON.stringify(ts.convertToTSConfig(commandLine, ts.combinePaths(ts.sys.getCurrentDirectory(), "tsconfig.json"), ts.sys), null, 4) + ts.sys.newLine); - return ts.sys.exit(ts.ExitStatus.Success); + sys.write(JSON.stringify(ts.convertToTSConfig(commandLine, ts.combinePaths(currentDirectory, "tsconfig.json"), sys), null, 4) + sys.newLine); + return sys.exit(ts.ExitStatus.Success); } - updateReportDiagnostic(commandLineOptions); + reportDiagnostic = updateReportDiagnostic(sys, reportDiagnostic, commandLineOptions); if (ts.isWatchSet(commandLineOptions)) { - reportWatchModeWithoutSysSupport(); - createWatchOfFilesAndCompilerOptions(commandLine.fileNames, commandLineOptions); + if (reportWatchModeWithoutSysSupport(sys, reportDiagnostic)) + return; + createWatchOfFilesAndCompilerOptions(sys, reportDiagnostic, commandLine.fileNames, commandLineOptions); } else if (ts.isIncrementalCompilation(commandLineOptions)) { - performIncrementalCompilation(commandLine); + performIncrementalCompilation(sys, reportDiagnostic, cb, __assign(__assign({}, commandLine), { options: commandLineOptions })); } else { - performCompilation(commandLine.fileNames, /*references*/ undefined, commandLineOptions); + performCompilation(sys, reportDiagnostic, cb, __assign(__assign({}, commandLine), { options: commandLineOptions })); } } } - function executeCommandLine(args) { - if (args.length > 0 && args[0].charCodeAt(0) === 45 /* minus */) { - var firstOption = args[0].slice(args[0].charCodeAt(1) === 45 /* minus */ ? 2 : 1).toLowerCase(); - if (firstOption === "build" || firstOption === "b") { - return performBuild(args.slice(1)); - } + function isBuild(commandLineArgs) { + if (commandLineArgs.length > 0 && commandLineArgs[0].charCodeAt(0) === 45 /* minus */) { + var firstOption = commandLineArgs[0].slice(commandLineArgs[0].charCodeAt(1) === 45 /* minus */ ? 2 : 1).toLowerCase(); + return firstOption === "build" || firstOption === "b"; } - var commandLine = ts.parseCommandLine(args); - if (commandLine.options.generateCpuProfile && ts.sys.enableCPUProfiler) { - ts.sys.enableCPUProfiler(commandLine.options.generateCpuProfile, function () { return executeCommandLineWorker(commandLine); }); + return false; + } + ts.isBuild = isBuild; + function executeCommandLine(system, cb, commandLineArgs) { + if (isBuild(commandLineArgs)) { + return performBuild(system, cb, commandLineArgs.slice(1)); + } + var commandLine = ts.parseCommandLine(commandLineArgs, function (path) { return system.readFile(path); }); + if (commandLine.options.generateCpuProfile && system.enableCPUProfiler) { + system.enableCPUProfiler(commandLine.options.generateCpuProfile, function () { return executeCommandLineWorker(system, cb, commandLine); }); } else { - executeCommandLineWorker(commandLine); + executeCommandLineWorker(system, cb, commandLine); } } ts.executeCommandLine = executeCommandLine; - function reportWatchModeWithoutSysSupport() { - if (!ts.sys.watchFile || !ts.sys.watchDirectory) { + function reportWatchModeWithoutSysSupport(sys, reportDiagnostic) { + if (!sys.watchFile || !sys.watchDirectory) { reportDiagnostic(ts.createCompilerDiagnostic(ts.Diagnostics.The_current_host_does_not_support_the_0_option, "--watch")); - ts.sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped); + sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped); + return true; } + return false; } - function performBuildWorker(buildOptions, projects, errors) { + function performBuildWorker(sys, cb, buildOptions, projects, errors) { // Update to pretty if host supports it - updateReportDiagnostic(buildOptions); + var reportDiagnostic = updateReportDiagnostic(sys, ts.createDiagnosticReporter(sys), buildOptions); if (buildOptions.locale) { - ts.validateLocaleAndSetLanguage(buildOptions.locale, ts.sys, errors); + ts.validateLocaleAndSetLanguage(buildOptions.locale, sys, errors); } if (errors.length > 0) { errors.forEach(reportDiagnostic); - return ts.sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped); + return sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped); } if (buildOptions.help) { - ts.printVersion(); - ts.printHelp(ts.buildOpts, "--build "); - return ts.sys.exit(ts.ExitStatus.Success); + printVersion(sys); + printHelp(sys, ts.buildOpts, "--build "); + return sys.exit(ts.ExitStatus.Success); } if (projects.length === 0) { - ts.printVersion(); - ts.printHelp(ts.buildOpts, "--build "); - return ts.sys.exit(ts.ExitStatus.Success); + printVersion(sys); + printHelp(sys, ts.buildOpts, "--build "); + return sys.exit(ts.ExitStatus.Success); } - if (!ts.sys.getModifiedTime || !ts.sys.setModifiedTime || (buildOptions.clean && !ts.sys.deleteFile)) { + if (!sys.getModifiedTime || !sys.setModifiedTime || (buildOptions.clean && !sys.deleteFile)) { reportDiagnostic(ts.createCompilerDiagnostic(ts.Diagnostics.The_current_host_does_not_support_the_0_option, "--build")); - return ts.sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped); + return sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped); } if (buildOptions.watch) { - reportWatchModeWithoutSysSupport(); - var buildHost_1 = ts.createSolutionBuilderWithWatchHost(ts.sys, /*createProgram*/ undefined, reportDiagnostic, ts.createBuilderStatusReporter(ts.sys, shouldBePretty(buildOptions)), createWatchStatusReporter(buildOptions)); - updateCreateProgram(buildHost_1); - buildHost_1.afterProgramEmitAndDiagnostics = function (program) { return reportStatistics(program.getProgram()); }; + if (reportWatchModeWithoutSysSupport(sys, reportDiagnostic)) + return; + var buildHost_1 = ts.createSolutionBuilderWithWatchHost(sys, + /*createProgram*/ undefined, reportDiagnostic, ts.createBuilderStatusReporter(sys, shouldBePretty(sys, buildOptions)), createWatchStatusReporter(sys, buildOptions)); + if (cb && cb.onSolutionBuilderHostCreate) + cb.onSolutionBuilderHostCreate(buildHost_1); + updateCreateProgram(sys, buildHost_1); + buildHost_1.afterProgramEmitAndDiagnostics = function (program) { return reportStatistics(sys, program.getProgram()); }; var builder_1 = ts.createSolutionBuilderWithWatch(buildHost_1, projects, buildOptions); builder_1.build(); return; } - var buildHost = ts.createSolutionBuilderHost(ts.sys, /*createProgram*/ undefined, reportDiagnostic, ts.createBuilderStatusReporter(ts.sys, shouldBePretty(buildOptions)), createReportErrorSummary(buildOptions)); - updateCreateProgram(buildHost); - buildHost.afterProgramEmitAndDiagnostics = function (program) { return reportStatistics(program.getProgram()); }; + var buildHost = ts.createSolutionBuilderHost(sys, + /*createProgram*/ undefined, reportDiagnostic, ts.createBuilderStatusReporter(sys, shouldBePretty(sys, buildOptions)), createReportErrorSummary(sys, buildOptions)); + if (cb && cb.onSolutionBuilderHostCreate) + cb.onSolutionBuilderHostCreate(buildHost); + updateCreateProgram(sys, buildHost); + buildHost.afterProgramEmitAndDiagnostics = function (program) { return reportStatistics(sys, program.getProgram()); }; var builder = ts.createSolutionBuilder(buildHost, projects, buildOptions); - return ts.sys.exit(buildOptions.clean ? builder.clean() : builder.build()); + var exitStatus = buildOptions.clean ? builder.clean() : builder.build(); + if (cb && cb.onSolutionBuildComplete) + cb.onSolutionBuildComplete(builder.getAllParsedConfigs()); + return sys.exit(exitStatus); } - function performBuild(args) { + function performBuild(sys, cb, args) { var _a = ts.parseBuildCommand(args), buildOptions = _a.buildOptions, projects = _a.projects, errors = _a.errors; - if (buildOptions.generateCpuProfile && ts.sys.enableCPUProfiler) { - ts.sys.enableCPUProfiler(buildOptions.generateCpuProfile, function () { return performBuildWorker(buildOptions, projects, errors); }); + if (buildOptions.generateCpuProfile && sys.enableCPUProfiler) { + sys.enableCPUProfiler(buildOptions.generateCpuProfile, function () { return performBuildWorker(sys, cb, buildOptions, projects, errors); }); } else { - performBuildWorker(buildOptions, projects, errors); + performBuildWorker(sys, cb, buildOptions, projects, errors); } } - function createReportErrorSummary(options) { - return shouldBePretty(options) ? - function (errorCount) { return ts.sys.write(ts.getErrorSummaryText(errorCount, ts.sys.newLine)); } : + function createReportErrorSummary(sys, options) { + return shouldBePretty(sys, options) ? + function (errorCount) { return sys.write(ts.getErrorSummaryText(errorCount, sys.newLine)); } : undefined; } - function performCompilation(rootNames, projectReferences, options, configFileParsingDiagnostics) { - var host = ts.createCompilerHost(options); + function performCompilation(sys, reportDiagnostic, cb, config) { + var fileNames = config.fileNames, options = config.options, projectReferences = config.projectReferences; + var host = ts.createCompilerHostWorker(options, /*setParentPos*/ undefined, sys); + if (cb && cb.onCompilerHostCreate) + cb.onCompilerHostCreate(host); var currentDirectory = host.getCurrentDirectory(); var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames()); ts.changeCompilerHostLikeToUseCache(host, function (fileName) { return ts.toPath(fileName, currentDirectory, getCanonicalFileName); }); - enableStatistics(options); + enableStatistics(sys, options); var programOptions = { - rootNames: rootNames, + rootNames: fileNames, options: options, projectReferences: projectReferences, host: host, - configFileParsingDiagnostics: configFileParsingDiagnostics + configFileParsingDiagnostics: ts.getConfigFileParsingDiagnostics(config) }; var program = ts.createProgram(programOptions); - var exitStatus = ts.emitFilesAndReportErrorsAndGetExitStatus(program, reportDiagnostic, function (s) { return ts.sys.write(s + ts.sys.newLine); }, createReportErrorSummary(options)); - reportStatistics(program); - return ts.sys.exit(exitStatus); + var exitStatus = ts.emitFilesAndReportErrorsAndGetExitStatus(program, reportDiagnostic, function (s) { return sys.write(s + sys.newLine); }, createReportErrorSummary(sys, options)); + reportStatistics(sys, program); + if (cb && cb.onCompilationComplete) + cb.onCompilationComplete(config); + return sys.exit(exitStatus); } - function performIncrementalCompilation(config) { + function performIncrementalCompilation(sys, reportDiagnostic, cb, config) { var options = config.options, fileNames = config.fileNames, projectReferences = config.projectReferences; - enableStatistics(options); - return ts.sys.exit(ts.performIncrementalCompilation({ + enableStatistics(sys, options); + var host = ts.createIncrementalCompilerHost(options, sys); + if (cb && cb.onCompilerHostCreate) + cb.onCompilerHostCreate(host); + var exitStatus = ts.performIncrementalCompilation({ + host: host, + system: sys, rootNames: fileNames, options: options, configFileParsingDiagnostics: ts.getConfigFileParsingDiagnostics(config), projectReferences: projectReferences, reportDiagnostic: reportDiagnostic, - reportErrorSummary: createReportErrorSummary(options), - afterProgramEmitAndDiagnostics: function (builderProgram) { return reportStatistics(builderProgram.getProgram()); } - })); + reportErrorSummary: createReportErrorSummary(sys, options), + afterProgramEmitAndDiagnostics: function (builderProgram) { return reportStatistics(sys, builderProgram.getProgram()); } + }); + if (cb && cb.onCompilationComplete) + cb.onCompilationComplete(config); + return sys.exit(exitStatus); } - function updateCreateProgram(host) { + function updateCreateProgram(sys, host) { var compileUsingBuilder = host.createProgram; host.createProgram = function (rootNames, options, host, oldProgram, configFileParsingDiagnostics, projectReferences) { ts.Debug.assert(rootNames !== undefined || (options === undefined && !!oldProgram)); if (options !== undefined) { - enableStatistics(options); + enableStatistics(sys, options); } return compileUsingBuilder(rootNames, options, host, oldProgram, configFileParsingDiagnostics, projectReferences); }; } - function updateWatchCompilationHost(watchCompilerHost) { - updateCreateProgram(watchCompilerHost); + function updateWatchCompilationHost(sys, watchCompilerHost) { + updateCreateProgram(sys, watchCompilerHost); var emitFilesUsingBuilder = watchCompilerHost.afterProgramCreate; // TODO: GH#18217 watchCompilerHost.afterProgramCreate = function (builderProgram) { emitFilesUsingBuilder(builderProgram); - reportStatistics(builderProgram.getProgram()); + reportStatistics(sys, builderProgram.getProgram()); }; } - function createWatchStatusReporter(options) { - return ts.createWatchStatusReporter(ts.sys, shouldBePretty(options)); + function createWatchStatusReporter(sys, options) { + return ts.createWatchStatusReporter(sys, shouldBePretty(sys, options)); } - function createWatchOfConfigFile(configParseResult, optionsToExtend) { - var watchCompilerHost = ts.createWatchCompilerHostOfConfigFile(configParseResult.options.configFilePath, optionsToExtend, ts.sys, /*createProgram*/ undefined, reportDiagnostic, createWatchStatusReporter(configParseResult.options)); // TODO: GH#18217 - updateWatchCompilationHost(watchCompilerHost); + function createWatchOfConfigFile(sys, reportDiagnostic, configParseResult, optionsToExtend) { + var watchCompilerHost = ts.createWatchCompilerHostOfConfigFile(configParseResult.options.configFilePath, optionsToExtend, sys, + /*createProgram*/ undefined, reportDiagnostic, createWatchStatusReporter(sys, configParseResult.options)); // TODO: GH#18217 + updateWatchCompilationHost(sys, watchCompilerHost); watchCompilerHost.configFileParsingResult = configParseResult; ts.createWatchProgram(watchCompilerHost); } - function createWatchOfFilesAndCompilerOptions(rootFiles, options) { - var watchCompilerHost = ts.createWatchCompilerHostOfFilesAndCompilerOptions(rootFiles, options, ts.sys, /*createProgram*/ undefined, reportDiagnostic, createWatchStatusReporter(options)); - updateWatchCompilationHost(watchCompilerHost); + function createWatchOfFilesAndCompilerOptions(sys, reportDiagnostic, rootFiles, options) { + var watchCompilerHost = ts.createWatchCompilerHostOfFilesAndCompilerOptions(rootFiles, options, sys, + /*createProgram*/ undefined, reportDiagnostic, createWatchStatusReporter(sys, options)); + updateWatchCompilationHost(sys, watchCompilerHost); ts.createWatchProgram(watchCompilerHost); } - function enableStatistics(compilerOptions) { - if (compilerOptions.diagnostics || compilerOptions.extendedDiagnostics) { + function canReportDiagnostics(system, compilerOptions) { + return system === ts.sys && (compilerOptions.diagnostics || compilerOptions.extendedDiagnostics); + } + function enableStatistics(sys, compilerOptions) { + if (canReportDiagnostics(sys, compilerOptions)) { ts.performance.enable(); } } - function reportStatistics(program) { + function reportStatistics(sys, program) { var statistics; var compilerOptions = program.getCompilerOptions(); - if (compilerOptions.diagnostics || compilerOptions.extendedDiagnostics) { + if (canReportDiagnostics(sys, compilerOptions)) { statistics = []; - var memoryUsed = ts.sys.getMemoryUsage ? ts.sys.getMemoryUsage() : -1; + var memoryUsed = sys.getMemoryUsage ? sys.getMemoryUsage() : -1; reportCountStatistic("Files", program.getSourceFiles().length); reportCountStatistic("Lines", countLines(program)); reportCountStatistic("Nodes", program.getNodeCount()); @@ -84325,7 +84671,7 @@ var ts; } for (var _b = 0, statistics_2 = statistics; _b < statistics_2.length; _b++) { var _c = statistics_2[_b], name = _c.name, value = _c.value; - ts.sys.write(padRight(name + ":", nameSize + 2) + padLeft(value.toString(), valueSize) + ts.sys.newLine); + sys.write(padRight(name + ":", nameSize + 2) + padLeft(value.toString(), valueSize) + sys.newLine); } } function reportStatisticalValue(name, value) { @@ -84338,14 +84684,14 @@ var ts; reportStatisticalValue(name, (time / 1000).toFixed(2) + "s"); } } - function writeConfigFile(options, fileNames) { - var currentDirectory = ts.sys.getCurrentDirectory(); + function writeConfigFile(sys, reportDiagnostic, options, fileNames) { + var currentDirectory = sys.getCurrentDirectory(); var file = ts.normalizePath(ts.combinePaths(currentDirectory, "tsconfig.json")); - if (ts.sys.fileExists(file)) { + if (sys.fileExists(file)) { reportDiagnostic(ts.createCompilerDiagnostic(ts.Diagnostics.A_tsconfig_json_file_is_already_defined_at_Colon_0, file)); } else { - ts.sys.writeFile(file, ts.generateTSConfig(options, fileNames, ts.sys.newLine)); + sys.writeFile(file, ts.generateTSConfig(options, fileNames, sys.newLine)); reportDiagnostic(ts.createCompilerDiagnostic(ts.Diagnostics.Successfully_created_a_tsconfig_json_file)); } return; @@ -84360,4 +84706,10 @@ if (ts.sys.tryEnableSourceMapsForHost && /^development$/i.test(ts.sys.getEnviron if (ts.sys.setBlocking) { ts.sys.setBlocking(); } -ts.executeCommandLine(ts.sys.args); +// This file actually uses arguments passed on commandline and executes it +ts.executeCommandLine(ts.sys, { + onCompilerHostCreate: ts.noop, + onCompilationComplete: ts.noop, + onSolutionBuilderHostCreate: ts.noop, + onSolutionBuildComplete: ts.noop +}, ts.sys.args); diff --git a/lib/tsserver.js b/lib/tsserver.js index 6e974402749..2c794d3fbc9 100644 --- a/lib/tsserver.js +++ b/lib/tsserver.js @@ -92,7 +92,7 @@ var ts; (function (ts) { // WARNING: The script `configureNightly.ts` uses a regexp to parse out these values. // If changing the text in this section, be sure to test `configureNightly` too. - ts.versionMajorMinor = "3.7"; + ts.versionMajorMinor = "3.8"; /** The version of the TypeScript compiler release */ ts.version = ts.versionMajorMinor + ".0-dev"; })(ts || (ts = {})); @@ -107,22 +107,32 @@ var ts; })(ts || (ts = {})); /* @internal */ (function (ts) { - ts.emptyArray = []; - /** Create a MapLike with good performance. */ - function createDictionaryObject() { - var map = Object.create(/*prototype*/ null); // eslint-disable-line no-null/no-null - // Using 'delete' on an object causes V8 to put the object in dictionary mode. - // This disables creation of hidden classes, which are expensive when an object is - // constantly changing shape. - map.__ = undefined; - delete map.__; - return map; + /** + * Returns the native Map implementation if it is available and compatible (i.e. supports iteration). + */ + function tryGetNativeMap() { + // Internet Explorer's Map doesn't support iteration, so don't use it. + // eslint-disable-next-line no-in-operator + return typeof Map !== "undefined" && "entries" in Map.prototype ? Map : undefined; } - /** Create a new map. If a template object is provided, the map will copy entries from it. */ + ts.tryGetNativeMap = tryGetNativeMap; +})(ts || (ts = {})); +/* @internal */ +(function (ts) { + ts.emptyArray = []; + ts.Map = ts.tryGetNativeMap() || (function () { + // NOTE: createMapShim will be defined for typescriptServices.js but not for tsc.js, so we must test for it. + if (typeof ts.createMapShim === "function") { + return ts.createMapShim(); + } + throw new Error("TypeScript requires an environment that provides a compatible native Map implementation."); + })(); + /** Create a new map. */ function createMap() { - return new ts.MapCtr(); + return new ts.Map(); } ts.createMap = createMap; + /** Create a new map from an array of entries. */ function createMapFromEntries(entries) { var map = createMap(); for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) { @@ -132,8 +142,9 @@ var ts; return map; } ts.createMapFromEntries = createMapFromEntries; + /** Create a new map from a template object is provided, the map will copy entries from it. */ function createMapFromTemplate(template) { - var map = new ts.MapCtr(); + var map = new ts.Map(); // Copies keys/values from template. Note that for..in will not throw if // template is undefined, and instead will just exit the loop. for (var key in template) { @@ -144,147 +155,6 @@ var ts; return map; } ts.createMapFromTemplate = createMapFromTemplate; - // Internet Explorer's Map doesn't support iteration, so don't use it. - // eslint-disable-next-line no-in-operator - ts.MapCtr = typeof Map !== "undefined" && "entries" in Map.prototype ? Map : shimMap(); - // Keep the class inside a function so it doesn't get compiled if it's not used. - function shimMap() { - var MapIterator = /** @class */ (function () { - function MapIterator(currentEntry, selector) { - this.currentEntry = currentEntry; - this.selector = selector; - } - MapIterator.prototype.next = function () { - // Navigate to the next entry. - while (this.currentEntry) { - var skipNext = !!this.currentEntry.skipNext; - this.currentEntry = this.currentEntry.nextEntry; - if (!skipNext) { - break; - } - } - if (this.currentEntry) { - return { value: this.selector(this.currentEntry.key, this.currentEntry.value), done: false }; - } - else { - return { value: undefined, done: true }; - } - }; - return MapIterator; - }()); - return /** @class */ (function () { - function class_1() { - this.data = createDictionaryObject(); - this.size = 0; - // Create a first (stub) map entry that will not contain a key - // and value but serves as starting point for iterators. - this.firstEntry = {}; - // When the map is empty, the last entry is the same as the - // first one. - this.lastEntry = this.firstEntry; - } - class_1.prototype.get = function (key) { - var entry = this.data[key]; - return entry && entry.value; - }; - class_1.prototype.set = function (key, value) { - if (!this.has(key)) { - this.size++; - // Create a new entry that will be appended at the - // end of the linked list. - var newEntry = { - key: key, - value: value - }; - this.data[key] = newEntry; - // Adjust the references. - var previousLastEntry = this.lastEntry; - previousLastEntry.nextEntry = newEntry; - newEntry.previousEntry = previousLastEntry; - this.lastEntry = newEntry; - } - else { - this.data[key].value = value; - } - return this; - }; - class_1.prototype.has = function (key) { - // eslint-disable-next-line no-in-operator - return key in this.data; - }; - class_1.prototype.delete = function (key) { - if (this.has(key)) { - this.size--; - var entry = this.data[key]; - delete this.data[key]; - // Adjust the linked list references of the neighbor entries. - var previousEntry = entry.previousEntry; - previousEntry.nextEntry = entry.nextEntry; - if (entry.nextEntry) { - entry.nextEntry.previousEntry = previousEntry; - } - // When the deleted entry was the last one, we need to - // adjust the lastEntry reference. - if (this.lastEntry === entry) { - this.lastEntry = previousEntry; - } - // Adjust the forward reference of the deleted entry - // in case an iterator still references it. This allows us - // to throw away the entry, but when an active iterator - // (which points to the current entry) continues, it will - // navigate to the entry that originally came before the - // current one and skip it. - entry.previousEntry = undefined; - entry.nextEntry = previousEntry; - entry.skipNext = true; - return true; - } - return false; - }; - class_1.prototype.clear = function () { - this.data = createDictionaryObject(); - this.size = 0; - // Reset the linked list. Note that we must adjust the forward - // references of the deleted entries to ensure iterators stuck - // in the middle of the list don't continue with deleted entries, - // but can continue with new entries added after the clear() - // operation. - var firstEntry = this.firstEntry; - var currentEntry = firstEntry.nextEntry; - while (currentEntry) { - var nextEntry = currentEntry.nextEntry; - currentEntry.previousEntry = undefined; - currentEntry.nextEntry = firstEntry; - currentEntry.skipNext = true; - currentEntry = nextEntry; - } - firstEntry.nextEntry = undefined; - this.lastEntry = firstEntry; - }; - class_1.prototype.keys = function () { - return new MapIterator(this.firstEntry, function (key) { return key; }); - }; - class_1.prototype.values = function () { - return new MapIterator(this.firstEntry, function (_key, value) { return value; }); - }; - class_1.prototype.entries = function () { - return new MapIterator(this.firstEntry, function (key, value) { return [key, value]; }); - }; - class_1.prototype.forEach = function (action) { - var iterator = this.entries(); - while (true) { - var iterResult = iterator.next(); - if (iterResult.done) { - break; - } - var _a = iterResult.value, key = _a[0], value = _a[1]; - action(value, key); - } - }; - return class_1; - }()); - } - ts.shimMap = shimMap; function length(array) { return array ? array.length : 0; } @@ -1866,20 +1736,6 @@ var ts; return str.indexOf(substring) !== -1; } ts.stringContains = stringContains; - function fileExtensionIs(path, extension) { - return path.length > extension.length && endsWith(path, extension); - } - ts.fileExtensionIs = fileExtensionIs; - function fileExtensionIsOneOf(path, extensions) { - for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) { - var extension = extensions_1[_i]; - if (fileExtensionIs(path, extension)) { - return true; - } - } - return false; - } - ts.fileExtensionIsOneOf = fileExtensionIsOneOf; /** * Takes a string like "jquery-min.4.2.3" and returns "jquery" */ @@ -2193,11 +2049,14 @@ var ts; if (isFlags) { var result = ""; var remainingFlags = value; - for (var i = members.length - 1; i >= 0 && remainingFlags !== 0; i--) { - var _a = members[i], enumValue = _a[0], enumName = _a[1]; - if (enumValue !== 0 && (remainingFlags & enumValue) === enumValue) { + for (var _i = 0, members_1 = members; _i < members_1.length; _i++) { + var _a = members_1[_i], enumValue = _a[0], enumName = _a[1]; + if (enumValue > value) { + break; + } + if (enumValue !== 0 && enumValue & value) { + result = "" + result + (result ? "|" : "") + enumName; remainingFlags &= ~enumValue; - result = "" + enumName + (result ? "|" : "") + result; } } if (remainingFlags === 0) { @@ -2205,8 +2064,8 @@ var ts; } } else { - for (var _i = 0, members_1 = members; _i < members_1.length; _i++) { - var _b = members_1[_i], enumValue = _b[0], enumName = _b[1]; + for (var _b = 0, members_2 = members; _b < members_2.length; _b++) { + var _c = members_2[_b], enumValue = _c[0], enumName = _c[1]; if (enumValue === value) { return enumName; } @@ -2280,6 +2139,33 @@ var ts; ? function (node, message) { return assert(node === undefined, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was unexpected'."; }, Debug.assertMissingNode); } : ts.noop; var isDebugInfoEnabled = false; + var extendedDebugModule; + function extendedDebug() { + enableDebugInfo(); + if (!extendedDebugModule) { + throw new Error("Debugging helpers could not be loaded."); + } + return extendedDebugModule; + } + function printControlFlowGraph(flowNode) { + return console.log(formatControlFlowGraph(flowNode)); + } + Debug.printControlFlowGraph = printControlFlowGraph; + function formatControlFlowGraph(flowNode) { + return extendedDebug().formatControlFlowGraph(flowNode); + } + Debug.formatControlFlowGraph = formatControlFlowGraph; + function attachFlowNodeDebugInfo(flowNode) { + if (isDebugInfoEnabled) { + if (!("__debugFlowFlags" in flowNode)) { // eslint-disable-line no-in-operator + Object.defineProperties(flowNode, { + __debugFlowFlags: { get: function () { return formatEnum(this.flags, ts.FlowFlags, /*isFlags*/ true); } }, + __debugToString: { value: function () { return formatControlFlowGraph(this); } } + }); + } + } + } + Debug.attachFlowNodeDebugInfo = attachFlowNodeDebugInfo; /** * Injects debug information into frequently used types. */ @@ -2323,6 +2209,20 @@ var ts; }); } } + // attempt to load extended debugging information + try { + if (ts.sys && ts.sys.require) { + var basePath = ts.getDirectoryPath(ts.resolvePath(ts.sys.getExecutingFilePath())); + var result = ts.sys.require(basePath, "./compiler-debug"); + if (!result.error) { + result.module.init(ts); + extendedDebugModule = result.module; + } + } + } + catch (_a) { + // do nothing + } isDebugInfoEnabled = true; } Debug.enableDebugInfo = enableDebugInfo; @@ -2486,8 +2386,6 @@ var ts; } /** Performance logger that will generate ETW events if possible - check for `logEvent` member, as `etwModule` will be `{}` when browserified */ ts.perfLogger = etwModule && etwModule.logEvent ? etwModule : nullLogger; - var args = typeof process === "undefined" ? [] : process.argv; - ts.perfLogger.logInfoEvent("Starting TypeScript v" + ts.versionMajorMinor + " with command line: " + JSON.stringify(args)); })(ts || (ts = {})); /* @internal */ var ts; @@ -3382,6 +3280,7 @@ var ts; /* @internal */ TokenFlags[TokenFlags["NumericLiteralFlags"] = 1008] = "NumericLiteralFlags"; })(TokenFlags = ts.TokenFlags || (ts.TokenFlags = {})); + // NOTE: Ensure this is up-to-date with src/debug/debug.ts var FlowFlags; (function (FlowFlags) { FlowFlags[FlowFlags["Unreachable"] = 1] = "Unreachable"; @@ -3437,6 +3336,8 @@ var ts; // When build skipped because passed in project is invalid ExitStatus[ExitStatus["InvalidProject_OutputsSkipped"] = 3] = "InvalidProject_OutputsSkipped"; // When build is skipped because project references form cycle + ExitStatus[ExitStatus["ProjectReferenceCycle_OutputsSkipped"] = 4] = "ProjectReferenceCycle_OutputsSkipped"; + /** @deprecated Use ProjectReferenceCycle_OutputsSkipped instead. */ ExitStatus[ExitStatus["ProjectReferenceCycle_OutputsSkupped"] = 4] = "ProjectReferenceCycle_OutputsSkupped"; })(ExitStatus = ts.ExitStatus || (ts.ExitStatus = {})); /* @internal */ @@ -3446,6 +3347,14 @@ var ts; UnionReduction[UnionReduction["Literal"] = 1] = "Literal"; UnionReduction[UnionReduction["Subtype"] = 2] = "Subtype"; })(UnionReduction = ts.UnionReduction || (ts.UnionReduction = {})); + /* @internal */ + var ContextFlags; + (function (ContextFlags) { + ContextFlags[ContextFlags["None"] = 0] = "None"; + ContextFlags[ContextFlags["Signature"] = 1] = "Signature"; + ContextFlags[ContextFlags["NoConstraints"] = 2] = "NoConstraints"; + ContextFlags[ContextFlags["Completion"] = 4] = "Completion"; + })(ContextFlags = ts.ContextFlags || (ts.ContextFlags = {})); // NOTE: If modifying this enum, must modify `TypeFormatFlags` too! var NodeBuilderFlags; (function (NodeBuilderFlags) { @@ -3848,19 +3757,20 @@ var ts; ObjectFlags[ObjectFlags["JSLiteral"] = 16384] = "JSLiteral"; ObjectFlags[ObjectFlags["FreshLiteral"] = 32768] = "FreshLiteral"; ObjectFlags[ObjectFlags["ArrayLiteral"] = 65536] = "ArrayLiteral"; + ObjectFlags[ObjectFlags["ObjectRestType"] = 131072] = "ObjectRestType"; /* @internal */ - ObjectFlags[ObjectFlags["PrimitiveUnion"] = 131072] = "PrimitiveUnion"; + ObjectFlags[ObjectFlags["PrimitiveUnion"] = 262144] = "PrimitiveUnion"; /* @internal */ - ObjectFlags[ObjectFlags["ContainsWideningType"] = 262144] = "ContainsWideningType"; + ObjectFlags[ObjectFlags["ContainsWideningType"] = 524288] = "ContainsWideningType"; /* @internal */ - ObjectFlags[ObjectFlags["ContainsObjectOrArrayLiteral"] = 524288] = "ContainsObjectOrArrayLiteral"; + ObjectFlags[ObjectFlags["ContainsObjectOrArrayLiteral"] = 1048576] = "ContainsObjectOrArrayLiteral"; /* @internal */ - ObjectFlags[ObjectFlags["NonInferrableType"] = 1048576] = "NonInferrableType"; + ObjectFlags[ObjectFlags["NonInferrableType"] = 2097152] = "NonInferrableType"; ObjectFlags[ObjectFlags["ClassOrInterface"] = 3] = "ClassOrInterface"; /* @internal */ - ObjectFlags[ObjectFlags["RequiresWidening"] = 786432] = "RequiresWidening"; + ObjectFlags[ObjectFlags["RequiresWidening"] = 1572864] = "RequiresWidening"; /* @internal */ - ObjectFlags[ObjectFlags["PropagatingFlags"] = 1835008] = "PropagatingFlags"; + ObjectFlags[ObjectFlags["PropagatingFlags"] = 3670016] = "PropagatingFlags"; })(ObjectFlags = ts.ObjectFlags || (ts.ObjectFlags = {})); /* @internal */ var VarianceFlags; @@ -3887,6 +3797,20 @@ var ts; SignatureKind[SignatureKind["Call"] = 0] = "Call"; SignatureKind[SignatureKind["Construct"] = 1] = "Construct"; })(SignatureKind = ts.SignatureKind || (ts.SignatureKind = {})); + /* @internal */ + var SignatureFlags; + (function (SignatureFlags) { + SignatureFlags[SignatureFlags["None"] = 0] = "None"; + SignatureFlags[SignatureFlags["HasRestParameter"] = 1] = "HasRestParameter"; + SignatureFlags[SignatureFlags["HasLiteralTypes"] = 2] = "HasLiteralTypes"; + SignatureFlags[SignatureFlags["IsInnerCallChain"] = 4] = "IsInnerCallChain"; + SignatureFlags[SignatureFlags["IsOuterCallChain"] = 8] = "IsOuterCallChain"; + // We do not propagate `IsInnerCallChain` to instantiated signatures, as that would result in us + // attempting to add `| undefined` on each recursive call to `getReturnTypeOfSignature` when + // instantiating the return type. + SignatureFlags[SignatureFlags["PropagatingFlags"] = 3] = "PropagatingFlags"; + SignatureFlags[SignatureFlags["CallChainFlags"] = 12] = "CallChainFlags"; + })(SignatureFlags = ts.SignatureFlags || (ts.SignatureFlags = {})); var IndexKind; (function (IndexKind) { IndexKind[IndexKind["String"] = 0] = "String"; @@ -4887,16 +4811,6 @@ var ts; } } ts.createRecursiveDirectoryWatcher = createRecursiveDirectoryWatcher; - function recursiveCreateDirectory(directoryPath, sys) { - var basePath = ts.getDirectoryPath(directoryPath); - var shouldCreateParent = basePath !== "" && directoryPath !== basePath && !sys.directoryExists(basePath); - if (shouldCreateParent) { - recursiveCreateDirectory(basePath, sys); - } - if (shouldCreateParent || !sys.directoryExists(directoryPath)) { - sys.createDirectory(directoryPath); - } - } /** * patch writefile to create folder before writing the file */ @@ -4905,11 +4819,7 @@ var ts; // patch writefile to create folder before writing the file var originalWriteFile = sys.writeFile; sys.writeFile = function (path, data, writeBom) { - var directoryPath = ts.getDirectoryPath(ts.normalizeSlashes(path)); - if (directoryPath && !sys.directoryExists(directoryPath)) { - recursiveCreateDirectory(directoryPath, sys); - } - originalWriteFile.call(sys, path, data, writeBom); + return ts.writeFileEnsuringDirectories(path, data, !!writeBom, function (path, data, writeByteOrderMark) { return originalWriteFile.call(sys, path, data, writeByteOrderMark); }, function (path) { return sys.createDirectory(path); }, function (path) { return sys.directoryExists(path); }); }; } ts.patchWriteFileEnsuringDirectory = patchWriteFileEnsuringDirectory; @@ -5058,6 +4968,15 @@ var ts; bufferFrom: bufferFrom, base64decode: function (input) { return bufferFrom(input, "base64").toString("utf8"); }, base64encode: function (input) { return bufferFrom(input).toString("base64"); }, + require: function (baseDir, moduleName) { + try { + var modulePath = ts.resolveJSModule(moduleName, baseDir, nodeSystem); + return { module: require(modulePath), modulePath: modulePath, error: undefined }; + } + catch (error) { + return { module: undefined, modulePath: undefined, error: error }; + } + } }; return nodeSystem; /** @@ -5196,6 +5115,7 @@ var ts; if (fsSupportsRecursive) { return watchDirectoryUsingFsWatch; } + // defer watchDirectoryRecursively as it depends on `ts.createMap()` which may not be usable yet. var watchDirectory = tscWatchDirectory === "RecursiveDirectoryUsingFsWatchFile" ? createWatchDirectoryUsing(fsWatchFile) : tscWatchDirectory === "RecursiveDirectoryUsingDynamicPriorityPolling" ? @@ -5640,6 +5560,673 @@ var ts; ts.Debug.isDebugging = true; } })(ts || (ts = {})); +/* @internal */ +var ts; +(function (ts) { + /** + * Internally, we represent paths as strings with '/' as the directory separator. + * When we make system calls (eg: LanguageServiceHost.getDirectory()), + * we expect the host to correctly handle paths in our specified format. + */ + ts.directorySeparator = "/"; + var altDirectorySeparator = "\\"; + var urlSchemeSeparator = "://"; + var backslashRegExp = /\\/g; + //// Path Tests + /** + * Determines whether a charCode corresponds to `/` or `\`. + */ + function isAnyDirectorySeparator(charCode) { + return charCode === 47 /* slash */ || charCode === 92 /* backslash */; + } + ts.isAnyDirectorySeparator = isAnyDirectorySeparator; + /** + * Determines whether a path starts with a URL scheme (e.g. starts with `http://`, `ftp://`, `file://`, etc.). + */ + function isUrl(path) { + return getEncodedRootLength(path) < 0; + } + ts.isUrl = isUrl; + /** + * Determines whether a path is an absolute disk path (e.g. starts with `/`, or a dos path + * like `c:`, `c:\` or `c:/`). + */ + function isRootedDiskPath(path) { + return getEncodedRootLength(path) > 0; + } + ts.isRootedDiskPath = isRootedDiskPath; + /** + * Determines whether a path consists only of a path root. + */ + function isDiskPathRoot(path) { + var rootLength = getEncodedRootLength(path); + return rootLength > 0 && rootLength === path.length; + } + ts.isDiskPathRoot = isDiskPathRoot; + /** + * Determines whether a path starts with an absolute path component (i.e. `/`, `c:/`, `file://`, etc.). + * + * ```ts + * // POSIX + * pathIsAbsolute("/path/to/file.ext") === true + * // DOS + * pathIsAbsolute("c:/path/to/file.ext") === true + * // URL + * pathIsAbsolute("file:///path/to/file.ext") === true + * // Non-absolute + * pathIsAbsolute("path/to/file.ext") === false + * pathIsAbsolute("./path/to/file.ext") === false + * ``` + */ + function pathIsAbsolute(path) { + return getEncodedRootLength(path) !== 0; + } + ts.pathIsAbsolute = pathIsAbsolute; + /** + * Determines whether a path starts with a relative path component (i.e. `.` or `..`). + */ + function pathIsRelative(path) { + return /^\.\.?($|[\\/])/.test(path); + } + ts.pathIsRelative = pathIsRelative; + function hasExtension(fileName) { + return ts.stringContains(getBaseFileName(fileName), "."); + } + ts.hasExtension = hasExtension; + function fileExtensionIs(path, extension) { + return path.length > extension.length && ts.endsWith(path, extension); + } + ts.fileExtensionIs = fileExtensionIs; + function fileExtensionIsOneOf(path, extensions) { + for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) { + var extension = extensions_1[_i]; + if (fileExtensionIs(path, extension)) { + return true; + } + } + return false; + } + ts.fileExtensionIsOneOf = fileExtensionIsOneOf; + /** + * Determines whether a path has a trailing separator (`/` or `\\`). + */ + function hasTrailingDirectorySeparator(path) { + return path.length > 0 && isAnyDirectorySeparator(path.charCodeAt(path.length - 1)); + } + ts.hasTrailingDirectorySeparator = hasTrailingDirectorySeparator; + //// Path Parsing + function isVolumeCharacter(charCode) { + return (charCode >= 97 /* a */ && charCode <= 122 /* z */) || + (charCode >= 65 /* A */ && charCode <= 90 /* Z */); + } + function getFileUrlVolumeSeparatorEnd(url, start) { + var ch0 = url.charCodeAt(start); + if (ch0 === 58 /* colon */) + return start + 1; + if (ch0 === 37 /* percent */ && url.charCodeAt(start + 1) === 51 /* _3 */) { + var ch2 = url.charCodeAt(start + 2); + if (ch2 === 97 /* a */ || ch2 === 65 /* A */) + return start + 3; + } + return -1; + } + /** + * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). + * If the root is part of a URL, the twos-complement of the root length is returned. + */ + function getEncodedRootLength(path) { + if (!path) + return 0; + var ch0 = path.charCodeAt(0); + // POSIX or UNC + if (ch0 === 47 /* slash */ || ch0 === 92 /* backslash */) { + if (path.charCodeAt(1) !== ch0) + return 1; // POSIX: "/" (or non-normalized "\") + var p1 = path.indexOf(ch0 === 47 /* slash */ ? ts.directorySeparator : altDirectorySeparator, 2); + if (p1 < 0) + return path.length; // UNC: "//server" or "\\server" + return p1 + 1; // UNC: "//server/" or "\\server\" + } + // DOS + if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58 /* colon */) { + var ch2 = path.charCodeAt(2); + if (ch2 === 47 /* slash */ || ch2 === 92 /* backslash */) + return 3; // DOS: "c:/" or "c:\" + if (path.length === 2) + return 2; // DOS: "c:" (but not "c:d") + } + // URL + var schemeEnd = path.indexOf(urlSchemeSeparator); + if (schemeEnd !== -1) { + var authorityStart = schemeEnd + urlSchemeSeparator.length; + var authorityEnd = path.indexOf(ts.directorySeparator, authorityStart); + if (authorityEnd !== -1) { // URL: "file:///", "file://server/", "file://server/path" + // For local "file" URLs, include the leading DOS volume (if present). + // Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a + // special case interpreted as "the machine from which the URL is being interpreted". + var scheme = path.slice(0, schemeEnd); + var authority = path.slice(authorityStart, authorityEnd); + if (scheme === "file" && (authority === "" || authority === "localhost") && + isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) { + var volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2); + if (volumeSeparatorEnd !== -1) { + if (path.charCodeAt(volumeSeparatorEnd) === 47 /* slash */) { + // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/" + return ~(volumeSeparatorEnd + 1); + } + if (volumeSeparatorEnd === path.length) { + // URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a" + // but not "file:///c:d" or "file:///c%3ad" + return ~volumeSeparatorEnd; + } + } + } + return ~(authorityEnd + 1); // URL: "file://server/", "http://server/" + } + return ~path.length; // URL: "file://server", "http://server" + } + // relative + return 0; + } + /** + * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). + * + * For example: + * ```ts + * getRootLength("a") === 0 // "" + * getRootLength("/") === 1 // "/" + * getRootLength("c:") === 2 // "c:" + * getRootLength("c:d") === 0 // "" + * getRootLength("c:/") === 3 // "c:/" + * getRootLength("c:\\") === 3 // "c:\\" + * getRootLength("//server") === 7 // "//server" + * getRootLength("//server/share") === 8 // "//server/" + * getRootLength("\\\\server") === 7 // "\\\\server" + * getRootLength("\\\\server\\share") === 8 // "\\\\server\\" + * getRootLength("file:///path") === 8 // "file:///" + * getRootLength("file:///c:") === 10 // "file:///c:" + * getRootLength("file:///c:d") === 8 // "file:///" + * getRootLength("file:///c:/path") === 11 // "file:///c:/" + * getRootLength("file://server") === 13 // "file://server" + * getRootLength("file://server/path") === 14 // "file://server/" + * getRootLength("http://server") === 13 // "http://server" + * getRootLength("http://server/path") === 14 // "http://server/" + * ``` + */ + function getRootLength(path) { + var rootLength = getEncodedRootLength(path); + return rootLength < 0 ? ~rootLength : rootLength; + } + ts.getRootLength = getRootLength; + function getDirectoryPath(path) { + path = normalizeSlashes(path); + // If the path provided is itself the root, then return it. + var rootLength = getRootLength(path); + if (rootLength === path.length) + return path; + // return the leading portion of the path up to the last (non-terminal) directory separator + // but not including any trailing directory separator. + path = removeTrailingDirectorySeparator(path); + return path.slice(0, Math.max(rootLength, path.lastIndexOf(ts.directorySeparator))); + } + ts.getDirectoryPath = getDirectoryPath; + function getBaseFileName(path, extensions, ignoreCase) { + path = normalizeSlashes(path); + // if the path provided is itself the root, then it has not file name. + var rootLength = getRootLength(path); + if (rootLength === path.length) + return ""; + // return the trailing portion of the path starting after the last (non-terminal) directory + // separator but not including any trailing directory separator. + path = removeTrailingDirectorySeparator(path); + var name = path.slice(Math.max(getRootLength(path), path.lastIndexOf(ts.directorySeparator) + 1)); + var extension = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(name, extensions, ignoreCase) : undefined; + return extension ? name.slice(0, name.length - extension.length) : name; + } + ts.getBaseFileName = getBaseFileName; + function tryGetExtensionFromPath(path, extension, stringEqualityComparer) { + if (!ts.startsWith(extension, ".")) + extension = "." + extension; + if (path.length >= extension.length && path.charCodeAt(path.length - extension.length) === 46 /* dot */) { + var pathExtension = path.slice(path.length - extension.length); + if (stringEqualityComparer(pathExtension, extension)) { + return pathExtension; + } + } + } + function getAnyExtensionFromPathWorker(path, extensions, stringEqualityComparer) { + if (typeof extensions === "string") { + return tryGetExtensionFromPath(path, extensions, stringEqualityComparer) || ""; + } + for (var _i = 0, extensions_2 = extensions; _i < extensions_2.length; _i++) { + var extension = extensions_2[_i]; + var result = tryGetExtensionFromPath(path, extension, stringEqualityComparer); + if (result) + return result; + } + return ""; + } + function getAnyExtensionFromPath(path, extensions, ignoreCase) { + // Retrieves any string from the final "." onwards from a base file name. + // Unlike extensionFromPath, which throws an exception on unrecognized extensions. + if (extensions) { + return getAnyExtensionFromPathWorker(removeTrailingDirectorySeparator(path), extensions, ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive); + } + var baseFileName = getBaseFileName(path); + var extensionIndex = baseFileName.lastIndexOf("."); + if (extensionIndex >= 0) { + return baseFileName.substring(extensionIndex); + } + return ""; + } + ts.getAnyExtensionFromPath = getAnyExtensionFromPath; + function pathComponents(path, rootLength) { + var root = path.substring(0, rootLength); + var rest = path.substring(rootLength).split(ts.directorySeparator); + if (rest.length && !ts.lastOrUndefined(rest)) + rest.pop(); + return __spreadArrays([root], rest); + } + /** + * Parse a path into an array containing a root component (at index 0) and zero or more path + * components (at indices > 0). The result is not normalized. + * If the path is relative, the root component is `""`. + * If the path is absolute, the root component includes the first path separator (`/`). + * + * ```ts + * // POSIX + * getPathComponents("/path/to/file.ext") === ["/", "path", "to", "file.ext"] + * getPathComponents("/path/to/") === ["/", "path", "to"] + * getPathComponents("/") === ["/"] + * // DOS + * getPathComponents("c:/path/to/file.ext") === ["c:/", "path", "to", "file.ext"] + * getPathComponents("c:/path/to/") === ["c:/", "path", "to"] + * getPathComponents("c:/") === ["c:/"] + * getPathComponents("c:") === ["c:"] + * // URL + * getPathComponents("http://typescriptlang.org/path/to/file.ext") === ["http://typescriptlang.org/", "path", "to", "file.ext"] + * getPathComponents("http://typescriptlang.org/path/to/") === ["http://typescriptlang.org/", "path", "to"] + * getPathComponents("http://typescriptlang.org/") === ["http://typescriptlang.org/"] + * getPathComponents("http://typescriptlang.org") === ["http://typescriptlang.org"] + * getPathComponents("file://server/path/to/file.ext") === ["file://server/", "path", "to", "file.ext"] + * getPathComponents("file://server/path/to/") === ["file://server/", "path", "to"] + * getPathComponents("file://server/") === ["file://server/"] + * getPathComponents("file://server") === ["file://server"] + * getPathComponents("file:///path/to/file.ext") === ["file:///", "path", "to", "file.ext"] + * getPathComponents("file:///path/to/") === ["file:///", "path", "to"] + * getPathComponents("file:///") === ["file:///"] + * getPathComponents("file://") === ["file://"] + */ + function getPathComponents(path, currentDirectory) { + if (currentDirectory === void 0) { currentDirectory = ""; } + path = combinePaths(currentDirectory, path); + return pathComponents(path, getRootLength(path)); + } + ts.getPathComponents = getPathComponents; + //// Path Formatting + /** + * Formats a parsed path consisting of a root component (at index 0) and zero or more path + * segments (at indices > 0). + * + * ```ts + * getPathFromPathComponents(["/", "path", "to", "file.ext"]) === "/path/to/file.ext" + * ``` + */ + function getPathFromPathComponents(pathComponents) { + if (pathComponents.length === 0) + return ""; + var root = pathComponents[0] && ensureTrailingDirectorySeparator(pathComponents[0]); + return root + pathComponents.slice(1).join(ts.directorySeparator); + } + ts.getPathFromPathComponents = getPathFromPathComponents; + //// Path Normalization + /** + * Normalize path separators, converting `\` into `/`. + */ + function normalizeSlashes(path) { + return path.replace(backslashRegExp, ts.directorySeparator); + } + ts.normalizeSlashes = normalizeSlashes; + /** + * Reduce an array of path components to a more simplified path by navigating any + * `"."` or `".."` entries in the path. + */ + function reducePathComponents(components) { + if (!ts.some(components)) + return []; + var reduced = [components[0]]; + for (var i = 1; i < components.length; i++) { + var component = components[i]; + if (!component) + continue; + if (component === ".") + continue; + if (component === "..") { + if (reduced.length > 1) { + if (reduced[reduced.length - 1] !== "..") { + reduced.pop(); + continue; + } + } + else if (reduced[0]) + continue; + } + reduced.push(component); + } + return reduced; + } + ts.reducePathComponents = reducePathComponents; + /** + * Combines paths. If a path is absolute, it replaces any previous path. Relative paths are not simplified. + * + * ```ts + * // Non-rooted + * combinePaths("path", "to", "file.ext") === "path/to/file.ext" + * combinePaths("path", "dir", "..", "to", "file.ext") === "path/dir/../to/file.ext" + * // POSIX + * combinePaths("/path", "to", "file.ext") === "/path/to/file.ext" + * combinePaths("/path", "/to", "file.ext") === "/to/file.ext" + * // DOS + * combinePaths("c:/path", "to", "file.ext") === "c:/path/to/file.ext" + * combinePaths("c:/path", "c:/to", "file.ext") === "c:/to/file.ext" + * // URL + * combinePaths("file:///path", "to", "file.ext") === "file:///path/to/file.ext" + * combinePaths("file:///path", "file:///to", "file.ext") === "file:///to/file.ext" + * ``` + */ + function combinePaths(path) { + var paths = []; + for (var _i = 1; _i < arguments.length; _i++) { + paths[_i - 1] = arguments[_i]; + } + if (path) + path = normalizeSlashes(path); + for (var _a = 0, paths_1 = paths; _a < paths_1.length; _a++) { + var relativePath = paths_1[_a]; + if (!relativePath) + continue; + relativePath = normalizeSlashes(relativePath); + if (!path || getRootLength(relativePath) !== 0) { + path = relativePath; + } + else { + path = ensureTrailingDirectorySeparator(path) + relativePath; + } + } + return path; + } + ts.combinePaths = combinePaths; + /** + * Combines and resolves paths. If a path is absolute, it replaces any previous path. Any + * `.` and `..` path components are resolved. Trailing directory separators are preserved. + * + * ```ts + * resolvePath("/path", "to", "file.ext") === "path/to/file.ext" + * resolvePath("/path", "to", "file.ext/") === "path/to/file.ext/" + * resolvePath("/path", "dir", "..", "to", "file.ext") === "path/to/file.ext" + * ``` + */ + function resolvePath(path) { + var paths = []; + for (var _i = 1; _i < arguments.length; _i++) { + paths[_i - 1] = arguments[_i]; + } + return normalizePath(ts.some(paths) ? combinePaths.apply(void 0, __spreadArrays([path], paths)) : normalizeSlashes(path)); + } + ts.resolvePath = resolvePath; + /** + * Parse a path into an array containing a root component (at index 0) and zero or more path + * components (at indices > 0). The result is normalized. + * If the path is relative, the root component is `""`. + * If the path is absolute, the root component includes the first path separator (`/`). + * + * ```ts + * getNormalizedPathComponents("to/dir/../file.ext", "/path/") === ["/", "path", "to", "file.ext"] + */ + function getNormalizedPathComponents(path, currentDirectory) { + return reducePathComponents(getPathComponents(path, currentDirectory)); + } + ts.getNormalizedPathComponents = getNormalizedPathComponents; + function getNormalizedAbsolutePath(fileName, currentDirectory) { + return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory)); + } + ts.getNormalizedAbsolutePath = getNormalizedAbsolutePath; + function normalizePath(path) { + path = normalizeSlashes(path); + var normalized = getPathFromPathComponents(reducePathComponents(getPathComponents(path))); + return normalized && hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(normalized) : normalized; + } + ts.normalizePath = normalizePath; + function getPathWithoutRoot(pathComponents) { + if (pathComponents.length === 0) + return ""; + return pathComponents.slice(1).join(ts.directorySeparator); + } + function getNormalizedAbsolutePathWithoutRoot(fileName, currentDirectory) { + return getPathWithoutRoot(getNormalizedPathComponents(fileName, currentDirectory)); + } + ts.getNormalizedAbsolutePathWithoutRoot = getNormalizedAbsolutePathWithoutRoot; + function toPath(fileName, basePath, getCanonicalFileName) { + var nonCanonicalizedPath = isRootedDiskPath(fileName) + ? normalizePath(fileName) + : getNormalizedAbsolutePath(fileName, basePath); + return getCanonicalFileName(nonCanonicalizedPath); + } + ts.toPath = toPath; + function normalizePathAndParts(path) { + path = normalizeSlashes(path); + var _a = reducePathComponents(getPathComponents(path)), root = _a[0], parts = _a.slice(1); + if (parts.length) { + var joinedParts = root + parts.join(ts.directorySeparator); + return { path: hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(joinedParts) : joinedParts, parts: parts }; + } + else { + return { path: root, parts: parts }; + } + } + ts.normalizePathAndParts = normalizePathAndParts; + function removeTrailingDirectorySeparator(path) { + if (hasTrailingDirectorySeparator(path)) { + return path.substr(0, path.length - 1); + } + return path; + } + ts.removeTrailingDirectorySeparator = removeTrailingDirectorySeparator; + function ensureTrailingDirectorySeparator(path) { + if (!hasTrailingDirectorySeparator(path)) { + return path + ts.directorySeparator; + } + return path; + } + ts.ensureTrailingDirectorySeparator = ensureTrailingDirectorySeparator; + /** + * Ensures a path is either absolute (prefixed with `/` or `c:`) or dot-relative (prefixed + * with `./` or `../`) so as not to be confused with an unprefixed module name. + * + * ```ts + * ensurePathIsNonModuleName("/path/to/file.ext") === "/path/to/file.ext" + * ensurePathIsNonModuleName("./path/to/file.ext") === "./path/to/file.ext" + * ensurePathIsNonModuleName("../path/to/file.ext") === "../path/to/file.ext" + * ensurePathIsNonModuleName("path/to/file.ext") === "./path/to/file.ext" + * ``` + */ + function ensurePathIsNonModuleName(path) { + return !pathIsAbsolute(path) && !pathIsRelative(path) ? "./" + path : path; + } + ts.ensurePathIsNonModuleName = ensurePathIsNonModuleName; + function changeAnyExtension(path, ext, extensions, ignoreCase) { + var pathext = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(path, extensions, ignoreCase) : getAnyExtensionFromPath(path); + return pathext ? path.slice(0, path.length - pathext.length) + (ts.startsWith(ext, ".") ? ext : "." + ext) : path; + } + ts.changeAnyExtension = changeAnyExtension; + //// Path Comparisons + // check path for these segments: '', '.'. '..' + var relativePathSegmentRegExp = /(^|\/)\.{0,2}($|\/)/; + function comparePathsWorker(a, b, componentComparer) { + if (a === b) + return 0 /* EqualTo */; + if (a === undefined) + return -1 /* LessThan */; + if (b === undefined) + return 1 /* GreaterThan */; + // NOTE: Performance optimization - shortcut if the root segments differ as there would be no + // need to perform path reduction. + var aRoot = a.substring(0, getRootLength(a)); + var bRoot = b.substring(0, getRootLength(b)); + var result = ts.compareStringsCaseInsensitive(aRoot, bRoot); + if (result !== 0 /* EqualTo */) { + return result; + } + // NOTE: Performance optimization - shortcut if there are no relative path segments in + // the non-root portion of the path + var aRest = a.substring(aRoot.length); + var bRest = b.substring(bRoot.length); + if (!relativePathSegmentRegExp.test(aRest) && !relativePathSegmentRegExp.test(bRest)) { + return componentComparer(aRest, bRest); + } + // The path contains a relative path segment. Normalize the paths and perform a slower component + // by component comparison. + var aComponents = reducePathComponents(getPathComponents(a)); + var bComponents = reducePathComponents(getPathComponents(b)); + var sharedLength = Math.min(aComponents.length, bComponents.length); + for (var i = 1; i < sharedLength; i++) { + var result_1 = componentComparer(aComponents[i], bComponents[i]); + if (result_1 !== 0 /* EqualTo */) { + return result_1; + } + } + return ts.compareValues(aComponents.length, bComponents.length); + } + /** + * Performs a case-sensitive comparison of two paths. Path roots are always compared case-insensitively. + */ + function comparePathsCaseSensitive(a, b) { + return comparePathsWorker(a, b, ts.compareStringsCaseSensitive); + } + ts.comparePathsCaseSensitive = comparePathsCaseSensitive; + /** + * Performs a case-insensitive comparison of two paths. + */ + function comparePathsCaseInsensitive(a, b) { + return comparePathsWorker(a, b, ts.compareStringsCaseInsensitive); + } + ts.comparePathsCaseInsensitive = comparePathsCaseInsensitive; + function comparePaths(a, b, currentDirectory, ignoreCase) { + if (typeof currentDirectory === "string") { + a = combinePaths(currentDirectory, a); + b = combinePaths(currentDirectory, b); + } + else if (typeof currentDirectory === "boolean") { + ignoreCase = currentDirectory; + } + return comparePathsWorker(a, b, ts.getStringComparer(ignoreCase)); + } + ts.comparePaths = comparePaths; + function containsPath(parent, child, currentDirectory, ignoreCase) { + if (typeof currentDirectory === "string") { + parent = combinePaths(currentDirectory, parent); + child = combinePaths(currentDirectory, child); + } + else if (typeof currentDirectory === "boolean") { + ignoreCase = currentDirectory; + } + if (parent === undefined || child === undefined) + return false; + if (parent === child) + return true; + var parentComponents = reducePathComponents(getPathComponents(parent)); + var childComponents = reducePathComponents(getPathComponents(child)); + if (childComponents.length < parentComponents.length) { + return false; + } + var componentEqualityComparer = ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive; + for (var i = 0; i < parentComponents.length; i++) { + var equalityComparer = i === 0 ? ts.equateStringsCaseInsensitive : componentEqualityComparer; + if (!equalityComparer(parentComponents[i], childComponents[i])) { + return false; + } + } + return true; + } + ts.containsPath = containsPath; + /** + * Determines whether `fileName` starts with the specified `directoryName` using the provided path canonicalization callback. + * Comparison is case-sensitive between the canonical paths. + * + * @deprecated Use `containsPath` if possible. + */ + function startsWithDirectory(fileName, directoryName, getCanonicalFileName) { + var canonicalFileName = getCanonicalFileName(fileName); + var canonicalDirectoryName = getCanonicalFileName(directoryName); + return ts.startsWith(canonicalFileName, canonicalDirectoryName + "/") || ts.startsWith(canonicalFileName, canonicalDirectoryName + "\\"); + } + ts.startsWithDirectory = startsWithDirectory; + //// Relative Paths + function getPathComponentsRelativeTo(from, to, stringEqualityComparer, getCanonicalFileName) { + var fromComponents = reducePathComponents(getPathComponents(from)); + var toComponents = reducePathComponents(getPathComponents(to)); + var start; + for (start = 0; start < fromComponents.length && start < toComponents.length; start++) { + var fromComponent = getCanonicalFileName(fromComponents[start]); + var toComponent = getCanonicalFileName(toComponents[start]); + var comparer = start === 0 ? ts.equateStringsCaseInsensitive : stringEqualityComparer; + if (!comparer(fromComponent, toComponent)) + break; + } + if (start === 0) { + return toComponents; + } + var components = toComponents.slice(start); + var relative = []; + for (; start < fromComponents.length; start++) { + relative.push(".."); + } + return __spreadArrays([""], relative, components); + } + ts.getPathComponentsRelativeTo = getPathComponentsRelativeTo; + function getRelativePathFromDirectory(fromDirectory, to, getCanonicalFileNameOrIgnoreCase) { + ts.Debug.assert((getRootLength(fromDirectory) > 0) === (getRootLength(to) > 0), "Paths must either both be absolute or both be relative"); + var getCanonicalFileName = typeof getCanonicalFileNameOrIgnoreCase === "function" ? getCanonicalFileNameOrIgnoreCase : ts.identity; + var ignoreCase = typeof getCanonicalFileNameOrIgnoreCase === "boolean" ? getCanonicalFileNameOrIgnoreCase : false; + var pathComponents = getPathComponentsRelativeTo(fromDirectory, to, ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive, getCanonicalFileName); + return getPathFromPathComponents(pathComponents); + } + ts.getRelativePathFromDirectory = getRelativePathFromDirectory; + function convertToRelativePath(absoluteOrRelativePath, basePath, getCanonicalFileName) { + return !isRootedDiskPath(absoluteOrRelativePath) + ? absoluteOrRelativePath + : getRelativePathToDirectoryOrUrl(basePath, absoluteOrRelativePath, basePath, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); + } + ts.convertToRelativePath = convertToRelativePath; + function getRelativePathFromFile(from, to, getCanonicalFileName) { + return ensurePathIsNonModuleName(getRelativePathFromDirectory(getDirectoryPath(from), to, getCanonicalFileName)); + } + ts.getRelativePathFromFile = getRelativePathFromFile; + function getRelativePathToDirectoryOrUrl(directoryPathOrUrl, relativeOrAbsolutePath, currentDirectory, getCanonicalFileName, isAbsolutePathAnUrl) { + var pathComponents = getPathComponentsRelativeTo(resolvePath(currentDirectory, directoryPathOrUrl), resolvePath(currentDirectory, relativeOrAbsolutePath), ts.equateStringsCaseSensitive, getCanonicalFileName); + var firstComponent = pathComponents[0]; + if (isAbsolutePathAnUrl && isRootedDiskPath(firstComponent)) { + var prefix = firstComponent.charAt(0) === ts.directorySeparator ? "file://" : "file:///"; + pathComponents[0] = prefix + firstComponent; + } + return getPathFromPathComponents(pathComponents); + } + ts.getRelativePathToDirectoryOrUrl = getRelativePathToDirectoryOrUrl; + function forEachAncestorDirectory(directory, callback) { + while (true) { + var result = callback(directory); + if (result !== undefined) { + return result; + } + var parentPath = getDirectoryPath(directory); + if (parentPath === directory) { + return undefined; + } + directory = parentPath; + } + } + ts.forEachAncestorDirectory = forEachAncestorDirectory; +})(ts || (ts = {})); // // generated from './diagnosticInformationMap.generated.ts' by 'src/compiler' /* @internal */ @@ -5667,7 +6254,7 @@ var ts; An_index_signature_parameter_cannot_have_an_initializer: diag(1020, ts.DiagnosticCategory.Error, "An_index_signature_parameter_cannot_have_an_initializer_1020", "An index signature parameter cannot have an initializer."), An_index_signature_must_have_a_type_annotation: diag(1021, ts.DiagnosticCategory.Error, "An_index_signature_must_have_a_type_annotation_1021", "An index signature must have a type annotation."), An_index_signature_parameter_must_have_a_type_annotation: diag(1022, ts.DiagnosticCategory.Error, "An_index_signature_parameter_must_have_a_type_annotation_1022", "An index signature parameter must have a type annotation."), - An_index_signature_parameter_type_must_be_string_or_number: diag(1023, ts.DiagnosticCategory.Error, "An_index_signature_parameter_type_must_be_string_or_number_1023", "An index signature parameter type must be 'string' or 'number'."), + An_index_signature_parameter_type_must_be_either_string_or_number: diag(1023, ts.DiagnosticCategory.Error, "An_index_signature_parameter_type_must_be_either_string_or_number_1023", "An index signature parameter type must be either 'string' or 'number'."), readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature: diag(1024, ts.DiagnosticCategory.Error, "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024", "'readonly' modifier can only appear on a property declaration or index signature."), Accessibility_modifier_already_seen: diag(1028, ts.DiagnosticCategory.Error, "Accessibility_modifier_already_seen_1028", "Accessibility modifier already seen."), _0_modifier_must_precede_1_modifier: diag(1029, ts.DiagnosticCategory.Error, "_0_modifier_must_precede_1_modifier_1029", "'{0}' modifier must precede '{1}' modifier."), @@ -5875,7 +6462,7 @@ var ts; Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1320, ts.DiagnosticCategory.Error, "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."), Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1321, ts.DiagnosticCategory.Error, "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."), Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1322, ts.DiagnosticCategory.Error, "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."), - Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext: diag(1323, ts.DiagnosticCategory.Error, "Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323", "Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'."), + Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_commonjs_amd_system_or_umd: diag(1323, ts.DiagnosticCategory.Error, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_commonjs_amd_system_or_umd_1323", "Dynamic imports are only supported when the '--module' flag is set to 'esnext', 'commonjs', 'amd', 'system', or 'umd'."), Dynamic_import_must_have_one_specifier_as_an_argument: diag(1324, ts.DiagnosticCategory.Error, "Dynamic_import_must_have_one_specifier_as_an_argument_1324", "Dynamic import must have one specifier as an argument."), Specifier_of_dynamic_import_cannot_be_spread_element: diag(1325, ts.DiagnosticCategory.Error, "Specifier_of_dynamic_import_cannot_be_spread_element_1325", "Specifier of dynamic import cannot be spread element."), Dynamic_import_cannot_have_type_arguments: diag(1326, ts.DiagnosticCategory.Error, "Dynamic_import_cannot_have_type_arguments_1326", "Dynamic import cannot have type arguments"), @@ -5911,6 +6498,7 @@ var ts; An_enum_member_name_must_be_followed_by_a_or: diag(1357, ts.DiagnosticCategory.Error, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."), Tagged_template_expressions_are_not_permitted_in_an_optional_chain: diag(1358, ts.DiagnosticCategory.Error, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."), Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here: diag(1359, ts.DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359", "Identifier expected. '{0}' is a reserved word that cannot be used here."), + Did_you_mean_to_parenthesize_this_function_type: diag(1360, ts.DiagnosticCategory.Error, "Did_you_mean_to_parenthesize_this_function_type_1360", "Did you mean to parenthesize this function type?"), The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."), The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."), Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), @@ -6038,7 +6626,6 @@ var ts; Class_0_incorrectly_implements_interface_1: diag(2420, ts.DiagnosticCategory.Error, "Class_0_incorrectly_implements_interface_1_2420", "Class '{0}' incorrectly implements interface '{1}'."), A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2422, ts.DiagnosticCategory.Error, "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422", "A class can only implement an object type or intersection of object types with statically known members."), Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: diag(2423, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423", "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."), - Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: diag(2424, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424", "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property."), Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: diag(2425, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425", "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."), Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: diag(2426, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426", "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."), Interface_name_cannot_be_0: diag(2427, ts.DiagnosticCategory.Error, "Interface_name_cannot_be_0_2427", "Interface name cannot be '{0}'."), @@ -6208,8 +6795,8 @@ var ts; JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: diag(2607, ts.DiagnosticCategory.Error, "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", "JSX element class does not support attributes because it does not have a '{0}' property."), The_global_type_JSX_0_may_not_have_more_than_one_property: diag(2608, ts.DiagnosticCategory.Error, "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", "The global type 'JSX.{0}' may not have more than one property."), JSX_spread_child_must_be_an_array_type: diag(2609, ts.DiagnosticCategory.Error, "JSX_spread_child_must_be_an_array_type_2609", "JSX spread child must be an array type."), - Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_property: diag(2610, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_proper_2610", "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member property."), - Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_accessor: diag(2611, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_access_2611", "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member accessor."), + _0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property: diag(2610, ts.DiagnosticCategory.Error, "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610", "'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property."), + _0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor: diag(2611, ts.DiagnosticCategory.Error, "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611", "'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor."), Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration: diag(2612, ts.DiagnosticCategory.Error, "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612", "Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration."), Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead: diag(2613, ts.DiagnosticCategory.Error, "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613", "Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"), Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead: diag(2614, ts.DiagnosticCategory.Error, "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614", "Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"), @@ -6432,6 +7019,8 @@ var ts; Parameter_0_of_accessor_has_or_is_using_private_name_1: diag(4106, ts.DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106", "Parameter '{0}' of accessor has or is using private name '{1}'."), Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2: diag(4107, ts.DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107", "Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."), Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4108, ts.DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108", "Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."), + Type_arguments_for_0_circularly_reference_themselves: diag(4109, ts.DiagnosticCategory.Error, "Type_arguments_for_0_circularly_reference_themselves_4109", "Type arguments for '{0}' circularly reference themselves."), + Tuple_type_arguments_circularly_reference_themselves: diag(4110, ts.DiagnosticCategory.Error, "Tuple_type_arguments_circularly_reference_themselves_4110", "Tuple type arguments circularly reference themselves."), The_current_host_does_not_support_the_0_option: diag(5001, ts.DiagnosticCategory.Error, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."), Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, ts.DiagnosticCategory.Error, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."), File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, ts.DiagnosticCategory.Error, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."), @@ -6439,6 +7028,7 @@ var ts; Failed_to_parse_file_0_Colon_1: diag(5014, ts.DiagnosticCategory.Error, "Failed_to_parse_file_0_Colon_1_5014", "Failed to parse file '{0}': {1}."), Unknown_compiler_option_0: diag(5023, ts.DiagnosticCategory.Error, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."), Compiler_option_0_requires_a_value_of_type_1: diag(5024, ts.DiagnosticCategory.Error, "Compiler_option_0_requires_a_value_of_type_1_5024", "Compiler option '{0}' requires a value of type {1}."), + Unknown_compiler_option_0_Did_you_mean_1: diag(5025, ts.DiagnosticCategory.Error, "Unknown_compiler_option_0_Did_you_mean_1_5025", "Unknown compiler option '{0}'. Did you mean '{1}'?"), Could_not_write_file_0_Colon_1: diag(5033, ts.DiagnosticCategory.Error, "Could_not_write_file_0_Colon_1_5033", "Could not write file '{0}': {1}."), Option_project_cannot_be_mixed_with_source_files_on_a_command_line: diag(5042, ts.DiagnosticCategory.Error, "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042", "Option 'project' cannot be mixed with source files on a command line."), Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher: diag(5047, ts.DiagnosticCategory.Error, "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047", "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."), @@ -6469,6 +7059,7 @@ var ts; Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified: diag(5074, ts.DiagnosticCategory.Error, "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074", "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option `--tsBuildInfoFile` is specified."), _0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2: diag(5075, ts.DiagnosticCategory.Error, "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075", "'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."), _0_and_1_operations_cannot_be_mixed_without_parentheses: diag(5076, ts.DiagnosticCategory.Error, "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076", "'{0}' and '{1}' operations cannot be mixed without parentheses."), + Unknown_build_option_0_Did_you_mean_1: diag(5077, ts.DiagnosticCategory.Error, "Unknown_build_option_0_Did_you_mean_1_5077", "Unknown build option '{0}'. Did you mean '{1}'?"), Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6000, ts.DiagnosticCategory.Message, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."), Concatenate_and_emit_output_to_single_file: diag(6001, ts.DiagnosticCategory.Message, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."), Generates_corresponding_d_ts_file: diag(6002, ts.DiagnosticCategory.Message, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), @@ -6515,7 +7106,7 @@ var ts; Corrupted_locale_file_0: diag(6051, ts.DiagnosticCategory.Error, "Corrupted_locale_file_0_6051", "Corrupted locale file {0}."), Raise_error_on_expressions_and_declarations_with_an_implied_any_type: diag(6052, ts.DiagnosticCategory.Message, "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052", "Raise error on expressions and declarations with an implied 'any' type."), File_0_not_found: diag(6053, ts.DiagnosticCategory.Error, "File_0_not_found_6053", "File '{0}' not found."), - File_0_has_unsupported_extension_The_only_supported_extensions_are_1: diag(6054, ts.DiagnosticCategory.Error, "File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054", "File '{0}' has unsupported extension. The only supported extensions are {1}."), + File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1: diag(6054, ts.DiagnosticCategory.Error, "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054", "File '{0}' has an unsupported extension. The only supported extensions are {1}."), Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: diag(6055, ts.DiagnosticCategory.Message, "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055", "Suppress noImplicitAny errors for indexing objects lacking index signatures."), Do_not_emit_declarations_for_code_that_has_an_internal_annotation: diag(6056, ts.DiagnosticCategory.Message, "Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056", "Do not emit declarations for code that has an '@internal' annotation."), Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: diag(6058, ts.DiagnosticCategory.Message, "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058", "Specify the root directory of input files. Use to control the output directory structure with --outDir."), @@ -6723,6 +7314,8 @@ var ts; The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", "The expected type comes from property '{0}' which is declared here on type '{1}'"), The_expected_type_comes_from_this_index_signature: diag(6501, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."), The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."), + Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing: diag(6503, ts.DiagnosticCategory.Message, "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503", "Print names of files that are part of the compilation and then stop processing."), + File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option: diag(6504, ts.DiagnosticCategory.Error, "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504", "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"), Variable_0_implicitly_has_an_1_type: diag(7005, ts.DiagnosticCategory.Error, "Variable_0_implicitly_has_an_1_type_7005", "Variable '{0}' implicitly has an '{1}' type."), Parameter_0_implicitly_has_an_1_type: diag(7006, ts.DiagnosticCategory.Error, "Parameter_0_implicitly_has_an_1_type_7006", "Parameter '{0}' implicitly has an '{1}' type."), Member_0_implicitly_has_an_1_type: diag(7008, ts.DiagnosticCategory.Error, "Member_0_implicitly_has_an_1_type_7008", "Member '{0}' implicitly has an '{1}' type."), @@ -6826,6 +7419,7 @@ var ts; Expected_corresponding_closing_tag_for_JSX_fragment: diag(17015, ts.DiagnosticCategory.Error, "Expected_corresponding_closing_tag_for_JSX_fragment_17015", "Expected corresponding closing tag for JSX fragment."), JSX_fragment_is_not_supported_when_using_jsxFactory: diag(17016, ts.DiagnosticCategory.Error, "JSX_fragment_is_not_supported_when_using_jsxFactory_17016", "JSX fragment is not supported when using --jsxFactory"), JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma: diag(17017, ts.DiagnosticCategory.Error, "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017", "JSX fragment is not supported when using an inline JSX factory pragma"), + Unknown_type_acquisition_option_0_Did_you_mean_1: diag(17018, ts.DiagnosticCategory.Error, "Unknown_type_acquisition_option_0_Did_you_mean_1_17018", "Unknown type acquisition option '{0}'. Did you mean '{1}'?"), Circularity_detected_while_resolving_configuration_Colon_0: diag(18000, ts.DiagnosticCategory.Error, "Circularity_detected_while_resolving_configuration_Colon_0_18000", "Circularity detected while resolving configuration: {0}"), A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not: diag(18001, ts.DiagnosticCategory.Error, "A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not_18001", "A path in an 'extends' option must be relative or rooted, but '{0}' is not."), The_files_list_in_config_file_0_is_empty: diag(18002, ts.DiagnosticCategory.Error, "The_files_list_in_config_file_0_is_empty_18002", "The 'files' list in config file '{0}' is empty."), @@ -9058,7 +9652,7 @@ var ts; ts.getDeclarationOfKind = getDeclarationOfKind; /** Create a new escaped identifier map. */ function createUnderscoreEscapedMap() { - return new ts.MapCtr(); + return new ts.Map(); } ts.createUnderscoreEscapedMap = createUnderscoreEscapedMap; function hasEntries(map) { @@ -9114,13 +9708,6 @@ var ts; reportPrivateInBaseOfClassExpression: ts.noop, }; } - function toPath(fileName, basePath, getCanonicalFileName) { - var nonCanonicalizedPath = ts.isRootedDiskPath(fileName) - ? ts.normalizePath(fileName) - : ts.getNormalizedAbsolutePath(fileName, basePath); - return getCanonicalFileName(nonCanonicalizedPath); - } - ts.toPath = toPath; function changesAffectModuleResolution(oldOptions, newOptions) { return oldOptions.configFilePath !== newOptions.configFilePath || optionsHaveModuleResolutionChanges(oldOptions, newOptions); @@ -9927,6 +10514,11 @@ var ts; break; case 201 /* ArrowFunction */: return getErrorSpanForArrowFunction(sourceFile, node); + case 275 /* CaseClause */: + case 276 /* DefaultClause */: + var start = ts.skipTrivia(sourceFile.text, node.pos); + var end = node.statements.length > 0 ? node.statements[0].pos : node.end; + return ts.createTextSpanFromBounds(start, end); } if (errorNode === undefined) { // If we don't have a better node, then just set the error on the first token of @@ -10739,7 +11331,7 @@ var ts; (node.typeArguments[0].kind === 142 /* StringKeyword */ || node.typeArguments[0].kind === 139 /* NumberKeyword */); } ts.isJSDocIndexSignature = isJSDocIndexSignature; - function isRequireCall(callExpression, checkArgumentIsStringLiteralLike) { + function isRequireCall(callExpression, requireStringLiteralLikeArgument) { if (callExpression.kind !== 195 /* CallExpression */) { return false; } @@ -10751,7 +11343,7 @@ var ts; return false; } var arg = args[0]; - return !checkArgumentIsStringLiteralLike || ts.isStringLiteralLike(arg); + return !requireStringLiteralLikeArgument || ts.isStringLiteralLike(arg); } ts.isRequireCall = isRequireCall; function isSingleOrDoubleQuote(charCode) { @@ -10973,27 +11565,31 @@ var ts; isBindableStaticNameExpression(expr.arguments[0], /*excludeThisKeyword*/ true); } ts.isBindableObjectDefinePropertyCall = isBindableObjectDefinePropertyCall; - function isBindableStaticElementAccessExpression(node, excludeThisKeyword) { - return isLiteralLikeElementAccess(node) - && ((!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */) || - isEntityNameExpression(node.expression) || - isBindableStaticElementAccessExpression(node.expression, /*excludeThisKeyword*/ true)); - } - ts.isBindableStaticElementAccessExpression = isBindableStaticElementAccessExpression; + /** x.y OR x[0] */ function isLiteralLikeAccess(node) { return ts.isPropertyAccessExpression(node) || isLiteralLikeElementAccess(node); } ts.isLiteralLikeAccess = isLiteralLikeAccess; + /** x[0] OR x['a'] OR x[Symbol.y] */ function isLiteralLikeElementAccess(node) { return ts.isElementAccessExpression(node) && (isStringOrNumericLiteralLike(node.argumentExpression) || isWellKnownSymbolSyntactically(node.argumentExpression)); } ts.isLiteralLikeElementAccess = isLiteralLikeElementAccess; + /** Any series of property and element accesses. */ function isBindableStaticAccessExpression(node, excludeThisKeyword) { return ts.isPropertyAccessExpression(node) && (!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */ || isBindableStaticNameExpression(node.expression, /*excludeThisKeyword*/ true)) || isBindableStaticElementAccessExpression(node, excludeThisKeyword); } ts.isBindableStaticAccessExpression = isBindableStaticAccessExpression; + /** Any series of property and element accesses, ending in a literal element access */ + function isBindableStaticElementAccessExpression(node, excludeThisKeyword) { + return isLiteralLikeElementAccess(node) + && ((!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */) || + isEntityNameExpression(node.expression) || + isBindableStaticAccessExpression(node.expression, /*excludeThisKeyword*/ true)); + } + ts.isBindableStaticElementAccessExpression = isBindableStaticElementAccessExpression; function isBindableStaticNameExpression(node, excludeThisKeyword) { return isEntityNameExpression(node) || isBindableStaticAccessExpression(node, excludeThisKeyword); } @@ -11022,7 +11618,7 @@ var ts; if (expr.operatorToken.kind !== 62 /* EqualsToken */ || !isAccessExpression(expr.left)) { return 0 /* None */; } - if (isBindableStaticNameExpression(expr.left.expression) && getElementOrPropertyAccessName(expr.left) === "prototype" && ts.isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) { + if (isBindableStaticNameExpression(expr.left.expression, /*excludeThisKeyword*/ true) && getElementOrPropertyAccessName(expr.left) === "prototype" && ts.isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) { // F.prototype = { ... } return 6 /* Prototype */; } @@ -11078,13 +11674,17 @@ var ts; nextToLast = nextToLast.expression; } var id = nextToLast.expression; - if (id.escapedText === "exports" || - id.escapedText === "module" && getElementOrPropertyAccessName(nextToLast) === "exports") { - // exports.name = expr OR module.exports.name = expr + if ((id.escapedText === "exports" || + id.escapedText === "module" && getElementOrPropertyAccessName(nextToLast) === "exports") && + // ExportsProperty does not support binding with computed names + isBindableStaticAccessExpression(lhs)) { + // exports.name = expr OR module.exports.name = expr OR exports["name"] = expr ... return 1 /* ExportsProperty */; } - // F.G...x = expr - return 5 /* Property */; + if (isBindableStaticNameExpression(lhs, /*excludeThisKeyword*/ true) || (ts.isElementAccessExpression(lhs) && isDynamicName(lhs) && lhs.expression.kind !== 103 /* ThisKeyword */)) { + // F.G...x = expr + return 5 /* Property */; + } } return 0 /* None */; } @@ -12406,7 +13006,7 @@ var ts; */ function getExternalModuleNameFromPath(host, fileName, referencePath) { var getCanonicalFileName = function (f) { return host.getCanonicalFileName(f); }; - var dir = toPath(referencePath ? ts.getDirectoryPath(referencePath) : host.getCommonSourceDirectory(), host.getCurrentDirectory(), getCanonicalFileName); + var dir = ts.toPath(referencePath ? ts.getDirectoryPath(referencePath) : host.getCommonSourceDirectory(), host.getCurrentDirectory(), getCanonicalFileName); var filePath = ts.getNormalizedAbsolutePath(fileName, host.getCurrentDirectory()); var relativePath = ts.getRelativePathToDirectoryOrUrl(dir, filePath, dir, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); var extensionless = ts.removeFileExtension(relativePath); @@ -12489,6 +13089,25 @@ var ts; }, sourceFiles); } ts.writeFile = writeFile; + function ensureDirectoriesExist(directoryPath, createDirectory, directoryExists) { + if (directoryPath.length > ts.getRootLength(directoryPath) && !directoryExists(directoryPath)) { + var parentDirectory = ts.getDirectoryPath(directoryPath); + ensureDirectoriesExist(parentDirectory, createDirectory, directoryExists); + createDirectory(directoryPath); + } + } + function writeFileEnsuringDirectories(path, data, writeByteOrderMark, writeFile, createDirectory, directoryExists) { + // PERF: Checking for directory existence is expensive. Instead, assume the directory exists + // and fall back to creating it if the file write fails. + try { + writeFile(path, data, writeByteOrderMark); + } + catch (_a) { + ensureDirectoriesExist(ts.getDirectoryPath(ts.normalizePath(path)), createDirectory, directoryExists); + writeFile(path, data, writeByteOrderMark); + } + } + ts.writeFileEnsuringDirectories = writeFileEnsuringDirectories; function getLineOfLocalPosition(currentSourceFile, pos) { return ts.getLineAndCharacterOfPosition(currentSourceFile, pos).line; } @@ -12928,6 +13547,23 @@ var ts; return node.kind === 75 /* Identifier */ || isPropertyAccessEntityNameExpression(node); } ts.isEntityNameExpression = isEntityNameExpression; + function getFirstIdentifier(node) { + switch (node.kind) { + case 75 /* Identifier */: + return node; + case 152 /* QualifiedName */: + do { + node = node.left; + } while (node.kind !== 75 /* Identifier */); + return node; + case 193 /* PropertyAccessExpression */: + do { + node = node.expression; + } while (node.kind !== 75 /* Identifier */); + return node; + } + } + ts.getFirstIdentifier = getFirstIdentifier; function isDottedName(node) { return node.kind === 75 /* Identifier */ || node.kind === 103 /* ThisKeyword */ || node.kind === 193 /* PropertyAccessExpression */ && isDottedName(node.expression) || @@ -13446,20 +14082,6 @@ var ts; }); } ts.mutateMap = mutateMap; - function forEachAncestorDirectory(directory, callback) { - while (true) { - var result = callback(directory); - if (result !== undefined) { - return result; - } - var parentPath = ts.getDirectoryPath(directory); - if (parentPath === directory) { - return undefined; - } - directory = parentPath; - } - } - ts.forEachAncestorDirectory = forEachAncestorDirectory; // Return true if the given type is the constructor type for an abstract class function isAbstractConstructorType(type) { return !!(getObjectFlags(type) & 16 /* Anonymous */) && !!type.symbol && isAbstractConstructorSymbol(type.symbol); @@ -13486,7 +14108,7 @@ var ts; } ts.typeHasCallOrConstructSignatures = typeHasCallOrConstructSignatures; function forSomeAncestorDirectory(directory, callback) { - return !!forEachAncestorDirectory(directory, function (d) { return callback(d) ? true : undefined; }); + return !!ts.forEachAncestorDirectory(directory, function (d) { return callback(d) ? true : undefined; }); } ts.forSomeAncestorDirectory = forSomeAncestorDirectory; function isUMDExportSymbol(symbol) { @@ -14551,11 +15173,47 @@ var ts; } ts.isCallChain = isCallChain; function isOptionalChain(node) { - return isPropertyAccessChain(node) - || isElementAccessChain(node) - || isCallChain(node); + var kind = node.kind; + return !!(node.flags & 32 /* OptionalChain */) && + (kind === 193 /* PropertyAccessExpression */ + || kind === 194 /* ElementAccessExpression */ + || kind === 195 /* CallExpression */); } ts.isOptionalChain = isOptionalChain; + /* @internal */ + function isOptionalChainRoot(node) { + return isOptionalChain(node) && !!node.questionDotToken; + } + ts.isOptionalChainRoot = isOptionalChainRoot; + /** + * Determines whether a node is the expression preceding an optional chain (i.e. `a` in `a?.b`). + */ + /* @internal */ + function isExpressionOfOptionalChainRoot(node) { + return isOptionalChainRoot(node.parent) && node.parent.expression === node; + } + ts.isExpressionOfOptionalChainRoot = isExpressionOfOptionalChainRoot; + /** + * Determines whether a node is the outermost `OptionalChain` in an ECMAScript `OptionalExpression`: + * + * 1. For `a?.b.c`, the outermost chain is `a?.b.c` (`c` is the end of the chain starting at `a?.`) + * 2. For `(a?.b.c).d`, the outermost chain is `a?.b.c` (`c` is the end of the chain starting at `a?.` since parens end the chain) + * 3. For `a?.b.c?.d`, both `a?.b.c` and `a?.b.c?.d` are outermost (`c` is the end of the chain starting at `a?.`, and `d` is + * the end of the chain starting at `c?.`) + * 4. For `a?.(b?.c).d`, both `b?.c` and `a?.(b?.c)d` are outermost (`c` is the end of the chain starting at `b`, and `d` is + * the end of the chain starting at `a?.`) + */ + /* @internal */ + function isOutermostOptionalChain(node) { + return !isOptionalChain(node.parent) // cases 1 and 2 + || isOptionalChainRoot(node.parent) // case 3 + || node !== node.parent.expression; // case 4 + } + ts.isOutermostOptionalChain = isOutermostOptionalChain; + function isNullishCoalesce(node) { + return node.kind === 208 /* BinaryExpression */ && node.operatorToken.kind === 60 /* QuestionQuestionToken */; + } + ts.isNullishCoalesce = isNullishCoalesce; function isNewExpression(node) { return node.kind === 196 /* NewExpression */; } @@ -15826,11 +16484,6 @@ var ts; return node.kind === 162 /* GetAccessor */; } ts.isGetAccessor = isGetAccessor; - /* @internal */ - function isOptionalChainRoot(node) { - return ts.isOptionalChain(node) && !!node.questionDotToken; - } - ts.isOptionalChainRoot = isOptionalChainRoot; /** True if has jsdoc nodes attached to it. */ /* @internal */ // TODO: GH#19856 Would like to return `node is Node & { jsDoc: JSDoc[] }` but it causes long compile times @@ -15917,7 +16570,12 @@ var ts; this.checker = checker; } } - function Signature() { } + function Signature(checker, flags) { + this.flags = flags; + if (ts.Debug.isDebugging) { + this.checker = checker; + } + } function Node(kind, pos, end) { this.pos = pos; this.end = end; @@ -16192,273 +16850,6 @@ var ts; return true; } ts.hasZeroOrOneAsteriskCharacter = hasZeroOrOneAsteriskCharacter; - /** - * Internally, we represent paths as strings with '/' as the directory separator. - * When we make system calls (eg: LanguageServiceHost.getDirectory()), - * we expect the host to correctly handle paths in our specified format. - */ - ts.directorySeparator = "/"; - var altDirectorySeparator = "\\"; - var urlSchemeSeparator = "://"; - var backslashRegExp = /\\/g; - /** - * Normalize path separators. - */ - function normalizeSlashes(path) { - return path.replace(backslashRegExp, ts.directorySeparator); - } - ts.normalizeSlashes = normalizeSlashes; - function isVolumeCharacter(charCode) { - return (charCode >= 97 /* a */ && charCode <= 122 /* z */) || - (charCode >= 65 /* A */ && charCode <= 90 /* Z */); - } - function getFileUrlVolumeSeparatorEnd(url, start) { - var ch0 = url.charCodeAt(start); - if (ch0 === 58 /* colon */) - return start + 1; - if (ch0 === 37 /* percent */ && url.charCodeAt(start + 1) === 51 /* _3 */) { - var ch2 = url.charCodeAt(start + 2); - if (ch2 === 97 /* a */ || ch2 === 65 /* A */) - return start + 3; - } - return -1; - } - /** - * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). - * If the root is part of a URL, the twos-complement of the root length is returned. - */ - function getEncodedRootLength(path) { - if (!path) - return 0; - var ch0 = path.charCodeAt(0); - // POSIX or UNC - if (ch0 === 47 /* slash */ || ch0 === 92 /* backslash */) { - if (path.charCodeAt(1) !== ch0) - return 1; // POSIX: "/" (or non-normalized "\") - var p1 = path.indexOf(ch0 === 47 /* slash */ ? ts.directorySeparator : altDirectorySeparator, 2); - if (p1 < 0) - return path.length; // UNC: "//server" or "\\server" - return p1 + 1; // UNC: "//server/" or "\\server\" - } - // DOS - if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58 /* colon */) { - var ch2 = path.charCodeAt(2); - if (ch2 === 47 /* slash */ || ch2 === 92 /* backslash */) - return 3; // DOS: "c:/" or "c:\" - if (path.length === 2) - return 2; // DOS: "c:" (but not "c:d") - } - // URL - var schemeEnd = path.indexOf(urlSchemeSeparator); - if (schemeEnd !== -1) { - var authorityStart = schemeEnd + urlSchemeSeparator.length; - var authorityEnd = path.indexOf(ts.directorySeparator, authorityStart); - if (authorityEnd !== -1) { // URL: "file:///", "file://server/", "file://server/path" - // For local "file" URLs, include the leading DOS volume (if present). - // Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a - // special case interpreted as "the machine from which the URL is being interpreted". - var scheme = path.slice(0, schemeEnd); - var authority = path.slice(authorityStart, authorityEnd); - if (scheme === "file" && (authority === "" || authority === "localhost") && - isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) { - var volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2); - if (volumeSeparatorEnd !== -1) { - if (path.charCodeAt(volumeSeparatorEnd) === 47 /* slash */) { - // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/" - return ~(volumeSeparatorEnd + 1); - } - if (volumeSeparatorEnd === path.length) { - // URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a" - // but not "file:///c:d" or "file:///c%3ad" - return ~volumeSeparatorEnd; - } - } - } - return ~(authorityEnd + 1); // URL: "file://server/", "http://server/" - } - return ~path.length; // URL: "file://server", "http://server" - } - // relative - return 0; - } - /** - * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). - * - * For example: - * ```ts - * getRootLength("a") === 0 // "" - * getRootLength("/") === 1 // "/" - * getRootLength("c:") === 2 // "c:" - * getRootLength("c:d") === 0 // "" - * getRootLength("c:/") === 3 // "c:/" - * getRootLength("c:\\") === 3 // "c:\\" - * getRootLength("//server") === 7 // "//server" - * getRootLength("//server/share") === 8 // "//server/" - * getRootLength("\\\\server") === 7 // "\\\\server" - * getRootLength("\\\\server\\share") === 8 // "\\\\server\\" - * getRootLength("file:///path") === 8 // "file:///" - * getRootLength("file:///c:") === 10 // "file:///c:" - * getRootLength("file:///c:d") === 8 // "file:///" - * getRootLength("file:///c:/path") === 11 // "file:///c:/" - * getRootLength("file://server") === 13 // "file://server" - * getRootLength("file://server/path") === 14 // "file://server/" - * getRootLength("http://server") === 13 // "http://server" - * getRootLength("http://server/path") === 14 // "http://server/" - * ``` - */ - function getRootLength(path) { - var rootLength = getEncodedRootLength(path); - return rootLength < 0 ? ~rootLength : rootLength; - } - ts.getRootLength = getRootLength; - // TODO(rbuckton): replace references with `resolvePath` - function normalizePath(path) { - return ts.resolvePath(path); - } - ts.normalizePath = normalizePath; - function normalizePathAndParts(path) { - path = normalizeSlashes(path); - var _a = reducePathComponents(getPathComponents(path)), root = _a[0], parts = _a.slice(1); - if (parts.length) { - var joinedParts = root + parts.join(ts.directorySeparator); - return { path: ts.hasTrailingDirectorySeparator(path) ? ts.ensureTrailingDirectorySeparator(joinedParts) : joinedParts, parts: parts }; - } - else { - return { path: root, parts: parts }; - } - } - ts.normalizePathAndParts = normalizePathAndParts; - function getDirectoryPath(path) { - path = normalizeSlashes(path); - // If the path provided is itself the root, then return it. - var rootLength = getRootLength(path); - if (rootLength === path.length) - return path; - // return the leading portion of the path up to the last (non-terminal) directory separator - // but not including any trailing directory separator. - path = ts.removeTrailingDirectorySeparator(path); - return path.slice(0, Math.max(rootLength, path.lastIndexOf(ts.directorySeparator))); - } - ts.getDirectoryPath = getDirectoryPath; - function startsWithDirectory(fileName, directoryName, getCanonicalFileName) { - var canonicalFileName = getCanonicalFileName(fileName); - var canonicalDirectoryName = getCanonicalFileName(directoryName); - return ts.startsWith(canonicalFileName, canonicalDirectoryName + "/") || ts.startsWith(canonicalFileName, canonicalDirectoryName + "\\"); - } - ts.startsWithDirectory = startsWithDirectory; - function isUrl(path) { - return getEncodedRootLength(path) < 0; - } - ts.isUrl = isUrl; - function pathIsRelative(path) { - return /^\.\.?($|[\\/])/.test(path); - } - ts.pathIsRelative = pathIsRelative; - /** - * Determines whether a path is an absolute path (e.g. starts with `/`, or a dos path - * like `c:`, `c:\` or `c:/`). - */ - function isRootedDiskPath(path) { - return getEncodedRootLength(path) > 0; - } - ts.isRootedDiskPath = isRootedDiskPath; - /** - * Determines whether a path consists only of a path root. - */ - function isDiskPathRoot(path) { - var rootLength = getEncodedRootLength(path); - return rootLength > 0 && rootLength === path.length; - } - ts.isDiskPathRoot = isDiskPathRoot; - function convertToRelativePath(absoluteOrRelativePath, basePath, getCanonicalFileName) { - return !isRootedDiskPath(absoluteOrRelativePath) - ? absoluteOrRelativePath - : ts.getRelativePathToDirectoryOrUrl(basePath, absoluteOrRelativePath, basePath, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); - } - ts.convertToRelativePath = convertToRelativePath; - function pathComponents(path, rootLength) { - var root = path.substring(0, rootLength); - var rest = path.substring(rootLength).split(ts.directorySeparator); - if (rest.length && !ts.lastOrUndefined(rest)) - rest.pop(); - return __spreadArrays([root], rest); - } - /** - * Parse a path into an array containing a root component (at index 0) and zero or more path - * components (at indices > 0). The result is not normalized. - * If the path is relative, the root component is `""`. - * If the path is absolute, the root component includes the first path separator (`/`). - */ - function getPathComponents(path, currentDirectory) { - if (currentDirectory === void 0) { currentDirectory = ""; } - path = ts.combinePaths(currentDirectory, path); - var rootLength = getRootLength(path); - return pathComponents(path, rootLength); - } - ts.getPathComponents = getPathComponents; - /** - * Reduce an array of path components to a more simplified path by navigating any - * `"."` or `".."` entries in the path. - */ - function reducePathComponents(components) { - if (!ts.some(components)) - return []; - var reduced = [components[0]]; - for (var i = 1; i < components.length; i++) { - var component = components[i]; - if (!component) - continue; - if (component === ".") - continue; - if (component === "..") { - if (reduced.length > 1) { - if (reduced[reduced.length - 1] !== "..") { - reduced.pop(); - continue; - } - } - else if (reduced[0]) - continue; - } - reduced.push(component); - } - return reduced; - } - ts.reducePathComponents = reducePathComponents; - /** - * Parse a path into an array containing a root component (at index 0) and zero or more path - * components (at indices > 0). The result is normalized. - * If the path is relative, the root component is `""`. - * If the path is absolute, the root component includes the first path separator (`/`). - */ - function getNormalizedPathComponents(path, currentDirectory) { - return reducePathComponents(getPathComponents(path, currentDirectory)); - } - ts.getNormalizedPathComponents = getNormalizedPathComponents; - function getNormalizedAbsolutePath(fileName, currentDirectory) { - return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory)); - } - ts.getNormalizedAbsolutePath = getNormalizedAbsolutePath; - /** - * Formats a parsed path consisting of a root component (at index 0) and zero or more path - * segments (at indices > 0). - */ - function getPathFromPathComponents(pathComponents) { - if (pathComponents.length === 0) - return ""; - var root = pathComponents[0] && ts.ensureTrailingDirectorySeparator(pathComponents[0]); - return root + pathComponents.slice(1).join(ts.directorySeparator); - } - ts.getPathFromPathComponents = getPathFromPathComponents; - function getNormalizedAbsolutePathWithoutRoot(fileName, currentDirectory) { - return getPathWithoutRoot(getNormalizedPathComponents(fileName, currentDirectory)); - } - ts.getNormalizedAbsolutePathWithoutRoot = getNormalizedAbsolutePathWithoutRoot; - function getPathWithoutRoot(pathComponents) { - if (pathComponents.length === 0) - return ""; - return pathComponents.slice(1).join(ts.directorySeparator); - } function discoverProbableSymlinks(files, getCanonicalFileName, cwd) { var result = ts.createMap(); var symlinks = ts.flatten(ts.mapDefined(files, function (sf) { @@ -16475,15 +16866,15 @@ var ts; } ts.discoverProbableSymlinks = discoverProbableSymlinks; function guessDirectorySymlink(a, b, cwd, getCanonicalFileName) { - var aParts = getPathComponents(ts.toPath(a, cwd, getCanonicalFileName)); - var bParts = getPathComponents(ts.toPath(b, cwd, getCanonicalFileName)); + var aParts = ts.getPathComponents(ts.toPath(a, cwd, getCanonicalFileName)); + var bParts = ts.getPathComponents(ts.toPath(b, cwd, getCanonicalFileName)); while (!isNodeModulesOrScopedPackageDirectory(aParts[aParts.length - 2], getCanonicalFileName) && !isNodeModulesOrScopedPackageDirectory(bParts[bParts.length - 2], getCanonicalFileName) && getCanonicalFileName(aParts[aParts.length - 1]) === getCanonicalFileName(bParts[bParts.length - 1])) { aParts.pop(); bParts.pop(); } - return [getPathFromPathComponents(aParts), getPathFromPathComponents(bParts)]; + return [ts.getPathFromPathComponents(aParts), ts.getPathFromPathComponents(bParts)]; } // KLUDGE: Don't assume one 'node_modules' links to another. More likely a single directory inside the node_modules is the symlink. // ALso, don't assume that an `@foo` directory is linked. More likely the contents of that are linked. @@ -16493,229 +16884,8 @@ var ts; })(ts || (ts = {})); /* @internal */ (function (ts) { - function getPathComponentsRelativeTo(from, to, stringEqualityComparer, getCanonicalFileName) { - var fromComponents = ts.reducePathComponents(ts.getPathComponents(from)); - var toComponents = ts.reducePathComponents(ts.getPathComponents(to)); - var start; - for (start = 0; start < fromComponents.length && start < toComponents.length; start++) { - var fromComponent = getCanonicalFileName(fromComponents[start]); - var toComponent = getCanonicalFileName(toComponents[start]); - var comparer = start === 0 ? ts.equateStringsCaseInsensitive : stringEqualityComparer; - if (!comparer(fromComponent, toComponent)) - break; - } - if (start === 0) { - return toComponents; - } - var components = toComponents.slice(start); - var relative = []; - for (; start < fromComponents.length; start++) { - relative.push(".."); - } - return __spreadArrays([""], relative, components); - } - ts.getPathComponentsRelativeTo = getPathComponentsRelativeTo; - function getRelativePathFromFile(from, to, getCanonicalFileName) { - return ensurePathIsNonModuleName(getRelativePathFromDirectory(ts.getDirectoryPath(from), to, getCanonicalFileName)); - } - ts.getRelativePathFromFile = getRelativePathFromFile; - function getRelativePathFromDirectory(fromDirectory, to, getCanonicalFileNameOrIgnoreCase) { - ts.Debug.assert((ts.getRootLength(fromDirectory) > 0) === (ts.getRootLength(to) > 0), "Paths must either both be absolute or both be relative"); - var getCanonicalFileName = typeof getCanonicalFileNameOrIgnoreCase === "function" ? getCanonicalFileNameOrIgnoreCase : ts.identity; - var ignoreCase = typeof getCanonicalFileNameOrIgnoreCase === "boolean" ? getCanonicalFileNameOrIgnoreCase : false; - var pathComponents = getPathComponentsRelativeTo(fromDirectory, to, ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive, getCanonicalFileName); - return ts.getPathFromPathComponents(pathComponents); - } - ts.getRelativePathFromDirectory = getRelativePathFromDirectory; - function getRelativePathToDirectoryOrUrl(directoryPathOrUrl, relativeOrAbsolutePath, currentDirectory, getCanonicalFileName, isAbsolutePathAnUrl) { - var pathComponents = getPathComponentsRelativeTo(resolvePath(currentDirectory, directoryPathOrUrl), resolvePath(currentDirectory, relativeOrAbsolutePath), ts.equateStringsCaseSensitive, getCanonicalFileName); - var firstComponent = pathComponents[0]; - if (isAbsolutePathAnUrl && ts.isRootedDiskPath(firstComponent)) { - var prefix = firstComponent.charAt(0) === ts.directorySeparator ? "file://" : "file:///"; - pathComponents[0] = prefix + firstComponent; - } - return ts.getPathFromPathComponents(pathComponents); - } - ts.getRelativePathToDirectoryOrUrl = getRelativePathToDirectoryOrUrl; - /** - * Ensures a path is either absolute (prefixed with `/` or `c:`) or dot-relative (prefixed - * with `./` or `../`) so as not to be confused with an unprefixed module name. - */ - function ensurePathIsNonModuleName(path) { - return ts.getRootLength(path) === 0 && !ts.pathIsRelative(path) ? "./" + path : path; - } - ts.ensurePathIsNonModuleName = ensurePathIsNonModuleName; - function getBaseFileName(path, extensions, ignoreCase) { - path = ts.normalizeSlashes(path); - // if the path provided is itself the root, then it has not file name. - var rootLength = ts.getRootLength(path); - if (rootLength === path.length) - return ""; - // return the trailing portion of the path starting after the last (non-terminal) directory - // separator but not including any trailing directory separator. - path = removeTrailingDirectorySeparator(path); - var name = path.slice(Math.max(ts.getRootLength(path), path.lastIndexOf(ts.directorySeparator) + 1)); - var extension = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(name, extensions, ignoreCase) : undefined; - return extension ? name.slice(0, name.length - extension.length) : name; - } - ts.getBaseFileName = getBaseFileName; - /** - * Combines paths. If a path is absolute, it replaces any previous path. - */ - function combinePaths(path) { - var paths = []; - for (var _i = 1; _i < arguments.length; _i++) { - paths[_i - 1] = arguments[_i]; - } - if (path) - path = ts.normalizeSlashes(path); - for (var _a = 0, paths_1 = paths; _a < paths_1.length; _a++) { - var relativePath = paths_1[_a]; - if (!relativePath) - continue; - relativePath = ts.normalizeSlashes(relativePath); - if (!path || ts.getRootLength(relativePath) !== 0) { - path = relativePath; - } - else { - path = ensureTrailingDirectorySeparator(path) + relativePath; - } - } - return path; - } - ts.combinePaths = combinePaths; - /** - * Combines and resolves paths. If a path is absolute, it replaces any previous path. Any - * `.` and `..` path components are resolved. - */ - function resolvePath(path) { - var paths = []; - for (var _i = 1; _i < arguments.length; _i++) { - paths[_i - 1] = arguments[_i]; - } - var combined = ts.some(paths) ? combinePaths.apply(void 0, __spreadArrays([path], paths)) : ts.normalizeSlashes(path); - var normalized = ts.getPathFromPathComponents(ts.reducePathComponents(ts.getPathComponents(combined))); - return normalized && hasTrailingDirectorySeparator(combined) ? ensureTrailingDirectorySeparator(normalized) : normalized; - } - ts.resolvePath = resolvePath; - /** - * Determines whether a path has a trailing separator (`/` or `\\`). - */ - function hasTrailingDirectorySeparator(path) { - if (path.length === 0) - return false; - var ch = path.charCodeAt(path.length - 1); - return ch === 47 /* slash */ || ch === 92 /* backslash */; - } - ts.hasTrailingDirectorySeparator = hasTrailingDirectorySeparator; - function removeTrailingDirectorySeparator(path) { - if (hasTrailingDirectorySeparator(path)) { - return path.substr(0, path.length - 1); - } - return path; - } - ts.removeTrailingDirectorySeparator = removeTrailingDirectorySeparator; - function ensureTrailingDirectorySeparator(path) { - if (!hasTrailingDirectorySeparator(path)) { - return path + ts.directorySeparator; - } - return path; - } - ts.ensureTrailingDirectorySeparator = ensureTrailingDirectorySeparator; - // check path for these segments: '', '.'. '..' - var relativePathSegmentRegExp = /(^|\/)\.{0,2}($|\/)/; - function comparePathsWorker(a, b, componentComparer) { - if (a === b) - return 0 /* EqualTo */; - if (a === undefined) - return -1 /* LessThan */; - if (b === undefined) - return 1 /* GreaterThan */; - // NOTE: Performance optimization - shortcut if the root segments differ as there would be no - // need to perform path reduction. - var aRoot = a.substring(0, ts.getRootLength(a)); - var bRoot = b.substring(0, ts.getRootLength(b)); - var result = ts.compareStringsCaseInsensitive(aRoot, bRoot); - if (result !== 0 /* EqualTo */) { - return result; - } - // NOTE: Performance optimization - shortcut if there are no relative path segments in - // the non-root portion of the path - var aRest = a.substring(aRoot.length); - var bRest = b.substring(bRoot.length); - if (!relativePathSegmentRegExp.test(aRest) && !relativePathSegmentRegExp.test(bRest)) { - return componentComparer(aRest, bRest); - } - // The path contains a relative path segment. Normalize the paths and perform a slower component - // by component comparison. - var aComponents = ts.reducePathComponents(ts.getPathComponents(a)); - var bComponents = ts.reducePathComponents(ts.getPathComponents(b)); - var sharedLength = Math.min(aComponents.length, bComponents.length); - for (var i = 1; i < sharedLength; i++) { - var result_1 = componentComparer(aComponents[i], bComponents[i]); - if (result_1 !== 0 /* EqualTo */) { - return result_1; - } - } - return ts.compareValues(aComponents.length, bComponents.length); - } - /** - * Performs a case-sensitive comparison of two paths. - */ - function comparePathsCaseSensitive(a, b) { - return comparePathsWorker(a, b, ts.compareStringsCaseSensitive); - } - ts.comparePathsCaseSensitive = comparePathsCaseSensitive; - /** - * Performs a case-insensitive comparison of two paths. - */ - function comparePathsCaseInsensitive(a, b) { - return comparePathsWorker(a, b, ts.compareStringsCaseInsensitive); - } - ts.comparePathsCaseInsensitive = comparePathsCaseInsensitive; - function comparePaths(a, b, currentDirectory, ignoreCase) { - if (typeof currentDirectory === "string") { - a = combinePaths(currentDirectory, a); - b = combinePaths(currentDirectory, b); - } - else if (typeof currentDirectory === "boolean") { - ignoreCase = currentDirectory; - } - return comparePathsWorker(a, b, ts.getStringComparer(ignoreCase)); - } - ts.comparePaths = comparePaths; - function containsPath(parent, child, currentDirectory, ignoreCase) { - if (typeof currentDirectory === "string") { - parent = combinePaths(currentDirectory, parent); - child = combinePaths(currentDirectory, child); - } - else if (typeof currentDirectory === "boolean") { - ignoreCase = currentDirectory; - } - if (parent === undefined || child === undefined) - return false; - if (parent === child) - return true; - var parentComponents = ts.reducePathComponents(ts.getPathComponents(parent)); - var childComponents = ts.reducePathComponents(ts.getPathComponents(child)); - if (childComponents.length < parentComponents.length) { - return false; - } - var componentEqualityComparer = ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive; - for (var i = 0; i < parentComponents.length; i++) { - var equalityComparer = i === 0 ? ts.equateStringsCaseInsensitive : componentEqualityComparer; - if (!equalityComparer(parentComponents[i], childComponents[i])) { - return false; - } - } - return true; - } - ts.containsPath = containsPath; - function isDirectorySeparator(charCode) { - return charCode === 47 /* slash */ || charCode === 92 /* backslash */; - } function stripLeadingDirectorySeparator(s) { - return isDirectorySeparator(s.charCodeAt(0)) ? s.slice(1) : undefined; + return ts.isAnyDirectorySeparator(s.charCodeAt(0)) ? s.slice(1) : undefined; } function tryRemoveDirectoryPrefix(path, dirPath, getCanonicalFileName) { var withoutPrefix = ts.tryRemovePrefix(path, dirPath, getCanonicalFileName); @@ -16734,10 +16904,6 @@ var ts; return "\\" + match; } var wildcardCharCodes = [42 /* asterisk */, 63 /* question */]; - function hasExtension(fileName) { - return ts.stringContains(getBaseFileName(fileName), "."); - } - ts.hasExtension = hasExtension; ts.commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"]; var implicitExcludePathRegexPattern = "(?!(" + ts.commonPackageFolders.join("|") + ")(/|$))"; var filesMatcher = { @@ -16813,7 +16979,7 @@ var ts; } // getNormalizedPathComponents includes the separator for the root component. // We need to remove to create our regex correctly. - components[0] = removeTrailingDirectorySeparator(components[0]); + components[0] = ts.removeTrailingDirectorySeparator(components[0]); if (isImplicitGlob(lastComponent)) { components.push("**", "*"); } @@ -16875,7 +17041,7 @@ var ts; function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory) { path = ts.normalizePath(path); currentDirectory = ts.normalizePath(currentDirectory); - var absolutePath = combinePaths(currentDirectory, path); + var absolutePath = ts.combinePaths(currentDirectory, path); return { includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^" + pattern + "$"; }), includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"), @@ -16904,7 +17070,7 @@ var ts; var toCanonical = ts.createGetCanonicalFileName(useCaseSensitiveFileNames); for (var _i = 0, _a = patterns.basePaths; _i < _a.length; _i++) { var basePath = _a[_i]; - visitDirectory(basePath, combinePaths(currentDirectory, basePath), depth); + visitDirectory(basePath, ts.combinePaths(currentDirectory, basePath), depth); } return ts.flatten(results); function visitDirectory(path, absolutePath, depth) { @@ -16914,8 +17080,8 @@ var ts; visited.set(canonicalPath, true); var _a = getFileSystemEntries(path), files = _a.files, directories = _a.directories; var _loop_1 = function (current) { - var name = combinePaths(path, current); - var absoluteName = combinePaths(absolutePath, current); + var name = ts.combinePaths(path, current); + var absoluteName = ts.combinePaths(absolutePath, current); if (extensions && !ts.fileExtensionIsOneOf(name, extensions)) return "continue"; if (excludeRegex && excludeRegex.test(absoluteName)) @@ -16942,8 +17108,8 @@ var ts; } for (var _c = 0, _d = ts.sort(directories, ts.compareStringsCaseSensitive); _c < _d.length; _c++) { var current = _d[_c]; - var name = combinePaths(path, current); - var absoluteName = combinePaths(absolutePath, current); + var name = ts.combinePaths(path, current); + var absoluteName = ts.combinePaths(absolutePath, current); if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) && (!excludeRegex || !excludeRegex.test(absoluteName))) { visitDirectory(name, absoluteName, depth); @@ -16965,14 +17131,14 @@ var ts; var include = includes_1[_i]; // We also need to check the relative paths by converting them to absolute and normalizing // in case they escape the base path (e.g "..\somedirectory") - var absolute = ts.isRootedDiskPath(include) ? include : ts.normalizePath(combinePaths(path, include)); + var absolute = ts.isRootedDiskPath(include) ? include : ts.normalizePath(ts.combinePaths(path, include)); // Append the literal and canonical candidate base paths. includeBasePaths.push(getIncludeBasePath(absolute)); } // Sort the offsets array using either the literal or canonical path representations. includeBasePaths.sort(ts.getStringComparer(!useCaseSensitiveFileNames)); var _loop_2 = function (includeBasePath) { - if (ts.every(basePaths, function (basePath) { return !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames); })) { + if (ts.every(basePaths, function (basePath) { return !ts.containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames); })) { basePaths.push(includeBasePath); } }; @@ -16989,9 +17155,9 @@ var ts; var wildcardOffset = ts.indexOfAnyCharCode(absolute, wildcardCharCodes); if (wildcardOffset < 0) { // No "*" or "?" in the path - return !hasExtension(absolute) + return !ts.hasExtension(absolute) ? absolute - : removeTrailingDirectorySeparator(ts.getDirectoryPath(absolute)); + : ts.removeTrailingDirectorySeparator(ts.getDirectoryPath(absolute)); } return absolute.substring(0, absolute.lastIndexOf(ts.directorySeparator, wildcardOffset)); } @@ -17063,10 +17229,6 @@ var ts; return ts.some(ts.supportedJSExtensions, function (extension) { return ts.fileExtensionIs(fileName, extension); }); } ts.hasJSFileExtension = hasJSFileExtension; - function hasJSOrJsonFileExtension(fileName) { - return ts.supportedJSAndJsonExtensions.some(function (ext) { return ts.fileExtensionIs(fileName, ext); }); - } - ts.hasJSOrJsonFileExtension = hasJSOrJsonFileExtension; function hasTSFileExtension(fileName) { return ts.some(ts.supportedTSExtensions, function (extension) { return ts.fileExtensionIs(fileName, extension); }); } @@ -17156,14 +17318,9 @@ var ts; } ts.removeExtension = removeExtension; function changeExtension(path, newExtension) { - return changeAnyExtension(path, newExtension, extensionsToRemove, /*ignoreCase*/ false); + return ts.changeAnyExtension(path, newExtension, extensionsToRemove, /*ignoreCase*/ false); } ts.changeExtension = changeExtension; - function changeAnyExtension(path, ext, extensions, ignoreCase) { - var pathext = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(path, extensions, ignoreCase) : getAnyExtensionFromPath(path); - return pathext ? path.slice(0, path.length - pathext.length) + (ts.startsWith(ext, ".") ? ext : "." + ext) : path; - } - ts.changeAnyExtension = changeAnyExtension; function tryParsePattern(pattern) { // This should be verified outside of here and a proper error thrown. ts.Debug.assert(ts.hasZeroOrOneAsteriskCharacter(pattern)); @@ -17206,36 +17363,6 @@ var ts; return ts.find(extensionsToRemove, function (e) { return ts.fileExtensionIs(path, e); }); } ts.tryGetExtensionFromPath = tryGetExtensionFromPath; - function getAnyExtensionFromPathWorker(path, extensions, stringEqualityComparer) { - if (typeof extensions === "string") - extensions = [extensions]; - for (var _i = 0, extensions_2 = extensions; _i < extensions_2.length; _i++) { - var extension = extensions_2[_i]; - if (!ts.startsWith(extension, ".")) - extension = "." + extension; - if (path.length >= extension.length && path.charAt(path.length - extension.length) === ".") { - var pathExtension = path.slice(path.length - extension.length); - if (stringEqualityComparer(pathExtension, extension)) { - return pathExtension; - } - } - } - return ""; - } - function getAnyExtensionFromPath(path, extensions, ignoreCase) { - // Retrieves any string from the final "." onwards from a base file name. - // Unlike extensionFromPath, which throws an exception on unrecognized extensions. - if (extensions) { - return getAnyExtensionFromPathWorker(path, extensions, ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive); - } - var baseFileName = getBaseFileName(path); - var extensionIndex = baseFileName.lastIndexOf("."); - if (extensionIndex >= 0) { - return baseFileName.substring(extensionIndex); - } - return ""; - } - ts.getAnyExtensionFromPath = getAnyExtensionFromPath; function isCheckJsEnabledForFile(sourceFile, compilerOptions) { return sourceFile.checkJsDirective ? sourceFile.checkJsDirective.enabled : compilerOptions.checkJs; } @@ -18443,6 +18570,9 @@ var ts; function doInYieldAndAwaitContext(func) { return doInsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */, func); } + function doOutsideOfYieldAndAwaitContext(func) { + return doOutsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */, func); + } function inContext(flags) { return (contextFlags & flags) !== 0; } @@ -22714,18 +22844,7 @@ var ts; node.exclamationToken = parseTokenNode(); } node.type = parseTypeAnnotation(); - // For instance properties specifically, since they are evaluated inside the constructor, - // we do *not * want to parse yield expressions, so we specifically turn the yield context - // off. The grammar would look something like this: - // - // MemberVariableDeclaration[Yield]: - // AccessibilityModifier_opt PropertyName TypeAnnotation_opt Initializer_opt[In]; - // AccessibilityModifier_opt static_opt PropertyName TypeAnnotation_opt Initializer_opt[In, ?Yield]; - // - // The checker may still error in the static case to explicitly disallow the yield expression. - node.initializer = ts.hasModifier(node, 32 /* Static */) - ? allowInAnd(parseInitializer) - : doOutsideOfContext(8192 /* YieldContext */ | 4096 /* DisallowInContext */, parseInitializer); + node.initializer = doOutsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */ | 4096 /* DisallowInContext */, parseInitializer); parseSemicolon(); return finishNode(node); } @@ -23016,7 +23135,7 @@ var ts; parseExpected(87 /* EnumKeyword */); node.name = parseIdentifier(); if (parseExpected(18 /* OpenBraceToken */)) { - node.members = parseDelimitedList(6 /* EnumMembers */, parseEnumMember); + node.members = doOutsideOfYieldAndAwaitContext(function () { return parseDelimitedList(6 /* EnumMembers */, parseEnumMember); }); parseExpected(19 /* CloseBraceToken */); } else { @@ -25078,6 +25197,15 @@ var ts; isCommandLineOnly: true, description: ts.Diagnostics.Print_the_final_configuration_instead_of_building }, + { + name: "listFilesOnly", + type: "boolean", + category: ts.Diagnostics.Command_line_Options, + affectsSemanticDiagnostics: true, + affectsEmit: true, + isCommandLineOnly: true, + description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing + }, // Basic { name: "target", @@ -25909,8 +26037,7 @@ var ts; } } ts.parseListTypeOption = parseListTypeOption; - function parseCommandLineWorker(getOptionNameMap, _a, commandLine, readFile) { - var unknownOptionDiagnostic = _a[0], optionTypeMismatchDiagnostic = _a[1]; + function parseCommandLineWorker(getOptionNameMap, diagnostics, commandLine, readFile) { var options = {}; var fileNames = []; var errors = []; @@ -25937,7 +26064,7 @@ var ts; else { // Check to see if no argument was provided (e.g. "--locale" is the last command-line argument). if (!args[i] && opt.type !== "boolean") { - errors.push(ts.createCompilerDiagnostic(optionTypeMismatchDiagnostic, opt.name)); + errors.push(ts.createCompilerDiagnostic(diagnostics.optionTypeMismatchDiagnostic, opt.name)); } switch (opt.type) { case "number": @@ -25973,7 +26100,13 @@ var ts; } } else { - errors.push(ts.createCompilerDiagnostic(unknownOptionDiagnostic, s)); + var possibleOption = ts.getSpellingSuggestion(s, ts.optionDeclarations, function (opt) { return "--" + opt.name; }); + if (possibleOption) { + errors.push(ts.createCompilerDiagnostic(diagnostics.unknownDidYouMeanDiagnostic, s, possibleOption.name)); + } + else { + errors.push(ts.createCompilerDiagnostic(diagnostics.unknownOptionDiagnostic, s)); + } } } else { @@ -26016,11 +26149,13 @@ var ts; parseStrings(args); } } + var compilerOptionsDefaultDiagnostics = { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_compiler_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_compiler_option_0_Did_you_mean_1, + optionTypeMismatchDiagnostic: ts.Diagnostics.Compiler_option_0_expects_an_argument + }; function parseCommandLine(commandLine, readFile) { - return parseCommandLineWorker(getOptionNameMap, [ - ts.Diagnostics.Unknown_compiler_option_0, - ts.Diagnostics.Compiler_option_0_expects_an_argument - ], commandLine, readFile); + return parseCommandLineWorker(getOptionNameMap, compilerOptionsDefaultDiagnostics, commandLine, readFile); } ts.parseCommandLine = parseCommandLine; /** @internal */ @@ -26045,10 +26180,11 @@ var ts; function parseBuildCommand(args) { var buildOptionNameMap; var returnBuildOptionNameMap = function () { return (buildOptionNameMap || (buildOptionNameMap = createOptionNameMap(ts.buildOpts))); }; - var _a = parseCommandLineWorker(returnBuildOptionNameMap, [ - ts.Diagnostics.Unknown_build_option_0, - ts.Diagnostics.Build_option_0_requires_a_value_of_type_1 - ], args), options = _a.options, projects = _a.fileNames, errors = _a.errors; + var _a = parseCommandLineWorker(returnBuildOptionNameMap, { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_build_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_build_option_0_Did_you_mean_1, + optionTypeMismatchDiagnostic: ts.Diagnostics.Build_option_0_requires_a_value_of_type_1 + }, args), options = _a.options, projects = _a.fileNames, errors = _a.errors; var buildOptions = options; if (projects.length === 0) { // tsc -b invoked with no extra arguments; act as if invoked with "tsc -b ." @@ -26070,6 +26206,7 @@ var ts; return { buildOptions: buildOptions, projects: projects, errors: errors }; } ts.parseBuildCommand = parseBuildCommand; + /* @internal */ function getDiagnosticText(_message) { var _args = []; for (var _i = 1; _i < arguments.length; _i++) { @@ -26078,104 +26215,7 @@ var ts; var diagnostic = ts.createCompilerDiagnostic.apply(undefined, arguments); return diagnostic.messageText; } - /* @internal */ - function printVersion() { - ts.sys.write(getDiagnosticText(ts.Diagnostics.Version_0, ts.version) + ts.sys.newLine); - } - ts.printVersion = printVersion; - /* @internal */ - function printHelp(optionsList, syntaxPrefix) { - if (syntaxPrefix === void 0) { syntaxPrefix = ""; } - var output = []; - // We want to align our "syntax" and "examples" commands to a certain margin. - var syntaxLength = getDiagnosticText(ts.Diagnostics.Syntax_Colon_0, "").length; - var examplesLength = getDiagnosticText(ts.Diagnostics.Examples_Colon_0, "").length; - var marginLength = Math.max(syntaxLength, examplesLength); - // Build up the syntactic skeleton. - var syntax = makePadding(marginLength - syntaxLength); - syntax += "tsc " + syntaxPrefix + "[" + getDiagnosticText(ts.Diagnostics.options) + "] [" + getDiagnosticText(ts.Diagnostics.file) + "...]"; - output.push(getDiagnosticText(ts.Diagnostics.Syntax_Colon_0, syntax)); - output.push(ts.sys.newLine + ts.sys.newLine); - // Build up the list of examples. - var padding = makePadding(marginLength); - output.push(getDiagnosticText(ts.Diagnostics.Examples_Colon_0, makePadding(marginLength - examplesLength) + "tsc hello.ts") + ts.sys.newLine); - output.push(padding + "tsc --outFile file.js file.ts" + ts.sys.newLine); - output.push(padding + "tsc @args.txt" + ts.sys.newLine); - output.push(padding + "tsc --build tsconfig.json" + ts.sys.newLine); - output.push(ts.sys.newLine); - output.push(getDiagnosticText(ts.Diagnostics.Options_Colon) + ts.sys.newLine); - // We want our descriptions to align at the same column in our output, - // so we keep track of the longest option usage string. - marginLength = 0; - var usageColumn = []; // Things like "-d, --declaration" go in here. - var descriptionColumn = []; - var optionsDescriptionMap = ts.createMap(); // Map between option.description and list of option.type if it is a kind - for (var _i = 0, optionsList_1 = optionsList; _i < optionsList_1.length; _i++) { - var option = optionsList_1[_i]; - // If an option lacks a description, - // it is not officially supported. - if (!option.description) { - continue; - } - var usageText_1 = " "; - if (option.shortName) { - usageText_1 += "-" + option.shortName; - usageText_1 += getParamType(option); - usageText_1 += ", "; - } - usageText_1 += "--" + option.name; - usageText_1 += getParamType(option); - usageColumn.push(usageText_1); - var description = void 0; - if (option.name === "lib") { - description = getDiagnosticText(option.description); - var element = option.element; - var typeMap = element.type; - optionsDescriptionMap.set(description, ts.arrayFrom(typeMap.keys()).map(function (key) { return "'" + key + "'"; })); - } - else { - description = getDiagnosticText(option.description); - } - descriptionColumn.push(description); - // Set the new margin for the description column if necessary. - marginLength = Math.max(usageText_1.length, marginLength); - } - // Special case that can't fit in the loop. - var usageText = " @<" + getDiagnosticText(ts.Diagnostics.file) + ">"; - usageColumn.push(usageText); - descriptionColumn.push(getDiagnosticText(ts.Diagnostics.Insert_command_line_options_and_files_from_a_file)); - marginLength = Math.max(usageText.length, marginLength); - // Print out each row, aligning all the descriptions on the same column. - for (var i = 0; i < usageColumn.length; i++) { - var usage = usageColumn[i]; - var description = descriptionColumn[i]; - var kindsList = optionsDescriptionMap.get(description); - output.push(usage + makePadding(marginLength - usage.length + 2) + description + ts.sys.newLine); - if (kindsList) { - output.push(makePadding(marginLength + 4)); - for (var _a = 0, kindsList_1 = kindsList; _a < kindsList_1.length; _a++) { - var kind = kindsList_1[_a]; - output.push(kind + " "); - } - output.push(ts.sys.newLine); - } - } - for (var _b = 0, output_1 = output; _b < output_1.length; _b++) { - var line = output_1[_b]; - ts.sys.write(line); - } - return; - function getParamType(option) { - if (option.paramType !== undefined) { - return " " + getDiagnosticText(option.paramType); - } - return ""; - } - function makePadding(paddingLength) { - return Array(paddingLength + 1).join(" "); - } - } - ts.printHelp = printHelp; + ts.getDiagnosticText = getDiagnosticText; /** * Reads the config file, reports errors if any and exits if the config file cannot be found */ @@ -26259,19 +26299,28 @@ var ts; name: "compilerOptions", type: "object", elementOptions: commandLineOptionsToMap(ts.optionDeclarations), - extraKeyDiagnosticMessage: ts.Diagnostics.Unknown_compiler_option_0 + extraKeyDiagnostics: { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_compiler_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_compiler_option_0_Did_you_mean_1 + }, }, { name: "typingOptions", type: "object", elementOptions: commandLineOptionsToMap(ts.typeAcquisitionDeclarations), - extraKeyDiagnosticMessage: ts.Diagnostics.Unknown_type_acquisition_option_0 + extraKeyDiagnostics: { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1 + }, }, { name: "typeAcquisition", type: "object", elementOptions: commandLineOptionsToMap(ts.typeAcquisitionDeclarations), - extraKeyDiagnosticMessage: ts.Diagnostics.Unknown_type_acquisition_option_0 + extraKeyDiagnostics: { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1 + } }, { name: "extends", @@ -26336,7 +26385,7 @@ var ts; function isRootOptionMap(knownOptions) { return knownRootOptions && knownRootOptions.elementOptions === knownOptions; } - function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnosticMessage, parentOption) { + function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnostics, parentOption) { var result = returnValue ? {} : undefined; for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var element = _a[_i]; @@ -26353,8 +26402,19 @@ var ts; var textOfKey = ts.getTextOfPropertyName(element.name); var keyText = textOfKey && ts.unescapeLeadingUnderscores(textOfKey); var option = keyText && knownOptions ? knownOptions.get(keyText) : undefined; - if (keyText && extraKeyDiagnosticMessage && !option) { - errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnosticMessage, keyText)); + if (keyText && extraKeyDiagnostics && !option) { + if (knownOptions) { + var possibleOption = ts.getSpellingSuggestion(keyText, ts.arrayFrom(knownOptions.keys()), ts.identity); + if (possibleOption) { + errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnostics.unknownDidYouMeanDiagnostic, keyText, possibleOption)); + } + else { + errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnostics.unknownOptionDiagnostic, keyText)); + } + } + else { + errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnostics.unknownOptionDiagnostic, keyText)); + } } var value = convertPropertyValueToJson(element.initializer, option); if (typeof keyText !== "undefined") { @@ -26438,8 +26498,8 @@ var ts; // vs what we set in the json // If need arises, we can modify this interface and callbacks as needed if (option) { - var _a = option, elementOptions = _a.elementOptions, extraKeyDiagnosticMessage = _a.extraKeyDiagnosticMessage, optionName = _a.name; - return convertObjectLiteralExpressionToJson(objectLiteralExpression, elementOptions, extraKeyDiagnosticMessage, optionName); + var _a = option, elementOptions = _a.elementOptions, extraKeyDiagnostics = _a.extraKeyDiagnostics, optionName = _a.name; + return convertObjectLiteralExpressionToJson(objectLiteralExpression, elementOptions, extraKeyDiagnostics, optionName); } else { return convertObjectLiteralExpressionToJson(objectLiteralExpression, /* knownOptions*/ undefined, @@ -26494,7 +26554,7 @@ var ts; /** @internal */ function convertToTSConfig(configParseResult, configFileName, host) { var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames); - var files = ts.map(ts.filter(configParseResult.fileNames, (!configParseResult.configFileSpecs || !configParseResult.configFileSpecs.validatedIncludeSpecs) ? function (_) { return true; } : matchesSpecs(configFileName, configParseResult.configFileSpecs.validatedIncludeSpecs, configParseResult.configFileSpecs.validatedExcludeSpecs)), function (f) { return ts.getRelativePathFromFile(ts.getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), ts.getNormalizedAbsolutePath(f, host.getCurrentDirectory()), getCanonicalFileName); }); + var files = ts.map(ts.filter(configParseResult.fileNames, (!configParseResult.configFileSpecs || !configParseResult.configFileSpecs.validatedIncludeSpecs) ? function (_) { return true; } : matchesSpecs(configFileName, configParseResult.configFileSpecs.validatedIncludeSpecs, configParseResult.configFileSpecs.validatedExcludeSpecs, host)), function (f) { return ts.getRelativePathFromFile(ts.getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), ts.getNormalizedAbsolutePath(f, host.getCurrentDirectory()), getCanonicalFileName); }); var optionMap = serializeCompilerOptions(configParseResult.options, { configFilePath: ts.getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), useCaseSensitiveFileNames: host.useCaseSensitiveFileNames }); var config = __assign(__assign({ compilerOptions: __assign(__assign({}, ts.arrayFrom(optionMap.entries()).reduce(function (prev, cur) { var _a; @@ -26515,12 +26575,12 @@ var ts; return undefined; return specs; } - function matchesSpecs(path, includeSpecs, excludeSpecs) { + function matchesSpecs(path, includeSpecs, excludeSpecs, host) { if (!includeSpecs) return function (_) { return true; }; - var patterns = ts.getFileMatcherPatterns(path, excludeSpecs, includeSpecs, ts.sys.useCaseSensitiveFileNames, ts.sys.getCurrentDirectory()); - var excludeRe = patterns.excludePattern && ts.getRegexFromPattern(patterns.excludePattern, ts.sys.useCaseSensitiveFileNames); - var includeRe = patterns.includeFilePattern && ts.getRegexFromPattern(patterns.includeFilePattern, ts.sys.useCaseSensitiveFileNames); + var patterns = ts.getFileMatcherPatterns(path, excludeSpecs, includeSpecs, host.useCaseSensitiveFileNames, host.getCurrentDirectory()); + var excludeRe = patterns.excludePattern && ts.getRegexFromPattern(patterns.excludePattern, host.useCaseSensitiveFileNames); + var includeRe = patterns.includeFilePattern && ts.getRegexFromPattern(patterns.includeFilePattern, host.useCaseSensitiveFileNames); if (includeRe) { if (excludeRe) { return function (path) { return !(includeRe.test(path) && !excludeRe.test(path)); }; @@ -26697,6 +26757,35 @@ var ts; } } ts.generateTSConfig = generateTSConfig; + /* @internal */ + function convertToOptionsWithAbsolutePaths(options, toAbsolutePath) { + var result = {}; + var optionsNameMap = getOptionNameMap().optionNameMap; + for (var name in options) { + if (ts.hasProperty(options, name)) { + result[name] = convertToOptionValueWithAbsolutePaths(optionsNameMap.get(name.toLowerCase()), options[name], toAbsolutePath); + } + } + if (result.configFilePath) { + result.configFilePath = toAbsolutePath(result.configFilePath); + } + return result; + } + ts.convertToOptionsWithAbsolutePaths = convertToOptionsWithAbsolutePaths; + function convertToOptionValueWithAbsolutePaths(option, value, toAbsolutePath) { + if (option) { + if (option.type === "list") { + var values = value; + if (option.element.isFilePath && values.length) { + return values.map(toAbsolutePath); + } + } + else if (option.isFilePath) { + return toAbsolutePath(value); + } + } + return value; + } /** * Parse the contents of a config file (tsconfig.json). * @param json The contents of the config file to parse @@ -27085,7 +27174,7 @@ var ts; } function convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName) { var options = getDefaultCompilerOptions(configFileName); - convertOptionsFromJson(ts.optionDeclarations, jsonOptions, basePath, options, ts.Diagnostics.Unknown_compiler_option_0, errors); + convertOptionsFromJson(ts.optionDeclarations, jsonOptions, basePath, options, compilerOptionsDefaultDiagnostics, errors); if (configFileName) { options.configFilePath = ts.normalizeSlashes(configFileName); } @@ -27097,10 +27186,14 @@ var ts; function convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName) { var options = getDefaultTypeAcquisition(configFileName); var typeAcquisition = convertEnableAutoDiscoveryToEnable(jsonOptions); - convertOptionsFromJson(ts.typeAcquisitionDeclarations, typeAcquisition, basePath, options, ts.Diagnostics.Unknown_type_acquisition_option_0, errors); + var diagnostics = { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1, + }; + convertOptionsFromJson(ts.typeAcquisitionDeclarations, typeAcquisition, basePath, options, diagnostics, errors); return options; } - function convertOptionsFromJson(optionDeclarations, jsonOptions, basePath, defaultOptions, diagnosticMessage, errors) { + function convertOptionsFromJson(optionDeclarations, jsonOptions, basePath, defaultOptions, diagnostics, errors) { if (!jsonOptions) { return; } @@ -27111,7 +27204,13 @@ var ts; defaultOptions[opt.name] = convertJsonOption(opt, jsonOptions[id], basePath, errors); } else { - errors.push(ts.createCompilerDiagnostic(diagnosticMessage, id)); + var possibleOption = ts.getSpellingSuggestion(id, optionDeclarations, function (opt) { return opt.name; }); + if (possibleOption) { + errors.push(ts.createCompilerDiagnostic(diagnostics.unknownDidYouMeanDiagnostic, id, possibleOption.name)); + } + else { + errors.push(ts.createCompilerDiagnostic(diagnostics.unknownOptionDiagnostic, id)); + } } } } @@ -27147,7 +27246,7 @@ var ts; } function normalizeNonListOptionValue(option, basePath, value) { if (option.isFilePath) { - value = ts.normalizePath(ts.combinePaths(basePath, value)); + value = ts.getNormalizedAbsolutePath(value, basePath); if (value === "") { value = "."; } @@ -28931,7 +29030,10 @@ var ts; ContainerFlags[ContainerFlags["IsInterface"] = 64] = "IsInterface"; ContainerFlags[ContainerFlags["IsObjectLiteralOrClassExpressionMethod"] = 128] = "IsObjectLiteralOrClassExpressionMethod"; })(ContainerFlags || (ContainerFlags = {})); - var flowNodeCreated = ts.identity; + function initFlowNode(node) { + ts.Debug.attachFlowNodeDebugInfo(node); + return node; + } var binder = createBinder(); function bindSourceFile(file, options) { ts.performance.mark("beforeBind"); @@ -28960,6 +29062,7 @@ var ts; var currentReturnTarget; var currentTrueTarget; var currentFalseTarget; + var currentExceptionTarget; var preSwitchCaseFlow; var activeLabels; var hasExplicitReturn; @@ -28995,6 +29098,9 @@ var ts; symbolCount = 0; skipTransformFlagAggregation = file.isDeclarationFile; Symbol = ts.objectAllocator.getSymbolConstructor(); + // Attach debugging information if necessary + ts.Debug.attachFlowNodeDebugInfo(unreachableFlow); + ts.Debug.attachFlowNodeDebugInfo(reportedUnreachableFlow); if (!file.locals) { bind(file); file.symbolCount = symbolCount; @@ -29017,6 +29123,7 @@ var ts; currentReturnTarget = undefined; currentTrueTarget = undefined; currentFalseTarget = undefined; + currentExceptionTarget = undefined; activeLabels = undefined; hasExplicitReturn = false; emitFlags = 0 /* None */; @@ -29338,11 +29445,11 @@ var ts; blockScopeContainer.locals = undefined; } if (containerFlags & 4 /* IsControlFlowContainer */) { - var saveFlowNodeCreated = flowNodeCreated; var saveCurrentFlow = currentFlow; var saveBreakTarget = currentBreakTarget; var saveContinueTarget = currentContinueTarget; var saveReturnTarget = currentReturnTarget; + var saveExceptionTarget = currentExceptionTarget; var saveActiveLabels = activeLabels; var saveHasExplicitReturn = hasExplicitReturn; var isIIFE = containerFlags & 16 /* IsFunctionExpression */ && !ts.hasModifier(node, 256 /* Async */) && @@ -29350,7 +29457,7 @@ var ts; // A non-async, non-generator IIFE is considered part of the containing control flow. Return statements behave // similarly to break statements that exit to a label just past the statement body. if (!isIIFE) { - currentFlow = { flags: 2 /* Start */ }; + currentFlow = initFlowNode({ flags: 2 /* Start */ }); if (containerFlags & (16 /* IsFunctionExpression */ | 128 /* IsObjectLiteralOrClassExpressionMethod */)) { currentFlow.node = node; } @@ -29358,11 +29465,11 @@ var ts; // We create a return control flow graph for IIFEs and constructors. For constructors // we use the return control flow graph in strict property initialization checks. currentReturnTarget = isIIFE || node.kind === 161 /* Constructor */ ? createBranchLabel() : undefined; + currentExceptionTarget = undefined; currentBreakTarget = undefined; currentContinueTarget = undefined; activeLabels = undefined; hasExplicitReturn = false; - flowNodeCreated = ts.identity; bindChildren(node); // Reset all reachability check related flags on node (for incremental scenarios) node.flags &= ~2816 /* ReachabilityAndEmitFlags */; @@ -29388,9 +29495,9 @@ var ts; currentBreakTarget = saveBreakTarget; currentContinueTarget = saveContinueTarget; currentReturnTarget = saveReturnTarget; + currentExceptionTarget = saveExceptionTarget; activeLabels = saveActiveLabels; hasExplicitReturn = saveHasExplicitReturn; - flowNodeCreated = saveFlowNodeCreated; } else if (containerFlags & 64 /* IsInterface */) { seenThisKeyword = false; @@ -29531,9 +29638,6 @@ var ts; case 309 /* JSDocEnumTag */: bindJSDocTypeAlias(node); break; - case 307 /* JSDocClassTag */: - bindJSDocClassTag(node); - break; // In source files and blocks, bind functions first to match hoisting that occurs at runtime case 288 /* SourceFile */: { bindEachFunctionsFirst(node.statements); @@ -29573,9 +29677,8 @@ var ts; function isNarrowableReference(expr) { return expr.kind === 75 /* Identifier */ || expr.kind === 103 /* ThisKeyword */ || expr.kind === 101 /* SuperKeyword */ || (ts.isPropertyAccessExpression(expr) || ts.isNonNullExpression(expr) || ts.isParenthesizedExpression(expr)) && isNarrowableReference(expr.expression) || - ts.isElementAccessExpression(expr) && - ts.isStringOrNumericLiteralLike(expr.argumentExpression) && - isNarrowableReference(expr.expression); + ts.isElementAccessExpression(expr) && ts.isStringOrNumericLiteralLike(expr.argumentExpression) && isNarrowableReference(expr.expression) || + ts.isOptionalChain(expr); } function hasNarrowableArgument(expr) { if (expr.arguments) { @@ -29632,10 +29735,10 @@ var ts; return isNarrowableReference(expr); } function createBranchLabel() { - return { flags: 4 /* BranchLabel */, antecedents: undefined }; + return initFlowNode({ flags: 4 /* BranchLabel */, antecedents: undefined }); } function createLoopLabel() { - return { flags: 8 /* LoopLabel */, antecedents: undefined }; + return initFlowNode({ flags: 8 /* LoopLabel */, antecedents: undefined }); } function setFlowNodeReferenced(flow) { // On first reference we set the Referenced flag, thereafter we set the Shared flag @@ -29654,36 +29757,32 @@ var ts; if (!expression) { return flags & 32 /* TrueCondition */ ? antecedent : unreachableFlow; } - if (expression.kind === 105 /* TrueKeyword */ && flags & 64 /* FalseCondition */ || - expression.kind === 90 /* FalseKeyword */ && flags & 32 /* TrueCondition */) { - if (!ts.isOptionalChainRoot(expression.parent)) { - return unreachableFlow; - } + if ((expression.kind === 105 /* TrueKeyword */ && flags & 64 /* FalseCondition */ || + expression.kind === 90 /* FalseKeyword */ && flags & 32 /* TrueCondition */) && + !ts.isExpressionOfOptionalChainRoot(expression) && !ts.isNullishCoalesce(expression.parent)) { + return unreachableFlow; } if (!isNarrowingExpression(expression)) { return antecedent; } setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: flags, antecedent: antecedent, node: expression }); + return initFlowNode({ flags: flags, antecedent: antecedent, node: expression }); } function createFlowSwitchClause(antecedent, switchStatement, clauseStart, clauseEnd) { - if (!isNarrowingExpression(switchStatement.expression)) { - return antecedent; - } setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: 128 /* SwitchClause */, antecedent: antecedent, switchStatement: switchStatement, clauseStart: clauseStart, clauseEnd: clauseEnd }); + return initFlowNode({ flags: 128 /* SwitchClause */, antecedent: antecedent, switchStatement: switchStatement, clauseStart: clauseStart, clauseEnd: clauseEnd }); } - function createFlowAssignment(antecedent, node) { + function createFlowMutation(flags, antecedent, node) { setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: 16 /* Assignment */, antecedent: antecedent, node: node }); + var result = initFlowNode({ flags: flags, antecedent: antecedent, node: node }); + if (currentExceptionTarget) { + addAntecedent(currentExceptionTarget, result); + } + return result; } function createFlowCall(antecedent, node) { setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: 512 /* Call */, antecedent: antecedent, node: node }); - } - function createFlowArrayMutation(antecedent, node) { - setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: 256 /* ArrayMutation */, antecedent: antecedent, node: node }); + return initFlowNode({ flags: 512 /* Call */, antecedent: antecedent, node: node }); } function finishFlowLabel(flow) { var antecedents = flow.antecedents; @@ -29743,7 +29842,7 @@ var ts; } function bindCondition(node, trueTarget, falseTarget) { doWithConditionalBranches(bind, node, trueTarget, falseTarget); - if (!node || !isLogicalExpression(node) && !(ts.isOptionalChain(node) && isOutermostOptionalChain(node))) { + if (!node || !isLogicalExpression(node) && !(ts.isOptionalChain(node) && ts.isOutermostOptionalChain(node))) { addAntecedent(trueTarget, createFlowCondition(32 /* TrueCondition */, currentFlow, node)); addAntecedent(falseTarget, createFlowCondition(64 /* FalseCondition */, currentFlow, node)); } @@ -29874,87 +29973,56 @@ var ts; } function bindTryStatement(node) { var preFinallyLabel = createBranchLabel(); - var preTryFlow = currentFlow; - var tryPriors = []; - var oldFlowNodeCreated = flowNodeCreated; - // We hook the creation of all flow nodes within the `try` scope and store them so we can add _all_ of them - // as possible antecedents of the start of the `catch` or `finally` blocks. - // Don't bother intercepting the call if there's no finally or catch block that needs the information - if (node.catchClause || node.finallyBlock) { - flowNodeCreated = function (node) { return (tryPriors.push(node), node); }; - } + // We conservatively assume that *any* code in the try block can cause an exception, but we only need + // to track code that causes mutations (because only mutations widen the possible control flow type of + // a variable). The currentExceptionTarget is the target label for control flows that result from + // exceptions. We add all mutation flow nodes as antecedents of this label such that we can analyze them + // as possible antecedents of the start of catch or finally blocks. Furthermore, we add the current + // control flow to represent exceptions that occur before any mutations. + var saveExceptionTarget = currentExceptionTarget; + currentExceptionTarget = createBranchLabel(); + addAntecedent(currentExceptionTarget, currentFlow); bind(node.tryBlock); - flowNodeCreated = oldFlowNodeCreated; addAntecedent(preFinallyLabel, currentFlow); var flowAfterTry = currentFlow; var flowAfterCatch = unreachableFlow; if (node.catchClause) { - currentFlow = preTryFlow; - if (tryPriors.length) { - var preCatchFlow = createBranchLabel(); - addAntecedent(preCatchFlow, currentFlow); - for (var _i = 0, tryPriors_1 = tryPriors; _i < tryPriors_1.length; _i++) { - var p = tryPriors_1[_i]; - addAntecedent(preCatchFlow, p); - } - currentFlow = finishFlowLabel(preCatchFlow); - } + // Start of catch clause is the target of exceptions from try block. + currentFlow = finishFlowLabel(currentExceptionTarget); + // The currentExceptionTarget now represents control flows from exceptions in the catch clause. + // Effectively, in a try-catch-finally, if an exception occurs in the try block, the catch block + // acts like a second try block. + currentExceptionTarget = createBranchLabel(); + addAntecedent(currentExceptionTarget, currentFlow); bind(node.catchClause); addAntecedent(preFinallyLabel, currentFlow); flowAfterCatch = currentFlow; } + var exceptionTarget = finishFlowLabel(currentExceptionTarget); + currentExceptionTarget = saveExceptionTarget; if (node.finallyBlock) { - // We add the nodes within the `try` block to the `finally`'s antecedents if there's no catch block - // (If there is a `catch` block, it will have all these antecedents instead, and the `finally` will - // have the end of the `try` block and the end of the `catch` block) - var preFinallyPrior = preTryFlow; - if (!node.catchClause) { - if (tryPriors.length) { - var preFinallyFlow_1 = createBranchLabel(); - addAntecedent(preFinallyFlow_1, preTryFlow); - for (var _a = 0, tryPriors_2 = tryPriors; _a < tryPriors_2.length; _a++) { - var p = tryPriors_2[_a]; - addAntecedent(preFinallyFlow_1, p); - } - preFinallyPrior = finishFlowLabel(preFinallyFlow_1); - } - } - // in finally flow is combined from pre-try/flow from try/flow from catch - // pre-flow is necessary to make sure that finally is reachable even if finally flows in both try and finally blocks are unreachable - // also for finally blocks we inject two extra edges into the flow graph. - // first -> edge that connects pre-try flow with the label at the beginning of the finally block, it has lock associated with it - // second -> edge that represents post-finally flow. - // these edges are used in following scenario: - // let a; (1) - // try { a = someOperation(); (2)} - // finally { (3) console.log(a) } (4) - // (5) a - // flow graph for this case looks roughly like this (arrows show ): - // (1-pre-try-flow) <--.. <-- (2-post-try-flow) - // ^ ^ - // |*****(3-pre-finally-label) -----| - // ^ - // |-- ... <-- (4-post-finally-label) <--- (5) - // In case when we walk the flow starting from inside the finally block we want to take edge '*****' into account - // since it ensures that finally is always reachable. However when we start outside the finally block and go through label (5) - // then edge '*****' should be discarded because label 4 is only reachable if post-finally label-4 is reachable - // Simply speaking code inside finally block is treated as reachable as pre-try-flow - // since we conservatively assume that any line in try block can throw or return in which case we'll enter finally. - // However code after finally is reachable only if control flow was not abrupted in try/catch or finally blocks - it should be composed from - // final flows of these blocks without taking pre-try flow into account. - // - // extra edges that we inject allows to control this behavior - // if when walking the flow we step on post-finally edge - we can mark matching pre-finally edge as locked so it will be skipped. - var preFinallyFlow = { flags: 4096 /* PreFinally */, antecedent: preFinallyPrior, lock: {} }; + // Possible ways control can reach the finally block: + // 1) Normal completion of try block of a try-finally or try-catch-finally + // 2) Normal completion of catch block (following exception in try block) of a try-catch-finally + // 3) Exception in try block of a try-finally + // 4) Exception in catch block of a try-catch-finally + // When analyzing a control flow graph that starts inside a finally block we want to consider all + // four possibilities above. However, when analyzing a control flow graph that starts outside (past) + // the finally block, we only want to consider the first two (if we're past a finally block then it + // must have completed normally). To make this possible, we inject two extra nodes into the control + // flow graph: An after-finally with an antecedent of the control flow at the end of the finally + // block, and a pre-finally with an antecedent that represents all exceptional control flows. The + // 'lock' property of the pre-finally references the after-finally, and the after-finally has a + // boolean 'locked' property that we set to true when analyzing a control flow that contained the + // the after-finally node. When the lock associated with a pre-finally is locked, the antecedent of + // the pre-finally (i.e. the exceptional control flows) are skipped. + var preFinallyFlow = initFlowNode({ flags: 4096 /* PreFinally */, antecedent: exceptionTarget, lock: {} }); addAntecedent(preFinallyLabel, preFinallyFlow); currentFlow = finishFlowLabel(preFinallyLabel); bind(node.finallyBlock); - // if flow after finally is unreachable - keep it - // otherwise check if flows after try and after catch are unreachable - // if yes - convert current flow to unreachable - // i.e. - // try { return "1" } finally { console.log(1); } - // console.log(2); // this line should be unreachable even if flow falls out of finally block + // If the end of the finally block is reachable, but the end of the try and catch blocks are not, + // convert the current flow to unreachable. For example, 'try { return 1; } finally { ... }' should + // result in an unreachable current control flow. if (!(currentFlow.flags & 1 /* Unreachable */)) { if ((flowAfterTry.flags & 1 /* Unreachable */) && (flowAfterCatch.flags & 1 /* Unreachable */)) { currentFlow = flowAfterTry === reportedUnreachableFlow || flowAfterCatch === reportedUnreachableFlow @@ -29963,7 +30031,7 @@ var ts; } } if (!(currentFlow.flags & 1 /* Unreachable */)) { - var afterFinallyFlow = flowNodeCreated({ flags: 8192 /* AfterFinally */, antecedent: currentFlow }); + var afterFinallyFlow = initFlowNode({ flags: 8192 /* AfterFinally */, antecedent: currentFlow }); preFinallyFlow.lock = afterFinallyFlow; currentFlow = afterFinallyFlow; } @@ -29997,6 +30065,7 @@ var ts; var savedSubtreeTransformFlags = subtreeTransformFlags; subtreeTransformFlags = 0; var clauses = node.clauses; + var isNarrowingSwitch = isNarrowingExpression(node.parent.expression); var fallthroughFlow = unreachableFlow; for (var i = 0; i < clauses.length; i++) { var clauseStart = i; @@ -30005,14 +30074,14 @@ var ts; i++; } var preCaseLabel = createBranchLabel(); - addAntecedent(preCaseLabel, createFlowSwitchClause(preSwitchCaseFlow, node.parent, clauseStart, i + 1)); + addAntecedent(preCaseLabel, isNarrowingSwitch ? createFlowSwitchClause(preSwitchCaseFlow, node.parent, clauseStart, i + 1) : preSwitchCaseFlow); addAntecedent(preCaseLabel, fallthroughFlow); currentFlow = finishFlowLabel(preCaseLabel); var clause = clauses[i]; bind(clause); fallthroughFlow = currentFlow; if (!(currentFlow.flags & 1 /* Unreachable */) && i !== clauses.length - 1 && options.noFallthroughCasesInSwitch) { - errorOnFirstToken(clause, ts.Diagnostics.Fallthrough_case_in_switch); + clause.fallthroughFlowNode = currentFlow; } } clauses.transformFlags = subtreeTransformFlags | 536870912 /* HasComputedFlags */; @@ -30076,7 +30145,7 @@ var ts; } function bindAssignmentTargetFlow(node) { if (isNarrowableReference(node)) { - currentFlow = createFlowAssignment(currentFlow, node); + currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); } else if (node.kind === 191 /* ArrayLiteralExpression */) { for (var _i = 0, _a = node.elements; _i < _a.length; _i++) { @@ -30157,7 +30226,7 @@ var ts; if (operator === 62 /* EqualsToken */ && node.left.kind === 194 /* ElementAccessExpression */) { var elementAccess = node.left; if (isNarrowableOperand(elementAccess.expression)) { - currentFlow = createFlowArrayMutation(currentFlow, node); + currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); } } } @@ -30193,7 +30262,7 @@ var ts; } } else { - currentFlow = createFlowAssignment(currentFlow, node); + currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); } } function bindVariableDeclarationFlow(node) { @@ -30215,12 +30284,9 @@ var ts; addDeclarationToSymbol(host.symbol, host, 32 /* Class */); } } - function isOutermostOptionalChain(node) { - return !ts.isOptionalChain(node.parent) || ts.isOptionalChainRoot(node.parent) || node !== node.parent.expression; - } function bindOptionalExpression(node, trueTarget, falseTarget) { doWithConditionalBranches(bind, node, trueTarget, falseTarget); - if (!ts.isOptionalChain(node) || isOutermostOptionalChain(node)) { + if (!ts.isOptionalChain(node) || ts.isOutermostOptionalChain(node)) { addAntecedent(trueTarget, createFlowCondition(32 /* TrueCondition */, currentFlow, node)); addAntecedent(falseTarget, createFlowCondition(64 /* FalseCondition */, currentFlow, node)); } @@ -30258,7 +30324,7 @@ var ts; currentFlow = finishFlowLabel(preChainLabel); } doWithConditionalBranches(bindOptionalChainRest, node, trueTarget, falseTarget); - if (isOutermostOptionalChain(node)) { + if (ts.isOutermostOptionalChain(node)) { addAntecedent(trueTarget, createFlowCondition(32 /* TrueCondition */, currentFlow, node)); addAntecedent(falseTarget, createFlowCondition(64 /* FalseCondition */, currentFlow, node)); } @@ -30302,7 +30368,7 @@ var ts; if (node.expression.kind === 193 /* PropertyAccessExpression */) { var propertyAccess = node.expression; if (isNarrowableOperand(propertyAccess.expression) && ts.isPushOrUnshiftIdentifier(propertyAccess.name)) { - currentFlow = createFlowArrayMutation(currentFlow, node); + currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); } } } @@ -30602,7 +30668,7 @@ var ts; var host = ts.getJSDocHost(typeAlias); container = ts.findAncestor(host.parent, function (n) { return !!(getContainerFlags(n) & 1 /* IsContainer */); }) || file; blockScopeContainer = ts.getEnclosingBlockScopeContainer(host) || file; - currentFlow = { flags: 2 /* Start */ }; + currentFlow = initFlowNode({ flags: 2 /* Start */ }); parent = typeAlias; bind(typeAlias.typeExpression); var declName = ts.getNameOfDeclaration(typeAlias); @@ -30615,7 +30681,12 @@ var ts; switch (ts.getAssignmentDeclarationPropertyAccessKind(declName.parent)) { case 1 /* ExportsProperty */: case 2 /* ModuleExports */: - container = file; + if (!ts.isExternalOrCommonJsModule(file)) { + container = undefined; + } + else { + container = file; + } break; case 4 /* ThisProperty */: container = declName.parent.expression; @@ -30629,7 +30700,9 @@ var ts; case 0 /* None */: return ts.Debug.fail("Shouldn't have detected typedef or enum on non-assignment declaration"); } - declareModuleMember(typeAlias, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); + if (container) { + declareModuleMember(typeAlias, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); + } container = oldContainer; } } @@ -31025,6 +31098,8 @@ var ts; case 302 /* JSDocTypeLiteral */: case 185 /* MappedType */: return bindAnonymousTypeWorker(node); + case 307 /* JSDocClassTag */: + return bindJSDocClassTag(node); case 192 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); case 200 /* FunctionExpression */: @@ -31244,7 +31319,8 @@ var ts; var flags = ts.exportAssignmentIsAlias(node) ? 2097152 /* Alias */ : 4 /* Property */ | 1048576 /* ExportValue */ | 512 /* ValueModule */; - declareSymbol(file.symbol.exports, file.symbol, node, flags | 67108864 /* Assignment */, 0 /* None */); + var symbol = declareSymbol(file.symbol.exports, file.symbol, node, flags | 67108864 /* Assignment */, 0 /* None */); + setValueDeclaration(symbol, node); } function bindThisPropertyAssignment(node) { ts.Debug.assert(ts.isInJSFile(node)); @@ -31260,7 +31336,7 @@ var ts; constructorSymbol = lookupSymbolForPropertyAccess(l.expression.expression, thisParentContainer); } } - if (constructorSymbol) { + if (constructorSymbol && constructorSymbol.valueDeclaration) { // Declare a 'member' if the container is an ES5 class or ES6 constructor constructorSymbol.members = constructorSymbol.members || ts.createSymbolTable(); // It's acceptable for multiple 'this' assignments of the same identifier to occur @@ -31333,6 +31409,10 @@ var ts; } function bindObjectDefinePrototypeProperty(node) { var namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0].expression); + if (namespaceSymbol) { + // Ensure the namespace symbol becomes class-like + addDeclarationToSymbol(namespaceSymbol, namespaceSymbol.valueDeclaration, 32 /* Class */); + } bindPotentiallyNewExpandoMemberToNamespace(node, namespaceSymbol, /*isPrototypeProperty*/ true); } /** @@ -31407,7 +31487,7 @@ var ts; } }); } - if (containerIsClass && namespaceSymbol) { + if (containerIsClass && namespaceSymbol && namespaceSymbol.valueDeclaration) { addDeclarationToSymbol(namespaceSymbol, namespaceSymbol.valueDeclaration, 32 /* Class */); } return namespaceSymbol; @@ -32056,7 +32136,8 @@ var ts; || ts.hasModifier(node, 2270 /* TypeScriptModifier */) || node.typeParameters || node.type - || !node.body) { + || !node.body + || node.questionToken) { transformFlags |= 1 /* AssertTypeScript */; } // function declarations with object rest destructuring are ES2018 syntax @@ -32093,7 +32174,7 @@ var ts; function computePropertyDeclaration(node, subtreeFlags) { var transformFlags = subtreeFlags | 1048576 /* ContainsClassFields */; // Decorators, TypeScript-specific modifiers, and type annotations are TypeScript syntax. - if (ts.some(node.decorators) || ts.hasModifier(node, 2270 /* TypeScriptModifier */) || node.type) { + if (ts.some(node.decorators) || ts.hasModifier(node, 2270 /* TypeScriptModifier */) || node.type || node.questionToken) { transformFlags |= 1 /* AssertTypeScript */; } // Hoisted variables related to class properties should live within the TypeScript class wrapper. @@ -32898,6 +32979,7 @@ var ts; TypeSystemPropertyName[TypeSystemPropertyName["ImmediateBaseConstraint"] = 4] = "ImmediateBaseConstraint"; TypeSystemPropertyName[TypeSystemPropertyName["EnumTagType"] = 5] = "EnumTagType"; TypeSystemPropertyName[TypeSystemPropertyName["JSDocTypeReference"] = 6] = "JSDocTypeReference"; + TypeSystemPropertyName[TypeSystemPropertyName["ResolvedTypeArguments"] = 7] = "ResolvedTypeArguments"; })(TypeSystemPropertyName || (TypeSystemPropertyName = {})); var CheckMode; (function (CheckMode) { @@ -32908,12 +32990,6 @@ var ts; CheckMode[CheckMode["SkipGenericFunctions"] = 8] = "SkipGenericFunctions"; CheckMode[CheckMode["IsForSignatureHelp"] = 16] = "IsForSignatureHelp"; })(CheckMode || (CheckMode = {})); - var ContextFlags; - (function (ContextFlags) { - ContextFlags[ContextFlags["None"] = 0] = "None"; - ContextFlags[ContextFlags["Signature"] = 1] = "Signature"; - ContextFlags[ContextFlags["NoConstraints"] = 2] = "NoConstraints"; - })(ContextFlags || (ContextFlags = {})); var AccessFlags; (function (AccessFlags) { AccessFlags[AccessFlags["None"] = 0] = "None"; @@ -33047,14 +33123,12 @@ var ts; undefinedSymbol.declarations = []; var globalThisSymbol = createSymbol(1536 /* Module */, "globalThis", 8 /* Readonly */); globalThisSymbol.exports = globals; + globalThisSymbol.declarations = []; globals.set(globalThisSymbol.escapedName, globalThisSymbol); var argumentsSymbol = createSymbol(4 /* Property */, "arguments"); var requireSymbol = createSymbol(4 /* Property */, "require"); /** This will be set during calls to `getResolvedSignature` where services determines an apparent number of arguments greater than what is actually provided. */ var apparentArgumentCount; - // This object is reused for `checkOptionalExpression` return values to avoid frequent GC due to nursery object allocations. - // This object represents a pool-size of 1. - var pooledOptionalTypeResult = { isOptional: false, type: undefined }; // for public members that accept a Node or one of its subtypes, we must guard against // synthetic nodes created during transformations by calling `getParseTreeNode`. // for most of these, we perform the guard only on `checker` to avoid any possible @@ -33173,9 +33247,9 @@ var ts; }, getAugmentedPropertiesOfType: getAugmentedPropertiesOfType, getRootSymbols: getRootSymbols, - getContextualType: function (nodeIn) { + getContextualType: function (nodeIn, contextFlags) { var node = ts.getParseTreeNode(nodeIn, ts.isExpression); - return node ? getContextualType(node) : undefined; + return node ? getContextualType(node, contextFlags) : undefined; }, getContextualTypeForObjectLiteralElement: function (nodeIn) { var node = ts.getParseTreeNode(nodeIn, ts.isObjectLiteralElementLike); @@ -33224,7 +33298,7 @@ var ts; getEmitResolver: getEmitResolver, getExportsOfModule: getExportsOfModuleAsArray, getExportsAndPropertiesOfModule: getExportsAndPropertiesOfModule, - getSymbolWalker: ts.createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignature, getReturnTypeOfSignature, getBaseTypes, resolveStructuredTypeMembers, getTypeOfSymbol, getResolvedSymbol, getIndexTypeOfStructuredType, getConstraintOfTypeParameter, getFirstIdentifier, getTypeArguments), + getSymbolWalker: ts.createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignature, getReturnTypeOfSignature, getBaseTypes, resolveStructuredTypeMembers, getTypeOfSymbol, getResolvedSymbol, getIndexTypeOfStructuredType, getConstraintOfTypeParameter, ts.getFirstIdentifier, getTypeArguments), getAmbientModules: getAmbientModules, getJsxIntrinsicTagNamesAt: getJsxIntrinsicTagNamesAt, isOptionalParameter: function (nodeIn) { @@ -33353,10 +33427,10 @@ var ts; var errorType = createIntrinsicType(1 /* Any */, "error"); var unknownType = createIntrinsicType(2 /* Unknown */, "unknown"); var undefinedType = createIntrinsicType(32768 /* Undefined */, "undefined"); - var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 262144 /* ContainsWideningType */); + var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 524288 /* ContainsWideningType */); var optionalType = createIntrinsicType(32768 /* Undefined */, "undefined"); var nullType = createIntrinsicType(65536 /* Null */, "null"); - var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 262144 /* ContainsWideningType */); + var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 524288 /* ContainsWideningType */); var stringType = createIntrinsicType(4 /* String */, "string"); var numberType = createIntrinsicType(8 /* Number */, "number"); var bigintType = createIntrinsicType(64 /* BigInt */, "bigint"); @@ -33382,7 +33456,7 @@ var ts; var voidType = createIntrinsicType(16384 /* Void */, "void"); var neverType = createIntrinsicType(131072 /* Never */, "never"); var silentNeverType = createIntrinsicType(131072 /* Never */, "never"); - var nonInferrableType = createIntrinsicType(131072 /* Never */, "never", 1048576 /* NonInferrableType */); + var nonInferrableType = createIntrinsicType(131072 /* Never */, "never", 2097152 /* NonInferrableType */); var implicitNeverType = createIntrinsicType(131072 /* Never */, "never"); var unreachableNeverType = createIntrinsicType(131072 /* Never */, "never"); var nonPrimitiveType = createIntrinsicType(67108864 /* NonPrimitive */, "object"); @@ -33400,7 +33474,7 @@ var ts; var anyFunctionType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); // The anyFunctionType contains the anyFunctionType by definition. The flag is further propagated // in getPropagatingFlagsOfTypes, and it is checked in inferFromTypes. - anyFunctionType.objectFlags |= 1048576 /* NonInferrableType */; + anyFunctionType.objectFlags |= 2097152 /* NonInferrableType */; var noConstraintType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); var circularConstraintType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); var resolvingDefaultType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); @@ -33409,10 +33483,10 @@ var ts; markerSubType.constraint = markerSuperType; var markerOtherType = createTypeParameter(); var noTypePredicate = createTypePredicate(1 /* Identifier */, "<>", 0, anyType); - var anySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); - var unknownSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, errorType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); - var resolvingSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); - var silentNeverSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, silentNeverType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); + var anySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */); + var unknownSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, errorType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */); + var resolvingSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */); + var silentNeverSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, silentNeverType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */); var enumNumberIndexInfo = createIndexInfo(stringType, /*isReadonly*/ true); var iterationTypesCache = ts.createMap(); // cache for common IterationTypes instances var noIterationTypes = { @@ -33565,7 +33639,7 @@ var ts; var chosenpragma = ts.isArray(jsxPragma) ? jsxPragma[0] : jsxPragma; file.localJsxFactory = ts.parseIsolatedEntityName(chosenpragma.arguments.factory, languageVersion); if (file.localJsxFactory) { - return file.localJsxNamespace = getFirstIdentifier(file.localJsxFactory).escapedText; + return file.localJsxNamespace = ts.getFirstIdentifier(file.localJsxFactory).escapedText; } } } @@ -33575,7 +33649,7 @@ var ts; if (compilerOptions.jsxFactory) { _jsxFactoryEntity = ts.parseIsolatedEntityName(compilerOptions.jsxFactory, languageVersion); if (_jsxFactoryEntity) { - _jsxNamespace = getFirstIdentifier(_jsxFactoryEntity).escapedText; + _jsxNamespace = ts.getFirstIdentifier(_jsxFactoryEntity).escapedText; } } else if (compilerOptions.reactNamespace) { @@ -35053,7 +35127,7 @@ var ts; var namespaceMeaning = 1920 /* Namespace */ | (ts.isInJSFile(name) ? meaning & 111551 /* Value */ : 0); var symbol; if (name.kind === 75 /* Identifier */) { - var message = meaning === namespaceMeaning ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(getFirstIdentifier(name)); + var message = meaning === namespaceMeaning ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(ts.getFirstIdentifier(name)); var symbolFromJSPrototype = ts.isInJSFile(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined; symbol = resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, /*isUse*/ true); if (!symbol) { @@ -35165,7 +35239,12 @@ var ts; return undefined; } var init = ts.isVariableDeclaration(decl) ? ts.getDeclaredExpandoInitializer(decl) : ts.getAssignedExpandoInitializer(decl); - return init && getSymbolOfNode(init) || undefined; + if (init) { + var initSymbol = getSymbolOfNode(init); + if (initSymbol) { + return mergeJSSymbols(initSymbol, symbol); + } + } } function resolveExternalModuleName(location, moduleReferenceExpression, ignoreErrors) { return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ignoreErrors ? undefined : ts.Diagnostics.Cannot_find_module_0); @@ -35592,8 +35671,8 @@ var ts; } function findConstructorDeclaration(node) { var members = node.members; - for (var _i = 0, members_2 = members; _i < members_2.length; _i++) { - var member = members_2[_i]; + for (var _i = 0, members_3 = members; _i < members_3.length; _i++) { + var member = members_3[_i]; if (member.kind === 161 /* Constructor */ && ts.nodeIsPresent(member.body)) { return member; } @@ -36016,7 +36095,7 @@ var ts; // Type Reference or TypeAlias entity = Identifier meaning = 788968 /* Type */; } - var firstIdentifier = getFirstIdentifier(entityName); + var firstIdentifier = ts.getFirstIdentifier(entityName); var symbol = resolveName(enclosingDeclaration, firstIdentifier.escapedText, meaning, /*nodeNotFoundErrorMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false); // Verify if the symbol is accessible return (symbol && hasVisibleDeclarations(symbol, /*shouldComputeAliasToMakeVisible*/ true)) || { @@ -36508,8 +36587,6 @@ var ts; else if (context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */ && type.symbol.valueDeclaration && ts.isClassLike(type.symbol.valueDeclaration) && - // Use `import` types for refs to other scopes, only anonymize something defined in the same scope - ts.findAncestor(type.symbol.valueDeclaration, function (d) { return d === ts.getSourceFileOfNode(context.enclosingDeclaration); }) && !isValueSymbolAccessible(type.symbol, context.enclosingDeclaration)) { return createAnonymousTypeNode(type); } @@ -36670,9 +36747,9 @@ var ts; } } } - var propertyName = symbolToName(propertySymbol, context, 111551 /* Value */, /*expectsIdentifier*/ true); - context.approximateLength += (ts.symbolName(propertySymbol).length + 1); context.enclosingDeclaration = saveEnclosingDeclaration; + var propertyName = getPropertyNameNodeForSymbol(propertySymbol, context); + context.approximateLength += (ts.symbolName(propertySymbol).length + 1); var optionalToken = propertySymbol.flags & 16777216 /* Optional */ ? ts.createToken(57 /* QuestionToken */) : undefined; if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) { var signatures = getSignaturesOfType(filterType(propertyType, function (t) { return !(t.flags & 32768 /* Undefined */); }), 0 /* Call */); @@ -36871,7 +36948,7 @@ var ts; if (!context.tracker.trackSymbol) return; // get symbol of the first identifier of the entityName - var firstIdentifier = getFirstIdentifier(accessExpression); + var firstIdentifier = ts.getFirstIdentifier(accessExpression); var name = resolveName(firstIdentifier, firstIdentifier.escapedText, 111551 /* Value */ | 1048576 /* ExportValue */, /*nodeNotFoundErrorMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ true); if (name) { context.tracker.trackSymbol(name, enclosingDeclaration, 111551 /* Value */); @@ -37237,22 +37314,34 @@ var ts; } } } + function isSingleQuotedStringNamed(d) { + var name = ts.getNameOfDeclaration(d); + if (name && ts.isStringLiteral(name) && (name.singleQuote || + (!ts.nodeIsSynthesized(name) && ts.startsWith(ts.getTextOfNode(name, /*includeTrivia*/ false), "'")))) { + return true; + } + return false; + } function getPropertyNameNodeForSymbol(symbol, context) { - var fromNameType = getPropertyNameNodeForSymbolFromNameType(symbol, context); + var singleQuote = !!ts.length(symbol.declarations) && ts.every(symbol.declarations, isSingleQuotedStringNamed); + var fromNameType = getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote); if (fromNameType) { return fromNameType; } + if (ts.isKnownSymbol(symbol)) { + return ts.createComputedPropertyName(ts.createPropertyAccess(ts.createIdentifier("Symbol"), symbol.escapedName.substr(3))); + } var rawName = ts.unescapeLeadingUnderscores(symbol.escapedName); - return createPropertyNameNodeForIdentifierOrLiteral(rawName); + return createPropertyNameNodeForIdentifierOrLiteral(rawName, singleQuote); } // See getNameForSymbolFromNameType for a stringy equivalent - function getPropertyNameNodeForSymbolFromNameType(symbol, context) { + function getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote) { var nameType = symbol.nameType; if (nameType) { if (nameType.flags & 384 /* StringOrNumberLiteral */) { var name = "" + nameType.value; if (!ts.isIdentifierText(name, compilerOptions.target) && !isNumericLiteralName(name)) { - return ts.createLiteral(name); + return ts.createLiteral(name, !!singleQuote); } if (isNumericLiteralName(name) && ts.startsWith(name, "-")) { return ts.createComputedPropertyName(ts.createLiteral(+name)); @@ -37264,8 +37353,8 @@ var ts; } } } - function createPropertyNameNodeForIdentifierOrLiteral(name) { - return ts.isIdentifierText(name, compilerOptions.target) ? ts.createIdentifier(name) : ts.createLiteral(isNumericLiteralName(name) ? +name : name); + function createPropertyNameNodeForIdentifierOrLiteral(name, singleQuote) { + return ts.isIdentifierText(name, compilerOptions.target) ? ts.createIdentifier(name) : ts.createLiteral(isNumericLiteralName(name) ? +name : name, !!singleQuote); } function cloneNodeBuilderContext(context) { var initial = __assign({}, context); @@ -37305,7 +37394,7 @@ var ts; var visitedSymbols = ts.createMap(); var deferredPrivates; var oldcontext = context; - context = __assign(__assign({}, oldcontext), { usedSymbolNames: ts.mapMap(symbolTable, function (_symbol, name) { return [ts.unescapeLeadingUnderscores(name), true]; }), remappedSymbolNames: ts.createMap(), tracker: __assign(__assign({}, oldcontext.tracker), { trackSymbol: function (sym, decl, meaning) { + context = __assign(__assign({}, oldcontext), { usedSymbolNames: ts.createMap(), remappedSymbolNames: ts.createMap(), tracker: __assign(__assign({}, oldcontext.tracker), { trackSymbol: function (sym, decl, meaning) { var accessibleResult = isSymbolAccessible(sym, decl, meaning, /*computeALiases*/ false); if (accessibleResult.accessibility === 0 /* Accessible */) { // Lookup the root symbol of the chain of refs we'll use to access it and serialize it @@ -37323,6 +37412,10 @@ var ts; context.usedSymbolNames.set(name, true); }); } + ts.forEachEntry(symbolTable, function (symbol, name) { + var baseName = ts.unescapeLeadingUnderscores(name); + void getInternalSymbolName(symbol, baseName); // Called to cache values into `usedSymbolNames` and `remappedSymbolNames` + }); var addingDeclare = !bundled; var exportEquals = symbolTable.get("export=" /* ExportEquals */); if (exportEquals && symbolTable.size > 1 && exportEquals.flags & 2097152 /* Alias */) { @@ -37514,7 +37607,11 @@ var ts; isPrivate = true; } var modifierFlags = (!isPrivate ? 1 /* Export */ : 0) | (isDefault && !needsPostExportDefault ? 512 /* Default */ : 0); - if (symbol.flags & 16 /* Function */) { + var isConstMergedWithNS = symbol.flags & 1536 /* Module */ && + symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && + symbol.escapedName !== "export=" /* ExportEquals */; + var isConstMergedWithNSPrintableAsSignatureMerge = isConstMergedWithNS && isTypeRepresentableAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol); + if (symbol.flags & 16 /* Function */ || isConstMergedWithNSPrintableAsSignatureMerge) { serializeAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol, getInternalSymbolName(symbol, symbolName), modifierFlags); } if (symbol.flags & 524288 /* TypeAlias */) { @@ -37525,7 +37622,8 @@ var ts; if (symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && symbol.escapedName !== "export=" /* ExportEquals */ && !(symbol.flags & 4194304 /* Prototype */) - && !(symbol.flags & 32 /* Class */)) { + && !(symbol.flags & 32 /* Class */) + && !isConstMergedWithNSPrintableAsSignatureMerge) { serializeVariableOrProperty(symbol, symbolName, isPrivate, needsPostExportDefault, propertyAsAlias, modifierFlags); } if (symbol.flags & 384 /* Enum */) { @@ -37542,7 +37640,7 @@ var ts; serializeAsClass(symbol, getInternalSymbolName(symbol, symbolName), modifierFlags); } } - if (symbol.flags & (512 /* ValueModule */ | 1024 /* NamespaceModule */)) { + if ((symbol.flags & (512 /* ValueModule */ | 1024 /* NamespaceModule */) && (!isConstMergedWithNS || isTypeOnlyNamespace(symbol))) || isConstMergedWithNSPrintableAsSignatureMerge) { serializeModule(symbol, symbolName, modifierFlags); } if (symbol.flags & 64 /* Interface */) { @@ -37570,7 +37668,10 @@ var ts; } } function includePrivateSymbol(symbol) { + if (ts.some(symbol.declarations, ts.isParameterDeclaration)) + return; ts.Debug.assertDefined(deferredPrivates); + getUnusedName(ts.unescapeLeadingUnderscores(symbol.escapedName), symbol); // Call to cache unique name for symbol deferredPrivates.set("" + getSymbolId(symbol), symbol); } function isExportingScope(enclosingDeclaration) { @@ -37629,8 +37730,14 @@ var ts; /*decorators*/ undefined, /*modifiers*/ undefined, getInternalSymbolName(symbol, symbolName), typeParamDecls, heritageClauses, __spreadArrays(indexSignatures, constructSignatures, callSignatures, members)), modifierFlags); } + function getNamespaceMembersForSerialization(symbol) { + return !symbol.exports ? [] : ts.filter(ts.arrayFrom((symbol.exports).values()), function (p) { return !((p.flags & 4194304 /* Prototype */) || (p.escapedName === "prototype")); }); + } + function isTypeOnlyNamespace(symbol) { + return ts.every(getNamespaceMembersForSerialization(symbol), function (m) { return !(resolveSymbol(m).flags & 111551 /* Value */); }); + } function serializeModule(symbol, symbolName, modifierFlags) { - var members = !symbol.exports ? [] : ts.filter(ts.arrayFrom((symbol.exports).values()), function (p) { return !((p.flags & 4194304 /* Prototype */) || (p.escapedName === "prototype")); }); + var members = getNamespaceMembersForSerialization(symbol); // Split NS members up by declaration - members whose parent symbol is the ns symbol vs those whose is not (but were added in later via merging) var locationMap = ts.arrayToMultiMap(members, function (m) { return m.parent && m.parent === symbol ? "real" : "merged"; }); var realMembers = locationMap.get("real") || ts.emptyArray; @@ -37640,17 +37747,20 @@ var ts; // so we don't even have placeholders to fill in. if (ts.length(realMembers)) { var localName = getInternalSymbolName(symbol, symbolName); - serializeAsNamespaceDeclaration(realMembers, localName, modifierFlags, /*suppressNewPrivateContext*/ false); + serializeAsNamespaceDeclaration(realMembers, localName, modifierFlags, !!(symbol.flags & (16 /* Function */ | 67108864 /* Assignment */))); } if (ts.length(mergedMembers)) { var localName = getInternalSymbolName(symbol, symbolName); - ts.forEach(mergedMembers, includePrivateSymbol); var nsBody = ts.createModuleBlock([ts.createExportDeclaration( /*decorators*/ undefined, /*modifiers*/ undefined, ts.createNamedExports(ts.map(ts.filter(mergedMembers, function (n) { return n.escapedName !== "export=" /* ExportEquals */; }), function (s) { var name = ts.unescapeLeadingUnderscores(s.escapedName); var localName = getInternalSymbolName(s, name); - return ts.createExportSpecifier(name === localName ? undefined : localName, name); + var aliasDecl = s.declarations && getDeclarationOfAliasSymbol(s); + var target = aliasDecl && getTargetOfAliasDeclaration(aliasDecl, /*dontRecursivelyResolve*/ true); + includePrivateSymbol(target || s); + var targetName = target ? getInternalSymbolName(target, ts.unescapeLeadingUnderscores(target.escapedName)) : localName; + return ts.createExportSpecifier(name === targetName ? undefined : targetName, name); })))]); addResult(ts.createModuleDeclaration( /*decorators*/ undefined, @@ -37851,7 +37961,11 @@ var ts; case 254 /* ImportClause */: addResult(ts.createImportDeclaration( /*decorators*/ undefined, - /*modifiers*/ undefined, ts.createImportClause(ts.createIdentifier(localName), /*namedBindings*/ undefined), ts.createLiteral(getSpecifierForModuleSymbol(target.parent, context))), 0 /* None */); + /*modifiers*/ undefined, ts.createImportClause(ts.createIdentifier(localName), /*namedBindings*/ undefined), + // We use `target.parent || target` below as `target.parent` is unset when the target is a module which has been export assigned + // And then made into a default by the `esModuleInterop` or `allowSyntheticDefaultImports` flag + // In such cases, the `target` refers to the module itself already + ts.createLiteral(getSpecifierForModuleSymbol(target.parent || target, context))), 0 /* None */); break; case 255 /* NamespaceImport */: addResult(ts.createImportDeclaration( @@ -37863,7 +37977,7 @@ var ts; /*decorators*/ undefined, /*modifiers*/ undefined, ts.createImportClause(/*importClause*/ undefined, ts.createNamedImports([ ts.createImportSpecifier(localName !== verbatimTargetName ? ts.createIdentifier(verbatimTargetName) : undefined, ts.createIdentifier(localName)) - ])), ts.createLiteral(getSpecifierForModuleSymbol(target.parent, context))), 0 /* None */); + ])), ts.createLiteral(getSpecifierForModuleSymbol(target.parent || target, context))), 0 /* None */); break; case 261 /* ExportSpecifier */: // does not use localName because the symbol name in this case refers to the name in the exports table, @@ -37877,6 +37991,7 @@ var ts; serializeMaybeAliasAssignment(symbol); break; case 208 /* BinaryExpression */: + case 193 /* PropertyAccessExpression */: // Could be best encoded as though an export specifier or as though an export assignment // If name is default or export=, do an export assignment // Otherwise do an export specifier @@ -37887,10 +38002,6 @@ var ts; serializeExportSpecifier(localName, targetName); } break; - case 193 /* PropertyAccessExpression */: - // A PAE alias is _always_ going to exist as an append to a top-level export, where our top level - // handling should always be sufficient to encode the export action itself - break; default: return ts.Debug.failBadSyntaxKind(node, "Unhandled alias declaration kind in symbol serializer!"); } @@ -37914,7 +38025,8 @@ var ts; var aliasDecl = symbol.declarations && getDeclarationOfAliasSymbol(symbol); // serialize what the alias points to, preserve the declaration's initializer var target = aliasDecl && getTargetOfAliasDeclaration(aliasDecl, /*dontRecursivelyResolve*/ true); - if (target) { + // If the target resolves and resolves to a thing defined in this file, emit as an alias, otherwise emit as a const + if (target && ts.length(target.declarations) && ts.some(target.declarations, function (d) { return ts.getSourceFileOfNode(d) === ts.getSourceFileOfNode(enclosingDeclaration); })) { // In case `target` refers to a namespace member, look at the declaration and serialize the leftmost symbol in it // eg, `namespace A { export class B {} }; exports = A.B;` // Technically, this is all that's required in the case where the assignment is an entity name expression @@ -37989,6 +38101,7 @@ var ts; return ts.getObjectFlags(typeToSerialize) & (16 /* Anonymous */ | 32 /* Mapped */) && !getIndexInfoOfType(typeToSerialize, 0 /* String */) && !getIndexInfoOfType(typeToSerialize, 1 /* Number */) && + !!(ts.length(getPropertiesOfType(typeToSerialize)) || ts.length(getSignaturesOfType(typeToSerialize, 0 /* Call */))) && !ts.length(getSignaturesOfType(typeToSerialize, 1 /* Construct */)) && // TODO: could probably serialize as function + ns + class, now that that's OK !getDeclarationWithTypeAnnotation(hostSymbol) && !(typeToSerialize.symbol && ts.some(typeToSerialize.symbol.declarations, function (d) { return ts.getSourceFileOfNode(d) !== ctxSrc; })) && @@ -38132,7 +38245,7 @@ var ts; return ts.updateImportTypeNode(node, ts.updateLiteralTypeNode(node.argument, rewriteModuleSpecifier(node, node.argument.literal)), node.qualifier, ts.visitNodes(node.typeArguments, visitExistingNodeTreeSymbols, ts.isTypeNode), node.isTypeOf); } if (ts.isEntityName(node) || ts.isEntityNameExpression(node)) { - var leftmost = getFirstIdentifier(node); + var leftmost = ts.getFirstIdentifier(node); var sym = resolveEntityName(leftmost, 67108863 /* All */, /*ignoreErrors*/ true, /*dontResolveALias*/ true); if (sym) { includePrivateSymbol(sym); @@ -38262,11 +38375,8 @@ var ts; return context.remappedSymbolNames.get("" + getSymbolId(symbol)); } } - if (input === "default" /* Default */) { - input = "_default"; - } - else if (input === "export=" /* ExportEquals */) { - input = "_exports"; + if (symbol) { + input = getNameCandidateWorker(symbol, input); } var i = 0; var original = input; @@ -38280,17 +38390,28 @@ var ts; } return input; } - function getInternalSymbolName(symbol, localName) { - if (context.remappedSymbolNames.has("" + getSymbolId(symbol))) { - return context.remappedSymbolNames.get("" + getSymbolId(symbol)); - } + function getNameCandidateWorker(symbol, localName) { if (localName === "default" /* Default */ || localName === "__class" /* Class */ || localName === "__function" /* Function */) { var flags = context.flags; context.flags |= 16777216 /* InInitialEntityName */; var nameCandidate = getNameOfSymbolAsWritten(symbol, context); context.flags = flags; - localName = ts.isIdentifierText(nameCandidate, languageVersion) && !ts.isStringANonContextualKeyword(nameCandidate) ? nameCandidate : getUnusedName("_default", symbol); + localName = nameCandidate.length > 0 && ts.isSingleOrDoubleQuote(nameCandidate.charCodeAt(0)) ? ts.stripQuotes(nameCandidate) : nameCandidate; } + if (localName === "default" /* Default */) { + localName = "_default"; + } + else if (localName === "export=" /* ExportEquals */) { + localName = "_exports"; + } + localName = ts.isIdentifierText(localName, languageVersion) && !ts.isStringANonContextualKeyword(localName) ? localName : "_" + localName.replace(/[^a-zA-Z0-9]/g, "_"); + return localName; + } + function getInternalSymbolName(symbol, localName) { + if (context.remappedSymbolNames.has("" + getSymbolId(symbol))) { + return context.remappedSymbolNames.get("" + getSymbolId(symbol)); + } + localName = getNameCandidateWorker(symbol, localName); // The result of this is going to be used as the symbol's name - lock it in, so `getUnusedName` will also pick it up context.remappedSymbolNames.set("" + getSymbolId(symbol), localName); return localName; @@ -38555,7 +38676,7 @@ var ts; if (ts.isInternalModuleImportEqualsDeclaration(declaration)) { // Add the referenced top container visible var internalModuleReference = declaration.moduleReference; - var firstIdentifier = getFirstIdentifier(internalModuleReference); + var firstIdentifier = ts.getFirstIdentifier(internalModuleReference); var importSymbol = resolveName(declaration, firstIdentifier.escapedText, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, undefined, undefined, /*isUse*/ false); var id = importSymbol && "" + getSymbolId(importSymbol); if (importSymbol && !visited.has(id)) { @@ -38619,6 +38740,8 @@ var ts; return !!target.immediateBaseConstraint; case 6 /* JSDocTypeReference */: return !!getSymbolLinks(target).resolvedJSDocType; + case 7 /* ResolvedTypeArguments */: + return !!target.resolvedTypeArguments; } return ts.Debug.assertNever(propertyName); } @@ -38704,7 +38827,9 @@ var ts; } var stringIndexInfo = getIndexInfoOfType(source, 0 /* String */); var numberIndexInfo = getIndexInfoOfType(source, 1 /* Number */); - return createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, stringIndexInfo, numberIndexInfo); + var result = createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, stringIndexInfo, numberIndexInfo); + result.objectFlags |= 131072 /* ObjectRestType */; + return result; } // Determine the control flow type associated with a destructuring declaration or assignment. The following // forms of destructuring are possible: @@ -39090,23 +39215,23 @@ var ts; kind === 2 /* ModuleExports */ && symbol.escapedName === "export=" /* ExportEquals */) { var exportedType_1 = resolveStructuredTypeMembers(type); - var members_3 = ts.createSymbolTable(); - ts.copyEntries(exportedType_1.members, members_3); + var members_4 = ts.createSymbolTable(); + ts.copyEntries(exportedType_1.members, members_4); if (resolvedSymbol && !resolvedSymbol.exports) { resolvedSymbol.exports = ts.createSymbolTable(); } (resolvedSymbol || symbol).exports.forEach(function (s, name) { - if (members_3.has(name)) { + if (members_4.has(name)) { var exportedMember = exportedType_1.members.get(name); var union = createSymbol(s.flags | exportedMember.flags, name); union.type = getUnionType([getTypeOfSymbol(s), getTypeOfSymbol(exportedMember)]); - members_3.set(name, union); + members_4.set(name, union); } else { - members_3.set(name, s); + members_4.set(name, s); } }); - var result = createAnonymousType(exportedType_1.symbol, members_3, exportedType_1.callSignatures, exportedType_1.constructSignatures, exportedType_1.stringIndexInfo, exportedType_1.numberIndexInfo); + var result = createAnonymousType(exportedType_1.symbol, members_4, exportedType_1.callSignatures, exportedType_1.constructSignatures, exportedType_1.stringIndexInfo, exportedType_1.numberIndexInfo); result.objectFlags |= (ts.getObjectFlags(type) & 16384 /* JSLiteral */); // Propagate JSLiteral flag return result; } @@ -39166,7 +39291,7 @@ var ts; function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) { var members = ts.createSymbolTable(); var stringIndexInfo; - var objectFlags = 128 /* ObjectLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */; + var objectFlags = 128 /* ObjectLiteral */ | 1048576 /* ContainsObjectOrArrayLiteral */; ts.forEach(pattern.elements, function (e) { var name = e.propertyName || e.name; if (e.dotDotDotToken) { @@ -39306,16 +39431,12 @@ var ts; if (!declaration.statements.length) { return emptyObjectType; } - var type_1 = getWidenedLiteralType(checkExpression(declaration.statements[0].expression)); - if (type_1.flags & 524288 /* Object */) { - return getRegularTypeOfObjectLiteral(type_1); - } - return type_1; + return getWidenedType(getWidenedLiteralType(checkExpression(declaration.statements[0].expression))); } // Handle variable, parameter or property if (!pushTypeResolution(symbol, 0 /* Type */)) { // Symbol is property of some kind that is merged with something - should use `getTypeOfFuncClassEnumModule` and not `getTypeOfVariableOrParameterOrProperty` - if (symbol.flags & 512 /* ValueModule */) { + if (symbol.flags & 512 /* ValueModule */ && !(symbol.flags & 67108864 /* Assignment */)) { return getTypeOfFuncClassEnumModule(symbol); } return reportCircularityError(symbol); @@ -39383,7 +39504,7 @@ var ts; } if (!popTypeResolution()) { // Symbol is property of some kind that is merged with something - should use `getTypeOfFuncClassEnumModule` and not `getTypeOfVariableOrParameterOrProperty` - if (symbol.flags & 512 /* ValueModule */) { + if (symbol.flags & 512 /* ValueModule */ && !(symbol.flags & 67108864 /* Assignment */)) { return getTypeOfFuncClassEnumModule(symbol); } return reportCircularityError(symbol); @@ -39466,7 +39587,9 @@ var ts; } else { ts.Debug.assert(!!getter, "there must exist a getter as we are current checking either setter or getter in this function"); - errorOrSuggestion(noImplicitAny, getter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation, symbolToString(symbol)); + if (!isPrivateWithinAmbient(getter)) { + errorOrSuggestion(noImplicitAny, getter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation, symbolToString(symbol)); + } } return anyType; } @@ -39512,11 +39635,11 @@ var ts; return errorType; } var exportEquals = getMergedSymbol(symbol.exports.get("export=" /* ExportEquals */)); - var type_2 = getWidenedTypeForAssignmentDeclaration(exportEquals, exportEquals === resolvedModule ? undefined : resolvedModule); + var type_1 = getWidenedTypeForAssignmentDeclaration(exportEquals, exportEquals === resolvedModule ? undefined : resolvedModule); if (!popTypeResolution()) { return reportCircularityError(symbol); } - return type_2; + return type_1; } } var type = createObjectType(16 /* Anonymous */, symbol); @@ -39702,6 +39825,7 @@ var ts; // The outer type parameters are those defined by enclosing generic classes, methods, or functions. function getOuterTypeParametersOfClassOrInterface(symbol) { var declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 245 /* InterfaceDeclaration */); + ts.Debug.assert(!!declaration, "Class was missing valueDeclaration -OR- non-class had no interface declarations"); return getOuterTypeParameters(declaration); } // The local type parameters are the combined set of type parameters from all declarations of the class, @@ -39732,7 +39856,7 @@ var ts; var signatures = getSignaturesOfType(type, 1 /* Construct */); if (signatures.length === 1) { var s = signatures[0]; - return !s.typeParameters && s.parameters.length === 1 && s.hasRestParameter && getElementTypeOfArrayType(getTypeOfParameter(s.parameters[0])) === anyType; + return !s.typeParameters && s.parameters.length === 1 && signatureHasRestParameter(s) && getElementTypeOfArrayType(getTypeOfParameter(s.parameters[0])) === anyType; } return false; } @@ -40439,8 +40563,8 @@ var ts; var decl = _a[_i]; var members = ts.getMembersOfDeclaration(decl); if (members) { - for (var _b = 0, members_4 = members; _b < members_4.length; _b++) { - var member = members_4[_b]; + for (var _b = 0, members_5 = members; _b < members_5.length; _b++) { + var member = members_5[_b]; if (isStatic === ts.hasStaticModifier(member) && hasLateBindableName(member)) { lateBindMember(symbol, earlySymbols, lateSymbols, member); } @@ -40569,8 +40693,8 @@ var ts; var paddedTypeArguments = typeArguments.length === typeParameters.length ? typeArguments : ts.concatenate(typeArguments, [type]); resolveObjectTypeMembers(type, source, typeParameters, paddedTypeArguments); } - function createSignature(declaration, typeParameters, thisParameter, parameters, resolvedReturnType, resolvedTypePredicate, minArgumentCount, hasRestParameter, hasLiteralTypes) { - var sig = new Signature(checker); + function createSignature(declaration, typeParameters, thisParameter, parameters, resolvedReturnType, resolvedTypePredicate, minArgumentCount, flags) { + var sig = new Signature(checker, flags); sig.declaration = declaration; sig.typeParameters = typeParameters; sig.parameters = parameters; @@ -40578,15 +40702,13 @@ var ts; sig.resolvedReturnType = resolvedReturnType; sig.resolvedTypePredicate = resolvedTypePredicate; sig.minArgumentCount = minArgumentCount; - sig.hasRestParameter = hasRestParameter; - sig.hasLiteralTypes = hasLiteralTypes; sig.target = undefined; sig.mapper = undefined; return sig; } function cloneSignature(sig) { var result = createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, /*resolvedReturnType*/ undefined, - /*resolvedTypePredicate*/ undefined, sig.minArgumentCount, sig.hasRestParameter, sig.hasLiteralTypes); + /*resolvedTypePredicate*/ undefined, sig.minArgumentCount, sig.flags & 3 /* PropagatingFlags */); result.target = sig.target; result.mapper = sig.mapper; return result; @@ -40598,13 +40720,25 @@ var ts; result.mapper = undefined; return result; } - function createOptionalCallSignature(signature) { + function getOptionalCallSignature(signature, callChainFlags) { + if ((signature.flags & 12 /* CallChainFlags */) === callChainFlags) { + return signature; + } + if (!signature.optionalCallSignatureCache) { + signature.optionalCallSignatureCache = {}; + } + var key = callChainFlags === 4 /* IsInnerCallChain */ ? "inner" : "outer"; + return signature.optionalCallSignatureCache[key] + || (signature.optionalCallSignatureCache[key] = createOptionalCallSignature(signature, callChainFlags)); + } + function createOptionalCallSignature(signature, callChainFlags) { + ts.Debug.assert(callChainFlags === 4 /* IsInnerCallChain */ || callChainFlags === 8 /* IsOuterCallChain */, "An optional call signature can either be for an inner call chain or an outer call chain, but not both."); var result = cloneSignature(signature); - result.isOptionalCall = true; + result.flags |= callChainFlags; return result; } function getExpandedParameters(sig) { - if (sig.hasRestParameter) { + if (signatureHasRestParameter(sig)) { var restIndex_1 = sig.parameters.length - 1; var restParameter = sig.parameters[restIndex_1]; var restType = getTypeOfSymbol(restParameter); @@ -40629,7 +40763,7 @@ var ts; var baseConstructorType = getBaseConstructorTypeOfClass(classType); var baseSignatures = getSignaturesOfType(baseConstructorType, 1 /* Construct */); if (baseSignatures.length === 0) { - return [createSignature(undefined, classType.localTypeParameters, undefined, ts.emptyArray, classType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false)]; + return [createSignature(undefined, classType.localTypeParameters, undefined, ts.emptyArray, classType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */)]; } var baseTypeNode = getBaseTypeNodeOfClass(classType); var isJavaScript = ts.isInJSFile(baseTypeNode); @@ -40793,11 +40927,9 @@ var ts; var params = combineUnionParameters(left, right); var thisParam = combineUnionThisParam(left.thisParameter, right.thisParameter); var minArgCount = Math.max(left.minArgumentCount, right.minArgumentCount); - var hasRestParam = left.hasRestParameter || right.hasRestParameter; - var hasLiteralTypes = left.hasLiteralTypes || right.hasLiteralTypes; var result = createSignature(declaration, left.typeParameters || right.typeParameters, thisParam, params, /*resolvedReturnType*/ undefined, - /*resolvedTypePredicate*/ undefined, minArgCount, hasRestParam, hasLiteralTypes); + /*resolvedTypePredicate*/ undefined, minArgCount, (left.flags | right.flags) & 3 /* PropagatingFlags */); result.unionSignatures = ts.concatenate(left.unionSignatures || [left], [right]); return result; } @@ -40970,7 +41102,7 @@ var ts; var constructSignatures = symbol.members ? getSignaturesOfSymbol(symbol.members.get("__constructor" /* Constructor */)) : ts.emptyArray; if (symbol.flags & 16 /* Function */) { constructSignatures = ts.addRange(constructSignatures.slice(), ts.mapDefined(type.callSignatures, function (sig) { return isJSConstructor(sig.declaration) ? - createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, classType_1, /*resolvedTypePredicate*/ undefined, sig.minArgumentCount, sig.hasRestParameter, sig.hasLiteralTypes) : + createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, classType_1, /*resolvedTypePredicate*/ undefined, sig.minArgumentCount, sig.flags & 3 /* PropagatingFlags */) : undefined; })); } if (!constructSignatures.length) { @@ -41476,8 +41608,8 @@ var ts; var types = t.types; var baseTypes = []; for (var _i = 0, types_6 = types; _i < types_6.length; _i++) { - var type_3 = types_6[_i]; - var baseType = getBaseConstraint(type_3); + var type_2 = types_6[_i]; + var baseType = getBaseConstraint(type_2); if (baseType) { baseTypes.push(baseType); } @@ -41910,7 +42042,7 @@ var ts; var links = getNodeLinks(declaration); if (!links.resolvedSignature) { var parameters = []; - var hasLiteralTypes = false; + var flags = 0 /* None */; var minArgumentCount = 0; var thisParameter = void 0; var hasThisParameter = false; @@ -41941,7 +42073,7 @@ var ts; parameters.push(paramSymbol); } if (type && type.kind === 186 /* LiteralType */) { - hasLiteralTypes = true; + flags |= 2 /* HasLiteralTypes */; } // Record a new minimum argument count if this is not an optional parameter var isOptionalParameter_1 = isOptionalJSDocParameterTag(param) || @@ -41967,9 +42099,11 @@ var ts; getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : undefined; var typeParameters = classType ? classType.localTypeParameters : getTypeParametersFromDeclaration(declaration); - var hasRestLikeParameter = ts.hasRestParameter(declaration) || ts.isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters); + if (ts.hasRestParameter(declaration) || ts.isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters)) { + flags |= 1 /* HasRestParameter */; + } links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, - /*resolvedReturnType*/ undefined, /*resolvedTypePredicate*/ undefined, minArgumentCount, hasRestLikeParameter, hasLiteralTypes); + /*resolvedReturnType*/ undefined, /*resolvedTypePredicate*/ undefined, minArgumentCount, flags); } return links.resolvedSignature; } @@ -42112,8 +42246,11 @@ var ts; signature.unionSignatures ? getUnionType(ts.map(signature.unionSignatures, getReturnTypeOfSignature), 2 /* Subtype */) : getReturnTypeFromAnnotation(signature.declaration) || (ts.nodeIsMissing(signature.declaration.body) ? anyType : getReturnTypeFromBody(signature.declaration)); - if (signature.isOptionalCall) { - type = propagateOptionalTypeMarker(type, /*wasOptional*/ true); + if (signature.flags & 4 /* IsInnerCallChain */) { + type = addOptionalTypeMarker(type); + } + else if (signature.flags & 8 /* IsOuterCallChain */) { + type = getOptionalType(type); } if (!popTypeResolution()) { if (signature.declaration) { @@ -42169,7 +42306,7 @@ var ts; return tryGetRestTypeOfSignature(signature) || anyType; } function tryGetRestTypeOfSignature(signature) { - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var sigRestType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); var restType = isTupleType(sigRestType) ? getRestTypeOfTupleType(sigRestType) : sigRestType; return restType && getIndexTypeOfType(restType, 1 /* Number */); @@ -42386,7 +42523,7 @@ var ts; result |= ts.getObjectFlags(type); } } - return result & 1835008 /* PropagatingFlags */; + return result & 3670016 /* PropagatingFlags */; } function createTypeReference(target, typeArguments) { var id = getTypeListId(typeArguments); @@ -42420,13 +42557,25 @@ var ts; return type; } function getTypeArguments(type) { + var _a, _b; if (!type.resolvedTypeArguments) { + if (!pushTypeResolution(type, 7 /* ResolvedTypeArguments */)) { + return ((_a = type.target.localTypeParameters) === null || _a === void 0 ? void 0 : _a.map(function () { return errorType; })) || ts.emptyArray; + } var node = type.node; var typeArguments = !node ? ts.emptyArray : node.kind === 168 /* TypeReference */ ? ts.concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments(node, type.target.localTypeParameters)) : node.kind === 173 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : ts.map(node.elementTypes, getTypeFromTypeNode); - type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments; + if (popTypeResolution()) { + type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments; + } + else { + type.resolvedTypeArguments = ((_b = type.target.localTypeParameters) === null || _b === void 0 ? void 0 : _b.map(function () { return errorType; })) || ts.emptyArray; + error(type.node || currentNode, type.target.symbol + ? ts.Diagnostics.Type_arguments_for_0_circularly_reference_themselves + : ts.Diagnostics.Tuple_type_arguments_circularly_reference_themselves, type.target.symbol && symbolToString(type.target.symbol)); + } } return type.resolvedTypeArguments; } @@ -42543,7 +42692,7 @@ var ts; errorType; } if (symbol.flags & 111551 /* Value */ && isJSDocTypeReference(node)) { - var jsdocType = getTypeFromJSAlias(node, symbol); + var jsdocType = getTypeFromJSDocValueReference(node, symbol); if (jsdocType) { return jsdocType; } @@ -42556,18 +42705,30 @@ var ts; return errorType; } /** - * A JSdoc TypeReference may be to a value imported from commonjs. - * These should really be aliases, but this special-case code fakes alias resolution - * by producing a type from a value. + * A JSdoc TypeReference may be to a value, but resolve it as a type anyway. + * Note: If the value is imported from commonjs, it should really be an alias, + * but this function's special-case code fakes alias resolution as well. */ - function getTypeFromJSAlias(node, symbol) { + function getTypeFromJSDocValueReference(node, symbol) { var valueType = getTypeOfSymbol(symbol); - var typeType = valueType.symbol && - valueType.symbol !== symbol && // Make sure this is a commonjs export by checking that symbol -> type -> symbol doesn't roundtrip. - getTypeReferenceType(node, valueType.symbol); - if (typeType) { - return getSymbolLinks(symbol).resolvedJSDocType = typeType; + var typeType = valueType; + if (symbol.valueDeclaration) { + var decl = ts.getRootDeclaration(symbol.valueDeclaration); + var isRequireAlias = false; + if (ts.isVariableDeclaration(decl) && decl.initializer) { + var expr = decl.initializer; + // skip past entity names, eg `require("x").a.b.c` + while (ts.isPropertyAccessExpression(expr)) { + expr = expr.expression; + } + isRequireAlias = ts.isCallExpression(expr) && ts.isRequireCall(expr, /*requireStringLiteralLikeArgument*/ true) && !!valueType.symbol; + } + var isImportTypeWithQualifier = node.kind === 187 /* ImportType */ && node.qualifier; + if (isRequireAlias || isImportTypeWithQualifier) { + typeType = getTypeReferenceType(node, valueType.symbol); + } } + return getSymbolLinks(symbol).resolvedJSDocType = typeType; } function getSubstitutionType(typeVariable, substitute) { if (substitute.flags & 3 /* AnyOrUnknown */ || substitute === typeVariable) { @@ -42996,7 +43157,7 @@ var ts; if (type === wildcardType) includes |= 4194304 /* IncludesWildcard */; if (!strictNullChecks && flags & 98304 /* Nullable */) { - if (!(ts.getObjectFlags(type) & 262144 /* ContainsWideningType */)) + if (!(ts.getObjectFlags(type) & 524288 /* ContainsWideningType */)) includes |= 2097152 /* IncludesNonWideningType */; } else { @@ -43123,7 +43284,7 @@ var ts; neverType; } } - return getUnionTypeFromSortedList(typeSet, includes & 66994211 /* NotPrimitiveUnion */ ? 0 : 131072 /* PrimitiveUnion */, aliasSymbol, aliasTypeArguments); + return getUnionTypeFromSortedList(typeSet, includes & 66994211 /* NotPrimitiveUnion */ ? 0 : 262144 /* PrimitiveUnion */, aliasSymbol, aliasTypeArguments); } function getUnionTypePredicate(signatures) { var first; @@ -43273,7 +43434,7 @@ var ts; // other unions and return true. Otherwise, do nothing and return false. function intersectUnionsOfPrimitiveTypes(types) { var unionTypes; - var index = ts.findIndex(types, function (t) { return !!(ts.getObjectFlags(t) & 131072 /* PrimitiveUnion */); }); + var index = ts.findIndex(types, function (t) { return !!(ts.getObjectFlags(t) & 262144 /* PrimitiveUnion */); }); if (index < 0) { return false; } @@ -43282,7 +43443,7 @@ var ts; // the unionTypes array. while (i < types.length) { var t = types[i]; - if (ts.getObjectFlags(t) & 131072 /* PrimitiveUnion */) { + if (ts.getObjectFlags(t) & 262144 /* PrimitiveUnion */) { (unionTypes || (unionTypes = [types[index]])).push(t); ts.orderedRemoveItemAt(types, i); } @@ -43311,7 +43472,7 @@ var ts; } } // Finally replace the first union with the result - types[index] = getUnionTypeFromSortedList(result, 131072 /* PrimitiveUnion */); + types[index] = getUnionTypeFromSortedList(result, 262144 /* PrimitiveUnion */); return true; } function createIntersectionType(types, aliasSymbol, aliasTypeArguments) { @@ -44108,7 +44269,7 @@ var ts; } function getAliasSymbolForTypeNode(node) { var host = node.parent; - while (ts.isParenthesizedTypeNode(host)) { + while (ts.isParenthesizedTypeNode(host) || ts.isTypeOperatorNode(host) && host.operator === 137 /* ReadonlyKeyword */) { host = host.parent; } return ts.isTypeAlias(host) ? getSymbolOfNode(host) : undefined; @@ -44209,7 +44370,7 @@ var ts; } } var spread = createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, getIndexInfoWithReadonly(stringIndexInfo, readonly), getIndexInfoWithReadonly(numberIndexInfo, readonly)); - spread.objectFlags |= 128 /* ObjectLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */ | 1024 /* ContainsSpread */ | objectFlags; + spread.objectFlags |= 128 /* ObjectLiteral */ | 1048576 /* ContainsObjectOrArrayLiteral */ | 1024 /* ContainsSpread */ | objectFlags; return spread; } /** We approximate own properties as non-methods plus methods that are inside the object literal */ @@ -44523,7 +44684,7 @@ var ts; // See GH#17600. var result = createSignature(signature.declaration, freshTypeParameters, signature.thisParameter && instantiateSymbol(signature.thisParameter, mapper), instantiateList(signature.parameters, mapper, instantiateSymbol), /*resolvedReturnType*/ undefined, - /*resolvedTypePredicate*/ undefined, signature.minArgumentCount, signature.hasRestParameter, signature.hasLiteralTypes); + /*resolvedTypePredicate*/ undefined, signature.minArgumentCount, signature.flags & 3 /* PropagatingFlags */); result.target = signature; result.mapper = mapper; return result; @@ -45404,20 +45565,20 @@ var ts; } function isSignatureAssignableTo(source, target, ignoreReturnTypes) { return compareSignaturesRelated(source, target, 0 /* None */, ignoreReturnTypes, /*reportErrors*/ false, - /*errorReporter*/ undefined, /*errorReporter*/ undefined, compareTypesAssignable) !== 0 /* False */; + /*errorReporter*/ undefined, /*errorReporter*/ undefined, compareTypesAssignable, /*reportUnreliableMarkers*/ undefined) !== 0 /* False */; } /** * Returns true if `s` is `(...args: any[]) => any` or `(this: any, ...args: any[]) => any` */ function isAnySignature(s) { return !s.typeParameters && (!s.thisParameter || isTypeAny(getTypeOfParameter(s.thisParameter))) && s.parameters.length === 1 && - s.hasRestParameter && (getTypeOfParameter(s.parameters[0]) === anyArrayType || isTypeAny(getTypeOfParameter(s.parameters[0]))) && + signatureHasRestParameter(s) && (getTypeOfParameter(s.parameters[0]) === anyArrayType || isTypeAny(getTypeOfParameter(s.parameters[0]))) && isTypeAny(getReturnTypeOfSignature(s)); } /** * See signatureRelatedTo, compareSignaturesIdentical */ - function compareSignaturesRelated(source, target, callbackCheck, ignoreReturnTypes, reportErrors, errorReporter, incompatibleErrorReporter, compareTypes) { + function compareSignaturesRelated(source, target, callbackCheck, ignoreReturnTypes, reportErrors, errorReporter, incompatibleErrorReporter, compareTypes, reportUnreliableMarkers) { // TODO (drosen): De-duplicate code between related functions. if (source === target) { return -1 /* True */; @@ -45436,6 +45597,9 @@ var ts; var sourceCount = getParameterCount(source); var sourceRestType = getNonArrayRestType(source); var targetRestType = getNonArrayRestType(target); + if (sourceRestType || targetRestType) { + void instantiateType(sourceRestType || targetRestType, reportUnreliableMarkers); + } if (sourceRestType && targetRestType && sourceCount !== targetCount) { // We're not able to relate misaligned complex rest parameters return 0 /* False */; @@ -45479,7 +45643,7 @@ var ts; (getFalsyFlags(sourceType) & 98304 /* Nullable */) === (getFalsyFlags(targetType) & 98304 /* Nullable */); var related = callbacks ? // TODO: GH#18217 It will work if they're both `undefined`, but not if only one is - compareSignaturesRelated(targetSig, sourceSig, strictVariance ? 2 /* Strict */ : 1 /* Bivariant */, /*ignoreReturnTypes*/ false, reportErrors, errorReporter, incompatibleErrorReporter, compareTypes) : + compareSignaturesRelated(targetSig, sourceSig, strictVariance ? 2 /* Strict */ : 1 /* Bivariant */, /*ignoreReturnTypes*/ false, reportErrors, errorReporter, incompatibleErrorReporter, compareTypes, reportUnreliableMarkers) : !callbackCheck && !strictVariance && compareTypes(sourceType, targetType, /*reportErrors*/ false) || compareTypes(targetType, sourceType, reportErrors); if (!related) { if (reportErrors) { @@ -45493,13 +45657,13 @@ var ts; // If a signature resolution is already in-flight, skip issuing a circularity error // here and just use the `any` type directly var targetReturnType = isResolvingReturnTypeOfSignature(target) ? anyType - : target.declaration && isJSConstructor(target.declaration) ? getDeclaredTypeOfClassOrInterface(target.declaration.symbol) + : target.declaration && isJSConstructor(target.declaration) ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(target.declaration.symbol)) : getReturnTypeOfSignature(target); if (targetReturnType === voidType) { return result; } var sourceReturnType = isResolvingReturnTypeOfSignature(source) ? anyType - : source.declaration && isJSConstructor(source.declaration) ? getDeclaredTypeOfClassOrInterface(source.declaration.symbol) + : source.declaration && isJSConstructor(source.declaration) ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(source.declaration.symbol)) : getReturnTypeOfSignature(source); // The following block preserves behavior forbidding boolean returning functions from being assignable to type guard returning functions var targetTypePredicate = getTypePredicateOfSignature(target); @@ -45686,7 +45850,7 @@ var ts; return true; } if (source.flags & 524288 /* Object */ && target.flags & 524288 /* Object */) { - var related = relation.get(getRelationKey(source, target, relation)); + var related = relation.get(getRelationKey(source, target, /*isIntersectionConstituent*/ false, relation)); if (related !== undefined) { return !!(related & 1 /* Succeeded */); } @@ -46057,7 +46221,7 @@ var ts; // and we need to handle "each" relations before "some" relations for the same kind of type. if (source.flags & 1048576 /* Union */) { result = relation === comparableRelation ? - someTypeRelatedToType(source, target, reportErrors && !(source.flags & 131068 /* Primitive */), isIntersectionConstituent) : + someTypeRelatedToType(source, target, reportErrors && !(source.flags & 131068 /* Primitive */)) : eachTypeRelatedToType(source, target, reportErrors && !(source.flags & 131068 /* Primitive */)); } else { @@ -46095,7 +46259,7 @@ var ts; // // - For a primitive type or type parameter (such as 'number = A & B') there is no point in // breaking the intersection apart. - result = someTypeRelatedToType(source, target, /*reportErrors*/ false, /*isIntersectionConstituent*/ true); + result = someTypeRelatedToType(source, target, /*reportErrors*/ false); } if (!result && (source.flags & 66846720 /* StructuredOrInstantiable */ || target.flags & 66846720 /* StructuredOrInstantiable */)) { if (result = recursiveTypeRelatedTo(source, target, reportErrors, isIntersectionConstituent)) { @@ -46208,7 +46372,7 @@ var ts; // JsxAttributes has an object-literal flag and undergo same type-assignablity check as normal object-literal. // However, using an object-literal error message will be very confusing to the users so we give different a message. // TODO: Spelling suggestions for excess jsx attributes (needs new diagnostic messages) - if (prop.valueDeclaration && ts.isJsxAttribute(prop.valueDeclaration)) { + if (prop.valueDeclaration && ts.isJsxAttribute(prop.valueDeclaration) && ts.getSourceFileOfNode(errorNode) === ts.getSourceFileOfNode(prop.valueDeclaration.name)) { // Note that extraneous children (as in `extra`) don't pass this check, // since `children` is a SyntaxKind.PropertySignature instead of a SyntaxKind.JsxAttribute. errorNode = prop.valueDeclaration.name; @@ -46219,7 +46383,7 @@ var ts; // use the property's value declaration if the property is assigned inside the literal itself var objectLiteralDeclaration_1 = source.symbol && ts.firstOrUndefined(source.symbol.declarations); var suggestion = void 0; - if (prop.valueDeclaration && ts.findAncestor(prop.valueDeclaration, function (d) { return d === objectLiteralDeclaration_1; })) { + if (prop.valueDeclaration && ts.findAncestor(prop.valueDeclaration, function (d) { return d === objectLiteralDeclaration_1; }) && ts.getSourceFileOfNode(objectLiteralDeclaration_1) === ts.getSourceFileOfNode(errorNode)) { var propDeclaration = prop.valueDeclaration; ts.Debug.assertNode(propDeclaration, ts.isObjectLiteralElementLike); errorNode = propDeclaration; @@ -46379,14 +46543,14 @@ var ts; } return result; } - function someTypeRelatedToType(source, target, reportErrors, isIntersectionConstituent) { + function someTypeRelatedToType(source, target, reportErrors) { var sourceTypes = source.types; if (source.flags & 1048576 /* Union */ && containsType(sourceTypes, target)) { return -1 /* True */; } var len = sourceTypes.length; for (var i = 0; i < len; i++) { - var related = isRelatedTo(sourceTypes[i], target, reportErrors && i === len - 1, /*headMessage*/ undefined, isIntersectionConstituent); + var related = isRelatedTo(sourceTypes[i], target, reportErrors && i === len - 1); if (related) { return related; } @@ -46474,7 +46638,7 @@ var ts; if (overflow) { return 0 /* False */; } - var id = getRelationKey(source, target, relation); + var id = getRelationKey(source, target, isIntersectionConstituent, relation); var entry = relation.get(id); if (entry !== undefined) { if (reportErrors && entry & 2 /* Failed */ && !(entry & 4 /* Reported */)) { @@ -47368,7 +47532,7 @@ var ts; * See signatureAssignableTo, compareSignaturesIdentical */ function signatureRelatedTo(source, target, erase, reportErrors, incompatibleReporter) { - return compareSignaturesRelated(erase ? getErasedSignature(source) : source, erase ? getErasedSignature(target) : target, 0 /* None */, /*ignoreReturnTypes*/ false, reportErrors, reportError, incompatibleReporter, isRelatedTo); + return compareSignaturesRelated(erase ? getErasedSignature(source) : source, erase ? getErasedSignature(target) : target, 0 /* None */, /*ignoreReturnTypes*/ false, reportErrors, reportError, incompatibleReporter, isRelatedTo, reportUnreliableMarkers); } function signaturesIdenticalTo(source, target, kind) { var sourceSignatures = getSignaturesOfType(source, kind); @@ -47660,17 +47824,18 @@ var ts; * To improve caching, the relation key for two generic types uses the target's id plus ids of the type parameters. * For other cases, the types ids are used. */ - function getRelationKey(source, target, relation) { + function getRelationKey(source, target, isIntersectionConstituent, relation) { if (relation === identityRelation && source.id > target.id) { var temp = source; source = target; target = temp; } + var intersection = isIntersectionConstituent ? "&" : ""; if (isTypeReferenceWithGenericArguments(source) && isTypeReferenceWithGenericArguments(target)) { var typeParameters = []; - return getTypeReferenceId(source, typeParameters) + "," + getTypeReferenceId(target, typeParameters); + return getTypeReferenceId(source, typeParameters) + "," + getTypeReferenceId(target, typeParameters) + intersection; } - return source.id + "," + target.id; + return source.id + "," + target.id + intersection; } // Invoke the callback for each underlying property symbol of the given symbol and return the first // value that isn't undefined. @@ -47721,7 +47886,7 @@ var ts; // for finite but deeply expanding indexed accesses (eg, for `Q[P1][P2][P3][P4][P5]`). function isDeeplyNestedType(type, stack, depth) { // We track all object types that have an associated symbol (representing the origin of the type) - if (depth >= 5 && type.flags & 524288 /* Object */) { + if (depth >= 5 && type.flags & 524288 /* Object */ && !isObjectOrArrayLiteralType(type)) { var symbol = type.symbol; if (symbol) { var count = 0; @@ -48096,37 +48261,19 @@ var ts; function addOptionalTypeMarker(type) { return strictNullChecks ? getUnionType([type, optionalType]) : type; } + function isNotOptionalTypeMarker(type) { + return type !== optionalType; + } function removeOptionalTypeMarker(type) { - return strictNullChecks ? filterType(type, function (t) { return t !== optionalType; }) : type; + return strictNullChecks ? filterType(type, isNotOptionalTypeMarker) : type; } - function propagateOptionalTypeMarker(type, wasOptional) { - return wasOptional ? addOptionalTypeMarker(type) : type; + function propagateOptionalTypeMarker(type, node, wasOptional) { + return wasOptional ? ts.isOutermostOptionalChain(node) ? getOptionalType(type) : addOptionalTypeMarker(type) : type; } - function createPooledOptionalTypeResult(isOptional, type) { - pooledOptionalTypeResult.isOptional = isOptional; - pooledOptionalTypeResult.type = type; - return pooledOptionalTypeResult; - } - function checkOptionalExpression(parent, expression, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic) { - var isOptional = false; - var type = checkExpression(expression); - if (ts.isOptionalChain(parent)) { - if (parent.questionDotToken) { - // If we have a questionDotToken then we are an OptionalExpression and should remove `null` and - // `undefined` from the type and add the optionalType to the result, if needed. - isOptional = isNullableType(type); - return createPooledOptionalTypeResult(isOptional, isOptional ? getNonNullableType(type) : type); - } - // If we do not have a questionDotToken, then we are an OptionalChain and we remove the optionalType and - // indicate whether we need to add optionalType back into the result. - var nonOptionalType = removeOptionalTypeMarker(type); - if (nonOptionalType !== type) { - isOptional = true; - type = nonOptionalType; - } - } - type = checkNonNullType(type, expression, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic); - return createPooledOptionalTypeResult(isOptional, type); + function getOptionalExpressionType(exprType, expression) { + return ts.isExpressionOfOptionalChainRoot(expression) ? getNonNullableType(exprType) : + ts.isOptionalChain(expression) ? removeOptionalTypeMarker(exprType) : + exprType; } /** * Is source potentially coercible to target type under `==`. @@ -48280,14 +48427,14 @@ var ts; var stringIndexInfo = getIndexInfoOfType(type, 0 /* String */); var numberIndexInfo = getIndexInfoOfType(type, 1 /* Number */); var result = createAnonymousType(type.symbol, members, ts.emptyArray, ts.emptyArray, stringIndexInfo && createIndexInfo(getWidenedType(stringIndexInfo.type), stringIndexInfo.isReadonly), numberIndexInfo && createIndexInfo(getWidenedType(numberIndexInfo.type), numberIndexInfo.isReadonly)); - result.objectFlags |= (ts.getObjectFlags(type) & (16384 /* JSLiteral */ | 1048576 /* NonInferrableType */)); // Retain js literal flag through widening + result.objectFlags |= (ts.getObjectFlags(type) & (16384 /* JSLiteral */ | 2097152 /* NonInferrableType */)); // Retain js literal flag through widening return result; } function getWidenedType(type) { return getWidenedTypeWithContext(type, /*context*/ undefined); } function getWidenedTypeWithContext(type, context) { - if (ts.getObjectFlags(type) & 786432 /* RequiresWidening */) { + if (ts.getObjectFlags(type) & 1572864 /* RequiresWidening */) { if (context === undefined && type.widened) { return type.widened; } @@ -48332,7 +48479,7 @@ var ts; */ function reportWideningErrorsInType(type) { var errorReported = false; - if (ts.getObjectFlags(type) & 262144 /* ContainsWideningType */) { + if (ts.getObjectFlags(type) & 524288 /* ContainsWideningType */) { if (type.flags & 1048576 /* Union */) { if (ts.some(type.types, isEmptyObjectType)) { errorReported = true; @@ -48358,7 +48505,7 @@ var ts; for (var _d = 0, _e = getPropertiesOfObjectType(type); _d < _e.length; _d++) { var p = _e[_d]; var t = getTypeOfSymbol(p); - if (ts.getObjectFlags(t) & 262144 /* ContainsWideningType */) { + if (ts.getObjectFlags(t) & 524288 /* ContainsWideningType */) { if (!reportWideningErrorsInType(t)) { error(p.valueDeclaration, ts.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, symbolToString(p), typeToString(getWidenedType(t))); } @@ -48438,7 +48585,7 @@ var ts; errorOrSuggestion(noImplicitAny, declaration, diagnostic, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)), typeAsString); } function reportErrorsFromWidening(declaration, type, wideningKind) { - if (produceDiagnostics && noImplicitAny && ts.getObjectFlags(type) & 262144 /* ContainsWideningType */) { + if (produceDiagnostics && noImplicitAny && ts.getObjectFlags(type) & 524288 /* ContainsWideningType */) { // Report implicit any error within type if possible, otherwise report error on declaration if (!reportWideningErrorsInType(type)) { reportImplicitAny(declaration, type, wideningKind); @@ -48555,7 +48702,7 @@ var ts; return !!(type.flags & 63176704 /* Instantiable */ || objectFlags & 4 /* Reference */ && (type.node || ts.forEach(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || - objectFlags & 32 /* Mapped */ || + objectFlags & (32 /* Mapped */ | 131072 /* ObjectRestType */) || type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && couldUnionOrIntersectionContainTypeVariables(type)); } function couldUnionOrIntersectionContainTypeVariables(type) { @@ -48610,7 +48757,7 @@ var ts; // literal { a: 123, b: x => true } is marked non-inferable because it contains a context sensitive // arrow function, but is considered partially inferable because property 'a' has an inferable type. function isPartiallyInferableType(type) { - return !(ts.getObjectFlags(type) & 1048576 /* NonInferrableType */) || + return !(ts.getObjectFlags(type) & 2097152 /* NonInferrableType */) || isObjectLiteralType(type) && ts.some(getPropertiesOfType(type), function (prop) { return isPartiallyInferableType(getTypeOfSymbol(prop)); }); } function createReverseMappedType(source, target, constraint) { @@ -48761,10 +48908,7 @@ var ts; // inferring a type parameter constraint. Instead, make a lower priority inference from // the full source to whatever remains in the target. For example, when inferring from // string to 'string | T', make a lower priority inference of string for T. - var savePriority = priority; - priority |= 1 /* NakedTypeVariable */; - inferFromTypes(source, target); - priority = savePriority; + inferWithPriority(source, target, 1 /* NakedTypeVariable */); return; } source = getUnionType(sources); @@ -48797,7 +48941,7 @@ var ts; // not contain anyFunctionType when we come back to this argument for its second round // of inference. Also, we exclude inferences for silentNeverType (which is used as a wildcard // when constructing types from type parameters that had no inference candidates). - if (ts.getObjectFlags(source) & 1048576 /* NonInferrableType */ || source === silentNeverType || (priority & 16 /* ReturnType */ && (source === autoType || source === autoArrayType))) { + if (ts.getObjectFlags(source) & 2097152 /* NonInferrableType */ || source === silentNeverType || (priority & 16 /* ReturnType */ && (source === autoType || source === autoArrayType))) { return; } var inference = getInferenceInfoForType(target); @@ -48864,10 +49008,7 @@ var ts; else if ((isLiteralType(source) || source.flags & 4 /* String */) && target.flags & 4194304 /* Index */) { var empty = createEmptyObjectTypeFromStringLiteral(source); contravariant = !contravariant; - var savePriority = priority; - priority |= 32 /* LiteralKeyof */; - inferFromTypes(empty, target.type); - priority = savePriority; + inferWithPriority(empty, target.type, 32 /* LiteralKeyof */); contravariant = !contravariant; } else if (source.flags & 8388608 /* IndexedAccess */ && target.flags & 8388608 /* IndexedAccess */) { @@ -48919,6 +49060,12 @@ var ts; } } } + function inferWithPriority(source, target, newPriority) { + var savePriority = priority; + priority |= newPriority; + inferFromTypes(source, target); + priority = savePriority; + } function invokeOnce(source, target, action) { var key = source.id + "," + target.id; var status = visited && visited.get(key); @@ -48984,6 +49131,18 @@ var ts; } return undefined; } + function getSingleTypeVariableFromIntersectionTypes(types) { + var typeVariable; + for (var _i = 0, types_13 = types; _i < types_13.length; _i++) { + var type = types_13[_i]; + var t = type.flags & 2097152 /* Intersection */ && ts.find(type.types, function (t) { return !!getInferenceInfoForType(t); }); + if (!t || typeVariable && t !== typeVariable) { + return undefined; + } + typeVariable = t; + } + return typeVariable; + } function inferToMultipleTypes(source, targets, targetFlags) { var typeVariableCount = 0; if (targetFlags & 1048576 /* Union */) { @@ -49013,6 +49172,16 @@ var ts; } } } + if (typeVariableCount === 0) { + // If every target is an intersection of types containing a single naked type variable, + // make a lower priority inference to that type variable. This handles inferring from + // 'A | B' to 'T & (X | Y)' where we want to infer 'A | B' for T. + var intersectionTypeVariable = getSingleTypeVariableFromIntersectionTypes(targets); + if (intersectionTypeVariable) { + inferWithPriority(source, intersectionTypeVariable, 1 /* NakedTypeVariable */); + } + return; + } // If the target has a single naked type variable and no inference circularities were // encountered above (meaning we explored the types fully), create a union of the source // types from which no inferences have been made so far and infer from that union to the @@ -49044,15 +49213,12 @@ var ts; // we want to infer string for T, not Promise | string. For intersection types // we only infer to single naked type variables. if (targetFlags & 2097152 /* Intersection */ ? typeVariableCount === 1 : typeVariableCount > 0) { - var savePriority = priority; - priority |= 1 /* NakedTypeVariable */; for (var _b = 0, targets_4 = targets; _b < targets_4.length; _b++) { var t = targets_4[_b]; if (getInferenceInfoForType(t)) { - inferFromTypes(source, t); + inferWithPriority(source, t, 1 /* NakedTypeVariable */); } } - priority = savePriority; } } function inferToMappedType(source, target, constraintType) { @@ -49073,14 +49239,12 @@ var ts; if (inference && !inference.isFixed) { var inferredType = inferTypeForHomomorphicMappedType(source, target, constraintType); if (inferredType) { - var savePriority = priority; // We assign a lower priority to inferences made from types containing non-inferrable // types because we may only have a partial result (i.e. we may have failed to make // reverse inferences for some properties). - priority |= ts.getObjectFlags(source) & 1048576 /* NonInferrableType */ ? - 4 /* PartialHomomorphicMappedType */ : 2 /* HomomorphicMappedType */; - inferFromTypes(inferredType, inference.typeParameter); - priority = savePriority; + inferWithPriority(inferredType, inference.typeParameter, ts.getObjectFlags(source) & 2097152 /* NonInferrableType */ ? + 4 /* PartialHomomorphicMappedType */ : + 2 /* HomomorphicMappedType */); } } return true; @@ -49088,10 +49252,7 @@ var ts; if (constraintType.flags & 262144 /* TypeParameter */) { // We're inferring from some source type S to a mapped type { [P in K]: X }, where K is a type // parameter. First infer from 'keyof S' to K. - var savePriority = priority; - priority |= 8 /* MappedTypeConstraint */; - inferFromTypes(getIndexType(source), constraintType); - priority = savePriority; + inferWithPriority(getIndexType(source), constraintType, 8 /* MappedTypeConstraint */); // If K is constrained to a type C, also infer to C. Thus, for a mapped type { [P in K]: X }, // where K extends keyof T, we make the same inferences as for a homomorphic mapped type // { [P in keyof T]: X }. This enables us to make meaningful inferences when the target is a @@ -49200,7 +49361,7 @@ var ts; var sourceLen = sourceSignatures.length; var targetLen = targetSignatures.length; var len = sourceLen < targetLen ? sourceLen : targetLen; - var skipParameters = !!(ts.getObjectFlags(source) & 1048576 /* NonInferrableType */); + var skipParameters = !!(ts.getObjectFlags(source) & 2097152 /* NonInferrableType */); for (var i = 0; i < len; i++) { inferFromSignature(getBaseSignature(sourceSignatures[sourceLen - len + i]), getBaseSignature(targetSignatures[targetLen - len + i]), skipParameters); } @@ -49469,6 +49630,15 @@ var ts; } return false; } + function optionalChainContainsReference(source, target) { + while (ts.isOptionalChain(source)) { + source = source.expression; + if (isMatchingReference(source, target)) { + return true; + } + } + return false; + } // Return true if target is a property access xxx.yyy, source is a property access xxx.zzz, the declared // type of xxx is a union type, and yyy is a property that is possibly a discriminant. We consider a property // a possible discriminant if its type differs in the constituents of containing union type, and if every @@ -49589,8 +49759,8 @@ var ts; } function getTypeFactsOfTypes(types) { var result = 0 /* None */; - for (var _i = 0, types_13 = types; _i < types_13.length; _i++) { - var t = types_13[_i]; + for (var _i = 0, types_14 = types; _i < types_14.length; _i++) { + var t = types_14[_i]; result |= getTypeFacts(t); } return result; @@ -49959,8 +50129,8 @@ var ts; } function isEvolvingArrayTypeList(types) { var hasEvolvingArrayType = false; - for (var _i = 0, types_14 = types; _i < types_14.length; _i++) { - var t = types_14[_i]; + for (var _i = 0, types_15 = types; _i < types_15.length; _i++) { + var t = types_15[_i]; if (!(t.flags & 131072 /* Never */)) { if (!(ts.getObjectFlags(t) & 256 /* EvolvingArray */)) { return false; @@ -50041,9 +50211,18 @@ var ts; // expressions are potential type predicate function calls. In order to avoid triggering // circularities in control flow analysis, we use getTypeOfDottedName when resolving the call // target expression of an assertion. - var funcType = node.parent.kind === 225 /* ExpressionStatement */ ? getTypeOfDottedName(node.expression, /*diagnostic*/ undefined) : - node.expression.kind !== 101 /* SuperKeyword */ ? checkOptionalExpression(node, node.expression).type : - undefined; + var funcType = void 0; + if (node.parent.kind === 225 /* ExpressionStatement */) { + funcType = getTypeOfDottedName(node.expression, /*diagnostic*/ undefined); + } + else if (node.expression.kind !== 101 /* SuperKeyword */) { + if (ts.isOptionalChain(node)) { + funcType = checkNonNullType(getOptionalExpressionType(checkExpression(node.expression), node.expression), node.expression); + } + else { + funcType = checkNonNullExpression(node.expression); + } + } var signatures = getSignaturesOfType(funcType && getApparentType(funcType) || unknownType, 0 /* Call */); var candidate = signatures.length === 1 && !signatures[0].typeParameters ? signatures[0] : ts.some(signatures, hasTypePredicateOrNeverReturnType) ? getResolvedSignature(node) : @@ -50056,6 +50235,13 @@ var ts; return !!(getTypePredicateOfSignature(signature) || signature.declaration && (getReturnTypeFromAnnotation(signature.declaration) || unknownType).flags & 131072 /* Never */); } + function getTypePredicateArgument(predicate, callExpression) { + if (predicate.kind === 1 /* Identifier */ || predicate.kind === 3 /* AssertsIdentifier */) { + return callExpression.arguments[predicate.parameterIndex]; + } + var invokedExpression = ts.skipParentheses(callExpression.expression); + return ts.isAccessExpression(invokedExpression) ? ts.skipParentheses(invokedExpression.expression) : undefined; + } function reportFlowControlError(node) { var block = ts.findAncestor(node, ts.isFunctionOrModuleBlock); var sourceFile = ts.getSourceFileOfNode(node); @@ -50071,6 +50257,11 @@ var ts; function isUnlockedReachableFlowNode(flow) { return !(flow.flags & 4096 /* PreFinally */ && flow.lock.locked) && isReachableFlowNodeWorker(flow, /*skipCacheCheck*/ false); } + function isFalseExpression(expr) { + var node = ts.skipParentheses(expr); + return node.kind === 90 /* FalseKeyword */ || node.kind === 208 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || + node.operatorToken.kind === 56 /* BarBarToken */ && isFalseExpression(node.left) && isFalseExpression(node.right)); + } function isReachableFlowNodeWorker(flow, noCacheCheck) { while (true) { if (flow === lastFlowNode) { @@ -50090,8 +50281,17 @@ var ts; } else if (flags & 512 /* Call */) { var signature = getEffectsSignature(flow.node); - if (signature && getReturnTypeOfSignature(signature).flags & 131072 /* Never */) { - return false; + if (signature) { + var predicate = getTypePredicateOfSignature(signature); + if (predicate && predicate.kind === 3 /* AssertsIdentifier */) { + var predicateArgument = flow.node.arguments[predicate.parameterIndex]; + if (predicateArgument && isFalseExpression(predicateArgument)) { + return false; + } + } + if (getReturnTypeOfSignature(signature).flags & 131072 /* Never */) { + return false; + } } flow = flow.antecedent; } @@ -50325,6 +50525,9 @@ var ts; } function narrowTypeByAssertion(type, expr) { var node = ts.skipParentheses(expr); + if (node.kind === 90 /* FalseKeyword */) { + return unreachableNeverType; + } if (node.kind === 208 /* BinaryExpression */) { if (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */) { return narrowTypeByAssertion(narrowTypeByAssertion(type, node.left), node.right); @@ -50343,7 +50546,7 @@ var ts; var flowType = getTypeAtFlowNode(flow.antecedent); var type = getTypeFromFlowType(flowType); var narrowedType = predicate.type ? narrowTypeByTypePredicate(type, predicate, flow.node, /*assumeTrue*/ true) : - predicate.kind === 3 /* AssertsIdentifier */ ? narrowTypeByAssertion(type, flow.node.arguments[predicate.parameterIndex]) : + predicate.kind === 3 /* AssertsIdentifier */ && predicate.parameterIndex >= 0 && predicate.parameterIndex < flow.node.arguments.length ? narrowTypeByAssertion(type, flow.node.arguments[predicate.parameterIndex]) : type; return narrowedType === type ? flowType : createFlowType(narrowedType, isIncomplete(flowType)); } @@ -50414,17 +50617,24 @@ var ts; if (isMatchingReference(reference, expr)) { type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } - else if (isMatchingReferenceDiscriminant(expr, type)) { - type = narrowTypeByDiscriminant(type, expr, function (t) { return narrowTypeBySwitchOnDiscriminant(t, flow.switchStatement, flow.clauseStart, flow.clauseEnd); }); - } else if (expr.kind === 203 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { type = narrowBySwitchOnTypeOf(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } - else if (containsMatchingReferenceDiscriminant(reference, expr)) { - type = declaredType; - } - else if (flow.clauseStart === flow.clauseEnd && isExhaustiveSwitchStatement(flow.switchStatement)) { - return unreachableNeverType; + else { + if (strictNullChecks) { + if (optionalChainContainsReference(expr, reference)) { + type = narrowTypeBySwitchOptionalChainContainment(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd, function (t) { return !(t.flags & (32768 /* Undefined */ | 131072 /* Never */)); }); + } + else if (expr.kind === 203 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { + type = narrowTypeBySwitchOptionalChainContainment(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd, function (t) { return !(t.flags & 131072 /* Never */ || t.flags & 128 /* StringLiteral */ && t.value === "undefined"); }); + } + } + if (isMatchingReferenceDiscriminant(expr, type)) { + type = narrowTypeByDiscriminant(type, expr, function (t) { return narrowTypeBySwitchOnDiscriminant(t, flow.switchStatement, flow.clauseStart, flow.clauseEnd); }); + } + else if (containsMatchingReferenceDiscriminant(reference, expr)) { + type = declaredType; + } } return createFlowType(type, isIncomplete(flowType)); } @@ -50432,6 +50642,7 @@ var ts; var antecedentTypes = []; var subtypeReduction = false; var seenIncomplete = false; + var bypassFlow; for (var _i = 0, _a = flow.antecedents; _i < _a.length; _i++) { var antecedent = _a[_i]; if (antecedent.flags & 4096 /* PreFinally */ && antecedent.lock.locked) { @@ -50440,6 +50651,11 @@ var ts; // in this case we should ignore this branch. continue; } + if (!bypassFlow && antecedent.flags & 128 /* SwitchClause */ && antecedent.clauseStart === antecedent.clauseEnd) { + // The antecedent is the bypass branch of a potentially exhaustive switch statement. + bypassFlow = antecedent; + continue; + } var flowType = getTypeAtFlowNode(antecedent); var type = getTypeFromFlowType(flowType); // If the type at a particular antecedent path is the declared type and the @@ -50460,6 +50676,25 @@ var ts; seenIncomplete = true; } } + if (bypassFlow) { + var flowType = getTypeAtFlowNode(bypassFlow); + var type = getTypeFromFlowType(flowType); + // If the bypass flow contributes a type we haven't seen yet and the switch statement + // isn't exhaustive, process the bypass flow type. Since exhaustiveness checks increase + // the risk of circularities, we only want to perform them when they make a difference. + if (!ts.contains(antecedentTypes, type) && !isExhaustiveSwitchStatement(bypassFlow.switchStatement)) { + if (type === declaredType && declaredType === initialType) { + return type; + } + antecedentTypes.push(type); + if (!isTypeSubsetOf(type, declaredType)) { + subtypeReduction = true; + } + if (isIncomplete(flowType)) { + seenIncomplete = true; + } + } + } return createFlowType(getUnionOrEvolvingArrayType(antecedentTypes, subtypeReduction ? 2 /* Subtype */ : 1 /* Literal */), seenIncomplete); } function getTypeAtFlowLoopLabel(flow) { @@ -50566,6 +50801,9 @@ var ts; if (isMatchingReference(reference, expr)) { return getTypeWithFacts(type, assumeTrue ? 4194304 /* Truthy */ : 8388608 /* Falsy */); } + if (strictNullChecks && assumeTrue && optionalChainContainsReference(expr, reference)) { + type = getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); + } if (isMatchingReferenceDiscriminant(expr, declaredType)) { return narrowTypeByDiscriminant(type, expr, function (t) { return getTypeWithFacts(t, assumeTrue ? 4194304 /* Truthy */ : 8388608 /* Falsy */); }); } @@ -50614,6 +50852,14 @@ var ts; if (isMatchingReference(reference, right_1)) { return narrowTypeByEquality(type, operator_1, left_1, assumeTrue); } + if (strictNullChecks) { + if (optionalChainContainsReference(left_1, reference)) { + type = narrowTypeByOptionalChainContainment(type, operator_1, right_1, assumeTrue); + } + else if (optionalChainContainsReference(right_1, reference)) { + type = narrowTypeByOptionalChainContainment(type, operator_1, left_1, assumeTrue); + } + } if (isMatchingReferenceDiscriminant(left_1, declaredType)) { return narrowTypeByDiscriminant(type, left_1, function (t) { return narrowTypeByEquality(t, operator_1, right_1, assumeTrue); }); } @@ -50637,6 +50883,15 @@ var ts; } return type; } + function narrowTypeByOptionalChainContainment(type, operator, value, assumeTrue) { + // We are in a branch of obj?.foo === value or obj?.foo !== value. We remove undefined and null from + // the type of obj if (a) the operator is === and the type of value doesn't include undefined or (b) the + // operator is !== and the type of value is undefined. + var effectiveTrue = operator === 34 /* EqualsEqualsToken */ || operator === 36 /* EqualsEqualsEqualsToken */ ? assumeTrue : !assumeTrue; + var doubleEquals = operator === 34 /* EqualsEqualsToken */ || operator === 35 /* ExclamationEqualsToken */; + var valueNonNullish = !(getTypeFacts(getTypeOfExpression(value)) & (doubleEquals ? 262144 /* EQUndefinedOrNull */ : 65536 /* EQUndefined */)); + return effectiveTrue === valueNonNullish ? getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */) : type; + } function narrowTypeByEquality(type, operator, value, assumeTrue) { if (type.flags & 1 /* Any */) { return type; @@ -50684,8 +50939,14 @@ var ts; } function narrowTypeByTypeof(type, typeOfExpr, operator, literal, assumeTrue) { // We have '==', '!=', '===', or !==' operator with 'typeof xxx' and string literal operands + if (operator === 35 /* ExclamationEqualsToken */ || operator === 37 /* ExclamationEqualsEqualsToken */) { + assumeTrue = !assumeTrue; + } var target = getReferenceCandidate(typeOfExpr.expression); if (!isMatchingReference(reference, target)) { + if (strictNullChecks && optionalChainContainsReference(target, reference) && assumeTrue === (literal.text !== "undefined")) { + return getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); + } // For a reference of the form 'x.y', a 'typeof x === ...' type guard resets the // narrowed type of 'y' to its declared type. if (containsMatchingReference(reference, target)) { @@ -50693,9 +50954,6 @@ var ts; } return type; } - if (operator === 35 /* ExclamationEqualsToken */ || operator === 37 /* ExclamationEqualsEqualsToken */) { - assumeTrue = !assumeTrue; - } if (type.flags & 1 /* Any */ && literal.text === "function") { return type; } @@ -50728,6 +50986,10 @@ var ts; return type; } } + function narrowTypeBySwitchOptionalChainContainment(type, switchStatement, clauseStart, clauseEnd, clauseCheck) { + var everyClauseChecks = clauseStart !== clauseEnd && ts.every(getSwitchClauseTypes(switchStatement).slice(clauseStart, clauseEnd), clauseCheck); + return everyClauseChecks ? getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */) : type; + } function narrowTypeBySwitchOnDiscriminant(type, switchStatement, clauseStart, clauseEnd) { // We only narrow if all case expressions specify // values with unit types, except for the case where @@ -50860,6 +51122,9 @@ var ts; function narrowTypeByInstanceof(type, expr, assumeTrue) { var left = getReferenceCandidate(expr.left); if (!isMatchingReference(reference, left)) { + if (assumeTrue && strictNullChecks && optionalChainContainsReference(left, reference)) { + return getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); + } // For a reference of the form 'x.y', an 'x instanceof T' type guard resets the // narrowed type of 'y' to its declared type. We do this because preceding 'x.y' // references might reference a different 'y' property. However, we make an exception @@ -50932,39 +51197,28 @@ var ts; } function narrowTypeByTypePredicate(type, predicate, callExpression, assumeTrue) { // Don't narrow from 'any' if the predicate type is exactly 'Object' or 'Function' - if (isTypeAny(type) && (predicate.type === globalObjectType || predicate.type === globalFunctionType)) { - return type; - } - if (predicate.kind === 1 /* Identifier */ || predicate.kind === 3 /* AssertsIdentifier */) { - var predicateArgument = callExpression.arguments[predicate.parameterIndex]; - if (predicateArgument && predicate.type) { + if (predicate.type && !(isTypeAny(type) && (predicate.type === globalObjectType || predicate.type === globalFunctionType))) { + var predicateArgument = getTypePredicateArgument(predicate, callExpression); + if (predicateArgument) { if (isMatchingReference(reference, predicateArgument)) { return getNarrowedType(type, predicate.type, assumeTrue, isTypeSubtypeOf); } + if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) && + !(getTypeFacts(predicate.type) & 65536 /* EQUndefined */)) { + return getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); + } if (containsMatchingReference(reference, predicateArgument)) { return declaredType; } } } - else { - var invokedExpression = ts.skipParentheses(callExpression.expression); - if (ts.isAccessExpression(invokedExpression) && predicate.type) { - var possibleReference = ts.skipParentheses(invokedExpression.expression); - if (isMatchingReference(reference, possibleReference)) { - return getNarrowedType(type, predicate.type, assumeTrue, isTypeSubtypeOf); - } - if (containsMatchingReference(reference, possibleReference)) { - return declaredType; - } - } - } return type; } // Narrow the given type based on the given expression having the assumed boolean value. The returned type // will be a subtype or the same type as the argument. function narrowType(type, expr, assumeTrue) { // for `a?.b`, we emulate a synthetic `a !== null && a !== undefined` condition for `a` - if (ts.isOptionalChainRoot(expr.parent) || + if (ts.isExpressionOfOptionalChainRoot(expr) || ts.isBinaryExpression(expr.parent) && expr.parent.operatorToken.kind === 60 /* QuestionQuestionToken */ && expr.parent.left === expr) { return narrowTypeByOptionality(type, expr, assumeTrue); } @@ -51245,7 +51499,24 @@ var ts; } } else if (!assumeInitialized && !(getFalsyFlags(type) & 32768 /* Undefined */) && getFalsyFlags(flowType) & 32768 /* Undefined */) { - error(node, ts.Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol)); + var diag = error(node, ts.Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol)); + // See GH:32846 - if the user is using a variable whose type is () => T1 | ... | undefined + // they may have meant to specify the type as (() => T1 | ...) | undefined + // This is assumed if: the type is a FunctionType, the return type is a Union, the last constituent of + // the union is `undefined` + if (type.symbol && type.symbol.declarations.length === 1 && ts.isFunctionTypeNode(type.symbol.declarations[0])) { + var funcTypeNode = type.symbol.declarations[0]; + var returnType = getReturnTypeFromAnnotation(funcTypeNode); + if (returnType && returnType.flags & 1048576 /* Union */) { + var unionTypes_3 = funcTypeNode.type.types; + if (unionTypes_3 && unionTypes_3[unionTypes_3.length - 1].kind === 145 /* UndefinedKeyword */) { + var parenedFuncType = ts.getMutableClone(funcTypeNode); + // Highlight to the end of the second to last constituent of the union + parenedFuncType.end = unionTypes_3[unionTypes_3.length - 2].end; + ts.addRelatedInfo(diag, ts.createDiagnosticForNode(parenedFuncType, ts.Diagnostics.Did_you_mean_to_parenthesize_this_function_type)); + } + } + } // Return the declared type to reduce follow-on errors return type; } @@ -52025,18 +52296,22 @@ var ts; return undefined; } // In a typed function call, an argument or substitution expression is contextually typed by the type of the corresponding parameter. - function getContextualTypeForArgument(callTarget, arg) { + function getContextualTypeForArgument(callTarget, arg, contextFlags) { var args = getEffectiveCallArguments(callTarget); var argIndex = args.indexOf(arg); // -1 for e.g. the expression of a CallExpression, or the tag of a TaggedTemplateExpression - return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex); + return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex, contextFlags); } - function getContextualTypeForArgumentAtIndex(callTarget, argIndex) { + function getContextualTypeForArgumentAtIndex(callTarget, argIndex, contextFlags) { // If we're already in the process of resolving the given signature, don't resolve again as // that could cause infinite recursion. Instead, return anySignature. var signature = getNodeLinks(callTarget).resolvedSignature === resolvingSignature ? resolvingSignature : getResolvedSignature(callTarget); if (ts.isJsxOpeningLikeElement(callTarget) && argIndex === 0) { return getEffectiveFirstArgumentForJsxSignature(signature, callTarget); } + if (contextFlags && contextFlags & 4 /* Completion */ && signature.target) { + var baseSignature = getBaseSignature(signature.target); + return intersectTypes(getTypeAtPosition(signature, argIndex), getTypeAtPosition(baseSignature, argIndex)); + } return getTypeAtPosition(signature, argIndex); } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { @@ -52395,7 +52670,7 @@ var ts; } /* falls through */ case 196 /* NewExpression */: - return getContextualTypeForArgument(parent, node); + return getContextualTypeForArgument(parent, node, contextFlags); case 198 /* TypeAssertionExpression */: case 216 /* AsExpression */: return ts.isConstTypeReference(parent.type) ? undefined : getTypeFromTypeNode(parent.type); @@ -52610,8 +52885,8 @@ var ts; } var signatureList; var types = type.types; - for (var _i = 0, types_15 = types; _i < types_15.length; _i++) { - var current = types_15[_i]; + for (var _i = 0, types_16 = types; _i < types_16.length; _i++) { + var current = types_16[_i]; var signature = getContextualCallSignature(current, node); if (signature) { if (!signatureList) { @@ -52712,7 +52987,7 @@ var ts; var literalType = type.literalType; if (!literalType) { literalType = type.literalType = cloneTypeReference(type); - literalType.objectFlags |= 65536 /* ArrayLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */; + literalType.objectFlags |= 65536 /* ArrayLiteral */ | 1048576 /* ContainsObjectOrArrayLiteral */; } return literalType; } @@ -52849,7 +53124,7 @@ var ts; checkTypeAssignableTo(type, getTypeFromTypeNode(enumTag.typeExpression), memberDecl); } } - objectFlags |= ts.getObjectFlags(type) & 1835008 /* PropagatingFlags */; + objectFlags |= ts.getObjectFlags(type) & 3670016 /* PropagatingFlags */; var nameType = computedNameType && isTypeUsableAsPropertyName(computedNameType) ? computedNameType : undefined; var prop = nameType ? createSymbol(4 /* Property */ | member.flags, getPropertyNameFromType(nameType), checkFlags | 4096 /* Late */) : @@ -52958,7 +53233,7 @@ var ts; var stringIndexInfo = hasComputedStringProperty ? getObjectLiteralIndexInfo(node, offset, propertiesArray, 0 /* String */) : undefined; var numberIndexInfo = hasComputedNumberProperty ? getObjectLiteralIndexInfo(node, offset, propertiesArray, 1 /* Number */) : undefined; var result = createAnonymousType(node.symbol, propertiesTable, ts.emptyArray, ts.emptyArray, stringIndexInfo, numberIndexInfo); - result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */; + result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 1048576 /* ContainsObjectOrArrayLiteral */; if (isJSObjectLiteral) { result.objectFlags |= 16384 /* JSLiteral */; } @@ -53056,7 +53331,7 @@ var ts; var member = attributeDecl.symbol; if (ts.isJsxAttribute(attributeDecl)) { var exprType = checkJsxAttribute(attributeDecl, checkMode); - objectFlags |= ts.getObjectFlags(exprType) & 1835008 /* PropagatingFlags */; + objectFlags |= ts.getObjectFlags(exprType) & 3670016 /* PropagatingFlags */; var attributeSymbol = createSymbol(4 /* Property */ | 33554432 /* Transient */ | member.flags, member.escapedName); attributeSymbol.declarations = member.declarations; attributeSymbol.parent = member.parent; @@ -53136,7 +53411,7 @@ var ts; function createJsxAttributesType() { objectFlags |= freshObjectLiteralFlag; var result = createAnonymousType(attributes.symbol, attributesTable, ts.emptyArray, ts.emptyArray, /*stringIndexInfo*/ undefined, /*numberIndexInfo*/ undefined); - result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */; + result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 1048576 /* ContainsObjectOrArrayLiteral */; return result; } } @@ -53608,8 +53883,8 @@ var ts; function symbolHasNonMethodDeclaration(symbol) { return !!forEachProperty(symbol, function (prop) { return !(prop.flags & 8192 /* Method */); }); } - function checkNonNullExpression(node, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic) { - return checkNonNullType(checkExpression(node), node, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic); + function checkNonNullExpression(node) { + return checkNonNullType(checkExpression(node), node); } function isNullableType(type) { return !!((strictNullChecks ? getFalsyFlags(type) : type.flags) & 98304 /* Nullable */); @@ -53617,22 +53892,34 @@ var ts; function getNonNullableTypeIfNeeded(type) { return isNullableType(type) ? getNonNullableType(type) : type; } - function checkNonNullType(type, node, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic) { + function reportObjectPossiblyNullOrUndefinedError(node, flags) { + error(node, flags & 32768 /* Undefined */ ? flags & 65536 /* Null */ ? + ts.Diagnostics.Object_is_possibly_null_or_undefined : + ts.Diagnostics.Object_is_possibly_undefined : + ts.Diagnostics.Object_is_possibly_null); + } + function reportCannotInvokePossiblyNullOrUndefinedError(node, flags) { + error(node, flags & 32768 /* Undefined */ ? flags & 65536 /* Null */ ? + ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null_or_undefined : + ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_undefined : + ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null); + } + function checkNonNullTypeWithReporter(type, node, reportError) { if (strictNullChecks && type.flags & 2 /* Unknown */) { error(node, ts.Diagnostics.Object_is_of_type_unknown); return errorType; } var kind = (strictNullChecks ? getFalsyFlags(type) : type.flags) & 98304 /* Nullable */; if (kind) { - error(node, kind & 32768 /* Undefined */ ? kind & 65536 /* Null */ ? - (nullOrUndefinedDiagnostic || ts.Diagnostics.Object_is_possibly_null_or_undefined) : - (undefinedDiagnostic || ts.Diagnostics.Object_is_possibly_undefined) : - (nullDiagnostic || ts.Diagnostics.Object_is_possibly_null)); + reportError(node, kind); var t = getNonNullableType(type); return t.flags & (98304 /* Nullable */ | 131072 /* Never */) ? errorType : t; } return type; } + function checkNonNullType(type, node) { + return checkNonNullTypeWithReporter(type, node, reportObjectPossiblyNullOrUndefinedError); + } function checkNonNullNonVoidType(type, node) { var nonNullType = checkNonNullType(type, node); if (nonNullType !== errorType && nonNullType.flags & 16384 /* Void */) { @@ -53641,10 +53928,16 @@ var ts; return nonNullType; } function checkPropertyAccessExpression(node) { - return checkPropertyAccessExpressionOrQualifiedName(node, node.expression, node.name); + return node.flags & 32 /* OptionalChain */ ? checkPropertyAccessChain(node) : + checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name); + } + function checkPropertyAccessChain(node) { + var leftType = checkExpression(node.expression); + var nonOptionalType = getOptionalExpressionType(leftType, node.expression); + return propagateOptionalTypeMarker(checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullType(nonOptionalType, node.expression), node.name), node, nonOptionalType !== leftType); } function checkQualifiedName(node) { - return checkPropertyAccessExpressionOrQualifiedName(node, node.left, node.right); + return checkPropertyAccessExpressionOrQualifiedName(node, node.left, checkNonNullExpression(node.left), node.right); } function isMethodAccessForCall(node) { while (node.parent.kind === 199 /* ParenthesizedExpression */) { @@ -53652,8 +53945,7 @@ var ts; } return ts.isCallOrNewExpression(node.parent) && node.parent.expression === node; } - function checkPropertyAccessExpressionOrQualifiedName(node, left, right) { - var _a = checkOptionalExpression(node, left), isOptional = _a.isOptional, leftType = _a.type; + function checkPropertyAccessExpressionOrQualifiedName(node, left, leftType, right) { var parentSymbol = getNodeLinks(left).resolvedSymbol; var assignmentKind = ts.getAssignmentTargetKind(node); var apparentType = getApparentType(assignmentKind !== 0 /* None */ || isMethodAccessForCall(node) ? getWidenedType(leftType) : leftType); @@ -53706,7 +53998,7 @@ var ts; } propType = getConstraintForLocation(getTypeOfSymbol(prop), node); } - return propagateOptionalTypeMarker(getFlowTypeOfAccessExpression(node, prop, propType, right), isOptional); + return getFlowTypeOfAccessExpression(node, prop, propType, right); } function getFlowTypeOfAccessExpression(node, prop, propType, errorNode) { // Only compute control flow type if this is a property access expression that isn't an @@ -54028,7 +54320,15 @@ var ts; return false; } function checkIndexedAccess(node) { - var _a = checkOptionalExpression(node, node.expression), isOptional = _a.isOptional, exprType = _a.type; + return node.flags & 32 /* OptionalChain */ ? checkElementAccessChain(node) : + checkElementAccessExpression(node, checkNonNullExpression(node.expression)); + } + function checkElementAccessChain(node) { + var exprType = checkExpression(node.expression); + var nonOptionalType = getOptionalExpressionType(exprType, node.expression); + return propagateOptionalTypeMarker(checkElementAccessExpression(node, checkNonNullType(nonOptionalType, node.expression)), node, nonOptionalType !== exprType); + } + function checkElementAccessExpression(node, exprType) { var objectType = ts.getAssignmentTargetKind(node) !== 0 /* None */ || isMethodAccessForCall(node) ? getWidenedType(exprType) : exprType; var indexExpression = node.argumentExpression; var indexType = checkExpression(indexExpression); @@ -54044,7 +54344,7 @@ var ts; 2 /* Writing */ | (isGenericObjectType(objectType) && !isThisTypeParameter(objectType) ? 1 /* NoIndexSignatures */ : 0) : 0 /* None */; var indexedAccessType = getIndexedAccessTypeOrUndefined(objectType, effectiveIndexType, node, accessFlags) || errorType; - return propagateOptionalTypeMarker(checkIndexedAccessIndexType(getFlowTypeOfAccessExpression(node, indexedAccessType.symbol, indexedAccessType, indexExpression), node), isOptional); + return checkIndexedAccessIndexType(getFlowTypeOfAccessExpression(node, indexedAccessType.symbol, indexedAccessType, indexExpression), node); } function checkThatExpressionIsProperSymbolReference(expression, expressionType, reportError) { if (expressionType === errorType) { @@ -54115,7 +54415,7 @@ var ts; // interface B extends A { (x: 'foo'): string } // const b: B; // b('foo') // <- here overloads should be processed as [(x:'foo'): string, (x: string): void] - function reorderCandidates(signatures, result, isOptionalCall) { + function reorderCandidates(signatures, result, callChainFlags) { var lastParent; var lastSymbol; var cutoffIndex = 0; @@ -54145,7 +54445,7 @@ var ts; lastSymbol = symbol; // specialized signatures always need to be placed before non-specialized signatures regardless // of the cutoff position; see GH#1133 - if (signature.hasLiteralTypes) { + if (signatureHasLiteralTypes(signature)) { specializedIndex++; spliceIndex = specializedIndex; // The cutoff index always needs to be greater than or equal to the specialized signature index @@ -54156,7 +54456,7 @@ var ts; else { spliceIndex = index; } - result.splice(spliceIndex, 0, isOptionalCall ? createOptionalCallSignature(signature) : signature); + result.splice(spliceIndex, 0, callChainFlags ? getOptionalCallSignature(signature, callChainFlags) : signature); } } function isSpreadArgument(arg) { @@ -54240,7 +54540,7 @@ var ts; // the declared number of type parameters, the call has an incorrect arity. var numTypeParameters = ts.length(signature.typeParameters); var minTypeArgumentCount = getMinTypeArgumentCount(signature.typeParameters); - return !typeArguments || + return !ts.some(typeArguments) || (typeArguments.length >= minTypeArgumentCount && typeArguments.length <= numTypeParameters); } // If type has a single call signature and no other members, return that signature. Otherwise, return undefined. @@ -54451,7 +54751,19 @@ var ts; // If the signature's 'this' type is voidType, then the check is skipped -- anything is compatible. // If the expression is a new expression, then the check is skipped. var thisArgumentNode = getThisArgumentOfCall(node); - var thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType; + var thisArgumentType = void 0; + if (thisArgumentNode) { + thisArgumentType = checkExpression(thisArgumentNode); + if (ts.isOptionalChainRoot(thisArgumentNode.parent)) { + thisArgumentType = getNonNullableType(thisArgumentType); + } + else if (ts.isOptionalChain(thisArgumentNode.parent)) { + thisArgumentType = removeOptionalTypeMarker(thisArgumentType); + } + } + else { + thisArgumentType = voidType; + } var errorNode = reportErrors ? (thisArgumentNode || node) : undefined; var headMessage_1 = ts.Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1; if (!checkTypeRelatedTo(thisArgumentType, thisType, relation, errorNode, headMessage_1, containingMessageChain, errorOutputContainer)) { @@ -54678,7 +54990,7 @@ var ts; if (closestSignature && getMinArgumentCount(closestSignature) > argCount && closestSignature.declaration) { var paramDecl = closestSignature.declaration.parameters[closestSignature.thisParameter ? argCount + 1 : argCount]; if (paramDecl) { - related = ts.createDiagnosticForNode(paramDecl, ts.isBindingPattern(paramDecl.name) ? ts.Diagnostics.An_argument_matching_this_binding_pattern_was_not_provided : ts.Diagnostics.An_argument_for_0_was_not_provided, !paramDecl.name ? argCount : !ts.isBindingPattern(paramDecl.name) ? ts.idText(getFirstIdentifier(paramDecl.name)) : undefined); + related = ts.createDiagnosticForNode(paramDecl, ts.isBindingPattern(paramDecl.name) ? ts.Diagnostics.An_argument_matching_this_binding_pattern_was_not_provided : ts.Diagnostics.An_argument_for_0_was_not_provided, !paramDecl.name ? argCount : !ts.isBindingPattern(paramDecl.name) ? ts.idText(ts.getFirstIdentifier(paramDecl.name)) : undefined); } } if (min < argCount && argCount < max) { @@ -54734,7 +55046,7 @@ var ts; } return ts.createDiagnosticForNodeArray(ts.getSourceFileOfNode(node), typeArguments, ts.Diagnostics.Expected_0_type_arguments_but_got_1, belowArgCount === -Infinity ? aboveArgCount : belowArgCount, argCount); } - function resolveCall(node, signatures, candidatesOutArray, checkMode, isOptionalCall, fallbackError) { + function resolveCall(node, signatures, candidatesOutArray, checkMode, callChainFlags, fallbackError) { var isTaggedTemplate = node.kind === 197 /* TaggedTemplateExpression */; var isDecorator = node.kind === 156 /* Decorator */; var isJsxOpeningOrSelfClosingElement = ts.isJsxOpeningLikeElement(node); @@ -54749,7 +55061,7 @@ var ts; } var candidates = candidatesOutArray || []; // reorderCandidates fills up the candidates array directly - reorderCandidates(signatures, candidates, isOptionalCall); + reorderCandidates(signatures, candidates, callChainFlags); if (!candidates.length) { if (reportErrors) { diagnostics.add(getDiagnosticForCallNode(node, ts.Diagnostics.Call_target_does_not_contain_any_signatures)); @@ -54911,7 +55223,7 @@ var ts; candidateForTypeArgumentError = undefined; if (isSingleNonGenericCandidate) { var candidate = candidates[0]; - if (typeArguments || !hasCorrectArity(node, args, candidate, signatureHelpTrailingComma)) { + if (ts.some(typeArguments) || !hasCorrectArity(node, args, candidate, signatureHelpTrailingComma)) { return undefined; } if (getSignatureApplicabilityError(node, args, candidate, relation, 0 /* Normal */, /*reportErrors*/ false, /*containingMessageChain*/ undefined)) { @@ -54929,7 +55241,7 @@ var ts; var inferenceContext = void 0; if (candidate.typeParameters) { var typeArgumentTypes = void 0; - if (typeArguments) { + if (ts.some(typeArguments)) { typeArgumentTypes = checkTypeArguments(candidate, typeArguments, /*reportErrors*/ false); if (!typeArgumentTypes) { candidateForTypeArgumentError = candidate; @@ -55004,34 +55316,34 @@ var ts; var _a = ts.minAndMax(candidates, getNumNonRestParameters), minArgumentCount = _a.min, maxNonRestParam = _a.max; var parameters = []; var _loop_15 = function (i) { - var symbols = ts.mapDefined(candidates, function (_a) { - var parameters = _a.parameters, hasRestParameter = _a.hasRestParameter; - return hasRestParameter ? - i < parameters.length - 1 ? parameters[i] : ts.last(parameters) : - i < parameters.length ? parameters[i] : undefined; - }); + var symbols = ts.mapDefined(candidates, function (s) { return signatureHasRestParameter(s) ? + i < s.parameters.length - 1 ? s.parameters[i] : ts.last(s.parameters) : + i < s.parameters.length ? s.parameters[i] : undefined; }); ts.Debug.assert(symbols.length !== 0); parameters.push(createCombinedSymbolFromTypes(symbols, ts.mapDefined(candidates, function (candidate) { return tryGetTypeAtPosition(candidate, i); }))); }; for (var i = 0; i < maxNonRestParam; i++) { _loop_15(i); } - var restParameterSymbols = ts.mapDefined(candidates, function (c) { return c.hasRestParameter ? ts.last(c.parameters) : undefined; }); - var hasRestParameter = restParameterSymbols.length !== 0; - if (hasRestParameter) { + var restParameterSymbols = ts.mapDefined(candidates, function (c) { return signatureHasRestParameter(c) ? ts.last(c.parameters) : undefined; }); + var flags = 0 /* None */; + if (restParameterSymbols.length !== 0) { var type = createArrayType(getUnionType(ts.mapDefined(candidates, tryGetRestTypeOfSignature), 2 /* Subtype */)); parameters.push(createCombinedSymbolForOverloadFailure(restParameterSymbols, type)); + flags |= 1 /* HasRestParameter */; + } + if (candidates.some(signatureHasLiteralTypes)) { + flags |= 2 /* HasLiteralTypes */; } return createSignature(candidates[0].declaration, /*typeParameters*/ undefined, // Before calling this we tested for `!candidates.some(c => !!c.typeParameters)`. thisParameter, parameters, /*resolvedReturnType*/ getIntersectionType(candidates.map(getReturnTypeOfSignature)), - /*typePredicate*/ undefined, minArgumentCount, hasRestParameter, - /*hasLiteralTypes*/ candidates.some(function (c) { return c.hasLiteralTypes; })); + /*typePredicate*/ undefined, minArgumentCount, flags); } function getNumNonRestParameters(signature) { var numParams = signature.parameters.length; - return signature.hasRestParameter ? numParams - 1 : numParams; + return signatureHasRestParameter(signature) ? numParams - 1 : numParams; } function createCombinedSymbolFromTypes(sources, types) { return createCombinedSymbolForOverloadFailure(sources, getUnionType(types, 2 /* Subtype */)); @@ -55107,12 +55419,24 @@ var ts; var baseTypeNode = ts.getEffectiveBaseTypeNode(ts.getContainingClass(node)); if (baseTypeNode) { var baseConstructors = getInstantiatedConstructorsForTypeArguments(superType, baseTypeNode.typeArguments, baseTypeNode); - return resolveCall(node, baseConstructors, candidatesOutArray, checkMode, /*isOptional*/ false); + return resolveCall(node, baseConstructors, candidatesOutArray, checkMode, 0 /* None */); } } return resolveUntypedCall(node); } - var _b = checkOptionalExpression(node, node.expression, ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null, ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_undefined, ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null_or_undefined), isOptional = _b.isOptional, funcType = _b.type; + var callChainFlags; + var funcType = checkExpression(node.expression); + if (ts.isCallChain(node)) { + var nonOptionalType = getOptionalExpressionType(funcType, node.expression); + callChainFlags = nonOptionalType === funcType ? 0 /* None */ : + ts.isOutermostOptionalChain(node) ? 8 /* IsOuterCallChain */ : + 4 /* IsInnerCallChain */; + funcType = nonOptionalType; + } + else { + callChainFlags = 0 /* None */; + } + funcType = checkNonNullTypeWithReporter(funcType, node.expression, reportCannotInvokePossiblyNullOrUndefinedError); if (funcType === silentNeverType) { return silentNeverSignature; } @@ -55178,7 +55502,7 @@ var ts; error(node, ts.Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType)); return resolveErrorCall(node); } - return resolveCall(node, callSignatures, candidatesOutArray, checkMode, isOptional); + return resolveCall(node, callSignatures, candidatesOutArray, checkMode, callChainFlags); } function isGenericFunctionReturningFunction(signature) { return !!(signature.typeParameters && isFunctionType(getReturnTypeOfSignature(signature))); @@ -55241,7 +55565,7 @@ var ts; error(node, ts.Diagnostics.Cannot_create_an_instance_of_an_abstract_class); return resolveErrorCall(node); } - return resolveCall(node, constructSignatures, candidatesOutArray, checkMode, /*isOptional*/ false); + return resolveCall(node, constructSignatures, candidatesOutArray, checkMode, 0 /* None */); } // If expressionType's apparent type is an object type with no construct signatures but // one or more call signatures, the expression is processed as a function call. A compile-time @@ -55249,7 +55573,7 @@ var ts; // operation is Any. It is an error to have a Void this type. var callSignatures = getSignaturesOfType(expressionType, 0 /* Call */); if (callSignatures.length) { - var signature = resolveCall(node, callSignatures, candidatesOutArray, checkMode, /*isOptional*/ false); + var signature = resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */); if (!noImplicitAny) { if (signature.declaration && !isJSConstructor(signature.declaration) && getReturnTypeOfSignature(signature) !== voidType) { error(node, ts.Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword); @@ -55334,8 +55658,8 @@ var ts; if (apparentType.flags & 1048576 /* Union */) { var types = apparentType.types; var hasSignatures = false; - for (var _i = 0, types_16 = types; _i < types_16.length; _i++) { - var constituent = types_16[_i]; + for (var _i = 0, types_17 = types; _i < types_17.length; _i++) { + var constituent = types_17[_i]; var signatures = getSignaturesOfType(constituent, kind); if (signatures.length !== 0) { hasSignatures = true; @@ -55426,7 +55750,7 @@ var ts; invocationError(node.tag, apparentType, 0 /* Call */); return resolveErrorCall(node); } - return resolveCall(node, callSignatures, candidatesOutArray, checkMode, /*isOptional*/ false); + return resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */); } /** * Gets the localized diagnostic head message to use for errors when resolving a decorator as a call expression. @@ -55479,7 +55803,7 @@ var ts; invocationErrorRecovery(apparentType, 0 /* Call */, diag); return resolveErrorCall(node); } - return resolveCall(node, callSignatures, candidatesOutArray, checkMode, /*isOptional*/ false, headMessage); + return resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */, headMessage); } function createSignatureForJSXIntrinsic(node, result) { var namespace = getJsxNamespaceAt(node); @@ -55494,9 +55818,7 @@ var ts; return createSignature(declaration, /*typeParameters*/ undefined, /*thisParameter*/ undefined, [parameterSymbol], typeSymbol ? getDeclaredTypeOfSymbol(typeSymbol) : errorType, - /*returnTypePredicate*/ undefined, 1, - /*hasRestparameter*/ false, - /*hasLiteralTypes*/ false); + /*returnTypePredicate*/ undefined, 1, 0 /* None */); } function resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode) { if (isJsxIntrinsicIdentifier(node.tagName)) { @@ -55519,7 +55841,7 @@ var ts; error(node.tagName, ts.Diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, ts.getTextOfNode(node.tagName)); return resolveErrorCall(node); } - return resolveCall(node, signatures, candidatesOutArray, checkMode, /*isOptional*/ false); + return resolveCall(node, signatures, candidatesOutArray, checkMode, 0 /* None */); } /** * Sometimes, we have a decorator that could accept zero arguments, @@ -55529,7 +55851,7 @@ var ts; function isPotentiallyUncalledDecorator(decorator, signatures) { return signatures.length && ts.every(signatures, function (signature) { return signature.minArgumentCount === 0 && - !signature.hasRestParameter && + !signatureHasRestParameter(signature) && signature.parameters.length < getDecoratorArgumentCount(decorator, signature); }); } @@ -55600,7 +55922,7 @@ var ts; return false; } function mergeJSSymbols(target, source) { - if (source && (ts.hasEntries(source.exports) || ts.hasEntries(source.members))) { + if (source) { var links = getSymbolLinks(source); if (!links.inferredClassSymbol || !links.inferredClassSymbol.has("" + getSymbolId(target))) { var inferred = isTransientSymbol(target) ? target : cloneSymbol(target); @@ -55910,7 +56232,7 @@ var ts; return type; } function getParameterNameAtPosition(signature, pos) { - var paramCount = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + var paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); if (pos < paramCount) { return signature.parameters[pos].escapedName; } @@ -55927,11 +56249,11 @@ var ts; return tryGetTypeAtPosition(signature, pos) || anyType; } function tryGetTypeAtPosition(signature, pos) { - var paramCount = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + var paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); if (pos < paramCount) { return getTypeOfParameter(signature.parameters[pos]); } - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { // We want to return the value undefined for an out of bounds parameter position, // so we need to check bounds here before calling getIndexedAccessType (which // otherwise would return the type 'undefined'). @@ -55966,7 +56288,7 @@ var ts; } function getParameterCount(signature) { var length = signature.parameters.length; - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var restType = getTypeOfSymbol(signature.parameters[length - 1]); if (isTupleType(restType)) { return length + getTypeArguments(restType).length - 1; @@ -55975,7 +56297,7 @@ var ts; return length; } function getMinArgumentCount(signature) { - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); if (isTupleType(restType)) { var minLength = restType.target.minLength; @@ -55987,14 +56309,14 @@ var ts; return signature.minArgumentCount; } function hasEffectiveRestParameter(signature) { - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); return !isTupleType(restType) || restType.target.hasRestElement; } return false; } function getEffectiveRestType(signature) { - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); return isTupleType(restType) ? getRestArrayTypeOfTupleType(restType) : restType; } @@ -56011,7 +56333,7 @@ var ts; return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : fallbackType; } function inferFromAnnotatedParameters(signature, context, inferenceContext) { - var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + var len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); for (var i = 0; i < len; i++) { var declaration = signature.parameters[i].valueDeclaration; if (declaration.type) { @@ -56044,7 +56366,7 @@ var ts; assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter)); } } - var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + var len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); for (var i = 0; i < len; i++) { var parameter = signature.parameters[i]; if (!ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) { @@ -56052,7 +56374,7 @@ var ts; assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType); } } - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { // parameter might be a transient symbol generated by use of `arguments` in the function body. var parameter = ts.last(signature.parameters); if (isTransientSymbol(parameter) || !ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) { @@ -56329,8 +56651,8 @@ var ts; var witnesses = getSwitchClauseTypeOfWitnesses(node); // notEqualFacts states that the type of the switched value is not equal to every type in the switch. var notEqualFacts_1 = getFactsFromTypeofSwitch(0, 0, witnesses, /*hasDefault*/ true); - var type_4 = getBaseConstraintOfType(operandType) || operandType; - return !!(filterType(type_4, function (t) { return (getTypeFacts(t) & notEqualFacts_1) === notEqualFacts_1; }).flags & 131072 /* Never */); + var type_3 = getBaseConstraintOfType(operandType) || operandType; + return !!(filterType(type_3, function (t) { return (getTypeFacts(t) & notEqualFacts_1) === notEqualFacts_1; }).flags & 131072 /* Never */); } var type = getTypeOfExpression(node.expression); if (!isLiteralType(type)) { @@ -56457,9 +56779,9 @@ var ts; return links.contextFreeType; } var returnType = getReturnTypeFromBody(node, checkMode); - var returnOnlySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, returnType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); + var returnOnlySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, returnType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */); var returnOnlyType = createAnonymousType(node.symbol, emptySymbols, [returnOnlySignature], ts.emptyArray, undefined, undefined); - returnOnlyType.objectFlags |= 1048576 /* NonInferrableType */; + returnOnlyType.objectFlags |= 2097152 /* NonInferrableType */; return links.contextFreeType = returnOnlyType; } return anyFunctionType; @@ -56688,8 +57010,7 @@ var ts; var span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos); var diagnostic = ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.await_expression_is_only_allowed_within_an_async_function); var func = ts.getContainingFunction(node); - if (func && func.kind !== 161 /* Constructor */) { - ts.Debug.assert((ts.getFunctionFlags(func) & 2 /* Async */) === 0, "Enclosing function should never be an async function."); + if (func && func.kind !== 161 /* Constructor */ && (ts.getFunctionFlags(func) & 2 /* Async */) === 0) { var relatedInfo = ts.createDiagnosticForNode(func, ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async); ts.addRelatedInfo(diagnostic, relatedInfo); } @@ -56790,8 +57111,8 @@ var ts; } if (type.flags & 3145728 /* UnionOrIntersection */) { var types = type.types; - for (var _i = 0, types_17 = types; _i < types_17.length; _i++) { - var t = types_17[_i]; + for (var _i = 0, types_18 = types; _i < types_18.length; _i++) { + var t = types_18[_i]; if (maybeTypeOfKind(t, kind)) { return true; } @@ -57425,25 +57746,10 @@ var ts; } return [effectiveLeft, effectiveRight]; } - function isYieldExpressionInClass(node) { - var current = node; - var parent = node.parent; - while (parent) { - if (ts.isFunctionLike(parent) && current === parent.body) { - return false; - } - else if (ts.isClassLike(current)) { - return true; - } - current = parent; - parent = parent.parent; - } - return false; - } function checkYieldExpression(node) { // Grammar checking if (produceDiagnostics) { - if (!(node.flags & 8192 /* YieldContext */) || isYieldExpressionInClass(node)) { + if (!(node.flags & 8192 /* YieldContext */)) { grammarErrorOnFirstToken(node, ts.Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body); } if (isInParameterInitializerBeforeContainingFunction(node)) { @@ -57779,6 +58085,18 @@ var ts; } } } + function getReturnTypeOfSingleNonGenericCallSignature(funcType) { + var signature = getSingleCallSignature(funcType); + if (signature && !signature.typeParameters) { + return getReturnTypeOfSignature(signature); + } + } + function getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) { + var funcType = checkExpression(expr.expression); + var nonOptionalType = getOptionalExpressionType(funcType, expr.expression); + var returnType = getReturnTypeOfSingleNonGenericCallSignature(funcType); + return returnType && propagateOptionalTypeMarker(returnType, expr, nonOptionalType !== funcType); + } /** * Returns the type of an expression. Unlike checkExpression, this function is simply concerned * with computing the type and may not fully check all contained sub-expressions for errors. @@ -57790,10 +58108,10 @@ var ts; // Optimize for the common case of a call to a function with a single non-generic call // signature where we can just fetch the return type without checking the arguments. if (ts.isCallExpression(expr) && expr.expression.kind !== 101 /* SuperKeyword */ && !ts.isRequireCall(expr, /*checkArgumentIsStringLiteralLike*/ true) && !isSymbolOrSymbolForCall(expr)) { - var _a = checkOptionalExpression(expr, expr.expression), isOptional = _a.isOptional, funcType = _a.type; - var signature = getSingleCallSignature(funcType); - if (signature && !signature.typeParameters) { - return propagateOptionalTypeMarker(getReturnTypeOfSignature(signature), isOptional); + var type = ts.isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : + getReturnTypeOfSingleNonGenericCallSignature(checkNonNullExpression(expr.expression)); + if (type) { + return type; } } else if (ts.isAssertionExpression(expr) && !ts.isConstTypeReference(expr.type)) { @@ -57843,7 +58161,7 @@ var ts; (node.parent.kind === 194 /* ElementAccessExpression */ && node.parent.expression === node) || ((node.kind === 75 /* Identifier */ || node.kind === 152 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || (node.parent.kind === 171 /* TypeQuery */ && node.parent.exprName === node)) || - (node.parent.kind === 261 /* ExportSpecifier */ && (compilerOptions.preserveConstEnums || node.flags & 8388608 /* Ambient */)); // We allow reexporting const enums + (node.parent.kind === 261 /* ExportSpecifier */); // We allow reexporting const enums if (!ok) { error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query); } @@ -58047,7 +58365,7 @@ var ts; } else { if (typePredicate.parameterIndex >= 0) { - if (signature.hasRestParameter && typePredicate.parameterIndex === signature.parameters.length - 1) { + if (signatureHasRestParameter(signature) && typePredicate.parameterIndex === signature.parameters.length - 1) { error(parameterName, ts.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); } else { @@ -59222,7 +59540,7 @@ var ts; return; } // Verify there is no local declaration that could collide with the promise constructor. - var rootName = promiseConstructorName && getFirstIdentifier(promiseConstructorName); + var rootName = promiseConstructorName && ts.getFirstIdentifier(promiseConstructorName); var collidingSymbol = getSymbol(node.locals, rootName.escapedText, 111551 /* Value */); if (collidingSymbol) { error(collidingSymbol.valueDeclaration, ts.Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, ts.idText(rootName), ts.entityNameToString(promiseConstructorName)); @@ -59279,7 +59597,7 @@ var ts; function markEntityNameOrEntityExpressionAsReference(typeName) { if (!typeName) return; - var rootName = getFirstIdentifier(typeName); + var rootName = ts.getFirstIdentifier(typeName); var meaning = (typeName.kind === 75 /* Identifier */ ? 788968 /* Type */ : 1920 /* Namespace */) | 2097152 /* Alias */; var rootSymbol = resolveName(rootName, rootName.escapedText, meaning, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isRefernce*/ true); if (rootSymbol @@ -59319,8 +59637,8 @@ var ts; } function getEntityNameForDecoratorMetadataFromTypeList(types) { var commonEntityName; - for (var _i = 0, types_18 = types; _i < types_18.length; _i++) { - var typeNode = types_18[_i]; + for (var _i = 0, types_19 = types; _i < types_19.length; _i++) { + var typeNode = types_19[_i]; while (typeNode.kind === 181 /* ParenthesizedType */) { typeNode = typeNode.type; // Skip parens if need be } @@ -61095,10 +61413,7 @@ var ts; firstDefaultClause = clause; } else { - var sourceFile = ts.getSourceFileOfNode(node); - var start = ts.skipTrivia(sourceFile.text, clause.pos); - var end = clause.statements.length > 0 ? clause.statements[0].pos : clause.end; - grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement); + grammarErrorOnNode(clause, ts.Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement); hasDuplicateDefaultClause = true; } } @@ -61119,6 +61434,9 @@ var ts; } } ts.forEach(clause.statements, checkSourceElement); + if (compilerOptions.noFallthroughCasesInSwitch && clause.fallthroughFlowNode && isReachableFlowNode(clause.fallthroughFlowNode)) { + error(clause, ts.Diagnostics.Fallthrough_case_in_switch); + } }); if (node.caseBlock.locals) { registerForUnusedIdentifiersCheck(node.caseBlock); @@ -61641,11 +61959,13 @@ var ts; // same when the derived property is from an assignment continue; } - if (basePropertyFlags !== 4 /* Property */ && derivedPropertyFlags === 4 /* Property */) { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_property; - } - else if (basePropertyFlags === 4 /* Property */ && derivedPropertyFlags !== 4 /* Property */) { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_accessor; + var overriddenInstanceProperty = basePropertyFlags !== 4 /* Property */ && derivedPropertyFlags === 4 /* Property */; + var overriddenInstanceAccessor = basePropertyFlags === 4 /* Property */ && derivedPropertyFlags !== 4 /* Property */; + if (overriddenInstanceProperty || overriddenInstanceAccessor) { + var errorMessage_1 = overriddenInstanceProperty ? + ts.Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property : + ts.Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor; + error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage_1, symbolToString(base), typeToString(baseType), typeToString(type)); } else { var uninitialized = ts.find(derived.declarations, function (d) { return d.kind === 158 /* PropertyDeclaration */ && !d.initializer; }); @@ -61661,24 +61981,22 @@ var ts; || !ts.isIdentifier(propName) || !strictNullChecks || !isPropertyInitializedInConstructor(propName, type, constructor)) { - var errorMessage_1 = ts.Diagnostics.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration; - error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage_1, symbolToString(base), typeToString(baseType)); + var errorMessage_2 = ts.Diagnostics.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration; + error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage_2, symbolToString(base), typeToString(baseType)); } } - // correct case - continue; } + // correct case + continue; } else if (isPrototypeProperty(base)) { - if (isPrototypeProperty(derived)) { - // method is overridden with method -- correct case + if (isPrototypeProperty(derived) || derived.flags & 4 /* Property */) { + // method is overridden with method or property -- correct case continue; } - else if (derived.flags & 98304 /* Accessor */) { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor; - } else { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property; + ts.Debug.assert(!!(derived.flags & 98304 /* Accessor */)); + errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor; } } else if (base.flags & 98304 /* Accessor */) { @@ -62184,22 +62502,6 @@ var ts; break; } } - function getFirstIdentifier(node) { - switch (node.kind) { - case 75 /* Identifier */: - return node; - case 152 /* QualifiedName */: - do { - node = node.left; - } while (node.kind !== 75 /* Identifier */); - return node; - case 193 /* PropertyAccessExpression */: - do { - node = node.expression; - } while (node.kind !== 75 /* Identifier */); - return node; - } - } function getFirstNonModuleExportsIdentifier(node) { switch (node.kind) { case 75 /* Identifier */: @@ -62329,7 +62631,7 @@ var ts; if (target !== unknownSymbol) { if (target.flags & 111551 /* Value */) { // Target is a value symbol, check that it is not hidden by a local declaration with the same name - var moduleName = getFirstIdentifier(node.moduleReference); + var moduleName = ts.getFirstIdentifier(node.moduleReference); if (!(resolveEntityName(moduleName, 111551 /* Value */ | 1920 /* Namespace */).flags & 1920 /* Namespace */)) { error(moduleName, ts.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, ts.declarationNameToString(moduleName)); } @@ -62396,7 +62698,7 @@ var ts; // find immediate value referenced by exported name (SymbolFlags.Alias is set so we don't chase down aliases) var symbol = resolveName(exportedName, exportedName.escapedText, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ true); - if (symbol && (symbol === undefinedSymbol || isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0])))) { + if (symbol && (symbol === undefinedSymbol || symbol === globalThisSymbol || isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0])))) { error(exportedName, ts.Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, ts.idText(exportedName)); } else { @@ -64702,10 +65004,10 @@ var ts; if (type.flags & 4 /* String */ || type.flags & 8 /* Number */) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead, ts.getTextOfNode(parameter.name), typeToString(type), typeToString(node.type ? getTypeFromTypeNode(node.type) : anyType)); } - if (type.flags & 1048576 /* Union */ && allTypesAssignableToKind(type, 128 /* StringLiteral */, /*strict*/ true)) { + if (type.flags & 1048576 /* Union */ && allTypesAssignableToKind(type, 384 /* StringOrNumberLiteral */, /*strict*/ true)) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead); } - return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number); + return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_either_string_or_number); } if (!node.type) { return grammarErrorOnNode(node, ts.Diagnostics.An_index_signature_must_have_a_type_annotation); @@ -65588,7 +65890,7 @@ var ts; } function checkGrammarImportCallExpression(node) { if (moduleKind === ts.ModuleKind.ES2015) { - return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext); + return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_commonjs_amd_system_or_umd); } if (node.typeArguments) { return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_cannot_have_type_arguments); @@ -65658,6 +65960,14 @@ var ts; case 2 /* Next */: return "nextType"; } } + function signatureHasRestParameter(s) { + return !!(s.flags & 1 /* HasRestParameter */); + } + ts.signatureHasRestParameter = signatureHasRestParameter; + function signatureHasLiteralTypes(s) { + return !!(s.flags & 2 /* HasLiteralTypes */); + } + ts.signatureHasLiteralTypes = signatureHasLiteralTypes; })(ts || (ts = {})); var ts; (function (ts) { @@ -66591,7 +66901,9 @@ var ts; } ts.createPropertyAccess = createPropertyAccess; function updatePropertyAccess(node, expression, name) { - ts.Debug.assert(!(node.flags & 32 /* OptionalChain */), "Cannot update a PropertyAccessChain using updatePropertyAccess. Use updatePropertyAccessChain instead."); + if (ts.isOptionalChain(node)) { + return updatePropertyAccessChain(node, expression, node.questionDotToken, name); + } // Because we are updating existed propertyAccess we want to inherit its emitFlags // instead of using the default from createPropertyAccess return node.expression !== expression @@ -66629,7 +66941,9 @@ var ts; } ts.createElementAccess = createElementAccess; function updateElementAccess(node, expression, argumentExpression) { - ts.Debug.assert(!(node.flags & 32 /* OptionalChain */), "Cannot update an ElementAccessChain using updateElementAccess. Use updateElementAccessChain instead."); + if (ts.isOptionalChain(node)) { + return updateElementAccessChain(node, expression, node.questionDotToken, argumentExpression); + } return node.expression !== expression || node.argumentExpression !== argumentExpression ? updateNode(createElementAccess(expression, argumentExpression), node) @@ -66663,7 +66977,9 @@ var ts; } ts.createCall = createCall; function updateCall(node, expression, typeArguments, argumentsArray) { - ts.Debug.assert(!(node.flags & 32 /* OptionalChain */), "Cannot update a CallChain using updateCall. Use updateCallChain instead."); + if (ts.isOptionalChain(node)) { + return updateCallChain(node, expression, node.questionDotToken, typeArguments, argumentsArray); + } return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray @@ -67265,7 +67581,7 @@ var ts; var node = createSynthesizedNode(231 /* ForOfStatement */); node.awaitModifier = awaitModifier; node.initializer = initializer; - node.expression = expression; + node.expression = ts.isCommaSequence(expression) ? createParen(expression) : expression; node.statement = asEmbeddedStatement(statement); return node; } @@ -69791,7 +70107,7 @@ var ts; var conditionalPrecedence = ts.getOperatorPrecedence(209 /* ConditionalExpression */, 57 /* QuestionToken */); var emittedCondition = ts.skipPartiallyEmittedExpressions(condition); var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition); - if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1 /* LessThan */) { + if (ts.compareValues(conditionPrecedence, conditionalPrecedence) !== 1 /* GreaterThan */) { return ts.createParen(condition); } return condition; @@ -70389,6 +70705,12 @@ var ts; * Gets the property name of a BindingOrAssignmentElement */ function getPropertyNameOfBindingOrAssignmentElement(bindingElement) { + var propertyName = tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement); + ts.Debug.assert(!!propertyName || ts.isSpreadAssignment(bindingElement), "Invalid property name for binding element."); + return propertyName; + } + ts.getPropertyNameOfBindingOrAssignmentElement = getPropertyNameOfBindingOrAssignmentElement; + function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { case 190 /* BindingElement */: // `a` in `let { a: b } = ...` @@ -70424,9 +70746,8 @@ var ts; ? target.expression : target; } - ts.Debug.fail("Invalid property name for binding element."); } - ts.getPropertyNameOfBindingOrAssignmentElement = getPropertyNameOfBindingOrAssignmentElement; + ts.tryGetPropertyNameOfBindingOrAssignmentElement = tryGetPropertyNameOfBindingOrAssignmentElement; function isStringOrNumericLiteral(node) { var kind = node.kind; return kind === 10 /* StringLiteral */ @@ -72445,7 +72766,8 @@ var ts; }; if (value) { value = ts.visitNode(value, visitor, ts.isExpression); - if (ts.isIdentifier(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText)) { + if (ts.isIdentifier(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText) || + bindingOrAssignmentElementContainsNonLiteralComputedName(node)) { // If the right-hand value of the assignment is also an assignment target then // we need to cache the right-hand value. value = ensureIdentifier(flattenContext, value, /*reuseIdentifierExpressions*/ false, location); @@ -72514,6 +72836,17 @@ var ts; } return false; } + function bindingOrAssignmentElementContainsNonLiteralComputedName(element) { + var propertyName = ts.tryGetPropertyNameOfBindingOrAssignmentElement(element); + if (propertyName && ts.isComputedPropertyName(propertyName) && !ts.isLiteralExpression(propertyName.expression)) { + return true; + } + var target = ts.getTargetOfBindingOrAssignmentElement(element); + return !!target && ts.isBindingOrAssignmentPattern(target) && bindingOrAssignmentPatternContainsNonLiteralComputedName(target); + } + function bindingOrAssignmentPatternContainsNonLiteralComputedName(pattern) { + return !!ts.forEach(ts.getElementsOfBindingOrAssignmentPattern(pattern), bindingOrAssignmentElementContainsNonLiteralComputedName); + } /** * Flattens a VariableDeclaration or ParameterDeclaration to one or more variable declarations. * @@ -72544,7 +72877,8 @@ var ts; }; if (ts.isVariableDeclaration(node)) { var initializer = ts.getInitializerOfBindingOrAssignmentElement(node); - if (initializer && ts.isIdentifier(initializer) && bindingOrAssignmentElementAssignsToName(node, initializer.escapedText)) { + if (initializer && (ts.isIdentifier(initializer) && bindingOrAssignmentElementAssignsToName(node, initializer.escapedText) || + bindingOrAssignmentElementContainsNonLiteralComputedName(node))) { // If the right-hand value of the assignment is also an assignment target then // we need to cache the right-hand value. initializer = ensureIdentifier(flattenContext, initializer, /*reuseIdentifierExpressions*/ false, initializer); @@ -73843,8 +74177,8 @@ var ts; function generateClassElementDecorationExpressions(node, isStatic) { var members = getDecoratedClassElements(node, isStatic); var expressions; - for (var _i = 0, members_5 = members; _i < members_5.length; _i++) { - var member = members_5[_i]; + for (var _i = 0, members_6 = members; _i < members_6.length; _i++) { + var member = members_6[_i]; var expression = generateClassElementDecorationExpression(node, member); if (expression) { if (!expressions) { @@ -74234,8 +74568,8 @@ var ts; // Note when updating logic here also update getEntityNameForDecoratorMetadata // so that aliases can be marked as referenced var serializedUnion; - for (var _i = 0, types_19 = types; _i < types_19.length; _i++) { - var typeNode = types_19[_i]; + for (var _i = 0, types_20 = types; _i < types_20.length; _i++) { + var typeNode = types_20[_i]; while (typeNode.kind === 181 /* ParenthesizedType */) { typeNode = typeNode.type; // Skip parens if need be } @@ -74847,7 +75181,12 @@ var ts; * * @param node The module declaration node. */ - function shouldEmitModuleDeclaration(node) { + function shouldEmitModuleDeclaration(nodeIn) { + var node = ts.getParseTreeNode(nodeIn, ts.isModuleDeclaration); + if (!node) { + // If we can't find a parse tree node, assume the node is instantiated. + return true; + } return ts.isInstantiatedModule(node, !!compilerOptions.preserveConstEnums || !!compilerOptions.isolatedModules); } /** @@ -75666,7 +76005,7 @@ var ts; // Create a temporary variable to store a computed property name (if necessary). // If it's not inlineable, then we emit an expression after the class which assigns // the property name to the temporary variable. - var expr = getPropertyNameExpressionIfNeeded(node.name, !!node.initializer); + var expr = getPropertyNameExpressionIfNeeded(node.name, !!node.initializer || !!context.getCompilerOptions().useDefineForClassFields); if (expr && !ts.isSimpleInlineableExpression(expr)) { (pendingExpressions || (pendingExpressions = [])).push(expr); } @@ -77423,7 +77762,7 @@ var ts; } return ts.updateParen(node, expression); } - function visitNonOptionalPropertyAccessExpression(node, captureThisArg) { + function visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg) { if (ts.isOptionalChain(node)) { // If `node` is an optional chain, then it is the outermost chain of an optional expression. return visitOptionalExpression(node, captureThisArg); @@ -77432,27 +77771,17 @@ var ts; ts.Debug.assertNotNode(expression, ts.isSyntheticReference); var thisArg; if (captureThisArg) { - // `a.b` -> { expression: `(_a = a).b`, thisArg: `_a` } - thisArg = ts.createTempVariable(hoistVariableDeclaration); - expression = ts.createParen(ts.createAssignment(thisArg, expression)); + if (shouldCaptureInTempVariable(expression)) { + thisArg = ts.createTempVariable(hoistVariableDeclaration); + expression = ts.createAssignment(thisArg, expression); + } + else { + thisArg = expression; + } } - expression = ts.updatePropertyAccess(node, expression, ts.visitNode(node.name, visitor, ts.isIdentifier)); - return thisArg ? ts.createSyntheticReferenceExpression(expression, thisArg) : expression; - } - function visitNonOptionalElementAccessExpression(node, captureThisArg) { - if (ts.isOptionalChain(node)) { - // If `node` is an optional chain, then it is the outermost chain of an optional expression. - return visitOptionalExpression(node, captureThisArg); - } - var expression = ts.visitNode(node.expression, visitor, ts.isExpression); - ts.Debug.assertNotNode(expression, ts.isSyntheticReference); - var thisArg; - if (captureThisArg) { - // `a[b]` -> { expression: `(_a = a)[b]`, thisArg: `_a` } - thisArg = ts.createTempVariable(hoistVariableDeclaration); - expression = ts.createParen(ts.createAssignment(thisArg, expression)); - } - expression = ts.updateElementAccess(node, expression, ts.visitNode(node.argumentExpression, visitor, ts.isExpression)); + expression = node.kind === 193 /* PropertyAccessExpression */ + ? ts.updatePropertyAccess(node, expression, ts.visitNode(node.name, visitor, ts.isIdentifier)) + : ts.updateElementAccess(node, expression, ts.visitNode(node.argumentExpression, visitor, ts.isExpression)); return thisArg ? ts.createSyntheticReferenceExpression(expression, thisArg) : expression; } function visitNonOptionalCallExpression(node, captureThisArg) { @@ -77465,8 +77794,8 @@ var ts; function visitNonOptionalExpression(node, captureThisArg) { switch (node.kind) { case 199 /* ParenthesizedExpression */: return visitNonOptionalParenthesizedExpression(node, captureThisArg); - case 193 /* PropertyAccessExpression */: return visitNonOptionalPropertyAccessExpression(node, captureThisArg); - case 194 /* ElementAccessExpression */: return visitNonOptionalElementAccessExpression(node, captureThisArg); + case 193 /* PropertyAccessExpression */: + case 194 /* ElementAccessExpression */: return visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg); case 195 /* CallExpression */: return visitNonOptionalCallExpression(node, captureThisArg); default: return ts.visitNode(node, visitor, ts.isExpression); } @@ -77474,31 +77803,36 @@ var ts; function visitOptionalExpression(node, captureThisArg) { var _a = flattenChain(node), expression = _a.expression, chain = _a.chain; var left = visitNonOptionalExpression(expression, ts.isCallChain(chain[0])); - var temp = ts.createTempVariable(hoistVariableDeclaration); var leftThisArg = ts.isSyntheticReference(left) ? left.thisArg : undefined; var leftExpression = ts.isSyntheticReference(left) ? left.expression : left; - var rightExpression = temp; + var capturedLeft = leftExpression; + if (shouldCaptureInTempVariable(leftExpression)) { + capturedLeft = ts.createTempVariable(hoistVariableDeclaration); + leftExpression = ts.createAssignment(capturedLeft, leftExpression); + } + var rightExpression = capturedLeft; var thisArg; for (var i = 0; i < chain.length; i++) { var segment = chain[i]; switch (segment.kind) { case 193 /* PropertyAccessExpression */: - if (i === chain.length - 1 && captureThisArg) { - thisArg = ts.createTempVariable(hoistVariableDeclaration); - rightExpression = ts.createParen(ts.createAssignment(thisArg, rightExpression)); - } - rightExpression = ts.createPropertyAccess(rightExpression, ts.visitNode(segment.name, visitor, ts.isIdentifier)); - break; case 194 /* ElementAccessExpression */: if (i === chain.length - 1 && captureThisArg) { - thisArg = ts.createTempVariable(hoistVariableDeclaration); - rightExpression = ts.createParen(ts.createAssignment(thisArg, rightExpression)); + if (shouldCaptureInTempVariable(rightExpression)) { + thisArg = ts.createTempVariable(hoistVariableDeclaration); + rightExpression = ts.createAssignment(thisArg, rightExpression); + } + else { + thisArg = rightExpression; + } } - rightExpression = ts.createElementAccess(rightExpression, ts.visitNode(segment.argumentExpression, visitor, ts.isExpression)); + rightExpression = segment.kind === 193 /* PropertyAccessExpression */ + ? ts.createPropertyAccess(rightExpression, ts.visitNode(segment.name, visitor, ts.isIdentifier)) + : ts.createElementAccess(rightExpression, ts.visitNode(segment.argumentExpression, visitor, ts.isExpression)); break; case 195 /* CallExpression */: if (i === 0 && leftThisArg) { - rightExpression = ts.createFunctionCall(rightExpression, leftThisArg, ts.visitNodes(segment.arguments, visitor, ts.isExpression)); + rightExpression = ts.createFunctionCall(rightExpression, leftThisArg.kind === 101 /* SuperKeyword */ ? ts.createThis() : leftThisArg, ts.visitNodes(segment.arguments, visitor, ts.isExpression)); } else { rightExpression = ts.createCall(rightExpression, @@ -77508,22 +77842,27 @@ var ts; } ts.setOriginalNode(rightExpression, segment); } - var target = ts.createConditional(ts.createLogicalOr(ts.createStrictEquality(ts.createAssignment(temp, leftExpression), ts.createNull()), ts.createStrictEquality(temp, ts.createVoidZero())), ts.createVoidZero(), rightExpression); + var target = ts.createConditional(createNotNullCondition(leftExpression, capturedLeft, /*invert*/ true), ts.createVoidZero(), rightExpression); return thisArg ? ts.createSyntheticReferenceExpression(target, thisArg) : target; } - function createNotNullCondition(node) { - return ts.createBinary(ts.createBinary(node, ts.createToken(37 /* ExclamationEqualsEqualsToken */), ts.createNull()), ts.createToken(55 /* AmpersandAmpersandToken */), ts.createBinary(node, ts.createToken(37 /* ExclamationEqualsEqualsToken */), ts.createVoidZero())); + function createNotNullCondition(left, right, invert) { + return ts.createBinary(ts.createBinary(left, ts.createToken(invert ? 36 /* EqualsEqualsEqualsToken */ : 37 /* ExclamationEqualsEqualsToken */), ts.createNull()), ts.createToken(invert ? 56 /* BarBarToken */ : 55 /* AmpersandAmpersandToken */), ts.createBinary(right, ts.createToken(invert ? 36 /* EqualsEqualsEqualsToken */ : 37 /* ExclamationEqualsEqualsToken */), ts.createVoidZero())); } function transformNullishCoalescingExpression(node) { - var expressions = []; var left = ts.visitNode(node.left, visitor, ts.isExpression); - if (!ts.isIdentifier(left)) { - var temp = ts.createTempVariable(hoistVariableDeclaration); - expressions.push(ts.createAssignment(temp, left)); - left = temp; + var right = left; + if (shouldCaptureInTempVariable(left)) { + right = ts.createTempVariable(hoistVariableDeclaration); + left = ts.createAssignment(right, left); } - expressions.push(ts.createParen(ts.createConditional(createNotNullCondition(left), left, ts.visitNode(node.right, visitor, ts.isExpression)))); - return ts.inlineExpressions(expressions); + return ts.createConditional(createNotNullCondition(left, right), right, ts.visitNode(node.right, visitor, ts.isExpression)); + } + function shouldCaptureInTempVariable(expression) { + // don't capture identifiers and `this` in a temporary variable + // `super` cannot be captured as it's no real variable + return !ts.isIdentifier(expression) && + expression.kind !== 103 /* ThisKeyword */ && + expression.kind !== 101 /* SuperKeyword */; } } ts.transformESNext = transformESNext; @@ -87681,6 +88020,7 @@ var ts; var combinedStatements; if (ts.isSourceFileJS(currentSourceFile)) { combinedStatements = ts.createNodeArray(transformDeclarationsForJS(node)); + refs.forEach(referenceVisitor); emittedImports = ts.filter(combinedStatements, ts.isAnyImportSyntax); } else { @@ -89452,7 +89792,11 @@ var ts; bundleBuildInfo.js = printer.bundleFileInfo; } function emitDeclarationFileOrBundle(sourceFileOrBundle, declarationFilePath, declarationMapPath, relativeToBuildInfo) { - if (!sourceFileOrBundle || !declarationFilePath) { + if (!sourceFileOrBundle) + return; + if (!declarationFilePath) { + if (emitOnlyDtsFiles || compilerOptions.emitDeclarationOnly) + emitSkipped = true; return; } var sourceFiles = ts.isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : sourceFileOrBundle.sourceFiles; @@ -92206,8 +92550,8 @@ var ts; bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "reference" /* Reference */, data: directive.fileName }); writeLine(); } - for (var _d = 0, types_20 = types; _d < types_20.length; _d++) { - var directive = types_20[_d]; + for (var _d = 0, types_21 = types; _d < types_21.length; _d++) { + var directive = types_21[_d]; var pos = writer.getTextPos(); writeComment("/// "); if (bundleFileInfo) @@ -94082,31 +94426,39 @@ var ts; if (existingDirectories.has(directoryPath)) { return true; } - if (system.directoryExists(directoryPath)) { + if ((compilerHost.directoryExists || system.directoryExists)(directoryPath)) { existingDirectories.set(directoryPath, true); return true; } return false; } - function ensureDirectoriesExist(directoryPath) { - if (directoryPath.length > ts.getRootLength(directoryPath) && !directoryExists(directoryPath)) { - var parentDirectory = ts.getDirectoryPath(directoryPath); - ensureDirectoriesExist(parentDirectory); - if (compilerHost.createDirectory) { - compilerHost.createDirectory(directoryPath); - } - else { - system.createDirectory(directoryPath); + function writeFile(fileName, data, writeByteOrderMark, onError) { + try { + ts.performance.mark("beforeIOWrite"); + // NOTE: If patchWriteFileEnsuringDirectory has been called, + // the system.writeFile will do its own directory creation and + // the ensureDirectoriesExist call will always be redundant. + ts.writeFileEnsuringDirectories(fileName, data, writeByteOrderMark, function (path, data, writeByteOrderMark) { return writeFileWorker(path, data, writeByteOrderMark); }, function (path) { return (compilerHost.createDirectory || system.createDirectory)(path); }, function (path) { return directoryExists(path); }); + ts.performance.mark("afterIOWrite"); + ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite"); + } + catch (e) { + if (onError) { + onError(e.message); } } } var outputFingerprints; - function writeFileIfUpdated(fileName, data, writeByteOrderMark) { + function writeFileWorker(fileName, data, writeByteOrderMark) { + if (!ts.isWatchSet(options) || !system.createHash || !system.getModifiedTime) { + system.writeFile(fileName, data, writeByteOrderMark); + return; + } if (!outputFingerprints) { outputFingerprints = ts.createMap(); } - var hash = system.createHash(data); // TODO: GH#18217 - var mtimeBefore = system.getModifiedTime(fileName); // TODO: GH#18217 + var hash = system.createHash(data); + var mtimeBefore = system.getModifiedTime(fileName); if (mtimeBefore) { var fingerprint = outputFingerprints.get(fileName); // If output has not been changed, and the file has no external modification @@ -94118,32 +94470,13 @@ var ts; } } system.writeFile(fileName, data, writeByteOrderMark); - var mtimeAfter = system.getModifiedTime(fileName) || ts.missingFileModifiedTime; // TODO: GH#18217 + var mtimeAfter = system.getModifiedTime(fileName) || ts.missingFileModifiedTime; outputFingerprints.set(fileName, { hash: hash, byteOrderMark: writeByteOrderMark, mtime: mtimeAfter }); } - function writeFile(fileName, data, writeByteOrderMark, onError) { - try { - ts.performance.mark("beforeIOWrite"); - ensureDirectoriesExist(ts.getDirectoryPath(ts.normalizePath(fileName))); - if (ts.isWatchSet(options) && system.createHash && system.getModifiedTime) { - writeFileIfUpdated(fileName, data, writeByteOrderMark); - } - else { - system.writeFile(fileName, data, writeByteOrderMark); - } - ts.performance.mark("afterIOWrite"); - ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite"); - } - catch (e) { - if (onError) { - onError(e.message); - } - } - } function getDefaultLibLocation() { return ts.getDirectoryPath(ts.normalizePath(system.getExecutingFilePath())); } @@ -95865,9 +96198,16 @@ var ts; } function getSourceFileFromReferenceWorker(fileName, getSourceFile, fail, refFile) { if (ts.hasExtension(fileName)) { - if (!options.allowNonTsExtensions && !ts.forEach(supportedExtensionsWithJsonIfResolveJsonModule, function (extension) { return ts.fileExtensionIs(host.getCanonicalFileName(fileName), extension); })) { - if (fail) - fail(ts.Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1, fileName, "'" + supportedExtensions.join("', '") + "'"); + var canonicalFileName_1 = host.getCanonicalFileName(fileName); + if (!options.allowNonTsExtensions && !ts.forEach(supportedExtensionsWithJsonIfResolveJsonModule, function (extension) { return ts.fileExtensionIs(canonicalFileName_1, extension); })) { + if (fail) { + if (ts.hasJSFileExtension(canonicalFileName_1)) { + fail(ts.Diagnostics.File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option, fileName); + } + else { + fail(ts.Diagnostics.File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1, fileName, "'" + supportedExtensions.join("', '") + "'"); + } + } return undefined; } var sourceFile = getSourceFile(fileName); @@ -95881,7 +96221,7 @@ var ts; fail(ts.Diagnostics.File_0_not_found, fileName); } } - else if (refFile && host.getCanonicalFileName(fileName) === host.getCanonicalFileName(refFile.fileName)) { + else if (refFile && canonicalFileName_1 === host.getCanonicalFileName(refFile.fileName)) { fail(ts.Diagnostics.A_file_cannot_have_a_reference_to_itself); } } @@ -95939,6 +96279,19 @@ var ts; function findSourceFile(fileName, path, isDefaultLib, ignoreNoDefaultLib, refFile, packageId) { if (useSourceOfProjectReferenceRedirect) { var source = getSourceOfProjectReferenceRedirect(fileName); + // If preserveSymlinks is true, module resolution wont jump the symlink + // but the resolved real path may be the .d.ts from project reference + // Note:: Currently we try the real path only if the + // file is from node_modules to avoid having to run real path on all file paths + if (!source && + host.realpath && + options.preserveSymlinks && + ts.isDeclarationFileName(fileName) && + ts.stringContains(fileName, ts.nodeModulesPathPart)) { + var realPath = host.realpath(fileName); + if (realPath !== fileName) + source = getSourceOfProjectReferenceRedirect(realPath); + } if (source) { var file_1 = ts.isString(source) ? findSourceFile(source, toPath(source), isDefaultLib, ignoreNoDefaultLib, refFile, packageId) : @@ -96469,9 +96822,6 @@ var ts; else if (options.incremental && !options.outFile && !options.out && !options.configFilePath) { programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified)); } - if (options.noEmit && ts.isIncrementalCompilation(options)) { - createDiagnosticForOptionName(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", options.incremental ? "incremental" : "composite"); - } verifyProjectReferences(); // List of collected files is complete; validate exhautiveness if this is a project with a file list if (options.composite) { @@ -97516,6 +97866,7 @@ var ts; ts.Debug.assert(state.seenAffectedFiles === undefined); state.seenAffectedFiles = ts.createMap(); } + state.emittedBuildInfo = !state.changedFilesSet.size && !state.affectedFilesPendingEmit; return state; } function convertToDiagnostics(diagnostics, newProgram, getCanonicalFileName) { @@ -98246,7 +98597,7 @@ var ts; } var state = { fileInfos: fileInfos, - compilerOptions: convertFromReusableCompilerOptions(program.options, toAbsolutePath), + compilerOptions: ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath), referencedMap: getMapOfReferencedSet(program.referencedMap, toPath), exportedModulesMap: getMapOfReferencedSet(program.exportedModulesMap, toPath), semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toPath(ts.isString(value) ? value : value[0]); }, function (value) { return ts.isString(value) ? ts.emptyArray : value[1]; }), @@ -98282,33 +98633,6 @@ var ts; } } ts.createBuildProgramUsingProgramBuildInfo = createBuildProgramUsingProgramBuildInfo; - function convertFromReusableCompilerOptions(options, toAbsolutePath) { - var result = {}; - var optionsNameMap = ts.getOptionNameMap().optionNameMap; - for (var name in options) { - if (ts.hasProperty(options, name)) { - result[name] = convertFromReusableCompilerOptionValue(optionsNameMap.get(name.toLowerCase()), options[name], toAbsolutePath); - } - } - if (result.configFilePath) { - result.configFilePath = toAbsolutePath(result.configFilePath); - } - return result; - } - function convertFromReusableCompilerOptionValue(option, value, toAbsolutePath) { - if (option) { - if (option.type === "list") { - var values = value; - if (option.element.isFilePath && values.length) { - return values.map(toAbsolutePath); - } - } - else if (option.isFilePath) { - return toAbsolutePath(value); - } - } - return value; - } function createRedirectedBuilderProgram(state, configFileParsingDiagnostics) { return { getState: ts.notImplemented, @@ -99041,7 +99365,7 @@ var ts; function getPreferencesForUpdate(compilerOptions, oldImportSpecifier) { return { relativePreference: ts.isExternalModuleNameRelative(oldImportSpecifier) ? 0 /* Relative */ : 1 /* NonRelative */, - ending: ts.hasJSOrJsonFileExtension(oldImportSpecifier) ? + ending: ts.hasJSFileExtension(oldImportSpecifier) ? 2 /* JsExtension */ : ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeJs || ts.endsWith(oldImportSpecifier, "index") ? 1 /* Index */ : 0 /* Minimal */, }; @@ -99127,7 +99451,7 @@ var ts; var imports = _a.imports; return ts.firstDefined(imports, function (_a) { var text = _a.text; - return ts.pathIsRelative(text) ? ts.hasJSOrJsonFileExtension(text) : undefined; + return ts.pathIsRelative(text) ? ts.hasJSFileExtension(text) : undefined; }) || false; } function numberOfDirectorySeparators(str) { @@ -99261,10 +99585,13 @@ var ts; // Simplify the full file path to something that can be resolved by Node. // If the module could be imported by a directory name, use that directory's name var moduleSpecifier = packageNameOnly ? moduleFileName : getDirectoryOrExtensionlessFileName(moduleFileName); + var globalTypingsCacheLocation = host.getGlobalTypingsCacheLocation && host.getGlobalTypingsCacheLocation(); // Get a path that's relative to node_modules or the importing file's path // if node_modules folder is in this folder or any of its parent folders, no need to keep it. - if (!ts.startsWith(sourceDirectory, getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex)))) + var pathToTopLevelNodeModules = getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex)); + if (!(ts.startsWith(sourceDirectory, pathToTopLevelNodeModules) || globalTypingsCacheLocation && ts.startsWith(getCanonicalFileName(globalTypingsCacheLocation), pathToTopLevelNodeModules))) { return undefined; + } // If the module was found in @types, get the actual Node package name var nodeModulesDirectoryName = moduleSpecifier.substring(parts.topLevelPackageNameIndex + 1); var packageName = ts.getPackageNameFromTypesPackageName(nodeModulesDirectoryName); @@ -99489,7 +99816,7 @@ var ts; /** Parses config file using System interface */ function parseConfigFileWithSystem(configFileName, optionsToExtend, system, reportDiagnostic) { var host = system; - host.onUnRecoverableConfigFileDiagnostic = function (diagnostic) { return reportUnrecoverableDiagnostic(ts.sys, reportDiagnostic, diagnostic); }; + host.onUnRecoverableConfigFileDiagnostic = function (diagnostic) { return reportUnrecoverableDiagnostic(system, reportDiagnostic, diagnostic); }; var result = ts.getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host); host.onUnRecoverableConfigFileDiagnostic = undefined; // TODO: GH#18217 return result; @@ -99513,7 +99840,7 @@ var ts; } ts.getErrorSummaryText = getErrorSummaryText; function listFiles(program, writeFileName) { - if (program.getCompilerOptions().listFiles) { + if (program.getCompilerOptions().listFiles || program.getCompilerOptions().listFilesOnly) { ts.forEach(program.getSourceFiles(), function (file) { writeFileName(file.fileName); }); @@ -99524,6 +99851,7 @@ var ts; * Helper that emit files, report diagnostics and lists emitted and/or source files depending on compiler options */ function emitFilesAndReportErrors(program, reportDiagnostic, writeFileName, reportSummary, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers) { + var isListFilesOnly = !!program.getCompilerOptions().listFilesOnly; // First get and report any syntactic errors. var diagnostics = program.getConfigFileParsingDiagnostics().slice(); var configFileParsingDiagnosticsLength = diagnostics.length; @@ -99532,13 +99860,17 @@ var ts; // semantic errors. if (diagnostics.length === configFileParsingDiagnosticsLength) { ts.addRange(diagnostics, program.getOptionsDiagnostics(cancellationToken)); - ts.addRange(diagnostics, program.getGlobalDiagnostics(cancellationToken)); - if (diagnostics.length === configFileParsingDiagnosticsLength) { - ts.addRange(diagnostics, program.getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken)); + if (!isListFilesOnly) { + ts.addRange(diagnostics, program.getGlobalDiagnostics(cancellationToken)); + if (diagnostics.length === configFileParsingDiagnosticsLength) { + ts.addRange(diagnostics, program.getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken)); + } } } // Emit and report any errors we ran into. - var emitResult = program.emit(/*targetSourceFile*/ undefined, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers); + var emitResult = isListFilesOnly + ? { emitSkipped: true, diagnostics: ts.emptyArray } + : program.emit(/*targetSourceFile*/ undefined, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers); var emittedFiles = emitResult.emittedFiles, emitDiagnostics = emitResult.diagnostics; ts.addRange(diagnostics, emitDiagnostics); ts.sortAndDeduplicateDiagnostics(diagnostics).forEach(reportDiagnostic); @@ -99641,19 +99973,13 @@ var ts; createHash: ts.maybeBind(host, host.createHash), readDirectory: ts.maybeBind(host, host.readDirectory), }; - function ensureDirectoriesExist(directoryPath) { - if (directoryPath.length > ts.getRootLength(directoryPath) && !host.directoryExists(directoryPath)) { - var parentDirectory = ts.getDirectoryPath(directoryPath); - ensureDirectoriesExist(parentDirectory); - if (host.createDirectory) - host.createDirectory(directoryPath); - } - } function writeFile(fileName, text, writeByteOrderMark, onError) { try { ts.performance.mark("beforeIOWrite"); - ensureDirectoriesExist(ts.getDirectoryPath(ts.normalizePath(fileName))); - host.writeFile(fileName, text, writeByteOrderMark); + // NOTE: If patchWriteFileEnsuringDirectory has been called, + // the host.writeFile will do its own directory creation and + // the ensureDirectoriesExist call will always be redundant. + ts.writeFileEnsuringDirectories(fileName, text, writeByteOrderMark, function (path, data, writeByteOrderMark) { return host.writeFile(path, data, writeByteOrderMark); }, function (path) { return host.createDirectory(path); }, function (path) { return host.directoryExists(path); }); ts.performance.mark("afterIOWrite"); ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite"); } @@ -101430,30 +101756,25 @@ var ts; setupInitialBuild(state, cancellationToken); var reportQueue = true; var successfulProjects = 0; - var errorProjects = 0; while (true) { var invalidatedProject = getNextInvalidatedProject(state, buildOrder, reportQueue); if (!invalidatedProject) break; reportQueue = false; invalidatedProject.done(cancellationToken); - if (state.diagnostics.has(invalidatedProject.projectPath)) { - errorProjects++; - } - else { + if (!state.diagnostics.has(invalidatedProject.projectPath)) successfulProjects++; - } } disableCache(state); reportErrorSummary(state, buildOrder); startWatching(state, buildOrder); - return isCircularBuildOrder(buildOrder) ? - ts.ExitStatus.ProjectReferenceCycle_OutputsSkupped : - errorProjects ? - successfulProjects ? - ts.ExitStatus.DiagnosticsPresent_OutputsGenerated : - ts.ExitStatus.DiagnosticsPresent_OutputsSkipped : - ts.ExitStatus.Success; + return isCircularBuildOrder(buildOrder) + ? ts.ExitStatus.ProjectReferenceCycle_OutputsSkipped + : !buildOrder.some(function (p) { return state.diagnostics.has(toResolvedConfigFilePath(state, p)); }) + ? ts.ExitStatus.Success + : successfulProjects + ? ts.ExitStatus.DiagnosticsPresent_OutputsGenerated + : ts.ExitStatus.DiagnosticsPresent_OutputsSkipped; } function clean(state, project, onlyReferences) { var buildOrder = getBuildOrderFor(state, project, onlyReferences); @@ -101461,7 +101782,7 @@ var ts; return ts.ExitStatus.InvalidProject_OutputsSkipped; if (isCircularBuildOrder(buildOrder)) { reportErrors(state, buildOrder.circularDiagnostics); - return ts.ExitStatus.ProjectReferenceCycle_OutputsSkupped; + return ts.ExitStatus.ProjectReferenceCycle_OutputsSkipped; } var options = state.options, host = state.host; var filesToDelete = options.dry ? [] : undefined; @@ -103393,6 +103714,25 @@ var ts; return a.fileName === b.fileName && textSpansEqual(a.textSpan, b.textSpan); } ts.documentSpansEqual = documentSpansEqual; + /** + * Iterates through 'array' by index and performs the callback on each element of array until the callback + * returns a truthy value, then returns that value. + * If no such value is found, the callback is applied to each element of array and undefined is returned. + */ + function forEachUnique(array, callback) { + if (array) { + for (var i = 0; i < array.length; i++) { + if (array.indexOf(array[i]) === i) { + var result = callback(array[i], i); + if (result) { + return result; + } + } + } + } + return undefined; + } + ts.forEachUnique = forEachUnique; })(ts || (ts = {})); // Display-part writer helpers /* @internal */ @@ -104140,10 +104480,11 @@ var ts; } var dependencyKeys = ["dependencies", "devDependencies", "optionalDependencies", "peerDependencies"]; var stringContent = host.readFile(fileName); - var content = stringContent && tryParseJson(stringContent); - if (!content) { + if (!stringContent) return undefined; - } + var content = tryParseJson(stringContent); + if (!content) + return false; var info = {}; for (var _i = 0, dependencyKeys_1 = dependencyKeys; _i < dependencyKeys_1.length; _i++) { var key = dependencyKeys_1[_i]; @@ -104668,8 +105009,10 @@ var ts; }); return { spans: spans, endOfLineState: 0 /* None */ }; function pushClassification(start, end, type) { + var length = end - start; + ts.Debug.assert(length > 0, "Classification had non-positive length of " + length); spans.push(start); - spans.push(end - start); + spans.push(length); spans.push(type); } } @@ -105088,8 +105431,7 @@ var ts; return 25 /* bigintLiteral */; } else if (tokenKind === 10 /* StringLiteral */) { - // TODO: GH#18217 - return token.parent.kind === 271 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; + return token && token.parent.kind === 271 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; } else if (tokenKind === 13 /* RegularExpressionLiteral */) { // TODO: we should get another classification type for these literals. @@ -105347,7 +105689,7 @@ var ts; var candidates = []; checker.getResolvedSignature(argumentInfo.invocation, candidates, argumentInfo.argumentCount); var types = ts.flatMap(candidates, function (candidate) { - if (!candidate.hasRestParameter && argumentInfo.argumentCount > candidate.parameters.length) + if (!ts.signatureHasRestParameter(candidate) && argumentInfo.argumentCount > candidate.parameters.length) return; var type = checker.getParameterType(candidate, argumentInfo.argumentIndex); isNewIdentifier = isNewIdentifier || !!(type.flags & 4 /* String */); @@ -106497,6 +106839,7 @@ var ts; var completionKind = 5 /* None */; var isNewIdentifierLocation = false; var keywordFilters = 0 /* None */; + // This also gets mutated in nested-functions after the return var symbols = []; var symbolToOriginInfoMap = []; var symbolToSortTextMap = []; @@ -106603,8 +106946,15 @@ var ts; var type = typeChecker.getTypeOfSymbolAtLocation(symbol, node).getNonOptionalType(); var insertQuestionDot = false; if (type.isNullableType()) { - insertQuestionDot = isRightOfDot && !isRightOfQuestionDot; - type = type.getNonNullableType(); + var canCorrectToQuestionDot = isRightOfDot && + !isRightOfQuestionDot && + preferences.includeAutomaticOptionalChainCompletions !== false; + if (canCorrectToQuestionDot || isRightOfQuestionDot) { + type = type.getNonNullableType(); + if (canCorrectToQuestionDot) { + insertQuestionDot = true; + } + } } addTypeProperties(type, !!(node.flags & 32768 /* AwaitContext */), insertQuestionDot); } @@ -106621,8 +106971,15 @@ var ts; var type = typeChecker.getTypeAtLocation(node).getNonOptionalType(); var insertQuestionDot = false; if (type.isNullableType()) { - insertQuestionDot = isRightOfDot && !isRightOfQuestionDot; - type = type.getNonNullableType(); + var canCorrectToQuestionDot = isRightOfDot && + !isRightOfQuestionDot && + preferences.includeAutomaticOptionalChainCompletions !== false; + if (canCorrectToQuestionDot || isRightOfQuestionDot) { + type = type.getNonNullableType(); + if (canCorrectToQuestionDot) { + insertQuestionDot = true; + } + } } addTypeProperties(type, !!(node.flags & 32768 /* AwaitContext */), insertQuestionDot); } @@ -106924,7 +107281,7 @@ var ts; typeChecker.getExportsOfModule(sym).some(function (e) { return symbolCanBeReferencedAtTypeLocation(e, seenModules); }); } /** - * Gathers symbols that can be imported from other files, deduplicating along the way. Symbols can be “duplicates” + * Gathers symbols that can be imported from other files, de-duplicating along the way. Symbols can be "duplicates" * if re-exported from another module, e.g. `export { foo } from "./a"`. That syntax creates a fresh symbol, but * it’s just an alias to the first, and both have the same name, so we generally want to filter those aliases out, * if and only if the the first can be imported (it may be excluded due to package.json filtering in @@ -107000,7 +107357,7 @@ var ts; // Don't add another completion for `export =` of a symbol that's already global. // So in `declare namespace foo {} declare module "foo" { export = foo; }`, there will just be the global completion for `foo`. if (resolvedModuleSymbol !== moduleSymbol && - ts.every(resolvedModuleSymbol.declarations, function (d) { return !!d.getSourceFile().externalModuleIndicator; })) { + ts.every(resolvedModuleSymbol.declarations, function (d) { return !!d.getSourceFile().externalModuleIndicator && !ts.findAncestor(d, ts.isGlobalScopeAugmentation); })) { pushSymbol(resolvedModuleSymbol, moduleSymbol, /*skipFilter*/ true); } for (var _i = 0, _a = typeChecker.getExportsOfModule(moduleSymbol); _i < _a.length; _i++) { @@ -107114,7 +107471,16 @@ var ts; } if (contextToken.kind === 31 /* GreaterThanToken */ && contextToken.parent) { if (contextToken.parent.kind === 266 /* JsxOpeningElement */) { - return true; + // Two possibilities: + // 1.
/**/ + // - contextToken: GreaterThanToken (before cursor) + // - location: JSXElement + // - different parents (JSXOpeningElement, JSXElement) + // 2. /**/> + // - contextToken: GreaterThanToken (before cursor) + // - location: GreaterThanToken (after cursor) + // - same parent (JSXOpeningElement) + return location.parent.kind !== 266 /* JsxOpeningElement */; } if (contextToken.parent.kind === 267 /* JsxClosingElement */ || contextToken.parent.kind === 265 /* JsxSelfClosingElement */) { return !!contextToken.parent.parent && contextToken.parent.parent.kind === 264 /* JsxElement */; @@ -107189,7 +107555,7 @@ var ts; var typeMembers; var existingMembers; if (objectLikeContainer.kind === 192 /* ObjectLiteralExpression */) { - var typeForObject = typeChecker.getContextualType(objectLikeContainer); + var typeForObject = typeChecker.getContextualType(objectLikeContainer, 4 /* Completion */); if (!typeForObject) return 2 /* Fail */; isNewIdentifierLocation = ts.hasIndexSignature(typeForObject); @@ -107766,6 +108132,8 @@ var ts; return isFunctionLikeBodyKeyword(kind) || kind === 129 /* DeclareKeyword */ || kind === 134 /* ModuleKeyword */ + || kind === 144 /* TypeKeyword */ + || kind === 135 /* NamespaceKeyword */ || ts.isTypeKeyword(kind) && kind !== 145 /* UndefinedKeyword */; case 5 /* FunctionLikeBodyKeywords */: return isFunctionLikeBodyKeyword(kind); @@ -109575,7 +109943,7 @@ var ts; return undefined; } function getReferencedSymbolsForModuleIfDeclaredBySourceFile(symbol, program, sourceFiles, cancellationToken, options, sourceFilesSet) { - var moduleSourceFile = symbol.flags & 1536 /* Module */ ? ts.find(symbol.declarations, ts.isSourceFile) : undefined; + var moduleSourceFile = (symbol.flags & 1536 /* Module */) && symbol.declarations && ts.find(symbol.declarations, ts.isSourceFile); if (!moduleSourceFile) return undefined; var exportEquals = symbol.exports.get("export=" /* ExportEquals */); @@ -110300,8 +110668,10 @@ var ts; || exportSpecifier.name.originalKeywordKind === 83 /* DefaultKeyword */; var exportKind = isDefaultExport ? 1 /* Default */ : 0 /* Named */; var exportSymbol = ts.Debug.assertDefined(exportSpecifier.symbol); - var exportInfo = ts.Debug.assertDefined(FindAllReferences.getExportInfo(exportSymbol, exportKind, state.checker)); - searchForImportsOfExport(referenceLocation, exportSymbol, exportInfo, state); + var exportInfo = FindAllReferences.getExportInfo(exportSymbol, exportKind, state.checker); + if (exportInfo) { + searchForImportsOfExport(referenceLocation, exportSymbol, exportInfo, state); + } } // At `export { x } from "foo"`, also search for the imported symbol `"foo".x`. if (search.comingFrom !== 1 /* Export */ && exportDeclaration.moduleSpecifier && !propertyName && !isForRenameWithPrefixAndSuffixText(state.options)) { @@ -111512,7 +111882,7 @@ var ts; // The property length will have two declarations of property length coming // from Array - Array and Array var documentationComment = []; - forEachUnique(declarations, function (declaration) { + ts.forEachUnique(declarations, function (declaration) { for (var _i = 0, _a = getCommentHavingNodes(declaration); _i < _a.length; _i++) { var comment = _a[_i].comment; if (comment === undefined) @@ -111541,7 +111911,7 @@ var ts; function getJsDocTagsFromDeclarations(declarations) { // Only collect doc comments from duplicate declarations once. var tags = []; - forEachUnique(declarations, function (declaration) { + ts.forEachUnique(declarations, function (declaration) { for (var _i = 0, _a = ts.getJSDocTags(declaration); _i < _a.length; _i++) { var tag = _a[_i]; tags.push({ name: tag.tagName.text, text: getCommentText(tag) }); @@ -111578,24 +111948,6 @@ var ts; return comment === undefined ? s : s + " " + comment; } } - /** - * Iterates through 'array' by index and performs the callback on each element of array until the callback - * returns a truthy value, then returns that value. - * If no such value is found, the callback is applied to each element of array and undefined is returned. - */ - function forEachUnique(array, callback) { - if (array) { - for (var i = 0; i < array.length; i++) { - if (array.indexOf(array[i]) === i) { - var result = callback(array[i], i); - if (result) { - return result; - } - } - } - } - return undefined; - } function getJSDocTagNameCompletions() { return jsDocTagNameCompletionEntries || (jsDocTagNameCompletionEntries = ts.map(jsDocTagNames, function (tagName) { return { @@ -112520,7 +112872,8 @@ var ts; } var declName = ts.getNameOfDeclaration(node); if (declName && ts.isPropertyName(declName)) { - return ts.unescapeLeadingUnderscores(ts.getPropertyNameForPropertyNameNode(declName)); // TODO: GH#18217 + var propertyName = ts.getPropertyNameForPropertyNameNode(declName); + return propertyName && ts.unescapeLeadingUnderscores(propertyName); } switch (node.kind) { case 200 /* FunctionExpression */: @@ -113290,6 +113643,9 @@ var ts; case 265 /* JsxSelfClosingElement */: case 266 /* JsxOpeningElement */: return spanForJSXAttributes(n.attributes); + case 210 /* TemplateExpression */: + case 14 /* NoSubstitutionTemplateLiteral */: + return spanForTemplateLiteral(n); } function spanForJSXElement(node) { var textSpan = ts.createTextSpanFromBounds(node.openingElement.getStart(sourceFile), node.closingElement.getEnd()); @@ -113308,6 +113664,12 @@ var ts; } return createOutliningSpanFromBounds(node.getStart(sourceFile), node.getEnd(), "code" /* Code */); } + function spanForTemplateLiteral(node) { + if (node.kind === 14 /* NoSubstitutionTemplateLiteral */ && node.text.length === 0) { + return undefined; + } + return createOutliningSpanFromBounds(node.getStart(sourceFile), node.getEnd(), "code" /* Code */); + } function spanForObjectOrArrayLiteral(node, open) { if (open === void 0) { open = 18 /* OpenBraceToken */; } // If the block has no leading keywords and is inside an array literal or call expression, @@ -115610,7 +115972,7 @@ var ts; // get the signature from the declaration and write it var functionDeclaration_1 = location.parent; // Use function declaration to write the signatures only if the symbol corresponding to this declaration - var locationIsSymbolDeclaration = ts.find(symbol.declarations, function (declaration) { + var locationIsSymbolDeclaration = symbol.declarations && ts.find(symbol.declarations, function (declaration) { return declaration === (location.kind === 128 /* ConstructorKeyword */ ? functionDeclaration_1.parent : functionDeclaration_1); }); if (locationIsSymbolDeclaration) { @@ -116517,8 +116879,8 @@ var ts; rule("SpaceAfterQuestionMarkInConditionalOperator", 57 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* InsertSpace */), // in other cases there should be no space between '?' and next token rule("NoSpaceAfterQuestionMark", 57 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("NoSpaceBeforeDot", anyToken, 24 /* DotToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("NoSpaceAfterDot", 24 /* DotToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), + rule("NoSpaceBeforeDot", anyToken, [24 /* DotToken */, 28 /* QuestionDotToken */], [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), + rule("NoSpaceAfterDot", [24 /* DotToken */, 28 /* QuestionDotToken */], anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), rule("NoSpaceBetweenImportParenInImportType", 95 /* ImportKeyword */, 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* DeleteSpace */), // Special handling of unary operators. // Prefix operators generally shouldn't have a space between @@ -118650,7 +119012,10 @@ var ts; if (ts.isCallOrNewExpression(parent)) { if (!parent.arguments) return false; - var currentNode = ts.Debug.assertDefined(ts.find(parent.arguments, function (arg) { return arg.pos === child.pos; })); + var currentNode = ts.find(parent.arguments, function (arg) { return arg.pos === child.pos; }); + // If it's not one of the arguments, don't look past this + if (!currentNode) + return false; var currentIndex = parent.arguments.indexOf(currentNode); if (currentIndex === 0) return false; // Can't look at previous node if first @@ -119069,6 +119434,18 @@ var ts; cb(tracker); return tracker.getChanges(); }; + ChangeTracker.prototype.pushRaw = function (sourceFile, change) { + ts.Debug.assertEqual(sourceFile.fileName, change.fileName); + for (var _i = 0, _a = change.textChanges; _i < _a.length; _i++) { + var c = _a[_i]; + this.changes.push({ + kind: ChangeKind.Text, + sourceFile: sourceFile, + text: c.newText, + range: ts.createTextRangeFromSpan(c.span), + }); + } + }; ChangeTracker.prototype.deleteRange = function (sourceFile, range) { this.changes.push({ kind: ChangeKind.Remove, sourceFile: sourceFile, range: range }); }; @@ -119197,7 +119574,7 @@ var ts; endNode = ts.findChildOfKind(node, 21 /* CloseParenToken */, sourceFile); if (!endNode) { if (!ts.isArrowFunction(node)) - return; // Function missing parentheses, give up + return false; // Function missing parentheses, give up // If no `)`, is an arrow function `x => x`, so use the end of the first parameter endNode = ts.first(node.parameters); } @@ -119206,6 +119583,7 @@ var ts; endNode = node.kind !== 241 /* VariableDeclaration */ && node.questionToken ? node.questionToken : node.name; } this.insertNodeAt(sourceFile, endNode.end, type, { prefix: ": " }); + return true; }; ChangeTracker.prototype.tryInsertThisTypeAnnotation = function (sourceFile, node, type) { var start = ts.findChildOfKind(node, 20 /* OpenParenToken */, sourceFile).getStart(sourceFile) + 1; @@ -120832,20 +121210,20 @@ var ts; codefix.registerCodeFix({ errorCodes: errorCodes, getCodeActions: function (context) { - var sourceFile = context.sourceFile, program = context.program, start = context.span.start, errorCode = context.errorCode, cancellationToken = context.cancellationToken, host = context.host; + var sourceFile = context.sourceFile, program = context.program, start = context.span.start, errorCode = context.errorCode, cancellationToken = context.cancellationToken, host = context.host, formatContext = context.formatContext, preferences = context.preferences; var token = ts.getTokenAtPosition(sourceFile, start); var declaration; - var changes = ts.textChanges.ChangeTracker.with(context, function (changes) { declaration = doChange(changes, sourceFile, token, errorCode, program, cancellationToken, /*markSeen*/ ts.returnTrue, host); }); + var changes = ts.textChanges.ChangeTracker.with(context, function (changes) { declaration = doChange(changes, sourceFile, token, errorCode, program, cancellationToken, /*markSeen*/ ts.returnTrue, host, formatContext, preferences); }); var name = declaration && ts.getNameOfDeclaration(declaration); return !name || changes.length === 0 ? undefined : [codefix.createCodeFixAction(fixId, changes, [getDiagnostic(errorCode, token), name.getText(sourceFile)], fixId, ts.Diagnostics.Infer_all_types_from_usage)]; }, fixIds: [fixId], getAllCodeActions: function (context) { - var sourceFile = context.sourceFile, program = context.program, cancellationToken = context.cancellationToken, host = context.host; + var sourceFile = context.sourceFile, program = context.program, cancellationToken = context.cancellationToken, host = context.host, formatContext = context.formatContext, preferences = context.preferences; var markSeen = ts.nodeSeenTracker(); return codefix.codeFixAll(context, errorCodes, function (changes, err) { - doChange(changes, sourceFile, ts.getTokenAtPosition(err.file, err.start), err.code, program, cancellationToken, markSeen, host); + doChange(changes, sourceFile, ts.getTokenAtPosition(err.file, err.start), err.code, program, cancellationToken, markSeen, host, formatContext, preferences); }); }, }); @@ -120885,7 +121263,7 @@ var ts; } return errorCode; } - function doChange(changes, sourceFile, token, errorCode, program, cancellationToken, markSeen, host) { + function doChange(changes, sourceFile, token, errorCode, program, cancellationToken, markSeen, host, formatContext, preferences) { if (!ts.isParameterPropertyModifier(token.kind) && token.kind !== 75 /* Identifier */ && token.kind !== 25 /* DotDotDotToken */ && token.kind !== 103 /* ThisKeyword */) { return undefined; } @@ -120896,7 +121274,7 @@ var ts; case ts.Diagnostics.Member_0_implicitly_has_an_1_type.code: case ts.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code: if ((ts.isVariableDeclaration(parent) && markSeen(parent)) || ts.isPropertyDeclaration(parent) || ts.isPropertySignature(parent)) { // handle bad location - annotateVariableDeclaration(changes, sourceFile, parent, program, host, cancellationToken); + annotateVariableDeclaration(changes, sourceFile, parent, program, host, cancellationToken, formatContext, preferences); return parent; } if (ts.isPropertyAccessExpression(parent)) { @@ -120913,7 +121291,7 @@ var ts; case ts.Diagnostics.Variable_0_implicitly_has_an_1_type.code: { var symbol = program.getTypeChecker().getSymbolAtLocation(token); if (symbol && symbol.valueDeclaration && ts.isVariableDeclaration(symbol.valueDeclaration) && markSeen(symbol.valueDeclaration)) { - annotateVariableDeclaration(changes, sourceFile, symbol.valueDeclaration, program, host, cancellationToken); + annotateVariableDeclaration(changes, sourceFile, symbol.valueDeclaration, program, host, cancellationToken, formatContext, preferences); return symbol.valueDeclaration; } return undefined; @@ -120927,14 +121305,14 @@ var ts; // Parameter declarations case ts.Diagnostics.Parameter_0_implicitly_has_an_1_type.code: if (ts.isSetAccessorDeclaration(containingFunction)) { - annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken); + annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken, formatContext, preferences); return containingFunction; } // falls through case ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code: if (markSeen(containingFunction)) { var param = ts.cast(parent, ts.isParameter); - annotateParameters(changes, sourceFile, param, containingFunction, program, host, cancellationToken); + annotateParameters(changes, sourceFile, param, containingFunction, program, host, cancellationToken, formatContext, preferences); return param; } return undefined; @@ -120942,14 +121320,14 @@ var ts; case ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code: case ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code: if (ts.isGetAccessorDeclaration(containingFunction) && ts.isIdentifier(containingFunction.name)) { - annotate(changes, sourceFile, containingFunction, inferTypeForVariableFromUsage(containingFunction.name, program, cancellationToken), program, host); + annotate(changes, sourceFile, containingFunction, inferTypeForVariableFromUsage(containingFunction.name, program, cancellationToken), program, host, formatContext, preferences); return containingFunction; } return undefined; // Set Accessor declarations case ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code: if (ts.isSetAccessorDeclaration(containingFunction)) { - annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken); + annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken, formatContext, preferences); return containingFunction; } return undefined; @@ -120964,12 +121342,12 @@ var ts; return ts.Debug.fail(String(errorCode)); } } - function annotateVariableDeclaration(changes, sourceFile, declaration, program, host, cancellationToken) { + function annotateVariableDeclaration(changes, sourceFile, declaration, program, host, cancellationToken, formatContext, preferences) { if (ts.isIdentifier(declaration.name)) { - annotate(changes, sourceFile, declaration, inferTypeForVariableFromUsage(declaration.name, program, cancellationToken), program, host); + annotate(changes, sourceFile, declaration, inferTypeForVariableFromUsage(declaration.name, program, cancellationToken), program, host, formatContext, preferences); } } - function annotateParameters(changes, sourceFile, parameterDeclaration, containingFunction, program, host, cancellationToken) { + function annotateParameters(changes, sourceFile, parameterDeclaration, containingFunction, program, host, cancellationToken, formatContext, preferences) { if (!ts.isIdentifier(parameterDeclaration.name)) { return; } @@ -120985,7 +121363,7 @@ var ts; for (var _i = 0, parameterInferences_1 = parameterInferences; _i < parameterInferences_1.length; _i++) { var _a = parameterInferences_1[_i], declaration = _a.declaration, type = _a.type; if (declaration && !declaration.type && !declaration.initializer) { - annotate(changes, sourceFile, declaration, type, program, host); + annotate(changes, sourceFile, declaration, type, program, host, formatContext, preferences); } } if (needParens) @@ -121014,7 +121392,7 @@ var ts; ts.createJSDocThisTag(ts.createJSDocTypeExpression(typeNode)), ]); } - function annotateSetAccessor(changes, sourceFile, setAccessorDeclaration, program, host, cancellationToken) { + function annotateSetAccessor(changes, sourceFile, setAccessorDeclaration, program, host, cancellationToken, formatContext, preferences) { var param = ts.firstOrUndefined(setAccessorDeclaration.parameters); if (param && ts.isIdentifier(setAccessorDeclaration.name) && ts.isIdentifier(param.name)) { var type = inferTypeForVariableFromUsage(setAccessorDeclaration.name, program, cancellationToken); @@ -121025,11 +121403,11 @@ var ts; annotateJSDocParameters(changes, sourceFile, [{ declaration: param, type: type }], program, host); } else { - annotate(changes, sourceFile, param, type, program, host); + annotate(changes, sourceFile, param, type, program, host, formatContext, preferences); } } } - function annotate(changes, sourceFile, declaration, type, program, host) { + function annotate(changes, sourceFile, declaration, type, program, host, formatContext, preferences) { var typeNode = ts.getTypeNodeIfAccessible(type, declaration, program, host); if (typeNode) { if (ts.isInJSFile(sourceFile) && declaration.kind !== 157 /* PropertySignature */) { @@ -121041,11 +121419,32 @@ var ts; var typeTag = ts.isGetAccessorDeclaration(declaration) ? ts.createJSDocReturnTag(typeExpression, "") : ts.createJSDocTypeTag(typeExpression, ""); addJSDocTags(changes, sourceFile, parent, [typeTag]); } - else { + else if (!tryReplaceImportTypeNodeWithAutoImport(typeNode, changes, sourceFile, declaration, type, program, host, formatContext, preferences)) { changes.tryInsertTypeAnnotation(sourceFile, declaration, typeNode); } } } + function tryReplaceImportTypeNodeWithAutoImport(typeNode, changes, sourceFile, declaration, type, program, host, formatContext, preferences) { + var _a; + if (ts.isLiteralImportTypeNode(typeNode) && typeNode.qualifier && type.symbol) { + // Replace 'import("./a").SomeType' with 'SomeType' and an actual import if possible + var moduleSymbol = (_a = ts.find(type.symbol.declarations, function (d) { return !!d.getSourceFile().externalModuleIndicator; })) === null || _a === void 0 ? void 0 : _a.getSourceFile().symbol; + // Symbol for the left-most thing after the dot + if (moduleSymbol) { + var symbol = ts.getFirstIdentifier(typeNode.qualifier).symbol; + var action = codefix.getImportCompletionAction(symbol, moduleSymbol, sourceFile, symbol.name, host, program, formatContext, declaration.pos, preferences); + if (action.codeAction.changes.length && changes.tryInsertTypeAnnotation(sourceFile, declaration, ts.createTypeReferenceNode(typeNode.qualifier, typeNode.typeArguments))) { + for (var _i = 0, _b = action.codeAction.changes; _i < _b.length; _i++) { + var change = _b[_i]; + var file = sourceFile.fileName === change.fileName ? sourceFile : ts.Debug.assertDefined(program.getSourceFile(change.fileName)); + changes.pushRaw(file, change); + } + return true; + } + } + } + return false; + } function annotateJSDocParameters(changes, sourceFile, parameterInferences, program, host) { var signature = parameterInferences.length && parameterInferences[0].declaration.parent; if (!signature) { @@ -121737,7 +122136,7 @@ var ts; } var returnType = combineFromUsage(combineUsages(calls.map(function (call) { return call.return_; }))); // TODO: GH#18217 - return checker.createSignature(/*declaration*/ undefined, /*typeParameters*/ undefined, /*thisParameter*/ undefined, parameters, returnType, /*typePredicate*/ undefined, length, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); + return checker.createSignature(/*declaration*/ undefined, /*typeParameters*/ undefined, /*thisParameter*/ undefined, parameters, returnType, /*typePredicate*/ undefined, length, 0 /* None */); } function addCandidateType(usage, type) { if (type && !(type.flags & 1 /* Any */) && !(type.flags & 131072 /* Never */)) { @@ -123544,6 +123943,7 @@ var ts; var filteredCount = 0; var packageJson = filterByPackageJson && createAutoImportFilter(from, program, host); var allSourceFiles = program.getSourceFiles(); + var globalTypingsCache = host.getGlobalTypingsCacheLocation && host.getGlobalTypingsCacheLocation(); forEachExternalModule(program.getTypeChecker(), allSourceFiles, function (module, sourceFile) { if (sourceFile === undefined) { if (!packageJson || packageJson.allowsImportingAmbientModule(module, allSourceFiles)) { @@ -123553,7 +123953,9 @@ var ts; filteredCount++; } } - else if (sourceFile && sourceFile !== from && isImportablePath(from.fileName, sourceFile.fileName)) { + else if (sourceFile && + sourceFile !== from && + isImportablePath(from.fileName, sourceFile.fileName, ts.hostGetCanonicalFileName(host), globalTypingsCache)) { if (!packageJson || packageJson.allowsImportingSourceFile(sourceFile, allSourceFiles)) { cb(module); } @@ -123583,10 +123985,13 @@ var ts; * 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. */ - function isImportablePath(fromPath, toPath) { + function isImportablePath(fromPath, toPath, getCanonicalFileName, globalCachePath) { // If it's in a `node_modules` but is not reachable from here via a global import, don't bother. var toNodeModules = ts.forEachAncestorDirectory(toPath, function (ancestor) { return ts.getBaseFileName(ancestor) === "node_modules" ? ancestor : undefined; }); - return toNodeModules === undefined || ts.startsWith(fromPath, ts.getDirectoryPath(toNodeModules)); + var toNodeModulesParent = toNodeModules && ts.getDirectoryPath(getCanonicalFileName(toNodeModules)); + return toNodeModulesParent === undefined + || ts.startsWith(getCanonicalFileName(fromPath), toNodeModulesParent) + || (!!globalCachePath && ts.startsWith(getCanonicalFileName(globalCachePath), toNodeModulesParent)); } function moduleSymbolToValidIdentifier(moduleSymbol, target) { return moduleSpecifierToValidIdentifier(ts.removeFileExtension(ts.stripQuotes(moduleSymbol.name)), target); @@ -123631,6 +124036,7 @@ var ts; readFile: ts.maybeBind(host, host.readFile), useCaseSensitiveFileNames: ts.maybeBind(host, host.useCaseSensitiveFileNames), getProbableSymlinks: ts.maybeBind(host, host.getProbableSymlinks) || program.getProbableSymlinks, + getGlobalTypingsCacheLocation: ts.maybeBind(host, host.getGlobalTypingsCacheLocation), }; var usesNodeCoreModules; return { allowsImportingAmbientModule: allowsImportingAmbientModule, allowsImportingSourceFile: allowsImportingSourceFile, allowsImportingSpecifier: allowsImportingSpecifier }; @@ -125206,14 +125612,14 @@ var ts; for (var _i = 0, signatures_2 = signatures; _i < signatures_2.length; _i++) { var sig = signatures_2[_i]; minArgumentCount = Math.min(sig.minArgumentCount, minArgumentCount); - if (sig.hasRestParameter) { + if (ts.signatureHasRestParameter(sig)) { someSigHasRestParameter = true; } - if (sig.parameters.length >= maxArgsSignature.parameters.length && (!sig.hasRestParameter || maxArgsSignature.hasRestParameter)) { + if (sig.parameters.length >= maxArgsSignature.parameters.length && (!ts.signatureHasRestParameter(sig) || ts.signatureHasRestParameter(maxArgsSignature))) { maxArgsSignature = sig; } } - var maxNonRestArgs = maxArgsSignature.parameters.length - (maxArgsSignature.hasRestParameter ? 1 : 0); + var maxNonRestArgs = maxArgsSignature.parameters.length - (ts.signatureHasRestParameter(maxArgsSignature) ? 1 : 0); var maxArgsParameterSymbolNames = maxArgsSignature.parameters.map(function (symbol) { return symbol.name; }); var parameters = createDummyParameters(maxNonRestArgs, maxArgsParameterSymbolNames, /* types */ undefined, minArgumentCount, /*inJs*/ false); if (someSigHasRestParameter) { @@ -127698,7 +128104,7 @@ var ts; if (!selection || !ts.isTypeNode(selection)) return undefined; var checker = context.program.getTypeChecker(); - var firstStatement = ts.Debug.assertDefined(isJS ? ts.findAncestor(selection, isStatementAndHasJSDoc) : ts.findAncestor(selection, ts.isStatement), "Should find a statement"); + var firstStatement = ts.Debug.assertDefined(ts.findAncestor(selection, ts.isStatement), "Should find a statement"); var typeParameters = collectTypeParameters(checker, selection, firstStatement, file); if (!typeParameters) return undefined; @@ -127729,9 +128135,6 @@ var ts; } return undefined; } - function isStatementAndHasJSDoc(n) { - return ts.isStatement(n) && ts.hasJSDocNodes(n); - } function rangeContainsSkipTrivia(r1, node, file) { return ts.rangeContainsStartEnd(r1, ts.skipTrivia(file.text, node.pos), node.end); } @@ -129655,8 +130058,9 @@ var ts; return TypeObject; }()); var SignatureObject = /** @class */ (function () { - function SignatureObject(checker) { + function SignatureObject(checker, flags) { this.checker = checker; + this.flags = flags; } SignatureObject.prototype.getDeclaration = function () { return this.declaration; @@ -129694,13 +130098,12 @@ var ts; return ts.emptyArray; var doc = ts.JsDoc.getJsDocCommentsFromDeclarations(declarations); if (doc.length === 0 || declarations.some(hasJSDocInheritDocTag)) { - for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) { - var declaration = declarations_4[_i]; + ts.forEachUnique(declarations, function (declaration) { var inheritedDocs = findInheritedJSDocComments(declaration, declaration.symbol.name, checker); // TODO: GH#18217 // TODO: GH#16312 Return a ReadonlyArray, avoid copying inheritedDocs if (inheritedDocs) doc = doc.length === 0 ? inheritedDocs.slice() : inheritedDocs.concat(ts.lineBreakPart(), doc); - } + }); } return doc; } @@ -130011,9 +130414,7 @@ var ts; names.push(entry); } else { - if (entry.scriptKind !== 6 /* JSON */) { - names.push(entry.hostFileName); - } + names.push(entry.hostFileName); } }); return names; @@ -130581,12 +130982,11 @@ var ts; var sourceFiles = fileName ? [getValidSourceFile(fileName)] : program.getSourceFiles(); return ts.NavigateTo.getNavigateToItems(sourceFiles, program.getTypeChecker(), cancellationToken, searchValue, maxResultCount, excludeDtsFiles); } - function getEmitOutput(fileName, emitOnlyDtsFiles) { - if (emitOnlyDtsFiles === void 0) { emitOnlyDtsFiles = false; } + function getEmitOutput(fileName, emitOnlyDtsFiles, forceDtsEmit) { synchronizeHostData(); var sourceFile = getValidSourceFile(fileName); var customTransformers = host.getCustomTransformers && host.getCustomTransformers(); - return ts.getFileEmitOutput(program, sourceFile, emitOnlyDtsFiles, cancellationToken, customTransformers); + return ts.getFileEmitOutput(program, sourceFile, !!emitOnlyDtsFiles, cancellationToken, customTransformers, forceDtsEmit); } // Signature help /** @@ -133735,16 +134135,31 @@ var ts; case 1: return this.containingProjects[0]; default: - // if this file belongs to multiple projects, the first configured project should be - // the default project; if no configured projects, the first external project should - // be the default project; otherwise the first inferred project should be the default. + // If this file belongs to multiple projects, below is the order in which default project is used + // - for open script info, its default configured project during opening is default if info is part of it + // - first configured project of which script info is not a source of project reference redirect + // - first configured project + // - first external project + // - first inferred project var firstExternalProject = void 0; var firstConfiguredProject = void 0; - for (var _i = 0, _a = this.containingProjects; _i < _a.length; _i++) { - var project = _a[_i]; + var firstNonSourceOfProjectReferenceRedirect = void 0; + var defaultConfiguredProject = void 0; + for (var index = 0; index < this.containingProjects.length; index++) { + var project = this.containingProjects[index]; if (project.projectKind === server.ProjectKind.Configured) { - if (!project.isSourceOfProjectReferenceRedirect(this.fileName)) - return project; + if (!project.isSourceOfProjectReferenceRedirect(this.fileName)) { + // If we havent found default configuredProject and + // its not the last one, find it and use that one if there + if (defaultConfiguredProject === undefined && + index !== this.containingProjects.length - 1) { + defaultConfiguredProject = project.projectService.findDefaultConfiguredProject(this) || false; + } + if (defaultConfiguredProject === project) + return project; + if (!firstNonSourceOfProjectReferenceRedirect) + firstNonSourceOfProjectReferenceRedirect = project; + } if (!firstConfiguredProject) firstConfiguredProject = project; } @@ -133752,7 +134167,11 @@ var ts; firstExternalProject = project; } } - return firstConfiguredProject || firstExternalProject || this.containingProjects[0]; + return defaultConfiguredProject || + firstNonSourceOfProjectReferenceRedirect || + firstConfiguredProject || + firstExternalProject || + this.containingProjects[0]; } }; ScriptInfo.prototype.registerFileUpdate = function () { @@ -134051,7 +134470,7 @@ var ts; var Project = /** @class */ (function () { /*@internal*/ function Project( - /*@internal*/ projectName, projectKind, projectService, documentRegistry, hasExplicitListOfFiles, lastFileExceededProgramSize, compilerOptions, compileOnSaveEnabled, directoryStructureHost, currentDirectory) { + /*@internal*/ projectName, projectKind, projectService, documentRegistry, hasExplicitListOfFiles, lastFileExceededProgramSize, compilerOptions, compileOnSaveEnabled, directoryStructureHost, currentDirectory, customRealpath) { var _this = this; this.projectName = projectName; this.projectKind = projectKind; @@ -134121,7 +134540,7 @@ var ts; this.trace = function (s) { return host.trace(s); }; } if (host.realpath) { - this.realpath = function (path) { return host.realpath(path); }; + this.realpath = customRealpath || (function (path) { return host.realpath(path); }); } // Use the current directory as resolution root only if the project created using current directory string this.resolutionCache = ts.createResolutionCache(this, currentDirectory && this.currentDirectory, /*logChangesWhenResolvingModule*/ true); @@ -134162,6 +134581,10 @@ var ts; Project.prototype.installPackage = function (options) { return this.typingsCache.installPackage(__assign(__assign({}, options), { projectName: this.projectName, projectRootPath: this.toPath(this.currentDirectory) })); }; + /*@internal*/ + Project.prototype.getGlobalTypingsCacheLocation = function () { + return this.getGlobalCache(); + }; Object.defineProperty(Project.prototype, "typingsCache", { get: function () { return this.projectService.typingsCache; @@ -135061,9 +135484,11 @@ var ts; this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded"); return; } - // Search our peer node_modules, then any globally-specified probe paths - // ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/node_modules/ - var searchPaths = __spreadArrays([ts.combinePaths(this.projectService.getExecutingFilePath(), "../../..")], this.projectService.pluginProbeLocations); + // Search any globally-specified probe paths, then our peer node_modules + var searchPaths = __spreadArrays(this.projectService.pluginProbeLocations, [ + // ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/node_modules/ + ts.combinePaths(this.projectService.getExecutingFilePath(), "../../.."), + ]); if (this.projectService.globalPlugins) { var _loop_2 = function (globalPluginName) { // Skip empty names from odd commandline parses @@ -135169,7 +135594,9 @@ var ts; case -1 /* True */: var packageJsonFileName = ts.combinePaths(directory, "package.json"); watchPackageJsonFile(packageJsonFileName); - result.push(ts.Debug.assertDefined(packageJsonCache.getInDirectory(directory))); + var info = packageJsonCache.getInDirectory(directory); + if (info) + result.push(info); } if (rootPath && rootPath === toPath(directory)) { return true; @@ -135337,7 +135764,7 @@ var ts; /*hasExplicitListOfFiles*/ false, /*lastFileExceededProgramSize*/ undefined, /*compilerOptions*/ {}, - /*compileOnSaveEnabled*/ false, cachedDirectoryStructureHost, ts.getDirectoryPath(configFileName)) || this; + /*compileOnSaveEnabled*/ false, cachedDirectoryStructureHost, ts.getDirectoryPath(configFileName), projectService.host.realpath && (function (s) { return _this.getRealpath(s); })) || this; /*@internal*/ _this.canConfigFileJsonReportNoInputFiles = false; /** Ref count to the project when opened from external project */ @@ -135355,19 +135782,31 @@ var ts; ConfiguredProject.prototype.setResolvedProjectReferenceCallbacks = function (projectReferenceCallbacks) { this.projectReferenceCallbacks = projectReferenceCallbacks; }; + ConfiguredProject.prototype.fileExistsIfProjectReferenceDts = function (file) { + var source = this.projectReferenceCallbacks.getSourceOfProjectReferenceRedirect(file); + return source !== undefined ? + ts.isString(source) ? _super.prototype.fileExists.call(this, source) : true : + undefined; + }; /** * This implementation of fileExists checks if the file being requested is * .d.ts file for the referenced Project. * If it is it returns true irrespective of whether that file exists on host */ ConfiguredProject.prototype.fileExists = function (file) { + if (_super.prototype.fileExists.call(this, file)) + return true; + if (!this.useSourceOfProjectReferenceRedirect() || !this.projectReferenceCallbacks) + return false; + if (!ts.isDeclarationFileName(file)) + return false; // Project references go to source file instead of .d.ts file - if (this.useSourceOfProjectReferenceRedirect() && this.projectReferenceCallbacks) { - var source = this.projectReferenceCallbacks.getSourceOfProjectReferenceRedirect(file); - if (source) - return ts.isString(source) ? _super.prototype.fileExists.call(this, source) : true; - } - return _super.prototype.fileExists.call(this, file); + return this.fileOrDirectoryExistsUsingSource(file, /*isFile*/ true); + }; + ConfiguredProject.prototype.directoryExistsIfProjectReferenceDeclDir = function (dir) { + var dirPath = this.toPath(dir); + var dirPathWithTrailingDirectorySeparator = "" + dirPath + ts.directorySeparator; + return ts.forEachKey(this.mapOfDeclarationDirectories, function (declDirPath) { return dirPath === declDirPath || ts.startsWith(declDirPath, dirPathWithTrailingDirectorySeparator); }); }; /** * This implementation of directoryExists checks if the directory being requested is @@ -135376,8 +135815,10 @@ var ts; */ ConfiguredProject.prototype.directoryExists = function (path) { var _this = this; - if (_super.prototype.directoryExists.call(this, path)) + if (_super.prototype.directoryExists.call(this, path)) { + this.handleDirectoryCouldBeSymlink(path); return true; + } if (!this.useSourceOfProjectReferenceRedirect() || !this.projectReferenceCallbacks) return false; if (!this.mapOfDeclarationDirectories) { @@ -135385,7 +135826,7 @@ var ts; this.projectReferenceCallbacks.forEachResolvedProjectReference(function (ref) { if (!ref) return; - var out = ref.commandLine.options.outFile || ref.commandLine.options.outDir; + var out = ref.commandLine.options.outFile || ref.commandLine.options.out; if (out) { _this.mapOfDeclarationDirectories.set(ts.getDirectoryPath(_this.toPath(out)), true); } @@ -135398,9 +135839,70 @@ var ts; } }); } - var dirPath = this.toPath(path); - var dirPathWithTrailingDirectorySeparator = "" + dirPath + ts.directorySeparator; - return !!ts.forEachKey(this.mapOfDeclarationDirectories, function (declDirPath) { return dirPath === declDirPath || ts.startsWith(declDirPath, dirPathWithTrailingDirectorySeparator); }); + return this.fileOrDirectoryExistsUsingSource(path, /*isFile*/ false); + }; + ConfiguredProject.prototype.realpathIfSymlinkedProjectReferenceDts = function (s) { + return this.symlinkedFiles && this.symlinkedFiles.get(this.toPath(s)); + }; + ConfiguredProject.prototype.getRealpath = function (s) { + return this.realpathIfSymlinkedProjectReferenceDts(s) || + this.projectService.host.realpath(s); + }; + ConfiguredProject.prototype.handleDirectoryCouldBeSymlink = function (directory) { + if (!this.useSourceOfProjectReferenceRedirect() || !this.projectReferenceCallbacks) + return; + // Because we already watch node_modules, handle symlinks in there + if (!this.realpath || !ts.stringContains(directory, ts.nodeModulesPathPart)) + return; + if (!this.symlinkedDirectories) + this.symlinkedDirectories = ts.createMap(); + var directoryPath = ts.ensureTrailingDirectorySeparator(this.toPath(directory)); + if (this.symlinkedDirectories.has(directoryPath)) + return; + var real = this.projectService.host.realpath(directory); + var realPath; + if (real === directory || + (realPath = ts.ensureTrailingDirectorySeparator(this.toPath(real))) === directoryPath) { + // not symlinked + this.symlinkedDirectories.set(directoryPath, false); + return; + } + this.symlinkedDirectories.set(directoryPath, { + real: ts.ensureTrailingDirectorySeparator(real), + realPath: realPath + }); + }; + ConfiguredProject.prototype.fileOrDirectoryExistsUsingSource = function (fileOrDirectory, isFile) { + var _this = this; + var fileOrDirectoryExistsUsingSource = isFile ? + function (file) { return _this.fileExistsIfProjectReferenceDts(file); } : + function (dir) { return _this.directoryExistsIfProjectReferenceDeclDir(dir); }; + // Check current directory or file + var result = fileOrDirectoryExistsUsingSource(fileOrDirectory); + if (result !== undefined) + return result; + if (!this.symlinkedDirectories) + return false; + var fileOrDirectoryPath = this.toPath(fileOrDirectory); + if (!ts.stringContains(fileOrDirectoryPath, ts.nodeModulesPathPart)) + return false; + if (isFile && this.symlinkedFiles && this.symlinkedFiles.has(fileOrDirectoryPath)) + return true; + // If it contains node_modules check if its one of the symlinked path we know of + return ts.firstDefinedIterator(this.symlinkedDirectories.entries(), function (_a) { + var directoryPath = _a[0], symlinkedDirectory = _a[1]; + if (!symlinkedDirectory || !ts.startsWith(fileOrDirectoryPath, directoryPath)) + return undefined; + var result = fileOrDirectoryExistsUsingSource(fileOrDirectoryPath.replace(directoryPath, symlinkedDirectory.realPath)); + if (isFile && result) { + if (!_this.symlinkedFiles) + _this.symlinkedFiles = ts.createMap(); + // Store the real path for the file' + var absolutePath = ts.getNormalizedAbsolutePath(fileOrDirectory, _this.currentDirectory); + _this.symlinkedFiles.set(fileOrDirectoryPath, "" + symlinkedDirectory.real + absolutePath.replace(new RegExp(directoryPath, "i"), "")); + } + return result; + }) || false; }; /** * If the project has reload from disk pending, it reloads (and then updates graph as part of that) instead of just updating the graph @@ -135412,6 +135914,8 @@ var ts; this.pendingReload = ts.ConfigFileProgramReloadLevel.None; this.projectReferenceCallbacks = undefined; this.mapOfDeclarationDirectories = undefined; + this.symlinkedDirectories = undefined; + this.symlinkedFiles = undefined; var result; switch (reloadLevel) { case ts.ConfigFileProgramReloadLevel.Partial: @@ -135522,6 +136026,8 @@ var ts; this.configFileSpecs = undefined; this.projectReferenceCallbacks = undefined; this.mapOfDeclarationDirectories = undefined; + this.symlinkedDirectories = undefined; + this.symlinkedFiles = undefined; _super.prototype.close.call(this); }; /* @internal */ @@ -136378,7 +136884,7 @@ var ts; ts.Debug.assert(info.isOrphan()); var project = this.getOrCreateInferredProjectForProjectRootPathIfEnabled(info, projectRootPath) || this.getOrCreateSingleInferredProjectIfEnabled() || - this.getOrCreateSingleInferredWithoutProjectRoot(info.isDynamic ? this.currentDirectory : ts.getDirectoryPath(info.path)); + this.getOrCreateSingleInferredWithoutProjectRoot(info.isDynamic ? projectRootPath || this.currentDirectory : ts.getDirectoryPath(info.path)); project.addRoot(info); if (info.containingProjects[0] !== project) { // Ensure this is first project, we could be in this scenario because info could be part of orphan project @@ -136701,6 +137207,9 @@ var ts; } ts.Debug.assert(!isOpenScriptInfo(info) || this.openFiles.has(info.path)); var projectRootPath = this.openFiles.get(info.path); + var scriptInfo = ts.Debug.assertDefined(this.getScriptInfo(info.path)); + if (scriptInfo.isDynamic) + return undefined; var searchPath = server.asNormalizedPath(ts.getDirectoryPath(info.fileName)); var isSearchPathInProjectRoot = function () { return ts.containsPath(projectRootPath, searchPath, _this.currentDirectory, !_this.host.useCaseSensitiveFileNames); }; // If projectRootPath doesn't contain info.path, then do normal search for config file @@ -136725,6 +137234,14 @@ var ts; } while (anySearchPathOk || isSearchPathInProjectRoot()); return undefined; }; + /*@internal*/ + ProjectService.prototype.findDefaultConfiguredProject = function (info) { + if (!info.isScriptOpen()) + return undefined; + var configFileName = this.getConfigFileNameForFile(info); + return configFileName && + this.findConfiguredProjectByProjectName(configFileName); + }; /** * This function tries to search for a tsconfig.json for the given file. * This is different from the method the compiler uses because @@ -137064,7 +137581,9 @@ var ts; }); }; ProjectService.prototype.getOrCreateInferredProjectForProjectRootPathIfEnabled = function (info, projectRootPath) { - if (info.isDynamic || !this.useInferredProjectPerProjectRoot) { + if (!this.useInferredProjectPerProjectRoot || + // Its a dynamic info opened without project root + (info.isDynamic && projectRootPath === undefined)) { return undefined; } if (projectRootPath) { @@ -137323,7 +137842,7 @@ var ts; var isDynamic = server.isDynamicFileName(fileName); ts.Debug.assert(ts.isRootedDiskPath(fileName) || isDynamic || openedByClient, "", function () { return JSON.stringify({ fileName: fileName, currentDirectory: currentDirectory, hostCurrentDirectory: _this.currentDirectory, openKeys: ts.arrayFrom(_this.openFilesWithNonRootedDiskPath.keys()) }) + "\nScript info with non-dynamic relative file name can only be open script info or in context of host currentDirectory"; }); ts.Debug.assert(!ts.isRootedDiskPath(fileName) || this.currentDirectory === currentDirectory || !this.openFilesWithNonRootedDiskPath.has(this.toCanonicalFileName(fileName)), "", function () { return JSON.stringify({ fileName: fileName, currentDirectory: currentDirectory, hostCurrentDirectory: _this.currentDirectory, openKeys: ts.arrayFrom(_this.openFilesWithNonRootedDiskPath.keys()) }) + "\nOpen script files with non rooted disk path opened with current directory context cannot have same canonical names"; }); - ts.Debug.assert(!isDynamic || this.currentDirectory === currentDirectory, "", function () { return JSON.stringify({ fileName: fileName, currentDirectory: currentDirectory, hostCurrentDirectory: _this.currentDirectory, openKeys: ts.arrayFrom(_this.openFilesWithNonRootedDiskPath.keys()) }) + "\nDynamic files must always have current directory context since containing external project name will always match the script info name."; }); + ts.Debug.assert(!isDynamic || this.currentDirectory === currentDirectory || this.useInferredProjectPerProjectRoot, "", function () { return JSON.stringify({ fileName: fileName, currentDirectory: currentDirectory, hostCurrentDirectory: _this.currentDirectory, openKeys: ts.arrayFrom(_this.openFilesWithNonRootedDiskPath.keys()) }) + "\nDynamic files must always be opened with service's current directory or service should support inferred project per projectRootPath."; }); // If the file is not opened by client and the file doesnot exist on the disk, return if (!openedByClient && !isDynamic && !(hostToQueryFileExistsOn || this.host).fileExists(fileName)) { return; @@ -137334,7 +137853,7 @@ var ts; if (!openedByClient) { this.watchClosedScriptInfo(info); } - else if (!ts.isRootedDiskPath(fileName) && !isDynamic) { + else if (!ts.isRootedDiskPath(fileName) && (!isDynamic || this.currentDirectory !== currentDirectory)) { // File that is opened by user but isn't rooted disk path this.openFilesWithNonRootedDiskPath.set(this.toCanonicalFileName(fileName), info); } @@ -138325,7 +138844,7 @@ var ts; directoriesWithoutPackageJson.set(ts.getDirectoryPath(fileName), true); }, getInDirectory: function (directory) { - return packageJsons.get(ts.combinePaths(directory, "package.json")); + return packageJsons.get(ts.combinePaths(directory, "package.json")) || undefined; }, directoryHasPackageJson: directoryHasPackageJson, searchDirectoryAndAncestors: function (directory) { @@ -138345,7 +138864,7 @@ var ts; }; function addOrUpdate(fileName) { var packageJsonInfo = ts.createPackageJsonInfo(fileName, project); - if (packageJsonInfo) { + if (packageJsonInfo !== undefined) { packageJsons.set(fileName, packageJsonInfo); directoriesWithoutPackageJson.delete(ts.getDirectoryPath(fileName)); } diff --git a/lib/tsserverlibrary.d.ts b/lib/tsserverlibrary.d.ts index f8215306f30..94c856cfd04 100644 --- a/lib/tsserverlibrary.d.ts +++ b/lib/tsserverlibrary.d.ts @@ -14,7 +14,7 @@ and limitations under the License. ***************************************************************************** */ declare namespace ts { - const versionMajorMinor = "3.7"; + const versionMajorMinor = "3.8"; /** The version of the TypeScript compiler release */ const version: string; } @@ -1964,6 +1964,8 @@ declare namespace ts { DiagnosticsPresent_OutputsSkipped = 1, DiagnosticsPresent_OutputsGenerated = 2, InvalidProject_OutputsSkipped = 3, + ProjectReferenceCycle_OutputsSkipped = 4, + /** @deprecated Use ProjectReferenceCycle_OutputsSkipped instead. */ ProjectReferenceCycle_OutputsSkupped = 4 } export interface EmitResult { @@ -2376,6 +2378,7 @@ declare namespace ts { JSLiteral = 16384, FreshLiteral = 32768, ArrayLiteral = 65536, + ObjectRestType = 131072, ClassOrInterface = 3, } export interface ObjectType extends Type { @@ -3169,8 +3172,9 @@ declare namespace ts { readonly disableSuggestions?: boolean; readonly quotePreference?: "auto" | "double" | "single"; readonly includeCompletionsForModuleExports?: boolean; + readonly includeAutomaticOptionalChainCompletions?: boolean; readonly includeCompletionsWithInsertText?: boolean; - readonly importModuleSpecifierPreference?: "relative" | "non-relative"; + readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative"; /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ readonly importModuleSpecifierEnding?: "minimal" | "index" | "js"; readonly allowTextChangesInNewFiles?: boolean; @@ -3522,6 +3526,7 @@ declare namespace ts { function isCallExpression(node: Node): node is CallExpression; function isCallChain(node: Node): node is CallChain; function isOptionalChain(node: Node): node is PropertyAccessChain | ElementAccessChain | CallChain; + function isNullishCoalesce(node: Node): boolean; function isNewExpression(node: Node): node is NewExpression; function isTaggedTemplateExpression(node: Node): node is TaggedTemplateExpression; function isTypeAssertion(node: Node): node is TypeAssertion; @@ -5071,7 +5076,7 @@ declare namespace ts { getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined): RefactorEditInfo | undefined; organizeImports(scope: OrganizeImportsScope, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[]; getEditsForFileRename(oldFilePath: string, newFilePath: string, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[]; - getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean): EmitOutput; + getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean, forceDtsEmit?: boolean): EmitOutput; getProgram(): Program | undefined; dispose(): void; } @@ -5194,7 +5199,7 @@ declare namespace ts { } interface FileTextChanges { fileName: string; - textChanges: TextChange[]; + textChanges: readonly TextChange[]; isNewFile?: boolean; } interface CodeAction { @@ -6626,9 +6631,11 @@ declare namespace ts.server.protocol { interface DefinitionResponse extends Response { body?: FileSpanWithContext[]; } - interface DefinitionInfoAndBoundSpanReponse extends Response { + interface DefinitionInfoAndBoundSpanResponse extends Response { body?: DefinitionInfoAndBoundSpan; } + /** @deprecated Use `DefinitionInfoAndBoundSpanResponse` instead. */ + type DefinitionInfoAndBoundSpanReponse = DefinitionInfoAndBoundSpanResponse; /** * Definition response message. Gives text range for definition. */ @@ -8291,7 +8298,13 @@ declare namespace ts.server.protocol { * For those entries, The `insertText` and `replacementSpan` properties will be set to change from `.x` property access to `["x"]`. */ readonly includeCompletionsWithInsertText?: boolean; - readonly importModuleSpecifierPreference?: "relative" | "non-relative"; + /** + * Unless this option is `false`, or `includeCompletionsWithInsertText` is not enabled, + * member completion lists triggered with `.` will include entries on potentially-null and potentially-undefined + * values, with insertion text to replace preceding `.` tokens with `?.`. + */ + readonly includeAutomaticOptionalChainCompletions?: boolean; + readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative"; readonly allowTextChangesInNewFiles?: boolean; readonly lazyConfiguredProjectsFromExternalProject?: boolean; readonly providePrefixAndSuffixTextForRename?: boolean; @@ -8556,7 +8569,7 @@ declare namespace ts.server { static resolveModule(moduleName: string, initialDir: string, host: ServerHost, log: (message: string) => void, logErrors?: (message: string) => void): {} | undefined; isKnownTypesPackageName(name: string): boolean; installPackage(options: InstallPackageOptions): Promise; - private readonly typingsCache; + private get typingsCache(); getCompilationSettings(): CompilerOptions; getCompilerOptions(): CompilerOptions; getNewLine(): string; @@ -8672,23 +8685,31 @@ declare namespace ts.server { readonly canonicalConfigFilePath: NormalizedPath; private projectReferenceCallbacks; private mapOfDeclarationDirectories; + private symlinkedDirectories; + private symlinkedFiles; /** Ref count to the project when opened from external project */ private externalProjectRefCount; private projectErrors; private projectReferences; protected isInitialLoadPending: () => boolean; + private fileExistsIfProjectReferenceDts; /** * This implementation of fileExists checks if the file being requested is * .d.ts file for the referenced Project. * If it is it returns true irrespective of whether that file exists on host */ fileExists(file: string): boolean; + private directoryExistsIfProjectReferenceDeclDir; /** * This implementation of directoryExists checks if the directory being requested is * directory of .d.ts file for the referenced Project. * If it is it returns true irrespective of whether that directory exists on host */ directoryExists(path: string): boolean; + private realpathIfSymlinkedProjectReferenceDts; + private getRealpath; + private handleDirectoryCouldBeSymlink; + private fileOrDirectoryExistsUsingSource; /** * If the project has reload from disk pending, it reloads (and then updates graph as part of that) instead of just updating the graph * @returns: true if set of files in the project stays the same and false - otherwise. diff --git a/lib/tsserverlibrary.js b/lib/tsserverlibrary.js index cb0c22f9ca6..df037f4846b 100644 --- a/lib/tsserverlibrary.js +++ b/lib/tsserverlibrary.js @@ -87,67 +87,20 @@ var __rest = (this && this.__rest) || function (s, e) { } return t; }; +/* @internal */ var ts; (function (ts) { - // WARNING: The script `configureNightly.ts` uses a regexp to parse out these values. - // If changing the text in this section, be sure to test `configureNightly` too. - ts.versionMajorMinor = "3.7"; - /** The version of the TypeScript compiler release */ - ts.version = ts.versionMajorMinor + ".0-dev"; -})(ts || (ts = {})); -(function (ts) { - /* @internal */ - var Comparison; - (function (Comparison) { - Comparison[Comparison["LessThan"] = -1] = "LessThan"; - Comparison[Comparison["EqualTo"] = 0] = "EqualTo"; - Comparison[Comparison["GreaterThan"] = 1] = "GreaterThan"; - })(Comparison = ts.Comparison || (ts.Comparison = {})); -})(ts || (ts = {})); -/* @internal */ -(function (ts) { - ts.emptyArray = []; - /** Create a MapLike with good performance. */ - function createDictionaryObject() { - var map = Object.create(/*prototype*/ null); // eslint-disable-line no-null/no-null - // Using 'delete' on an object causes V8 to put the object in dictionary mode. - // This disables creation of hidden classes, which are expensive when an object is - // constantly changing shape. - map.__ = undefined; - delete map.__; - return map; - } - /** Create a new map. If a template object is provided, the map will copy entries from it. */ - function createMap() { - return new ts.MapCtr(); - } - ts.createMap = createMap; - function createMapFromEntries(entries) { - var map = createMap(); - for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) { - var _a = entries_1[_i], key = _a[0], value = _a[1]; - map.set(key, value); + function createMapShim() { + /** Create a MapLike with good performance. */ + function createDictionaryObject() { + var map = Object.create(/*prototype*/ null); // eslint-disable-line no-null/no-null + // Using 'delete' on an object causes V8 to put the object in dictionary mode. + // This disables creation of hidden classes, which are expensive when an object is + // constantly changing shape. + map.__ = undefined; + delete map.__; + return map; } - return map; - } - ts.createMapFromEntries = createMapFromEntries; - function createMapFromTemplate(template) { - var map = new ts.MapCtr(); - // Copies keys/values from template. Note that for..in will not throw if - // template is undefined, and instead will just exit the loop. - for (var key in template) { - if (hasOwnProperty.call(template, key)) { - map.set(key, template[key]); - } - } - return map; - } - ts.createMapFromTemplate = createMapFromTemplate; - // Internet Explorer's Map doesn't support iteration, so don't use it. - // eslint-disable-next-line no-in-operator - ts.MapCtr = typeof Map !== "undefined" && "entries" in Map.prototype ? Map : shimMap(); - // Keep the class inside a function so it doesn't get compiled if it's not used. - function shimMap() { var MapIterator = /** @class */ (function () { function MapIterator(currentEntry, selector) { this.currentEntry = currentEntry; @@ -283,7 +236,75 @@ var ts; return class_1; }()); } - ts.shimMap = shimMap; + ts.createMapShim = createMapShim; +})(ts || (ts = {})); +var ts; +(function (ts) { + // WARNING: The script `configureNightly.ts` uses a regexp to parse out these values. + // If changing the text in this section, be sure to test `configureNightly` too. + ts.versionMajorMinor = "3.8"; + /** The version of the TypeScript compiler release */ + ts.version = ts.versionMajorMinor + ".0-dev"; +})(ts || (ts = {})); +(function (ts) { + /* @internal */ + var Comparison; + (function (Comparison) { + Comparison[Comparison["LessThan"] = -1] = "LessThan"; + Comparison[Comparison["EqualTo"] = 0] = "EqualTo"; + Comparison[Comparison["GreaterThan"] = 1] = "GreaterThan"; + })(Comparison = ts.Comparison || (ts.Comparison = {})); +})(ts || (ts = {})); +/* @internal */ +(function (ts) { + /** + * Returns the native Map implementation if it is available and compatible (i.e. supports iteration). + */ + function tryGetNativeMap() { + // Internet Explorer's Map doesn't support iteration, so don't use it. + // eslint-disable-next-line no-in-operator + return typeof Map !== "undefined" && "entries" in Map.prototype ? Map : undefined; + } + ts.tryGetNativeMap = tryGetNativeMap; +})(ts || (ts = {})); +/* @internal */ +(function (ts) { + ts.emptyArray = []; + ts.Map = ts.tryGetNativeMap() || (function () { + // NOTE: createMapShim will be defined for typescriptServices.js but not for tsc.js, so we must test for it. + if (typeof ts.createMapShim === "function") { + return ts.createMapShim(); + } + throw new Error("TypeScript requires an environment that provides a compatible native Map implementation."); + })(); + /** Create a new map. */ + function createMap() { + return new ts.Map(); + } + ts.createMap = createMap; + /** Create a new map from an array of entries. */ + function createMapFromEntries(entries) { + var map = createMap(); + for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) { + var _a = entries_1[_i], key = _a[0], value = _a[1]; + map.set(key, value); + } + return map; + } + ts.createMapFromEntries = createMapFromEntries; + /** Create a new map from a template object is provided, the map will copy entries from it. */ + function createMapFromTemplate(template) { + var map = new ts.Map(); + // Copies keys/values from template. Note that for..in will not throw if + // template is undefined, and instead will just exit the loop. + for (var key in template) { + if (hasOwnProperty.call(template, key)) { + map.set(key, template[key]); + } + } + return map; + } + ts.createMapFromTemplate = createMapFromTemplate; function length(array) { return array ? array.length : 0; } @@ -1865,20 +1886,6 @@ var ts; return str.indexOf(substring) !== -1; } ts.stringContains = stringContains; - function fileExtensionIs(path, extension) { - return path.length > extension.length && endsWith(path, extension); - } - ts.fileExtensionIs = fileExtensionIs; - function fileExtensionIsOneOf(path, extensions) { - for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) { - var extension = extensions_1[_i]; - if (fileExtensionIs(path, extension)) { - return true; - } - } - return false; - } - ts.fileExtensionIsOneOf = fileExtensionIsOneOf; /** * Takes a string like "jquery-min.4.2.3" and returns "jquery" */ @@ -2192,11 +2199,14 @@ var ts; if (isFlags) { var result = ""; var remainingFlags = value; - for (var i = members.length - 1; i >= 0 && remainingFlags !== 0; i--) { - var _a = members[i], enumValue = _a[0], enumName = _a[1]; - if (enumValue !== 0 && (remainingFlags & enumValue) === enumValue) { + for (var _i = 0, members_1 = members; _i < members_1.length; _i++) { + var _a = members_1[_i], enumValue = _a[0], enumName = _a[1]; + if (enumValue > value) { + break; + } + if (enumValue !== 0 && enumValue & value) { + result = "" + result + (result ? "|" : "") + enumName; remainingFlags &= ~enumValue; - result = "" + enumName + (result ? "|" : "") + result; } } if (remainingFlags === 0) { @@ -2204,8 +2214,8 @@ var ts; } } else { - for (var _i = 0, members_1 = members; _i < members_1.length; _i++) { - var _b = members_1[_i], enumValue = _b[0], enumName = _b[1]; + for (var _b = 0, members_2 = members; _b < members_2.length; _b++) { + var _c = members_2[_b], enumValue = _c[0], enumName = _c[1]; if (enumValue === value) { return enumName; } @@ -2279,6 +2289,33 @@ var ts; ? function (node, message) { return assert(node === undefined, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was unexpected'."; }, Debug.assertMissingNode); } : ts.noop; var isDebugInfoEnabled = false; + var extendedDebugModule; + function extendedDebug() { + enableDebugInfo(); + if (!extendedDebugModule) { + throw new Error("Debugging helpers could not be loaded."); + } + return extendedDebugModule; + } + function printControlFlowGraph(flowNode) { + return console.log(formatControlFlowGraph(flowNode)); + } + Debug.printControlFlowGraph = printControlFlowGraph; + function formatControlFlowGraph(flowNode) { + return extendedDebug().formatControlFlowGraph(flowNode); + } + Debug.formatControlFlowGraph = formatControlFlowGraph; + function attachFlowNodeDebugInfo(flowNode) { + if (isDebugInfoEnabled) { + if (!("__debugFlowFlags" in flowNode)) { // eslint-disable-line no-in-operator + Object.defineProperties(flowNode, { + __debugFlowFlags: { get: function () { return formatEnum(this.flags, ts.FlowFlags, /*isFlags*/ true); } }, + __debugToString: { value: function () { return formatControlFlowGraph(this); } } + }); + } + } + } + Debug.attachFlowNodeDebugInfo = attachFlowNodeDebugInfo; /** * Injects debug information into frequently used types. */ @@ -2322,6 +2359,20 @@ var ts; }); } } + // attempt to load extended debugging information + try { + if (ts.sys && ts.sys.require) { + var basePath = ts.getDirectoryPath(ts.resolvePath(ts.sys.getExecutingFilePath())); + var result = ts.sys.require(basePath, "./compiler-debug"); + if (!result.error) { + result.module.init(ts); + extendedDebugModule = result.module; + } + } + } + catch (_a) { + // do nothing + } isDebugInfoEnabled = true; } Debug.enableDebugInfo = enableDebugInfo; @@ -2485,8 +2536,6 @@ var ts; } /** Performance logger that will generate ETW events if possible - check for `logEvent` member, as `etwModule` will be `{}` when browserified */ ts.perfLogger = etwModule && etwModule.logEvent ? etwModule : nullLogger; - var args = typeof process === "undefined" ? [] : process.argv; - ts.perfLogger.logInfoEvent("Starting TypeScript v" + ts.versionMajorMinor + " with command line: " + JSON.stringify(args)); })(ts || (ts = {})); /* @internal */ var ts; @@ -3381,6 +3430,7 @@ var ts; /* @internal */ TokenFlags[TokenFlags["NumericLiteralFlags"] = 1008] = "NumericLiteralFlags"; })(TokenFlags = ts.TokenFlags || (ts.TokenFlags = {})); + // NOTE: Ensure this is up-to-date with src/debug/debug.ts var FlowFlags; (function (FlowFlags) { FlowFlags[FlowFlags["Unreachable"] = 1] = "Unreachable"; @@ -3436,6 +3486,8 @@ var ts; // When build skipped because passed in project is invalid ExitStatus[ExitStatus["InvalidProject_OutputsSkipped"] = 3] = "InvalidProject_OutputsSkipped"; // When build is skipped because project references form cycle + ExitStatus[ExitStatus["ProjectReferenceCycle_OutputsSkipped"] = 4] = "ProjectReferenceCycle_OutputsSkipped"; + /** @deprecated Use ProjectReferenceCycle_OutputsSkipped instead. */ ExitStatus[ExitStatus["ProjectReferenceCycle_OutputsSkupped"] = 4] = "ProjectReferenceCycle_OutputsSkupped"; })(ExitStatus = ts.ExitStatus || (ts.ExitStatus = {})); /* @internal */ @@ -3445,6 +3497,14 @@ var ts; UnionReduction[UnionReduction["Literal"] = 1] = "Literal"; UnionReduction[UnionReduction["Subtype"] = 2] = "Subtype"; })(UnionReduction = ts.UnionReduction || (ts.UnionReduction = {})); + /* @internal */ + var ContextFlags; + (function (ContextFlags) { + ContextFlags[ContextFlags["None"] = 0] = "None"; + ContextFlags[ContextFlags["Signature"] = 1] = "Signature"; + ContextFlags[ContextFlags["NoConstraints"] = 2] = "NoConstraints"; + ContextFlags[ContextFlags["Completion"] = 4] = "Completion"; + })(ContextFlags = ts.ContextFlags || (ts.ContextFlags = {})); // NOTE: If modifying this enum, must modify `TypeFormatFlags` too! var NodeBuilderFlags; (function (NodeBuilderFlags) { @@ -3847,19 +3907,20 @@ var ts; ObjectFlags[ObjectFlags["JSLiteral"] = 16384] = "JSLiteral"; ObjectFlags[ObjectFlags["FreshLiteral"] = 32768] = "FreshLiteral"; ObjectFlags[ObjectFlags["ArrayLiteral"] = 65536] = "ArrayLiteral"; + ObjectFlags[ObjectFlags["ObjectRestType"] = 131072] = "ObjectRestType"; /* @internal */ - ObjectFlags[ObjectFlags["PrimitiveUnion"] = 131072] = "PrimitiveUnion"; + ObjectFlags[ObjectFlags["PrimitiveUnion"] = 262144] = "PrimitiveUnion"; /* @internal */ - ObjectFlags[ObjectFlags["ContainsWideningType"] = 262144] = "ContainsWideningType"; + ObjectFlags[ObjectFlags["ContainsWideningType"] = 524288] = "ContainsWideningType"; /* @internal */ - ObjectFlags[ObjectFlags["ContainsObjectOrArrayLiteral"] = 524288] = "ContainsObjectOrArrayLiteral"; + ObjectFlags[ObjectFlags["ContainsObjectOrArrayLiteral"] = 1048576] = "ContainsObjectOrArrayLiteral"; /* @internal */ - ObjectFlags[ObjectFlags["NonInferrableType"] = 1048576] = "NonInferrableType"; + ObjectFlags[ObjectFlags["NonInferrableType"] = 2097152] = "NonInferrableType"; ObjectFlags[ObjectFlags["ClassOrInterface"] = 3] = "ClassOrInterface"; /* @internal */ - ObjectFlags[ObjectFlags["RequiresWidening"] = 786432] = "RequiresWidening"; + ObjectFlags[ObjectFlags["RequiresWidening"] = 1572864] = "RequiresWidening"; /* @internal */ - ObjectFlags[ObjectFlags["PropagatingFlags"] = 1835008] = "PropagatingFlags"; + ObjectFlags[ObjectFlags["PropagatingFlags"] = 3670016] = "PropagatingFlags"; })(ObjectFlags = ts.ObjectFlags || (ts.ObjectFlags = {})); /* @internal */ var VarianceFlags; @@ -3886,6 +3947,20 @@ var ts; SignatureKind[SignatureKind["Call"] = 0] = "Call"; SignatureKind[SignatureKind["Construct"] = 1] = "Construct"; })(SignatureKind = ts.SignatureKind || (ts.SignatureKind = {})); + /* @internal */ + var SignatureFlags; + (function (SignatureFlags) { + SignatureFlags[SignatureFlags["None"] = 0] = "None"; + SignatureFlags[SignatureFlags["HasRestParameter"] = 1] = "HasRestParameter"; + SignatureFlags[SignatureFlags["HasLiteralTypes"] = 2] = "HasLiteralTypes"; + SignatureFlags[SignatureFlags["IsInnerCallChain"] = 4] = "IsInnerCallChain"; + SignatureFlags[SignatureFlags["IsOuterCallChain"] = 8] = "IsOuterCallChain"; + // We do not propagate `IsInnerCallChain` to instantiated signatures, as that would result in us + // attempting to add `| undefined` on each recursive call to `getReturnTypeOfSignature` when + // instantiating the return type. + SignatureFlags[SignatureFlags["PropagatingFlags"] = 3] = "PropagatingFlags"; + SignatureFlags[SignatureFlags["CallChainFlags"] = 12] = "CallChainFlags"; + })(SignatureFlags = ts.SignatureFlags || (ts.SignatureFlags = {})); var IndexKind; (function (IndexKind) { IndexKind[IndexKind["String"] = 0] = "String"; @@ -4886,16 +4961,6 @@ var ts; } } ts.createRecursiveDirectoryWatcher = createRecursiveDirectoryWatcher; - function recursiveCreateDirectory(directoryPath, sys) { - var basePath = ts.getDirectoryPath(directoryPath); - var shouldCreateParent = basePath !== "" && directoryPath !== basePath && !sys.directoryExists(basePath); - if (shouldCreateParent) { - recursiveCreateDirectory(basePath, sys); - } - if (shouldCreateParent || !sys.directoryExists(directoryPath)) { - sys.createDirectory(directoryPath); - } - } /** * patch writefile to create folder before writing the file */ @@ -4904,11 +4969,7 @@ var ts; // patch writefile to create folder before writing the file var originalWriteFile = sys.writeFile; sys.writeFile = function (path, data, writeBom) { - var directoryPath = ts.getDirectoryPath(ts.normalizeSlashes(path)); - if (directoryPath && !sys.directoryExists(directoryPath)) { - recursiveCreateDirectory(directoryPath, sys); - } - originalWriteFile.call(sys, path, data, writeBom); + return ts.writeFileEnsuringDirectories(path, data, !!writeBom, function (path, data, writeByteOrderMark) { return originalWriteFile.call(sys, path, data, writeByteOrderMark); }, function (path) { return sys.createDirectory(path); }, function (path) { return sys.directoryExists(path); }); }; } ts.patchWriteFileEnsuringDirectory = patchWriteFileEnsuringDirectory; @@ -5057,6 +5118,15 @@ var ts; bufferFrom: bufferFrom, base64decode: function (input) { return bufferFrom(input, "base64").toString("utf8"); }, base64encode: function (input) { return bufferFrom(input).toString("base64"); }, + require: function (baseDir, moduleName) { + try { + var modulePath = ts.resolveJSModule(moduleName, baseDir, nodeSystem); + return { module: require(modulePath), modulePath: modulePath, error: undefined }; + } + catch (error) { + return { module: undefined, modulePath: undefined, error: error }; + } + } }; return nodeSystem; /** @@ -5195,6 +5265,7 @@ var ts; if (fsSupportsRecursive) { return watchDirectoryUsingFsWatch; } + // defer watchDirectoryRecursively as it depends on `ts.createMap()` which may not be usable yet. var watchDirectory = tscWatchDirectory === "RecursiveDirectoryUsingFsWatchFile" ? createWatchDirectoryUsing(fsWatchFile) : tscWatchDirectory === "RecursiveDirectoryUsingDynamicPriorityPolling" ? @@ -5639,6 +5710,673 @@ var ts; ts.Debug.isDebugging = true; } })(ts || (ts = {})); +/* @internal */ +var ts; +(function (ts) { + /** + * Internally, we represent paths as strings with '/' as the directory separator. + * When we make system calls (eg: LanguageServiceHost.getDirectory()), + * we expect the host to correctly handle paths in our specified format. + */ + ts.directorySeparator = "/"; + var altDirectorySeparator = "\\"; + var urlSchemeSeparator = "://"; + var backslashRegExp = /\\/g; + //// Path Tests + /** + * Determines whether a charCode corresponds to `/` or `\`. + */ + function isAnyDirectorySeparator(charCode) { + return charCode === 47 /* slash */ || charCode === 92 /* backslash */; + } + ts.isAnyDirectorySeparator = isAnyDirectorySeparator; + /** + * Determines whether a path starts with a URL scheme (e.g. starts with `http://`, `ftp://`, `file://`, etc.). + */ + function isUrl(path) { + return getEncodedRootLength(path) < 0; + } + ts.isUrl = isUrl; + /** + * Determines whether a path is an absolute disk path (e.g. starts with `/`, or a dos path + * like `c:`, `c:\` or `c:/`). + */ + function isRootedDiskPath(path) { + return getEncodedRootLength(path) > 0; + } + ts.isRootedDiskPath = isRootedDiskPath; + /** + * Determines whether a path consists only of a path root. + */ + function isDiskPathRoot(path) { + var rootLength = getEncodedRootLength(path); + return rootLength > 0 && rootLength === path.length; + } + ts.isDiskPathRoot = isDiskPathRoot; + /** + * Determines whether a path starts with an absolute path component (i.e. `/`, `c:/`, `file://`, etc.). + * + * ```ts + * // POSIX + * pathIsAbsolute("/path/to/file.ext") === true + * // DOS + * pathIsAbsolute("c:/path/to/file.ext") === true + * // URL + * pathIsAbsolute("file:///path/to/file.ext") === true + * // Non-absolute + * pathIsAbsolute("path/to/file.ext") === false + * pathIsAbsolute("./path/to/file.ext") === false + * ``` + */ + function pathIsAbsolute(path) { + return getEncodedRootLength(path) !== 0; + } + ts.pathIsAbsolute = pathIsAbsolute; + /** + * Determines whether a path starts with a relative path component (i.e. `.` or `..`). + */ + function pathIsRelative(path) { + return /^\.\.?($|[\\/])/.test(path); + } + ts.pathIsRelative = pathIsRelative; + function hasExtension(fileName) { + return ts.stringContains(getBaseFileName(fileName), "."); + } + ts.hasExtension = hasExtension; + function fileExtensionIs(path, extension) { + return path.length > extension.length && ts.endsWith(path, extension); + } + ts.fileExtensionIs = fileExtensionIs; + function fileExtensionIsOneOf(path, extensions) { + for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) { + var extension = extensions_1[_i]; + if (fileExtensionIs(path, extension)) { + return true; + } + } + return false; + } + ts.fileExtensionIsOneOf = fileExtensionIsOneOf; + /** + * Determines whether a path has a trailing separator (`/` or `\\`). + */ + function hasTrailingDirectorySeparator(path) { + return path.length > 0 && isAnyDirectorySeparator(path.charCodeAt(path.length - 1)); + } + ts.hasTrailingDirectorySeparator = hasTrailingDirectorySeparator; + //// Path Parsing + function isVolumeCharacter(charCode) { + return (charCode >= 97 /* a */ && charCode <= 122 /* z */) || + (charCode >= 65 /* A */ && charCode <= 90 /* Z */); + } + function getFileUrlVolumeSeparatorEnd(url, start) { + var ch0 = url.charCodeAt(start); + if (ch0 === 58 /* colon */) + return start + 1; + if (ch0 === 37 /* percent */ && url.charCodeAt(start + 1) === 51 /* _3 */) { + var ch2 = url.charCodeAt(start + 2); + if (ch2 === 97 /* a */ || ch2 === 65 /* A */) + return start + 3; + } + return -1; + } + /** + * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). + * If the root is part of a URL, the twos-complement of the root length is returned. + */ + function getEncodedRootLength(path) { + if (!path) + return 0; + var ch0 = path.charCodeAt(0); + // POSIX or UNC + if (ch0 === 47 /* slash */ || ch0 === 92 /* backslash */) { + if (path.charCodeAt(1) !== ch0) + return 1; // POSIX: "/" (or non-normalized "\") + var p1 = path.indexOf(ch0 === 47 /* slash */ ? ts.directorySeparator : altDirectorySeparator, 2); + if (p1 < 0) + return path.length; // UNC: "//server" or "\\server" + return p1 + 1; // UNC: "//server/" or "\\server\" + } + // DOS + if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58 /* colon */) { + var ch2 = path.charCodeAt(2); + if (ch2 === 47 /* slash */ || ch2 === 92 /* backslash */) + return 3; // DOS: "c:/" or "c:\" + if (path.length === 2) + return 2; // DOS: "c:" (but not "c:d") + } + // URL + var schemeEnd = path.indexOf(urlSchemeSeparator); + if (schemeEnd !== -1) { + var authorityStart = schemeEnd + urlSchemeSeparator.length; + var authorityEnd = path.indexOf(ts.directorySeparator, authorityStart); + if (authorityEnd !== -1) { // URL: "file:///", "file://server/", "file://server/path" + // For local "file" URLs, include the leading DOS volume (if present). + // Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a + // special case interpreted as "the machine from which the URL is being interpreted". + var scheme = path.slice(0, schemeEnd); + var authority = path.slice(authorityStart, authorityEnd); + if (scheme === "file" && (authority === "" || authority === "localhost") && + isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) { + var volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2); + if (volumeSeparatorEnd !== -1) { + if (path.charCodeAt(volumeSeparatorEnd) === 47 /* slash */) { + // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/" + return ~(volumeSeparatorEnd + 1); + } + if (volumeSeparatorEnd === path.length) { + // URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a" + // but not "file:///c:d" or "file:///c%3ad" + return ~volumeSeparatorEnd; + } + } + } + return ~(authorityEnd + 1); // URL: "file://server/", "http://server/" + } + return ~path.length; // URL: "file://server", "http://server" + } + // relative + return 0; + } + /** + * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). + * + * For example: + * ```ts + * getRootLength("a") === 0 // "" + * getRootLength("/") === 1 // "/" + * getRootLength("c:") === 2 // "c:" + * getRootLength("c:d") === 0 // "" + * getRootLength("c:/") === 3 // "c:/" + * getRootLength("c:\\") === 3 // "c:\\" + * getRootLength("//server") === 7 // "//server" + * getRootLength("//server/share") === 8 // "//server/" + * getRootLength("\\\\server") === 7 // "\\\\server" + * getRootLength("\\\\server\\share") === 8 // "\\\\server\\" + * getRootLength("file:///path") === 8 // "file:///" + * getRootLength("file:///c:") === 10 // "file:///c:" + * getRootLength("file:///c:d") === 8 // "file:///" + * getRootLength("file:///c:/path") === 11 // "file:///c:/" + * getRootLength("file://server") === 13 // "file://server" + * getRootLength("file://server/path") === 14 // "file://server/" + * getRootLength("http://server") === 13 // "http://server" + * getRootLength("http://server/path") === 14 // "http://server/" + * ``` + */ + function getRootLength(path) { + var rootLength = getEncodedRootLength(path); + return rootLength < 0 ? ~rootLength : rootLength; + } + ts.getRootLength = getRootLength; + function getDirectoryPath(path) { + path = normalizeSlashes(path); + // If the path provided is itself the root, then return it. + var rootLength = getRootLength(path); + if (rootLength === path.length) + return path; + // return the leading portion of the path up to the last (non-terminal) directory separator + // but not including any trailing directory separator. + path = removeTrailingDirectorySeparator(path); + return path.slice(0, Math.max(rootLength, path.lastIndexOf(ts.directorySeparator))); + } + ts.getDirectoryPath = getDirectoryPath; + function getBaseFileName(path, extensions, ignoreCase) { + path = normalizeSlashes(path); + // if the path provided is itself the root, then it has not file name. + var rootLength = getRootLength(path); + if (rootLength === path.length) + return ""; + // return the trailing portion of the path starting after the last (non-terminal) directory + // separator but not including any trailing directory separator. + path = removeTrailingDirectorySeparator(path); + var name = path.slice(Math.max(getRootLength(path), path.lastIndexOf(ts.directorySeparator) + 1)); + var extension = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(name, extensions, ignoreCase) : undefined; + return extension ? name.slice(0, name.length - extension.length) : name; + } + ts.getBaseFileName = getBaseFileName; + function tryGetExtensionFromPath(path, extension, stringEqualityComparer) { + if (!ts.startsWith(extension, ".")) + extension = "." + extension; + if (path.length >= extension.length && path.charCodeAt(path.length - extension.length) === 46 /* dot */) { + var pathExtension = path.slice(path.length - extension.length); + if (stringEqualityComparer(pathExtension, extension)) { + return pathExtension; + } + } + } + function getAnyExtensionFromPathWorker(path, extensions, stringEqualityComparer) { + if (typeof extensions === "string") { + return tryGetExtensionFromPath(path, extensions, stringEqualityComparer) || ""; + } + for (var _i = 0, extensions_2 = extensions; _i < extensions_2.length; _i++) { + var extension = extensions_2[_i]; + var result = tryGetExtensionFromPath(path, extension, stringEqualityComparer); + if (result) + return result; + } + return ""; + } + function getAnyExtensionFromPath(path, extensions, ignoreCase) { + // Retrieves any string from the final "." onwards from a base file name. + // Unlike extensionFromPath, which throws an exception on unrecognized extensions. + if (extensions) { + return getAnyExtensionFromPathWorker(removeTrailingDirectorySeparator(path), extensions, ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive); + } + var baseFileName = getBaseFileName(path); + var extensionIndex = baseFileName.lastIndexOf("."); + if (extensionIndex >= 0) { + return baseFileName.substring(extensionIndex); + } + return ""; + } + ts.getAnyExtensionFromPath = getAnyExtensionFromPath; + function pathComponents(path, rootLength) { + var root = path.substring(0, rootLength); + var rest = path.substring(rootLength).split(ts.directorySeparator); + if (rest.length && !ts.lastOrUndefined(rest)) + rest.pop(); + return __spreadArrays([root], rest); + } + /** + * Parse a path into an array containing a root component (at index 0) and zero or more path + * components (at indices > 0). The result is not normalized. + * If the path is relative, the root component is `""`. + * If the path is absolute, the root component includes the first path separator (`/`). + * + * ```ts + * // POSIX + * getPathComponents("/path/to/file.ext") === ["/", "path", "to", "file.ext"] + * getPathComponents("/path/to/") === ["/", "path", "to"] + * getPathComponents("/") === ["/"] + * // DOS + * getPathComponents("c:/path/to/file.ext") === ["c:/", "path", "to", "file.ext"] + * getPathComponents("c:/path/to/") === ["c:/", "path", "to"] + * getPathComponents("c:/") === ["c:/"] + * getPathComponents("c:") === ["c:"] + * // URL + * getPathComponents("http://typescriptlang.org/path/to/file.ext") === ["http://typescriptlang.org/", "path", "to", "file.ext"] + * getPathComponents("http://typescriptlang.org/path/to/") === ["http://typescriptlang.org/", "path", "to"] + * getPathComponents("http://typescriptlang.org/") === ["http://typescriptlang.org/"] + * getPathComponents("http://typescriptlang.org") === ["http://typescriptlang.org"] + * getPathComponents("file://server/path/to/file.ext") === ["file://server/", "path", "to", "file.ext"] + * getPathComponents("file://server/path/to/") === ["file://server/", "path", "to"] + * getPathComponents("file://server/") === ["file://server/"] + * getPathComponents("file://server") === ["file://server"] + * getPathComponents("file:///path/to/file.ext") === ["file:///", "path", "to", "file.ext"] + * getPathComponents("file:///path/to/") === ["file:///", "path", "to"] + * getPathComponents("file:///") === ["file:///"] + * getPathComponents("file://") === ["file://"] + */ + function getPathComponents(path, currentDirectory) { + if (currentDirectory === void 0) { currentDirectory = ""; } + path = combinePaths(currentDirectory, path); + return pathComponents(path, getRootLength(path)); + } + ts.getPathComponents = getPathComponents; + //// Path Formatting + /** + * Formats a parsed path consisting of a root component (at index 0) and zero or more path + * segments (at indices > 0). + * + * ```ts + * getPathFromPathComponents(["/", "path", "to", "file.ext"]) === "/path/to/file.ext" + * ``` + */ + function getPathFromPathComponents(pathComponents) { + if (pathComponents.length === 0) + return ""; + var root = pathComponents[0] && ensureTrailingDirectorySeparator(pathComponents[0]); + return root + pathComponents.slice(1).join(ts.directorySeparator); + } + ts.getPathFromPathComponents = getPathFromPathComponents; + //// Path Normalization + /** + * Normalize path separators, converting `\` into `/`. + */ + function normalizeSlashes(path) { + return path.replace(backslashRegExp, ts.directorySeparator); + } + ts.normalizeSlashes = normalizeSlashes; + /** + * Reduce an array of path components to a more simplified path by navigating any + * `"."` or `".."` entries in the path. + */ + function reducePathComponents(components) { + if (!ts.some(components)) + return []; + var reduced = [components[0]]; + for (var i = 1; i < components.length; i++) { + var component = components[i]; + if (!component) + continue; + if (component === ".") + continue; + if (component === "..") { + if (reduced.length > 1) { + if (reduced[reduced.length - 1] !== "..") { + reduced.pop(); + continue; + } + } + else if (reduced[0]) + continue; + } + reduced.push(component); + } + return reduced; + } + ts.reducePathComponents = reducePathComponents; + /** + * Combines paths. If a path is absolute, it replaces any previous path. Relative paths are not simplified. + * + * ```ts + * // Non-rooted + * combinePaths("path", "to", "file.ext") === "path/to/file.ext" + * combinePaths("path", "dir", "..", "to", "file.ext") === "path/dir/../to/file.ext" + * // POSIX + * combinePaths("/path", "to", "file.ext") === "/path/to/file.ext" + * combinePaths("/path", "/to", "file.ext") === "/to/file.ext" + * // DOS + * combinePaths("c:/path", "to", "file.ext") === "c:/path/to/file.ext" + * combinePaths("c:/path", "c:/to", "file.ext") === "c:/to/file.ext" + * // URL + * combinePaths("file:///path", "to", "file.ext") === "file:///path/to/file.ext" + * combinePaths("file:///path", "file:///to", "file.ext") === "file:///to/file.ext" + * ``` + */ + function combinePaths(path) { + var paths = []; + for (var _i = 1; _i < arguments.length; _i++) { + paths[_i - 1] = arguments[_i]; + } + if (path) + path = normalizeSlashes(path); + for (var _a = 0, paths_1 = paths; _a < paths_1.length; _a++) { + var relativePath = paths_1[_a]; + if (!relativePath) + continue; + relativePath = normalizeSlashes(relativePath); + if (!path || getRootLength(relativePath) !== 0) { + path = relativePath; + } + else { + path = ensureTrailingDirectorySeparator(path) + relativePath; + } + } + return path; + } + ts.combinePaths = combinePaths; + /** + * Combines and resolves paths. If a path is absolute, it replaces any previous path. Any + * `.` and `..` path components are resolved. Trailing directory separators are preserved. + * + * ```ts + * resolvePath("/path", "to", "file.ext") === "path/to/file.ext" + * resolvePath("/path", "to", "file.ext/") === "path/to/file.ext/" + * resolvePath("/path", "dir", "..", "to", "file.ext") === "path/to/file.ext" + * ``` + */ + function resolvePath(path) { + var paths = []; + for (var _i = 1; _i < arguments.length; _i++) { + paths[_i - 1] = arguments[_i]; + } + return normalizePath(ts.some(paths) ? combinePaths.apply(void 0, __spreadArrays([path], paths)) : normalizeSlashes(path)); + } + ts.resolvePath = resolvePath; + /** + * Parse a path into an array containing a root component (at index 0) and zero or more path + * components (at indices > 0). The result is normalized. + * If the path is relative, the root component is `""`. + * If the path is absolute, the root component includes the first path separator (`/`). + * + * ```ts + * getNormalizedPathComponents("to/dir/../file.ext", "/path/") === ["/", "path", "to", "file.ext"] + */ + function getNormalizedPathComponents(path, currentDirectory) { + return reducePathComponents(getPathComponents(path, currentDirectory)); + } + ts.getNormalizedPathComponents = getNormalizedPathComponents; + function getNormalizedAbsolutePath(fileName, currentDirectory) { + return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory)); + } + ts.getNormalizedAbsolutePath = getNormalizedAbsolutePath; + function normalizePath(path) { + path = normalizeSlashes(path); + var normalized = getPathFromPathComponents(reducePathComponents(getPathComponents(path))); + return normalized && hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(normalized) : normalized; + } + ts.normalizePath = normalizePath; + function getPathWithoutRoot(pathComponents) { + if (pathComponents.length === 0) + return ""; + return pathComponents.slice(1).join(ts.directorySeparator); + } + function getNormalizedAbsolutePathWithoutRoot(fileName, currentDirectory) { + return getPathWithoutRoot(getNormalizedPathComponents(fileName, currentDirectory)); + } + ts.getNormalizedAbsolutePathWithoutRoot = getNormalizedAbsolutePathWithoutRoot; + function toPath(fileName, basePath, getCanonicalFileName) { + var nonCanonicalizedPath = isRootedDiskPath(fileName) + ? normalizePath(fileName) + : getNormalizedAbsolutePath(fileName, basePath); + return getCanonicalFileName(nonCanonicalizedPath); + } + ts.toPath = toPath; + function normalizePathAndParts(path) { + path = normalizeSlashes(path); + var _a = reducePathComponents(getPathComponents(path)), root = _a[0], parts = _a.slice(1); + if (parts.length) { + var joinedParts = root + parts.join(ts.directorySeparator); + return { path: hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(joinedParts) : joinedParts, parts: parts }; + } + else { + return { path: root, parts: parts }; + } + } + ts.normalizePathAndParts = normalizePathAndParts; + function removeTrailingDirectorySeparator(path) { + if (hasTrailingDirectorySeparator(path)) { + return path.substr(0, path.length - 1); + } + return path; + } + ts.removeTrailingDirectorySeparator = removeTrailingDirectorySeparator; + function ensureTrailingDirectorySeparator(path) { + if (!hasTrailingDirectorySeparator(path)) { + return path + ts.directorySeparator; + } + return path; + } + ts.ensureTrailingDirectorySeparator = ensureTrailingDirectorySeparator; + /** + * Ensures a path is either absolute (prefixed with `/` or `c:`) or dot-relative (prefixed + * with `./` or `../`) so as not to be confused with an unprefixed module name. + * + * ```ts + * ensurePathIsNonModuleName("/path/to/file.ext") === "/path/to/file.ext" + * ensurePathIsNonModuleName("./path/to/file.ext") === "./path/to/file.ext" + * ensurePathIsNonModuleName("../path/to/file.ext") === "../path/to/file.ext" + * ensurePathIsNonModuleName("path/to/file.ext") === "./path/to/file.ext" + * ``` + */ + function ensurePathIsNonModuleName(path) { + return !pathIsAbsolute(path) && !pathIsRelative(path) ? "./" + path : path; + } + ts.ensurePathIsNonModuleName = ensurePathIsNonModuleName; + function changeAnyExtension(path, ext, extensions, ignoreCase) { + var pathext = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(path, extensions, ignoreCase) : getAnyExtensionFromPath(path); + return pathext ? path.slice(0, path.length - pathext.length) + (ts.startsWith(ext, ".") ? ext : "." + ext) : path; + } + ts.changeAnyExtension = changeAnyExtension; + //// Path Comparisons + // check path for these segments: '', '.'. '..' + var relativePathSegmentRegExp = /(^|\/)\.{0,2}($|\/)/; + function comparePathsWorker(a, b, componentComparer) { + if (a === b) + return 0 /* EqualTo */; + if (a === undefined) + return -1 /* LessThan */; + if (b === undefined) + return 1 /* GreaterThan */; + // NOTE: Performance optimization - shortcut if the root segments differ as there would be no + // need to perform path reduction. + var aRoot = a.substring(0, getRootLength(a)); + var bRoot = b.substring(0, getRootLength(b)); + var result = ts.compareStringsCaseInsensitive(aRoot, bRoot); + if (result !== 0 /* EqualTo */) { + return result; + } + // NOTE: Performance optimization - shortcut if there are no relative path segments in + // the non-root portion of the path + var aRest = a.substring(aRoot.length); + var bRest = b.substring(bRoot.length); + if (!relativePathSegmentRegExp.test(aRest) && !relativePathSegmentRegExp.test(bRest)) { + return componentComparer(aRest, bRest); + } + // The path contains a relative path segment. Normalize the paths and perform a slower component + // by component comparison. + var aComponents = reducePathComponents(getPathComponents(a)); + var bComponents = reducePathComponents(getPathComponents(b)); + var sharedLength = Math.min(aComponents.length, bComponents.length); + for (var i = 1; i < sharedLength; i++) { + var result_1 = componentComparer(aComponents[i], bComponents[i]); + if (result_1 !== 0 /* EqualTo */) { + return result_1; + } + } + return ts.compareValues(aComponents.length, bComponents.length); + } + /** + * Performs a case-sensitive comparison of two paths. Path roots are always compared case-insensitively. + */ + function comparePathsCaseSensitive(a, b) { + return comparePathsWorker(a, b, ts.compareStringsCaseSensitive); + } + ts.comparePathsCaseSensitive = comparePathsCaseSensitive; + /** + * Performs a case-insensitive comparison of two paths. + */ + function comparePathsCaseInsensitive(a, b) { + return comparePathsWorker(a, b, ts.compareStringsCaseInsensitive); + } + ts.comparePathsCaseInsensitive = comparePathsCaseInsensitive; + function comparePaths(a, b, currentDirectory, ignoreCase) { + if (typeof currentDirectory === "string") { + a = combinePaths(currentDirectory, a); + b = combinePaths(currentDirectory, b); + } + else if (typeof currentDirectory === "boolean") { + ignoreCase = currentDirectory; + } + return comparePathsWorker(a, b, ts.getStringComparer(ignoreCase)); + } + ts.comparePaths = comparePaths; + function containsPath(parent, child, currentDirectory, ignoreCase) { + if (typeof currentDirectory === "string") { + parent = combinePaths(currentDirectory, parent); + child = combinePaths(currentDirectory, child); + } + else if (typeof currentDirectory === "boolean") { + ignoreCase = currentDirectory; + } + if (parent === undefined || child === undefined) + return false; + if (parent === child) + return true; + var parentComponents = reducePathComponents(getPathComponents(parent)); + var childComponents = reducePathComponents(getPathComponents(child)); + if (childComponents.length < parentComponents.length) { + return false; + } + var componentEqualityComparer = ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive; + for (var i = 0; i < parentComponents.length; i++) { + var equalityComparer = i === 0 ? ts.equateStringsCaseInsensitive : componentEqualityComparer; + if (!equalityComparer(parentComponents[i], childComponents[i])) { + return false; + } + } + return true; + } + ts.containsPath = containsPath; + /** + * Determines whether `fileName` starts with the specified `directoryName` using the provided path canonicalization callback. + * Comparison is case-sensitive between the canonical paths. + * + * @deprecated Use `containsPath` if possible. + */ + function startsWithDirectory(fileName, directoryName, getCanonicalFileName) { + var canonicalFileName = getCanonicalFileName(fileName); + var canonicalDirectoryName = getCanonicalFileName(directoryName); + return ts.startsWith(canonicalFileName, canonicalDirectoryName + "/") || ts.startsWith(canonicalFileName, canonicalDirectoryName + "\\"); + } + ts.startsWithDirectory = startsWithDirectory; + //// Relative Paths + function getPathComponentsRelativeTo(from, to, stringEqualityComparer, getCanonicalFileName) { + var fromComponents = reducePathComponents(getPathComponents(from)); + var toComponents = reducePathComponents(getPathComponents(to)); + var start; + for (start = 0; start < fromComponents.length && start < toComponents.length; start++) { + var fromComponent = getCanonicalFileName(fromComponents[start]); + var toComponent = getCanonicalFileName(toComponents[start]); + var comparer = start === 0 ? ts.equateStringsCaseInsensitive : stringEqualityComparer; + if (!comparer(fromComponent, toComponent)) + break; + } + if (start === 0) { + return toComponents; + } + var components = toComponents.slice(start); + var relative = []; + for (; start < fromComponents.length; start++) { + relative.push(".."); + } + return __spreadArrays([""], relative, components); + } + ts.getPathComponentsRelativeTo = getPathComponentsRelativeTo; + function getRelativePathFromDirectory(fromDirectory, to, getCanonicalFileNameOrIgnoreCase) { + ts.Debug.assert((getRootLength(fromDirectory) > 0) === (getRootLength(to) > 0), "Paths must either both be absolute or both be relative"); + var getCanonicalFileName = typeof getCanonicalFileNameOrIgnoreCase === "function" ? getCanonicalFileNameOrIgnoreCase : ts.identity; + var ignoreCase = typeof getCanonicalFileNameOrIgnoreCase === "boolean" ? getCanonicalFileNameOrIgnoreCase : false; + var pathComponents = getPathComponentsRelativeTo(fromDirectory, to, ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive, getCanonicalFileName); + return getPathFromPathComponents(pathComponents); + } + ts.getRelativePathFromDirectory = getRelativePathFromDirectory; + function convertToRelativePath(absoluteOrRelativePath, basePath, getCanonicalFileName) { + return !isRootedDiskPath(absoluteOrRelativePath) + ? absoluteOrRelativePath + : getRelativePathToDirectoryOrUrl(basePath, absoluteOrRelativePath, basePath, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); + } + ts.convertToRelativePath = convertToRelativePath; + function getRelativePathFromFile(from, to, getCanonicalFileName) { + return ensurePathIsNonModuleName(getRelativePathFromDirectory(getDirectoryPath(from), to, getCanonicalFileName)); + } + ts.getRelativePathFromFile = getRelativePathFromFile; + function getRelativePathToDirectoryOrUrl(directoryPathOrUrl, relativeOrAbsolutePath, currentDirectory, getCanonicalFileName, isAbsolutePathAnUrl) { + var pathComponents = getPathComponentsRelativeTo(resolvePath(currentDirectory, directoryPathOrUrl), resolvePath(currentDirectory, relativeOrAbsolutePath), ts.equateStringsCaseSensitive, getCanonicalFileName); + var firstComponent = pathComponents[0]; + if (isAbsolutePathAnUrl && isRootedDiskPath(firstComponent)) { + var prefix = firstComponent.charAt(0) === ts.directorySeparator ? "file://" : "file:///"; + pathComponents[0] = prefix + firstComponent; + } + return getPathFromPathComponents(pathComponents); + } + ts.getRelativePathToDirectoryOrUrl = getRelativePathToDirectoryOrUrl; + function forEachAncestorDirectory(directory, callback) { + while (true) { + var result = callback(directory); + if (result !== undefined) { + return result; + } + var parentPath = getDirectoryPath(directory); + if (parentPath === directory) { + return undefined; + } + directory = parentPath; + } + } + ts.forEachAncestorDirectory = forEachAncestorDirectory; +})(ts || (ts = {})); // // generated from './diagnosticInformationMap.generated.ts' by 'src/compiler' /* @internal */ @@ -5666,7 +6404,7 @@ var ts; An_index_signature_parameter_cannot_have_an_initializer: diag(1020, ts.DiagnosticCategory.Error, "An_index_signature_parameter_cannot_have_an_initializer_1020", "An index signature parameter cannot have an initializer."), An_index_signature_must_have_a_type_annotation: diag(1021, ts.DiagnosticCategory.Error, "An_index_signature_must_have_a_type_annotation_1021", "An index signature must have a type annotation."), An_index_signature_parameter_must_have_a_type_annotation: diag(1022, ts.DiagnosticCategory.Error, "An_index_signature_parameter_must_have_a_type_annotation_1022", "An index signature parameter must have a type annotation."), - An_index_signature_parameter_type_must_be_string_or_number: diag(1023, ts.DiagnosticCategory.Error, "An_index_signature_parameter_type_must_be_string_or_number_1023", "An index signature parameter type must be 'string' or 'number'."), + An_index_signature_parameter_type_must_be_either_string_or_number: diag(1023, ts.DiagnosticCategory.Error, "An_index_signature_parameter_type_must_be_either_string_or_number_1023", "An index signature parameter type must be either 'string' or 'number'."), readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature: diag(1024, ts.DiagnosticCategory.Error, "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024", "'readonly' modifier can only appear on a property declaration or index signature."), Accessibility_modifier_already_seen: diag(1028, ts.DiagnosticCategory.Error, "Accessibility_modifier_already_seen_1028", "Accessibility modifier already seen."), _0_modifier_must_precede_1_modifier: diag(1029, ts.DiagnosticCategory.Error, "_0_modifier_must_precede_1_modifier_1029", "'{0}' modifier must precede '{1}' modifier."), @@ -5874,7 +6612,7 @@ var ts; Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1320, ts.DiagnosticCategory.Error, "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."), Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1321, ts.DiagnosticCategory.Error, "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."), Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1322, ts.DiagnosticCategory.Error, "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."), - Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext: diag(1323, ts.DiagnosticCategory.Error, "Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323", "Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'."), + Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_commonjs_amd_system_or_umd: diag(1323, ts.DiagnosticCategory.Error, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_commonjs_amd_system_or_umd_1323", "Dynamic imports are only supported when the '--module' flag is set to 'esnext', 'commonjs', 'amd', 'system', or 'umd'."), Dynamic_import_must_have_one_specifier_as_an_argument: diag(1324, ts.DiagnosticCategory.Error, "Dynamic_import_must_have_one_specifier_as_an_argument_1324", "Dynamic import must have one specifier as an argument."), Specifier_of_dynamic_import_cannot_be_spread_element: diag(1325, ts.DiagnosticCategory.Error, "Specifier_of_dynamic_import_cannot_be_spread_element_1325", "Specifier of dynamic import cannot be spread element."), Dynamic_import_cannot_have_type_arguments: diag(1326, ts.DiagnosticCategory.Error, "Dynamic_import_cannot_have_type_arguments_1326", "Dynamic import cannot have type arguments"), @@ -5910,6 +6648,7 @@ var ts; An_enum_member_name_must_be_followed_by_a_or: diag(1357, ts.DiagnosticCategory.Error, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."), Tagged_template_expressions_are_not_permitted_in_an_optional_chain: diag(1358, ts.DiagnosticCategory.Error, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."), Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here: diag(1359, ts.DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359", "Identifier expected. '{0}' is a reserved word that cannot be used here."), + Did_you_mean_to_parenthesize_this_function_type: diag(1360, ts.DiagnosticCategory.Error, "Did_you_mean_to_parenthesize_this_function_type_1360", "Did you mean to parenthesize this function type?"), The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."), The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."), Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), @@ -6037,7 +6776,6 @@ var ts; Class_0_incorrectly_implements_interface_1: diag(2420, ts.DiagnosticCategory.Error, "Class_0_incorrectly_implements_interface_1_2420", "Class '{0}' incorrectly implements interface '{1}'."), A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2422, ts.DiagnosticCategory.Error, "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422", "A class can only implement an object type or intersection of object types with statically known members."), Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: diag(2423, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423", "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."), - Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: diag(2424, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424", "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property."), Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: diag(2425, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425", "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."), Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: diag(2426, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426", "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."), Interface_name_cannot_be_0: diag(2427, ts.DiagnosticCategory.Error, "Interface_name_cannot_be_0_2427", "Interface name cannot be '{0}'."), @@ -6207,8 +6945,8 @@ var ts; JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: diag(2607, ts.DiagnosticCategory.Error, "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", "JSX element class does not support attributes because it does not have a '{0}' property."), The_global_type_JSX_0_may_not_have_more_than_one_property: diag(2608, ts.DiagnosticCategory.Error, "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", "The global type 'JSX.{0}' may not have more than one property."), JSX_spread_child_must_be_an_array_type: diag(2609, ts.DiagnosticCategory.Error, "JSX_spread_child_must_be_an_array_type_2609", "JSX spread child must be an array type."), - Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_property: diag(2610, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_proper_2610", "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member property."), - Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_accessor: diag(2611, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_access_2611", "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member accessor."), + _0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property: diag(2610, ts.DiagnosticCategory.Error, "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610", "'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property."), + _0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor: diag(2611, ts.DiagnosticCategory.Error, "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611", "'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor."), Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration: diag(2612, ts.DiagnosticCategory.Error, "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612", "Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration."), Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead: diag(2613, ts.DiagnosticCategory.Error, "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613", "Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"), Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead: diag(2614, ts.DiagnosticCategory.Error, "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614", "Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"), @@ -6431,6 +7169,8 @@ var ts; Parameter_0_of_accessor_has_or_is_using_private_name_1: diag(4106, ts.DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106", "Parameter '{0}' of accessor has or is using private name '{1}'."), Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2: diag(4107, ts.DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107", "Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."), Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4108, ts.DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108", "Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."), + Type_arguments_for_0_circularly_reference_themselves: diag(4109, ts.DiagnosticCategory.Error, "Type_arguments_for_0_circularly_reference_themselves_4109", "Type arguments for '{0}' circularly reference themselves."), + Tuple_type_arguments_circularly_reference_themselves: diag(4110, ts.DiagnosticCategory.Error, "Tuple_type_arguments_circularly_reference_themselves_4110", "Tuple type arguments circularly reference themselves."), The_current_host_does_not_support_the_0_option: diag(5001, ts.DiagnosticCategory.Error, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."), Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, ts.DiagnosticCategory.Error, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."), File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, ts.DiagnosticCategory.Error, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."), @@ -6438,6 +7178,7 @@ var ts; Failed_to_parse_file_0_Colon_1: diag(5014, ts.DiagnosticCategory.Error, "Failed_to_parse_file_0_Colon_1_5014", "Failed to parse file '{0}': {1}."), Unknown_compiler_option_0: diag(5023, ts.DiagnosticCategory.Error, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."), Compiler_option_0_requires_a_value_of_type_1: diag(5024, ts.DiagnosticCategory.Error, "Compiler_option_0_requires_a_value_of_type_1_5024", "Compiler option '{0}' requires a value of type {1}."), + Unknown_compiler_option_0_Did_you_mean_1: diag(5025, ts.DiagnosticCategory.Error, "Unknown_compiler_option_0_Did_you_mean_1_5025", "Unknown compiler option '{0}'. Did you mean '{1}'?"), Could_not_write_file_0_Colon_1: diag(5033, ts.DiagnosticCategory.Error, "Could_not_write_file_0_Colon_1_5033", "Could not write file '{0}': {1}."), Option_project_cannot_be_mixed_with_source_files_on_a_command_line: diag(5042, ts.DiagnosticCategory.Error, "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042", "Option 'project' cannot be mixed with source files on a command line."), Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher: diag(5047, ts.DiagnosticCategory.Error, "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047", "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."), @@ -6468,6 +7209,7 @@ var ts; Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified: diag(5074, ts.DiagnosticCategory.Error, "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074", "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option `--tsBuildInfoFile` is specified."), _0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2: diag(5075, ts.DiagnosticCategory.Error, "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075", "'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."), _0_and_1_operations_cannot_be_mixed_without_parentheses: diag(5076, ts.DiagnosticCategory.Error, "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076", "'{0}' and '{1}' operations cannot be mixed without parentheses."), + Unknown_build_option_0_Did_you_mean_1: diag(5077, ts.DiagnosticCategory.Error, "Unknown_build_option_0_Did_you_mean_1_5077", "Unknown build option '{0}'. Did you mean '{1}'?"), Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6000, ts.DiagnosticCategory.Message, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."), Concatenate_and_emit_output_to_single_file: diag(6001, ts.DiagnosticCategory.Message, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."), Generates_corresponding_d_ts_file: diag(6002, ts.DiagnosticCategory.Message, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), @@ -6514,7 +7256,7 @@ var ts; Corrupted_locale_file_0: diag(6051, ts.DiagnosticCategory.Error, "Corrupted_locale_file_0_6051", "Corrupted locale file {0}."), Raise_error_on_expressions_and_declarations_with_an_implied_any_type: diag(6052, ts.DiagnosticCategory.Message, "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052", "Raise error on expressions and declarations with an implied 'any' type."), File_0_not_found: diag(6053, ts.DiagnosticCategory.Error, "File_0_not_found_6053", "File '{0}' not found."), - File_0_has_unsupported_extension_The_only_supported_extensions_are_1: diag(6054, ts.DiagnosticCategory.Error, "File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054", "File '{0}' has unsupported extension. The only supported extensions are {1}."), + File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1: diag(6054, ts.DiagnosticCategory.Error, "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054", "File '{0}' has an unsupported extension. The only supported extensions are {1}."), Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: diag(6055, ts.DiagnosticCategory.Message, "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055", "Suppress noImplicitAny errors for indexing objects lacking index signatures."), Do_not_emit_declarations_for_code_that_has_an_internal_annotation: diag(6056, ts.DiagnosticCategory.Message, "Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056", "Do not emit declarations for code that has an '@internal' annotation."), Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: diag(6058, ts.DiagnosticCategory.Message, "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058", "Specify the root directory of input files. Use to control the output directory structure with --outDir."), @@ -6722,6 +7464,8 @@ var ts; The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", "The expected type comes from property '{0}' which is declared here on type '{1}'"), The_expected_type_comes_from_this_index_signature: diag(6501, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."), The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."), + Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing: diag(6503, ts.DiagnosticCategory.Message, "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503", "Print names of files that are part of the compilation and then stop processing."), + File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option: diag(6504, ts.DiagnosticCategory.Error, "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504", "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"), Variable_0_implicitly_has_an_1_type: diag(7005, ts.DiagnosticCategory.Error, "Variable_0_implicitly_has_an_1_type_7005", "Variable '{0}' implicitly has an '{1}' type."), Parameter_0_implicitly_has_an_1_type: diag(7006, ts.DiagnosticCategory.Error, "Parameter_0_implicitly_has_an_1_type_7006", "Parameter '{0}' implicitly has an '{1}' type."), Member_0_implicitly_has_an_1_type: diag(7008, ts.DiagnosticCategory.Error, "Member_0_implicitly_has_an_1_type_7008", "Member '{0}' implicitly has an '{1}' type."), @@ -6825,6 +7569,7 @@ var ts; Expected_corresponding_closing_tag_for_JSX_fragment: diag(17015, ts.DiagnosticCategory.Error, "Expected_corresponding_closing_tag_for_JSX_fragment_17015", "Expected corresponding closing tag for JSX fragment."), JSX_fragment_is_not_supported_when_using_jsxFactory: diag(17016, ts.DiagnosticCategory.Error, "JSX_fragment_is_not_supported_when_using_jsxFactory_17016", "JSX fragment is not supported when using --jsxFactory"), JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma: diag(17017, ts.DiagnosticCategory.Error, "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017", "JSX fragment is not supported when using an inline JSX factory pragma"), + Unknown_type_acquisition_option_0_Did_you_mean_1: diag(17018, ts.DiagnosticCategory.Error, "Unknown_type_acquisition_option_0_Did_you_mean_1_17018", "Unknown type acquisition option '{0}'. Did you mean '{1}'?"), Circularity_detected_while_resolving_configuration_Colon_0: diag(18000, ts.DiagnosticCategory.Error, "Circularity_detected_while_resolving_configuration_Colon_0_18000", "Circularity detected while resolving configuration: {0}"), A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not: diag(18001, ts.DiagnosticCategory.Error, "A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not_18001", "A path in an 'extends' option must be relative or rooted, but '{0}' is not."), The_files_list_in_config_file_0_is_empty: diag(18002, ts.DiagnosticCategory.Error, "The_files_list_in_config_file_0_is_empty_18002", "The 'files' list in config file '{0}' is empty."), @@ -9057,7 +9802,7 @@ var ts; ts.getDeclarationOfKind = getDeclarationOfKind; /** Create a new escaped identifier map. */ function createUnderscoreEscapedMap() { - return new ts.MapCtr(); + return new ts.Map(); } ts.createUnderscoreEscapedMap = createUnderscoreEscapedMap; function hasEntries(map) { @@ -9113,13 +9858,6 @@ var ts; reportPrivateInBaseOfClassExpression: ts.noop, }; } - function toPath(fileName, basePath, getCanonicalFileName) { - var nonCanonicalizedPath = ts.isRootedDiskPath(fileName) - ? ts.normalizePath(fileName) - : ts.getNormalizedAbsolutePath(fileName, basePath); - return getCanonicalFileName(nonCanonicalizedPath); - } - ts.toPath = toPath; function changesAffectModuleResolution(oldOptions, newOptions) { return oldOptions.configFilePath !== newOptions.configFilePath || optionsHaveModuleResolutionChanges(oldOptions, newOptions); @@ -9926,6 +10664,11 @@ var ts; break; case 201 /* ArrowFunction */: return getErrorSpanForArrowFunction(sourceFile, node); + case 275 /* CaseClause */: + case 276 /* DefaultClause */: + var start = ts.skipTrivia(sourceFile.text, node.pos); + var end = node.statements.length > 0 ? node.statements[0].pos : node.end; + return ts.createTextSpanFromBounds(start, end); } if (errorNode === undefined) { // If we don't have a better node, then just set the error on the first token of @@ -10738,7 +11481,7 @@ var ts; (node.typeArguments[0].kind === 142 /* StringKeyword */ || node.typeArguments[0].kind === 139 /* NumberKeyword */); } ts.isJSDocIndexSignature = isJSDocIndexSignature; - function isRequireCall(callExpression, checkArgumentIsStringLiteralLike) { + function isRequireCall(callExpression, requireStringLiteralLikeArgument) { if (callExpression.kind !== 195 /* CallExpression */) { return false; } @@ -10750,7 +11493,7 @@ var ts; return false; } var arg = args[0]; - return !checkArgumentIsStringLiteralLike || ts.isStringLiteralLike(arg); + return !requireStringLiteralLikeArgument || ts.isStringLiteralLike(arg); } ts.isRequireCall = isRequireCall; function isSingleOrDoubleQuote(charCode) { @@ -10972,27 +11715,31 @@ var ts; isBindableStaticNameExpression(expr.arguments[0], /*excludeThisKeyword*/ true); } ts.isBindableObjectDefinePropertyCall = isBindableObjectDefinePropertyCall; - function isBindableStaticElementAccessExpression(node, excludeThisKeyword) { - return isLiteralLikeElementAccess(node) - && ((!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */) || - isEntityNameExpression(node.expression) || - isBindableStaticElementAccessExpression(node.expression, /*excludeThisKeyword*/ true)); - } - ts.isBindableStaticElementAccessExpression = isBindableStaticElementAccessExpression; + /** x.y OR x[0] */ function isLiteralLikeAccess(node) { return ts.isPropertyAccessExpression(node) || isLiteralLikeElementAccess(node); } ts.isLiteralLikeAccess = isLiteralLikeAccess; + /** x[0] OR x['a'] OR x[Symbol.y] */ function isLiteralLikeElementAccess(node) { return ts.isElementAccessExpression(node) && (isStringOrNumericLiteralLike(node.argumentExpression) || isWellKnownSymbolSyntactically(node.argumentExpression)); } ts.isLiteralLikeElementAccess = isLiteralLikeElementAccess; + /** Any series of property and element accesses. */ function isBindableStaticAccessExpression(node, excludeThisKeyword) { return ts.isPropertyAccessExpression(node) && (!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */ || isBindableStaticNameExpression(node.expression, /*excludeThisKeyword*/ true)) || isBindableStaticElementAccessExpression(node, excludeThisKeyword); } ts.isBindableStaticAccessExpression = isBindableStaticAccessExpression; + /** Any series of property and element accesses, ending in a literal element access */ + function isBindableStaticElementAccessExpression(node, excludeThisKeyword) { + return isLiteralLikeElementAccess(node) + && ((!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */) || + isEntityNameExpression(node.expression) || + isBindableStaticAccessExpression(node.expression, /*excludeThisKeyword*/ true)); + } + ts.isBindableStaticElementAccessExpression = isBindableStaticElementAccessExpression; function isBindableStaticNameExpression(node, excludeThisKeyword) { return isEntityNameExpression(node) || isBindableStaticAccessExpression(node, excludeThisKeyword); } @@ -11021,7 +11768,7 @@ var ts; if (expr.operatorToken.kind !== 62 /* EqualsToken */ || !isAccessExpression(expr.left)) { return 0 /* None */; } - if (isBindableStaticNameExpression(expr.left.expression) && getElementOrPropertyAccessName(expr.left) === "prototype" && ts.isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) { + if (isBindableStaticNameExpression(expr.left.expression, /*excludeThisKeyword*/ true) && getElementOrPropertyAccessName(expr.left) === "prototype" && ts.isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) { // F.prototype = { ... } return 6 /* Prototype */; } @@ -11077,13 +11824,17 @@ var ts; nextToLast = nextToLast.expression; } var id = nextToLast.expression; - if (id.escapedText === "exports" || - id.escapedText === "module" && getElementOrPropertyAccessName(nextToLast) === "exports") { - // exports.name = expr OR module.exports.name = expr + if ((id.escapedText === "exports" || + id.escapedText === "module" && getElementOrPropertyAccessName(nextToLast) === "exports") && + // ExportsProperty does not support binding with computed names + isBindableStaticAccessExpression(lhs)) { + // exports.name = expr OR module.exports.name = expr OR exports["name"] = expr ... return 1 /* ExportsProperty */; } - // F.G...x = expr - return 5 /* Property */; + if (isBindableStaticNameExpression(lhs, /*excludeThisKeyword*/ true) || (ts.isElementAccessExpression(lhs) && isDynamicName(lhs) && lhs.expression.kind !== 103 /* ThisKeyword */)) { + // F.G...x = expr + return 5 /* Property */; + } } return 0 /* None */; } @@ -12405,7 +13156,7 @@ var ts; */ function getExternalModuleNameFromPath(host, fileName, referencePath) { var getCanonicalFileName = function (f) { return host.getCanonicalFileName(f); }; - var dir = toPath(referencePath ? ts.getDirectoryPath(referencePath) : host.getCommonSourceDirectory(), host.getCurrentDirectory(), getCanonicalFileName); + var dir = ts.toPath(referencePath ? ts.getDirectoryPath(referencePath) : host.getCommonSourceDirectory(), host.getCurrentDirectory(), getCanonicalFileName); var filePath = ts.getNormalizedAbsolutePath(fileName, host.getCurrentDirectory()); var relativePath = ts.getRelativePathToDirectoryOrUrl(dir, filePath, dir, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); var extensionless = ts.removeFileExtension(relativePath); @@ -12488,6 +13239,25 @@ var ts; }, sourceFiles); } ts.writeFile = writeFile; + function ensureDirectoriesExist(directoryPath, createDirectory, directoryExists) { + if (directoryPath.length > ts.getRootLength(directoryPath) && !directoryExists(directoryPath)) { + var parentDirectory = ts.getDirectoryPath(directoryPath); + ensureDirectoriesExist(parentDirectory, createDirectory, directoryExists); + createDirectory(directoryPath); + } + } + function writeFileEnsuringDirectories(path, data, writeByteOrderMark, writeFile, createDirectory, directoryExists) { + // PERF: Checking for directory existence is expensive. Instead, assume the directory exists + // and fall back to creating it if the file write fails. + try { + writeFile(path, data, writeByteOrderMark); + } + catch (_a) { + ensureDirectoriesExist(ts.getDirectoryPath(ts.normalizePath(path)), createDirectory, directoryExists); + writeFile(path, data, writeByteOrderMark); + } + } + ts.writeFileEnsuringDirectories = writeFileEnsuringDirectories; function getLineOfLocalPosition(currentSourceFile, pos) { return ts.getLineAndCharacterOfPosition(currentSourceFile, pos).line; } @@ -12927,6 +13697,23 @@ var ts; return node.kind === 75 /* Identifier */ || isPropertyAccessEntityNameExpression(node); } ts.isEntityNameExpression = isEntityNameExpression; + function getFirstIdentifier(node) { + switch (node.kind) { + case 75 /* Identifier */: + return node; + case 152 /* QualifiedName */: + do { + node = node.left; + } while (node.kind !== 75 /* Identifier */); + return node; + case 193 /* PropertyAccessExpression */: + do { + node = node.expression; + } while (node.kind !== 75 /* Identifier */); + return node; + } + } + ts.getFirstIdentifier = getFirstIdentifier; function isDottedName(node) { return node.kind === 75 /* Identifier */ || node.kind === 103 /* ThisKeyword */ || node.kind === 193 /* PropertyAccessExpression */ && isDottedName(node.expression) || @@ -13445,20 +14232,6 @@ var ts; }); } ts.mutateMap = mutateMap; - function forEachAncestorDirectory(directory, callback) { - while (true) { - var result = callback(directory); - if (result !== undefined) { - return result; - } - var parentPath = ts.getDirectoryPath(directory); - if (parentPath === directory) { - return undefined; - } - directory = parentPath; - } - } - ts.forEachAncestorDirectory = forEachAncestorDirectory; // Return true if the given type is the constructor type for an abstract class function isAbstractConstructorType(type) { return !!(getObjectFlags(type) & 16 /* Anonymous */) && !!type.symbol && isAbstractConstructorSymbol(type.symbol); @@ -13485,7 +14258,7 @@ var ts; } ts.typeHasCallOrConstructSignatures = typeHasCallOrConstructSignatures; function forSomeAncestorDirectory(directory, callback) { - return !!forEachAncestorDirectory(directory, function (d) { return callback(d) ? true : undefined; }); + return !!ts.forEachAncestorDirectory(directory, function (d) { return callback(d) ? true : undefined; }); } ts.forSomeAncestorDirectory = forSomeAncestorDirectory; function isUMDExportSymbol(symbol) { @@ -14550,11 +15323,47 @@ var ts; } ts.isCallChain = isCallChain; function isOptionalChain(node) { - return isPropertyAccessChain(node) - || isElementAccessChain(node) - || isCallChain(node); + var kind = node.kind; + return !!(node.flags & 32 /* OptionalChain */) && + (kind === 193 /* PropertyAccessExpression */ + || kind === 194 /* ElementAccessExpression */ + || kind === 195 /* CallExpression */); } ts.isOptionalChain = isOptionalChain; + /* @internal */ + function isOptionalChainRoot(node) { + return isOptionalChain(node) && !!node.questionDotToken; + } + ts.isOptionalChainRoot = isOptionalChainRoot; + /** + * Determines whether a node is the expression preceding an optional chain (i.e. `a` in `a?.b`). + */ + /* @internal */ + function isExpressionOfOptionalChainRoot(node) { + return isOptionalChainRoot(node.parent) && node.parent.expression === node; + } + ts.isExpressionOfOptionalChainRoot = isExpressionOfOptionalChainRoot; + /** + * Determines whether a node is the outermost `OptionalChain` in an ECMAScript `OptionalExpression`: + * + * 1. For `a?.b.c`, the outermost chain is `a?.b.c` (`c` is the end of the chain starting at `a?.`) + * 2. For `(a?.b.c).d`, the outermost chain is `a?.b.c` (`c` is the end of the chain starting at `a?.` since parens end the chain) + * 3. For `a?.b.c?.d`, both `a?.b.c` and `a?.b.c?.d` are outermost (`c` is the end of the chain starting at `a?.`, and `d` is + * the end of the chain starting at `c?.`) + * 4. For `a?.(b?.c).d`, both `b?.c` and `a?.(b?.c)d` are outermost (`c` is the end of the chain starting at `b`, and `d` is + * the end of the chain starting at `a?.`) + */ + /* @internal */ + function isOutermostOptionalChain(node) { + return !isOptionalChain(node.parent) // cases 1 and 2 + || isOptionalChainRoot(node.parent) // case 3 + || node !== node.parent.expression; // case 4 + } + ts.isOutermostOptionalChain = isOutermostOptionalChain; + function isNullishCoalesce(node) { + return node.kind === 208 /* BinaryExpression */ && node.operatorToken.kind === 60 /* QuestionQuestionToken */; + } + ts.isNullishCoalesce = isNullishCoalesce; function isNewExpression(node) { return node.kind === 196 /* NewExpression */; } @@ -15825,11 +16634,6 @@ var ts; return node.kind === 162 /* GetAccessor */; } ts.isGetAccessor = isGetAccessor; - /* @internal */ - function isOptionalChainRoot(node) { - return ts.isOptionalChain(node) && !!node.questionDotToken; - } - ts.isOptionalChainRoot = isOptionalChainRoot; /** True if has jsdoc nodes attached to it. */ /* @internal */ // TODO: GH#19856 Would like to return `node is Node & { jsDoc: JSDoc[] }` but it causes long compile times @@ -15916,7 +16720,12 @@ var ts; this.checker = checker; } } - function Signature() { } + function Signature(checker, flags) { + this.flags = flags; + if (ts.Debug.isDebugging) { + this.checker = checker; + } + } function Node(kind, pos, end) { this.pos = pos; this.end = end; @@ -16191,273 +17000,6 @@ var ts; return true; } ts.hasZeroOrOneAsteriskCharacter = hasZeroOrOneAsteriskCharacter; - /** - * Internally, we represent paths as strings with '/' as the directory separator. - * When we make system calls (eg: LanguageServiceHost.getDirectory()), - * we expect the host to correctly handle paths in our specified format. - */ - ts.directorySeparator = "/"; - var altDirectorySeparator = "\\"; - var urlSchemeSeparator = "://"; - var backslashRegExp = /\\/g; - /** - * Normalize path separators. - */ - function normalizeSlashes(path) { - return path.replace(backslashRegExp, ts.directorySeparator); - } - ts.normalizeSlashes = normalizeSlashes; - function isVolumeCharacter(charCode) { - return (charCode >= 97 /* a */ && charCode <= 122 /* z */) || - (charCode >= 65 /* A */ && charCode <= 90 /* Z */); - } - function getFileUrlVolumeSeparatorEnd(url, start) { - var ch0 = url.charCodeAt(start); - if (ch0 === 58 /* colon */) - return start + 1; - if (ch0 === 37 /* percent */ && url.charCodeAt(start + 1) === 51 /* _3 */) { - var ch2 = url.charCodeAt(start + 2); - if (ch2 === 97 /* a */ || ch2 === 65 /* A */) - return start + 3; - } - return -1; - } - /** - * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). - * If the root is part of a URL, the twos-complement of the root length is returned. - */ - function getEncodedRootLength(path) { - if (!path) - return 0; - var ch0 = path.charCodeAt(0); - // POSIX or UNC - if (ch0 === 47 /* slash */ || ch0 === 92 /* backslash */) { - if (path.charCodeAt(1) !== ch0) - return 1; // POSIX: "/" (or non-normalized "\") - var p1 = path.indexOf(ch0 === 47 /* slash */ ? ts.directorySeparator : altDirectorySeparator, 2); - if (p1 < 0) - return path.length; // UNC: "//server" or "\\server" - return p1 + 1; // UNC: "//server/" or "\\server\" - } - // DOS - if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58 /* colon */) { - var ch2 = path.charCodeAt(2); - if (ch2 === 47 /* slash */ || ch2 === 92 /* backslash */) - return 3; // DOS: "c:/" or "c:\" - if (path.length === 2) - return 2; // DOS: "c:" (but not "c:d") - } - // URL - var schemeEnd = path.indexOf(urlSchemeSeparator); - if (schemeEnd !== -1) { - var authorityStart = schemeEnd + urlSchemeSeparator.length; - var authorityEnd = path.indexOf(ts.directorySeparator, authorityStart); - if (authorityEnd !== -1) { // URL: "file:///", "file://server/", "file://server/path" - // For local "file" URLs, include the leading DOS volume (if present). - // Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a - // special case interpreted as "the machine from which the URL is being interpreted". - var scheme = path.slice(0, schemeEnd); - var authority = path.slice(authorityStart, authorityEnd); - if (scheme === "file" && (authority === "" || authority === "localhost") && - isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) { - var volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2); - if (volumeSeparatorEnd !== -1) { - if (path.charCodeAt(volumeSeparatorEnd) === 47 /* slash */) { - // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/" - return ~(volumeSeparatorEnd + 1); - } - if (volumeSeparatorEnd === path.length) { - // URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a" - // but not "file:///c:d" or "file:///c%3ad" - return ~volumeSeparatorEnd; - } - } - } - return ~(authorityEnd + 1); // URL: "file://server/", "http://server/" - } - return ~path.length; // URL: "file://server", "http://server" - } - // relative - return 0; - } - /** - * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). - * - * For example: - * ```ts - * getRootLength("a") === 0 // "" - * getRootLength("/") === 1 // "/" - * getRootLength("c:") === 2 // "c:" - * getRootLength("c:d") === 0 // "" - * getRootLength("c:/") === 3 // "c:/" - * getRootLength("c:\\") === 3 // "c:\\" - * getRootLength("//server") === 7 // "//server" - * getRootLength("//server/share") === 8 // "//server/" - * getRootLength("\\\\server") === 7 // "\\\\server" - * getRootLength("\\\\server\\share") === 8 // "\\\\server\\" - * getRootLength("file:///path") === 8 // "file:///" - * getRootLength("file:///c:") === 10 // "file:///c:" - * getRootLength("file:///c:d") === 8 // "file:///" - * getRootLength("file:///c:/path") === 11 // "file:///c:/" - * getRootLength("file://server") === 13 // "file://server" - * getRootLength("file://server/path") === 14 // "file://server/" - * getRootLength("http://server") === 13 // "http://server" - * getRootLength("http://server/path") === 14 // "http://server/" - * ``` - */ - function getRootLength(path) { - var rootLength = getEncodedRootLength(path); - return rootLength < 0 ? ~rootLength : rootLength; - } - ts.getRootLength = getRootLength; - // TODO(rbuckton): replace references with `resolvePath` - function normalizePath(path) { - return ts.resolvePath(path); - } - ts.normalizePath = normalizePath; - function normalizePathAndParts(path) { - path = normalizeSlashes(path); - var _a = reducePathComponents(getPathComponents(path)), root = _a[0], parts = _a.slice(1); - if (parts.length) { - var joinedParts = root + parts.join(ts.directorySeparator); - return { path: ts.hasTrailingDirectorySeparator(path) ? ts.ensureTrailingDirectorySeparator(joinedParts) : joinedParts, parts: parts }; - } - else { - return { path: root, parts: parts }; - } - } - ts.normalizePathAndParts = normalizePathAndParts; - function getDirectoryPath(path) { - path = normalizeSlashes(path); - // If the path provided is itself the root, then return it. - var rootLength = getRootLength(path); - if (rootLength === path.length) - return path; - // return the leading portion of the path up to the last (non-terminal) directory separator - // but not including any trailing directory separator. - path = ts.removeTrailingDirectorySeparator(path); - return path.slice(0, Math.max(rootLength, path.lastIndexOf(ts.directorySeparator))); - } - ts.getDirectoryPath = getDirectoryPath; - function startsWithDirectory(fileName, directoryName, getCanonicalFileName) { - var canonicalFileName = getCanonicalFileName(fileName); - var canonicalDirectoryName = getCanonicalFileName(directoryName); - return ts.startsWith(canonicalFileName, canonicalDirectoryName + "/") || ts.startsWith(canonicalFileName, canonicalDirectoryName + "\\"); - } - ts.startsWithDirectory = startsWithDirectory; - function isUrl(path) { - return getEncodedRootLength(path) < 0; - } - ts.isUrl = isUrl; - function pathIsRelative(path) { - return /^\.\.?($|[\\/])/.test(path); - } - ts.pathIsRelative = pathIsRelative; - /** - * Determines whether a path is an absolute path (e.g. starts with `/`, or a dos path - * like `c:`, `c:\` or `c:/`). - */ - function isRootedDiskPath(path) { - return getEncodedRootLength(path) > 0; - } - ts.isRootedDiskPath = isRootedDiskPath; - /** - * Determines whether a path consists only of a path root. - */ - function isDiskPathRoot(path) { - var rootLength = getEncodedRootLength(path); - return rootLength > 0 && rootLength === path.length; - } - ts.isDiskPathRoot = isDiskPathRoot; - function convertToRelativePath(absoluteOrRelativePath, basePath, getCanonicalFileName) { - return !isRootedDiskPath(absoluteOrRelativePath) - ? absoluteOrRelativePath - : ts.getRelativePathToDirectoryOrUrl(basePath, absoluteOrRelativePath, basePath, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); - } - ts.convertToRelativePath = convertToRelativePath; - function pathComponents(path, rootLength) { - var root = path.substring(0, rootLength); - var rest = path.substring(rootLength).split(ts.directorySeparator); - if (rest.length && !ts.lastOrUndefined(rest)) - rest.pop(); - return __spreadArrays([root], rest); - } - /** - * Parse a path into an array containing a root component (at index 0) and zero or more path - * components (at indices > 0). The result is not normalized. - * If the path is relative, the root component is `""`. - * If the path is absolute, the root component includes the first path separator (`/`). - */ - function getPathComponents(path, currentDirectory) { - if (currentDirectory === void 0) { currentDirectory = ""; } - path = ts.combinePaths(currentDirectory, path); - var rootLength = getRootLength(path); - return pathComponents(path, rootLength); - } - ts.getPathComponents = getPathComponents; - /** - * Reduce an array of path components to a more simplified path by navigating any - * `"."` or `".."` entries in the path. - */ - function reducePathComponents(components) { - if (!ts.some(components)) - return []; - var reduced = [components[0]]; - for (var i = 1; i < components.length; i++) { - var component = components[i]; - if (!component) - continue; - if (component === ".") - continue; - if (component === "..") { - if (reduced.length > 1) { - if (reduced[reduced.length - 1] !== "..") { - reduced.pop(); - continue; - } - } - else if (reduced[0]) - continue; - } - reduced.push(component); - } - return reduced; - } - ts.reducePathComponents = reducePathComponents; - /** - * Parse a path into an array containing a root component (at index 0) and zero or more path - * components (at indices > 0). The result is normalized. - * If the path is relative, the root component is `""`. - * If the path is absolute, the root component includes the first path separator (`/`). - */ - function getNormalizedPathComponents(path, currentDirectory) { - return reducePathComponents(getPathComponents(path, currentDirectory)); - } - ts.getNormalizedPathComponents = getNormalizedPathComponents; - function getNormalizedAbsolutePath(fileName, currentDirectory) { - return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory)); - } - ts.getNormalizedAbsolutePath = getNormalizedAbsolutePath; - /** - * Formats a parsed path consisting of a root component (at index 0) and zero or more path - * segments (at indices > 0). - */ - function getPathFromPathComponents(pathComponents) { - if (pathComponents.length === 0) - return ""; - var root = pathComponents[0] && ts.ensureTrailingDirectorySeparator(pathComponents[0]); - return root + pathComponents.slice(1).join(ts.directorySeparator); - } - ts.getPathFromPathComponents = getPathFromPathComponents; - function getNormalizedAbsolutePathWithoutRoot(fileName, currentDirectory) { - return getPathWithoutRoot(getNormalizedPathComponents(fileName, currentDirectory)); - } - ts.getNormalizedAbsolutePathWithoutRoot = getNormalizedAbsolutePathWithoutRoot; - function getPathWithoutRoot(pathComponents) { - if (pathComponents.length === 0) - return ""; - return pathComponents.slice(1).join(ts.directorySeparator); - } function discoverProbableSymlinks(files, getCanonicalFileName, cwd) { var result = ts.createMap(); var symlinks = ts.flatten(ts.mapDefined(files, function (sf) { @@ -16474,15 +17016,15 @@ var ts; } ts.discoverProbableSymlinks = discoverProbableSymlinks; function guessDirectorySymlink(a, b, cwd, getCanonicalFileName) { - var aParts = getPathComponents(ts.toPath(a, cwd, getCanonicalFileName)); - var bParts = getPathComponents(ts.toPath(b, cwd, getCanonicalFileName)); + var aParts = ts.getPathComponents(ts.toPath(a, cwd, getCanonicalFileName)); + var bParts = ts.getPathComponents(ts.toPath(b, cwd, getCanonicalFileName)); while (!isNodeModulesOrScopedPackageDirectory(aParts[aParts.length - 2], getCanonicalFileName) && !isNodeModulesOrScopedPackageDirectory(bParts[bParts.length - 2], getCanonicalFileName) && getCanonicalFileName(aParts[aParts.length - 1]) === getCanonicalFileName(bParts[bParts.length - 1])) { aParts.pop(); bParts.pop(); } - return [getPathFromPathComponents(aParts), getPathFromPathComponents(bParts)]; + return [ts.getPathFromPathComponents(aParts), ts.getPathFromPathComponents(bParts)]; } // KLUDGE: Don't assume one 'node_modules' links to another. More likely a single directory inside the node_modules is the symlink. // ALso, don't assume that an `@foo` directory is linked. More likely the contents of that are linked. @@ -16492,229 +17034,8 @@ var ts; })(ts || (ts = {})); /* @internal */ (function (ts) { - function getPathComponentsRelativeTo(from, to, stringEqualityComparer, getCanonicalFileName) { - var fromComponents = ts.reducePathComponents(ts.getPathComponents(from)); - var toComponents = ts.reducePathComponents(ts.getPathComponents(to)); - var start; - for (start = 0; start < fromComponents.length && start < toComponents.length; start++) { - var fromComponent = getCanonicalFileName(fromComponents[start]); - var toComponent = getCanonicalFileName(toComponents[start]); - var comparer = start === 0 ? ts.equateStringsCaseInsensitive : stringEqualityComparer; - if (!comparer(fromComponent, toComponent)) - break; - } - if (start === 0) { - return toComponents; - } - var components = toComponents.slice(start); - var relative = []; - for (; start < fromComponents.length; start++) { - relative.push(".."); - } - return __spreadArrays([""], relative, components); - } - ts.getPathComponentsRelativeTo = getPathComponentsRelativeTo; - function getRelativePathFromFile(from, to, getCanonicalFileName) { - return ensurePathIsNonModuleName(getRelativePathFromDirectory(ts.getDirectoryPath(from), to, getCanonicalFileName)); - } - ts.getRelativePathFromFile = getRelativePathFromFile; - function getRelativePathFromDirectory(fromDirectory, to, getCanonicalFileNameOrIgnoreCase) { - ts.Debug.assert((ts.getRootLength(fromDirectory) > 0) === (ts.getRootLength(to) > 0), "Paths must either both be absolute or both be relative"); - var getCanonicalFileName = typeof getCanonicalFileNameOrIgnoreCase === "function" ? getCanonicalFileNameOrIgnoreCase : ts.identity; - var ignoreCase = typeof getCanonicalFileNameOrIgnoreCase === "boolean" ? getCanonicalFileNameOrIgnoreCase : false; - var pathComponents = getPathComponentsRelativeTo(fromDirectory, to, ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive, getCanonicalFileName); - return ts.getPathFromPathComponents(pathComponents); - } - ts.getRelativePathFromDirectory = getRelativePathFromDirectory; - function getRelativePathToDirectoryOrUrl(directoryPathOrUrl, relativeOrAbsolutePath, currentDirectory, getCanonicalFileName, isAbsolutePathAnUrl) { - var pathComponents = getPathComponentsRelativeTo(resolvePath(currentDirectory, directoryPathOrUrl), resolvePath(currentDirectory, relativeOrAbsolutePath), ts.equateStringsCaseSensitive, getCanonicalFileName); - var firstComponent = pathComponents[0]; - if (isAbsolutePathAnUrl && ts.isRootedDiskPath(firstComponent)) { - var prefix = firstComponent.charAt(0) === ts.directorySeparator ? "file://" : "file:///"; - pathComponents[0] = prefix + firstComponent; - } - return ts.getPathFromPathComponents(pathComponents); - } - ts.getRelativePathToDirectoryOrUrl = getRelativePathToDirectoryOrUrl; - /** - * Ensures a path is either absolute (prefixed with `/` or `c:`) or dot-relative (prefixed - * with `./` or `../`) so as not to be confused with an unprefixed module name. - */ - function ensurePathIsNonModuleName(path) { - return ts.getRootLength(path) === 0 && !ts.pathIsRelative(path) ? "./" + path : path; - } - ts.ensurePathIsNonModuleName = ensurePathIsNonModuleName; - function getBaseFileName(path, extensions, ignoreCase) { - path = ts.normalizeSlashes(path); - // if the path provided is itself the root, then it has not file name. - var rootLength = ts.getRootLength(path); - if (rootLength === path.length) - return ""; - // return the trailing portion of the path starting after the last (non-terminal) directory - // separator but not including any trailing directory separator. - path = removeTrailingDirectorySeparator(path); - var name = path.slice(Math.max(ts.getRootLength(path), path.lastIndexOf(ts.directorySeparator) + 1)); - var extension = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(name, extensions, ignoreCase) : undefined; - return extension ? name.slice(0, name.length - extension.length) : name; - } - ts.getBaseFileName = getBaseFileName; - /** - * Combines paths. If a path is absolute, it replaces any previous path. - */ - function combinePaths(path) { - var paths = []; - for (var _i = 1; _i < arguments.length; _i++) { - paths[_i - 1] = arguments[_i]; - } - if (path) - path = ts.normalizeSlashes(path); - for (var _a = 0, paths_1 = paths; _a < paths_1.length; _a++) { - var relativePath = paths_1[_a]; - if (!relativePath) - continue; - relativePath = ts.normalizeSlashes(relativePath); - if (!path || ts.getRootLength(relativePath) !== 0) { - path = relativePath; - } - else { - path = ensureTrailingDirectorySeparator(path) + relativePath; - } - } - return path; - } - ts.combinePaths = combinePaths; - /** - * Combines and resolves paths. If a path is absolute, it replaces any previous path. Any - * `.` and `..` path components are resolved. - */ - function resolvePath(path) { - var paths = []; - for (var _i = 1; _i < arguments.length; _i++) { - paths[_i - 1] = arguments[_i]; - } - var combined = ts.some(paths) ? combinePaths.apply(void 0, __spreadArrays([path], paths)) : ts.normalizeSlashes(path); - var normalized = ts.getPathFromPathComponents(ts.reducePathComponents(ts.getPathComponents(combined))); - return normalized && hasTrailingDirectorySeparator(combined) ? ensureTrailingDirectorySeparator(normalized) : normalized; - } - ts.resolvePath = resolvePath; - /** - * Determines whether a path has a trailing separator (`/` or `\\`). - */ - function hasTrailingDirectorySeparator(path) { - if (path.length === 0) - return false; - var ch = path.charCodeAt(path.length - 1); - return ch === 47 /* slash */ || ch === 92 /* backslash */; - } - ts.hasTrailingDirectorySeparator = hasTrailingDirectorySeparator; - function removeTrailingDirectorySeparator(path) { - if (hasTrailingDirectorySeparator(path)) { - return path.substr(0, path.length - 1); - } - return path; - } - ts.removeTrailingDirectorySeparator = removeTrailingDirectorySeparator; - function ensureTrailingDirectorySeparator(path) { - if (!hasTrailingDirectorySeparator(path)) { - return path + ts.directorySeparator; - } - return path; - } - ts.ensureTrailingDirectorySeparator = ensureTrailingDirectorySeparator; - // check path for these segments: '', '.'. '..' - var relativePathSegmentRegExp = /(^|\/)\.{0,2}($|\/)/; - function comparePathsWorker(a, b, componentComparer) { - if (a === b) - return 0 /* EqualTo */; - if (a === undefined) - return -1 /* LessThan */; - if (b === undefined) - return 1 /* GreaterThan */; - // NOTE: Performance optimization - shortcut if the root segments differ as there would be no - // need to perform path reduction. - var aRoot = a.substring(0, ts.getRootLength(a)); - var bRoot = b.substring(0, ts.getRootLength(b)); - var result = ts.compareStringsCaseInsensitive(aRoot, bRoot); - if (result !== 0 /* EqualTo */) { - return result; - } - // NOTE: Performance optimization - shortcut if there are no relative path segments in - // the non-root portion of the path - var aRest = a.substring(aRoot.length); - var bRest = b.substring(bRoot.length); - if (!relativePathSegmentRegExp.test(aRest) && !relativePathSegmentRegExp.test(bRest)) { - return componentComparer(aRest, bRest); - } - // The path contains a relative path segment. Normalize the paths and perform a slower component - // by component comparison. - var aComponents = ts.reducePathComponents(ts.getPathComponents(a)); - var bComponents = ts.reducePathComponents(ts.getPathComponents(b)); - var sharedLength = Math.min(aComponents.length, bComponents.length); - for (var i = 1; i < sharedLength; i++) { - var result_1 = componentComparer(aComponents[i], bComponents[i]); - if (result_1 !== 0 /* EqualTo */) { - return result_1; - } - } - return ts.compareValues(aComponents.length, bComponents.length); - } - /** - * Performs a case-sensitive comparison of two paths. - */ - function comparePathsCaseSensitive(a, b) { - return comparePathsWorker(a, b, ts.compareStringsCaseSensitive); - } - ts.comparePathsCaseSensitive = comparePathsCaseSensitive; - /** - * Performs a case-insensitive comparison of two paths. - */ - function comparePathsCaseInsensitive(a, b) { - return comparePathsWorker(a, b, ts.compareStringsCaseInsensitive); - } - ts.comparePathsCaseInsensitive = comparePathsCaseInsensitive; - function comparePaths(a, b, currentDirectory, ignoreCase) { - if (typeof currentDirectory === "string") { - a = combinePaths(currentDirectory, a); - b = combinePaths(currentDirectory, b); - } - else if (typeof currentDirectory === "boolean") { - ignoreCase = currentDirectory; - } - return comparePathsWorker(a, b, ts.getStringComparer(ignoreCase)); - } - ts.comparePaths = comparePaths; - function containsPath(parent, child, currentDirectory, ignoreCase) { - if (typeof currentDirectory === "string") { - parent = combinePaths(currentDirectory, parent); - child = combinePaths(currentDirectory, child); - } - else if (typeof currentDirectory === "boolean") { - ignoreCase = currentDirectory; - } - if (parent === undefined || child === undefined) - return false; - if (parent === child) - return true; - var parentComponents = ts.reducePathComponents(ts.getPathComponents(parent)); - var childComponents = ts.reducePathComponents(ts.getPathComponents(child)); - if (childComponents.length < parentComponents.length) { - return false; - } - var componentEqualityComparer = ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive; - for (var i = 0; i < parentComponents.length; i++) { - var equalityComparer = i === 0 ? ts.equateStringsCaseInsensitive : componentEqualityComparer; - if (!equalityComparer(parentComponents[i], childComponents[i])) { - return false; - } - } - return true; - } - ts.containsPath = containsPath; - function isDirectorySeparator(charCode) { - return charCode === 47 /* slash */ || charCode === 92 /* backslash */; - } function stripLeadingDirectorySeparator(s) { - return isDirectorySeparator(s.charCodeAt(0)) ? s.slice(1) : undefined; + return ts.isAnyDirectorySeparator(s.charCodeAt(0)) ? s.slice(1) : undefined; } function tryRemoveDirectoryPrefix(path, dirPath, getCanonicalFileName) { var withoutPrefix = ts.tryRemovePrefix(path, dirPath, getCanonicalFileName); @@ -16733,10 +17054,6 @@ var ts; return "\\" + match; } var wildcardCharCodes = [42 /* asterisk */, 63 /* question */]; - function hasExtension(fileName) { - return ts.stringContains(getBaseFileName(fileName), "."); - } - ts.hasExtension = hasExtension; ts.commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"]; var implicitExcludePathRegexPattern = "(?!(" + ts.commonPackageFolders.join("|") + ")(/|$))"; var filesMatcher = { @@ -16812,7 +17129,7 @@ var ts; } // getNormalizedPathComponents includes the separator for the root component. // We need to remove to create our regex correctly. - components[0] = removeTrailingDirectorySeparator(components[0]); + components[0] = ts.removeTrailingDirectorySeparator(components[0]); if (isImplicitGlob(lastComponent)) { components.push("**", "*"); } @@ -16874,7 +17191,7 @@ var ts; function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory) { path = ts.normalizePath(path); currentDirectory = ts.normalizePath(currentDirectory); - var absolutePath = combinePaths(currentDirectory, path); + var absolutePath = ts.combinePaths(currentDirectory, path); return { includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^" + pattern + "$"; }), includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"), @@ -16903,7 +17220,7 @@ var ts; var toCanonical = ts.createGetCanonicalFileName(useCaseSensitiveFileNames); for (var _i = 0, _a = patterns.basePaths; _i < _a.length; _i++) { var basePath = _a[_i]; - visitDirectory(basePath, combinePaths(currentDirectory, basePath), depth); + visitDirectory(basePath, ts.combinePaths(currentDirectory, basePath), depth); } return ts.flatten(results); function visitDirectory(path, absolutePath, depth) { @@ -16913,8 +17230,8 @@ var ts; visited.set(canonicalPath, true); var _a = getFileSystemEntries(path), files = _a.files, directories = _a.directories; var _loop_1 = function (current) { - var name = combinePaths(path, current); - var absoluteName = combinePaths(absolutePath, current); + var name = ts.combinePaths(path, current); + var absoluteName = ts.combinePaths(absolutePath, current); if (extensions && !ts.fileExtensionIsOneOf(name, extensions)) return "continue"; if (excludeRegex && excludeRegex.test(absoluteName)) @@ -16941,8 +17258,8 @@ var ts; } for (var _c = 0, _d = ts.sort(directories, ts.compareStringsCaseSensitive); _c < _d.length; _c++) { var current = _d[_c]; - var name = combinePaths(path, current); - var absoluteName = combinePaths(absolutePath, current); + var name = ts.combinePaths(path, current); + var absoluteName = ts.combinePaths(absolutePath, current); if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) && (!excludeRegex || !excludeRegex.test(absoluteName))) { visitDirectory(name, absoluteName, depth); @@ -16964,14 +17281,14 @@ var ts; var include = includes_1[_i]; // We also need to check the relative paths by converting them to absolute and normalizing // in case they escape the base path (e.g "..\somedirectory") - var absolute = ts.isRootedDiskPath(include) ? include : ts.normalizePath(combinePaths(path, include)); + var absolute = ts.isRootedDiskPath(include) ? include : ts.normalizePath(ts.combinePaths(path, include)); // Append the literal and canonical candidate base paths. includeBasePaths.push(getIncludeBasePath(absolute)); } // Sort the offsets array using either the literal or canonical path representations. includeBasePaths.sort(ts.getStringComparer(!useCaseSensitiveFileNames)); var _loop_2 = function (includeBasePath) { - if (ts.every(basePaths, function (basePath) { return !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames); })) { + if (ts.every(basePaths, function (basePath) { return !ts.containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames); })) { basePaths.push(includeBasePath); } }; @@ -16988,9 +17305,9 @@ var ts; var wildcardOffset = ts.indexOfAnyCharCode(absolute, wildcardCharCodes); if (wildcardOffset < 0) { // No "*" or "?" in the path - return !hasExtension(absolute) + return !ts.hasExtension(absolute) ? absolute - : removeTrailingDirectorySeparator(ts.getDirectoryPath(absolute)); + : ts.removeTrailingDirectorySeparator(ts.getDirectoryPath(absolute)); } return absolute.substring(0, absolute.lastIndexOf(ts.directorySeparator, wildcardOffset)); } @@ -17062,10 +17379,6 @@ var ts; return ts.some(ts.supportedJSExtensions, function (extension) { return ts.fileExtensionIs(fileName, extension); }); } ts.hasJSFileExtension = hasJSFileExtension; - function hasJSOrJsonFileExtension(fileName) { - return ts.supportedJSAndJsonExtensions.some(function (ext) { return ts.fileExtensionIs(fileName, ext); }); - } - ts.hasJSOrJsonFileExtension = hasJSOrJsonFileExtension; function hasTSFileExtension(fileName) { return ts.some(ts.supportedTSExtensions, function (extension) { return ts.fileExtensionIs(fileName, extension); }); } @@ -17155,14 +17468,9 @@ var ts; } ts.removeExtension = removeExtension; function changeExtension(path, newExtension) { - return changeAnyExtension(path, newExtension, extensionsToRemove, /*ignoreCase*/ false); + return ts.changeAnyExtension(path, newExtension, extensionsToRemove, /*ignoreCase*/ false); } ts.changeExtension = changeExtension; - function changeAnyExtension(path, ext, extensions, ignoreCase) { - var pathext = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(path, extensions, ignoreCase) : getAnyExtensionFromPath(path); - return pathext ? path.slice(0, path.length - pathext.length) + (ts.startsWith(ext, ".") ? ext : "." + ext) : path; - } - ts.changeAnyExtension = changeAnyExtension; function tryParsePattern(pattern) { // This should be verified outside of here and a proper error thrown. ts.Debug.assert(ts.hasZeroOrOneAsteriskCharacter(pattern)); @@ -17205,36 +17513,6 @@ var ts; return ts.find(extensionsToRemove, function (e) { return ts.fileExtensionIs(path, e); }); } ts.tryGetExtensionFromPath = tryGetExtensionFromPath; - function getAnyExtensionFromPathWorker(path, extensions, stringEqualityComparer) { - if (typeof extensions === "string") - extensions = [extensions]; - for (var _i = 0, extensions_2 = extensions; _i < extensions_2.length; _i++) { - var extension = extensions_2[_i]; - if (!ts.startsWith(extension, ".")) - extension = "." + extension; - if (path.length >= extension.length && path.charAt(path.length - extension.length) === ".") { - var pathExtension = path.slice(path.length - extension.length); - if (stringEqualityComparer(pathExtension, extension)) { - return pathExtension; - } - } - } - return ""; - } - function getAnyExtensionFromPath(path, extensions, ignoreCase) { - // Retrieves any string from the final "." onwards from a base file name. - // Unlike extensionFromPath, which throws an exception on unrecognized extensions. - if (extensions) { - return getAnyExtensionFromPathWorker(path, extensions, ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive); - } - var baseFileName = getBaseFileName(path); - var extensionIndex = baseFileName.lastIndexOf("."); - if (extensionIndex >= 0) { - return baseFileName.substring(extensionIndex); - } - return ""; - } - ts.getAnyExtensionFromPath = getAnyExtensionFromPath; function isCheckJsEnabledForFile(sourceFile, compilerOptions) { return sourceFile.checkJsDirective ? sourceFile.checkJsDirective.enabled : compilerOptions.checkJs; } @@ -18442,6 +18720,9 @@ var ts; function doInYieldAndAwaitContext(func) { return doInsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */, func); } + function doOutsideOfYieldAndAwaitContext(func) { + return doOutsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */, func); + } function inContext(flags) { return (contextFlags & flags) !== 0; } @@ -22713,18 +22994,7 @@ var ts; node.exclamationToken = parseTokenNode(); } node.type = parseTypeAnnotation(); - // For instance properties specifically, since they are evaluated inside the constructor, - // we do *not * want to parse yield expressions, so we specifically turn the yield context - // off. The grammar would look something like this: - // - // MemberVariableDeclaration[Yield]: - // AccessibilityModifier_opt PropertyName TypeAnnotation_opt Initializer_opt[In]; - // AccessibilityModifier_opt static_opt PropertyName TypeAnnotation_opt Initializer_opt[In, ?Yield]; - // - // The checker may still error in the static case to explicitly disallow the yield expression. - node.initializer = ts.hasModifier(node, 32 /* Static */) - ? allowInAnd(parseInitializer) - : doOutsideOfContext(8192 /* YieldContext */ | 4096 /* DisallowInContext */, parseInitializer); + node.initializer = doOutsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */ | 4096 /* DisallowInContext */, parseInitializer); parseSemicolon(); return finishNode(node); } @@ -23015,7 +23285,7 @@ var ts; parseExpected(87 /* EnumKeyword */); node.name = parseIdentifier(); if (parseExpected(18 /* OpenBraceToken */)) { - node.members = parseDelimitedList(6 /* EnumMembers */, parseEnumMember); + node.members = doOutsideOfYieldAndAwaitContext(function () { return parseDelimitedList(6 /* EnumMembers */, parseEnumMember); }); parseExpected(19 /* CloseBraceToken */); } else { @@ -25077,6 +25347,15 @@ var ts; isCommandLineOnly: true, description: ts.Diagnostics.Print_the_final_configuration_instead_of_building }, + { + name: "listFilesOnly", + type: "boolean", + category: ts.Diagnostics.Command_line_Options, + affectsSemanticDiagnostics: true, + affectsEmit: true, + isCommandLineOnly: true, + description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing + }, // Basic { name: "target", @@ -25908,8 +26187,7 @@ var ts; } } ts.parseListTypeOption = parseListTypeOption; - function parseCommandLineWorker(getOptionNameMap, _a, commandLine, readFile) { - var unknownOptionDiagnostic = _a[0], optionTypeMismatchDiagnostic = _a[1]; + function parseCommandLineWorker(getOptionNameMap, diagnostics, commandLine, readFile) { var options = {}; var fileNames = []; var errors = []; @@ -25936,7 +26214,7 @@ var ts; else { // Check to see if no argument was provided (e.g. "--locale" is the last command-line argument). if (!args[i] && opt.type !== "boolean") { - errors.push(ts.createCompilerDiagnostic(optionTypeMismatchDiagnostic, opt.name)); + errors.push(ts.createCompilerDiagnostic(diagnostics.optionTypeMismatchDiagnostic, opt.name)); } switch (opt.type) { case "number": @@ -25972,7 +26250,13 @@ var ts; } } else { - errors.push(ts.createCompilerDiagnostic(unknownOptionDiagnostic, s)); + var possibleOption = ts.getSpellingSuggestion(s, ts.optionDeclarations, function (opt) { return "--" + opt.name; }); + if (possibleOption) { + errors.push(ts.createCompilerDiagnostic(diagnostics.unknownDidYouMeanDiagnostic, s, possibleOption.name)); + } + else { + errors.push(ts.createCompilerDiagnostic(diagnostics.unknownOptionDiagnostic, s)); + } } } else { @@ -26015,11 +26299,13 @@ var ts; parseStrings(args); } } + var compilerOptionsDefaultDiagnostics = { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_compiler_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_compiler_option_0_Did_you_mean_1, + optionTypeMismatchDiagnostic: ts.Diagnostics.Compiler_option_0_expects_an_argument + }; function parseCommandLine(commandLine, readFile) { - return parseCommandLineWorker(getOptionNameMap, [ - ts.Diagnostics.Unknown_compiler_option_0, - ts.Diagnostics.Compiler_option_0_expects_an_argument - ], commandLine, readFile); + return parseCommandLineWorker(getOptionNameMap, compilerOptionsDefaultDiagnostics, commandLine, readFile); } ts.parseCommandLine = parseCommandLine; /** @internal */ @@ -26044,10 +26330,11 @@ var ts; function parseBuildCommand(args) { var buildOptionNameMap; var returnBuildOptionNameMap = function () { return (buildOptionNameMap || (buildOptionNameMap = createOptionNameMap(ts.buildOpts))); }; - var _a = parseCommandLineWorker(returnBuildOptionNameMap, [ - ts.Diagnostics.Unknown_build_option_0, - ts.Diagnostics.Build_option_0_requires_a_value_of_type_1 - ], args), options = _a.options, projects = _a.fileNames, errors = _a.errors; + var _a = parseCommandLineWorker(returnBuildOptionNameMap, { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_build_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_build_option_0_Did_you_mean_1, + optionTypeMismatchDiagnostic: ts.Diagnostics.Build_option_0_requires_a_value_of_type_1 + }, args), options = _a.options, projects = _a.fileNames, errors = _a.errors; var buildOptions = options; if (projects.length === 0) { // tsc -b invoked with no extra arguments; act as if invoked with "tsc -b ." @@ -26069,6 +26356,7 @@ var ts; return { buildOptions: buildOptions, projects: projects, errors: errors }; } ts.parseBuildCommand = parseBuildCommand; + /* @internal */ function getDiagnosticText(_message) { var _args = []; for (var _i = 1; _i < arguments.length; _i++) { @@ -26077,104 +26365,7 @@ var ts; var diagnostic = ts.createCompilerDiagnostic.apply(undefined, arguments); return diagnostic.messageText; } - /* @internal */ - function printVersion() { - ts.sys.write(getDiagnosticText(ts.Diagnostics.Version_0, ts.version) + ts.sys.newLine); - } - ts.printVersion = printVersion; - /* @internal */ - function printHelp(optionsList, syntaxPrefix) { - if (syntaxPrefix === void 0) { syntaxPrefix = ""; } - var output = []; - // We want to align our "syntax" and "examples" commands to a certain margin. - var syntaxLength = getDiagnosticText(ts.Diagnostics.Syntax_Colon_0, "").length; - var examplesLength = getDiagnosticText(ts.Diagnostics.Examples_Colon_0, "").length; - var marginLength = Math.max(syntaxLength, examplesLength); - // Build up the syntactic skeleton. - var syntax = makePadding(marginLength - syntaxLength); - syntax += "tsc " + syntaxPrefix + "[" + getDiagnosticText(ts.Diagnostics.options) + "] [" + getDiagnosticText(ts.Diagnostics.file) + "...]"; - output.push(getDiagnosticText(ts.Diagnostics.Syntax_Colon_0, syntax)); - output.push(ts.sys.newLine + ts.sys.newLine); - // Build up the list of examples. - var padding = makePadding(marginLength); - output.push(getDiagnosticText(ts.Diagnostics.Examples_Colon_0, makePadding(marginLength - examplesLength) + "tsc hello.ts") + ts.sys.newLine); - output.push(padding + "tsc --outFile file.js file.ts" + ts.sys.newLine); - output.push(padding + "tsc @args.txt" + ts.sys.newLine); - output.push(padding + "tsc --build tsconfig.json" + ts.sys.newLine); - output.push(ts.sys.newLine); - output.push(getDiagnosticText(ts.Diagnostics.Options_Colon) + ts.sys.newLine); - // We want our descriptions to align at the same column in our output, - // so we keep track of the longest option usage string. - marginLength = 0; - var usageColumn = []; // Things like "-d, --declaration" go in here. - var descriptionColumn = []; - var optionsDescriptionMap = ts.createMap(); // Map between option.description and list of option.type if it is a kind - for (var _i = 0, optionsList_1 = optionsList; _i < optionsList_1.length; _i++) { - var option = optionsList_1[_i]; - // If an option lacks a description, - // it is not officially supported. - if (!option.description) { - continue; - } - var usageText_1 = " "; - if (option.shortName) { - usageText_1 += "-" + option.shortName; - usageText_1 += getParamType(option); - usageText_1 += ", "; - } - usageText_1 += "--" + option.name; - usageText_1 += getParamType(option); - usageColumn.push(usageText_1); - var description = void 0; - if (option.name === "lib") { - description = getDiagnosticText(option.description); - var element = option.element; - var typeMap = element.type; - optionsDescriptionMap.set(description, ts.arrayFrom(typeMap.keys()).map(function (key) { return "'" + key + "'"; })); - } - else { - description = getDiagnosticText(option.description); - } - descriptionColumn.push(description); - // Set the new margin for the description column if necessary. - marginLength = Math.max(usageText_1.length, marginLength); - } - // Special case that can't fit in the loop. - var usageText = " @<" + getDiagnosticText(ts.Diagnostics.file) + ">"; - usageColumn.push(usageText); - descriptionColumn.push(getDiagnosticText(ts.Diagnostics.Insert_command_line_options_and_files_from_a_file)); - marginLength = Math.max(usageText.length, marginLength); - // Print out each row, aligning all the descriptions on the same column. - for (var i = 0; i < usageColumn.length; i++) { - var usage = usageColumn[i]; - var description = descriptionColumn[i]; - var kindsList = optionsDescriptionMap.get(description); - output.push(usage + makePadding(marginLength - usage.length + 2) + description + ts.sys.newLine); - if (kindsList) { - output.push(makePadding(marginLength + 4)); - for (var _a = 0, kindsList_1 = kindsList; _a < kindsList_1.length; _a++) { - var kind = kindsList_1[_a]; - output.push(kind + " "); - } - output.push(ts.sys.newLine); - } - } - for (var _b = 0, output_1 = output; _b < output_1.length; _b++) { - var line = output_1[_b]; - ts.sys.write(line); - } - return; - function getParamType(option) { - if (option.paramType !== undefined) { - return " " + getDiagnosticText(option.paramType); - } - return ""; - } - function makePadding(paddingLength) { - return Array(paddingLength + 1).join(" "); - } - } - ts.printHelp = printHelp; + ts.getDiagnosticText = getDiagnosticText; /** * Reads the config file, reports errors if any and exits if the config file cannot be found */ @@ -26258,19 +26449,28 @@ var ts; name: "compilerOptions", type: "object", elementOptions: commandLineOptionsToMap(ts.optionDeclarations), - extraKeyDiagnosticMessage: ts.Diagnostics.Unknown_compiler_option_0 + extraKeyDiagnostics: { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_compiler_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_compiler_option_0_Did_you_mean_1 + }, }, { name: "typingOptions", type: "object", elementOptions: commandLineOptionsToMap(ts.typeAcquisitionDeclarations), - extraKeyDiagnosticMessage: ts.Diagnostics.Unknown_type_acquisition_option_0 + extraKeyDiagnostics: { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1 + }, }, { name: "typeAcquisition", type: "object", elementOptions: commandLineOptionsToMap(ts.typeAcquisitionDeclarations), - extraKeyDiagnosticMessage: ts.Diagnostics.Unknown_type_acquisition_option_0 + extraKeyDiagnostics: { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1 + } }, { name: "extends", @@ -26335,7 +26535,7 @@ var ts; function isRootOptionMap(knownOptions) { return knownRootOptions && knownRootOptions.elementOptions === knownOptions; } - function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnosticMessage, parentOption) { + function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnostics, parentOption) { var result = returnValue ? {} : undefined; for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var element = _a[_i]; @@ -26352,8 +26552,19 @@ var ts; var textOfKey = ts.getTextOfPropertyName(element.name); var keyText = textOfKey && ts.unescapeLeadingUnderscores(textOfKey); var option = keyText && knownOptions ? knownOptions.get(keyText) : undefined; - if (keyText && extraKeyDiagnosticMessage && !option) { - errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnosticMessage, keyText)); + if (keyText && extraKeyDiagnostics && !option) { + if (knownOptions) { + var possibleOption = ts.getSpellingSuggestion(keyText, ts.arrayFrom(knownOptions.keys()), ts.identity); + if (possibleOption) { + errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnostics.unknownDidYouMeanDiagnostic, keyText, possibleOption)); + } + else { + errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnostics.unknownOptionDiagnostic, keyText)); + } + } + else { + errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnostics.unknownOptionDiagnostic, keyText)); + } } var value = convertPropertyValueToJson(element.initializer, option); if (typeof keyText !== "undefined") { @@ -26437,8 +26648,8 @@ var ts; // vs what we set in the json // If need arises, we can modify this interface and callbacks as needed if (option) { - var _a = option, elementOptions = _a.elementOptions, extraKeyDiagnosticMessage = _a.extraKeyDiagnosticMessage, optionName = _a.name; - return convertObjectLiteralExpressionToJson(objectLiteralExpression, elementOptions, extraKeyDiagnosticMessage, optionName); + var _a = option, elementOptions = _a.elementOptions, extraKeyDiagnostics = _a.extraKeyDiagnostics, optionName = _a.name; + return convertObjectLiteralExpressionToJson(objectLiteralExpression, elementOptions, extraKeyDiagnostics, optionName); } else { return convertObjectLiteralExpressionToJson(objectLiteralExpression, /* knownOptions*/ undefined, @@ -26493,7 +26704,7 @@ var ts; /** @internal */ function convertToTSConfig(configParseResult, configFileName, host) { var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames); - var files = ts.map(ts.filter(configParseResult.fileNames, (!configParseResult.configFileSpecs || !configParseResult.configFileSpecs.validatedIncludeSpecs) ? function (_) { return true; } : matchesSpecs(configFileName, configParseResult.configFileSpecs.validatedIncludeSpecs, configParseResult.configFileSpecs.validatedExcludeSpecs)), function (f) { return ts.getRelativePathFromFile(ts.getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), ts.getNormalizedAbsolutePath(f, host.getCurrentDirectory()), getCanonicalFileName); }); + var files = ts.map(ts.filter(configParseResult.fileNames, (!configParseResult.configFileSpecs || !configParseResult.configFileSpecs.validatedIncludeSpecs) ? function (_) { return true; } : matchesSpecs(configFileName, configParseResult.configFileSpecs.validatedIncludeSpecs, configParseResult.configFileSpecs.validatedExcludeSpecs, host)), function (f) { return ts.getRelativePathFromFile(ts.getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), ts.getNormalizedAbsolutePath(f, host.getCurrentDirectory()), getCanonicalFileName); }); var optionMap = serializeCompilerOptions(configParseResult.options, { configFilePath: ts.getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), useCaseSensitiveFileNames: host.useCaseSensitiveFileNames }); var config = __assign(__assign({ compilerOptions: __assign(__assign({}, ts.arrayFrom(optionMap.entries()).reduce(function (prev, cur) { var _a; @@ -26514,12 +26725,12 @@ var ts; return undefined; return specs; } - function matchesSpecs(path, includeSpecs, excludeSpecs) { + function matchesSpecs(path, includeSpecs, excludeSpecs, host) { if (!includeSpecs) return function (_) { return true; }; - var patterns = ts.getFileMatcherPatterns(path, excludeSpecs, includeSpecs, ts.sys.useCaseSensitiveFileNames, ts.sys.getCurrentDirectory()); - var excludeRe = patterns.excludePattern && ts.getRegexFromPattern(patterns.excludePattern, ts.sys.useCaseSensitiveFileNames); - var includeRe = patterns.includeFilePattern && ts.getRegexFromPattern(patterns.includeFilePattern, ts.sys.useCaseSensitiveFileNames); + var patterns = ts.getFileMatcherPatterns(path, excludeSpecs, includeSpecs, host.useCaseSensitiveFileNames, host.getCurrentDirectory()); + var excludeRe = patterns.excludePattern && ts.getRegexFromPattern(patterns.excludePattern, host.useCaseSensitiveFileNames); + var includeRe = patterns.includeFilePattern && ts.getRegexFromPattern(patterns.includeFilePattern, host.useCaseSensitiveFileNames); if (includeRe) { if (excludeRe) { return function (path) { return !(includeRe.test(path) && !excludeRe.test(path)); }; @@ -26696,6 +26907,35 @@ var ts; } } ts.generateTSConfig = generateTSConfig; + /* @internal */ + function convertToOptionsWithAbsolutePaths(options, toAbsolutePath) { + var result = {}; + var optionsNameMap = getOptionNameMap().optionNameMap; + for (var name in options) { + if (ts.hasProperty(options, name)) { + result[name] = convertToOptionValueWithAbsolutePaths(optionsNameMap.get(name.toLowerCase()), options[name], toAbsolutePath); + } + } + if (result.configFilePath) { + result.configFilePath = toAbsolutePath(result.configFilePath); + } + return result; + } + ts.convertToOptionsWithAbsolutePaths = convertToOptionsWithAbsolutePaths; + function convertToOptionValueWithAbsolutePaths(option, value, toAbsolutePath) { + if (option) { + if (option.type === "list") { + var values = value; + if (option.element.isFilePath && values.length) { + return values.map(toAbsolutePath); + } + } + else if (option.isFilePath) { + return toAbsolutePath(value); + } + } + return value; + } /** * Parse the contents of a config file (tsconfig.json). * @param json The contents of the config file to parse @@ -27084,7 +27324,7 @@ var ts; } function convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName) { var options = getDefaultCompilerOptions(configFileName); - convertOptionsFromJson(ts.optionDeclarations, jsonOptions, basePath, options, ts.Diagnostics.Unknown_compiler_option_0, errors); + convertOptionsFromJson(ts.optionDeclarations, jsonOptions, basePath, options, compilerOptionsDefaultDiagnostics, errors); if (configFileName) { options.configFilePath = ts.normalizeSlashes(configFileName); } @@ -27096,10 +27336,14 @@ var ts; function convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName) { var options = getDefaultTypeAcquisition(configFileName); var typeAcquisition = convertEnableAutoDiscoveryToEnable(jsonOptions); - convertOptionsFromJson(ts.typeAcquisitionDeclarations, typeAcquisition, basePath, options, ts.Diagnostics.Unknown_type_acquisition_option_0, errors); + var diagnostics = { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1, + }; + convertOptionsFromJson(ts.typeAcquisitionDeclarations, typeAcquisition, basePath, options, diagnostics, errors); return options; } - function convertOptionsFromJson(optionDeclarations, jsonOptions, basePath, defaultOptions, diagnosticMessage, errors) { + function convertOptionsFromJson(optionDeclarations, jsonOptions, basePath, defaultOptions, diagnostics, errors) { if (!jsonOptions) { return; } @@ -27110,7 +27354,13 @@ var ts; defaultOptions[opt.name] = convertJsonOption(opt, jsonOptions[id], basePath, errors); } else { - errors.push(ts.createCompilerDiagnostic(diagnosticMessage, id)); + var possibleOption = ts.getSpellingSuggestion(id, optionDeclarations, function (opt) { return opt.name; }); + if (possibleOption) { + errors.push(ts.createCompilerDiagnostic(diagnostics.unknownDidYouMeanDiagnostic, id, possibleOption.name)); + } + else { + errors.push(ts.createCompilerDiagnostic(diagnostics.unknownOptionDiagnostic, id)); + } } } } @@ -27146,7 +27396,7 @@ var ts; } function normalizeNonListOptionValue(option, basePath, value) { if (option.isFilePath) { - value = ts.normalizePath(ts.combinePaths(basePath, value)); + value = ts.getNormalizedAbsolutePath(value, basePath); if (value === "") { value = "."; } @@ -28930,7 +29180,10 @@ var ts; ContainerFlags[ContainerFlags["IsInterface"] = 64] = "IsInterface"; ContainerFlags[ContainerFlags["IsObjectLiteralOrClassExpressionMethod"] = 128] = "IsObjectLiteralOrClassExpressionMethod"; })(ContainerFlags || (ContainerFlags = {})); - var flowNodeCreated = ts.identity; + function initFlowNode(node) { + ts.Debug.attachFlowNodeDebugInfo(node); + return node; + } var binder = createBinder(); function bindSourceFile(file, options) { ts.performance.mark("beforeBind"); @@ -28959,6 +29212,7 @@ var ts; var currentReturnTarget; var currentTrueTarget; var currentFalseTarget; + var currentExceptionTarget; var preSwitchCaseFlow; var activeLabels; var hasExplicitReturn; @@ -28994,6 +29248,9 @@ var ts; symbolCount = 0; skipTransformFlagAggregation = file.isDeclarationFile; Symbol = ts.objectAllocator.getSymbolConstructor(); + // Attach debugging information if necessary + ts.Debug.attachFlowNodeDebugInfo(unreachableFlow); + ts.Debug.attachFlowNodeDebugInfo(reportedUnreachableFlow); if (!file.locals) { bind(file); file.symbolCount = symbolCount; @@ -29016,6 +29273,7 @@ var ts; currentReturnTarget = undefined; currentTrueTarget = undefined; currentFalseTarget = undefined; + currentExceptionTarget = undefined; activeLabels = undefined; hasExplicitReturn = false; emitFlags = 0 /* None */; @@ -29337,11 +29595,11 @@ var ts; blockScopeContainer.locals = undefined; } if (containerFlags & 4 /* IsControlFlowContainer */) { - var saveFlowNodeCreated = flowNodeCreated; var saveCurrentFlow = currentFlow; var saveBreakTarget = currentBreakTarget; var saveContinueTarget = currentContinueTarget; var saveReturnTarget = currentReturnTarget; + var saveExceptionTarget = currentExceptionTarget; var saveActiveLabels = activeLabels; var saveHasExplicitReturn = hasExplicitReturn; var isIIFE = containerFlags & 16 /* IsFunctionExpression */ && !ts.hasModifier(node, 256 /* Async */) && @@ -29349,7 +29607,7 @@ var ts; // A non-async, non-generator IIFE is considered part of the containing control flow. Return statements behave // similarly to break statements that exit to a label just past the statement body. if (!isIIFE) { - currentFlow = { flags: 2 /* Start */ }; + currentFlow = initFlowNode({ flags: 2 /* Start */ }); if (containerFlags & (16 /* IsFunctionExpression */ | 128 /* IsObjectLiteralOrClassExpressionMethod */)) { currentFlow.node = node; } @@ -29357,11 +29615,11 @@ var ts; // We create a return control flow graph for IIFEs and constructors. For constructors // we use the return control flow graph in strict property initialization checks. currentReturnTarget = isIIFE || node.kind === 161 /* Constructor */ ? createBranchLabel() : undefined; + currentExceptionTarget = undefined; currentBreakTarget = undefined; currentContinueTarget = undefined; activeLabels = undefined; hasExplicitReturn = false; - flowNodeCreated = ts.identity; bindChildren(node); // Reset all reachability check related flags on node (for incremental scenarios) node.flags &= ~2816 /* ReachabilityAndEmitFlags */; @@ -29387,9 +29645,9 @@ var ts; currentBreakTarget = saveBreakTarget; currentContinueTarget = saveContinueTarget; currentReturnTarget = saveReturnTarget; + currentExceptionTarget = saveExceptionTarget; activeLabels = saveActiveLabels; hasExplicitReturn = saveHasExplicitReturn; - flowNodeCreated = saveFlowNodeCreated; } else if (containerFlags & 64 /* IsInterface */) { seenThisKeyword = false; @@ -29530,9 +29788,6 @@ var ts; case 309 /* JSDocEnumTag */: bindJSDocTypeAlias(node); break; - case 307 /* JSDocClassTag */: - bindJSDocClassTag(node); - break; // In source files and blocks, bind functions first to match hoisting that occurs at runtime case 288 /* SourceFile */: { bindEachFunctionsFirst(node.statements); @@ -29572,9 +29827,8 @@ var ts; function isNarrowableReference(expr) { return expr.kind === 75 /* Identifier */ || expr.kind === 103 /* ThisKeyword */ || expr.kind === 101 /* SuperKeyword */ || (ts.isPropertyAccessExpression(expr) || ts.isNonNullExpression(expr) || ts.isParenthesizedExpression(expr)) && isNarrowableReference(expr.expression) || - ts.isElementAccessExpression(expr) && - ts.isStringOrNumericLiteralLike(expr.argumentExpression) && - isNarrowableReference(expr.expression); + ts.isElementAccessExpression(expr) && ts.isStringOrNumericLiteralLike(expr.argumentExpression) && isNarrowableReference(expr.expression) || + ts.isOptionalChain(expr); } function hasNarrowableArgument(expr) { if (expr.arguments) { @@ -29631,10 +29885,10 @@ var ts; return isNarrowableReference(expr); } function createBranchLabel() { - return { flags: 4 /* BranchLabel */, antecedents: undefined }; + return initFlowNode({ flags: 4 /* BranchLabel */, antecedents: undefined }); } function createLoopLabel() { - return { flags: 8 /* LoopLabel */, antecedents: undefined }; + return initFlowNode({ flags: 8 /* LoopLabel */, antecedents: undefined }); } function setFlowNodeReferenced(flow) { // On first reference we set the Referenced flag, thereafter we set the Shared flag @@ -29653,36 +29907,32 @@ var ts; if (!expression) { return flags & 32 /* TrueCondition */ ? antecedent : unreachableFlow; } - if (expression.kind === 105 /* TrueKeyword */ && flags & 64 /* FalseCondition */ || - expression.kind === 90 /* FalseKeyword */ && flags & 32 /* TrueCondition */) { - if (!ts.isOptionalChainRoot(expression.parent)) { - return unreachableFlow; - } + if ((expression.kind === 105 /* TrueKeyword */ && flags & 64 /* FalseCondition */ || + expression.kind === 90 /* FalseKeyword */ && flags & 32 /* TrueCondition */) && + !ts.isExpressionOfOptionalChainRoot(expression) && !ts.isNullishCoalesce(expression.parent)) { + return unreachableFlow; } if (!isNarrowingExpression(expression)) { return antecedent; } setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: flags, antecedent: antecedent, node: expression }); + return initFlowNode({ flags: flags, antecedent: antecedent, node: expression }); } function createFlowSwitchClause(antecedent, switchStatement, clauseStart, clauseEnd) { - if (!isNarrowingExpression(switchStatement.expression)) { - return antecedent; - } setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: 128 /* SwitchClause */, antecedent: antecedent, switchStatement: switchStatement, clauseStart: clauseStart, clauseEnd: clauseEnd }); + return initFlowNode({ flags: 128 /* SwitchClause */, antecedent: antecedent, switchStatement: switchStatement, clauseStart: clauseStart, clauseEnd: clauseEnd }); } - function createFlowAssignment(antecedent, node) { + function createFlowMutation(flags, antecedent, node) { setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: 16 /* Assignment */, antecedent: antecedent, node: node }); + var result = initFlowNode({ flags: flags, antecedent: antecedent, node: node }); + if (currentExceptionTarget) { + addAntecedent(currentExceptionTarget, result); + } + return result; } function createFlowCall(antecedent, node) { setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: 512 /* Call */, antecedent: antecedent, node: node }); - } - function createFlowArrayMutation(antecedent, node) { - setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: 256 /* ArrayMutation */, antecedent: antecedent, node: node }); + return initFlowNode({ flags: 512 /* Call */, antecedent: antecedent, node: node }); } function finishFlowLabel(flow) { var antecedents = flow.antecedents; @@ -29742,7 +29992,7 @@ var ts; } function bindCondition(node, trueTarget, falseTarget) { doWithConditionalBranches(bind, node, trueTarget, falseTarget); - if (!node || !isLogicalExpression(node) && !(ts.isOptionalChain(node) && isOutermostOptionalChain(node))) { + if (!node || !isLogicalExpression(node) && !(ts.isOptionalChain(node) && ts.isOutermostOptionalChain(node))) { addAntecedent(trueTarget, createFlowCondition(32 /* TrueCondition */, currentFlow, node)); addAntecedent(falseTarget, createFlowCondition(64 /* FalseCondition */, currentFlow, node)); } @@ -29873,87 +30123,56 @@ var ts; } function bindTryStatement(node) { var preFinallyLabel = createBranchLabel(); - var preTryFlow = currentFlow; - var tryPriors = []; - var oldFlowNodeCreated = flowNodeCreated; - // We hook the creation of all flow nodes within the `try` scope and store them so we can add _all_ of them - // as possible antecedents of the start of the `catch` or `finally` blocks. - // Don't bother intercepting the call if there's no finally or catch block that needs the information - if (node.catchClause || node.finallyBlock) { - flowNodeCreated = function (node) { return (tryPriors.push(node), node); }; - } + // We conservatively assume that *any* code in the try block can cause an exception, but we only need + // to track code that causes mutations (because only mutations widen the possible control flow type of + // a variable). The currentExceptionTarget is the target label for control flows that result from + // exceptions. We add all mutation flow nodes as antecedents of this label such that we can analyze them + // as possible antecedents of the start of catch or finally blocks. Furthermore, we add the current + // control flow to represent exceptions that occur before any mutations. + var saveExceptionTarget = currentExceptionTarget; + currentExceptionTarget = createBranchLabel(); + addAntecedent(currentExceptionTarget, currentFlow); bind(node.tryBlock); - flowNodeCreated = oldFlowNodeCreated; addAntecedent(preFinallyLabel, currentFlow); var flowAfterTry = currentFlow; var flowAfterCatch = unreachableFlow; if (node.catchClause) { - currentFlow = preTryFlow; - if (tryPriors.length) { - var preCatchFlow = createBranchLabel(); - addAntecedent(preCatchFlow, currentFlow); - for (var _i = 0, tryPriors_1 = tryPriors; _i < tryPriors_1.length; _i++) { - var p = tryPriors_1[_i]; - addAntecedent(preCatchFlow, p); - } - currentFlow = finishFlowLabel(preCatchFlow); - } + // Start of catch clause is the target of exceptions from try block. + currentFlow = finishFlowLabel(currentExceptionTarget); + // The currentExceptionTarget now represents control flows from exceptions in the catch clause. + // Effectively, in a try-catch-finally, if an exception occurs in the try block, the catch block + // acts like a second try block. + currentExceptionTarget = createBranchLabel(); + addAntecedent(currentExceptionTarget, currentFlow); bind(node.catchClause); addAntecedent(preFinallyLabel, currentFlow); flowAfterCatch = currentFlow; } + var exceptionTarget = finishFlowLabel(currentExceptionTarget); + currentExceptionTarget = saveExceptionTarget; if (node.finallyBlock) { - // We add the nodes within the `try` block to the `finally`'s antecedents if there's no catch block - // (If there is a `catch` block, it will have all these antecedents instead, and the `finally` will - // have the end of the `try` block and the end of the `catch` block) - var preFinallyPrior = preTryFlow; - if (!node.catchClause) { - if (tryPriors.length) { - var preFinallyFlow_1 = createBranchLabel(); - addAntecedent(preFinallyFlow_1, preTryFlow); - for (var _a = 0, tryPriors_2 = tryPriors; _a < tryPriors_2.length; _a++) { - var p = tryPriors_2[_a]; - addAntecedent(preFinallyFlow_1, p); - } - preFinallyPrior = finishFlowLabel(preFinallyFlow_1); - } - } - // in finally flow is combined from pre-try/flow from try/flow from catch - // pre-flow is necessary to make sure that finally is reachable even if finally flows in both try and finally blocks are unreachable - // also for finally blocks we inject two extra edges into the flow graph. - // first -> edge that connects pre-try flow with the label at the beginning of the finally block, it has lock associated with it - // second -> edge that represents post-finally flow. - // these edges are used in following scenario: - // let a; (1) - // try { a = someOperation(); (2)} - // finally { (3) console.log(a) } (4) - // (5) a - // flow graph for this case looks roughly like this (arrows show ): - // (1-pre-try-flow) <--.. <-- (2-post-try-flow) - // ^ ^ - // |*****(3-pre-finally-label) -----| - // ^ - // |-- ... <-- (4-post-finally-label) <--- (5) - // In case when we walk the flow starting from inside the finally block we want to take edge '*****' into account - // since it ensures that finally is always reachable. However when we start outside the finally block and go through label (5) - // then edge '*****' should be discarded because label 4 is only reachable if post-finally label-4 is reachable - // Simply speaking code inside finally block is treated as reachable as pre-try-flow - // since we conservatively assume that any line in try block can throw or return in which case we'll enter finally. - // However code after finally is reachable only if control flow was not abrupted in try/catch or finally blocks - it should be composed from - // final flows of these blocks without taking pre-try flow into account. - // - // extra edges that we inject allows to control this behavior - // if when walking the flow we step on post-finally edge - we can mark matching pre-finally edge as locked so it will be skipped. - var preFinallyFlow = { flags: 4096 /* PreFinally */, antecedent: preFinallyPrior, lock: {} }; + // Possible ways control can reach the finally block: + // 1) Normal completion of try block of a try-finally or try-catch-finally + // 2) Normal completion of catch block (following exception in try block) of a try-catch-finally + // 3) Exception in try block of a try-finally + // 4) Exception in catch block of a try-catch-finally + // When analyzing a control flow graph that starts inside a finally block we want to consider all + // four possibilities above. However, when analyzing a control flow graph that starts outside (past) + // the finally block, we only want to consider the first two (if we're past a finally block then it + // must have completed normally). To make this possible, we inject two extra nodes into the control + // flow graph: An after-finally with an antecedent of the control flow at the end of the finally + // block, and a pre-finally with an antecedent that represents all exceptional control flows. The + // 'lock' property of the pre-finally references the after-finally, and the after-finally has a + // boolean 'locked' property that we set to true when analyzing a control flow that contained the + // the after-finally node. When the lock associated with a pre-finally is locked, the antecedent of + // the pre-finally (i.e. the exceptional control flows) are skipped. + var preFinallyFlow = initFlowNode({ flags: 4096 /* PreFinally */, antecedent: exceptionTarget, lock: {} }); addAntecedent(preFinallyLabel, preFinallyFlow); currentFlow = finishFlowLabel(preFinallyLabel); bind(node.finallyBlock); - // if flow after finally is unreachable - keep it - // otherwise check if flows after try and after catch are unreachable - // if yes - convert current flow to unreachable - // i.e. - // try { return "1" } finally { console.log(1); } - // console.log(2); // this line should be unreachable even if flow falls out of finally block + // If the end of the finally block is reachable, but the end of the try and catch blocks are not, + // convert the current flow to unreachable. For example, 'try { return 1; } finally { ... }' should + // result in an unreachable current control flow. if (!(currentFlow.flags & 1 /* Unreachable */)) { if ((flowAfterTry.flags & 1 /* Unreachable */) && (flowAfterCatch.flags & 1 /* Unreachable */)) { currentFlow = flowAfterTry === reportedUnreachableFlow || flowAfterCatch === reportedUnreachableFlow @@ -29962,7 +30181,7 @@ var ts; } } if (!(currentFlow.flags & 1 /* Unreachable */)) { - var afterFinallyFlow = flowNodeCreated({ flags: 8192 /* AfterFinally */, antecedent: currentFlow }); + var afterFinallyFlow = initFlowNode({ flags: 8192 /* AfterFinally */, antecedent: currentFlow }); preFinallyFlow.lock = afterFinallyFlow; currentFlow = afterFinallyFlow; } @@ -29996,6 +30215,7 @@ var ts; var savedSubtreeTransformFlags = subtreeTransformFlags; subtreeTransformFlags = 0; var clauses = node.clauses; + var isNarrowingSwitch = isNarrowingExpression(node.parent.expression); var fallthroughFlow = unreachableFlow; for (var i = 0; i < clauses.length; i++) { var clauseStart = i; @@ -30004,14 +30224,14 @@ var ts; i++; } var preCaseLabel = createBranchLabel(); - addAntecedent(preCaseLabel, createFlowSwitchClause(preSwitchCaseFlow, node.parent, clauseStart, i + 1)); + addAntecedent(preCaseLabel, isNarrowingSwitch ? createFlowSwitchClause(preSwitchCaseFlow, node.parent, clauseStart, i + 1) : preSwitchCaseFlow); addAntecedent(preCaseLabel, fallthroughFlow); currentFlow = finishFlowLabel(preCaseLabel); var clause = clauses[i]; bind(clause); fallthroughFlow = currentFlow; if (!(currentFlow.flags & 1 /* Unreachable */) && i !== clauses.length - 1 && options.noFallthroughCasesInSwitch) { - errorOnFirstToken(clause, ts.Diagnostics.Fallthrough_case_in_switch); + clause.fallthroughFlowNode = currentFlow; } } clauses.transformFlags = subtreeTransformFlags | 536870912 /* HasComputedFlags */; @@ -30075,7 +30295,7 @@ var ts; } function bindAssignmentTargetFlow(node) { if (isNarrowableReference(node)) { - currentFlow = createFlowAssignment(currentFlow, node); + currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); } else if (node.kind === 191 /* ArrayLiteralExpression */) { for (var _i = 0, _a = node.elements; _i < _a.length; _i++) { @@ -30156,7 +30376,7 @@ var ts; if (operator === 62 /* EqualsToken */ && node.left.kind === 194 /* ElementAccessExpression */) { var elementAccess = node.left; if (isNarrowableOperand(elementAccess.expression)) { - currentFlow = createFlowArrayMutation(currentFlow, node); + currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); } } } @@ -30192,7 +30412,7 @@ var ts; } } else { - currentFlow = createFlowAssignment(currentFlow, node); + currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); } } function bindVariableDeclarationFlow(node) { @@ -30214,12 +30434,9 @@ var ts; addDeclarationToSymbol(host.symbol, host, 32 /* Class */); } } - function isOutermostOptionalChain(node) { - return !ts.isOptionalChain(node.parent) || ts.isOptionalChainRoot(node.parent) || node !== node.parent.expression; - } function bindOptionalExpression(node, trueTarget, falseTarget) { doWithConditionalBranches(bind, node, trueTarget, falseTarget); - if (!ts.isOptionalChain(node) || isOutermostOptionalChain(node)) { + if (!ts.isOptionalChain(node) || ts.isOutermostOptionalChain(node)) { addAntecedent(trueTarget, createFlowCondition(32 /* TrueCondition */, currentFlow, node)); addAntecedent(falseTarget, createFlowCondition(64 /* FalseCondition */, currentFlow, node)); } @@ -30257,7 +30474,7 @@ var ts; currentFlow = finishFlowLabel(preChainLabel); } doWithConditionalBranches(bindOptionalChainRest, node, trueTarget, falseTarget); - if (isOutermostOptionalChain(node)) { + if (ts.isOutermostOptionalChain(node)) { addAntecedent(trueTarget, createFlowCondition(32 /* TrueCondition */, currentFlow, node)); addAntecedent(falseTarget, createFlowCondition(64 /* FalseCondition */, currentFlow, node)); } @@ -30301,7 +30518,7 @@ var ts; if (node.expression.kind === 193 /* PropertyAccessExpression */) { var propertyAccess = node.expression; if (isNarrowableOperand(propertyAccess.expression) && ts.isPushOrUnshiftIdentifier(propertyAccess.name)) { - currentFlow = createFlowArrayMutation(currentFlow, node); + currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); } } } @@ -30601,7 +30818,7 @@ var ts; var host = ts.getJSDocHost(typeAlias); container = ts.findAncestor(host.parent, function (n) { return !!(getContainerFlags(n) & 1 /* IsContainer */); }) || file; blockScopeContainer = ts.getEnclosingBlockScopeContainer(host) || file; - currentFlow = { flags: 2 /* Start */ }; + currentFlow = initFlowNode({ flags: 2 /* Start */ }); parent = typeAlias; bind(typeAlias.typeExpression); var declName = ts.getNameOfDeclaration(typeAlias); @@ -30614,7 +30831,12 @@ var ts; switch (ts.getAssignmentDeclarationPropertyAccessKind(declName.parent)) { case 1 /* ExportsProperty */: case 2 /* ModuleExports */: - container = file; + if (!ts.isExternalOrCommonJsModule(file)) { + container = undefined; + } + else { + container = file; + } break; case 4 /* ThisProperty */: container = declName.parent.expression; @@ -30628,7 +30850,9 @@ var ts; case 0 /* None */: return ts.Debug.fail("Shouldn't have detected typedef or enum on non-assignment declaration"); } - declareModuleMember(typeAlias, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); + if (container) { + declareModuleMember(typeAlias, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); + } container = oldContainer; } } @@ -31024,6 +31248,8 @@ var ts; case 302 /* JSDocTypeLiteral */: case 185 /* MappedType */: return bindAnonymousTypeWorker(node); + case 307 /* JSDocClassTag */: + return bindJSDocClassTag(node); case 192 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); case 200 /* FunctionExpression */: @@ -31243,7 +31469,8 @@ var ts; var flags = ts.exportAssignmentIsAlias(node) ? 2097152 /* Alias */ : 4 /* Property */ | 1048576 /* ExportValue */ | 512 /* ValueModule */; - declareSymbol(file.symbol.exports, file.symbol, node, flags | 67108864 /* Assignment */, 0 /* None */); + var symbol = declareSymbol(file.symbol.exports, file.symbol, node, flags | 67108864 /* Assignment */, 0 /* None */); + setValueDeclaration(symbol, node); } function bindThisPropertyAssignment(node) { ts.Debug.assert(ts.isInJSFile(node)); @@ -31259,7 +31486,7 @@ var ts; constructorSymbol = lookupSymbolForPropertyAccess(l.expression.expression, thisParentContainer); } } - if (constructorSymbol) { + if (constructorSymbol && constructorSymbol.valueDeclaration) { // Declare a 'member' if the container is an ES5 class or ES6 constructor constructorSymbol.members = constructorSymbol.members || ts.createSymbolTable(); // It's acceptable for multiple 'this' assignments of the same identifier to occur @@ -31332,6 +31559,10 @@ var ts; } function bindObjectDefinePrototypeProperty(node) { var namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0].expression); + if (namespaceSymbol) { + // Ensure the namespace symbol becomes class-like + addDeclarationToSymbol(namespaceSymbol, namespaceSymbol.valueDeclaration, 32 /* Class */); + } bindPotentiallyNewExpandoMemberToNamespace(node, namespaceSymbol, /*isPrototypeProperty*/ true); } /** @@ -31406,7 +31637,7 @@ var ts; } }); } - if (containerIsClass && namespaceSymbol) { + if (containerIsClass && namespaceSymbol && namespaceSymbol.valueDeclaration) { addDeclarationToSymbol(namespaceSymbol, namespaceSymbol.valueDeclaration, 32 /* Class */); } return namespaceSymbol; @@ -32055,7 +32286,8 @@ var ts; || ts.hasModifier(node, 2270 /* TypeScriptModifier */) || node.typeParameters || node.type - || !node.body) { + || !node.body + || node.questionToken) { transformFlags |= 1 /* AssertTypeScript */; } // function declarations with object rest destructuring are ES2018 syntax @@ -32092,7 +32324,7 @@ var ts; function computePropertyDeclaration(node, subtreeFlags) { var transformFlags = subtreeFlags | 1048576 /* ContainsClassFields */; // Decorators, TypeScript-specific modifiers, and type annotations are TypeScript syntax. - if (ts.some(node.decorators) || ts.hasModifier(node, 2270 /* TypeScriptModifier */) || node.type) { + if (ts.some(node.decorators) || ts.hasModifier(node, 2270 /* TypeScriptModifier */) || node.type || node.questionToken) { transformFlags |= 1 /* AssertTypeScript */; } // Hoisted variables related to class properties should live within the TypeScript class wrapper. @@ -32897,6 +33129,7 @@ var ts; TypeSystemPropertyName[TypeSystemPropertyName["ImmediateBaseConstraint"] = 4] = "ImmediateBaseConstraint"; TypeSystemPropertyName[TypeSystemPropertyName["EnumTagType"] = 5] = "EnumTagType"; TypeSystemPropertyName[TypeSystemPropertyName["JSDocTypeReference"] = 6] = "JSDocTypeReference"; + TypeSystemPropertyName[TypeSystemPropertyName["ResolvedTypeArguments"] = 7] = "ResolvedTypeArguments"; })(TypeSystemPropertyName || (TypeSystemPropertyName = {})); var CheckMode; (function (CheckMode) { @@ -32907,12 +33140,6 @@ var ts; CheckMode[CheckMode["SkipGenericFunctions"] = 8] = "SkipGenericFunctions"; CheckMode[CheckMode["IsForSignatureHelp"] = 16] = "IsForSignatureHelp"; })(CheckMode || (CheckMode = {})); - var ContextFlags; - (function (ContextFlags) { - ContextFlags[ContextFlags["None"] = 0] = "None"; - ContextFlags[ContextFlags["Signature"] = 1] = "Signature"; - ContextFlags[ContextFlags["NoConstraints"] = 2] = "NoConstraints"; - })(ContextFlags || (ContextFlags = {})); var AccessFlags; (function (AccessFlags) { AccessFlags[AccessFlags["None"] = 0] = "None"; @@ -33046,14 +33273,12 @@ var ts; undefinedSymbol.declarations = []; var globalThisSymbol = createSymbol(1536 /* Module */, "globalThis", 8 /* Readonly */); globalThisSymbol.exports = globals; + globalThisSymbol.declarations = []; globals.set(globalThisSymbol.escapedName, globalThisSymbol); var argumentsSymbol = createSymbol(4 /* Property */, "arguments"); var requireSymbol = createSymbol(4 /* Property */, "require"); /** This will be set during calls to `getResolvedSignature` where services determines an apparent number of arguments greater than what is actually provided. */ var apparentArgumentCount; - // This object is reused for `checkOptionalExpression` return values to avoid frequent GC due to nursery object allocations. - // This object represents a pool-size of 1. - var pooledOptionalTypeResult = { isOptional: false, type: undefined }; // for public members that accept a Node or one of its subtypes, we must guard against // synthetic nodes created during transformations by calling `getParseTreeNode`. // for most of these, we perform the guard only on `checker` to avoid any possible @@ -33172,9 +33397,9 @@ var ts; }, getAugmentedPropertiesOfType: getAugmentedPropertiesOfType, getRootSymbols: getRootSymbols, - getContextualType: function (nodeIn) { + getContextualType: function (nodeIn, contextFlags) { var node = ts.getParseTreeNode(nodeIn, ts.isExpression); - return node ? getContextualType(node) : undefined; + return node ? getContextualType(node, contextFlags) : undefined; }, getContextualTypeForObjectLiteralElement: function (nodeIn) { var node = ts.getParseTreeNode(nodeIn, ts.isObjectLiteralElementLike); @@ -33223,7 +33448,7 @@ var ts; getEmitResolver: getEmitResolver, getExportsOfModule: getExportsOfModuleAsArray, getExportsAndPropertiesOfModule: getExportsAndPropertiesOfModule, - getSymbolWalker: ts.createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignature, getReturnTypeOfSignature, getBaseTypes, resolveStructuredTypeMembers, getTypeOfSymbol, getResolvedSymbol, getIndexTypeOfStructuredType, getConstraintOfTypeParameter, getFirstIdentifier, getTypeArguments), + getSymbolWalker: ts.createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignature, getReturnTypeOfSignature, getBaseTypes, resolveStructuredTypeMembers, getTypeOfSymbol, getResolvedSymbol, getIndexTypeOfStructuredType, getConstraintOfTypeParameter, ts.getFirstIdentifier, getTypeArguments), getAmbientModules: getAmbientModules, getJsxIntrinsicTagNamesAt: getJsxIntrinsicTagNamesAt, isOptionalParameter: function (nodeIn) { @@ -33352,10 +33577,10 @@ var ts; var errorType = createIntrinsicType(1 /* Any */, "error"); var unknownType = createIntrinsicType(2 /* Unknown */, "unknown"); var undefinedType = createIntrinsicType(32768 /* Undefined */, "undefined"); - var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 262144 /* ContainsWideningType */); + var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 524288 /* ContainsWideningType */); var optionalType = createIntrinsicType(32768 /* Undefined */, "undefined"); var nullType = createIntrinsicType(65536 /* Null */, "null"); - var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 262144 /* ContainsWideningType */); + var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 524288 /* ContainsWideningType */); var stringType = createIntrinsicType(4 /* String */, "string"); var numberType = createIntrinsicType(8 /* Number */, "number"); var bigintType = createIntrinsicType(64 /* BigInt */, "bigint"); @@ -33381,7 +33606,7 @@ var ts; var voidType = createIntrinsicType(16384 /* Void */, "void"); var neverType = createIntrinsicType(131072 /* Never */, "never"); var silentNeverType = createIntrinsicType(131072 /* Never */, "never"); - var nonInferrableType = createIntrinsicType(131072 /* Never */, "never", 1048576 /* NonInferrableType */); + var nonInferrableType = createIntrinsicType(131072 /* Never */, "never", 2097152 /* NonInferrableType */); var implicitNeverType = createIntrinsicType(131072 /* Never */, "never"); var unreachableNeverType = createIntrinsicType(131072 /* Never */, "never"); var nonPrimitiveType = createIntrinsicType(67108864 /* NonPrimitive */, "object"); @@ -33399,7 +33624,7 @@ var ts; var anyFunctionType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); // The anyFunctionType contains the anyFunctionType by definition. The flag is further propagated // in getPropagatingFlagsOfTypes, and it is checked in inferFromTypes. - anyFunctionType.objectFlags |= 1048576 /* NonInferrableType */; + anyFunctionType.objectFlags |= 2097152 /* NonInferrableType */; var noConstraintType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); var circularConstraintType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); var resolvingDefaultType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); @@ -33408,10 +33633,10 @@ var ts; markerSubType.constraint = markerSuperType; var markerOtherType = createTypeParameter(); var noTypePredicate = createTypePredicate(1 /* Identifier */, "<>", 0, anyType); - var anySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); - var unknownSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, errorType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); - var resolvingSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); - var silentNeverSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, silentNeverType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); + var anySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */); + var unknownSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, errorType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */); + var resolvingSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */); + var silentNeverSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, silentNeverType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */); var enumNumberIndexInfo = createIndexInfo(stringType, /*isReadonly*/ true); var iterationTypesCache = ts.createMap(); // cache for common IterationTypes instances var noIterationTypes = { @@ -33564,7 +33789,7 @@ var ts; var chosenpragma = ts.isArray(jsxPragma) ? jsxPragma[0] : jsxPragma; file.localJsxFactory = ts.parseIsolatedEntityName(chosenpragma.arguments.factory, languageVersion); if (file.localJsxFactory) { - return file.localJsxNamespace = getFirstIdentifier(file.localJsxFactory).escapedText; + return file.localJsxNamespace = ts.getFirstIdentifier(file.localJsxFactory).escapedText; } } } @@ -33574,7 +33799,7 @@ var ts; if (compilerOptions.jsxFactory) { _jsxFactoryEntity = ts.parseIsolatedEntityName(compilerOptions.jsxFactory, languageVersion); if (_jsxFactoryEntity) { - _jsxNamespace = getFirstIdentifier(_jsxFactoryEntity).escapedText; + _jsxNamespace = ts.getFirstIdentifier(_jsxFactoryEntity).escapedText; } } else if (compilerOptions.reactNamespace) { @@ -35052,7 +35277,7 @@ var ts; var namespaceMeaning = 1920 /* Namespace */ | (ts.isInJSFile(name) ? meaning & 111551 /* Value */ : 0); var symbol; if (name.kind === 75 /* Identifier */) { - var message = meaning === namespaceMeaning ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(getFirstIdentifier(name)); + var message = meaning === namespaceMeaning ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(ts.getFirstIdentifier(name)); var symbolFromJSPrototype = ts.isInJSFile(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined; symbol = resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, /*isUse*/ true); if (!symbol) { @@ -35164,7 +35389,12 @@ var ts; return undefined; } var init = ts.isVariableDeclaration(decl) ? ts.getDeclaredExpandoInitializer(decl) : ts.getAssignedExpandoInitializer(decl); - return init && getSymbolOfNode(init) || undefined; + if (init) { + var initSymbol = getSymbolOfNode(init); + if (initSymbol) { + return mergeJSSymbols(initSymbol, symbol); + } + } } function resolveExternalModuleName(location, moduleReferenceExpression, ignoreErrors) { return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ignoreErrors ? undefined : ts.Diagnostics.Cannot_find_module_0); @@ -35591,8 +35821,8 @@ var ts; } function findConstructorDeclaration(node) { var members = node.members; - for (var _i = 0, members_2 = members; _i < members_2.length; _i++) { - var member = members_2[_i]; + for (var _i = 0, members_3 = members; _i < members_3.length; _i++) { + var member = members_3[_i]; if (member.kind === 161 /* Constructor */ && ts.nodeIsPresent(member.body)) { return member; } @@ -36015,7 +36245,7 @@ var ts; // Type Reference or TypeAlias entity = Identifier meaning = 788968 /* Type */; } - var firstIdentifier = getFirstIdentifier(entityName); + var firstIdentifier = ts.getFirstIdentifier(entityName); var symbol = resolveName(enclosingDeclaration, firstIdentifier.escapedText, meaning, /*nodeNotFoundErrorMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false); // Verify if the symbol is accessible return (symbol && hasVisibleDeclarations(symbol, /*shouldComputeAliasToMakeVisible*/ true)) || { @@ -36507,8 +36737,6 @@ var ts; else if (context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */ && type.symbol.valueDeclaration && ts.isClassLike(type.symbol.valueDeclaration) && - // Use `import` types for refs to other scopes, only anonymize something defined in the same scope - ts.findAncestor(type.symbol.valueDeclaration, function (d) { return d === ts.getSourceFileOfNode(context.enclosingDeclaration); }) && !isValueSymbolAccessible(type.symbol, context.enclosingDeclaration)) { return createAnonymousTypeNode(type); } @@ -36669,9 +36897,9 @@ var ts; } } } - var propertyName = symbolToName(propertySymbol, context, 111551 /* Value */, /*expectsIdentifier*/ true); - context.approximateLength += (ts.symbolName(propertySymbol).length + 1); context.enclosingDeclaration = saveEnclosingDeclaration; + var propertyName = getPropertyNameNodeForSymbol(propertySymbol, context); + context.approximateLength += (ts.symbolName(propertySymbol).length + 1); var optionalToken = propertySymbol.flags & 16777216 /* Optional */ ? ts.createToken(57 /* QuestionToken */) : undefined; if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) { var signatures = getSignaturesOfType(filterType(propertyType, function (t) { return !(t.flags & 32768 /* Undefined */); }), 0 /* Call */); @@ -36870,7 +37098,7 @@ var ts; if (!context.tracker.trackSymbol) return; // get symbol of the first identifier of the entityName - var firstIdentifier = getFirstIdentifier(accessExpression); + var firstIdentifier = ts.getFirstIdentifier(accessExpression); var name = resolveName(firstIdentifier, firstIdentifier.escapedText, 111551 /* Value */ | 1048576 /* ExportValue */, /*nodeNotFoundErrorMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ true); if (name) { context.tracker.trackSymbol(name, enclosingDeclaration, 111551 /* Value */); @@ -37236,22 +37464,34 @@ var ts; } } } + function isSingleQuotedStringNamed(d) { + var name = ts.getNameOfDeclaration(d); + if (name && ts.isStringLiteral(name) && (name.singleQuote || + (!ts.nodeIsSynthesized(name) && ts.startsWith(ts.getTextOfNode(name, /*includeTrivia*/ false), "'")))) { + return true; + } + return false; + } function getPropertyNameNodeForSymbol(symbol, context) { - var fromNameType = getPropertyNameNodeForSymbolFromNameType(symbol, context); + var singleQuote = !!ts.length(symbol.declarations) && ts.every(symbol.declarations, isSingleQuotedStringNamed); + var fromNameType = getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote); if (fromNameType) { return fromNameType; } + if (ts.isKnownSymbol(symbol)) { + return ts.createComputedPropertyName(ts.createPropertyAccess(ts.createIdentifier("Symbol"), symbol.escapedName.substr(3))); + } var rawName = ts.unescapeLeadingUnderscores(symbol.escapedName); - return createPropertyNameNodeForIdentifierOrLiteral(rawName); + return createPropertyNameNodeForIdentifierOrLiteral(rawName, singleQuote); } // See getNameForSymbolFromNameType for a stringy equivalent - function getPropertyNameNodeForSymbolFromNameType(symbol, context) { + function getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote) { var nameType = symbol.nameType; if (nameType) { if (nameType.flags & 384 /* StringOrNumberLiteral */) { var name = "" + nameType.value; if (!ts.isIdentifierText(name, compilerOptions.target) && !isNumericLiteralName(name)) { - return ts.createLiteral(name); + return ts.createLiteral(name, !!singleQuote); } if (isNumericLiteralName(name) && ts.startsWith(name, "-")) { return ts.createComputedPropertyName(ts.createLiteral(+name)); @@ -37263,8 +37503,8 @@ var ts; } } } - function createPropertyNameNodeForIdentifierOrLiteral(name) { - return ts.isIdentifierText(name, compilerOptions.target) ? ts.createIdentifier(name) : ts.createLiteral(isNumericLiteralName(name) ? +name : name); + function createPropertyNameNodeForIdentifierOrLiteral(name, singleQuote) { + return ts.isIdentifierText(name, compilerOptions.target) ? ts.createIdentifier(name) : ts.createLiteral(isNumericLiteralName(name) ? +name : name, !!singleQuote); } function cloneNodeBuilderContext(context) { var initial = __assign({}, context); @@ -37304,7 +37544,7 @@ var ts; var visitedSymbols = ts.createMap(); var deferredPrivates; var oldcontext = context; - context = __assign(__assign({}, oldcontext), { usedSymbolNames: ts.mapMap(symbolTable, function (_symbol, name) { return [ts.unescapeLeadingUnderscores(name), true]; }), remappedSymbolNames: ts.createMap(), tracker: __assign(__assign({}, oldcontext.tracker), { trackSymbol: function (sym, decl, meaning) { + context = __assign(__assign({}, oldcontext), { usedSymbolNames: ts.createMap(), remappedSymbolNames: ts.createMap(), tracker: __assign(__assign({}, oldcontext.tracker), { trackSymbol: function (sym, decl, meaning) { var accessibleResult = isSymbolAccessible(sym, decl, meaning, /*computeALiases*/ false); if (accessibleResult.accessibility === 0 /* Accessible */) { // Lookup the root symbol of the chain of refs we'll use to access it and serialize it @@ -37322,6 +37562,10 @@ var ts; context.usedSymbolNames.set(name, true); }); } + ts.forEachEntry(symbolTable, function (symbol, name) { + var baseName = ts.unescapeLeadingUnderscores(name); + void getInternalSymbolName(symbol, baseName); // Called to cache values into `usedSymbolNames` and `remappedSymbolNames` + }); var addingDeclare = !bundled; var exportEquals = symbolTable.get("export=" /* ExportEquals */); if (exportEquals && symbolTable.size > 1 && exportEquals.flags & 2097152 /* Alias */) { @@ -37513,7 +37757,11 @@ var ts; isPrivate = true; } var modifierFlags = (!isPrivate ? 1 /* Export */ : 0) | (isDefault && !needsPostExportDefault ? 512 /* Default */ : 0); - if (symbol.flags & 16 /* Function */) { + var isConstMergedWithNS = symbol.flags & 1536 /* Module */ && + symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && + symbol.escapedName !== "export=" /* ExportEquals */; + var isConstMergedWithNSPrintableAsSignatureMerge = isConstMergedWithNS && isTypeRepresentableAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol); + if (symbol.flags & 16 /* Function */ || isConstMergedWithNSPrintableAsSignatureMerge) { serializeAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol, getInternalSymbolName(symbol, symbolName), modifierFlags); } if (symbol.flags & 524288 /* TypeAlias */) { @@ -37524,7 +37772,8 @@ var ts; if (symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && symbol.escapedName !== "export=" /* ExportEquals */ && !(symbol.flags & 4194304 /* Prototype */) - && !(symbol.flags & 32 /* Class */)) { + && !(symbol.flags & 32 /* Class */) + && !isConstMergedWithNSPrintableAsSignatureMerge) { serializeVariableOrProperty(symbol, symbolName, isPrivate, needsPostExportDefault, propertyAsAlias, modifierFlags); } if (symbol.flags & 384 /* Enum */) { @@ -37541,7 +37790,7 @@ var ts; serializeAsClass(symbol, getInternalSymbolName(symbol, symbolName), modifierFlags); } } - if (symbol.flags & (512 /* ValueModule */ | 1024 /* NamespaceModule */)) { + if ((symbol.flags & (512 /* ValueModule */ | 1024 /* NamespaceModule */) && (!isConstMergedWithNS || isTypeOnlyNamespace(symbol))) || isConstMergedWithNSPrintableAsSignatureMerge) { serializeModule(symbol, symbolName, modifierFlags); } if (symbol.flags & 64 /* Interface */) { @@ -37569,7 +37818,10 @@ var ts; } } function includePrivateSymbol(symbol) { + if (ts.some(symbol.declarations, ts.isParameterDeclaration)) + return; ts.Debug.assertDefined(deferredPrivates); + getUnusedName(ts.unescapeLeadingUnderscores(symbol.escapedName), symbol); // Call to cache unique name for symbol deferredPrivates.set("" + getSymbolId(symbol), symbol); } function isExportingScope(enclosingDeclaration) { @@ -37628,8 +37880,14 @@ var ts; /*decorators*/ undefined, /*modifiers*/ undefined, getInternalSymbolName(symbol, symbolName), typeParamDecls, heritageClauses, __spreadArrays(indexSignatures, constructSignatures, callSignatures, members)), modifierFlags); } + function getNamespaceMembersForSerialization(symbol) { + return !symbol.exports ? [] : ts.filter(ts.arrayFrom((symbol.exports).values()), function (p) { return !((p.flags & 4194304 /* Prototype */) || (p.escapedName === "prototype")); }); + } + function isTypeOnlyNamespace(symbol) { + return ts.every(getNamespaceMembersForSerialization(symbol), function (m) { return !(resolveSymbol(m).flags & 111551 /* Value */); }); + } function serializeModule(symbol, symbolName, modifierFlags) { - var members = !symbol.exports ? [] : ts.filter(ts.arrayFrom((symbol.exports).values()), function (p) { return !((p.flags & 4194304 /* Prototype */) || (p.escapedName === "prototype")); }); + var members = getNamespaceMembersForSerialization(symbol); // Split NS members up by declaration - members whose parent symbol is the ns symbol vs those whose is not (but were added in later via merging) var locationMap = ts.arrayToMultiMap(members, function (m) { return m.parent && m.parent === symbol ? "real" : "merged"; }); var realMembers = locationMap.get("real") || ts.emptyArray; @@ -37639,17 +37897,20 @@ var ts; // so we don't even have placeholders to fill in. if (ts.length(realMembers)) { var localName = getInternalSymbolName(symbol, symbolName); - serializeAsNamespaceDeclaration(realMembers, localName, modifierFlags, /*suppressNewPrivateContext*/ false); + serializeAsNamespaceDeclaration(realMembers, localName, modifierFlags, !!(symbol.flags & (16 /* Function */ | 67108864 /* Assignment */))); } if (ts.length(mergedMembers)) { var localName = getInternalSymbolName(symbol, symbolName); - ts.forEach(mergedMembers, includePrivateSymbol); var nsBody = ts.createModuleBlock([ts.createExportDeclaration( /*decorators*/ undefined, /*modifiers*/ undefined, ts.createNamedExports(ts.map(ts.filter(mergedMembers, function (n) { return n.escapedName !== "export=" /* ExportEquals */; }), function (s) { var name = ts.unescapeLeadingUnderscores(s.escapedName); var localName = getInternalSymbolName(s, name); - return ts.createExportSpecifier(name === localName ? undefined : localName, name); + var aliasDecl = s.declarations && getDeclarationOfAliasSymbol(s); + var target = aliasDecl && getTargetOfAliasDeclaration(aliasDecl, /*dontRecursivelyResolve*/ true); + includePrivateSymbol(target || s); + var targetName = target ? getInternalSymbolName(target, ts.unescapeLeadingUnderscores(target.escapedName)) : localName; + return ts.createExportSpecifier(name === targetName ? undefined : targetName, name); })))]); addResult(ts.createModuleDeclaration( /*decorators*/ undefined, @@ -37850,7 +38111,11 @@ var ts; case 254 /* ImportClause */: addResult(ts.createImportDeclaration( /*decorators*/ undefined, - /*modifiers*/ undefined, ts.createImportClause(ts.createIdentifier(localName), /*namedBindings*/ undefined), ts.createLiteral(getSpecifierForModuleSymbol(target.parent, context))), 0 /* None */); + /*modifiers*/ undefined, ts.createImportClause(ts.createIdentifier(localName), /*namedBindings*/ undefined), + // We use `target.parent || target` below as `target.parent` is unset when the target is a module which has been export assigned + // And then made into a default by the `esModuleInterop` or `allowSyntheticDefaultImports` flag + // In such cases, the `target` refers to the module itself already + ts.createLiteral(getSpecifierForModuleSymbol(target.parent || target, context))), 0 /* None */); break; case 255 /* NamespaceImport */: addResult(ts.createImportDeclaration( @@ -37862,7 +38127,7 @@ var ts; /*decorators*/ undefined, /*modifiers*/ undefined, ts.createImportClause(/*importClause*/ undefined, ts.createNamedImports([ ts.createImportSpecifier(localName !== verbatimTargetName ? ts.createIdentifier(verbatimTargetName) : undefined, ts.createIdentifier(localName)) - ])), ts.createLiteral(getSpecifierForModuleSymbol(target.parent, context))), 0 /* None */); + ])), ts.createLiteral(getSpecifierForModuleSymbol(target.parent || target, context))), 0 /* None */); break; case 261 /* ExportSpecifier */: // does not use localName because the symbol name in this case refers to the name in the exports table, @@ -37876,6 +38141,7 @@ var ts; serializeMaybeAliasAssignment(symbol); break; case 208 /* BinaryExpression */: + case 193 /* PropertyAccessExpression */: // Could be best encoded as though an export specifier or as though an export assignment // If name is default or export=, do an export assignment // Otherwise do an export specifier @@ -37886,10 +38152,6 @@ var ts; serializeExportSpecifier(localName, targetName); } break; - case 193 /* PropertyAccessExpression */: - // A PAE alias is _always_ going to exist as an append to a top-level export, where our top level - // handling should always be sufficient to encode the export action itself - break; default: return ts.Debug.failBadSyntaxKind(node, "Unhandled alias declaration kind in symbol serializer!"); } @@ -37913,7 +38175,8 @@ var ts; var aliasDecl = symbol.declarations && getDeclarationOfAliasSymbol(symbol); // serialize what the alias points to, preserve the declaration's initializer var target = aliasDecl && getTargetOfAliasDeclaration(aliasDecl, /*dontRecursivelyResolve*/ true); - if (target) { + // If the target resolves and resolves to a thing defined in this file, emit as an alias, otherwise emit as a const + if (target && ts.length(target.declarations) && ts.some(target.declarations, function (d) { return ts.getSourceFileOfNode(d) === ts.getSourceFileOfNode(enclosingDeclaration); })) { // In case `target` refers to a namespace member, look at the declaration and serialize the leftmost symbol in it // eg, `namespace A { export class B {} }; exports = A.B;` // Technically, this is all that's required in the case where the assignment is an entity name expression @@ -37988,6 +38251,7 @@ var ts; return ts.getObjectFlags(typeToSerialize) & (16 /* Anonymous */ | 32 /* Mapped */) && !getIndexInfoOfType(typeToSerialize, 0 /* String */) && !getIndexInfoOfType(typeToSerialize, 1 /* Number */) && + !!(ts.length(getPropertiesOfType(typeToSerialize)) || ts.length(getSignaturesOfType(typeToSerialize, 0 /* Call */))) && !ts.length(getSignaturesOfType(typeToSerialize, 1 /* Construct */)) && // TODO: could probably serialize as function + ns + class, now that that's OK !getDeclarationWithTypeAnnotation(hostSymbol) && !(typeToSerialize.symbol && ts.some(typeToSerialize.symbol.declarations, function (d) { return ts.getSourceFileOfNode(d) !== ctxSrc; })) && @@ -38131,7 +38395,7 @@ var ts; return ts.updateImportTypeNode(node, ts.updateLiteralTypeNode(node.argument, rewriteModuleSpecifier(node, node.argument.literal)), node.qualifier, ts.visitNodes(node.typeArguments, visitExistingNodeTreeSymbols, ts.isTypeNode), node.isTypeOf); } if (ts.isEntityName(node) || ts.isEntityNameExpression(node)) { - var leftmost = getFirstIdentifier(node); + var leftmost = ts.getFirstIdentifier(node); var sym = resolveEntityName(leftmost, 67108863 /* All */, /*ignoreErrors*/ true, /*dontResolveALias*/ true); if (sym) { includePrivateSymbol(sym); @@ -38261,11 +38525,8 @@ var ts; return context.remappedSymbolNames.get("" + getSymbolId(symbol)); } } - if (input === "default" /* Default */) { - input = "_default"; - } - else if (input === "export=" /* ExportEquals */) { - input = "_exports"; + if (symbol) { + input = getNameCandidateWorker(symbol, input); } var i = 0; var original = input; @@ -38279,17 +38540,28 @@ var ts; } return input; } - function getInternalSymbolName(symbol, localName) { - if (context.remappedSymbolNames.has("" + getSymbolId(symbol))) { - return context.remappedSymbolNames.get("" + getSymbolId(symbol)); - } + function getNameCandidateWorker(symbol, localName) { if (localName === "default" /* Default */ || localName === "__class" /* Class */ || localName === "__function" /* Function */) { var flags = context.flags; context.flags |= 16777216 /* InInitialEntityName */; var nameCandidate = getNameOfSymbolAsWritten(symbol, context); context.flags = flags; - localName = ts.isIdentifierText(nameCandidate, languageVersion) && !ts.isStringANonContextualKeyword(nameCandidate) ? nameCandidate : getUnusedName("_default", symbol); + localName = nameCandidate.length > 0 && ts.isSingleOrDoubleQuote(nameCandidate.charCodeAt(0)) ? ts.stripQuotes(nameCandidate) : nameCandidate; } + if (localName === "default" /* Default */) { + localName = "_default"; + } + else if (localName === "export=" /* ExportEquals */) { + localName = "_exports"; + } + localName = ts.isIdentifierText(localName, languageVersion) && !ts.isStringANonContextualKeyword(localName) ? localName : "_" + localName.replace(/[^a-zA-Z0-9]/g, "_"); + return localName; + } + function getInternalSymbolName(symbol, localName) { + if (context.remappedSymbolNames.has("" + getSymbolId(symbol))) { + return context.remappedSymbolNames.get("" + getSymbolId(symbol)); + } + localName = getNameCandidateWorker(symbol, localName); // The result of this is going to be used as the symbol's name - lock it in, so `getUnusedName` will also pick it up context.remappedSymbolNames.set("" + getSymbolId(symbol), localName); return localName; @@ -38554,7 +38826,7 @@ var ts; if (ts.isInternalModuleImportEqualsDeclaration(declaration)) { // Add the referenced top container visible var internalModuleReference = declaration.moduleReference; - var firstIdentifier = getFirstIdentifier(internalModuleReference); + var firstIdentifier = ts.getFirstIdentifier(internalModuleReference); var importSymbol = resolveName(declaration, firstIdentifier.escapedText, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, undefined, undefined, /*isUse*/ false); var id = importSymbol && "" + getSymbolId(importSymbol); if (importSymbol && !visited.has(id)) { @@ -38618,6 +38890,8 @@ var ts; return !!target.immediateBaseConstraint; case 6 /* JSDocTypeReference */: return !!getSymbolLinks(target).resolvedJSDocType; + case 7 /* ResolvedTypeArguments */: + return !!target.resolvedTypeArguments; } return ts.Debug.assertNever(propertyName); } @@ -38703,7 +38977,9 @@ var ts; } var stringIndexInfo = getIndexInfoOfType(source, 0 /* String */); var numberIndexInfo = getIndexInfoOfType(source, 1 /* Number */); - return createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, stringIndexInfo, numberIndexInfo); + var result = createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, stringIndexInfo, numberIndexInfo); + result.objectFlags |= 131072 /* ObjectRestType */; + return result; } // Determine the control flow type associated with a destructuring declaration or assignment. The following // forms of destructuring are possible: @@ -39089,23 +39365,23 @@ var ts; kind === 2 /* ModuleExports */ && symbol.escapedName === "export=" /* ExportEquals */) { var exportedType_1 = resolveStructuredTypeMembers(type); - var members_3 = ts.createSymbolTable(); - ts.copyEntries(exportedType_1.members, members_3); + var members_4 = ts.createSymbolTable(); + ts.copyEntries(exportedType_1.members, members_4); if (resolvedSymbol && !resolvedSymbol.exports) { resolvedSymbol.exports = ts.createSymbolTable(); } (resolvedSymbol || symbol).exports.forEach(function (s, name) { - if (members_3.has(name)) { + if (members_4.has(name)) { var exportedMember = exportedType_1.members.get(name); var union = createSymbol(s.flags | exportedMember.flags, name); union.type = getUnionType([getTypeOfSymbol(s), getTypeOfSymbol(exportedMember)]); - members_3.set(name, union); + members_4.set(name, union); } else { - members_3.set(name, s); + members_4.set(name, s); } }); - var result = createAnonymousType(exportedType_1.symbol, members_3, exportedType_1.callSignatures, exportedType_1.constructSignatures, exportedType_1.stringIndexInfo, exportedType_1.numberIndexInfo); + var result = createAnonymousType(exportedType_1.symbol, members_4, exportedType_1.callSignatures, exportedType_1.constructSignatures, exportedType_1.stringIndexInfo, exportedType_1.numberIndexInfo); result.objectFlags |= (ts.getObjectFlags(type) & 16384 /* JSLiteral */); // Propagate JSLiteral flag return result; } @@ -39165,7 +39441,7 @@ var ts; function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) { var members = ts.createSymbolTable(); var stringIndexInfo; - var objectFlags = 128 /* ObjectLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */; + var objectFlags = 128 /* ObjectLiteral */ | 1048576 /* ContainsObjectOrArrayLiteral */; ts.forEach(pattern.elements, function (e) { var name = e.propertyName || e.name; if (e.dotDotDotToken) { @@ -39305,16 +39581,12 @@ var ts; if (!declaration.statements.length) { return emptyObjectType; } - var type_1 = getWidenedLiteralType(checkExpression(declaration.statements[0].expression)); - if (type_1.flags & 524288 /* Object */) { - return getRegularTypeOfObjectLiteral(type_1); - } - return type_1; + return getWidenedType(getWidenedLiteralType(checkExpression(declaration.statements[0].expression))); } // Handle variable, parameter or property if (!pushTypeResolution(symbol, 0 /* Type */)) { // Symbol is property of some kind that is merged with something - should use `getTypeOfFuncClassEnumModule` and not `getTypeOfVariableOrParameterOrProperty` - if (symbol.flags & 512 /* ValueModule */) { + if (symbol.flags & 512 /* ValueModule */ && !(symbol.flags & 67108864 /* Assignment */)) { return getTypeOfFuncClassEnumModule(symbol); } return reportCircularityError(symbol); @@ -39382,7 +39654,7 @@ var ts; } if (!popTypeResolution()) { // Symbol is property of some kind that is merged with something - should use `getTypeOfFuncClassEnumModule` and not `getTypeOfVariableOrParameterOrProperty` - if (symbol.flags & 512 /* ValueModule */) { + if (symbol.flags & 512 /* ValueModule */ && !(symbol.flags & 67108864 /* Assignment */)) { return getTypeOfFuncClassEnumModule(symbol); } return reportCircularityError(symbol); @@ -39465,7 +39737,9 @@ var ts; } else { ts.Debug.assert(!!getter, "there must exist a getter as we are current checking either setter or getter in this function"); - errorOrSuggestion(noImplicitAny, getter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation, symbolToString(symbol)); + if (!isPrivateWithinAmbient(getter)) { + errorOrSuggestion(noImplicitAny, getter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation, symbolToString(symbol)); + } } return anyType; } @@ -39511,11 +39785,11 @@ var ts; return errorType; } var exportEquals = getMergedSymbol(symbol.exports.get("export=" /* ExportEquals */)); - var type_2 = getWidenedTypeForAssignmentDeclaration(exportEquals, exportEquals === resolvedModule ? undefined : resolvedModule); + var type_1 = getWidenedTypeForAssignmentDeclaration(exportEquals, exportEquals === resolvedModule ? undefined : resolvedModule); if (!popTypeResolution()) { return reportCircularityError(symbol); } - return type_2; + return type_1; } } var type = createObjectType(16 /* Anonymous */, symbol); @@ -39701,6 +39975,7 @@ var ts; // The outer type parameters are those defined by enclosing generic classes, methods, or functions. function getOuterTypeParametersOfClassOrInterface(symbol) { var declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 245 /* InterfaceDeclaration */); + ts.Debug.assert(!!declaration, "Class was missing valueDeclaration -OR- non-class had no interface declarations"); return getOuterTypeParameters(declaration); } // The local type parameters are the combined set of type parameters from all declarations of the class, @@ -39731,7 +40006,7 @@ var ts; var signatures = getSignaturesOfType(type, 1 /* Construct */); if (signatures.length === 1) { var s = signatures[0]; - return !s.typeParameters && s.parameters.length === 1 && s.hasRestParameter && getElementTypeOfArrayType(getTypeOfParameter(s.parameters[0])) === anyType; + return !s.typeParameters && s.parameters.length === 1 && signatureHasRestParameter(s) && getElementTypeOfArrayType(getTypeOfParameter(s.parameters[0])) === anyType; } return false; } @@ -40438,8 +40713,8 @@ var ts; var decl = _a[_i]; var members = ts.getMembersOfDeclaration(decl); if (members) { - for (var _b = 0, members_4 = members; _b < members_4.length; _b++) { - var member = members_4[_b]; + for (var _b = 0, members_5 = members; _b < members_5.length; _b++) { + var member = members_5[_b]; if (isStatic === ts.hasStaticModifier(member) && hasLateBindableName(member)) { lateBindMember(symbol, earlySymbols, lateSymbols, member); } @@ -40568,8 +40843,8 @@ var ts; var paddedTypeArguments = typeArguments.length === typeParameters.length ? typeArguments : ts.concatenate(typeArguments, [type]); resolveObjectTypeMembers(type, source, typeParameters, paddedTypeArguments); } - function createSignature(declaration, typeParameters, thisParameter, parameters, resolvedReturnType, resolvedTypePredicate, minArgumentCount, hasRestParameter, hasLiteralTypes) { - var sig = new Signature(checker); + function createSignature(declaration, typeParameters, thisParameter, parameters, resolvedReturnType, resolvedTypePredicate, minArgumentCount, flags) { + var sig = new Signature(checker, flags); sig.declaration = declaration; sig.typeParameters = typeParameters; sig.parameters = parameters; @@ -40577,15 +40852,13 @@ var ts; sig.resolvedReturnType = resolvedReturnType; sig.resolvedTypePredicate = resolvedTypePredicate; sig.minArgumentCount = minArgumentCount; - sig.hasRestParameter = hasRestParameter; - sig.hasLiteralTypes = hasLiteralTypes; sig.target = undefined; sig.mapper = undefined; return sig; } function cloneSignature(sig) { var result = createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, /*resolvedReturnType*/ undefined, - /*resolvedTypePredicate*/ undefined, sig.minArgumentCount, sig.hasRestParameter, sig.hasLiteralTypes); + /*resolvedTypePredicate*/ undefined, sig.minArgumentCount, sig.flags & 3 /* PropagatingFlags */); result.target = sig.target; result.mapper = sig.mapper; return result; @@ -40597,13 +40870,25 @@ var ts; result.mapper = undefined; return result; } - function createOptionalCallSignature(signature) { + function getOptionalCallSignature(signature, callChainFlags) { + if ((signature.flags & 12 /* CallChainFlags */) === callChainFlags) { + return signature; + } + if (!signature.optionalCallSignatureCache) { + signature.optionalCallSignatureCache = {}; + } + var key = callChainFlags === 4 /* IsInnerCallChain */ ? "inner" : "outer"; + return signature.optionalCallSignatureCache[key] + || (signature.optionalCallSignatureCache[key] = createOptionalCallSignature(signature, callChainFlags)); + } + function createOptionalCallSignature(signature, callChainFlags) { + ts.Debug.assert(callChainFlags === 4 /* IsInnerCallChain */ || callChainFlags === 8 /* IsOuterCallChain */, "An optional call signature can either be for an inner call chain or an outer call chain, but not both."); var result = cloneSignature(signature); - result.isOptionalCall = true; + result.flags |= callChainFlags; return result; } function getExpandedParameters(sig) { - if (sig.hasRestParameter) { + if (signatureHasRestParameter(sig)) { var restIndex_1 = sig.parameters.length - 1; var restParameter = sig.parameters[restIndex_1]; var restType = getTypeOfSymbol(restParameter); @@ -40628,7 +40913,7 @@ var ts; var baseConstructorType = getBaseConstructorTypeOfClass(classType); var baseSignatures = getSignaturesOfType(baseConstructorType, 1 /* Construct */); if (baseSignatures.length === 0) { - return [createSignature(undefined, classType.localTypeParameters, undefined, ts.emptyArray, classType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false)]; + return [createSignature(undefined, classType.localTypeParameters, undefined, ts.emptyArray, classType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */)]; } var baseTypeNode = getBaseTypeNodeOfClass(classType); var isJavaScript = ts.isInJSFile(baseTypeNode); @@ -40792,11 +41077,9 @@ var ts; var params = combineUnionParameters(left, right); var thisParam = combineUnionThisParam(left.thisParameter, right.thisParameter); var minArgCount = Math.max(left.minArgumentCount, right.minArgumentCount); - var hasRestParam = left.hasRestParameter || right.hasRestParameter; - var hasLiteralTypes = left.hasLiteralTypes || right.hasLiteralTypes; var result = createSignature(declaration, left.typeParameters || right.typeParameters, thisParam, params, /*resolvedReturnType*/ undefined, - /*resolvedTypePredicate*/ undefined, minArgCount, hasRestParam, hasLiteralTypes); + /*resolvedTypePredicate*/ undefined, minArgCount, (left.flags | right.flags) & 3 /* PropagatingFlags */); result.unionSignatures = ts.concatenate(left.unionSignatures || [left], [right]); return result; } @@ -40969,7 +41252,7 @@ var ts; var constructSignatures = symbol.members ? getSignaturesOfSymbol(symbol.members.get("__constructor" /* Constructor */)) : ts.emptyArray; if (symbol.flags & 16 /* Function */) { constructSignatures = ts.addRange(constructSignatures.slice(), ts.mapDefined(type.callSignatures, function (sig) { return isJSConstructor(sig.declaration) ? - createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, classType_1, /*resolvedTypePredicate*/ undefined, sig.minArgumentCount, sig.hasRestParameter, sig.hasLiteralTypes) : + createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, classType_1, /*resolvedTypePredicate*/ undefined, sig.minArgumentCount, sig.flags & 3 /* PropagatingFlags */) : undefined; })); } if (!constructSignatures.length) { @@ -41475,8 +41758,8 @@ var ts; var types = t.types; var baseTypes = []; for (var _i = 0, types_6 = types; _i < types_6.length; _i++) { - var type_3 = types_6[_i]; - var baseType = getBaseConstraint(type_3); + var type_2 = types_6[_i]; + var baseType = getBaseConstraint(type_2); if (baseType) { baseTypes.push(baseType); } @@ -41909,7 +42192,7 @@ var ts; var links = getNodeLinks(declaration); if (!links.resolvedSignature) { var parameters = []; - var hasLiteralTypes = false; + var flags = 0 /* None */; var minArgumentCount = 0; var thisParameter = void 0; var hasThisParameter = false; @@ -41940,7 +42223,7 @@ var ts; parameters.push(paramSymbol); } if (type && type.kind === 186 /* LiteralType */) { - hasLiteralTypes = true; + flags |= 2 /* HasLiteralTypes */; } // Record a new minimum argument count if this is not an optional parameter var isOptionalParameter_1 = isOptionalJSDocParameterTag(param) || @@ -41966,9 +42249,11 @@ var ts; getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : undefined; var typeParameters = classType ? classType.localTypeParameters : getTypeParametersFromDeclaration(declaration); - var hasRestLikeParameter = ts.hasRestParameter(declaration) || ts.isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters); + if (ts.hasRestParameter(declaration) || ts.isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters)) { + flags |= 1 /* HasRestParameter */; + } links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, - /*resolvedReturnType*/ undefined, /*resolvedTypePredicate*/ undefined, minArgumentCount, hasRestLikeParameter, hasLiteralTypes); + /*resolvedReturnType*/ undefined, /*resolvedTypePredicate*/ undefined, minArgumentCount, flags); } return links.resolvedSignature; } @@ -42111,8 +42396,11 @@ var ts; signature.unionSignatures ? getUnionType(ts.map(signature.unionSignatures, getReturnTypeOfSignature), 2 /* Subtype */) : getReturnTypeFromAnnotation(signature.declaration) || (ts.nodeIsMissing(signature.declaration.body) ? anyType : getReturnTypeFromBody(signature.declaration)); - if (signature.isOptionalCall) { - type = propagateOptionalTypeMarker(type, /*wasOptional*/ true); + if (signature.flags & 4 /* IsInnerCallChain */) { + type = addOptionalTypeMarker(type); + } + else if (signature.flags & 8 /* IsOuterCallChain */) { + type = getOptionalType(type); } if (!popTypeResolution()) { if (signature.declaration) { @@ -42168,7 +42456,7 @@ var ts; return tryGetRestTypeOfSignature(signature) || anyType; } function tryGetRestTypeOfSignature(signature) { - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var sigRestType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); var restType = isTupleType(sigRestType) ? getRestTypeOfTupleType(sigRestType) : sigRestType; return restType && getIndexTypeOfType(restType, 1 /* Number */); @@ -42385,7 +42673,7 @@ var ts; result |= ts.getObjectFlags(type); } } - return result & 1835008 /* PropagatingFlags */; + return result & 3670016 /* PropagatingFlags */; } function createTypeReference(target, typeArguments) { var id = getTypeListId(typeArguments); @@ -42419,13 +42707,25 @@ var ts; return type; } function getTypeArguments(type) { + var _a, _b; if (!type.resolvedTypeArguments) { + if (!pushTypeResolution(type, 7 /* ResolvedTypeArguments */)) { + return ((_a = type.target.localTypeParameters) === null || _a === void 0 ? void 0 : _a.map(function () { return errorType; })) || ts.emptyArray; + } var node = type.node; var typeArguments = !node ? ts.emptyArray : node.kind === 168 /* TypeReference */ ? ts.concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments(node, type.target.localTypeParameters)) : node.kind === 173 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : ts.map(node.elementTypes, getTypeFromTypeNode); - type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments; + if (popTypeResolution()) { + type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments; + } + else { + type.resolvedTypeArguments = ((_b = type.target.localTypeParameters) === null || _b === void 0 ? void 0 : _b.map(function () { return errorType; })) || ts.emptyArray; + error(type.node || currentNode, type.target.symbol + ? ts.Diagnostics.Type_arguments_for_0_circularly_reference_themselves + : ts.Diagnostics.Tuple_type_arguments_circularly_reference_themselves, type.target.symbol && symbolToString(type.target.symbol)); + } } return type.resolvedTypeArguments; } @@ -42542,7 +42842,7 @@ var ts; errorType; } if (symbol.flags & 111551 /* Value */ && isJSDocTypeReference(node)) { - var jsdocType = getTypeFromJSAlias(node, symbol); + var jsdocType = getTypeFromJSDocValueReference(node, symbol); if (jsdocType) { return jsdocType; } @@ -42555,18 +42855,30 @@ var ts; return errorType; } /** - * A JSdoc TypeReference may be to a value imported from commonjs. - * These should really be aliases, but this special-case code fakes alias resolution - * by producing a type from a value. + * A JSdoc TypeReference may be to a value, but resolve it as a type anyway. + * Note: If the value is imported from commonjs, it should really be an alias, + * but this function's special-case code fakes alias resolution as well. */ - function getTypeFromJSAlias(node, symbol) { + function getTypeFromJSDocValueReference(node, symbol) { var valueType = getTypeOfSymbol(symbol); - var typeType = valueType.symbol && - valueType.symbol !== symbol && // Make sure this is a commonjs export by checking that symbol -> type -> symbol doesn't roundtrip. - getTypeReferenceType(node, valueType.symbol); - if (typeType) { - return getSymbolLinks(symbol).resolvedJSDocType = typeType; + var typeType = valueType; + if (symbol.valueDeclaration) { + var decl = ts.getRootDeclaration(symbol.valueDeclaration); + var isRequireAlias = false; + if (ts.isVariableDeclaration(decl) && decl.initializer) { + var expr = decl.initializer; + // skip past entity names, eg `require("x").a.b.c` + while (ts.isPropertyAccessExpression(expr)) { + expr = expr.expression; + } + isRequireAlias = ts.isCallExpression(expr) && ts.isRequireCall(expr, /*requireStringLiteralLikeArgument*/ true) && !!valueType.symbol; + } + var isImportTypeWithQualifier = node.kind === 187 /* ImportType */ && node.qualifier; + if (isRequireAlias || isImportTypeWithQualifier) { + typeType = getTypeReferenceType(node, valueType.symbol); + } } + return getSymbolLinks(symbol).resolvedJSDocType = typeType; } function getSubstitutionType(typeVariable, substitute) { if (substitute.flags & 3 /* AnyOrUnknown */ || substitute === typeVariable) { @@ -42995,7 +43307,7 @@ var ts; if (type === wildcardType) includes |= 4194304 /* IncludesWildcard */; if (!strictNullChecks && flags & 98304 /* Nullable */) { - if (!(ts.getObjectFlags(type) & 262144 /* ContainsWideningType */)) + if (!(ts.getObjectFlags(type) & 524288 /* ContainsWideningType */)) includes |= 2097152 /* IncludesNonWideningType */; } else { @@ -43122,7 +43434,7 @@ var ts; neverType; } } - return getUnionTypeFromSortedList(typeSet, includes & 66994211 /* NotPrimitiveUnion */ ? 0 : 131072 /* PrimitiveUnion */, aliasSymbol, aliasTypeArguments); + return getUnionTypeFromSortedList(typeSet, includes & 66994211 /* NotPrimitiveUnion */ ? 0 : 262144 /* PrimitiveUnion */, aliasSymbol, aliasTypeArguments); } function getUnionTypePredicate(signatures) { var first; @@ -43272,7 +43584,7 @@ var ts; // other unions and return true. Otherwise, do nothing and return false. function intersectUnionsOfPrimitiveTypes(types) { var unionTypes; - var index = ts.findIndex(types, function (t) { return !!(ts.getObjectFlags(t) & 131072 /* PrimitiveUnion */); }); + var index = ts.findIndex(types, function (t) { return !!(ts.getObjectFlags(t) & 262144 /* PrimitiveUnion */); }); if (index < 0) { return false; } @@ -43281,7 +43593,7 @@ var ts; // the unionTypes array. while (i < types.length) { var t = types[i]; - if (ts.getObjectFlags(t) & 131072 /* PrimitiveUnion */) { + if (ts.getObjectFlags(t) & 262144 /* PrimitiveUnion */) { (unionTypes || (unionTypes = [types[index]])).push(t); ts.orderedRemoveItemAt(types, i); } @@ -43310,7 +43622,7 @@ var ts; } } // Finally replace the first union with the result - types[index] = getUnionTypeFromSortedList(result, 131072 /* PrimitiveUnion */); + types[index] = getUnionTypeFromSortedList(result, 262144 /* PrimitiveUnion */); return true; } function createIntersectionType(types, aliasSymbol, aliasTypeArguments) { @@ -44107,7 +44419,7 @@ var ts; } function getAliasSymbolForTypeNode(node) { var host = node.parent; - while (ts.isParenthesizedTypeNode(host)) { + while (ts.isParenthesizedTypeNode(host) || ts.isTypeOperatorNode(host) && host.operator === 137 /* ReadonlyKeyword */) { host = host.parent; } return ts.isTypeAlias(host) ? getSymbolOfNode(host) : undefined; @@ -44208,7 +44520,7 @@ var ts; } } var spread = createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, getIndexInfoWithReadonly(stringIndexInfo, readonly), getIndexInfoWithReadonly(numberIndexInfo, readonly)); - spread.objectFlags |= 128 /* ObjectLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */ | 1024 /* ContainsSpread */ | objectFlags; + spread.objectFlags |= 128 /* ObjectLiteral */ | 1048576 /* ContainsObjectOrArrayLiteral */ | 1024 /* ContainsSpread */ | objectFlags; return spread; } /** We approximate own properties as non-methods plus methods that are inside the object literal */ @@ -44522,7 +44834,7 @@ var ts; // See GH#17600. var result = createSignature(signature.declaration, freshTypeParameters, signature.thisParameter && instantiateSymbol(signature.thisParameter, mapper), instantiateList(signature.parameters, mapper, instantiateSymbol), /*resolvedReturnType*/ undefined, - /*resolvedTypePredicate*/ undefined, signature.minArgumentCount, signature.hasRestParameter, signature.hasLiteralTypes); + /*resolvedTypePredicate*/ undefined, signature.minArgumentCount, signature.flags & 3 /* PropagatingFlags */); result.target = signature; result.mapper = mapper; return result; @@ -45403,20 +45715,20 @@ var ts; } function isSignatureAssignableTo(source, target, ignoreReturnTypes) { return compareSignaturesRelated(source, target, 0 /* None */, ignoreReturnTypes, /*reportErrors*/ false, - /*errorReporter*/ undefined, /*errorReporter*/ undefined, compareTypesAssignable) !== 0 /* False */; + /*errorReporter*/ undefined, /*errorReporter*/ undefined, compareTypesAssignable, /*reportUnreliableMarkers*/ undefined) !== 0 /* False */; } /** * Returns true if `s` is `(...args: any[]) => any` or `(this: any, ...args: any[]) => any` */ function isAnySignature(s) { return !s.typeParameters && (!s.thisParameter || isTypeAny(getTypeOfParameter(s.thisParameter))) && s.parameters.length === 1 && - s.hasRestParameter && (getTypeOfParameter(s.parameters[0]) === anyArrayType || isTypeAny(getTypeOfParameter(s.parameters[0]))) && + signatureHasRestParameter(s) && (getTypeOfParameter(s.parameters[0]) === anyArrayType || isTypeAny(getTypeOfParameter(s.parameters[0]))) && isTypeAny(getReturnTypeOfSignature(s)); } /** * See signatureRelatedTo, compareSignaturesIdentical */ - function compareSignaturesRelated(source, target, callbackCheck, ignoreReturnTypes, reportErrors, errorReporter, incompatibleErrorReporter, compareTypes) { + function compareSignaturesRelated(source, target, callbackCheck, ignoreReturnTypes, reportErrors, errorReporter, incompatibleErrorReporter, compareTypes, reportUnreliableMarkers) { // TODO (drosen): De-duplicate code between related functions. if (source === target) { return -1 /* True */; @@ -45435,6 +45747,9 @@ var ts; var sourceCount = getParameterCount(source); var sourceRestType = getNonArrayRestType(source); var targetRestType = getNonArrayRestType(target); + if (sourceRestType || targetRestType) { + void instantiateType(sourceRestType || targetRestType, reportUnreliableMarkers); + } if (sourceRestType && targetRestType && sourceCount !== targetCount) { // We're not able to relate misaligned complex rest parameters return 0 /* False */; @@ -45478,7 +45793,7 @@ var ts; (getFalsyFlags(sourceType) & 98304 /* Nullable */) === (getFalsyFlags(targetType) & 98304 /* Nullable */); var related = callbacks ? // TODO: GH#18217 It will work if they're both `undefined`, but not if only one is - compareSignaturesRelated(targetSig, sourceSig, strictVariance ? 2 /* Strict */ : 1 /* Bivariant */, /*ignoreReturnTypes*/ false, reportErrors, errorReporter, incompatibleErrorReporter, compareTypes) : + compareSignaturesRelated(targetSig, sourceSig, strictVariance ? 2 /* Strict */ : 1 /* Bivariant */, /*ignoreReturnTypes*/ false, reportErrors, errorReporter, incompatibleErrorReporter, compareTypes, reportUnreliableMarkers) : !callbackCheck && !strictVariance && compareTypes(sourceType, targetType, /*reportErrors*/ false) || compareTypes(targetType, sourceType, reportErrors); if (!related) { if (reportErrors) { @@ -45492,13 +45807,13 @@ var ts; // If a signature resolution is already in-flight, skip issuing a circularity error // here and just use the `any` type directly var targetReturnType = isResolvingReturnTypeOfSignature(target) ? anyType - : target.declaration && isJSConstructor(target.declaration) ? getDeclaredTypeOfClassOrInterface(target.declaration.symbol) + : target.declaration && isJSConstructor(target.declaration) ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(target.declaration.symbol)) : getReturnTypeOfSignature(target); if (targetReturnType === voidType) { return result; } var sourceReturnType = isResolvingReturnTypeOfSignature(source) ? anyType - : source.declaration && isJSConstructor(source.declaration) ? getDeclaredTypeOfClassOrInterface(source.declaration.symbol) + : source.declaration && isJSConstructor(source.declaration) ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(source.declaration.symbol)) : getReturnTypeOfSignature(source); // The following block preserves behavior forbidding boolean returning functions from being assignable to type guard returning functions var targetTypePredicate = getTypePredicateOfSignature(target); @@ -45685,7 +46000,7 @@ var ts; return true; } if (source.flags & 524288 /* Object */ && target.flags & 524288 /* Object */) { - var related = relation.get(getRelationKey(source, target, relation)); + var related = relation.get(getRelationKey(source, target, /*isIntersectionConstituent*/ false, relation)); if (related !== undefined) { return !!(related & 1 /* Succeeded */); } @@ -46056,7 +46371,7 @@ var ts; // and we need to handle "each" relations before "some" relations for the same kind of type. if (source.flags & 1048576 /* Union */) { result = relation === comparableRelation ? - someTypeRelatedToType(source, target, reportErrors && !(source.flags & 131068 /* Primitive */), isIntersectionConstituent) : + someTypeRelatedToType(source, target, reportErrors && !(source.flags & 131068 /* Primitive */)) : eachTypeRelatedToType(source, target, reportErrors && !(source.flags & 131068 /* Primitive */)); } else { @@ -46094,7 +46409,7 @@ var ts; // // - For a primitive type or type parameter (such as 'number = A & B') there is no point in // breaking the intersection apart. - result = someTypeRelatedToType(source, target, /*reportErrors*/ false, /*isIntersectionConstituent*/ true); + result = someTypeRelatedToType(source, target, /*reportErrors*/ false); } if (!result && (source.flags & 66846720 /* StructuredOrInstantiable */ || target.flags & 66846720 /* StructuredOrInstantiable */)) { if (result = recursiveTypeRelatedTo(source, target, reportErrors, isIntersectionConstituent)) { @@ -46207,7 +46522,7 @@ var ts; // JsxAttributes has an object-literal flag and undergo same type-assignablity check as normal object-literal. // However, using an object-literal error message will be very confusing to the users so we give different a message. // TODO: Spelling suggestions for excess jsx attributes (needs new diagnostic messages) - if (prop.valueDeclaration && ts.isJsxAttribute(prop.valueDeclaration)) { + if (prop.valueDeclaration && ts.isJsxAttribute(prop.valueDeclaration) && ts.getSourceFileOfNode(errorNode) === ts.getSourceFileOfNode(prop.valueDeclaration.name)) { // Note that extraneous children (as in `extra`) don't pass this check, // since `children` is a SyntaxKind.PropertySignature instead of a SyntaxKind.JsxAttribute. errorNode = prop.valueDeclaration.name; @@ -46218,7 +46533,7 @@ var ts; // use the property's value declaration if the property is assigned inside the literal itself var objectLiteralDeclaration_1 = source.symbol && ts.firstOrUndefined(source.symbol.declarations); var suggestion = void 0; - if (prop.valueDeclaration && ts.findAncestor(prop.valueDeclaration, function (d) { return d === objectLiteralDeclaration_1; })) { + if (prop.valueDeclaration && ts.findAncestor(prop.valueDeclaration, function (d) { return d === objectLiteralDeclaration_1; }) && ts.getSourceFileOfNode(objectLiteralDeclaration_1) === ts.getSourceFileOfNode(errorNode)) { var propDeclaration = prop.valueDeclaration; ts.Debug.assertNode(propDeclaration, ts.isObjectLiteralElementLike); errorNode = propDeclaration; @@ -46378,14 +46693,14 @@ var ts; } return result; } - function someTypeRelatedToType(source, target, reportErrors, isIntersectionConstituent) { + function someTypeRelatedToType(source, target, reportErrors) { var sourceTypes = source.types; if (source.flags & 1048576 /* Union */ && containsType(sourceTypes, target)) { return -1 /* True */; } var len = sourceTypes.length; for (var i = 0; i < len; i++) { - var related = isRelatedTo(sourceTypes[i], target, reportErrors && i === len - 1, /*headMessage*/ undefined, isIntersectionConstituent); + var related = isRelatedTo(sourceTypes[i], target, reportErrors && i === len - 1); if (related) { return related; } @@ -46473,7 +46788,7 @@ var ts; if (overflow) { return 0 /* False */; } - var id = getRelationKey(source, target, relation); + var id = getRelationKey(source, target, isIntersectionConstituent, relation); var entry = relation.get(id); if (entry !== undefined) { if (reportErrors && entry & 2 /* Failed */ && !(entry & 4 /* Reported */)) { @@ -47367,7 +47682,7 @@ var ts; * See signatureAssignableTo, compareSignaturesIdentical */ function signatureRelatedTo(source, target, erase, reportErrors, incompatibleReporter) { - return compareSignaturesRelated(erase ? getErasedSignature(source) : source, erase ? getErasedSignature(target) : target, 0 /* None */, /*ignoreReturnTypes*/ false, reportErrors, reportError, incompatibleReporter, isRelatedTo); + return compareSignaturesRelated(erase ? getErasedSignature(source) : source, erase ? getErasedSignature(target) : target, 0 /* None */, /*ignoreReturnTypes*/ false, reportErrors, reportError, incompatibleReporter, isRelatedTo, reportUnreliableMarkers); } function signaturesIdenticalTo(source, target, kind) { var sourceSignatures = getSignaturesOfType(source, kind); @@ -47659,17 +47974,18 @@ var ts; * To improve caching, the relation key for two generic types uses the target's id plus ids of the type parameters. * For other cases, the types ids are used. */ - function getRelationKey(source, target, relation) { + function getRelationKey(source, target, isIntersectionConstituent, relation) { if (relation === identityRelation && source.id > target.id) { var temp = source; source = target; target = temp; } + var intersection = isIntersectionConstituent ? "&" : ""; if (isTypeReferenceWithGenericArguments(source) && isTypeReferenceWithGenericArguments(target)) { var typeParameters = []; - return getTypeReferenceId(source, typeParameters) + "," + getTypeReferenceId(target, typeParameters); + return getTypeReferenceId(source, typeParameters) + "," + getTypeReferenceId(target, typeParameters) + intersection; } - return source.id + "," + target.id; + return source.id + "," + target.id + intersection; } // Invoke the callback for each underlying property symbol of the given symbol and return the first // value that isn't undefined. @@ -47720,7 +48036,7 @@ var ts; // for finite but deeply expanding indexed accesses (eg, for `Q[P1][P2][P3][P4][P5]`). function isDeeplyNestedType(type, stack, depth) { // We track all object types that have an associated symbol (representing the origin of the type) - if (depth >= 5 && type.flags & 524288 /* Object */) { + if (depth >= 5 && type.flags & 524288 /* Object */ && !isObjectOrArrayLiteralType(type)) { var symbol = type.symbol; if (symbol) { var count = 0; @@ -48095,37 +48411,19 @@ var ts; function addOptionalTypeMarker(type) { return strictNullChecks ? getUnionType([type, optionalType]) : type; } + function isNotOptionalTypeMarker(type) { + return type !== optionalType; + } function removeOptionalTypeMarker(type) { - return strictNullChecks ? filterType(type, function (t) { return t !== optionalType; }) : type; + return strictNullChecks ? filterType(type, isNotOptionalTypeMarker) : type; } - function propagateOptionalTypeMarker(type, wasOptional) { - return wasOptional ? addOptionalTypeMarker(type) : type; + function propagateOptionalTypeMarker(type, node, wasOptional) { + return wasOptional ? ts.isOutermostOptionalChain(node) ? getOptionalType(type) : addOptionalTypeMarker(type) : type; } - function createPooledOptionalTypeResult(isOptional, type) { - pooledOptionalTypeResult.isOptional = isOptional; - pooledOptionalTypeResult.type = type; - return pooledOptionalTypeResult; - } - function checkOptionalExpression(parent, expression, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic) { - var isOptional = false; - var type = checkExpression(expression); - if (ts.isOptionalChain(parent)) { - if (parent.questionDotToken) { - // If we have a questionDotToken then we are an OptionalExpression and should remove `null` and - // `undefined` from the type and add the optionalType to the result, if needed. - isOptional = isNullableType(type); - return createPooledOptionalTypeResult(isOptional, isOptional ? getNonNullableType(type) : type); - } - // If we do not have a questionDotToken, then we are an OptionalChain and we remove the optionalType and - // indicate whether we need to add optionalType back into the result. - var nonOptionalType = removeOptionalTypeMarker(type); - if (nonOptionalType !== type) { - isOptional = true; - type = nonOptionalType; - } - } - type = checkNonNullType(type, expression, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic); - return createPooledOptionalTypeResult(isOptional, type); + function getOptionalExpressionType(exprType, expression) { + return ts.isExpressionOfOptionalChainRoot(expression) ? getNonNullableType(exprType) : + ts.isOptionalChain(expression) ? removeOptionalTypeMarker(exprType) : + exprType; } /** * Is source potentially coercible to target type under `==`. @@ -48279,14 +48577,14 @@ var ts; var stringIndexInfo = getIndexInfoOfType(type, 0 /* String */); var numberIndexInfo = getIndexInfoOfType(type, 1 /* Number */); var result = createAnonymousType(type.symbol, members, ts.emptyArray, ts.emptyArray, stringIndexInfo && createIndexInfo(getWidenedType(stringIndexInfo.type), stringIndexInfo.isReadonly), numberIndexInfo && createIndexInfo(getWidenedType(numberIndexInfo.type), numberIndexInfo.isReadonly)); - result.objectFlags |= (ts.getObjectFlags(type) & (16384 /* JSLiteral */ | 1048576 /* NonInferrableType */)); // Retain js literal flag through widening + result.objectFlags |= (ts.getObjectFlags(type) & (16384 /* JSLiteral */ | 2097152 /* NonInferrableType */)); // Retain js literal flag through widening return result; } function getWidenedType(type) { return getWidenedTypeWithContext(type, /*context*/ undefined); } function getWidenedTypeWithContext(type, context) { - if (ts.getObjectFlags(type) & 786432 /* RequiresWidening */) { + if (ts.getObjectFlags(type) & 1572864 /* RequiresWidening */) { if (context === undefined && type.widened) { return type.widened; } @@ -48331,7 +48629,7 @@ var ts; */ function reportWideningErrorsInType(type) { var errorReported = false; - if (ts.getObjectFlags(type) & 262144 /* ContainsWideningType */) { + if (ts.getObjectFlags(type) & 524288 /* ContainsWideningType */) { if (type.flags & 1048576 /* Union */) { if (ts.some(type.types, isEmptyObjectType)) { errorReported = true; @@ -48357,7 +48655,7 @@ var ts; for (var _d = 0, _e = getPropertiesOfObjectType(type); _d < _e.length; _d++) { var p = _e[_d]; var t = getTypeOfSymbol(p); - if (ts.getObjectFlags(t) & 262144 /* ContainsWideningType */) { + if (ts.getObjectFlags(t) & 524288 /* ContainsWideningType */) { if (!reportWideningErrorsInType(t)) { error(p.valueDeclaration, ts.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, symbolToString(p), typeToString(getWidenedType(t))); } @@ -48437,7 +48735,7 @@ var ts; errorOrSuggestion(noImplicitAny, declaration, diagnostic, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)), typeAsString); } function reportErrorsFromWidening(declaration, type, wideningKind) { - if (produceDiagnostics && noImplicitAny && ts.getObjectFlags(type) & 262144 /* ContainsWideningType */) { + if (produceDiagnostics && noImplicitAny && ts.getObjectFlags(type) & 524288 /* ContainsWideningType */) { // Report implicit any error within type if possible, otherwise report error on declaration if (!reportWideningErrorsInType(type)) { reportImplicitAny(declaration, type, wideningKind); @@ -48554,7 +48852,7 @@ var ts; return !!(type.flags & 63176704 /* Instantiable */ || objectFlags & 4 /* Reference */ && (type.node || ts.forEach(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || - objectFlags & 32 /* Mapped */ || + objectFlags & (32 /* Mapped */ | 131072 /* ObjectRestType */) || type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && couldUnionOrIntersectionContainTypeVariables(type)); } function couldUnionOrIntersectionContainTypeVariables(type) { @@ -48609,7 +48907,7 @@ var ts; // literal { a: 123, b: x => true } is marked non-inferable because it contains a context sensitive // arrow function, but is considered partially inferable because property 'a' has an inferable type. function isPartiallyInferableType(type) { - return !(ts.getObjectFlags(type) & 1048576 /* NonInferrableType */) || + return !(ts.getObjectFlags(type) & 2097152 /* NonInferrableType */) || isObjectLiteralType(type) && ts.some(getPropertiesOfType(type), function (prop) { return isPartiallyInferableType(getTypeOfSymbol(prop)); }); } function createReverseMappedType(source, target, constraint) { @@ -48760,10 +49058,7 @@ var ts; // inferring a type parameter constraint. Instead, make a lower priority inference from // the full source to whatever remains in the target. For example, when inferring from // string to 'string | T', make a lower priority inference of string for T. - var savePriority = priority; - priority |= 1 /* NakedTypeVariable */; - inferFromTypes(source, target); - priority = savePriority; + inferWithPriority(source, target, 1 /* NakedTypeVariable */); return; } source = getUnionType(sources); @@ -48796,7 +49091,7 @@ var ts; // not contain anyFunctionType when we come back to this argument for its second round // of inference. Also, we exclude inferences for silentNeverType (which is used as a wildcard // when constructing types from type parameters that had no inference candidates). - if (ts.getObjectFlags(source) & 1048576 /* NonInferrableType */ || source === silentNeverType || (priority & 16 /* ReturnType */ && (source === autoType || source === autoArrayType))) { + if (ts.getObjectFlags(source) & 2097152 /* NonInferrableType */ || source === silentNeverType || (priority & 16 /* ReturnType */ && (source === autoType || source === autoArrayType))) { return; } var inference = getInferenceInfoForType(target); @@ -48863,10 +49158,7 @@ var ts; else if ((isLiteralType(source) || source.flags & 4 /* String */) && target.flags & 4194304 /* Index */) { var empty = createEmptyObjectTypeFromStringLiteral(source); contravariant = !contravariant; - var savePriority = priority; - priority |= 32 /* LiteralKeyof */; - inferFromTypes(empty, target.type); - priority = savePriority; + inferWithPriority(empty, target.type, 32 /* LiteralKeyof */); contravariant = !contravariant; } else if (source.flags & 8388608 /* IndexedAccess */ && target.flags & 8388608 /* IndexedAccess */) { @@ -48918,6 +49210,12 @@ var ts; } } } + function inferWithPriority(source, target, newPriority) { + var savePriority = priority; + priority |= newPriority; + inferFromTypes(source, target); + priority = savePriority; + } function invokeOnce(source, target, action) { var key = source.id + "," + target.id; var status = visited && visited.get(key); @@ -48983,6 +49281,18 @@ var ts; } return undefined; } + function getSingleTypeVariableFromIntersectionTypes(types) { + var typeVariable; + for (var _i = 0, types_13 = types; _i < types_13.length; _i++) { + var type = types_13[_i]; + var t = type.flags & 2097152 /* Intersection */ && ts.find(type.types, function (t) { return !!getInferenceInfoForType(t); }); + if (!t || typeVariable && t !== typeVariable) { + return undefined; + } + typeVariable = t; + } + return typeVariable; + } function inferToMultipleTypes(source, targets, targetFlags) { var typeVariableCount = 0; if (targetFlags & 1048576 /* Union */) { @@ -49012,6 +49322,16 @@ var ts; } } } + if (typeVariableCount === 0) { + // If every target is an intersection of types containing a single naked type variable, + // make a lower priority inference to that type variable. This handles inferring from + // 'A | B' to 'T & (X | Y)' where we want to infer 'A | B' for T. + var intersectionTypeVariable = getSingleTypeVariableFromIntersectionTypes(targets); + if (intersectionTypeVariable) { + inferWithPriority(source, intersectionTypeVariable, 1 /* NakedTypeVariable */); + } + return; + } // If the target has a single naked type variable and no inference circularities were // encountered above (meaning we explored the types fully), create a union of the source // types from which no inferences have been made so far and infer from that union to the @@ -49043,15 +49363,12 @@ var ts; // we want to infer string for T, not Promise | string. For intersection types // we only infer to single naked type variables. if (targetFlags & 2097152 /* Intersection */ ? typeVariableCount === 1 : typeVariableCount > 0) { - var savePriority = priority; - priority |= 1 /* NakedTypeVariable */; for (var _b = 0, targets_4 = targets; _b < targets_4.length; _b++) { var t = targets_4[_b]; if (getInferenceInfoForType(t)) { - inferFromTypes(source, t); + inferWithPriority(source, t, 1 /* NakedTypeVariable */); } } - priority = savePriority; } } function inferToMappedType(source, target, constraintType) { @@ -49072,14 +49389,12 @@ var ts; if (inference && !inference.isFixed) { var inferredType = inferTypeForHomomorphicMappedType(source, target, constraintType); if (inferredType) { - var savePriority = priority; // We assign a lower priority to inferences made from types containing non-inferrable // types because we may only have a partial result (i.e. we may have failed to make // reverse inferences for some properties). - priority |= ts.getObjectFlags(source) & 1048576 /* NonInferrableType */ ? - 4 /* PartialHomomorphicMappedType */ : 2 /* HomomorphicMappedType */; - inferFromTypes(inferredType, inference.typeParameter); - priority = savePriority; + inferWithPriority(inferredType, inference.typeParameter, ts.getObjectFlags(source) & 2097152 /* NonInferrableType */ ? + 4 /* PartialHomomorphicMappedType */ : + 2 /* HomomorphicMappedType */); } } return true; @@ -49087,10 +49402,7 @@ var ts; if (constraintType.flags & 262144 /* TypeParameter */) { // We're inferring from some source type S to a mapped type { [P in K]: X }, where K is a type // parameter. First infer from 'keyof S' to K. - var savePriority = priority; - priority |= 8 /* MappedTypeConstraint */; - inferFromTypes(getIndexType(source), constraintType); - priority = savePriority; + inferWithPriority(getIndexType(source), constraintType, 8 /* MappedTypeConstraint */); // If K is constrained to a type C, also infer to C. Thus, for a mapped type { [P in K]: X }, // where K extends keyof T, we make the same inferences as for a homomorphic mapped type // { [P in keyof T]: X }. This enables us to make meaningful inferences when the target is a @@ -49199,7 +49511,7 @@ var ts; var sourceLen = sourceSignatures.length; var targetLen = targetSignatures.length; var len = sourceLen < targetLen ? sourceLen : targetLen; - var skipParameters = !!(ts.getObjectFlags(source) & 1048576 /* NonInferrableType */); + var skipParameters = !!(ts.getObjectFlags(source) & 2097152 /* NonInferrableType */); for (var i = 0; i < len; i++) { inferFromSignature(getBaseSignature(sourceSignatures[sourceLen - len + i]), getBaseSignature(targetSignatures[targetLen - len + i]), skipParameters); } @@ -49468,6 +49780,15 @@ var ts; } return false; } + function optionalChainContainsReference(source, target) { + while (ts.isOptionalChain(source)) { + source = source.expression; + if (isMatchingReference(source, target)) { + return true; + } + } + return false; + } // Return true if target is a property access xxx.yyy, source is a property access xxx.zzz, the declared // type of xxx is a union type, and yyy is a property that is possibly a discriminant. We consider a property // a possible discriminant if its type differs in the constituents of containing union type, and if every @@ -49588,8 +49909,8 @@ var ts; } function getTypeFactsOfTypes(types) { var result = 0 /* None */; - for (var _i = 0, types_13 = types; _i < types_13.length; _i++) { - var t = types_13[_i]; + for (var _i = 0, types_14 = types; _i < types_14.length; _i++) { + var t = types_14[_i]; result |= getTypeFacts(t); } return result; @@ -49958,8 +50279,8 @@ var ts; } function isEvolvingArrayTypeList(types) { var hasEvolvingArrayType = false; - for (var _i = 0, types_14 = types; _i < types_14.length; _i++) { - var t = types_14[_i]; + for (var _i = 0, types_15 = types; _i < types_15.length; _i++) { + var t = types_15[_i]; if (!(t.flags & 131072 /* Never */)) { if (!(ts.getObjectFlags(t) & 256 /* EvolvingArray */)) { return false; @@ -50040,9 +50361,18 @@ var ts; // expressions are potential type predicate function calls. In order to avoid triggering // circularities in control flow analysis, we use getTypeOfDottedName when resolving the call // target expression of an assertion. - var funcType = node.parent.kind === 225 /* ExpressionStatement */ ? getTypeOfDottedName(node.expression, /*diagnostic*/ undefined) : - node.expression.kind !== 101 /* SuperKeyword */ ? checkOptionalExpression(node, node.expression).type : - undefined; + var funcType = void 0; + if (node.parent.kind === 225 /* ExpressionStatement */) { + funcType = getTypeOfDottedName(node.expression, /*diagnostic*/ undefined); + } + else if (node.expression.kind !== 101 /* SuperKeyword */) { + if (ts.isOptionalChain(node)) { + funcType = checkNonNullType(getOptionalExpressionType(checkExpression(node.expression), node.expression), node.expression); + } + else { + funcType = checkNonNullExpression(node.expression); + } + } var signatures = getSignaturesOfType(funcType && getApparentType(funcType) || unknownType, 0 /* Call */); var candidate = signatures.length === 1 && !signatures[0].typeParameters ? signatures[0] : ts.some(signatures, hasTypePredicateOrNeverReturnType) ? getResolvedSignature(node) : @@ -50055,6 +50385,13 @@ var ts; return !!(getTypePredicateOfSignature(signature) || signature.declaration && (getReturnTypeFromAnnotation(signature.declaration) || unknownType).flags & 131072 /* Never */); } + function getTypePredicateArgument(predicate, callExpression) { + if (predicate.kind === 1 /* Identifier */ || predicate.kind === 3 /* AssertsIdentifier */) { + return callExpression.arguments[predicate.parameterIndex]; + } + var invokedExpression = ts.skipParentheses(callExpression.expression); + return ts.isAccessExpression(invokedExpression) ? ts.skipParentheses(invokedExpression.expression) : undefined; + } function reportFlowControlError(node) { var block = ts.findAncestor(node, ts.isFunctionOrModuleBlock); var sourceFile = ts.getSourceFileOfNode(node); @@ -50070,6 +50407,11 @@ var ts; function isUnlockedReachableFlowNode(flow) { return !(flow.flags & 4096 /* PreFinally */ && flow.lock.locked) && isReachableFlowNodeWorker(flow, /*skipCacheCheck*/ false); } + function isFalseExpression(expr) { + var node = ts.skipParentheses(expr); + return node.kind === 90 /* FalseKeyword */ || node.kind === 208 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || + node.operatorToken.kind === 56 /* BarBarToken */ && isFalseExpression(node.left) && isFalseExpression(node.right)); + } function isReachableFlowNodeWorker(flow, noCacheCheck) { while (true) { if (flow === lastFlowNode) { @@ -50089,8 +50431,17 @@ var ts; } else if (flags & 512 /* Call */) { var signature = getEffectsSignature(flow.node); - if (signature && getReturnTypeOfSignature(signature).flags & 131072 /* Never */) { - return false; + if (signature) { + var predicate = getTypePredicateOfSignature(signature); + if (predicate && predicate.kind === 3 /* AssertsIdentifier */) { + var predicateArgument = flow.node.arguments[predicate.parameterIndex]; + if (predicateArgument && isFalseExpression(predicateArgument)) { + return false; + } + } + if (getReturnTypeOfSignature(signature).flags & 131072 /* Never */) { + return false; + } } flow = flow.antecedent; } @@ -50324,6 +50675,9 @@ var ts; } function narrowTypeByAssertion(type, expr) { var node = ts.skipParentheses(expr); + if (node.kind === 90 /* FalseKeyword */) { + return unreachableNeverType; + } if (node.kind === 208 /* BinaryExpression */) { if (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */) { return narrowTypeByAssertion(narrowTypeByAssertion(type, node.left), node.right); @@ -50342,7 +50696,7 @@ var ts; var flowType = getTypeAtFlowNode(flow.antecedent); var type = getTypeFromFlowType(flowType); var narrowedType = predicate.type ? narrowTypeByTypePredicate(type, predicate, flow.node, /*assumeTrue*/ true) : - predicate.kind === 3 /* AssertsIdentifier */ ? narrowTypeByAssertion(type, flow.node.arguments[predicate.parameterIndex]) : + predicate.kind === 3 /* AssertsIdentifier */ && predicate.parameterIndex >= 0 && predicate.parameterIndex < flow.node.arguments.length ? narrowTypeByAssertion(type, flow.node.arguments[predicate.parameterIndex]) : type; return narrowedType === type ? flowType : createFlowType(narrowedType, isIncomplete(flowType)); } @@ -50413,17 +50767,24 @@ var ts; if (isMatchingReference(reference, expr)) { type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } - else if (isMatchingReferenceDiscriminant(expr, type)) { - type = narrowTypeByDiscriminant(type, expr, function (t) { return narrowTypeBySwitchOnDiscriminant(t, flow.switchStatement, flow.clauseStart, flow.clauseEnd); }); - } else if (expr.kind === 203 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { type = narrowBySwitchOnTypeOf(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } - else if (containsMatchingReferenceDiscriminant(reference, expr)) { - type = declaredType; - } - else if (flow.clauseStart === flow.clauseEnd && isExhaustiveSwitchStatement(flow.switchStatement)) { - return unreachableNeverType; + else { + if (strictNullChecks) { + if (optionalChainContainsReference(expr, reference)) { + type = narrowTypeBySwitchOptionalChainContainment(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd, function (t) { return !(t.flags & (32768 /* Undefined */ | 131072 /* Never */)); }); + } + else if (expr.kind === 203 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { + type = narrowTypeBySwitchOptionalChainContainment(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd, function (t) { return !(t.flags & 131072 /* Never */ || t.flags & 128 /* StringLiteral */ && t.value === "undefined"); }); + } + } + if (isMatchingReferenceDiscriminant(expr, type)) { + type = narrowTypeByDiscriminant(type, expr, function (t) { return narrowTypeBySwitchOnDiscriminant(t, flow.switchStatement, flow.clauseStart, flow.clauseEnd); }); + } + else if (containsMatchingReferenceDiscriminant(reference, expr)) { + type = declaredType; + } } return createFlowType(type, isIncomplete(flowType)); } @@ -50431,6 +50792,7 @@ var ts; var antecedentTypes = []; var subtypeReduction = false; var seenIncomplete = false; + var bypassFlow; for (var _i = 0, _a = flow.antecedents; _i < _a.length; _i++) { var antecedent = _a[_i]; if (antecedent.flags & 4096 /* PreFinally */ && antecedent.lock.locked) { @@ -50439,6 +50801,11 @@ var ts; // in this case we should ignore this branch. continue; } + if (!bypassFlow && antecedent.flags & 128 /* SwitchClause */ && antecedent.clauseStart === antecedent.clauseEnd) { + // The antecedent is the bypass branch of a potentially exhaustive switch statement. + bypassFlow = antecedent; + continue; + } var flowType = getTypeAtFlowNode(antecedent); var type = getTypeFromFlowType(flowType); // If the type at a particular antecedent path is the declared type and the @@ -50459,6 +50826,25 @@ var ts; seenIncomplete = true; } } + if (bypassFlow) { + var flowType = getTypeAtFlowNode(bypassFlow); + var type = getTypeFromFlowType(flowType); + // If the bypass flow contributes a type we haven't seen yet and the switch statement + // isn't exhaustive, process the bypass flow type. Since exhaustiveness checks increase + // the risk of circularities, we only want to perform them when they make a difference. + if (!ts.contains(antecedentTypes, type) && !isExhaustiveSwitchStatement(bypassFlow.switchStatement)) { + if (type === declaredType && declaredType === initialType) { + return type; + } + antecedentTypes.push(type); + if (!isTypeSubsetOf(type, declaredType)) { + subtypeReduction = true; + } + if (isIncomplete(flowType)) { + seenIncomplete = true; + } + } + } return createFlowType(getUnionOrEvolvingArrayType(antecedentTypes, subtypeReduction ? 2 /* Subtype */ : 1 /* Literal */), seenIncomplete); } function getTypeAtFlowLoopLabel(flow) { @@ -50565,6 +50951,9 @@ var ts; if (isMatchingReference(reference, expr)) { return getTypeWithFacts(type, assumeTrue ? 4194304 /* Truthy */ : 8388608 /* Falsy */); } + if (strictNullChecks && assumeTrue && optionalChainContainsReference(expr, reference)) { + type = getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); + } if (isMatchingReferenceDiscriminant(expr, declaredType)) { return narrowTypeByDiscriminant(type, expr, function (t) { return getTypeWithFacts(t, assumeTrue ? 4194304 /* Truthy */ : 8388608 /* Falsy */); }); } @@ -50613,6 +51002,14 @@ var ts; if (isMatchingReference(reference, right_1)) { return narrowTypeByEquality(type, operator_1, left_1, assumeTrue); } + if (strictNullChecks) { + if (optionalChainContainsReference(left_1, reference)) { + type = narrowTypeByOptionalChainContainment(type, operator_1, right_1, assumeTrue); + } + else if (optionalChainContainsReference(right_1, reference)) { + type = narrowTypeByOptionalChainContainment(type, operator_1, left_1, assumeTrue); + } + } if (isMatchingReferenceDiscriminant(left_1, declaredType)) { return narrowTypeByDiscriminant(type, left_1, function (t) { return narrowTypeByEquality(t, operator_1, right_1, assumeTrue); }); } @@ -50636,6 +51033,15 @@ var ts; } return type; } + function narrowTypeByOptionalChainContainment(type, operator, value, assumeTrue) { + // We are in a branch of obj?.foo === value or obj?.foo !== value. We remove undefined and null from + // the type of obj if (a) the operator is === and the type of value doesn't include undefined or (b) the + // operator is !== and the type of value is undefined. + var effectiveTrue = operator === 34 /* EqualsEqualsToken */ || operator === 36 /* EqualsEqualsEqualsToken */ ? assumeTrue : !assumeTrue; + var doubleEquals = operator === 34 /* EqualsEqualsToken */ || operator === 35 /* ExclamationEqualsToken */; + var valueNonNullish = !(getTypeFacts(getTypeOfExpression(value)) & (doubleEquals ? 262144 /* EQUndefinedOrNull */ : 65536 /* EQUndefined */)); + return effectiveTrue === valueNonNullish ? getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */) : type; + } function narrowTypeByEquality(type, operator, value, assumeTrue) { if (type.flags & 1 /* Any */) { return type; @@ -50683,8 +51089,14 @@ var ts; } function narrowTypeByTypeof(type, typeOfExpr, operator, literal, assumeTrue) { // We have '==', '!=', '===', or !==' operator with 'typeof xxx' and string literal operands + if (operator === 35 /* ExclamationEqualsToken */ || operator === 37 /* ExclamationEqualsEqualsToken */) { + assumeTrue = !assumeTrue; + } var target = getReferenceCandidate(typeOfExpr.expression); if (!isMatchingReference(reference, target)) { + if (strictNullChecks && optionalChainContainsReference(target, reference) && assumeTrue === (literal.text !== "undefined")) { + return getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); + } // For a reference of the form 'x.y', a 'typeof x === ...' type guard resets the // narrowed type of 'y' to its declared type. if (containsMatchingReference(reference, target)) { @@ -50692,9 +51104,6 @@ var ts; } return type; } - if (operator === 35 /* ExclamationEqualsToken */ || operator === 37 /* ExclamationEqualsEqualsToken */) { - assumeTrue = !assumeTrue; - } if (type.flags & 1 /* Any */ && literal.text === "function") { return type; } @@ -50727,6 +51136,10 @@ var ts; return type; } } + function narrowTypeBySwitchOptionalChainContainment(type, switchStatement, clauseStart, clauseEnd, clauseCheck) { + var everyClauseChecks = clauseStart !== clauseEnd && ts.every(getSwitchClauseTypes(switchStatement).slice(clauseStart, clauseEnd), clauseCheck); + return everyClauseChecks ? getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */) : type; + } function narrowTypeBySwitchOnDiscriminant(type, switchStatement, clauseStart, clauseEnd) { // We only narrow if all case expressions specify // values with unit types, except for the case where @@ -50859,6 +51272,9 @@ var ts; function narrowTypeByInstanceof(type, expr, assumeTrue) { var left = getReferenceCandidate(expr.left); if (!isMatchingReference(reference, left)) { + if (assumeTrue && strictNullChecks && optionalChainContainsReference(left, reference)) { + return getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); + } // For a reference of the form 'x.y', an 'x instanceof T' type guard resets the // narrowed type of 'y' to its declared type. We do this because preceding 'x.y' // references might reference a different 'y' property. However, we make an exception @@ -50931,39 +51347,28 @@ var ts; } function narrowTypeByTypePredicate(type, predicate, callExpression, assumeTrue) { // Don't narrow from 'any' if the predicate type is exactly 'Object' or 'Function' - if (isTypeAny(type) && (predicate.type === globalObjectType || predicate.type === globalFunctionType)) { - return type; - } - if (predicate.kind === 1 /* Identifier */ || predicate.kind === 3 /* AssertsIdentifier */) { - var predicateArgument = callExpression.arguments[predicate.parameterIndex]; - if (predicateArgument && predicate.type) { + if (predicate.type && !(isTypeAny(type) && (predicate.type === globalObjectType || predicate.type === globalFunctionType))) { + var predicateArgument = getTypePredicateArgument(predicate, callExpression); + if (predicateArgument) { if (isMatchingReference(reference, predicateArgument)) { return getNarrowedType(type, predicate.type, assumeTrue, isTypeSubtypeOf); } + if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) && + !(getTypeFacts(predicate.type) & 65536 /* EQUndefined */)) { + return getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); + } if (containsMatchingReference(reference, predicateArgument)) { return declaredType; } } } - else { - var invokedExpression = ts.skipParentheses(callExpression.expression); - if (ts.isAccessExpression(invokedExpression) && predicate.type) { - var possibleReference = ts.skipParentheses(invokedExpression.expression); - if (isMatchingReference(reference, possibleReference)) { - return getNarrowedType(type, predicate.type, assumeTrue, isTypeSubtypeOf); - } - if (containsMatchingReference(reference, possibleReference)) { - return declaredType; - } - } - } return type; } // Narrow the given type based on the given expression having the assumed boolean value. The returned type // will be a subtype or the same type as the argument. function narrowType(type, expr, assumeTrue) { // for `a?.b`, we emulate a synthetic `a !== null && a !== undefined` condition for `a` - if (ts.isOptionalChainRoot(expr.parent) || + if (ts.isExpressionOfOptionalChainRoot(expr) || ts.isBinaryExpression(expr.parent) && expr.parent.operatorToken.kind === 60 /* QuestionQuestionToken */ && expr.parent.left === expr) { return narrowTypeByOptionality(type, expr, assumeTrue); } @@ -51244,7 +51649,24 @@ var ts; } } else if (!assumeInitialized && !(getFalsyFlags(type) & 32768 /* Undefined */) && getFalsyFlags(flowType) & 32768 /* Undefined */) { - error(node, ts.Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol)); + var diag = error(node, ts.Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol)); + // See GH:32846 - if the user is using a variable whose type is () => T1 | ... | undefined + // they may have meant to specify the type as (() => T1 | ...) | undefined + // This is assumed if: the type is a FunctionType, the return type is a Union, the last constituent of + // the union is `undefined` + if (type.symbol && type.symbol.declarations.length === 1 && ts.isFunctionTypeNode(type.symbol.declarations[0])) { + var funcTypeNode = type.symbol.declarations[0]; + var returnType = getReturnTypeFromAnnotation(funcTypeNode); + if (returnType && returnType.flags & 1048576 /* Union */) { + var unionTypes_3 = funcTypeNode.type.types; + if (unionTypes_3 && unionTypes_3[unionTypes_3.length - 1].kind === 145 /* UndefinedKeyword */) { + var parenedFuncType = ts.getMutableClone(funcTypeNode); + // Highlight to the end of the second to last constituent of the union + parenedFuncType.end = unionTypes_3[unionTypes_3.length - 2].end; + ts.addRelatedInfo(diag, ts.createDiagnosticForNode(parenedFuncType, ts.Diagnostics.Did_you_mean_to_parenthesize_this_function_type)); + } + } + } // Return the declared type to reduce follow-on errors return type; } @@ -52024,18 +52446,22 @@ var ts; return undefined; } // In a typed function call, an argument or substitution expression is contextually typed by the type of the corresponding parameter. - function getContextualTypeForArgument(callTarget, arg) { + function getContextualTypeForArgument(callTarget, arg, contextFlags) { var args = getEffectiveCallArguments(callTarget); var argIndex = args.indexOf(arg); // -1 for e.g. the expression of a CallExpression, or the tag of a TaggedTemplateExpression - return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex); + return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex, contextFlags); } - function getContextualTypeForArgumentAtIndex(callTarget, argIndex) { + function getContextualTypeForArgumentAtIndex(callTarget, argIndex, contextFlags) { // If we're already in the process of resolving the given signature, don't resolve again as // that could cause infinite recursion. Instead, return anySignature. var signature = getNodeLinks(callTarget).resolvedSignature === resolvingSignature ? resolvingSignature : getResolvedSignature(callTarget); if (ts.isJsxOpeningLikeElement(callTarget) && argIndex === 0) { return getEffectiveFirstArgumentForJsxSignature(signature, callTarget); } + if (contextFlags && contextFlags & 4 /* Completion */ && signature.target) { + var baseSignature = getBaseSignature(signature.target); + return intersectTypes(getTypeAtPosition(signature, argIndex), getTypeAtPosition(baseSignature, argIndex)); + } return getTypeAtPosition(signature, argIndex); } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { @@ -52394,7 +52820,7 @@ var ts; } /* falls through */ case 196 /* NewExpression */: - return getContextualTypeForArgument(parent, node); + return getContextualTypeForArgument(parent, node, contextFlags); case 198 /* TypeAssertionExpression */: case 216 /* AsExpression */: return ts.isConstTypeReference(parent.type) ? undefined : getTypeFromTypeNode(parent.type); @@ -52609,8 +53035,8 @@ var ts; } var signatureList; var types = type.types; - for (var _i = 0, types_15 = types; _i < types_15.length; _i++) { - var current = types_15[_i]; + for (var _i = 0, types_16 = types; _i < types_16.length; _i++) { + var current = types_16[_i]; var signature = getContextualCallSignature(current, node); if (signature) { if (!signatureList) { @@ -52711,7 +53137,7 @@ var ts; var literalType = type.literalType; if (!literalType) { literalType = type.literalType = cloneTypeReference(type); - literalType.objectFlags |= 65536 /* ArrayLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */; + literalType.objectFlags |= 65536 /* ArrayLiteral */ | 1048576 /* ContainsObjectOrArrayLiteral */; } return literalType; } @@ -52848,7 +53274,7 @@ var ts; checkTypeAssignableTo(type, getTypeFromTypeNode(enumTag.typeExpression), memberDecl); } } - objectFlags |= ts.getObjectFlags(type) & 1835008 /* PropagatingFlags */; + objectFlags |= ts.getObjectFlags(type) & 3670016 /* PropagatingFlags */; var nameType = computedNameType && isTypeUsableAsPropertyName(computedNameType) ? computedNameType : undefined; var prop = nameType ? createSymbol(4 /* Property */ | member.flags, getPropertyNameFromType(nameType), checkFlags | 4096 /* Late */) : @@ -52957,7 +53383,7 @@ var ts; var stringIndexInfo = hasComputedStringProperty ? getObjectLiteralIndexInfo(node, offset, propertiesArray, 0 /* String */) : undefined; var numberIndexInfo = hasComputedNumberProperty ? getObjectLiteralIndexInfo(node, offset, propertiesArray, 1 /* Number */) : undefined; var result = createAnonymousType(node.symbol, propertiesTable, ts.emptyArray, ts.emptyArray, stringIndexInfo, numberIndexInfo); - result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */; + result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 1048576 /* ContainsObjectOrArrayLiteral */; if (isJSObjectLiteral) { result.objectFlags |= 16384 /* JSLiteral */; } @@ -53055,7 +53481,7 @@ var ts; var member = attributeDecl.symbol; if (ts.isJsxAttribute(attributeDecl)) { var exprType = checkJsxAttribute(attributeDecl, checkMode); - objectFlags |= ts.getObjectFlags(exprType) & 1835008 /* PropagatingFlags */; + objectFlags |= ts.getObjectFlags(exprType) & 3670016 /* PropagatingFlags */; var attributeSymbol = createSymbol(4 /* Property */ | 33554432 /* Transient */ | member.flags, member.escapedName); attributeSymbol.declarations = member.declarations; attributeSymbol.parent = member.parent; @@ -53135,7 +53561,7 @@ var ts; function createJsxAttributesType() { objectFlags |= freshObjectLiteralFlag; var result = createAnonymousType(attributes.symbol, attributesTable, ts.emptyArray, ts.emptyArray, /*stringIndexInfo*/ undefined, /*numberIndexInfo*/ undefined); - result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */; + result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 1048576 /* ContainsObjectOrArrayLiteral */; return result; } } @@ -53607,8 +54033,8 @@ var ts; function symbolHasNonMethodDeclaration(symbol) { return !!forEachProperty(symbol, function (prop) { return !(prop.flags & 8192 /* Method */); }); } - function checkNonNullExpression(node, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic) { - return checkNonNullType(checkExpression(node), node, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic); + function checkNonNullExpression(node) { + return checkNonNullType(checkExpression(node), node); } function isNullableType(type) { return !!((strictNullChecks ? getFalsyFlags(type) : type.flags) & 98304 /* Nullable */); @@ -53616,22 +54042,34 @@ var ts; function getNonNullableTypeIfNeeded(type) { return isNullableType(type) ? getNonNullableType(type) : type; } - function checkNonNullType(type, node, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic) { + function reportObjectPossiblyNullOrUndefinedError(node, flags) { + error(node, flags & 32768 /* Undefined */ ? flags & 65536 /* Null */ ? + ts.Diagnostics.Object_is_possibly_null_or_undefined : + ts.Diagnostics.Object_is_possibly_undefined : + ts.Diagnostics.Object_is_possibly_null); + } + function reportCannotInvokePossiblyNullOrUndefinedError(node, flags) { + error(node, flags & 32768 /* Undefined */ ? flags & 65536 /* Null */ ? + ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null_or_undefined : + ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_undefined : + ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null); + } + function checkNonNullTypeWithReporter(type, node, reportError) { if (strictNullChecks && type.flags & 2 /* Unknown */) { error(node, ts.Diagnostics.Object_is_of_type_unknown); return errorType; } var kind = (strictNullChecks ? getFalsyFlags(type) : type.flags) & 98304 /* Nullable */; if (kind) { - error(node, kind & 32768 /* Undefined */ ? kind & 65536 /* Null */ ? - (nullOrUndefinedDiagnostic || ts.Diagnostics.Object_is_possibly_null_or_undefined) : - (undefinedDiagnostic || ts.Diagnostics.Object_is_possibly_undefined) : - (nullDiagnostic || ts.Diagnostics.Object_is_possibly_null)); + reportError(node, kind); var t = getNonNullableType(type); return t.flags & (98304 /* Nullable */ | 131072 /* Never */) ? errorType : t; } return type; } + function checkNonNullType(type, node) { + return checkNonNullTypeWithReporter(type, node, reportObjectPossiblyNullOrUndefinedError); + } function checkNonNullNonVoidType(type, node) { var nonNullType = checkNonNullType(type, node); if (nonNullType !== errorType && nonNullType.flags & 16384 /* Void */) { @@ -53640,10 +54078,16 @@ var ts; return nonNullType; } function checkPropertyAccessExpression(node) { - return checkPropertyAccessExpressionOrQualifiedName(node, node.expression, node.name); + return node.flags & 32 /* OptionalChain */ ? checkPropertyAccessChain(node) : + checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name); + } + function checkPropertyAccessChain(node) { + var leftType = checkExpression(node.expression); + var nonOptionalType = getOptionalExpressionType(leftType, node.expression); + return propagateOptionalTypeMarker(checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullType(nonOptionalType, node.expression), node.name), node, nonOptionalType !== leftType); } function checkQualifiedName(node) { - return checkPropertyAccessExpressionOrQualifiedName(node, node.left, node.right); + return checkPropertyAccessExpressionOrQualifiedName(node, node.left, checkNonNullExpression(node.left), node.right); } function isMethodAccessForCall(node) { while (node.parent.kind === 199 /* ParenthesizedExpression */) { @@ -53651,8 +54095,7 @@ var ts; } return ts.isCallOrNewExpression(node.parent) && node.parent.expression === node; } - function checkPropertyAccessExpressionOrQualifiedName(node, left, right) { - var _a = checkOptionalExpression(node, left), isOptional = _a.isOptional, leftType = _a.type; + function checkPropertyAccessExpressionOrQualifiedName(node, left, leftType, right) { var parentSymbol = getNodeLinks(left).resolvedSymbol; var assignmentKind = ts.getAssignmentTargetKind(node); var apparentType = getApparentType(assignmentKind !== 0 /* None */ || isMethodAccessForCall(node) ? getWidenedType(leftType) : leftType); @@ -53705,7 +54148,7 @@ var ts; } propType = getConstraintForLocation(getTypeOfSymbol(prop), node); } - return propagateOptionalTypeMarker(getFlowTypeOfAccessExpression(node, prop, propType, right), isOptional); + return getFlowTypeOfAccessExpression(node, prop, propType, right); } function getFlowTypeOfAccessExpression(node, prop, propType, errorNode) { // Only compute control flow type if this is a property access expression that isn't an @@ -54027,7 +54470,15 @@ var ts; return false; } function checkIndexedAccess(node) { - var _a = checkOptionalExpression(node, node.expression), isOptional = _a.isOptional, exprType = _a.type; + return node.flags & 32 /* OptionalChain */ ? checkElementAccessChain(node) : + checkElementAccessExpression(node, checkNonNullExpression(node.expression)); + } + function checkElementAccessChain(node) { + var exprType = checkExpression(node.expression); + var nonOptionalType = getOptionalExpressionType(exprType, node.expression); + return propagateOptionalTypeMarker(checkElementAccessExpression(node, checkNonNullType(nonOptionalType, node.expression)), node, nonOptionalType !== exprType); + } + function checkElementAccessExpression(node, exprType) { var objectType = ts.getAssignmentTargetKind(node) !== 0 /* None */ || isMethodAccessForCall(node) ? getWidenedType(exprType) : exprType; var indexExpression = node.argumentExpression; var indexType = checkExpression(indexExpression); @@ -54043,7 +54494,7 @@ var ts; 2 /* Writing */ | (isGenericObjectType(objectType) && !isThisTypeParameter(objectType) ? 1 /* NoIndexSignatures */ : 0) : 0 /* None */; var indexedAccessType = getIndexedAccessTypeOrUndefined(objectType, effectiveIndexType, node, accessFlags) || errorType; - return propagateOptionalTypeMarker(checkIndexedAccessIndexType(getFlowTypeOfAccessExpression(node, indexedAccessType.symbol, indexedAccessType, indexExpression), node), isOptional); + return checkIndexedAccessIndexType(getFlowTypeOfAccessExpression(node, indexedAccessType.symbol, indexedAccessType, indexExpression), node); } function checkThatExpressionIsProperSymbolReference(expression, expressionType, reportError) { if (expressionType === errorType) { @@ -54114,7 +54565,7 @@ var ts; // interface B extends A { (x: 'foo'): string } // const b: B; // b('foo') // <- here overloads should be processed as [(x:'foo'): string, (x: string): void] - function reorderCandidates(signatures, result, isOptionalCall) { + function reorderCandidates(signatures, result, callChainFlags) { var lastParent; var lastSymbol; var cutoffIndex = 0; @@ -54144,7 +54595,7 @@ var ts; lastSymbol = symbol; // specialized signatures always need to be placed before non-specialized signatures regardless // of the cutoff position; see GH#1133 - if (signature.hasLiteralTypes) { + if (signatureHasLiteralTypes(signature)) { specializedIndex++; spliceIndex = specializedIndex; // The cutoff index always needs to be greater than or equal to the specialized signature index @@ -54155,7 +54606,7 @@ var ts; else { spliceIndex = index; } - result.splice(spliceIndex, 0, isOptionalCall ? createOptionalCallSignature(signature) : signature); + result.splice(spliceIndex, 0, callChainFlags ? getOptionalCallSignature(signature, callChainFlags) : signature); } } function isSpreadArgument(arg) { @@ -54239,7 +54690,7 @@ var ts; // the declared number of type parameters, the call has an incorrect arity. var numTypeParameters = ts.length(signature.typeParameters); var minTypeArgumentCount = getMinTypeArgumentCount(signature.typeParameters); - return !typeArguments || + return !ts.some(typeArguments) || (typeArguments.length >= minTypeArgumentCount && typeArguments.length <= numTypeParameters); } // If type has a single call signature and no other members, return that signature. Otherwise, return undefined. @@ -54450,7 +54901,19 @@ var ts; // If the signature's 'this' type is voidType, then the check is skipped -- anything is compatible. // If the expression is a new expression, then the check is skipped. var thisArgumentNode = getThisArgumentOfCall(node); - var thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType; + var thisArgumentType = void 0; + if (thisArgumentNode) { + thisArgumentType = checkExpression(thisArgumentNode); + if (ts.isOptionalChainRoot(thisArgumentNode.parent)) { + thisArgumentType = getNonNullableType(thisArgumentType); + } + else if (ts.isOptionalChain(thisArgumentNode.parent)) { + thisArgumentType = removeOptionalTypeMarker(thisArgumentType); + } + } + else { + thisArgumentType = voidType; + } var errorNode = reportErrors ? (thisArgumentNode || node) : undefined; var headMessage_1 = ts.Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1; if (!checkTypeRelatedTo(thisArgumentType, thisType, relation, errorNode, headMessage_1, containingMessageChain, errorOutputContainer)) { @@ -54677,7 +55140,7 @@ var ts; if (closestSignature && getMinArgumentCount(closestSignature) > argCount && closestSignature.declaration) { var paramDecl = closestSignature.declaration.parameters[closestSignature.thisParameter ? argCount + 1 : argCount]; if (paramDecl) { - related = ts.createDiagnosticForNode(paramDecl, ts.isBindingPattern(paramDecl.name) ? ts.Diagnostics.An_argument_matching_this_binding_pattern_was_not_provided : ts.Diagnostics.An_argument_for_0_was_not_provided, !paramDecl.name ? argCount : !ts.isBindingPattern(paramDecl.name) ? ts.idText(getFirstIdentifier(paramDecl.name)) : undefined); + related = ts.createDiagnosticForNode(paramDecl, ts.isBindingPattern(paramDecl.name) ? ts.Diagnostics.An_argument_matching_this_binding_pattern_was_not_provided : ts.Diagnostics.An_argument_for_0_was_not_provided, !paramDecl.name ? argCount : !ts.isBindingPattern(paramDecl.name) ? ts.idText(ts.getFirstIdentifier(paramDecl.name)) : undefined); } } if (min < argCount && argCount < max) { @@ -54733,7 +55196,7 @@ var ts; } return ts.createDiagnosticForNodeArray(ts.getSourceFileOfNode(node), typeArguments, ts.Diagnostics.Expected_0_type_arguments_but_got_1, belowArgCount === -Infinity ? aboveArgCount : belowArgCount, argCount); } - function resolveCall(node, signatures, candidatesOutArray, checkMode, isOptionalCall, fallbackError) { + function resolveCall(node, signatures, candidatesOutArray, checkMode, callChainFlags, fallbackError) { var isTaggedTemplate = node.kind === 197 /* TaggedTemplateExpression */; var isDecorator = node.kind === 156 /* Decorator */; var isJsxOpeningOrSelfClosingElement = ts.isJsxOpeningLikeElement(node); @@ -54748,7 +55211,7 @@ var ts; } var candidates = candidatesOutArray || []; // reorderCandidates fills up the candidates array directly - reorderCandidates(signatures, candidates, isOptionalCall); + reorderCandidates(signatures, candidates, callChainFlags); if (!candidates.length) { if (reportErrors) { diagnostics.add(getDiagnosticForCallNode(node, ts.Diagnostics.Call_target_does_not_contain_any_signatures)); @@ -54910,7 +55373,7 @@ var ts; candidateForTypeArgumentError = undefined; if (isSingleNonGenericCandidate) { var candidate = candidates[0]; - if (typeArguments || !hasCorrectArity(node, args, candidate, signatureHelpTrailingComma)) { + if (ts.some(typeArguments) || !hasCorrectArity(node, args, candidate, signatureHelpTrailingComma)) { return undefined; } if (getSignatureApplicabilityError(node, args, candidate, relation, 0 /* Normal */, /*reportErrors*/ false, /*containingMessageChain*/ undefined)) { @@ -54928,7 +55391,7 @@ var ts; var inferenceContext = void 0; if (candidate.typeParameters) { var typeArgumentTypes = void 0; - if (typeArguments) { + if (ts.some(typeArguments)) { typeArgumentTypes = checkTypeArguments(candidate, typeArguments, /*reportErrors*/ false); if (!typeArgumentTypes) { candidateForTypeArgumentError = candidate; @@ -55003,34 +55466,34 @@ var ts; var _a = ts.minAndMax(candidates, getNumNonRestParameters), minArgumentCount = _a.min, maxNonRestParam = _a.max; var parameters = []; var _loop_15 = function (i) { - var symbols = ts.mapDefined(candidates, function (_a) { - var parameters = _a.parameters, hasRestParameter = _a.hasRestParameter; - return hasRestParameter ? - i < parameters.length - 1 ? parameters[i] : ts.last(parameters) : - i < parameters.length ? parameters[i] : undefined; - }); + var symbols = ts.mapDefined(candidates, function (s) { return signatureHasRestParameter(s) ? + i < s.parameters.length - 1 ? s.parameters[i] : ts.last(s.parameters) : + i < s.parameters.length ? s.parameters[i] : undefined; }); ts.Debug.assert(symbols.length !== 0); parameters.push(createCombinedSymbolFromTypes(symbols, ts.mapDefined(candidates, function (candidate) { return tryGetTypeAtPosition(candidate, i); }))); }; for (var i = 0; i < maxNonRestParam; i++) { _loop_15(i); } - var restParameterSymbols = ts.mapDefined(candidates, function (c) { return c.hasRestParameter ? ts.last(c.parameters) : undefined; }); - var hasRestParameter = restParameterSymbols.length !== 0; - if (hasRestParameter) { + var restParameterSymbols = ts.mapDefined(candidates, function (c) { return signatureHasRestParameter(c) ? ts.last(c.parameters) : undefined; }); + var flags = 0 /* None */; + if (restParameterSymbols.length !== 0) { var type = createArrayType(getUnionType(ts.mapDefined(candidates, tryGetRestTypeOfSignature), 2 /* Subtype */)); parameters.push(createCombinedSymbolForOverloadFailure(restParameterSymbols, type)); + flags |= 1 /* HasRestParameter */; + } + if (candidates.some(signatureHasLiteralTypes)) { + flags |= 2 /* HasLiteralTypes */; } return createSignature(candidates[0].declaration, /*typeParameters*/ undefined, // Before calling this we tested for `!candidates.some(c => !!c.typeParameters)`. thisParameter, parameters, /*resolvedReturnType*/ getIntersectionType(candidates.map(getReturnTypeOfSignature)), - /*typePredicate*/ undefined, minArgumentCount, hasRestParameter, - /*hasLiteralTypes*/ candidates.some(function (c) { return c.hasLiteralTypes; })); + /*typePredicate*/ undefined, minArgumentCount, flags); } function getNumNonRestParameters(signature) { var numParams = signature.parameters.length; - return signature.hasRestParameter ? numParams - 1 : numParams; + return signatureHasRestParameter(signature) ? numParams - 1 : numParams; } function createCombinedSymbolFromTypes(sources, types) { return createCombinedSymbolForOverloadFailure(sources, getUnionType(types, 2 /* Subtype */)); @@ -55106,12 +55569,24 @@ var ts; var baseTypeNode = ts.getEffectiveBaseTypeNode(ts.getContainingClass(node)); if (baseTypeNode) { var baseConstructors = getInstantiatedConstructorsForTypeArguments(superType, baseTypeNode.typeArguments, baseTypeNode); - return resolveCall(node, baseConstructors, candidatesOutArray, checkMode, /*isOptional*/ false); + return resolveCall(node, baseConstructors, candidatesOutArray, checkMode, 0 /* None */); } } return resolveUntypedCall(node); } - var _b = checkOptionalExpression(node, node.expression, ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null, ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_undefined, ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null_or_undefined), isOptional = _b.isOptional, funcType = _b.type; + var callChainFlags; + var funcType = checkExpression(node.expression); + if (ts.isCallChain(node)) { + var nonOptionalType = getOptionalExpressionType(funcType, node.expression); + callChainFlags = nonOptionalType === funcType ? 0 /* None */ : + ts.isOutermostOptionalChain(node) ? 8 /* IsOuterCallChain */ : + 4 /* IsInnerCallChain */; + funcType = nonOptionalType; + } + else { + callChainFlags = 0 /* None */; + } + funcType = checkNonNullTypeWithReporter(funcType, node.expression, reportCannotInvokePossiblyNullOrUndefinedError); if (funcType === silentNeverType) { return silentNeverSignature; } @@ -55177,7 +55652,7 @@ var ts; error(node, ts.Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType)); return resolveErrorCall(node); } - return resolveCall(node, callSignatures, candidatesOutArray, checkMode, isOptional); + return resolveCall(node, callSignatures, candidatesOutArray, checkMode, callChainFlags); } function isGenericFunctionReturningFunction(signature) { return !!(signature.typeParameters && isFunctionType(getReturnTypeOfSignature(signature))); @@ -55240,7 +55715,7 @@ var ts; error(node, ts.Diagnostics.Cannot_create_an_instance_of_an_abstract_class); return resolveErrorCall(node); } - return resolveCall(node, constructSignatures, candidatesOutArray, checkMode, /*isOptional*/ false); + return resolveCall(node, constructSignatures, candidatesOutArray, checkMode, 0 /* None */); } // If expressionType's apparent type is an object type with no construct signatures but // one or more call signatures, the expression is processed as a function call. A compile-time @@ -55248,7 +55723,7 @@ var ts; // operation is Any. It is an error to have a Void this type. var callSignatures = getSignaturesOfType(expressionType, 0 /* Call */); if (callSignatures.length) { - var signature = resolveCall(node, callSignatures, candidatesOutArray, checkMode, /*isOptional*/ false); + var signature = resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */); if (!noImplicitAny) { if (signature.declaration && !isJSConstructor(signature.declaration) && getReturnTypeOfSignature(signature) !== voidType) { error(node, ts.Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword); @@ -55333,8 +55808,8 @@ var ts; if (apparentType.flags & 1048576 /* Union */) { var types = apparentType.types; var hasSignatures = false; - for (var _i = 0, types_16 = types; _i < types_16.length; _i++) { - var constituent = types_16[_i]; + for (var _i = 0, types_17 = types; _i < types_17.length; _i++) { + var constituent = types_17[_i]; var signatures = getSignaturesOfType(constituent, kind); if (signatures.length !== 0) { hasSignatures = true; @@ -55425,7 +55900,7 @@ var ts; invocationError(node.tag, apparentType, 0 /* Call */); return resolveErrorCall(node); } - return resolveCall(node, callSignatures, candidatesOutArray, checkMode, /*isOptional*/ false); + return resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */); } /** * Gets the localized diagnostic head message to use for errors when resolving a decorator as a call expression. @@ -55478,7 +55953,7 @@ var ts; invocationErrorRecovery(apparentType, 0 /* Call */, diag); return resolveErrorCall(node); } - return resolveCall(node, callSignatures, candidatesOutArray, checkMode, /*isOptional*/ false, headMessage); + return resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */, headMessage); } function createSignatureForJSXIntrinsic(node, result) { var namespace = getJsxNamespaceAt(node); @@ -55493,9 +55968,7 @@ var ts; return createSignature(declaration, /*typeParameters*/ undefined, /*thisParameter*/ undefined, [parameterSymbol], typeSymbol ? getDeclaredTypeOfSymbol(typeSymbol) : errorType, - /*returnTypePredicate*/ undefined, 1, - /*hasRestparameter*/ false, - /*hasLiteralTypes*/ false); + /*returnTypePredicate*/ undefined, 1, 0 /* None */); } function resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode) { if (isJsxIntrinsicIdentifier(node.tagName)) { @@ -55518,7 +55991,7 @@ var ts; error(node.tagName, ts.Diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, ts.getTextOfNode(node.tagName)); return resolveErrorCall(node); } - return resolveCall(node, signatures, candidatesOutArray, checkMode, /*isOptional*/ false); + return resolveCall(node, signatures, candidatesOutArray, checkMode, 0 /* None */); } /** * Sometimes, we have a decorator that could accept zero arguments, @@ -55528,7 +56001,7 @@ var ts; function isPotentiallyUncalledDecorator(decorator, signatures) { return signatures.length && ts.every(signatures, function (signature) { return signature.minArgumentCount === 0 && - !signature.hasRestParameter && + !signatureHasRestParameter(signature) && signature.parameters.length < getDecoratorArgumentCount(decorator, signature); }); } @@ -55599,7 +56072,7 @@ var ts; return false; } function mergeJSSymbols(target, source) { - if (source && (ts.hasEntries(source.exports) || ts.hasEntries(source.members))) { + if (source) { var links = getSymbolLinks(source); if (!links.inferredClassSymbol || !links.inferredClassSymbol.has("" + getSymbolId(target))) { var inferred = isTransientSymbol(target) ? target : cloneSymbol(target); @@ -55909,7 +56382,7 @@ var ts; return type; } function getParameterNameAtPosition(signature, pos) { - var paramCount = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + var paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); if (pos < paramCount) { return signature.parameters[pos].escapedName; } @@ -55926,11 +56399,11 @@ var ts; return tryGetTypeAtPosition(signature, pos) || anyType; } function tryGetTypeAtPosition(signature, pos) { - var paramCount = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + var paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); if (pos < paramCount) { return getTypeOfParameter(signature.parameters[pos]); } - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { // We want to return the value undefined for an out of bounds parameter position, // so we need to check bounds here before calling getIndexedAccessType (which // otherwise would return the type 'undefined'). @@ -55965,7 +56438,7 @@ var ts; } function getParameterCount(signature) { var length = signature.parameters.length; - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var restType = getTypeOfSymbol(signature.parameters[length - 1]); if (isTupleType(restType)) { return length + getTypeArguments(restType).length - 1; @@ -55974,7 +56447,7 @@ var ts; return length; } function getMinArgumentCount(signature) { - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); if (isTupleType(restType)) { var minLength = restType.target.minLength; @@ -55986,14 +56459,14 @@ var ts; return signature.minArgumentCount; } function hasEffectiveRestParameter(signature) { - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); return !isTupleType(restType) || restType.target.hasRestElement; } return false; } function getEffectiveRestType(signature) { - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); return isTupleType(restType) ? getRestArrayTypeOfTupleType(restType) : restType; } @@ -56010,7 +56483,7 @@ var ts; return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : fallbackType; } function inferFromAnnotatedParameters(signature, context, inferenceContext) { - var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + var len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); for (var i = 0; i < len; i++) { var declaration = signature.parameters[i].valueDeclaration; if (declaration.type) { @@ -56043,7 +56516,7 @@ var ts; assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter)); } } - var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + var len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); for (var i = 0; i < len; i++) { var parameter = signature.parameters[i]; if (!ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) { @@ -56051,7 +56524,7 @@ var ts; assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType); } } - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { // parameter might be a transient symbol generated by use of `arguments` in the function body. var parameter = ts.last(signature.parameters); if (isTransientSymbol(parameter) || !ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) { @@ -56328,8 +56801,8 @@ var ts; var witnesses = getSwitchClauseTypeOfWitnesses(node); // notEqualFacts states that the type of the switched value is not equal to every type in the switch. var notEqualFacts_1 = getFactsFromTypeofSwitch(0, 0, witnesses, /*hasDefault*/ true); - var type_4 = getBaseConstraintOfType(operandType) || operandType; - return !!(filterType(type_4, function (t) { return (getTypeFacts(t) & notEqualFacts_1) === notEqualFacts_1; }).flags & 131072 /* Never */); + var type_3 = getBaseConstraintOfType(operandType) || operandType; + return !!(filterType(type_3, function (t) { return (getTypeFacts(t) & notEqualFacts_1) === notEqualFacts_1; }).flags & 131072 /* Never */); } var type = getTypeOfExpression(node.expression); if (!isLiteralType(type)) { @@ -56456,9 +56929,9 @@ var ts; return links.contextFreeType; } var returnType = getReturnTypeFromBody(node, checkMode); - var returnOnlySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, returnType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); + var returnOnlySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, returnType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */); var returnOnlyType = createAnonymousType(node.symbol, emptySymbols, [returnOnlySignature], ts.emptyArray, undefined, undefined); - returnOnlyType.objectFlags |= 1048576 /* NonInferrableType */; + returnOnlyType.objectFlags |= 2097152 /* NonInferrableType */; return links.contextFreeType = returnOnlyType; } return anyFunctionType; @@ -56687,8 +57160,7 @@ var ts; var span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos); var diagnostic = ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.await_expression_is_only_allowed_within_an_async_function); var func = ts.getContainingFunction(node); - if (func && func.kind !== 161 /* Constructor */) { - ts.Debug.assert((ts.getFunctionFlags(func) & 2 /* Async */) === 0, "Enclosing function should never be an async function."); + if (func && func.kind !== 161 /* Constructor */ && (ts.getFunctionFlags(func) & 2 /* Async */) === 0) { var relatedInfo = ts.createDiagnosticForNode(func, ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async); ts.addRelatedInfo(diagnostic, relatedInfo); } @@ -56789,8 +57261,8 @@ var ts; } if (type.flags & 3145728 /* UnionOrIntersection */) { var types = type.types; - for (var _i = 0, types_17 = types; _i < types_17.length; _i++) { - var t = types_17[_i]; + for (var _i = 0, types_18 = types; _i < types_18.length; _i++) { + var t = types_18[_i]; if (maybeTypeOfKind(t, kind)) { return true; } @@ -57424,25 +57896,10 @@ var ts; } return [effectiveLeft, effectiveRight]; } - function isYieldExpressionInClass(node) { - var current = node; - var parent = node.parent; - while (parent) { - if (ts.isFunctionLike(parent) && current === parent.body) { - return false; - } - else if (ts.isClassLike(current)) { - return true; - } - current = parent; - parent = parent.parent; - } - return false; - } function checkYieldExpression(node) { // Grammar checking if (produceDiagnostics) { - if (!(node.flags & 8192 /* YieldContext */) || isYieldExpressionInClass(node)) { + if (!(node.flags & 8192 /* YieldContext */)) { grammarErrorOnFirstToken(node, ts.Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body); } if (isInParameterInitializerBeforeContainingFunction(node)) { @@ -57778,6 +58235,18 @@ var ts; } } } + function getReturnTypeOfSingleNonGenericCallSignature(funcType) { + var signature = getSingleCallSignature(funcType); + if (signature && !signature.typeParameters) { + return getReturnTypeOfSignature(signature); + } + } + function getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) { + var funcType = checkExpression(expr.expression); + var nonOptionalType = getOptionalExpressionType(funcType, expr.expression); + var returnType = getReturnTypeOfSingleNonGenericCallSignature(funcType); + return returnType && propagateOptionalTypeMarker(returnType, expr, nonOptionalType !== funcType); + } /** * Returns the type of an expression. Unlike checkExpression, this function is simply concerned * with computing the type and may not fully check all contained sub-expressions for errors. @@ -57789,10 +58258,10 @@ var ts; // Optimize for the common case of a call to a function with a single non-generic call // signature where we can just fetch the return type without checking the arguments. if (ts.isCallExpression(expr) && expr.expression.kind !== 101 /* SuperKeyword */ && !ts.isRequireCall(expr, /*checkArgumentIsStringLiteralLike*/ true) && !isSymbolOrSymbolForCall(expr)) { - var _a = checkOptionalExpression(expr, expr.expression), isOptional = _a.isOptional, funcType = _a.type; - var signature = getSingleCallSignature(funcType); - if (signature && !signature.typeParameters) { - return propagateOptionalTypeMarker(getReturnTypeOfSignature(signature), isOptional); + var type = ts.isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : + getReturnTypeOfSingleNonGenericCallSignature(checkNonNullExpression(expr.expression)); + if (type) { + return type; } } else if (ts.isAssertionExpression(expr) && !ts.isConstTypeReference(expr.type)) { @@ -57842,7 +58311,7 @@ var ts; (node.parent.kind === 194 /* ElementAccessExpression */ && node.parent.expression === node) || ((node.kind === 75 /* Identifier */ || node.kind === 152 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || (node.parent.kind === 171 /* TypeQuery */ && node.parent.exprName === node)) || - (node.parent.kind === 261 /* ExportSpecifier */ && (compilerOptions.preserveConstEnums || node.flags & 8388608 /* Ambient */)); // We allow reexporting const enums + (node.parent.kind === 261 /* ExportSpecifier */); // We allow reexporting const enums if (!ok) { error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query); } @@ -58046,7 +58515,7 @@ var ts; } else { if (typePredicate.parameterIndex >= 0) { - if (signature.hasRestParameter && typePredicate.parameterIndex === signature.parameters.length - 1) { + if (signatureHasRestParameter(signature) && typePredicate.parameterIndex === signature.parameters.length - 1) { error(parameterName, ts.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); } else { @@ -59221,7 +59690,7 @@ var ts; return; } // Verify there is no local declaration that could collide with the promise constructor. - var rootName = promiseConstructorName && getFirstIdentifier(promiseConstructorName); + var rootName = promiseConstructorName && ts.getFirstIdentifier(promiseConstructorName); var collidingSymbol = getSymbol(node.locals, rootName.escapedText, 111551 /* Value */); if (collidingSymbol) { error(collidingSymbol.valueDeclaration, ts.Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, ts.idText(rootName), ts.entityNameToString(promiseConstructorName)); @@ -59278,7 +59747,7 @@ var ts; function markEntityNameOrEntityExpressionAsReference(typeName) { if (!typeName) return; - var rootName = getFirstIdentifier(typeName); + var rootName = ts.getFirstIdentifier(typeName); var meaning = (typeName.kind === 75 /* Identifier */ ? 788968 /* Type */ : 1920 /* Namespace */) | 2097152 /* Alias */; var rootSymbol = resolveName(rootName, rootName.escapedText, meaning, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isRefernce*/ true); if (rootSymbol @@ -59318,8 +59787,8 @@ var ts; } function getEntityNameForDecoratorMetadataFromTypeList(types) { var commonEntityName; - for (var _i = 0, types_18 = types; _i < types_18.length; _i++) { - var typeNode = types_18[_i]; + for (var _i = 0, types_19 = types; _i < types_19.length; _i++) { + var typeNode = types_19[_i]; while (typeNode.kind === 181 /* ParenthesizedType */) { typeNode = typeNode.type; // Skip parens if need be } @@ -61094,10 +61563,7 @@ var ts; firstDefaultClause = clause; } else { - var sourceFile = ts.getSourceFileOfNode(node); - var start = ts.skipTrivia(sourceFile.text, clause.pos); - var end = clause.statements.length > 0 ? clause.statements[0].pos : clause.end; - grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement); + grammarErrorOnNode(clause, ts.Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement); hasDuplicateDefaultClause = true; } } @@ -61118,6 +61584,9 @@ var ts; } } ts.forEach(clause.statements, checkSourceElement); + if (compilerOptions.noFallthroughCasesInSwitch && clause.fallthroughFlowNode && isReachableFlowNode(clause.fallthroughFlowNode)) { + error(clause, ts.Diagnostics.Fallthrough_case_in_switch); + } }); if (node.caseBlock.locals) { registerForUnusedIdentifiersCheck(node.caseBlock); @@ -61640,11 +62109,13 @@ var ts; // same when the derived property is from an assignment continue; } - if (basePropertyFlags !== 4 /* Property */ && derivedPropertyFlags === 4 /* Property */) { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_property; - } - else if (basePropertyFlags === 4 /* Property */ && derivedPropertyFlags !== 4 /* Property */) { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_accessor; + var overriddenInstanceProperty = basePropertyFlags !== 4 /* Property */ && derivedPropertyFlags === 4 /* Property */; + var overriddenInstanceAccessor = basePropertyFlags === 4 /* Property */ && derivedPropertyFlags !== 4 /* Property */; + if (overriddenInstanceProperty || overriddenInstanceAccessor) { + var errorMessage_1 = overriddenInstanceProperty ? + ts.Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property : + ts.Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor; + error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage_1, symbolToString(base), typeToString(baseType), typeToString(type)); } else { var uninitialized = ts.find(derived.declarations, function (d) { return d.kind === 158 /* PropertyDeclaration */ && !d.initializer; }); @@ -61660,24 +62131,22 @@ var ts; || !ts.isIdentifier(propName) || !strictNullChecks || !isPropertyInitializedInConstructor(propName, type, constructor)) { - var errorMessage_1 = ts.Diagnostics.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration; - error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage_1, symbolToString(base), typeToString(baseType)); + var errorMessage_2 = ts.Diagnostics.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration; + error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage_2, symbolToString(base), typeToString(baseType)); } } - // correct case - continue; } + // correct case + continue; } else if (isPrototypeProperty(base)) { - if (isPrototypeProperty(derived)) { - // method is overridden with method -- correct case + if (isPrototypeProperty(derived) || derived.flags & 4 /* Property */) { + // method is overridden with method or property -- correct case continue; } - else if (derived.flags & 98304 /* Accessor */) { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor; - } else { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property; + ts.Debug.assert(!!(derived.flags & 98304 /* Accessor */)); + errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor; } } else if (base.flags & 98304 /* Accessor */) { @@ -62183,22 +62652,6 @@ var ts; break; } } - function getFirstIdentifier(node) { - switch (node.kind) { - case 75 /* Identifier */: - return node; - case 152 /* QualifiedName */: - do { - node = node.left; - } while (node.kind !== 75 /* Identifier */); - return node; - case 193 /* PropertyAccessExpression */: - do { - node = node.expression; - } while (node.kind !== 75 /* Identifier */); - return node; - } - } function getFirstNonModuleExportsIdentifier(node) { switch (node.kind) { case 75 /* Identifier */: @@ -62328,7 +62781,7 @@ var ts; if (target !== unknownSymbol) { if (target.flags & 111551 /* Value */) { // Target is a value symbol, check that it is not hidden by a local declaration with the same name - var moduleName = getFirstIdentifier(node.moduleReference); + var moduleName = ts.getFirstIdentifier(node.moduleReference); if (!(resolveEntityName(moduleName, 111551 /* Value */ | 1920 /* Namespace */).flags & 1920 /* Namespace */)) { error(moduleName, ts.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, ts.declarationNameToString(moduleName)); } @@ -62395,7 +62848,7 @@ var ts; // find immediate value referenced by exported name (SymbolFlags.Alias is set so we don't chase down aliases) var symbol = resolveName(exportedName, exportedName.escapedText, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ true); - if (symbol && (symbol === undefinedSymbol || isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0])))) { + if (symbol && (symbol === undefinedSymbol || symbol === globalThisSymbol || isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0])))) { error(exportedName, ts.Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, ts.idText(exportedName)); } else { @@ -64701,10 +65154,10 @@ var ts; if (type.flags & 4 /* String */ || type.flags & 8 /* Number */) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead, ts.getTextOfNode(parameter.name), typeToString(type), typeToString(node.type ? getTypeFromTypeNode(node.type) : anyType)); } - if (type.flags & 1048576 /* Union */ && allTypesAssignableToKind(type, 128 /* StringLiteral */, /*strict*/ true)) { + if (type.flags & 1048576 /* Union */ && allTypesAssignableToKind(type, 384 /* StringOrNumberLiteral */, /*strict*/ true)) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead); } - return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number); + return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_either_string_or_number); } if (!node.type) { return grammarErrorOnNode(node, ts.Diagnostics.An_index_signature_must_have_a_type_annotation); @@ -65587,7 +66040,7 @@ var ts; } function checkGrammarImportCallExpression(node) { if (moduleKind === ts.ModuleKind.ES2015) { - return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext); + return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_commonjs_amd_system_or_umd); } if (node.typeArguments) { return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_cannot_have_type_arguments); @@ -65657,6 +66110,14 @@ var ts; case 2 /* Next */: return "nextType"; } } + function signatureHasRestParameter(s) { + return !!(s.flags & 1 /* HasRestParameter */); + } + ts.signatureHasRestParameter = signatureHasRestParameter; + function signatureHasLiteralTypes(s) { + return !!(s.flags & 2 /* HasLiteralTypes */); + } + ts.signatureHasLiteralTypes = signatureHasLiteralTypes; })(ts || (ts = {})); var ts; (function (ts) { @@ -66590,7 +67051,9 @@ var ts; } ts.createPropertyAccess = createPropertyAccess; function updatePropertyAccess(node, expression, name) { - ts.Debug.assert(!(node.flags & 32 /* OptionalChain */), "Cannot update a PropertyAccessChain using updatePropertyAccess. Use updatePropertyAccessChain instead."); + if (ts.isOptionalChain(node)) { + return updatePropertyAccessChain(node, expression, node.questionDotToken, name); + } // Because we are updating existed propertyAccess we want to inherit its emitFlags // instead of using the default from createPropertyAccess return node.expression !== expression @@ -66628,7 +67091,9 @@ var ts; } ts.createElementAccess = createElementAccess; function updateElementAccess(node, expression, argumentExpression) { - ts.Debug.assert(!(node.flags & 32 /* OptionalChain */), "Cannot update an ElementAccessChain using updateElementAccess. Use updateElementAccessChain instead."); + if (ts.isOptionalChain(node)) { + return updateElementAccessChain(node, expression, node.questionDotToken, argumentExpression); + } return node.expression !== expression || node.argumentExpression !== argumentExpression ? updateNode(createElementAccess(expression, argumentExpression), node) @@ -66662,7 +67127,9 @@ var ts; } ts.createCall = createCall; function updateCall(node, expression, typeArguments, argumentsArray) { - ts.Debug.assert(!(node.flags & 32 /* OptionalChain */), "Cannot update a CallChain using updateCall. Use updateCallChain instead."); + if (ts.isOptionalChain(node)) { + return updateCallChain(node, expression, node.questionDotToken, typeArguments, argumentsArray); + } return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray @@ -67264,7 +67731,7 @@ var ts; var node = createSynthesizedNode(231 /* ForOfStatement */); node.awaitModifier = awaitModifier; node.initializer = initializer; - node.expression = expression; + node.expression = ts.isCommaSequence(expression) ? createParen(expression) : expression; node.statement = asEmbeddedStatement(statement); return node; } @@ -69790,7 +70257,7 @@ var ts; var conditionalPrecedence = ts.getOperatorPrecedence(209 /* ConditionalExpression */, 57 /* QuestionToken */); var emittedCondition = ts.skipPartiallyEmittedExpressions(condition); var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition); - if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1 /* LessThan */) { + if (ts.compareValues(conditionPrecedence, conditionalPrecedence) !== 1 /* GreaterThan */) { return ts.createParen(condition); } return condition; @@ -70388,6 +70855,12 @@ var ts; * Gets the property name of a BindingOrAssignmentElement */ function getPropertyNameOfBindingOrAssignmentElement(bindingElement) { + var propertyName = tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement); + ts.Debug.assert(!!propertyName || ts.isSpreadAssignment(bindingElement), "Invalid property name for binding element."); + return propertyName; + } + ts.getPropertyNameOfBindingOrAssignmentElement = getPropertyNameOfBindingOrAssignmentElement; + function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { case 190 /* BindingElement */: // `a` in `let { a: b } = ...` @@ -70423,9 +70896,8 @@ var ts; ? target.expression : target; } - ts.Debug.fail("Invalid property name for binding element."); } - ts.getPropertyNameOfBindingOrAssignmentElement = getPropertyNameOfBindingOrAssignmentElement; + ts.tryGetPropertyNameOfBindingOrAssignmentElement = tryGetPropertyNameOfBindingOrAssignmentElement; function isStringOrNumericLiteral(node) { var kind = node.kind; return kind === 10 /* StringLiteral */ @@ -72444,7 +72916,8 @@ var ts; }; if (value) { value = ts.visitNode(value, visitor, ts.isExpression); - if (ts.isIdentifier(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText)) { + if (ts.isIdentifier(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText) || + bindingOrAssignmentElementContainsNonLiteralComputedName(node)) { // If the right-hand value of the assignment is also an assignment target then // we need to cache the right-hand value. value = ensureIdentifier(flattenContext, value, /*reuseIdentifierExpressions*/ false, location); @@ -72513,6 +72986,17 @@ var ts; } return false; } + function bindingOrAssignmentElementContainsNonLiteralComputedName(element) { + var propertyName = ts.tryGetPropertyNameOfBindingOrAssignmentElement(element); + if (propertyName && ts.isComputedPropertyName(propertyName) && !ts.isLiteralExpression(propertyName.expression)) { + return true; + } + var target = ts.getTargetOfBindingOrAssignmentElement(element); + return !!target && ts.isBindingOrAssignmentPattern(target) && bindingOrAssignmentPatternContainsNonLiteralComputedName(target); + } + function bindingOrAssignmentPatternContainsNonLiteralComputedName(pattern) { + return !!ts.forEach(ts.getElementsOfBindingOrAssignmentPattern(pattern), bindingOrAssignmentElementContainsNonLiteralComputedName); + } /** * Flattens a VariableDeclaration or ParameterDeclaration to one or more variable declarations. * @@ -72543,7 +73027,8 @@ var ts; }; if (ts.isVariableDeclaration(node)) { var initializer = ts.getInitializerOfBindingOrAssignmentElement(node); - if (initializer && ts.isIdentifier(initializer) && bindingOrAssignmentElementAssignsToName(node, initializer.escapedText)) { + if (initializer && (ts.isIdentifier(initializer) && bindingOrAssignmentElementAssignsToName(node, initializer.escapedText) || + bindingOrAssignmentElementContainsNonLiteralComputedName(node))) { // If the right-hand value of the assignment is also an assignment target then // we need to cache the right-hand value. initializer = ensureIdentifier(flattenContext, initializer, /*reuseIdentifierExpressions*/ false, initializer); @@ -73842,8 +74327,8 @@ var ts; function generateClassElementDecorationExpressions(node, isStatic) { var members = getDecoratedClassElements(node, isStatic); var expressions; - for (var _i = 0, members_5 = members; _i < members_5.length; _i++) { - var member = members_5[_i]; + for (var _i = 0, members_6 = members; _i < members_6.length; _i++) { + var member = members_6[_i]; var expression = generateClassElementDecorationExpression(node, member); if (expression) { if (!expressions) { @@ -74233,8 +74718,8 @@ var ts; // Note when updating logic here also update getEntityNameForDecoratorMetadata // so that aliases can be marked as referenced var serializedUnion; - for (var _i = 0, types_19 = types; _i < types_19.length; _i++) { - var typeNode = types_19[_i]; + for (var _i = 0, types_20 = types; _i < types_20.length; _i++) { + var typeNode = types_20[_i]; while (typeNode.kind === 181 /* ParenthesizedType */) { typeNode = typeNode.type; // Skip parens if need be } @@ -74846,7 +75331,12 @@ var ts; * * @param node The module declaration node. */ - function shouldEmitModuleDeclaration(node) { + function shouldEmitModuleDeclaration(nodeIn) { + var node = ts.getParseTreeNode(nodeIn, ts.isModuleDeclaration); + if (!node) { + // If we can't find a parse tree node, assume the node is instantiated. + return true; + } return ts.isInstantiatedModule(node, !!compilerOptions.preserveConstEnums || !!compilerOptions.isolatedModules); } /** @@ -75665,7 +76155,7 @@ var ts; // Create a temporary variable to store a computed property name (if necessary). // If it's not inlineable, then we emit an expression after the class which assigns // the property name to the temporary variable. - var expr = getPropertyNameExpressionIfNeeded(node.name, !!node.initializer); + var expr = getPropertyNameExpressionIfNeeded(node.name, !!node.initializer || !!context.getCompilerOptions().useDefineForClassFields); if (expr && !ts.isSimpleInlineableExpression(expr)) { (pendingExpressions || (pendingExpressions = [])).push(expr); } @@ -77422,7 +77912,7 @@ var ts; } return ts.updateParen(node, expression); } - function visitNonOptionalPropertyAccessExpression(node, captureThisArg) { + function visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg) { if (ts.isOptionalChain(node)) { // If `node` is an optional chain, then it is the outermost chain of an optional expression. return visitOptionalExpression(node, captureThisArg); @@ -77431,27 +77921,17 @@ var ts; ts.Debug.assertNotNode(expression, ts.isSyntheticReference); var thisArg; if (captureThisArg) { - // `a.b` -> { expression: `(_a = a).b`, thisArg: `_a` } - thisArg = ts.createTempVariable(hoistVariableDeclaration); - expression = ts.createParen(ts.createAssignment(thisArg, expression)); + if (shouldCaptureInTempVariable(expression)) { + thisArg = ts.createTempVariable(hoistVariableDeclaration); + expression = ts.createAssignment(thisArg, expression); + } + else { + thisArg = expression; + } } - expression = ts.updatePropertyAccess(node, expression, ts.visitNode(node.name, visitor, ts.isIdentifier)); - return thisArg ? ts.createSyntheticReferenceExpression(expression, thisArg) : expression; - } - function visitNonOptionalElementAccessExpression(node, captureThisArg) { - if (ts.isOptionalChain(node)) { - // If `node` is an optional chain, then it is the outermost chain of an optional expression. - return visitOptionalExpression(node, captureThisArg); - } - var expression = ts.visitNode(node.expression, visitor, ts.isExpression); - ts.Debug.assertNotNode(expression, ts.isSyntheticReference); - var thisArg; - if (captureThisArg) { - // `a[b]` -> { expression: `(_a = a)[b]`, thisArg: `_a` } - thisArg = ts.createTempVariable(hoistVariableDeclaration); - expression = ts.createParen(ts.createAssignment(thisArg, expression)); - } - expression = ts.updateElementAccess(node, expression, ts.visitNode(node.argumentExpression, visitor, ts.isExpression)); + expression = node.kind === 193 /* PropertyAccessExpression */ + ? ts.updatePropertyAccess(node, expression, ts.visitNode(node.name, visitor, ts.isIdentifier)) + : ts.updateElementAccess(node, expression, ts.visitNode(node.argumentExpression, visitor, ts.isExpression)); return thisArg ? ts.createSyntheticReferenceExpression(expression, thisArg) : expression; } function visitNonOptionalCallExpression(node, captureThisArg) { @@ -77464,8 +77944,8 @@ var ts; function visitNonOptionalExpression(node, captureThisArg) { switch (node.kind) { case 199 /* ParenthesizedExpression */: return visitNonOptionalParenthesizedExpression(node, captureThisArg); - case 193 /* PropertyAccessExpression */: return visitNonOptionalPropertyAccessExpression(node, captureThisArg); - case 194 /* ElementAccessExpression */: return visitNonOptionalElementAccessExpression(node, captureThisArg); + case 193 /* PropertyAccessExpression */: + case 194 /* ElementAccessExpression */: return visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg); case 195 /* CallExpression */: return visitNonOptionalCallExpression(node, captureThisArg); default: return ts.visitNode(node, visitor, ts.isExpression); } @@ -77473,31 +77953,36 @@ var ts; function visitOptionalExpression(node, captureThisArg) { var _a = flattenChain(node), expression = _a.expression, chain = _a.chain; var left = visitNonOptionalExpression(expression, ts.isCallChain(chain[0])); - var temp = ts.createTempVariable(hoistVariableDeclaration); var leftThisArg = ts.isSyntheticReference(left) ? left.thisArg : undefined; var leftExpression = ts.isSyntheticReference(left) ? left.expression : left; - var rightExpression = temp; + var capturedLeft = leftExpression; + if (shouldCaptureInTempVariable(leftExpression)) { + capturedLeft = ts.createTempVariable(hoistVariableDeclaration); + leftExpression = ts.createAssignment(capturedLeft, leftExpression); + } + var rightExpression = capturedLeft; var thisArg; for (var i = 0; i < chain.length; i++) { var segment = chain[i]; switch (segment.kind) { case 193 /* PropertyAccessExpression */: - if (i === chain.length - 1 && captureThisArg) { - thisArg = ts.createTempVariable(hoistVariableDeclaration); - rightExpression = ts.createParen(ts.createAssignment(thisArg, rightExpression)); - } - rightExpression = ts.createPropertyAccess(rightExpression, ts.visitNode(segment.name, visitor, ts.isIdentifier)); - break; case 194 /* ElementAccessExpression */: if (i === chain.length - 1 && captureThisArg) { - thisArg = ts.createTempVariable(hoistVariableDeclaration); - rightExpression = ts.createParen(ts.createAssignment(thisArg, rightExpression)); + if (shouldCaptureInTempVariable(rightExpression)) { + thisArg = ts.createTempVariable(hoistVariableDeclaration); + rightExpression = ts.createAssignment(thisArg, rightExpression); + } + else { + thisArg = rightExpression; + } } - rightExpression = ts.createElementAccess(rightExpression, ts.visitNode(segment.argumentExpression, visitor, ts.isExpression)); + rightExpression = segment.kind === 193 /* PropertyAccessExpression */ + ? ts.createPropertyAccess(rightExpression, ts.visitNode(segment.name, visitor, ts.isIdentifier)) + : ts.createElementAccess(rightExpression, ts.visitNode(segment.argumentExpression, visitor, ts.isExpression)); break; case 195 /* CallExpression */: if (i === 0 && leftThisArg) { - rightExpression = ts.createFunctionCall(rightExpression, leftThisArg, ts.visitNodes(segment.arguments, visitor, ts.isExpression)); + rightExpression = ts.createFunctionCall(rightExpression, leftThisArg.kind === 101 /* SuperKeyword */ ? ts.createThis() : leftThisArg, ts.visitNodes(segment.arguments, visitor, ts.isExpression)); } else { rightExpression = ts.createCall(rightExpression, @@ -77507,22 +77992,27 @@ var ts; } ts.setOriginalNode(rightExpression, segment); } - var target = ts.createConditional(ts.createLogicalOr(ts.createStrictEquality(ts.createAssignment(temp, leftExpression), ts.createNull()), ts.createStrictEquality(temp, ts.createVoidZero())), ts.createVoidZero(), rightExpression); + var target = ts.createConditional(createNotNullCondition(leftExpression, capturedLeft, /*invert*/ true), ts.createVoidZero(), rightExpression); return thisArg ? ts.createSyntheticReferenceExpression(target, thisArg) : target; } - function createNotNullCondition(node) { - return ts.createBinary(ts.createBinary(node, ts.createToken(37 /* ExclamationEqualsEqualsToken */), ts.createNull()), ts.createToken(55 /* AmpersandAmpersandToken */), ts.createBinary(node, ts.createToken(37 /* ExclamationEqualsEqualsToken */), ts.createVoidZero())); + function createNotNullCondition(left, right, invert) { + return ts.createBinary(ts.createBinary(left, ts.createToken(invert ? 36 /* EqualsEqualsEqualsToken */ : 37 /* ExclamationEqualsEqualsToken */), ts.createNull()), ts.createToken(invert ? 56 /* BarBarToken */ : 55 /* AmpersandAmpersandToken */), ts.createBinary(right, ts.createToken(invert ? 36 /* EqualsEqualsEqualsToken */ : 37 /* ExclamationEqualsEqualsToken */), ts.createVoidZero())); } function transformNullishCoalescingExpression(node) { - var expressions = []; var left = ts.visitNode(node.left, visitor, ts.isExpression); - if (!ts.isIdentifier(left)) { - var temp = ts.createTempVariable(hoistVariableDeclaration); - expressions.push(ts.createAssignment(temp, left)); - left = temp; + var right = left; + if (shouldCaptureInTempVariable(left)) { + right = ts.createTempVariable(hoistVariableDeclaration); + left = ts.createAssignment(right, left); } - expressions.push(ts.createParen(ts.createConditional(createNotNullCondition(left), left, ts.visitNode(node.right, visitor, ts.isExpression)))); - return ts.inlineExpressions(expressions); + return ts.createConditional(createNotNullCondition(left, right), right, ts.visitNode(node.right, visitor, ts.isExpression)); + } + function shouldCaptureInTempVariable(expression) { + // don't capture identifiers and `this` in a temporary variable + // `super` cannot be captured as it's no real variable + return !ts.isIdentifier(expression) && + expression.kind !== 103 /* ThisKeyword */ && + expression.kind !== 101 /* SuperKeyword */; } } ts.transformESNext = transformESNext; @@ -87680,6 +88170,7 @@ var ts; var combinedStatements; if (ts.isSourceFileJS(currentSourceFile)) { combinedStatements = ts.createNodeArray(transformDeclarationsForJS(node)); + refs.forEach(referenceVisitor); emittedImports = ts.filter(combinedStatements, ts.isAnyImportSyntax); } else { @@ -89451,7 +89942,11 @@ var ts; bundleBuildInfo.js = printer.bundleFileInfo; } function emitDeclarationFileOrBundle(sourceFileOrBundle, declarationFilePath, declarationMapPath, relativeToBuildInfo) { - if (!sourceFileOrBundle || !declarationFilePath) { + if (!sourceFileOrBundle) + return; + if (!declarationFilePath) { + if (emitOnlyDtsFiles || compilerOptions.emitDeclarationOnly) + emitSkipped = true; return; } var sourceFiles = ts.isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : sourceFileOrBundle.sourceFiles; @@ -92205,8 +92700,8 @@ var ts; bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "reference" /* Reference */, data: directive.fileName }); writeLine(); } - for (var _d = 0, types_20 = types; _d < types_20.length; _d++) { - var directive = types_20[_d]; + for (var _d = 0, types_21 = types; _d < types_21.length; _d++) { + var directive = types_21[_d]; var pos = writer.getTextPos(); writeComment("/// "); if (bundleFileInfo) @@ -94081,31 +94576,39 @@ var ts; if (existingDirectories.has(directoryPath)) { return true; } - if (system.directoryExists(directoryPath)) { + if ((compilerHost.directoryExists || system.directoryExists)(directoryPath)) { existingDirectories.set(directoryPath, true); return true; } return false; } - function ensureDirectoriesExist(directoryPath) { - if (directoryPath.length > ts.getRootLength(directoryPath) && !directoryExists(directoryPath)) { - var parentDirectory = ts.getDirectoryPath(directoryPath); - ensureDirectoriesExist(parentDirectory); - if (compilerHost.createDirectory) { - compilerHost.createDirectory(directoryPath); - } - else { - system.createDirectory(directoryPath); + function writeFile(fileName, data, writeByteOrderMark, onError) { + try { + ts.performance.mark("beforeIOWrite"); + // NOTE: If patchWriteFileEnsuringDirectory has been called, + // the system.writeFile will do its own directory creation and + // the ensureDirectoriesExist call will always be redundant. + ts.writeFileEnsuringDirectories(fileName, data, writeByteOrderMark, function (path, data, writeByteOrderMark) { return writeFileWorker(path, data, writeByteOrderMark); }, function (path) { return (compilerHost.createDirectory || system.createDirectory)(path); }, function (path) { return directoryExists(path); }); + ts.performance.mark("afterIOWrite"); + ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite"); + } + catch (e) { + if (onError) { + onError(e.message); } } } var outputFingerprints; - function writeFileIfUpdated(fileName, data, writeByteOrderMark) { + function writeFileWorker(fileName, data, writeByteOrderMark) { + if (!ts.isWatchSet(options) || !system.createHash || !system.getModifiedTime) { + system.writeFile(fileName, data, writeByteOrderMark); + return; + } if (!outputFingerprints) { outputFingerprints = ts.createMap(); } - var hash = system.createHash(data); // TODO: GH#18217 - var mtimeBefore = system.getModifiedTime(fileName); // TODO: GH#18217 + var hash = system.createHash(data); + var mtimeBefore = system.getModifiedTime(fileName); if (mtimeBefore) { var fingerprint = outputFingerprints.get(fileName); // If output has not been changed, and the file has no external modification @@ -94117,32 +94620,13 @@ var ts; } } system.writeFile(fileName, data, writeByteOrderMark); - var mtimeAfter = system.getModifiedTime(fileName) || ts.missingFileModifiedTime; // TODO: GH#18217 + var mtimeAfter = system.getModifiedTime(fileName) || ts.missingFileModifiedTime; outputFingerprints.set(fileName, { hash: hash, byteOrderMark: writeByteOrderMark, mtime: mtimeAfter }); } - function writeFile(fileName, data, writeByteOrderMark, onError) { - try { - ts.performance.mark("beforeIOWrite"); - ensureDirectoriesExist(ts.getDirectoryPath(ts.normalizePath(fileName))); - if (ts.isWatchSet(options) && system.createHash && system.getModifiedTime) { - writeFileIfUpdated(fileName, data, writeByteOrderMark); - } - else { - system.writeFile(fileName, data, writeByteOrderMark); - } - ts.performance.mark("afterIOWrite"); - ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite"); - } - catch (e) { - if (onError) { - onError(e.message); - } - } - } function getDefaultLibLocation() { return ts.getDirectoryPath(ts.normalizePath(system.getExecutingFilePath())); } @@ -95864,9 +96348,16 @@ var ts; } function getSourceFileFromReferenceWorker(fileName, getSourceFile, fail, refFile) { if (ts.hasExtension(fileName)) { - if (!options.allowNonTsExtensions && !ts.forEach(supportedExtensionsWithJsonIfResolveJsonModule, function (extension) { return ts.fileExtensionIs(host.getCanonicalFileName(fileName), extension); })) { - if (fail) - fail(ts.Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1, fileName, "'" + supportedExtensions.join("', '") + "'"); + var canonicalFileName_1 = host.getCanonicalFileName(fileName); + if (!options.allowNonTsExtensions && !ts.forEach(supportedExtensionsWithJsonIfResolveJsonModule, function (extension) { return ts.fileExtensionIs(canonicalFileName_1, extension); })) { + if (fail) { + if (ts.hasJSFileExtension(canonicalFileName_1)) { + fail(ts.Diagnostics.File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option, fileName); + } + else { + fail(ts.Diagnostics.File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1, fileName, "'" + supportedExtensions.join("', '") + "'"); + } + } return undefined; } var sourceFile = getSourceFile(fileName); @@ -95880,7 +96371,7 @@ var ts; fail(ts.Diagnostics.File_0_not_found, fileName); } } - else if (refFile && host.getCanonicalFileName(fileName) === host.getCanonicalFileName(refFile.fileName)) { + else if (refFile && canonicalFileName_1 === host.getCanonicalFileName(refFile.fileName)) { fail(ts.Diagnostics.A_file_cannot_have_a_reference_to_itself); } } @@ -95938,6 +96429,19 @@ var ts; function findSourceFile(fileName, path, isDefaultLib, ignoreNoDefaultLib, refFile, packageId) { if (useSourceOfProjectReferenceRedirect) { var source = getSourceOfProjectReferenceRedirect(fileName); + // If preserveSymlinks is true, module resolution wont jump the symlink + // but the resolved real path may be the .d.ts from project reference + // Note:: Currently we try the real path only if the + // file is from node_modules to avoid having to run real path on all file paths + if (!source && + host.realpath && + options.preserveSymlinks && + ts.isDeclarationFileName(fileName) && + ts.stringContains(fileName, ts.nodeModulesPathPart)) { + var realPath = host.realpath(fileName); + if (realPath !== fileName) + source = getSourceOfProjectReferenceRedirect(realPath); + } if (source) { var file_1 = ts.isString(source) ? findSourceFile(source, toPath(source), isDefaultLib, ignoreNoDefaultLib, refFile, packageId) : @@ -96468,9 +96972,6 @@ var ts; else if (options.incremental && !options.outFile && !options.out && !options.configFilePath) { programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified)); } - if (options.noEmit && ts.isIncrementalCompilation(options)) { - createDiagnosticForOptionName(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", options.incremental ? "incremental" : "composite"); - } verifyProjectReferences(); // List of collected files is complete; validate exhautiveness if this is a project with a file list if (options.composite) { @@ -97515,6 +98016,7 @@ var ts; ts.Debug.assert(state.seenAffectedFiles === undefined); state.seenAffectedFiles = ts.createMap(); } + state.emittedBuildInfo = !state.changedFilesSet.size && !state.affectedFilesPendingEmit; return state; } function convertToDiagnostics(diagnostics, newProgram, getCanonicalFileName) { @@ -98245,7 +98747,7 @@ var ts; } var state = { fileInfos: fileInfos, - compilerOptions: convertFromReusableCompilerOptions(program.options, toAbsolutePath), + compilerOptions: ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath), referencedMap: getMapOfReferencedSet(program.referencedMap, toPath), exportedModulesMap: getMapOfReferencedSet(program.exportedModulesMap, toPath), semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toPath(ts.isString(value) ? value : value[0]); }, function (value) { return ts.isString(value) ? ts.emptyArray : value[1]; }), @@ -98281,33 +98783,6 @@ var ts; } } ts.createBuildProgramUsingProgramBuildInfo = createBuildProgramUsingProgramBuildInfo; - function convertFromReusableCompilerOptions(options, toAbsolutePath) { - var result = {}; - var optionsNameMap = ts.getOptionNameMap().optionNameMap; - for (var name in options) { - if (ts.hasProperty(options, name)) { - result[name] = convertFromReusableCompilerOptionValue(optionsNameMap.get(name.toLowerCase()), options[name], toAbsolutePath); - } - } - if (result.configFilePath) { - result.configFilePath = toAbsolutePath(result.configFilePath); - } - return result; - } - function convertFromReusableCompilerOptionValue(option, value, toAbsolutePath) { - if (option) { - if (option.type === "list") { - var values = value; - if (option.element.isFilePath && values.length) { - return values.map(toAbsolutePath); - } - } - else if (option.isFilePath) { - return toAbsolutePath(value); - } - } - return value; - } function createRedirectedBuilderProgram(state, configFileParsingDiagnostics) { return { getState: ts.notImplemented, @@ -99040,7 +99515,7 @@ var ts; function getPreferencesForUpdate(compilerOptions, oldImportSpecifier) { return { relativePreference: ts.isExternalModuleNameRelative(oldImportSpecifier) ? 0 /* Relative */ : 1 /* NonRelative */, - ending: ts.hasJSOrJsonFileExtension(oldImportSpecifier) ? + ending: ts.hasJSFileExtension(oldImportSpecifier) ? 2 /* JsExtension */ : ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeJs || ts.endsWith(oldImportSpecifier, "index") ? 1 /* Index */ : 0 /* Minimal */, }; @@ -99126,7 +99601,7 @@ var ts; var imports = _a.imports; return ts.firstDefined(imports, function (_a) { var text = _a.text; - return ts.pathIsRelative(text) ? ts.hasJSOrJsonFileExtension(text) : undefined; + return ts.pathIsRelative(text) ? ts.hasJSFileExtension(text) : undefined; }) || false; } function numberOfDirectorySeparators(str) { @@ -99260,10 +99735,13 @@ var ts; // Simplify the full file path to something that can be resolved by Node. // If the module could be imported by a directory name, use that directory's name var moduleSpecifier = packageNameOnly ? moduleFileName : getDirectoryOrExtensionlessFileName(moduleFileName); + var globalTypingsCacheLocation = host.getGlobalTypingsCacheLocation && host.getGlobalTypingsCacheLocation(); // Get a path that's relative to node_modules or the importing file's path // if node_modules folder is in this folder or any of its parent folders, no need to keep it. - if (!ts.startsWith(sourceDirectory, getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex)))) + var pathToTopLevelNodeModules = getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex)); + if (!(ts.startsWith(sourceDirectory, pathToTopLevelNodeModules) || globalTypingsCacheLocation && ts.startsWith(getCanonicalFileName(globalTypingsCacheLocation), pathToTopLevelNodeModules))) { return undefined; + } // If the module was found in @types, get the actual Node package name var nodeModulesDirectoryName = moduleSpecifier.substring(parts.topLevelPackageNameIndex + 1); var packageName = ts.getPackageNameFromTypesPackageName(nodeModulesDirectoryName); @@ -99488,7 +99966,7 @@ var ts; /** Parses config file using System interface */ function parseConfigFileWithSystem(configFileName, optionsToExtend, system, reportDiagnostic) { var host = system; - host.onUnRecoverableConfigFileDiagnostic = function (diagnostic) { return reportUnrecoverableDiagnostic(ts.sys, reportDiagnostic, diagnostic); }; + host.onUnRecoverableConfigFileDiagnostic = function (diagnostic) { return reportUnrecoverableDiagnostic(system, reportDiagnostic, diagnostic); }; var result = ts.getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host); host.onUnRecoverableConfigFileDiagnostic = undefined; // TODO: GH#18217 return result; @@ -99512,7 +99990,7 @@ var ts; } ts.getErrorSummaryText = getErrorSummaryText; function listFiles(program, writeFileName) { - if (program.getCompilerOptions().listFiles) { + if (program.getCompilerOptions().listFiles || program.getCompilerOptions().listFilesOnly) { ts.forEach(program.getSourceFiles(), function (file) { writeFileName(file.fileName); }); @@ -99523,6 +100001,7 @@ var ts; * Helper that emit files, report diagnostics and lists emitted and/or source files depending on compiler options */ function emitFilesAndReportErrors(program, reportDiagnostic, writeFileName, reportSummary, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers) { + var isListFilesOnly = !!program.getCompilerOptions().listFilesOnly; // First get and report any syntactic errors. var diagnostics = program.getConfigFileParsingDiagnostics().slice(); var configFileParsingDiagnosticsLength = diagnostics.length; @@ -99531,13 +100010,17 @@ var ts; // semantic errors. if (diagnostics.length === configFileParsingDiagnosticsLength) { ts.addRange(diagnostics, program.getOptionsDiagnostics(cancellationToken)); - ts.addRange(diagnostics, program.getGlobalDiagnostics(cancellationToken)); - if (diagnostics.length === configFileParsingDiagnosticsLength) { - ts.addRange(diagnostics, program.getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken)); + if (!isListFilesOnly) { + ts.addRange(diagnostics, program.getGlobalDiagnostics(cancellationToken)); + if (diagnostics.length === configFileParsingDiagnosticsLength) { + ts.addRange(diagnostics, program.getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken)); + } } } // Emit and report any errors we ran into. - var emitResult = program.emit(/*targetSourceFile*/ undefined, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers); + var emitResult = isListFilesOnly + ? { emitSkipped: true, diagnostics: ts.emptyArray } + : program.emit(/*targetSourceFile*/ undefined, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers); var emittedFiles = emitResult.emittedFiles, emitDiagnostics = emitResult.diagnostics; ts.addRange(diagnostics, emitDiagnostics); ts.sortAndDeduplicateDiagnostics(diagnostics).forEach(reportDiagnostic); @@ -99640,19 +100123,13 @@ var ts; createHash: ts.maybeBind(host, host.createHash), readDirectory: ts.maybeBind(host, host.readDirectory), }; - function ensureDirectoriesExist(directoryPath) { - if (directoryPath.length > ts.getRootLength(directoryPath) && !host.directoryExists(directoryPath)) { - var parentDirectory = ts.getDirectoryPath(directoryPath); - ensureDirectoriesExist(parentDirectory); - if (host.createDirectory) - host.createDirectory(directoryPath); - } - } function writeFile(fileName, text, writeByteOrderMark, onError) { try { ts.performance.mark("beforeIOWrite"); - ensureDirectoriesExist(ts.getDirectoryPath(ts.normalizePath(fileName))); - host.writeFile(fileName, text, writeByteOrderMark); + // NOTE: If patchWriteFileEnsuringDirectory has been called, + // the host.writeFile will do its own directory creation and + // the ensureDirectoriesExist call will always be redundant. + ts.writeFileEnsuringDirectories(fileName, text, writeByteOrderMark, function (path, data, writeByteOrderMark) { return host.writeFile(path, data, writeByteOrderMark); }, function (path) { return host.createDirectory(path); }, function (path) { return host.directoryExists(path); }); ts.performance.mark("afterIOWrite"); ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite"); } @@ -101429,30 +101906,25 @@ var ts; setupInitialBuild(state, cancellationToken); var reportQueue = true; var successfulProjects = 0; - var errorProjects = 0; while (true) { var invalidatedProject = getNextInvalidatedProject(state, buildOrder, reportQueue); if (!invalidatedProject) break; reportQueue = false; invalidatedProject.done(cancellationToken); - if (state.diagnostics.has(invalidatedProject.projectPath)) { - errorProjects++; - } - else { + if (!state.diagnostics.has(invalidatedProject.projectPath)) successfulProjects++; - } } disableCache(state); reportErrorSummary(state, buildOrder); startWatching(state, buildOrder); - return isCircularBuildOrder(buildOrder) ? - ts.ExitStatus.ProjectReferenceCycle_OutputsSkupped : - errorProjects ? - successfulProjects ? - ts.ExitStatus.DiagnosticsPresent_OutputsGenerated : - ts.ExitStatus.DiagnosticsPresent_OutputsSkipped : - ts.ExitStatus.Success; + return isCircularBuildOrder(buildOrder) + ? ts.ExitStatus.ProjectReferenceCycle_OutputsSkipped + : !buildOrder.some(function (p) { return state.diagnostics.has(toResolvedConfigFilePath(state, p)); }) + ? ts.ExitStatus.Success + : successfulProjects + ? ts.ExitStatus.DiagnosticsPresent_OutputsGenerated + : ts.ExitStatus.DiagnosticsPresent_OutputsSkipped; } function clean(state, project, onlyReferences) { var buildOrder = getBuildOrderFor(state, project, onlyReferences); @@ -101460,7 +101932,7 @@ var ts; return ts.ExitStatus.InvalidProject_OutputsSkipped; if (isCircularBuildOrder(buildOrder)) { reportErrors(state, buildOrder.circularDiagnostics); - return ts.ExitStatus.ProjectReferenceCycle_OutputsSkupped; + return ts.ExitStatus.ProjectReferenceCycle_OutputsSkipped; } var options = state.options, host = state.host; var filesToDelete = options.dry ? [] : undefined; @@ -103755,6 +104227,25 @@ var ts; return a.fileName === b.fileName && textSpansEqual(a.textSpan, b.textSpan); } ts.documentSpansEqual = documentSpansEqual; + /** + * Iterates through 'array' by index and performs the callback on each element of array until the callback + * returns a truthy value, then returns that value. + * If no such value is found, the callback is applied to each element of array and undefined is returned. + */ + function forEachUnique(array, callback) { + if (array) { + for (var i = 0; i < array.length; i++) { + if (array.indexOf(array[i]) === i) { + var result = callback(array[i], i); + if (result) { + return result; + } + } + } + } + return undefined; + } + ts.forEachUnique = forEachUnique; })(ts || (ts = {})); // Display-part writer helpers /* @internal */ @@ -104502,10 +104993,11 @@ var ts; } var dependencyKeys = ["dependencies", "devDependencies", "optionalDependencies", "peerDependencies"]; var stringContent = host.readFile(fileName); - var content = stringContent && tryParseJson(stringContent); - if (!content) { + if (!stringContent) return undefined; - } + var content = tryParseJson(stringContent); + if (!content) + return false; var info = {}; for (var _i = 0, dependencyKeys_1 = dependencyKeys; _i < dependencyKeys_1.length; _i++) { var key = dependencyKeys_1[_i]; @@ -105030,8 +105522,10 @@ var ts; }); return { spans: spans, endOfLineState: 0 /* None */ }; function pushClassification(start, end, type) { + var length = end - start; + ts.Debug.assert(length > 0, "Classification had non-positive length of " + length); spans.push(start); - spans.push(end - start); + spans.push(length); spans.push(type); } } @@ -105450,8 +105944,7 @@ var ts; return 25 /* bigintLiteral */; } else if (tokenKind === 10 /* StringLiteral */) { - // TODO: GH#18217 - return token.parent.kind === 271 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; + return token && token.parent.kind === 271 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; } else if (tokenKind === 13 /* RegularExpressionLiteral */) { // TODO: we should get another classification type for these literals. @@ -105709,7 +106202,7 @@ var ts; var candidates = []; checker.getResolvedSignature(argumentInfo.invocation, candidates, argumentInfo.argumentCount); var types = ts.flatMap(candidates, function (candidate) { - if (!candidate.hasRestParameter && argumentInfo.argumentCount > candidate.parameters.length) + if (!ts.signatureHasRestParameter(candidate) && argumentInfo.argumentCount > candidate.parameters.length) return; var type = checker.getParameterType(candidate, argumentInfo.argumentIndex); isNewIdentifier = isNewIdentifier || !!(type.flags & 4 /* String */); @@ -106859,6 +107352,7 @@ var ts; var completionKind = 5 /* None */; var isNewIdentifierLocation = false; var keywordFilters = 0 /* None */; + // This also gets mutated in nested-functions after the return var symbols = []; var symbolToOriginInfoMap = []; var symbolToSortTextMap = []; @@ -106965,8 +107459,15 @@ var ts; var type = typeChecker.getTypeOfSymbolAtLocation(symbol, node).getNonOptionalType(); var insertQuestionDot = false; if (type.isNullableType()) { - insertQuestionDot = isRightOfDot && !isRightOfQuestionDot; - type = type.getNonNullableType(); + var canCorrectToQuestionDot = isRightOfDot && + !isRightOfQuestionDot && + preferences.includeAutomaticOptionalChainCompletions !== false; + if (canCorrectToQuestionDot || isRightOfQuestionDot) { + type = type.getNonNullableType(); + if (canCorrectToQuestionDot) { + insertQuestionDot = true; + } + } } addTypeProperties(type, !!(node.flags & 32768 /* AwaitContext */), insertQuestionDot); } @@ -106983,8 +107484,15 @@ var ts; var type = typeChecker.getTypeAtLocation(node).getNonOptionalType(); var insertQuestionDot = false; if (type.isNullableType()) { - insertQuestionDot = isRightOfDot && !isRightOfQuestionDot; - type = type.getNonNullableType(); + var canCorrectToQuestionDot = isRightOfDot && + !isRightOfQuestionDot && + preferences.includeAutomaticOptionalChainCompletions !== false; + if (canCorrectToQuestionDot || isRightOfQuestionDot) { + type = type.getNonNullableType(); + if (canCorrectToQuestionDot) { + insertQuestionDot = true; + } + } } addTypeProperties(type, !!(node.flags & 32768 /* AwaitContext */), insertQuestionDot); } @@ -107286,7 +107794,7 @@ var ts; typeChecker.getExportsOfModule(sym).some(function (e) { return symbolCanBeReferencedAtTypeLocation(e, seenModules); }); } /** - * Gathers symbols that can be imported from other files, deduplicating along the way. Symbols can be “duplicates” + * Gathers symbols that can be imported from other files, de-duplicating along the way. Symbols can be "duplicates" * if re-exported from another module, e.g. `export { foo } from "./a"`. That syntax creates a fresh symbol, but * it’s just an alias to the first, and both have the same name, so we generally want to filter those aliases out, * if and only if the the first can be imported (it may be excluded due to package.json filtering in @@ -107362,7 +107870,7 @@ var ts; // Don't add another completion for `export =` of a symbol that's already global. // So in `declare namespace foo {} declare module "foo" { export = foo; }`, there will just be the global completion for `foo`. if (resolvedModuleSymbol !== moduleSymbol && - ts.every(resolvedModuleSymbol.declarations, function (d) { return !!d.getSourceFile().externalModuleIndicator; })) { + ts.every(resolvedModuleSymbol.declarations, function (d) { return !!d.getSourceFile().externalModuleIndicator && !ts.findAncestor(d, ts.isGlobalScopeAugmentation); })) { pushSymbol(resolvedModuleSymbol, moduleSymbol, /*skipFilter*/ true); } for (var _i = 0, _a = typeChecker.getExportsOfModule(moduleSymbol); _i < _a.length; _i++) { @@ -107476,7 +107984,16 @@ var ts; } if (contextToken.kind === 31 /* GreaterThanToken */ && contextToken.parent) { if (contextToken.parent.kind === 266 /* JsxOpeningElement */) { - return true; + // Two possibilities: + // 1.
/**/ + // - contextToken: GreaterThanToken (before cursor) + // - location: JSXElement + // - different parents (JSXOpeningElement, JSXElement) + // 2. /**/> + // - contextToken: GreaterThanToken (before cursor) + // - location: GreaterThanToken (after cursor) + // - same parent (JSXOpeningElement) + return location.parent.kind !== 266 /* JsxOpeningElement */; } if (contextToken.parent.kind === 267 /* JsxClosingElement */ || contextToken.parent.kind === 265 /* JsxSelfClosingElement */) { return !!contextToken.parent.parent && contextToken.parent.parent.kind === 264 /* JsxElement */; @@ -107551,7 +108068,7 @@ var ts; var typeMembers; var existingMembers; if (objectLikeContainer.kind === 192 /* ObjectLiteralExpression */) { - var typeForObject = typeChecker.getContextualType(objectLikeContainer); + var typeForObject = typeChecker.getContextualType(objectLikeContainer, 4 /* Completion */); if (!typeForObject) return 2 /* Fail */; isNewIdentifierLocation = ts.hasIndexSignature(typeForObject); @@ -108128,6 +108645,8 @@ var ts; return isFunctionLikeBodyKeyword(kind) || kind === 129 /* DeclareKeyword */ || kind === 134 /* ModuleKeyword */ + || kind === 144 /* TypeKeyword */ + || kind === 135 /* NamespaceKeyword */ || ts.isTypeKeyword(kind) && kind !== 145 /* UndefinedKeyword */; case 5 /* FunctionLikeBodyKeywords */: return isFunctionLikeBodyKeyword(kind); @@ -109937,7 +110456,7 @@ var ts; return undefined; } function getReferencedSymbolsForModuleIfDeclaredBySourceFile(symbol, program, sourceFiles, cancellationToken, options, sourceFilesSet) { - var moduleSourceFile = symbol.flags & 1536 /* Module */ ? ts.find(symbol.declarations, ts.isSourceFile) : undefined; + var moduleSourceFile = (symbol.flags & 1536 /* Module */) && symbol.declarations && ts.find(symbol.declarations, ts.isSourceFile); if (!moduleSourceFile) return undefined; var exportEquals = symbol.exports.get("export=" /* ExportEquals */); @@ -110662,8 +111181,10 @@ var ts; || exportSpecifier.name.originalKeywordKind === 83 /* DefaultKeyword */; var exportKind = isDefaultExport ? 1 /* Default */ : 0 /* Named */; var exportSymbol = ts.Debug.assertDefined(exportSpecifier.symbol); - var exportInfo = ts.Debug.assertDefined(FindAllReferences.getExportInfo(exportSymbol, exportKind, state.checker)); - searchForImportsOfExport(referenceLocation, exportSymbol, exportInfo, state); + var exportInfo = FindAllReferences.getExportInfo(exportSymbol, exportKind, state.checker); + if (exportInfo) { + searchForImportsOfExport(referenceLocation, exportSymbol, exportInfo, state); + } } // At `export { x } from "foo"`, also search for the imported symbol `"foo".x`. if (search.comingFrom !== 1 /* Export */ && exportDeclaration.moduleSpecifier && !propertyName && !isForRenameWithPrefixAndSuffixText(state.options)) { @@ -111874,7 +112395,7 @@ var ts; // The property length will have two declarations of property length coming // from Array - Array and Array var documentationComment = []; - forEachUnique(declarations, function (declaration) { + ts.forEachUnique(declarations, function (declaration) { for (var _i = 0, _a = getCommentHavingNodes(declaration); _i < _a.length; _i++) { var comment = _a[_i].comment; if (comment === undefined) @@ -111903,7 +112424,7 @@ var ts; function getJsDocTagsFromDeclarations(declarations) { // Only collect doc comments from duplicate declarations once. var tags = []; - forEachUnique(declarations, function (declaration) { + ts.forEachUnique(declarations, function (declaration) { for (var _i = 0, _a = ts.getJSDocTags(declaration); _i < _a.length; _i++) { var tag = _a[_i]; tags.push({ name: tag.tagName.text, text: getCommentText(tag) }); @@ -111940,24 +112461,6 @@ var ts; return comment === undefined ? s : s + " " + comment; } } - /** - * Iterates through 'array' by index and performs the callback on each element of array until the callback - * returns a truthy value, then returns that value. - * If no such value is found, the callback is applied to each element of array and undefined is returned. - */ - function forEachUnique(array, callback) { - if (array) { - for (var i = 0; i < array.length; i++) { - if (array.indexOf(array[i]) === i) { - var result = callback(array[i], i); - if (result) { - return result; - } - } - } - } - return undefined; - } function getJSDocTagNameCompletions() { return jsDocTagNameCompletionEntries || (jsDocTagNameCompletionEntries = ts.map(jsDocTagNames, function (tagName) { return { @@ -112882,7 +113385,8 @@ var ts; } var declName = ts.getNameOfDeclaration(node); if (declName && ts.isPropertyName(declName)) { - return ts.unescapeLeadingUnderscores(ts.getPropertyNameForPropertyNameNode(declName)); // TODO: GH#18217 + var propertyName = ts.getPropertyNameForPropertyNameNode(declName); + return propertyName && ts.unescapeLeadingUnderscores(propertyName); } switch (node.kind) { case 200 /* FunctionExpression */: @@ -113652,6 +114156,9 @@ var ts; case 265 /* JsxSelfClosingElement */: case 266 /* JsxOpeningElement */: return spanForJSXAttributes(n.attributes); + case 210 /* TemplateExpression */: + case 14 /* NoSubstitutionTemplateLiteral */: + return spanForTemplateLiteral(n); } function spanForJSXElement(node) { var textSpan = ts.createTextSpanFromBounds(node.openingElement.getStart(sourceFile), node.closingElement.getEnd()); @@ -113670,6 +114177,12 @@ var ts; } return createOutliningSpanFromBounds(node.getStart(sourceFile), node.getEnd(), "code" /* Code */); } + function spanForTemplateLiteral(node) { + if (node.kind === 14 /* NoSubstitutionTemplateLiteral */ && node.text.length === 0) { + return undefined; + } + return createOutliningSpanFromBounds(node.getStart(sourceFile), node.getEnd(), "code" /* Code */); + } function spanForObjectOrArrayLiteral(node, open) { if (open === void 0) { open = 18 /* OpenBraceToken */; } // If the block has no leading keywords and is inside an array literal or call expression, @@ -115972,7 +116485,7 @@ var ts; // get the signature from the declaration and write it var functionDeclaration_1 = location.parent; // Use function declaration to write the signatures only if the symbol corresponding to this declaration - var locationIsSymbolDeclaration = ts.find(symbol.declarations, function (declaration) { + var locationIsSymbolDeclaration = symbol.declarations && ts.find(symbol.declarations, function (declaration) { return declaration === (location.kind === 128 /* ConstructorKeyword */ ? functionDeclaration_1.parent : functionDeclaration_1); }); if (locationIsSymbolDeclaration) { @@ -116879,8 +117392,8 @@ var ts; rule("SpaceAfterQuestionMarkInConditionalOperator", 57 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* InsertSpace */), // in other cases there should be no space between '?' and next token rule("NoSpaceAfterQuestionMark", 57 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("NoSpaceBeforeDot", anyToken, 24 /* DotToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("NoSpaceAfterDot", 24 /* DotToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), + rule("NoSpaceBeforeDot", anyToken, [24 /* DotToken */, 28 /* QuestionDotToken */], [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), + rule("NoSpaceAfterDot", [24 /* DotToken */, 28 /* QuestionDotToken */], anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), rule("NoSpaceBetweenImportParenInImportType", 95 /* ImportKeyword */, 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* DeleteSpace */), // Special handling of unary operators. // Prefix operators generally shouldn't have a space between @@ -119012,7 +119525,10 @@ var ts; if (ts.isCallOrNewExpression(parent)) { if (!parent.arguments) return false; - var currentNode = ts.Debug.assertDefined(ts.find(parent.arguments, function (arg) { return arg.pos === child.pos; })); + var currentNode = ts.find(parent.arguments, function (arg) { return arg.pos === child.pos; }); + // If it's not one of the arguments, don't look past this + if (!currentNode) + return false; var currentIndex = parent.arguments.indexOf(currentNode); if (currentIndex === 0) return false; // Can't look at previous node if first @@ -119431,6 +119947,18 @@ var ts; cb(tracker); return tracker.getChanges(); }; + ChangeTracker.prototype.pushRaw = function (sourceFile, change) { + ts.Debug.assertEqual(sourceFile.fileName, change.fileName); + for (var _i = 0, _a = change.textChanges; _i < _a.length; _i++) { + var c = _a[_i]; + this.changes.push({ + kind: ChangeKind.Text, + sourceFile: sourceFile, + text: c.newText, + range: ts.createTextRangeFromSpan(c.span), + }); + } + }; ChangeTracker.prototype.deleteRange = function (sourceFile, range) { this.changes.push({ kind: ChangeKind.Remove, sourceFile: sourceFile, range: range }); }; @@ -119559,7 +120087,7 @@ var ts; endNode = ts.findChildOfKind(node, 21 /* CloseParenToken */, sourceFile); if (!endNode) { if (!ts.isArrowFunction(node)) - return; // Function missing parentheses, give up + return false; // Function missing parentheses, give up // If no `)`, is an arrow function `x => x`, so use the end of the first parameter endNode = ts.first(node.parameters); } @@ -119568,6 +120096,7 @@ var ts; endNode = node.kind !== 241 /* VariableDeclaration */ && node.questionToken ? node.questionToken : node.name; } this.insertNodeAt(sourceFile, endNode.end, type, { prefix: ": " }); + return true; }; ChangeTracker.prototype.tryInsertThisTypeAnnotation = function (sourceFile, node, type) { var start = ts.findChildOfKind(node, 20 /* OpenParenToken */, sourceFile).getStart(sourceFile) + 1; @@ -121194,20 +121723,20 @@ var ts; codefix.registerCodeFix({ errorCodes: errorCodes, getCodeActions: function (context) { - var sourceFile = context.sourceFile, program = context.program, start = context.span.start, errorCode = context.errorCode, cancellationToken = context.cancellationToken, host = context.host; + var sourceFile = context.sourceFile, program = context.program, start = context.span.start, errorCode = context.errorCode, cancellationToken = context.cancellationToken, host = context.host, formatContext = context.formatContext, preferences = context.preferences; var token = ts.getTokenAtPosition(sourceFile, start); var declaration; - var changes = ts.textChanges.ChangeTracker.with(context, function (changes) { declaration = doChange(changes, sourceFile, token, errorCode, program, cancellationToken, /*markSeen*/ ts.returnTrue, host); }); + var changes = ts.textChanges.ChangeTracker.with(context, function (changes) { declaration = doChange(changes, sourceFile, token, errorCode, program, cancellationToken, /*markSeen*/ ts.returnTrue, host, formatContext, preferences); }); var name = declaration && ts.getNameOfDeclaration(declaration); return !name || changes.length === 0 ? undefined : [codefix.createCodeFixAction(fixId, changes, [getDiagnostic(errorCode, token), name.getText(sourceFile)], fixId, ts.Diagnostics.Infer_all_types_from_usage)]; }, fixIds: [fixId], getAllCodeActions: function (context) { - var sourceFile = context.sourceFile, program = context.program, cancellationToken = context.cancellationToken, host = context.host; + var sourceFile = context.sourceFile, program = context.program, cancellationToken = context.cancellationToken, host = context.host, formatContext = context.formatContext, preferences = context.preferences; var markSeen = ts.nodeSeenTracker(); return codefix.codeFixAll(context, errorCodes, function (changes, err) { - doChange(changes, sourceFile, ts.getTokenAtPosition(err.file, err.start), err.code, program, cancellationToken, markSeen, host); + doChange(changes, sourceFile, ts.getTokenAtPosition(err.file, err.start), err.code, program, cancellationToken, markSeen, host, formatContext, preferences); }); }, }); @@ -121247,7 +121776,7 @@ var ts; } return errorCode; } - function doChange(changes, sourceFile, token, errorCode, program, cancellationToken, markSeen, host) { + function doChange(changes, sourceFile, token, errorCode, program, cancellationToken, markSeen, host, formatContext, preferences) { if (!ts.isParameterPropertyModifier(token.kind) && token.kind !== 75 /* Identifier */ && token.kind !== 25 /* DotDotDotToken */ && token.kind !== 103 /* ThisKeyword */) { return undefined; } @@ -121258,7 +121787,7 @@ var ts; case ts.Diagnostics.Member_0_implicitly_has_an_1_type.code: case ts.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code: if ((ts.isVariableDeclaration(parent) && markSeen(parent)) || ts.isPropertyDeclaration(parent) || ts.isPropertySignature(parent)) { // handle bad location - annotateVariableDeclaration(changes, sourceFile, parent, program, host, cancellationToken); + annotateVariableDeclaration(changes, sourceFile, parent, program, host, cancellationToken, formatContext, preferences); return parent; } if (ts.isPropertyAccessExpression(parent)) { @@ -121275,7 +121804,7 @@ var ts; case ts.Diagnostics.Variable_0_implicitly_has_an_1_type.code: { var symbol = program.getTypeChecker().getSymbolAtLocation(token); if (symbol && symbol.valueDeclaration && ts.isVariableDeclaration(symbol.valueDeclaration) && markSeen(symbol.valueDeclaration)) { - annotateVariableDeclaration(changes, sourceFile, symbol.valueDeclaration, program, host, cancellationToken); + annotateVariableDeclaration(changes, sourceFile, symbol.valueDeclaration, program, host, cancellationToken, formatContext, preferences); return symbol.valueDeclaration; } return undefined; @@ -121289,14 +121818,14 @@ var ts; // Parameter declarations case ts.Diagnostics.Parameter_0_implicitly_has_an_1_type.code: if (ts.isSetAccessorDeclaration(containingFunction)) { - annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken); + annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken, formatContext, preferences); return containingFunction; } // falls through case ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code: if (markSeen(containingFunction)) { var param = ts.cast(parent, ts.isParameter); - annotateParameters(changes, sourceFile, param, containingFunction, program, host, cancellationToken); + annotateParameters(changes, sourceFile, param, containingFunction, program, host, cancellationToken, formatContext, preferences); return param; } return undefined; @@ -121304,14 +121833,14 @@ var ts; case ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code: case ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code: if (ts.isGetAccessorDeclaration(containingFunction) && ts.isIdentifier(containingFunction.name)) { - annotate(changes, sourceFile, containingFunction, inferTypeForVariableFromUsage(containingFunction.name, program, cancellationToken), program, host); + annotate(changes, sourceFile, containingFunction, inferTypeForVariableFromUsage(containingFunction.name, program, cancellationToken), program, host, formatContext, preferences); return containingFunction; } return undefined; // Set Accessor declarations case ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code: if (ts.isSetAccessorDeclaration(containingFunction)) { - annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken); + annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken, formatContext, preferences); return containingFunction; } return undefined; @@ -121326,12 +121855,12 @@ var ts; return ts.Debug.fail(String(errorCode)); } } - function annotateVariableDeclaration(changes, sourceFile, declaration, program, host, cancellationToken) { + function annotateVariableDeclaration(changes, sourceFile, declaration, program, host, cancellationToken, formatContext, preferences) { if (ts.isIdentifier(declaration.name)) { - annotate(changes, sourceFile, declaration, inferTypeForVariableFromUsage(declaration.name, program, cancellationToken), program, host); + annotate(changes, sourceFile, declaration, inferTypeForVariableFromUsage(declaration.name, program, cancellationToken), program, host, formatContext, preferences); } } - function annotateParameters(changes, sourceFile, parameterDeclaration, containingFunction, program, host, cancellationToken) { + function annotateParameters(changes, sourceFile, parameterDeclaration, containingFunction, program, host, cancellationToken, formatContext, preferences) { if (!ts.isIdentifier(parameterDeclaration.name)) { return; } @@ -121347,7 +121876,7 @@ var ts; for (var _i = 0, parameterInferences_1 = parameterInferences; _i < parameterInferences_1.length; _i++) { var _a = parameterInferences_1[_i], declaration = _a.declaration, type = _a.type; if (declaration && !declaration.type && !declaration.initializer) { - annotate(changes, sourceFile, declaration, type, program, host); + annotate(changes, sourceFile, declaration, type, program, host, formatContext, preferences); } } if (needParens) @@ -121376,7 +121905,7 @@ var ts; ts.createJSDocThisTag(ts.createJSDocTypeExpression(typeNode)), ]); } - function annotateSetAccessor(changes, sourceFile, setAccessorDeclaration, program, host, cancellationToken) { + function annotateSetAccessor(changes, sourceFile, setAccessorDeclaration, program, host, cancellationToken, formatContext, preferences) { var param = ts.firstOrUndefined(setAccessorDeclaration.parameters); if (param && ts.isIdentifier(setAccessorDeclaration.name) && ts.isIdentifier(param.name)) { var type = inferTypeForVariableFromUsage(setAccessorDeclaration.name, program, cancellationToken); @@ -121387,11 +121916,11 @@ var ts; annotateJSDocParameters(changes, sourceFile, [{ declaration: param, type: type }], program, host); } else { - annotate(changes, sourceFile, param, type, program, host); + annotate(changes, sourceFile, param, type, program, host, formatContext, preferences); } } } - function annotate(changes, sourceFile, declaration, type, program, host) { + function annotate(changes, sourceFile, declaration, type, program, host, formatContext, preferences) { var typeNode = ts.getTypeNodeIfAccessible(type, declaration, program, host); if (typeNode) { if (ts.isInJSFile(sourceFile) && declaration.kind !== 157 /* PropertySignature */) { @@ -121403,11 +121932,32 @@ var ts; var typeTag = ts.isGetAccessorDeclaration(declaration) ? ts.createJSDocReturnTag(typeExpression, "") : ts.createJSDocTypeTag(typeExpression, ""); addJSDocTags(changes, sourceFile, parent, [typeTag]); } - else { + else if (!tryReplaceImportTypeNodeWithAutoImport(typeNode, changes, sourceFile, declaration, type, program, host, formatContext, preferences)) { changes.tryInsertTypeAnnotation(sourceFile, declaration, typeNode); } } } + function tryReplaceImportTypeNodeWithAutoImport(typeNode, changes, sourceFile, declaration, type, program, host, formatContext, preferences) { + var _a; + if (ts.isLiteralImportTypeNode(typeNode) && typeNode.qualifier && type.symbol) { + // Replace 'import("./a").SomeType' with 'SomeType' and an actual import if possible + var moduleSymbol = (_a = ts.find(type.symbol.declarations, function (d) { return !!d.getSourceFile().externalModuleIndicator; })) === null || _a === void 0 ? void 0 : _a.getSourceFile().symbol; + // Symbol for the left-most thing after the dot + if (moduleSymbol) { + var symbol = ts.getFirstIdentifier(typeNode.qualifier).symbol; + var action = codefix.getImportCompletionAction(symbol, moduleSymbol, sourceFile, symbol.name, host, program, formatContext, declaration.pos, preferences); + if (action.codeAction.changes.length && changes.tryInsertTypeAnnotation(sourceFile, declaration, ts.createTypeReferenceNode(typeNode.qualifier, typeNode.typeArguments))) { + for (var _i = 0, _b = action.codeAction.changes; _i < _b.length; _i++) { + var change = _b[_i]; + var file = sourceFile.fileName === change.fileName ? sourceFile : ts.Debug.assertDefined(program.getSourceFile(change.fileName)); + changes.pushRaw(file, change); + } + return true; + } + } + } + return false; + } function annotateJSDocParameters(changes, sourceFile, parameterInferences, program, host) { var signature = parameterInferences.length && parameterInferences[0].declaration.parent; if (!signature) { @@ -122099,7 +122649,7 @@ var ts; } var returnType = combineFromUsage(combineUsages(calls.map(function (call) { return call.return_; }))); // TODO: GH#18217 - return checker.createSignature(/*declaration*/ undefined, /*typeParameters*/ undefined, /*thisParameter*/ undefined, parameters, returnType, /*typePredicate*/ undefined, length, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); + return checker.createSignature(/*declaration*/ undefined, /*typeParameters*/ undefined, /*thisParameter*/ undefined, parameters, returnType, /*typePredicate*/ undefined, length, 0 /* None */); } function addCandidateType(usage, type) { if (type && !(type.flags & 1 /* Any */) && !(type.flags & 131072 /* Never */)) { @@ -123906,6 +124456,7 @@ var ts; var filteredCount = 0; var packageJson = filterByPackageJson && createAutoImportFilter(from, program, host); var allSourceFiles = program.getSourceFiles(); + var globalTypingsCache = host.getGlobalTypingsCacheLocation && host.getGlobalTypingsCacheLocation(); forEachExternalModule(program.getTypeChecker(), allSourceFiles, function (module, sourceFile) { if (sourceFile === undefined) { if (!packageJson || packageJson.allowsImportingAmbientModule(module, allSourceFiles)) { @@ -123915,7 +124466,9 @@ var ts; filteredCount++; } } - else if (sourceFile && sourceFile !== from && isImportablePath(from.fileName, sourceFile.fileName)) { + else if (sourceFile && + sourceFile !== from && + isImportablePath(from.fileName, sourceFile.fileName, ts.hostGetCanonicalFileName(host), globalTypingsCache)) { if (!packageJson || packageJson.allowsImportingSourceFile(sourceFile, allSourceFiles)) { cb(module); } @@ -123945,10 +124498,13 @@ var ts; * 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. */ - function isImportablePath(fromPath, toPath) { + function isImportablePath(fromPath, toPath, getCanonicalFileName, globalCachePath) { // If it's in a `node_modules` but is not reachable from here via a global import, don't bother. var toNodeModules = ts.forEachAncestorDirectory(toPath, function (ancestor) { return ts.getBaseFileName(ancestor) === "node_modules" ? ancestor : undefined; }); - return toNodeModules === undefined || ts.startsWith(fromPath, ts.getDirectoryPath(toNodeModules)); + var toNodeModulesParent = toNodeModules && ts.getDirectoryPath(getCanonicalFileName(toNodeModules)); + return toNodeModulesParent === undefined + || ts.startsWith(getCanonicalFileName(fromPath), toNodeModulesParent) + || (!!globalCachePath && ts.startsWith(getCanonicalFileName(globalCachePath), toNodeModulesParent)); } function moduleSymbolToValidIdentifier(moduleSymbol, target) { return moduleSpecifierToValidIdentifier(ts.removeFileExtension(ts.stripQuotes(moduleSymbol.name)), target); @@ -123993,6 +124549,7 @@ var ts; readFile: ts.maybeBind(host, host.readFile), useCaseSensitiveFileNames: ts.maybeBind(host, host.useCaseSensitiveFileNames), getProbableSymlinks: ts.maybeBind(host, host.getProbableSymlinks) || program.getProbableSymlinks, + getGlobalTypingsCacheLocation: ts.maybeBind(host, host.getGlobalTypingsCacheLocation), }; var usesNodeCoreModules; return { allowsImportingAmbientModule: allowsImportingAmbientModule, allowsImportingSourceFile: allowsImportingSourceFile, allowsImportingSpecifier: allowsImportingSpecifier }; @@ -125568,14 +126125,14 @@ var ts; for (var _i = 0, signatures_2 = signatures; _i < signatures_2.length; _i++) { var sig = signatures_2[_i]; minArgumentCount = Math.min(sig.minArgumentCount, minArgumentCount); - if (sig.hasRestParameter) { + if (ts.signatureHasRestParameter(sig)) { someSigHasRestParameter = true; } - if (sig.parameters.length >= maxArgsSignature.parameters.length && (!sig.hasRestParameter || maxArgsSignature.hasRestParameter)) { + if (sig.parameters.length >= maxArgsSignature.parameters.length && (!ts.signatureHasRestParameter(sig) || ts.signatureHasRestParameter(maxArgsSignature))) { maxArgsSignature = sig; } } - var maxNonRestArgs = maxArgsSignature.parameters.length - (maxArgsSignature.hasRestParameter ? 1 : 0); + var maxNonRestArgs = maxArgsSignature.parameters.length - (ts.signatureHasRestParameter(maxArgsSignature) ? 1 : 0); var maxArgsParameterSymbolNames = maxArgsSignature.parameters.map(function (symbol) { return symbol.name; }); var parameters = createDummyParameters(maxNonRestArgs, maxArgsParameterSymbolNames, /* types */ undefined, minArgumentCount, /*inJs*/ false); if (someSigHasRestParameter) { @@ -128060,7 +128617,7 @@ var ts; if (!selection || !ts.isTypeNode(selection)) return undefined; var checker = context.program.getTypeChecker(); - var firstStatement = ts.Debug.assertDefined(isJS ? ts.findAncestor(selection, isStatementAndHasJSDoc) : ts.findAncestor(selection, ts.isStatement), "Should find a statement"); + var firstStatement = ts.Debug.assertDefined(ts.findAncestor(selection, ts.isStatement), "Should find a statement"); var typeParameters = collectTypeParameters(checker, selection, firstStatement, file); if (!typeParameters) return undefined; @@ -128091,9 +128648,6 @@ var ts; } return undefined; } - function isStatementAndHasJSDoc(n) { - return ts.isStatement(n) && ts.hasJSDocNodes(n); - } function rangeContainsSkipTrivia(r1, node, file) { return ts.rangeContainsStartEnd(r1, ts.skipTrivia(file.text, node.pos), node.end); } @@ -130017,8 +130571,9 @@ var ts; return TypeObject; }()); var SignatureObject = /** @class */ (function () { - function SignatureObject(checker) { + function SignatureObject(checker, flags) { this.checker = checker; + this.flags = flags; } SignatureObject.prototype.getDeclaration = function () { return this.declaration; @@ -130056,13 +130611,12 @@ var ts; return ts.emptyArray; var doc = ts.JsDoc.getJsDocCommentsFromDeclarations(declarations); if (doc.length === 0 || declarations.some(hasJSDocInheritDocTag)) { - for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) { - var declaration = declarations_4[_i]; + ts.forEachUnique(declarations, function (declaration) { var inheritedDocs = findInheritedJSDocComments(declaration, declaration.symbol.name, checker); // TODO: GH#18217 // TODO: GH#16312 Return a ReadonlyArray, avoid copying inheritedDocs if (inheritedDocs) doc = doc.length === 0 ? inheritedDocs.slice() : inheritedDocs.concat(ts.lineBreakPart(), doc); - } + }); } return doc; } @@ -130373,9 +130927,7 @@ var ts; names.push(entry); } else { - if (entry.scriptKind !== 6 /* JSON */) { - names.push(entry.hostFileName); - } + names.push(entry.hostFileName); } }); return names; @@ -130943,12 +131495,11 @@ var ts; var sourceFiles = fileName ? [getValidSourceFile(fileName)] : program.getSourceFiles(); return ts.NavigateTo.getNavigateToItems(sourceFiles, program.getTypeChecker(), cancellationToken, searchValue, maxResultCount, excludeDtsFiles); } - function getEmitOutput(fileName, emitOnlyDtsFiles) { - if (emitOnlyDtsFiles === void 0) { emitOnlyDtsFiles = false; } + function getEmitOutput(fileName, emitOnlyDtsFiles, forceDtsEmit) { synchronizeHostData(); var sourceFile = getValidSourceFile(fileName); var customTransformers = host.getCustomTransformers && host.getCustomTransformers(); - return ts.getFileEmitOutput(program, sourceFile, emitOnlyDtsFiles, cancellationToken, customTransformers); + return ts.getFileEmitOutput(program, sourceFile, !!emitOnlyDtsFiles, cancellationToken, customTransformers, forceDtsEmit); } // Signature help /** @@ -133734,16 +134285,31 @@ var ts; case 1: return this.containingProjects[0]; default: - // if this file belongs to multiple projects, the first configured project should be - // the default project; if no configured projects, the first external project should - // be the default project; otherwise the first inferred project should be the default. + // If this file belongs to multiple projects, below is the order in which default project is used + // - for open script info, its default configured project during opening is default if info is part of it + // - first configured project of which script info is not a source of project reference redirect + // - first configured project + // - first external project + // - first inferred project var firstExternalProject = void 0; var firstConfiguredProject = void 0; - for (var _i = 0, _a = this.containingProjects; _i < _a.length; _i++) { - var project = _a[_i]; + var firstNonSourceOfProjectReferenceRedirect = void 0; + var defaultConfiguredProject = void 0; + for (var index = 0; index < this.containingProjects.length; index++) { + var project = this.containingProjects[index]; if (project.projectKind === server.ProjectKind.Configured) { - if (!project.isSourceOfProjectReferenceRedirect(this.fileName)) - return project; + if (!project.isSourceOfProjectReferenceRedirect(this.fileName)) { + // If we havent found default configuredProject and + // its not the last one, find it and use that one if there + if (defaultConfiguredProject === undefined && + index !== this.containingProjects.length - 1) { + defaultConfiguredProject = project.projectService.findDefaultConfiguredProject(this) || false; + } + if (defaultConfiguredProject === project) + return project; + if (!firstNonSourceOfProjectReferenceRedirect) + firstNonSourceOfProjectReferenceRedirect = project; + } if (!firstConfiguredProject) firstConfiguredProject = project; } @@ -133751,7 +134317,11 @@ var ts; firstExternalProject = project; } } - return firstConfiguredProject || firstExternalProject || this.containingProjects[0]; + return defaultConfiguredProject || + firstNonSourceOfProjectReferenceRedirect || + firstConfiguredProject || + firstExternalProject || + this.containingProjects[0]; } }; ScriptInfo.prototype.registerFileUpdate = function () { @@ -134050,7 +134620,7 @@ var ts; var Project = /** @class */ (function () { /*@internal*/ function Project( - /*@internal*/ projectName, projectKind, projectService, documentRegistry, hasExplicitListOfFiles, lastFileExceededProgramSize, compilerOptions, compileOnSaveEnabled, directoryStructureHost, currentDirectory) { + /*@internal*/ projectName, projectKind, projectService, documentRegistry, hasExplicitListOfFiles, lastFileExceededProgramSize, compilerOptions, compileOnSaveEnabled, directoryStructureHost, currentDirectory, customRealpath) { var _this = this; this.projectName = projectName; this.projectKind = projectKind; @@ -134120,7 +134690,7 @@ var ts; this.trace = function (s) { return host.trace(s); }; } if (host.realpath) { - this.realpath = function (path) { return host.realpath(path); }; + this.realpath = customRealpath || (function (path) { return host.realpath(path); }); } // Use the current directory as resolution root only if the project created using current directory string this.resolutionCache = ts.createResolutionCache(this, currentDirectory && this.currentDirectory, /*logChangesWhenResolvingModule*/ true); @@ -134161,6 +134731,10 @@ var ts; Project.prototype.installPackage = function (options) { return this.typingsCache.installPackage(__assign(__assign({}, options), { projectName: this.projectName, projectRootPath: this.toPath(this.currentDirectory) })); }; + /*@internal*/ + Project.prototype.getGlobalTypingsCacheLocation = function () { + return this.getGlobalCache(); + }; Object.defineProperty(Project.prototype, "typingsCache", { get: function () { return this.projectService.typingsCache; @@ -135060,9 +135634,11 @@ var ts; this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded"); return; } - // Search our peer node_modules, then any globally-specified probe paths - // ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/node_modules/ - var searchPaths = __spreadArrays([ts.combinePaths(this.projectService.getExecutingFilePath(), "../../..")], this.projectService.pluginProbeLocations); + // Search any globally-specified probe paths, then our peer node_modules + var searchPaths = __spreadArrays(this.projectService.pluginProbeLocations, [ + // ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/node_modules/ + ts.combinePaths(this.projectService.getExecutingFilePath(), "../../.."), + ]); if (this.projectService.globalPlugins) { var _loop_2 = function (globalPluginName) { // Skip empty names from odd commandline parses @@ -135168,7 +135744,9 @@ var ts; case -1 /* True */: var packageJsonFileName = ts.combinePaths(directory, "package.json"); watchPackageJsonFile(packageJsonFileName); - result.push(ts.Debug.assertDefined(packageJsonCache.getInDirectory(directory))); + var info = packageJsonCache.getInDirectory(directory); + if (info) + result.push(info); } if (rootPath && rootPath === toPath(directory)) { return true; @@ -135336,7 +135914,7 @@ var ts; /*hasExplicitListOfFiles*/ false, /*lastFileExceededProgramSize*/ undefined, /*compilerOptions*/ {}, - /*compileOnSaveEnabled*/ false, cachedDirectoryStructureHost, ts.getDirectoryPath(configFileName)) || this; + /*compileOnSaveEnabled*/ false, cachedDirectoryStructureHost, ts.getDirectoryPath(configFileName), projectService.host.realpath && (function (s) { return _this.getRealpath(s); })) || this; /*@internal*/ _this.canConfigFileJsonReportNoInputFiles = false; /** Ref count to the project when opened from external project */ @@ -135354,19 +135932,31 @@ var ts; ConfiguredProject.prototype.setResolvedProjectReferenceCallbacks = function (projectReferenceCallbacks) { this.projectReferenceCallbacks = projectReferenceCallbacks; }; + ConfiguredProject.prototype.fileExistsIfProjectReferenceDts = function (file) { + var source = this.projectReferenceCallbacks.getSourceOfProjectReferenceRedirect(file); + return source !== undefined ? + ts.isString(source) ? _super.prototype.fileExists.call(this, source) : true : + undefined; + }; /** * This implementation of fileExists checks if the file being requested is * .d.ts file for the referenced Project. * If it is it returns true irrespective of whether that file exists on host */ ConfiguredProject.prototype.fileExists = function (file) { + if (_super.prototype.fileExists.call(this, file)) + return true; + if (!this.useSourceOfProjectReferenceRedirect() || !this.projectReferenceCallbacks) + return false; + if (!ts.isDeclarationFileName(file)) + return false; // Project references go to source file instead of .d.ts file - if (this.useSourceOfProjectReferenceRedirect() && this.projectReferenceCallbacks) { - var source = this.projectReferenceCallbacks.getSourceOfProjectReferenceRedirect(file); - if (source) - return ts.isString(source) ? _super.prototype.fileExists.call(this, source) : true; - } - return _super.prototype.fileExists.call(this, file); + return this.fileOrDirectoryExistsUsingSource(file, /*isFile*/ true); + }; + ConfiguredProject.prototype.directoryExistsIfProjectReferenceDeclDir = function (dir) { + var dirPath = this.toPath(dir); + var dirPathWithTrailingDirectorySeparator = "" + dirPath + ts.directorySeparator; + return ts.forEachKey(this.mapOfDeclarationDirectories, function (declDirPath) { return dirPath === declDirPath || ts.startsWith(declDirPath, dirPathWithTrailingDirectorySeparator); }); }; /** * This implementation of directoryExists checks if the directory being requested is @@ -135375,8 +135965,10 @@ var ts; */ ConfiguredProject.prototype.directoryExists = function (path) { var _this = this; - if (_super.prototype.directoryExists.call(this, path)) + if (_super.prototype.directoryExists.call(this, path)) { + this.handleDirectoryCouldBeSymlink(path); return true; + } if (!this.useSourceOfProjectReferenceRedirect() || !this.projectReferenceCallbacks) return false; if (!this.mapOfDeclarationDirectories) { @@ -135384,7 +135976,7 @@ var ts; this.projectReferenceCallbacks.forEachResolvedProjectReference(function (ref) { if (!ref) return; - var out = ref.commandLine.options.outFile || ref.commandLine.options.outDir; + var out = ref.commandLine.options.outFile || ref.commandLine.options.out; if (out) { _this.mapOfDeclarationDirectories.set(ts.getDirectoryPath(_this.toPath(out)), true); } @@ -135397,9 +135989,70 @@ var ts; } }); } - var dirPath = this.toPath(path); - var dirPathWithTrailingDirectorySeparator = "" + dirPath + ts.directorySeparator; - return !!ts.forEachKey(this.mapOfDeclarationDirectories, function (declDirPath) { return dirPath === declDirPath || ts.startsWith(declDirPath, dirPathWithTrailingDirectorySeparator); }); + return this.fileOrDirectoryExistsUsingSource(path, /*isFile*/ false); + }; + ConfiguredProject.prototype.realpathIfSymlinkedProjectReferenceDts = function (s) { + return this.symlinkedFiles && this.symlinkedFiles.get(this.toPath(s)); + }; + ConfiguredProject.prototype.getRealpath = function (s) { + return this.realpathIfSymlinkedProjectReferenceDts(s) || + this.projectService.host.realpath(s); + }; + ConfiguredProject.prototype.handleDirectoryCouldBeSymlink = function (directory) { + if (!this.useSourceOfProjectReferenceRedirect() || !this.projectReferenceCallbacks) + return; + // Because we already watch node_modules, handle symlinks in there + if (!this.realpath || !ts.stringContains(directory, ts.nodeModulesPathPart)) + return; + if (!this.symlinkedDirectories) + this.symlinkedDirectories = ts.createMap(); + var directoryPath = ts.ensureTrailingDirectorySeparator(this.toPath(directory)); + if (this.symlinkedDirectories.has(directoryPath)) + return; + var real = this.projectService.host.realpath(directory); + var realPath; + if (real === directory || + (realPath = ts.ensureTrailingDirectorySeparator(this.toPath(real))) === directoryPath) { + // not symlinked + this.symlinkedDirectories.set(directoryPath, false); + return; + } + this.symlinkedDirectories.set(directoryPath, { + real: ts.ensureTrailingDirectorySeparator(real), + realPath: realPath + }); + }; + ConfiguredProject.prototype.fileOrDirectoryExistsUsingSource = function (fileOrDirectory, isFile) { + var _this = this; + var fileOrDirectoryExistsUsingSource = isFile ? + function (file) { return _this.fileExistsIfProjectReferenceDts(file); } : + function (dir) { return _this.directoryExistsIfProjectReferenceDeclDir(dir); }; + // Check current directory or file + var result = fileOrDirectoryExistsUsingSource(fileOrDirectory); + if (result !== undefined) + return result; + if (!this.symlinkedDirectories) + return false; + var fileOrDirectoryPath = this.toPath(fileOrDirectory); + if (!ts.stringContains(fileOrDirectoryPath, ts.nodeModulesPathPart)) + return false; + if (isFile && this.symlinkedFiles && this.symlinkedFiles.has(fileOrDirectoryPath)) + return true; + // If it contains node_modules check if its one of the symlinked path we know of + return ts.firstDefinedIterator(this.symlinkedDirectories.entries(), function (_a) { + var directoryPath = _a[0], symlinkedDirectory = _a[1]; + if (!symlinkedDirectory || !ts.startsWith(fileOrDirectoryPath, directoryPath)) + return undefined; + var result = fileOrDirectoryExistsUsingSource(fileOrDirectoryPath.replace(directoryPath, symlinkedDirectory.realPath)); + if (isFile && result) { + if (!_this.symlinkedFiles) + _this.symlinkedFiles = ts.createMap(); + // Store the real path for the file' + var absolutePath = ts.getNormalizedAbsolutePath(fileOrDirectory, _this.currentDirectory); + _this.symlinkedFiles.set(fileOrDirectoryPath, "" + symlinkedDirectory.real + absolutePath.replace(new RegExp(directoryPath, "i"), "")); + } + return result; + }) || false; }; /** * If the project has reload from disk pending, it reloads (and then updates graph as part of that) instead of just updating the graph @@ -135411,6 +136064,8 @@ var ts; this.pendingReload = ts.ConfigFileProgramReloadLevel.None; this.projectReferenceCallbacks = undefined; this.mapOfDeclarationDirectories = undefined; + this.symlinkedDirectories = undefined; + this.symlinkedFiles = undefined; var result; switch (reloadLevel) { case ts.ConfigFileProgramReloadLevel.Partial: @@ -135521,6 +136176,8 @@ var ts; this.configFileSpecs = undefined; this.projectReferenceCallbacks = undefined; this.mapOfDeclarationDirectories = undefined; + this.symlinkedDirectories = undefined; + this.symlinkedFiles = undefined; _super.prototype.close.call(this); }; /* @internal */ @@ -136377,7 +137034,7 @@ var ts; ts.Debug.assert(info.isOrphan()); var project = this.getOrCreateInferredProjectForProjectRootPathIfEnabled(info, projectRootPath) || this.getOrCreateSingleInferredProjectIfEnabled() || - this.getOrCreateSingleInferredWithoutProjectRoot(info.isDynamic ? this.currentDirectory : ts.getDirectoryPath(info.path)); + this.getOrCreateSingleInferredWithoutProjectRoot(info.isDynamic ? projectRootPath || this.currentDirectory : ts.getDirectoryPath(info.path)); project.addRoot(info); if (info.containingProjects[0] !== project) { // Ensure this is first project, we could be in this scenario because info could be part of orphan project @@ -136700,6 +137357,9 @@ var ts; } ts.Debug.assert(!isOpenScriptInfo(info) || this.openFiles.has(info.path)); var projectRootPath = this.openFiles.get(info.path); + var scriptInfo = ts.Debug.assertDefined(this.getScriptInfo(info.path)); + if (scriptInfo.isDynamic) + return undefined; var searchPath = server.asNormalizedPath(ts.getDirectoryPath(info.fileName)); var isSearchPathInProjectRoot = function () { return ts.containsPath(projectRootPath, searchPath, _this.currentDirectory, !_this.host.useCaseSensitiveFileNames); }; // If projectRootPath doesn't contain info.path, then do normal search for config file @@ -136724,6 +137384,14 @@ var ts; } while (anySearchPathOk || isSearchPathInProjectRoot()); return undefined; }; + /*@internal*/ + ProjectService.prototype.findDefaultConfiguredProject = function (info) { + if (!info.isScriptOpen()) + return undefined; + var configFileName = this.getConfigFileNameForFile(info); + return configFileName && + this.findConfiguredProjectByProjectName(configFileName); + }; /** * This function tries to search for a tsconfig.json for the given file. * This is different from the method the compiler uses because @@ -137063,7 +137731,9 @@ var ts; }); }; ProjectService.prototype.getOrCreateInferredProjectForProjectRootPathIfEnabled = function (info, projectRootPath) { - if (info.isDynamic || !this.useInferredProjectPerProjectRoot) { + if (!this.useInferredProjectPerProjectRoot || + // Its a dynamic info opened without project root + (info.isDynamic && projectRootPath === undefined)) { return undefined; } if (projectRootPath) { @@ -137322,7 +137992,7 @@ var ts; var isDynamic = server.isDynamicFileName(fileName); ts.Debug.assert(ts.isRootedDiskPath(fileName) || isDynamic || openedByClient, "", function () { return JSON.stringify({ fileName: fileName, currentDirectory: currentDirectory, hostCurrentDirectory: _this.currentDirectory, openKeys: ts.arrayFrom(_this.openFilesWithNonRootedDiskPath.keys()) }) + "\nScript info with non-dynamic relative file name can only be open script info or in context of host currentDirectory"; }); ts.Debug.assert(!ts.isRootedDiskPath(fileName) || this.currentDirectory === currentDirectory || !this.openFilesWithNonRootedDiskPath.has(this.toCanonicalFileName(fileName)), "", function () { return JSON.stringify({ fileName: fileName, currentDirectory: currentDirectory, hostCurrentDirectory: _this.currentDirectory, openKeys: ts.arrayFrom(_this.openFilesWithNonRootedDiskPath.keys()) }) + "\nOpen script files with non rooted disk path opened with current directory context cannot have same canonical names"; }); - ts.Debug.assert(!isDynamic || this.currentDirectory === currentDirectory, "", function () { return JSON.stringify({ fileName: fileName, currentDirectory: currentDirectory, hostCurrentDirectory: _this.currentDirectory, openKeys: ts.arrayFrom(_this.openFilesWithNonRootedDiskPath.keys()) }) + "\nDynamic files must always have current directory context since containing external project name will always match the script info name."; }); + ts.Debug.assert(!isDynamic || this.currentDirectory === currentDirectory || this.useInferredProjectPerProjectRoot, "", function () { return JSON.stringify({ fileName: fileName, currentDirectory: currentDirectory, hostCurrentDirectory: _this.currentDirectory, openKeys: ts.arrayFrom(_this.openFilesWithNonRootedDiskPath.keys()) }) + "\nDynamic files must always be opened with service's current directory or service should support inferred project per projectRootPath."; }); // If the file is not opened by client and the file doesnot exist on the disk, return if (!openedByClient && !isDynamic && !(hostToQueryFileExistsOn || this.host).fileExists(fileName)) { return; @@ -137333,7 +138003,7 @@ var ts; if (!openedByClient) { this.watchClosedScriptInfo(info); } - else if (!ts.isRootedDiskPath(fileName) && !isDynamic) { + else if (!ts.isRootedDiskPath(fileName) && (!isDynamic || this.currentDirectory !== currentDirectory)) { // File that is opened by user but isn't rooted disk path this.openFilesWithNonRootedDiskPath.set(this.toCanonicalFileName(fileName), info); } @@ -138324,7 +138994,7 @@ var ts; directoriesWithoutPackageJson.set(ts.getDirectoryPath(fileName), true); }, getInDirectory: function (directory) { - return packageJsons.get(ts.combinePaths(directory, "package.json")); + return packageJsons.get(ts.combinePaths(directory, "package.json")) || undefined; }, directoryHasPackageJson: directoryHasPackageJson, searchDirectoryAndAncestors: function (directory) { @@ -138344,7 +139014,7 @@ var ts; }; function addOrUpdate(fileName) { var packageJsonInfo = ts.createPackageJsonInfo(fileName, project); - if (packageJsonInfo) { + if (packageJsonInfo !== undefined) { packageJsons.set(fileName, packageJsonInfo); directoriesWithoutPackageJson.delete(ts.getDirectoryPath(fileName)); } diff --git a/lib/typescript.d.ts b/lib/typescript.d.ts index 932199e6e36..433217ee422 100644 --- a/lib/typescript.d.ts +++ b/lib/typescript.d.ts @@ -14,7 +14,7 @@ and limitations under the License. ***************************************************************************** */ declare namespace ts { - const versionMajorMinor = "3.7"; + const versionMajorMinor = "3.8"; /** The version of the TypeScript compiler release */ const version: string; } @@ -1964,6 +1964,8 @@ declare namespace ts { DiagnosticsPresent_OutputsSkipped = 1, DiagnosticsPresent_OutputsGenerated = 2, InvalidProject_OutputsSkipped = 3, + ProjectReferenceCycle_OutputsSkipped = 4, + /** @deprecated Use ProjectReferenceCycle_OutputsSkipped instead. */ ProjectReferenceCycle_OutputsSkupped = 4 } export interface EmitResult { @@ -2376,6 +2378,7 @@ declare namespace ts { JSLiteral = 16384, FreshLiteral = 32768, ArrayLiteral = 65536, + ObjectRestType = 131072, ClassOrInterface = 3, } export interface ObjectType extends Type { @@ -3169,8 +3172,9 @@ declare namespace ts { readonly disableSuggestions?: boolean; readonly quotePreference?: "auto" | "double" | "single"; readonly includeCompletionsForModuleExports?: boolean; + readonly includeAutomaticOptionalChainCompletions?: boolean; readonly includeCompletionsWithInsertText?: boolean; - readonly importModuleSpecifierPreference?: "relative" | "non-relative"; + readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative"; /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ readonly importModuleSpecifierEnding?: "minimal" | "index" | "js"; readonly allowTextChangesInNewFiles?: boolean; @@ -3522,6 +3526,7 @@ declare namespace ts { function isCallExpression(node: Node): node is CallExpression; function isCallChain(node: Node): node is CallChain; function isOptionalChain(node: Node): node is PropertyAccessChain | ElementAccessChain | CallChain; + function isNullishCoalesce(node: Node): boolean; function isNewExpression(node: Node): node is NewExpression; function isTaggedTemplateExpression(node: Node): node is TaggedTemplateExpression; function isTypeAssertion(node: Node): node is TypeAssertion; @@ -5071,7 +5076,7 @@ declare namespace ts { getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined): RefactorEditInfo | undefined; organizeImports(scope: OrganizeImportsScope, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[]; getEditsForFileRename(oldFilePath: string, newFilePath: string, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[]; - getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean): EmitOutput; + getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean, forceDtsEmit?: boolean): EmitOutput; getProgram(): Program | undefined; dispose(): void; } @@ -5194,7 +5199,7 @@ declare namespace ts { } interface FileTextChanges { fileName: string; - textChanges: TextChange[]; + textChanges: readonly TextChange[]; isNewFile?: boolean; } interface CodeAction { diff --git a/lib/typescript.js b/lib/typescript.js index 8102884ad12..b1d5c0c5098 100644 --- a/lib/typescript.js +++ b/lib/typescript.js @@ -76,67 +76,20 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); +/* @internal */ var ts; (function (ts) { - // WARNING: The script `configureNightly.ts` uses a regexp to parse out these values. - // If changing the text in this section, be sure to test `configureNightly` too. - ts.versionMajorMinor = "3.7"; - /** The version of the TypeScript compiler release */ - ts.version = ts.versionMajorMinor + ".0-dev"; -})(ts || (ts = {})); -(function (ts) { - /* @internal */ - var Comparison; - (function (Comparison) { - Comparison[Comparison["LessThan"] = -1] = "LessThan"; - Comparison[Comparison["EqualTo"] = 0] = "EqualTo"; - Comparison[Comparison["GreaterThan"] = 1] = "GreaterThan"; - })(Comparison = ts.Comparison || (ts.Comparison = {})); -})(ts || (ts = {})); -/* @internal */ -(function (ts) { - ts.emptyArray = []; - /** Create a MapLike with good performance. */ - function createDictionaryObject() { - var map = Object.create(/*prototype*/ null); // eslint-disable-line no-null/no-null - // Using 'delete' on an object causes V8 to put the object in dictionary mode. - // This disables creation of hidden classes, which are expensive when an object is - // constantly changing shape. - map.__ = undefined; - delete map.__; - return map; - } - /** Create a new map. If a template object is provided, the map will copy entries from it. */ - function createMap() { - return new ts.MapCtr(); - } - ts.createMap = createMap; - function createMapFromEntries(entries) { - var map = createMap(); - for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) { - var _a = entries_1[_i], key = _a[0], value = _a[1]; - map.set(key, value); + function createMapShim() { + /** Create a MapLike with good performance. */ + function createDictionaryObject() { + var map = Object.create(/*prototype*/ null); // eslint-disable-line no-null/no-null + // Using 'delete' on an object causes V8 to put the object in dictionary mode. + // This disables creation of hidden classes, which are expensive when an object is + // constantly changing shape. + map.__ = undefined; + delete map.__; + return map; } - return map; - } - ts.createMapFromEntries = createMapFromEntries; - function createMapFromTemplate(template) { - var map = new ts.MapCtr(); - // Copies keys/values from template. Note that for..in will not throw if - // template is undefined, and instead will just exit the loop. - for (var key in template) { - if (hasOwnProperty.call(template, key)) { - map.set(key, template[key]); - } - } - return map; - } - ts.createMapFromTemplate = createMapFromTemplate; - // Internet Explorer's Map doesn't support iteration, so don't use it. - // eslint-disable-next-line no-in-operator - ts.MapCtr = typeof Map !== "undefined" && "entries" in Map.prototype ? Map : shimMap(); - // Keep the class inside a function so it doesn't get compiled if it's not used. - function shimMap() { var MapIterator = /** @class */ (function () { function MapIterator(currentEntry, selector) { this.currentEntry = currentEntry; @@ -272,7 +225,75 @@ var ts; return class_1; }()); } - ts.shimMap = shimMap; + ts.createMapShim = createMapShim; +})(ts || (ts = {})); +var ts; +(function (ts) { + // WARNING: The script `configureNightly.ts` uses a regexp to parse out these values. + // If changing the text in this section, be sure to test `configureNightly` too. + ts.versionMajorMinor = "3.8"; + /** The version of the TypeScript compiler release */ + ts.version = ts.versionMajorMinor + ".0-dev"; +})(ts || (ts = {})); +(function (ts) { + /* @internal */ + var Comparison; + (function (Comparison) { + Comparison[Comparison["LessThan"] = -1] = "LessThan"; + Comparison[Comparison["EqualTo"] = 0] = "EqualTo"; + Comparison[Comparison["GreaterThan"] = 1] = "GreaterThan"; + })(Comparison = ts.Comparison || (ts.Comparison = {})); +})(ts || (ts = {})); +/* @internal */ +(function (ts) { + /** + * Returns the native Map implementation if it is available and compatible (i.e. supports iteration). + */ + function tryGetNativeMap() { + // Internet Explorer's Map doesn't support iteration, so don't use it. + // eslint-disable-next-line no-in-operator + return typeof Map !== "undefined" && "entries" in Map.prototype ? Map : undefined; + } + ts.tryGetNativeMap = tryGetNativeMap; +})(ts || (ts = {})); +/* @internal */ +(function (ts) { + ts.emptyArray = []; + ts.Map = ts.tryGetNativeMap() || (function () { + // NOTE: createMapShim will be defined for typescriptServices.js but not for tsc.js, so we must test for it. + if (typeof ts.createMapShim === "function") { + return ts.createMapShim(); + } + throw new Error("TypeScript requires an environment that provides a compatible native Map implementation."); + })(); + /** Create a new map. */ + function createMap() { + return new ts.Map(); + } + ts.createMap = createMap; + /** Create a new map from an array of entries. */ + function createMapFromEntries(entries) { + var map = createMap(); + for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) { + var _a = entries_1[_i], key = _a[0], value = _a[1]; + map.set(key, value); + } + return map; + } + ts.createMapFromEntries = createMapFromEntries; + /** Create a new map from a template object is provided, the map will copy entries from it. */ + function createMapFromTemplate(template) { + var map = new ts.Map(); + // Copies keys/values from template. Note that for..in will not throw if + // template is undefined, and instead will just exit the loop. + for (var key in template) { + if (hasOwnProperty.call(template, key)) { + map.set(key, template[key]); + } + } + return map; + } + ts.createMapFromTemplate = createMapFromTemplate; function length(array) { return array ? array.length : 0; } @@ -1854,20 +1875,6 @@ var ts; return str.indexOf(substring) !== -1; } ts.stringContains = stringContains; - function fileExtensionIs(path, extension) { - return path.length > extension.length && endsWith(path, extension); - } - ts.fileExtensionIs = fileExtensionIs; - function fileExtensionIsOneOf(path, extensions) { - for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) { - var extension = extensions_1[_i]; - if (fileExtensionIs(path, extension)) { - return true; - } - } - return false; - } - ts.fileExtensionIsOneOf = fileExtensionIsOneOf; /** * Takes a string like "jquery-min.4.2.3" and returns "jquery" */ @@ -2181,11 +2188,14 @@ var ts; if (isFlags) { var result = ""; var remainingFlags = value; - for (var i = members.length - 1; i >= 0 && remainingFlags !== 0; i--) { - var _a = members[i], enumValue = _a[0], enumName = _a[1]; - if (enumValue !== 0 && (remainingFlags & enumValue) === enumValue) { + for (var _i = 0, members_1 = members; _i < members_1.length; _i++) { + var _a = members_1[_i], enumValue = _a[0], enumName = _a[1]; + if (enumValue > value) { + break; + } + if (enumValue !== 0 && enumValue & value) { + result = "" + result + (result ? "|" : "") + enumName; remainingFlags &= ~enumValue; - result = "" + enumName + (result ? "|" : "") + result; } } if (remainingFlags === 0) { @@ -2193,8 +2203,8 @@ var ts; } } else { - for (var _i = 0, members_1 = members; _i < members_1.length; _i++) { - var _b = members_1[_i], enumValue = _b[0], enumName = _b[1]; + for (var _b = 0, members_2 = members; _b < members_2.length; _b++) { + var _c = members_2[_b], enumValue = _c[0], enumName = _c[1]; if (enumValue === value) { return enumName; } @@ -2268,6 +2278,33 @@ var ts; ? function (node, message) { return assert(node === undefined, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was unexpected'."; }, Debug.assertMissingNode); } : ts.noop; var isDebugInfoEnabled = false; + var extendedDebugModule; + function extendedDebug() { + enableDebugInfo(); + if (!extendedDebugModule) { + throw new Error("Debugging helpers could not be loaded."); + } + return extendedDebugModule; + } + function printControlFlowGraph(flowNode) { + return console.log(formatControlFlowGraph(flowNode)); + } + Debug.printControlFlowGraph = printControlFlowGraph; + function formatControlFlowGraph(flowNode) { + return extendedDebug().formatControlFlowGraph(flowNode); + } + Debug.formatControlFlowGraph = formatControlFlowGraph; + function attachFlowNodeDebugInfo(flowNode) { + if (isDebugInfoEnabled) { + if (!("__debugFlowFlags" in flowNode)) { // eslint-disable-line no-in-operator + Object.defineProperties(flowNode, { + __debugFlowFlags: { get: function () { return formatEnum(this.flags, ts.FlowFlags, /*isFlags*/ true); } }, + __debugToString: { value: function () { return formatControlFlowGraph(this); } } + }); + } + } + } + Debug.attachFlowNodeDebugInfo = attachFlowNodeDebugInfo; /** * Injects debug information into frequently used types. */ @@ -2311,6 +2348,20 @@ var ts; }); } } + // attempt to load extended debugging information + try { + if (ts.sys && ts.sys.require) { + var basePath = ts.getDirectoryPath(ts.resolvePath(ts.sys.getExecutingFilePath())); + var result = ts.sys.require(basePath, "./compiler-debug"); + if (!result.error) { + result.module.init(ts); + extendedDebugModule = result.module; + } + } + } + catch (_a) { + // do nothing + } isDebugInfoEnabled = true; } Debug.enableDebugInfo = enableDebugInfo; @@ -2474,8 +2525,6 @@ var ts; } /** Performance logger that will generate ETW events if possible - check for `logEvent` member, as `etwModule` will be `{}` when browserified */ ts.perfLogger = etwModule && etwModule.logEvent ? etwModule : nullLogger; - var args = typeof process === "undefined" ? [] : process.argv; - ts.perfLogger.logInfoEvent("Starting TypeScript v" + ts.versionMajorMinor + " with command line: " + JSON.stringify(args)); })(ts || (ts = {})); /* @internal */ var ts; @@ -3370,6 +3419,7 @@ var ts; /* @internal */ TokenFlags[TokenFlags["NumericLiteralFlags"] = 1008] = "NumericLiteralFlags"; })(TokenFlags = ts.TokenFlags || (ts.TokenFlags = {})); + // NOTE: Ensure this is up-to-date with src/debug/debug.ts var FlowFlags; (function (FlowFlags) { FlowFlags[FlowFlags["Unreachable"] = 1] = "Unreachable"; @@ -3425,6 +3475,8 @@ var ts; // When build skipped because passed in project is invalid ExitStatus[ExitStatus["InvalidProject_OutputsSkipped"] = 3] = "InvalidProject_OutputsSkipped"; // When build is skipped because project references form cycle + ExitStatus[ExitStatus["ProjectReferenceCycle_OutputsSkipped"] = 4] = "ProjectReferenceCycle_OutputsSkipped"; + /** @deprecated Use ProjectReferenceCycle_OutputsSkipped instead. */ ExitStatus[ExitStatus["ProjectReferenceCycle_OutputsSkupped"] = 4] = "ProjectReferenceCycle_OutputsSkupped"; })(ExitStatus = ts.ExitStatus || (ts.ExitStatus = {})); /* @internal */ @@ -3434,6 +3486,14 @@ var ts; UnionReduction[UnionReduction["Literal"] = 1] = "Literal"; UnionReduction[UnionReduction["Subtype"] = 2] = "Subtype"; })(UnionReduction = ts.UnionReduction || (ts.UnionReduction = {})); + /* @internal */ + var ContextFlags; + (function (ContextFlags) { + ContextFlags[ContextFlags["None"] = 0] = "None"; + ContextFlags[ContextFlags["Signature"] = 1] = "Signature"; + ContextFlags[ContextFlags["NoConstraints"] = 2] = "NoConstraints"; + ContextFlags[ContextFlags["Completion"] = 4] = "Completion"; + })(ContextFlags = ts.ContextFlags || (ts.ContextFlags = {})); // NOTE: If modifying this enum, must modify `TypeFormatFlags` too! var NodeBuilderFlags; (function (NodeBuilderFlags) { @@ -3836,19 +3896,20 @@ var ts; ObjectFlags[ObjectFlags["JSLiteral"] = 16384] = "JSLiteral"; ObjectFlags[ObjectFlags["FreshLiteral"] = 32768] = "FreshLiteral"; ObjectFlags[ObjectFlags["ArrayLiteral"] = 65536] = "ArrayLiteral"; + ObjectFlags[ObjectFlags["ObjectRestType"] = 131072] = "ObjectRestType"; /* @internal */ - ObjectFlags[ObjectFlags["PrimitiveUnion"] = 131072] = "PrimitiveUnion"; + ObjectFlags[ObjectFlags["PrimitiveUnion"] = 262144] = "PrimitiveUnion"; /* @internal */ - ObjectFlags[ObjectFlags["ContainsWideningType"] = 262144] = "ContainsWideningType"; + ObjectFlags[ObjectFlags["ContainsWideningType"] = 524288] = "ContainsWideningType"; /* @internal */ - ObjectFlags[ObjectFlags["ContainsObjectOrArrayLiteral"] = 524288] = "ContainsObjectOrArrayLiteral"; + ObjectFlags[ObjectFlags["ContainsObjectOrArrayLiteral"] = 1048576] = "ContainsObjectOrArrayLiteral"; /* @internal */ - ObjectFlags[ObjectFlags["NonInferrableType"] = 1048576] = "NonInferrableType"; + ObjectFlags[ObjectFlags["NonInferrableType"] = 2097152] = "NonInferrableType"; ObjectFlags[ObjectFlags["ClassOrInterface"] = 3] = "ClassOrInterface"; /* @internal */ - ObjectFlags[ObjectFlags["RequiresWidening"] = 786432] = "RequiresWidening"; + ObjectFlags[ObjectFlags["RequiresWidening"] = 1572864] = "RequiresWidening"; /* @internal */ - ObjectFlags[ObjectFlags["PropagatingFlags"] = 1835008] = "PropagatingFlags"; + ObjectFlags[ObjectFlags["PropagatingFlags"] = 3670016] = "PropagatingFlags"; })(ObjectFlags = ts.ObjectFlags || (ts.ObjectFlags = {})); /* @internal */ var VarianceFlags; @@ -3875,6 +3936,20 @@ var ts; SignatureKind[SignatureKind["Call"] = 0] = "Call"; SignatureKind[SignatureKind["Construct"] = 1] = "Construct"; })(SignatureKind = ts.SignatureKind || (ts.SignatureKind = {})); + /* @internal */ + var SignatureFlags; + (function (SignatureFlags) { + SignatureFlags[SignatureFlags["None"] = 0] = "None"; + SignatureFlags[SignatureFlags["HasRestParameter"] = 1] = "HasRestParameter"; + SignatureFlags[SignatureFlags["HasLiteralTypes"] = 2] = "HasLiteralTypes"; + SignatureFlags[SignatureFlags["IsInnerCallChain"] = 4] = "IsInnerCallChain"; + SignatureFlags[SignatureFlags["IsOuterCallChain"] = 8] = "IsOuterCallChain"; + // We do not propagate `IsInnerCallChain` to instantiated signatures, as that would result in us + // attempting to add `| undefined` on each recursive call to `getReturnTypeOfSignature` when + // instantiating the return type. + SignatureFlags[SignatureFlags["PropagatingFlags"] = 3] = "PropagatingFlags"; + SignatureFlags[SignatureFlags["CallChainFlags"] = 12] = "CallChainFlags"; + })(SignatureFlags = ts.SignatureFlags || (ts.SignatureFlags = {})); var IndexKind; (function (IndexKind) { IndexKind[IndexKind["String"] = 0] = "String"; @@ -4875,16 +4950,6 @@ var ts; } } ts.createRecursiveDirectoryWatcher = createRecursiveDirectoryWatcher; - function recursiveCreateDirectory(directoryPath, sys) { - var basePath = ts.getDirectoryPath(directoryPath); - var shouldCreateParent = basePath !== "" && directoryPath !== basePath && !sys.directoryExists(basePath); - if (shouldCreateParent) { - recursiveCreateDirectory(basePath, sys); - } - if (shouldCreateParent || !sys.directoryExists(directoryPath)) { - sys.createDirectory(directoryPath); - } - } /** * patch writefile to create folder before writing the file */ @@ -4893,11 +4958,7 @@ var ts; // patch writefile to create folder before writing the file var originalWriteFile = sys.writeFile; sys.writeFile = function (path, data, writeBom) { - var directoryPath = ts.getDirectoryPath(ts.normalizeSlashes(path)); - if (directoryPath && !sys.directoryExists(directoryPath)) { - recursiveCreateDirectory(directoryPath, sys); - } - originalWriteFile.call(sys, path, data, writeBom); + return ts.writeFileEnsuringDirectories(path, data, !!writeBom, function (path, data, writeByteOrderMark) { return originalWriteFile.call(sys, path, data, writeByteOrderMark); }, function (path) { return sys.createDirectory(path); }, function (path) { return sys.directoryExists(path); }); }; } ts.patchWriteFileEnsuringDirectory = patchWriteFileEnsuringDirectory; @@ -5046,6 +5107,15 @@ var ts; bufferFrom: bufferFrom, base64decode: function (input) { return bufferFrom(input, "base64").toString("utf8"); }, base64encode: function (input) { return bufferFrom(input).toString("base64"); }, + require: function (baseDir, moduleName) { + try { + var modulePath = ts.resolveJSModule(moduleName, baseDir, nodeSystem); + return { module: require(modulePath), modulePath: modulePath, error: undefined }; + } + catch (error) { + return { module: undefined, modulePath: undefined, error: error }; + } + } }; return nodeSystem; /** @@ -5184,6 +5254,7 @@ var ts; if (fsSupportsRecursive) { return watchDirectoryUsingFsWatch; } + // defer watchDirectoryRecursively as it depends on `ts.createMap()` which may not be usable yet. var watchDirectory = tscWatchDirectory === "RecursiveDirectoryUsingFsWatchFile" ? createWatchDirectoryUsing(fsWatchFile) : tscWatchDirectory === "RecursiveDirectoryUsingDynamicPriorityPolling" ? @@ -5628,6 +5699,673 @@ var ts; ts.Debug.isDebugging = true; } })(ts || (ts = {})); +/* @internal */ +var ts; +(function (ts) { + /** + * Internally, we represent paths as strings with '/' as the directory separator. + * When we make system calls (eg: LanguageServiceHost.getDirectory()), + * we expect the host to correctly handle paths in our specified format. + */ + ts.directorySeparator = "/"; + var altDirectorySeparator = "\\"; + var urlSchemeSeparator = "://"; + var backslashRegExp = /\\/g; + //// Path Tests + /** + * Determines whether a charCode corresponds to `/` or `\`. + */ + function isAnyDirectorySeparator(charCode) { + return charCode === 47 /* slash */ || charCode === 92 /* backslash */; + } + ts.isAnyDirectorySeparator = isAnyDirectorySeparator; + /** + * Determines whether a path starts with a URL scheme (e.g. starts with `http://`, `ftp://`, `file://`, etc.). + */ + function isUrl(path) { + return getEncodedRootLength(path) < 0; + } + ts.isUrl = isUrl; + /** + * Determines whether a path is an absolute disk path (e.g. starts with `/`, or a dos path + * like `c:`, `c:\` or `c:/`). + */ + function isRootedDiskPath(path) { + return getEncodedRootLength(path) > 0; + } + ts.isRootedDiskPath = isRootedDiskPath; + /** + * Determines whether a path consists only of a path root. + */ + function isDiskPathRoot(path) { + var rootLength = getEncodedRootLength(path); + return rootLength > 0 && rootLength === path.length; + } + ts.isDiskPathRoot = isDiskPathRoot; + /** + * Determines whether a path starts with an absolute path component (i.e. `/`, `c:/`, `file://`, etc.). + * + * ```ts + * // POSIX + * pathIsAbsolute("/path/to/file.ext") === true + * // DOS + * pathIsAbsolute("c:/path/to/file.ext") === true + * // URL + * pathIsAbsolute("file:///path/to/file.ext") === true + * // Non-absolute + * pathIsAbsolute("path/to/file.ext") === false + * pathIsAbsolute("./path/to/file.ext") === false + * ``` + */ + function pathIsAbsolute(path) { + return getEncodedRootLength(path) !== 0; + } + ts.pathIsAbsolute = pathIsAbsolute; + /** + * Determines whether a path starts with a relative path component (i.e. `.` or `..`). + */ + function pathIsRelative(path) { + return /^\.\.?($|[\\/])/.test(path); + } + ts.pathIsRelative = pathIsRelative; + function hasExtension(fileName) { + return ts.stringContains(getBaseFileName(fileName), "."); + } + ts.hasExtension = hasExtension; + function fileExtensionIs(path, extension) { + return path.length > extension.length && ts.endsWith(path, extension); + } + ts.fileExtensionIs = fileExtensionIs; + function fileExtensionIsOneOf(path, extensions) { + for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) { + var extension = extensions_1[_i]; + if (fileExtensionIs(path, extension)) { + return true; + } + } + return false; + } + ts.fileExtensionIsOneOf = fileExtensionIsOneOf; + /** + * Determines whether a path has a trailing separator (`/` or `\\`). + */ + function hasTrailingDirectorySeparator(path) { + return path.length > 0 && isAnyDirectorySeparator(path.charCodeAt(path.length - 1)); + } + ts.hasTrailingDirectorySeparator = hasTrailingDirectorySeparator; + //// Path Parsing + function isVolumeCharacter(charCode) { + return (charCode >= 97 /* a */ && charCode <= 122 /* z */) || + (charCode >= 65 /* A */ && charCode <= 90 /* Z */); + } + function getFileUrlVolumeSeparatorEnd(url, start) { + var ch0 = url.charCodeAt(start); + if (ch0 === 58 /* colon */) + return start + 1; + if (ch0 === 37 /* percent */ && url.charCodeAt(start + 1) === 51 /* _3 */) { + var ch2 = url.charCodeAt(start + 2); + if (ch2 === 97 /* a */ || ch2 === 65 /* A */) + return start + 3; + } + return -1; + } + /** + * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). + * If the root is part of a URL, the twos-complement of the root length is returned. + */ + function getEncodedRootLength(path) { + if (!path) + return 0; + var ch0 = path.charCodeAt(0); + // POSIX or UNC + if (ch0 === 47 /* slash */ || ch0 === 92 /* backslash */) { + if (path.charCodeAt(1) !== ch0) + return 1; // POSIX: "/" (or non-normalized "\") + var p1 = path.indexOf(ch0 === 47 /* slash */ ? ts.directorySeparator : altDirectorySeparator, 2); + if (p1 < 0) + return path.length; // UNC: "//server" or "\\server" + return p1 + 1; // UNC: "//server/" or "\\server\" + } + // DOS + if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58 /* colon */) { + var ch2 = path.charCodeAt(2); + if (ch2 === 47 /* slash */ || ch2 === 92 /* backslash */) + return 3; // DOS: "c:/" or "c:\" + if (path.length === 2) + return 2; // DOS: "c:" (but not "c:d") + } + // URL + var schemeEnd = path.indexOf(urlSchemeSeparator); + if (schemeEnd !== -1) { + var authorityStart = schemeEnd + urlSchemeSeparator.length; + var authorityEnd = path.indexOf(ts.directorySeparator, authorityStart); + if (authorityEnd !== -1) { // URL: "file:///", "file://server/", "file://server/path" + // For local "file" URLs, include the leading DOS volume (if present). + // Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a + // special case interpreted as "the machine from which the URL is being interpreted". + var scheme = path.slice(0, schemeEnd); + var authority = path.slice(authorityStart, authorityEnd); + if (scheme === "file" && (authority === "" || authority === "localhost") && + isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) { + var volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2); + if (volumeSeparatorEnd !== -1) { + if (path.charCodeAt(volumeSeparatorEnd) === 47 /* slash */) { + // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/" + return ~(volumeSeparatorEnd + 1); + } + if (volumeSeparatorEnd === path.length) { + // URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a" + // but not "file:///c:d" or "file:///c%3ad" + return ~volumeSeparatorEnd; + } + } + } + return ~(authorityEnd + 1); // URL: "file://server/", "http://server/" + } + return ~path.length; // URL: "file://server", "http://server" + } + // relative + return 0; + } + /** + * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). + * + * For example: + * ```ts + * getRootLength("a") === 0 // "" + * getRootLength("/") === 1 // "/" + * getRootLength("c:") === 2 // "c:" + * getRootLength("c:d") === 0 // "" + * getRootLength("c:/") === 3 // "c:/" + * getRootLength("c:\\") === 3 // "c:\\" + * getRootLength("//server") === 7 // "//server" + * getRootLength("//server/share") === 8 // "//server/" + * getRootLength("\\\\server") === 7 // "\\\\server" + * getRootLength("\\\\server\\share") === 8 // "\\\\server\\" + * getRootLength("file:///path") === 8 // "file:///" + * getRootLength("file:///c:") === 10 // "file:///c:" + * getRootLength("file:///c:d") === 8 // "file:///" + * getRootLength("file:///c:/path") === 11 // "file:///c:/" + * getRootLength("file://server") === 13 // "file://server" + * getRootLength("file://server/path") === 14 // "file://server/" + * getRootLength("http://server") === 13 // "http://server" + * getRootLength("http://server/path") === 14 // "http://server/" + * ``` + */ + function getRootLength(path) { + var rootLength = getEncodedRootLength(path); + return rootLength < 0 ? ~rootLength : rootLength; + } + ts.getRootLength = getRootLength; + function getDirectoryPath(path) { + path = normalizeSlashes(path); + // If the path provided is itself the root, then return it. + var rootLength = getRootLength(path); + if (rootLength === path.length) + return path; + // return the leading portion of the path up to the last (non-terminal) directory separator + // but not including any trailing directory separator. + path = removeTrailingDirectorySeparator(path); + return path.slice(0, Math.max(rootLength, path.lastIndexOf(ts.directorySeparator))); + } + ts.getDirectoryPath = getDirectoryPath; + function getBaseFileName(path, extensions, ignoreCase) { + path = normalizeSlashes(path); + // if the path provided is itself the root, then it has not file name. + var rootLength = getRootLength(path); + if (rootLength === path.length) + return ""; + // return the trailing portion of the path starting after the last (non-terminal) directory + // separator but not including any trailing directory separator. + path = removeTrailingDirectorySeparator(path); + var name = path.slice(Math.max(getRootLength(path), path.lastIndexOf(ts.directorySeparator) + 1)); + var extension = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(name, extensions, ignoreCase) : undefined; + return extension ? name.slice(0, name.length - extension.length) : name; + } + ts.getBaseFileName = getBaseFileName; + function tryGetExtensionFromPath(path, extension, stringEqualityComparer) { + if (!ts.startsWith(extension, ".")) + extension = "." + extension; + if (path.length >= extension.length && path.charCodeAt(path.length - extension.length) === 46 /* dot */) { + var pathExtension = path.slice(path.length - extension.length); + if (stringEqualityComparer(pathExtension, extension)) { + return pathExtension; + } + } + } + function getAnyExtensionFromPathWorker(path, extensions, stringEqualityComparer) { + if (typeof extensions === "string") { + return tryGetExtensionFromPath(path, extensions, stringEqualityComparer) || ""; + } + for (var _i = 0, extensions_2 = extensions; _i < extensions_2.length; _i++) { + var extension = extensions_2[_i]; + var result = tryGetExtensionFromPath(path, extension, stringEqualityComparer); + if (result) + return result; + } + return ""; + } + function getAnyExtensionFromPath(path, extensions, ignoreCase) { + // Retrieves any string from the final "." onwards from a base file name. + // Unlike extensionFromPath, which throws an exception on unrecognized extensions. + if (extensions) { + return getAnyExtensionFromPathWorker(removeTrailingDirectorySeparator(path), extensions, ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive); + } + var baseFileName = getBaseFileName(path); + var extensionIndex = baseFileName.lastIndexOf("."); + if (extensionIndex >= 0) { + return baseFileName.substring(extensionIndex); + } + return ""; + } + ts.getAnyExtensionFromPath = getAnyExtensionFromPath; + function pathComponents(path, rootLength) { + var root = path.substring(0, rootLength); + var rest = path.substring(rootLength).split(ts.directorySeparator); + if (rest.length && !ts.lastOrUndefined(rest)) + rest.pop(); + return __spreadArrays([root], rest); + } + /** + * Parse a path into an array containing a root component (at index 0) and zero or more path + * components (at indices > 0). The result is not normalized. + * If the path is relative, the root component is `""`. + * If the path is absolute, the root component includes the first path separator (`/`). + * + * ```ts + * // POSIX + * getPathComponents("/path/to/file.ext") === ["/", "path", "to", "file.ext"] + * getPathComponents("/path/to/") === ["/", "path", "to"] + * getPathComponents("/") === ["/"] + * // DOS + * getPathComponents("c:/path/to/file.ext") === ["c:/", "path", "to", "file.ext"] + * getPathComponents("c:/path/to/") === ["c:/", "path", "to"] + * getPathComponents("c:/") === ["c:/"] + * getPathComponents("c:") === ["c:"] + * // URL + * getPathComponents("http://typescriptlang.org/path/to/file.ext") === ["http://typescriptlang.org/", "path", "to", "file.ext"] + * getPathComponents("http://typescriptlang.org/path/to/") === ["http://typescriptlang.org/", "path", "to"] + * getPathComponents("http://typescriptlang.org/") === ["http://typescriptlang.org/"] + * getPathComponents("http://typescriptlang.org") === ["http://typescriptlang.org"] + * getPathComponents("file://server/path/to/file.ext") === ["file://server/", "path", "to", "file.ext"] + * getPathComponents("file://server/path/to/") === ["file://server/", "path", "to"] + * getPathComponents("file://server/") === ["file://server/"] + * getPathComponents("file://server") === ["file://server"] + * getPathComponents("file:///path/to/file.ext") === ["file:///", "path", "to", "file.ext"] + * getPathComponents("file:///path/to/") === ["file:///", "path", "to"] + * getPathComponents("file:///") === ["file:///"] + * getPathComponents("file://") === ["file://"] + */ + function getPathComponents(path, currentDirectory) { + if (currentDirectory === void 0) { currentDirectory = ""; } + path = combinePaths(currentDirectory, path); + return pathComponents(path, getRootLength(path)); + } + ts.getPathComponents = getPathComponents; + //// Path Formatting + /** + * Formats a parsed path consisting of a root component (at index 0) and zero or more path + * segments (at indices > 0). + * + * ```ts + * getPathFromPathComponents(["/", "path", "to", "file.ext"]) === "/path/to/file.ext" + * ``` + */ + function getPathFromPathComponents(pathComponents) { + if (pathComponents.length === 0) + return ""; + var root = pathComponents[0] && ensureTrailingDirectorySeparator(pathComponents[0]); + return root + pathComponents.slice(1).join(ts.directorySeparator); + } + ts.getPathFromPathComponents = getPathFromPathComponents; + //// Path Normalization + /** + * Normalize path separators, converting `\` into `/`. + */ + function normalizeSlashes(path) { + return path.replace(backslashRegExp, ts.directorySeparator); + } + ts.normalizeSlashes = normalizeSlashes; + /** + * Reduce an array of path components to a more simplified path by navigating any + * `"."` or `".."` entries in the path. + */ + function reducePathComponents(components) { + if (!ts.some(components)) + return []; + var reduced = [components[0]]; + for (var i = 1; i < components.length; i++) { + var component = components[i]; + if (!component) + continue; + if (component === ".") + continue; + if (component === "..") { + if (reduced.length > 1) { + if (reduced[reduced.length - 1] !== "..") { + reduced.pop(); + continue; + } + } + else if (reduced[0]) + continue; + } + reduced.push(component); + } + return reduced; + } + ts.reducePathComponents = reducePathComponents; + /** + * Combines paths. If a path is absolute, it replaces any previous path. Relative paths are not simplified. + * + * ```ts + * // Non-rooted + * combinePaths("path", "to", "file.ext") === "path/to/file.ext" + * combinePaths("path", "dir", "..", "to", "file.ext") === "path/dir/../to/file.ext" + * // POSIX + * combinePaths("/path", "to", "file.ext") === "/path/to/file.ext" + * combinePaths("/path", "/to", "file.ext") === "/to/file.ext" + * // DOS + * combinePaths("c:/path", "to", "file.ext") === "c:/path/to/file.ext" + * combinePaths("c:/path", "c:/to", "file.ext") === "c:/to/file.ext" + * // URL + * combinePaths("file:///path", "to", "file.ext") === "file:///path/to/file.ext" + * combinePaths("file:///path", "file:///to", "file.ext") === "file:///to/file.ext" + * ``` + */ + function combinePaths(path) { + var paths = []; + for (var _i = 1; _i < arguments.length; _i++) { + paths[_i - 1] = arguments[_i]; + } + if (path) + path = normalizeSlashes(path); + for (var _a = 0, paths_1 = paths; _a < paths_1.length; _a++) { + var relativePath = paths_1[_a]; + if (!relativePath) + continue; + relativePath = normalizeSlashes(relativePath); + if (!path || getRootLength(relativePath) !== 0) { + path = relativePath; + } + else { + path = ensureTrailingDirectorySeparator(path) + relativePath; + } + } + return path; + } + ts.combinePaths = combinePaths; + /** + * Combines and resolves paths. If a path is absolute, it replaces any previous path. Any + * `.` and `..` path components are resolved. Trailing directory separators are preserved. + * + * ```ts + * resolvePath("/path", "to", "file.ext") === "path/to/file.ext" + * resolvePath("/path", "to", "file.ext/") === "path/to/file.ext/" + * resolvePath("/path", "dir", "..", "to", "file.ext") === "path/to/file.ext" + * ``` + */ + function resolvePath(path) { + var paths = []; + for (var _i = 1; _i < arguments.length; _i++) { + paths[_i - 1] = arguments[_i]; + } + return normalizePath(ts.some(paths) ? combinePaths.apply(void 0, __spreadArrays([path], paths)) : normalizeSlashes(path)); + } + ts.resolvePath = resolvePath; + /** + * Parse a path into an array containing a root component (at index 0) and zero or more path + * components (at indices > 0). The result is normalized. + * If the path is relative, the root component is `""`. + * If the path is absolute, the root component includes the first path separator (`/`). + * + * ```ts + * getNormalizedPathComponents("to/dir/../file.ext", "/path/") === ["/", "path", "to", "file.ext"] + */ + function getNormalizedPathComponents(path, currentDirectory) { + return reducePathComponents(getPathComponents(path, currentDirectory)); + } + ts.getNormalizedPathComponents = getNormalizedPathComponents; + function getNormalizedAbsolutePath(fileName, currentDirectory) { + return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory)); + } + ts.getNormalizedAbsolutePath = getNormalizedAbsolutePath; + function normalizePath(path) { + path = normalizeSlashes(path); + var normalized = getPathFromPathComponents(reducePathComponents(getPathComponents(path))); + return normalized && hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(normalized) : normalized; + } + ts.normalizePath = normalizePath; + function getPathWithoutRoot(pathComponents) { + if (pathComponents.length === 0) + return ""; + return pathComponents.slice(1).join(ts.directorySeparator); + } + function getNormalizedAbsolutePathWithoutRoot(fileName, currentDirectory) { + return getPathWithoutRoot(getNormalizedPathComponents(fileName, currentDirectory)); + } + ts.getNormalizedAbsolutePathWithoutRoot = getNormalizedAbsolutePathWithoutRoot; + function toPath(fileName, basePath, getCanonicalFileName) { + var nonCanonicalizedPath = isRootedDiskPath(fileName) + ? normalizePath(fileName) + : getNormalizedAbsolutePath(fileName, basePath); + return getCanonicalFileName(nonCanonicalizedPath); + } + ts.toPath = toPath; + function normalizePathAndParts(path) { + path = normalizeSlashes(path); + var _a = reducePathComponents(getPathComponents(path)), root = _a[0], parts = _a.slice(1); + if (parts.length) { + var joinedParts = root + parts.join(ts.directorySeparator); + return { path: hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(joinedParts) : joinedParts, parts: parts }; + } + else { + return { path: root, parts: parts }; + } + } + ts.normalizePathAndParts = normalizePathAndParts; + function removeTrailingDirectorySeparator(path) { + if (hasTrailingDirectorySeparator(path)) { + return path.substr(0, path.length - 1); + } + return path; + } + ts.removeTrailingDirectorySeparator = removeTrailingDirectorySeparator; + function ensureTrailingDirectorySeparator(path) { + if (!hasTrailingDirectorySeparator(path)) { + return path + ts.directorySeparator; + } + return path; + } + ts.ensureTrailingDirectorySeparator = ensureTrailingDirectorySeparator; + /** + * Ensures a path is either absolute (prefixed with `/` or `c:`) or dot-relative (prefixed + * with `./` or `../`) so as not to be confused with an unprefixed module name. + * + * ```ts + * ensurePathIsNonModuleName("/path/to/file.ext") === "/path/to/file.ext" + * ensurePathIsNonModuleName("./path/to/file.ext") === "./path/to/file.ext" + * ensurePathIsNonModuleName("../path/to/file.ext") === "../path/to/file.ext" + * ensurePathIsNonModuleName("path/to/file.ext") === "./path/to/file.ext" + * ``` + */ + function ensurePathIsNonModuleName(path) { + return !pathIsAbsolute(path) && !pathIsRelative(path) ? "./" + path : path; + } + ts.ensurePathIsNonModuleName = ensurePathIsNonModuleName; + function changeAnyExtension(path, ext, extensions, ignoreCase) { + var pathext = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(path, extensions, ignoreCase) : getAnyExtensionFromPath(path); + return pathext ? path.slice(0, path.length - pathext.length) + (ts.startsWith(ext, ".") ? ext : "." + ext) : path; + } + ts.changeAnyExtension = changeAnyExtension; + //// Path Comparisons + // check path for these segments: '', '.'. '..' + var relativePathSegmentRegExp = /(^|\/)\.{0,2}($|\/)/; + function comparePathsWorker(a, b, componentComparer) { + if (a === b) + return 0 /* EqualTo */; + if (a === undefined) + return -1 /* LessThan */; + if (b === undefined) + return 1 /* GreaterThan */; + // NOTE: Performance optimization - shortcut if the root segments differ as there would be no + // need to perform path reduction. + var aRoot = a.substring(0, getRootLength(a)); + var bRoot = b.substring(0, getRootLength(b)); + var result = ts.compareStringsCaseInsensitive(aRoot, bRoot); + if (result !== 0 /* EqualTo */) { + return result; + } + // NOTE: Performance optimization - shortcut if there are no relative path segments in + // the non-root portion of the path + var aRest = a.substring(aRoot.length); + var bRest = b.substring(bRoot.length); + if (!relativePathSegmentRegExp.test(aRest) && !relativePathSegmentRegExp.test(bRest)) { + return componentComparer(aRest, bRest); + } + // The path contains a relative path segment. Normalize the paths and perform a slower component + // by component comparison. + var aComponents = reducePathComponents(getPathComponents(a)); + var bComponents = reducePathComponents(getPathComponents(b)); + var sharedLength = Math.min(aComponents.length, bComponents.length); + for (var i = 1; i < sharedLength; i++) { + var result_1 = componentComparer(aComponents[i], bComponents[i]); + if (result_1 !== 0 /* EqualTo */) { + return result_1; + } + } + return ts.compareValues(aComponents.length, bComponents.length); + } + /** + * Performs a case-sensitive comparison of two paths. Path roots are always compared case-insensitively. + */ + function comparePathsCaseSensitive(a, b) { + return comparePathsWorker(a, b, ts.compareStringsCaseSensitive); + } + ts.comparePathsCaseSensitive = comparePathsCaseSensitive; + /** + * Performs a case-insensitive comparison of two paths. + */ + function comparePathsCaseInsensitive(a, b) { + return comparePathsWorker(a, b, ts.compareStringsCaseInsensitive); + } + ts.comparePathsCaseInsensitive = comparePathsCaseInsensitive; + function comparePaths(a, b, currentDirectory, ignoreCase) { + if (typeof currentDirectory === "string") { + a = combinePaths(currentDirectory, a); + b = combinePaths(currentDirectory, b); + } + else if (typeof currentDirectory === "boolean") { + ignoreCase = currentDirectory; + } + return comparePathsWorker(a, b, ts.getStringComparer(ignoreCase)); + } + ts.comparePaths = comparePaths; + function containsPath(parent, child, currentDirectory, ignoreCase) { + if (typeof currentDirectory === "string") { + parent = combinePaths(currentDirectory, parent); + child = combinePaths(currentDirectory, child); + } + else if (typeof currentDirectory === "boolean") { + ignoreCase = currentDirectory; + } + if (parent === undefined || child === undefined) + return false; + if (parent === child) + return true; + var parentComponents = reducePathComponents(getPathComponents(parent)); + var childComponents = reducePathComponents(getPathComponents(child)); + if (childComponents.length < parentComponents.length) { + return false; + } + var componentEqualityComparer = ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive; + for (var i = 0; i < parentComponents.length; i++) { + var equalityComparer = i === 0 ? ts.equateStringsCaseInsensitive : componentEqualityComparer; + if (!equalityComparer(parentComponents[i], childComponents[i])) { + return false; + } + } + return true; + } + ts.containsPath = containsPath; + /** + * Determines whether `fileName` starts with the specified `directoryName` using the provided path canonicalization callback. + * Comparison is case-sensitive between the canonical paths. + * + * @deprecated Use `containsPath` if possible. + */ + function startsWithDirectory(fileName, directoryName, getCanonicalFileName) { + var canonicalFileName = getCanonicalFileName(fileName); + var canonicalDirectoryName = getCanonicalFileName(directoryName); + return ts.startsWith(canonicalFileName, canonicalDirectoryName + "/") || ts.startsWith(canonicalFileName, canonicalDirectoryName + "\\"); + } + ts.startsWithDirectory = startsWithDirectory; + //// Relative Paths + function getPathComponentsRelativeTo(from, to, stringEqualityComparer, getCanonicalFileName) { + var fromComponents = reducePathComponents(getPathComponents(from)); + var toComponents = reducePathComponents(getPathComponents(to)); + var start; + for (start = 0; start < fromComponents.length && start < toComponents.length; start++) { + var fromComponent = getCanonicalFileName(fromComponents[start]); + var toComponent = getCanonicalFileName(toComponents[start]); + var comparer = start === 0 ? ts.equateStringsCaseInsensitive : stringEqualityComparer; + if (!comparer(fromComponent, toComponent)) + break; + } + if (start === 0) { + return toComponents; + } + var components = toComponents.slice(start); + var relative = []; + for (; start < fromComponents.length; start++) { + relative.push(".."); + } + return __spreadArrays([""], relative, components); + } + ts.getPathComponentsRelativeTo = getPathComponentsRelativeTo; + function getRelativePathFromDirectory(fromDirectory, to, getCanonicalFileNameOrIgnoreCase) { + ts.Debug.assert((getRootLength(fromDirectory) > 0) === (getRootLength(to) > 0), "Paths must either both be absolute or both be relative"); + var getCanonicalFileName = typeof getCanonicalFileNameOrIgnoreCase === "function" ? getCanonicalFileNameOrIgnoreCase : ts.identity; + var ignoreCase = typeof getCanonicalFileNameOrIgnoreCase === "boolean" ? getCanonicalFileNameOrIgnoreCase : false; + var pathComponents = getPathComponentsRelativeTo(fromDirectory, to, ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive, getCanonicalFileName); + return getPathFromPathComponents(pathComponents); + } + ts.getRelativePathFromDirectory = getRelativePathFromDirectory; + function convertToRelativePath(absoluteOrRelativePath, basePath, getCanonicalFileName) { + return !isRootedDiskPath(absoluteOrRelativePath) + ? absoluteOrRelativePath + : getRelativePathToDirectoryOrUrl(basePath, absoluteOrRelativePath, basePath, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); + } + ts.convertToRelativePath = convertToRelativePath; + function getRelativePathFromFile(from, to, getCanonicalFileName) { + return ensurePathIsNonModuleName(getRelativePathFromDirectory(getDirectoryPath(from), to, getCanonicalFileName)); + } + ts.getRelativePathFromFile = getRelativePathFromFile; + function getRelativePathToDirectoryOrUrl(directoryPathOrUrl, relativeOrAbsolutePath, currentDirectory, getCanonicalFileName, isAbsolutePathAnUrl) { + var pathComponents = getPathComponentsRelativeTo(resolvePath(currentDirectory, directoryPathOrUrl), resolvePath(currentDirectory, relativeOrAbsolutePath), ts.equateStringsCaseSensitive, getCanonicalFileName); + var firstComponent = pathComponents[0]; + if (isAbsolutePathAnUrl && isRootedDiskPath(firstComponent)) { + var prefix = firstComponent.charAt(0) === ts.directorySeparator ? "file://" : "file:///"; + pathComponents[0] = prefix + firstComponent; + } + return getPathFromPathComponents(pathComponents); + } + ts.getRelativePathToDirectoryOrUrl = getRelativePathToDirectoryOrUrl; + function forEachAncestorDirectory(directory, callback) { + while (true) { + var result = callback(directory); + if (result !== undefined) { + return result; + } + var parentPath = getDirectoryPath(directory); + if (parentPath === directory) { + return undefined; + } + directory = parentPath; + } + } + ts.forEachAncestorDirectory = forEachAncestorDirectory; +})(ts || (ts = {})); // // generated from './diagnosticInformationMap.generated.ts' by 'src/compiler' /* @internal */ @@ -5655,7 +6393,7 @@ var ts; An_index_signature_parameter_cannot_have_an_initializer: diag(1020, ts.DiagnosticCategory.Error, "An_index_signature_parameter_cannot_have_an_initializer_1020", "An index signature parameter cannot have an initializer."), An_index_signature_must_have_a_type_annotation: diag(1021, ts.DiagnosticCategory.Error, "An_index_signature_must_have_a_type_annotation_1021", "An index signature must have a type annotation."), An_index_signature_parameter_must_have_a_type_annotation: diag(1022, ts.DiagnosticCategory.Error, "An_index_signature_parameter_must_have_a_type_annotation_1022", "An index signature parameter must have a type annotation."), - An_index_signature_parameter_type_must_be_string_or_number: diag(1023, ts.DiagnosticCategory.Error, "An_index_signature_parameter_type_must_be_string_or_number_1023", "An index signature parameter type must be 'string' or 'number'."), + An_index_signature_parameter_type_must_be_either_string_or_number: diag(1023, ts.DiagnosticCategory.Error, "An_index_signature_parameter_type_must_be_either_string_or_number_1023", "An index signature parameter type must be either 'string' or 'number'."), readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature: diag(1024, ts.DiagnosticCategory.Error, "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024", "'readonly' modifier can only appear on a property declaration or index signature."), Accessibility_modifier_already_seen: diag(1028, ts.DiagnosticCategory.Error, "Accessibility_modifier_already_seen_1028", "Accessibility modifier already seen."), _0_modifier_must_precede_1_modifier: diag(1029, ts.DiagnosticCategory.Error, "_0_modifier_must_precede_1_modifier_1029", "'{0}' modifier must precede '{1}' modifier."), @@ -5863,7 +6601,7 @@ var ts; Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1320, ts.DiagnosticCategory.Error, "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."), Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1321, ts.DiagnosticCategory.Error, "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."), Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1322, ts.DiagnosticCategory.Error, "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."), - Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext: diag(1323, ts.DiagnosticCategory.Error, "Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323", "Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'."), + Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_commonjs_amd_system_or_umd: diag(1323, ts.DiagnosticCategory.Error, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_commonjs_amd_system_or_umd_1323", "Dynamic imports are only supported when the '--module' flag is set to 'esnext', 'commonjs', 'amd', 'system', or 'umd'."), Dynamic_import_must_have_one_specifier_as_an_argument: diag(1324, ts.DiagnosticCategory.Error, "Dynamic_import_must_have_one_specifier_as_an_argument_1324", "Dynamic import must have one specifier as an argument."), Specifier_of_dynamic_import_cannot_be_spread_element: diag(1325, ts.DiagnosticCategory.Error, "Specifier_of_dynamic_import_cannot_be_spread_element_1325", "Specifier of dynamic import cannot be spread element."), Dynamic_import_cannot_have_type_arguments: diag(1326, ts.DiagnosticCategory.Error, "Dynamic_import_cannot_have_type_arguments_1326", "Dynamic import cannot have type arguments"), @@ -5899,6 +6637,7 @@ var ts; An_enum_member_name_must_be_followed_by_a_or: diag(1357, ts.DiagnosticCategory.Error, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."), Tagged_template_expressions_are_not_permitted_in_an_optional_chain: diag(1358, ts.DiagnosticCategory.Error, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."), Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here: diag(1359, ts.DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359", "Identifier expected. '{0}' is a reserved word that cannot be used here."), + Did_you_mean_to_parenthesize_this_function_type: diag(1360, ts.DiagnosticCategory.Error, "Did_you_mean_to_parenthesize_this_function_type_1360", "Did you mean to parenthesize this function type?"), The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."), The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."), Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), @@ -6026,7 +6765,6 @@ var ts; Class_0_incorrectly_implements_interface_1: diag(2420, ts.DiagnosticCategory.Error, "Class_0_incorrectly_implements_interface_1_2420", "Class '{0}' incorrectly implements interface '{1}'."), A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2422, ts.DiagnosticCategory.Error, "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422", "A class can only implement an object type or intersection of object types with statically known members."), Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: diag(2423, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423", "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."), - Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: diag(2424, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424", "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property."), Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: diag(2425, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425", "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."), Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: diag(2426, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426", "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."), Interface_name_cannot_be_0: diag(2427, ts.DiagnosticCategory.Error, "Interface_name_cannot_be_0_2427", "Interface name cannot be '{0}'."), @@ -6196,8 +6934,8 @@ var ts; JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: diag(2607, ts.DiagnosticCategory.Error, "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", "JSX element class does not support attributes because it does not have a '{0}' property."), The_global_type_JSX_0_may_not_have_more_than_one_property: diag(2608, ts.DiagnosticCategory.Error, "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", "The global type 'JSX.{0}' may not have more than one property."), JSX_spread_child_must_be_an_array_type: diag(2609, ts.DiagnosticCategory.Error, "JSX_spread_child_must_be_an_array_type_2609", "JSX spread child must be an array type."), - Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_property: diag(2610, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_proper_2610", "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member property."), - Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_accessor: diag(2611, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_access_2611", "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member accessor."), + _0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property: diag(2610, ts.DiagnosticCategory.Error, "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610", "'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property."), + _0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor: diag(2611, ts.DiagnosticCategory.Error, "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611", "'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor."), Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration: diag(2612, ts.DiagnosticCategory.Error, "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612", "Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration."), Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead: diag(2613, ts.DiagnosticCategory.Error, "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613", "Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"), Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead: diag(2614, ts.DiagnosticCategory.Error, "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614", "Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"), @@ -6420,6 +7158,8 @@ var ts; Parameter_0_of_accessor_has_or_is_using_private_name_1: diag(4106, ts.DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106", "Parameter '{0}' of accessor has or is using private name '{1}'."), Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2: diag(4107, ts.DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107", "Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."), Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4108, ts.DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108", "Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."), + Type_arguments_for_0_circularly_reference_themselves: diag(4109, ts.DiagnosticCategory.Error, "Type_arguments_for_0_circularly_reference_themselves_4109", "Type arguments for '{0}' circularly reference themselves."), + Tuple_type_arguments_circularly_reference_themselves: diag(4110, ts.DiagnosticCategory.Error, "Tuple_type_arguments_circularly_reference_themselves_4110", "Tuple type arguments circularly reference themselves."), The_current_host_does_not_support_the_0_option: diag(5001, ts.DiagnosticCategory.Error, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."), Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, ts.DiagnosticCategory.Error, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."), File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, ts.DiagnosticCategory.Error, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."), @@ -6427,6 +7167,7 @@ var ts; Failed_to_parse_file_0_Colon_1: diag(5014, ts.DiagnosticCategory.Error, "Failed_to_parse_file_0_Colon_1_5014", "Failed to parse file '{0}': {1}."), Unknown_compiler_option_0: diag(5023, ts.DiagnosticCategory.Error, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."), Compiler_option_0_requires_a_value_of_type_1: diag(5024, ts.DiagnosticCategory.Error, "Compiler_option_0_requires_a_value_of_type_1_5024", "Compiler option '{0}' requires a value of type {1}."), + Unknown_compiler_option_0_Did_you_mean_1: diag(5025, ts.DiagnosticCategory.Error, "Unknown_compiler_option_0_Did_you_mean_1_5025", "Unknown compiler option '{0}'. Did you mean '{1}'?"), Could_not_write_file_0_Colon_1: diag(5033, ts.DiagnosticCategory.Error, "Could_not_write_file_0_Colon_1_5033", "Could not write file '{0}': {1}."), Option_project_cannot_be_mixed_with_source_files_on_a_command_line: diag(5042, ts.DiagnosticCategory.Error, "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042", "Option 'project' cannot be mixed with source files on a command line."), Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher: diag(5047, ts.DiagnosticCategory.Error, "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047", "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."), @@ -6457,6 +7198,7 @@ var ts; Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified: diag(5074, ts.DiagnosticCategory.Error, "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074", "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option `--tsBuildInfoFile` is specified."), _0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2: diag(5075, ts.DiagnosticCategory.Error, "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075", "'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."), _0_and_1_operations_cannot_be_mixed_without_parentheses: diag(5076, ts.DiagnosticCategory.Error, "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076", "'{0}' and '{1}' operations cannot be mixed without parentheses."), + Unknown_build_option_0_Did_you_mean_1: diag(5077, ts.DiagnosticCategory.Error, "Unknown_build_option_0_Did_you_mean_1_5077", "Unknown build option '{0}'. Did you mean '{1}'?"), Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6000, ts.DiagnosticCategory.Message, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."), Concatenate_and_emit_output_to_single_file: diag(6001, ts.DiagnosticCategory.Message, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."), Generates_corresponding_d_ts_file: diag(6002, ts.DiagnosticCategory.Message, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), @@ -6503,7 +7245,7 @@ var ts; Corrupted_locale_file_0: diag(6051, ts.DiagnosticCategory.Error, "Corrupted_locale_file_0_6051", "Corrupted locale file {0}."), Raise_error_on_expressions_and_declarations_with_an_implied_any_type: diag(6052, ts.DiagnosticCategory.Message, "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052", "Raise error on expressions and declarations with an implied 'any' type."), File_0_not_found: diag(6053, ts.DiagnosticCategory.Error, "File_0_not_found_6053", "File '{0}' not found."), - File_0_has_unsupported_extension_The_only_supported_extensions_are_1: diag(6054, ts.DiagnosticCategory.Error, "File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054", "File '{0}' has unsupported extension. The only supported extensions are {1}."), + File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1: diag(6054, ts.DiagnosticCategory.Error, "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054", "File '{0}' has an unsupported extension. The only supported extensions are {1}."), Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: diag(6055, ts.DiagnosticCategory.Message, "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055", "Suppress noImplicitAny errors for indexing objects lacking index signatures."), Do_not_emit_declarations_for_code_that_has_an_internal_annotation: diag(6056, ts.DiagnosticCategory.Message, "Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056", "Do not emit declarations for code that has an '@internal' annotation."), Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: diag(6058, ts.DiagnosticCategory.Message, "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058", "Specify the root directory of input files. Use to control the output directory structure with --outDir."), @@ -6711,6 +7453,8 @@ var ts; The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", "The expected type comes from property '{0}' which is declared here on type '{1}'"), The_expected_type_comes_from_this_index_signature: diag(6501, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."), The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."), + Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing: diag(6503, ts.DiagnosticCategory.Message, "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503", "Print names of files that are part of the compilation and then stop processing."), + File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option: diag(6504, ts.DiagnosticCategory.Error, "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504", "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"), Variable_0_implicitly_has_an_1_type: diag(7005, ts.DiagnosticCategory.Error, "Variable_0_implicitly_has_an_1_type_7005", "Variable '{0}' implicitly has an '{1}' type."), Parameter_0_implicitly_has_an_1_type: diag(7006, ts.DiagnosticCategory.Error, "Parameter_0_implicitly_has_an_1_type_7006", "Parameter '{0}' implicitly has an '{1}' type."), Member_0_implicitly_has_an_1_type: diag(7008, ts.DiagnosticCategory.Error, "Member_0_implicitly_has_an_1_type_7008", "Member '{0}' implicitly has an '{1}' type."), @@ -6814,6 +7558,7 @@ var ts; Expected_corresponding_closing_tag_for_JSX_fragment: diag(17015, ts.DiagnosticCategory.Error, "Expected_corresponding_closing_tag_for_JSX_fragment_17015", "Expected corresponding closing tag for JSX fragment."), JSX_fragment_is_not_supported_when_using_jsxFactory: diag(17016, ts.DiagnosticCategory.Error, "JSX_fragment_is_not_supported_when_using_jsxFactory_17016", "JSX fragment is not supported when using --jsxFactory"), JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma: diag(17017, ts.DiagnosticCategory.Error, "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017", "JSX fragment is not supported when using an inline JSX factory pragma"), + Unknown_type_acquisition_option_0_Did_you_mean_1: diag(17018, ts.DiagnosticCategory.Error, "Unknown_type_acquisition_option_0_Did_you_mean_1_17018", "Unknown type acquisition option '{0}'. Did you mean '{1}'?"), Circularity_detected_while_resolving_configuration_Colon_0: diag(18000, ts.DiagnosticCategory.Error, "Circularity_detected_while_resolving_configuration_Colon_0_18000", "Circularity detected while resolving configuration: {0}"), A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not: diag(18001, ts.DiagnosticCategory.Error, "A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not_18001", "A path in an 'extends' option must be relative or rooted, but '{0}' is not."), The_files_list_in_config_file_0_is_empty: diag(18002, ts.DiagnosticCategory.Error, "The_files_list_in_config_file_0_is_empty_18002", "The 'files' list in config file '{0}' is empty."), @@ -9046,7 +9791,7 @@ var ts; ts.getDeclarationOfKind = getDeclarationOfKind; /** Create a new escaped identifier map. */ function createUnderscoreEscapedMap() { - return new ts.MapCtr(); + return new ts.Map(); } ts.createUnderscoreEscapedMap = createUnderscoreEscapedMap; function hasEntries(map) { @@ -9102,13 +9847,6 @@ var ts; reportPrivateInBaseOfClassExpression: ts.noop, }; } - function toPath(fileName, basePath, getCanonicalFileName) { - var nonCanonicalizedPath = ts.isRootedDiskPath(fileName) - ? ts.normalizePath(fileName) - : ts.getNormalizedAbsolutePath(fileName, basePath); - return getCanonicalFileName(nonCanonicalizedPath); - } - ts.toPath = toPath; function changesAffectModuleResolution(oldOptions, newOptions) { return oldOptions.configFilePath !== newOptions.configFilePath || optionsHaveModuleResolutionChanges(oldOptions, newOptions); @@ -9915,6 +10653,11 @@ var ts; break; case 201 /* ArrowFunction */: return getErrorSpanForArrowFunction(sourceFile, node); + case 275 /* CaseClause */: + case 276 /* DefaultClause */: + var start = ts.skipTrivia(sourceFile.text, node.pos); + var end = node.statements.length > 0 ? node.statements[0].pos : node.end; + return ts.createTextSpanFromBounds(start, end); } if (errorNode === undefined) { // If we don't have a better node, then just set the error on the first token of @@ -10727,7 +11470,7 @@ var ts; (node.typeArguments[0].kind === 142 /* StringKeyword */ || node.typeArguments[0].kind === 139 /* NumberKeyword */); } ts.isJSDocIndexSignature = isJSDocIndexSignature; - function isRequireCall(callExpression, checkArgumentIsStringLiteralLike) { + function isRequireCall(callExpression, requireStringLiteralLikeArgument) { if (callExpression.kind !== 195 /* CallExpression */) { return false; } @@ -10739,7 +11482,7 @@ var ts; return false; } var arg = args[0]; - return !checkArgumentIsStringLiteralLike || ts.isStringLiteralLike(arg); + return !requireStringLiteralLikeArgument || ts.isStringLiteralLike(arg); } ts.isRequireCall = isRequireCall; function isSingleOrDoubleQuote(charCode) { @@ -10961,27 +11704,31 @@ var ts; isBindableStaticNameExpression(expr.arguments[0], /*excludeThisKeyword*/ true); } ts.isBindableObjectDefinePropertyCall = isBindableObjectDefinePropertyCall; - function isBindableStaticElementAccessExpression(node, excludeThisKeyword) { - return isLiteralLikeElementAccess(node) - && ((!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */) || - isEntityNameExpression(node.expression) || - isBindableStaticElementAccessExpression(node.expression, /*excludeThisKeyword*/ true)); - } - ts.isBindableStaticElementAccessExpression = isBindableStaticElementAccessExpression; + /** x.y OR x[0] */ function isLiteralLikeAccess(node) { return ts.isPropertyAccessExpression(node) || isLiteralLikeElementAccess(node); } ts.isLiteralLikeAccess = isLiteralLikeAccess; + /** x[0] OR x['a'] OR x[Symbol.y] */ function isLiteralLikeElementAccess(node) { return ts.isElementAccessExpression(node) && (isStringOrNumericLiteralLike(node.argumentExpression) || isWellKnownSymbolSyntactically(node.argumentExpression)); } ts.isLiteralLikeElementAccess = isLiteralLikeElementAccess; + /** Any series of property and element accesses. */ function isBindableStaticAccessExpression(node, excludeThisKeyword) { return ts.isPropertyAccessExpression(node) && (!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */ || isBindableStaticNameExpression(node.expression, /*excludeThisKeyword*/ true)) || isBindableStaticElementAccessExpression(node, excludeThisKeyword); } ts.isBindableStaticAccessExpression = isBindableStaticAccessExpression; + /** Any series of property and element accesses, ending in a literal element access */ + function isBindableStaticElementAccessExpression(node, excludeThisKeyword) { + return isLiteralLikeElementAccess(node) + && ((!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */) || + isEntityNameExpression(node.expression) || + isBindableStaticAccessExpression(node.expression, /*excludeThisKeyword*/ true)); + } + ts.isBindableStaticElementAccessExpression = isBindableStaticElementAccessExpression; function isBindableStaticNameExpression(node, excludeThisKeyword) { return isEntityNameExpression(node) || isBindableStaticAccessExpression(node, excludeThisKeyword); } @@ -11010,7 +11757,7 @@ var ts; if (expr.operatorToken.kind !== 62 /* EqualsToken */ || !isAccessExpression(expr.left)) { return 0 /* None */; } - if (isBindableStaticNameExpression(expr.left.expression) && getElementOrPropertyAccessName(expr.left) === "prototype" && ts.isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) { + if (isBindableStaticNameExpression(expr.left.expression, /*excludeThisKeyword*/ true) && getElementOrPropertyAccessName(expr.left) === "prototype" && ts.isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) { // F.prototype = { ... } return 6 /* Prototype */; } @@ -11066,13 +11813,17 @@ var ts; nextToLast = nextToLast.expression; } var id = nextToLast.expression; - if (id.escapedText === "exports" || - id.escapedText === "module" && getElementOrPropertyAccessName(nextToLast) === "exports") { - // exports.name = expr OR module.exports.name = expr + if ((id.escapedText === "exports" || + id.escapedText === "module" && getElementOrPropertyAccessName(nextToLast) === "exports") && + // ExportsProperty does not support binding with computed names + isBindableStaticAccessExpression(lhs)) { + // exports.name = expr OR module.exports.name = expr OR exports["name"] = expr ... return 1 /* ExportsProperty */; } - // F.G...x = expr - return 5 /* Property */; + if (isBindableStaticNameExpression(lhs, /*excludeThisKeyword*/ true) || (ts.isElementAccessExpression(lhs) && isDynamicName(lhs) && lhs.expression.kind !== 103 /* ThisKeyword */)) { + // F.G...x = expr + return 5 /* Property */; + } } return 0 /* None */; } @@ -12394,7 +13145,7 @@ var ts; */ function getExternalModuleNameFromPath(host, fileName, referencePath) { var getCanonicalFileName = function (f) { return host.getCanonicalFileName(f); }; - var dir = toPath(referencePath ? ts.getDirectoryPath(referencePath) : host.getCommonSourceDirectory(), host.getCurrentDirectory(), getCanonicalFileName); + var dir = ts.toPath(referencePath ? ts.getDirectoryPath(referencePath) : host.getCommonSourceDirectory(), host.getCurrentDirectory(), getCanonicalFileName); var filePath = ts.getNormalizedAbsolutePath(fileName, host.getCurrentDirectory()); var relativePath = ts.getRelativePathToDirectoryOrUrl(dir, filePath, dir, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); var extensionless = ts.removeFileExtension(relativePath); @@ -12477,6 +13228,25 @@ var ts; }, sourceFiles); } ts.writeFile = writeFile; + function ensureDirectoriesExist(directoryPath, createDirectory, directoryExists) { + if (directoryPath.length > ts.getRootLength(directoryPath) && !directoryExists(directoryPath)) { + var parentDirectory = ts.getDirectoryPath(directoryPath); + ensureDirectoriesExist(parentDirectory, createDirectory, directoryExists); + createDirectory(directoryPath); + } + } + function writeFileEnsuringDirectories(path, data, writeByteOrderMark, writeFile, createDirectory, directoryExists) { + // PERF: Checking for directory existence is expensive. Instead, assume the directory exists + // and fall back to creating it if the file write fails. + try { + writeFile(path, data, writeByteOrderMark); + } + catch (_a) { + ensureDirectoriesExist(ts.getDirectoryPath(ts.normalizePath(path)), createDirectory, directoryExists); + writeFile(path, data, writeByteOrderMark); + } + } + ts.writeFileEnsuringDirectories = writeFileEnsuringDirectories; function getLineOfLocalPosition(currentSourceFile, pos) { return ts.getLineAndCharacterOfPosition(currentSourceFile, pos).line; } @@ -12916,6 +13686,23 @@ var ts; return node.kind === 75 /* Identifier */ || isPropertyAccessEntityNameExpression(node); } ts.isEntityNameExpression = isEntityNameExpression; + function getFirstIdentifier(node) { + switch (node.kind) { + case 75 /* Identifier */: + return node; + case 152 /* QualifiedName */: + do { + node = node.left; + } while (node.kind !== 75 /* Identifier */); + return node; + case 193 /* PropertyAccessExpression */: + do { + node = node.expression; + } while (node.kind !== 75 /* Identifier */); + return node; + } + } + ts.getFirstIdentifier = getFirstIdentifier; function isDottedName(node) { return node.kind === 75 /* Identifier */ || node.kind === 103 /* ThisKeyword */ || node.kind === 193 /* PropertyAccessExpression */ && isDottedName(node.expression) || @@ -13434,20 +14221,6 @@ var ts; }); } ts.mutateMap = mutateMap; - function forEachAncestorDirectory(directory, callback) { - while (true) { - var result = callback(directory); - if (result !== undefined) { - return result; - } - var parentPath = ts.getDirectoryPath(directory); - if (parentPath === directory) { - return undefined; - } - directory = parentPath; - } - } - ts.forEachAncestorDirectory = forEachAncestorDirectory; // Return true if the given type is the constructor type for an abstract class function isAbstractConstructorType(type) { return !!(getObjectFlags(type) & 16 /* Anonymous */) && !!type.symbol && isAbstractConstructorSymbol(type.symbol); @@ -13474,7 +14247,7 @@ var ts; } ts.typeHasCallOrConstructSignatures = typeHasCallOrConstructSignatures; function forSomeAncestorDirectory(directory, callback) { - return !!forEachAncestorDirectory(directory, function (d) { return callback(d) ? true : undefined; }); + return !!ts.forEachAncestorDirectory(directory, function (d) { return callback(d) ? true : undefined; }); } ts.forSomeAncestorDirectory = forSomeAncestorDirectory; function isUMDExportSymbol(symbol) { @@ -14539,11 +15312,47 @@ var ts; } ts.isCallChain = isCallChain; function isOptionalChain(node) { - return isPropertyAccessChain(node) - || isElementAccessChain(node) - || isCallChain(node); + var kind = node.kind; + return !!(node.flags & 32 /* OptionalChain */) && + (kind === 193 /* PropertyAccessExpression */ + || kind === 194 /* ElementAccessExpression */ + || kind === 195 /* CallExpression */); } ts.isOptionalChain = isOptionalChain; + /* @internal */ + function isOptionalChainRoot(node) { + return isOptionalChain(node) && !!node.questionDotToken; + } + ts.isOptionalChainRoot = isOptionalChainRoot; + /** + * Determines whether a node is the expression preceding an optional chain (i.e. `a` in `a?.b`). + */ + /* @internal */ + function isExpressionOfOptionalChainRoot(node) { + return isOptionalChainRoot(node.parent) && node.parent.expression === node; + } + ts.isExpressionOfOptionalChainRoot = isExpressionOfOptionalChainRoot; + /** + * Determines whether a node is the outermost `OptionalChain` in an ECMAScript `OptionalExpression`: + * + * 1. For `a?.b.c`, the outermost chain is `a?.b.c` (`c` is the end of the chain starting at `a?.`) + * 2. For `(a?.b.c).d`, the outermost chain is `a?.b.c` (`c` is the end of the chain starting at `a?.` since parens end the chain) + * 3. For `a?.b.c?.d`, both `a?.b.c` and `a?.b.c?.d` are outermost (`c` is the end of the chain starting at `a?.`, and `d` is + * the end of the chain starting at `c?.`) + * 4. For `a?.(b?.c).d`, both `b?.c` and `a?.(b?.c)d` are outermost (`c` is the end of the chain starting at `b`, and `d` is + * the end of the chain starting at `a?.`) + */ + /* @internal */ + function isOutermostOptionalChain(node) { + return !isOptionalChain(node.parent) // cases 1 and 2 + || isOptionalChainRoot(node.parent) // case 3 + || node !== node.parent.expression; // case 4 + } + ts.isOutermostOptionalChain = isOutermostOptionalChain; + function isNullishCoalesce(node) { + return node.kind === 208 /* BinaryExpression */ && node.operatorToken.kind === 60 /* QuestionQuestionToken */; + } + ts.isNullishCoalesce = isNullishCoalesce; function isNewExpression(node) { return node.kind === 196 /* NewExpression */; } @@ -15814,11 +16623,6 @@ var ts; return node.kind === 162 /* GetAccessor */; } ts.isGetAccessor = isGetAccessor; - /* @internal */ - function isOptionalChainRoot(node) { - return ts.isOptionalChain(node) && !!node.questionDotToken; - } - ts.isOptionalChainRoot = isOptionalChainRoot; /** True if has jsdoc nodes attached to it. */ /* @internal */ // TODO: GH#19856 Would like to return `node is Node & { jsDoc: JSDoc[] }` but it causes long compile times @@ -15905,7 +16709,12 @@ var ts; this.checker = checker; } } - function Signature() { } + function Signature(checker, flags) { + this.flags = flags; + if (ts.Debug.isDebugging) { + this.checker = checker; + } + } function Node(kind, pos, end) { this.pos = pos; this.end = end; @@ -16180,273 +16989,6 @@ var ts; return true; } ts.hasZeroOrOneAsteriskCharacter = hasZeroOrOneAsteriskCharacter; - /** - * Internally, we represent paths as strings with '/' as the directory separator. - * When we make system calls (eg: LanguageServiceHost.getDirectory()), - * we expect the host to correctly handle paths in our specified format. - */ - ts.directorySeparator = "/"; - var altDirectorySeparator = "\\"; - var urlSchemeSeparator = "://"; - var backslashRegExp = /\\/g; - /** - * Normalize path separators. - */ - function normalizeSlashes(path) { - return path.replace(backslashRegExp, ts.directorySeparator); - } - ts.normalizeSlashes = normalizeSlashes; - function isVolumeCharacter(charCode) { - return (charCode >= 97 /* a */ && charCode <= 122 /* z */) || - (charCode >= 65 /* A */ && charCode <= 90 /* Z */); - } - function getFileUrlVolumeSeparatorEnd(url, start) { - var ch0 = url.charCodeAt(start); - if (ch0 === 58 /* colon */) - return start + 1; - if (ch0 === 37 /* percent */ && url.charCodeAt(start + 1) === 51 /* _3 */) { - var ch2 = url.charCodeAt(start + 2); - if (ch2 === 97 /* a */ || ch2 === 65 /* A */) - return start + 3; - } - return -1; - } - /** - * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). - * If the root is part of a URL, the twos-complement of the root length is returned. - */ - function getEncodedRootLength(path) { - if (!path) - return 0; - var ch0 = path.charCodeAt(0); - // POSIX or UNC - if (ch0 === 47 /* slash */ || ch0 === 92 /* backslash */) { - if (path.charCodeAt(1) !== ch0) - return 1; // POSIX: "/" (or non-normalized "\") - var p1 = path.indexOf(ch0 === 47 /* slash */ ? ts.directorySeparator : altDirectorySeparator, 2); - if (p1 < 0) - return path.length; // UNC: "//server" or "\\server" - return p1 + 1; // UNC: "//server/" or "\\server\" - } - // DOS - if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58 /* colon */) { - var ch2 = path.charCodeAt(2); - if (ch2 === 47 /* slash */ || ch2 === 92 /* backslash */) - return 3; // DOS: "c:/" or "c:\" - if (path.length === 2) - return 2; // DOS: "c:" (but not "c:d") - } - // URL - var schemeEnd = path.indexOf(urlSchemeSeparator); - if (schemeEnd !== -1) { - var authorityStart = schemeEnd + urlSchemeSeparator.length; - var authorityEnd = path.indexOf(ts.directorySeparator, authorityStart); - if (authorityEnd !== -1) { // URL: "file:///", "file://server/", "file://server/path" - // For local "file" URLs, include the leading DOS volume (if present). - // Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a - // special case interpreted as "the machine from which the URL is being interpreted". - var scheme = path.slice(0, schemeEnd); - var authority = path.slice(authorityStart, authorityEnd); - if (scheme === "file" && (authority === "" || authority === "localhost") && - isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) { - var volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2); - if (volumeSeparatorEnd !== -1) { - if (path.charCodeAt(volumeSeparatorEnd) === 47 /* slash */) { - // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/" - return ~(volumeSeparatorEnd + 1); - } - if (volumeSeparatorEnd === path.length) { - // URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a" - // but not "file:///c:d" or "file:///c%3ad" - return ~volumeSeparatorEnd; - } - } - } - return ~(authorityEnd + 1); // URL: "file://server/", "http://server/" - } - return ~path.length; // URL: "file://server", "http://server" - } - // relative - return 0; - } - /** - * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). - * - * For example: - * ```ts - * getRootLength("a") === 0 // "" - * getRootLength("/") === 1 // "/" - * getRootLength("c:") === 2 // "c:" - * getRootLength("c:d") === 0 // "" - * getRootLength("c:/") === 3 // "c:/" - * getRootLength("c:\\") === 3 // "c:\\" - * getRootLength("//server") === 7 // "//server" - * getRootLength("//server/share") === 8 // "//server/" - * getRootLength("\\\\server") === 7 // "\\\\server" - * getRootLength("\\\\server\\share") === 8 // "\\\\server\\" - * getRootLength("file:///path") === 8 // "file:///" - * getRootLength("file:///c:") === 10 // "file:///c:" - * getRootLength("file:///c:d") === 8 // "file:///" - * getRootLength("file:///c:/path") === 11 // "file:///c:/" - * getRootLength("file://server") === 13 // "file://server" - * getRootLength("file://server/path") === 14 // "file://server/" - * getRootLength("http://server") === 13 // "http://server" - * getRootLength("http://server/path") === 14 // "http://server/" - * ``` - */ - function getRootLength(path) { - var rootLength = getEncodedRootLength(path); - return rootLength < 0 ? ~rootLength : rootLength; - } - ts.getRootLength = getRootLength; - // TODO(rbuckton): replace references with `resolvePath` - function normalizePath(path) { - return ts.resolvePath(path); - } - ts.normalizePath = normalizePath; - function normalizePathAndParts(path) { - path = normalizeSlashes(path); - var _a = reducePathComponents(getPathComponents(path)), root = _a[0], parts = _a.slice(1); - if (parts.length) { - var joinedParts = root + parts.join(ts.directorySeparator); - return { path: ts.hasTrailingDirectorySeparator(path) ? ts.ensureTrailingDirectorySeparator(joinedParts) : joinedParts, parts: parts }; - } - else { - return { path: root, parts: parts }; - } - } - ts.normalizePathAndParts = normalizePathAndParts; - function getDirectoryPath(path) { - path = normalizeSlashes(path); - // If the path provided is itself the root, then return it. - var rootLength = getRootLength(path); - if (rootLength === path.length) - return path; - // return the leading portion of the path up to the last (non-terminal) directory separator - // but not including any trailing directory separator. - path = ts.removeTrailingDirectorySeparator(path); - return path.slice(0, Math.max(rootLength, path.lastIndexOf(ts.directorySeparator))); - } - ts.getDirectoryPath = getDirectoryPath; - function startsWithDirectory(fileName, directoryName, getCanonicalFileName) { - var canonicalFileName = getCanonicalFileName(fileName); - var canonicalDirectoryName = getCanonicalFileName(directoryName); - return ts.startsWith(canonicalFileName, canonicalDirectoryName + "/") || ts.startsWith(canonicalFileName, canonicalDirectoryName + "\\"); - } - ts.startsWithDirectory = startsWithDirectory; - function isUrl(path) { - return getEncodedRootLength(path) < 0; - } - ts.isUrl = isUrl; - function pathIsRelative(path) { - return /^\.\.?($|[\\/])/.test(path); - } - ts.pathIsRelative = pathIsRelative; - /** - * Determines whether a path is an absolute path (e.g. starts with `/`, or a dos path - * like `c:`, `c:\` or `c:/`). - */ - function isRootedDiskPath(path) { - return getEncodedRootLength(path) > 0; - } - ts.isRootedDiskPath = isRootedDiskPath; - /** - * Determines whether a path consists only of a path root. - */ - function isDiskPathRoot(path) { - var rootLength = getEncodedRootLength(path); - return rootLength > 0 && rootLength === path.length; - } - ts.isDiskPathRoot = isDiskPathRoot; - function convertToRelativePath(absoluteOrRelativePath, basePath, getCanonicalFileName) { - return !isRootedDiskPath(absoluteOrRelativePath) - ? absoluteOrRelativePath - : ts.getRelativePathToDirectoryOrUrl(basePath, absoluteOrRelativePath, basePath, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); - } - ts.convertToRelativePath = convertToRelativePath; - function pathComponents(path, rootLength) { - var root = path.substring(0, rootLength); - var rest = path.substring(rootLength).split(ts.directorySeparator); - if (rest.length && !ts.lastOrUndefined(rest)) - rest.pop(); - return __spreadArrays([root], rest); - } - /** - * Parse a path into an array containing a root component (at index 0) and zero or more path - * components (at indices > 0). The result is not normalized. - * If the path is relative, the root component is `""`. - * If the path is absolute, the root component includes the first path separator (`/`). - */ - function getPathComponents(path, currentDirectory) { - if (currentDirectory === void 0) { currentDirectory = ""; } - path = ts.combinePaths(currentDirectory, path); - var rootLength = getRootLength(path); - return pathComponents(path, rootLength); - } - ts.getPathComponents = getPathComponents; - /** - * Reduce an array of path components to a more simplified path by navigating any - * `"."` or `".."` entries in the path. - */ - function reducePathComponents(components) { - if (!ts.some(components)) - return []; - var reduced = [components[0]]; - for (var i = 1; i < components.length; i++) { - var component = components[i]; - if (!component) - continue; - if (component === ".") - continue; - if (component === "..") { - if (reduced.length > 1) { - if (reduced[reduced.length - 1] !== "..") { - reduced.pop(); - continue; - } - } - else if (reduced[0]) - continue; - } - reduced.push(component); - } - return reduced; - } - ts.reducePathComponents = reducePathComponents; - /** - * Parse a path into an array containing a root component (at index 0) and zero or more path - * components (at indices > 0). The result is normalized. - * If the path is relative, the root component is `""`. - * If the path is absolute, the root component includes the first path separator (`/`). - */ - function getNormalizedPathComponents(path, currentDirectory) { - return reducePathComponents(getPathComponents(path, currentDirectory)); - } - ts.getNormalizedPathComponents = getNormalizedPathComponents; - function getNormalizedAbsolutePath(fileName, currentDirectory) { - return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory)); - } - ts.getNormalizedAbsolutePath = getNormalizedAbsolutePath; - /** - * Formats a parsed path consisting of a root component (at index 0) and zero or more path - * segments (at indices > 0). - */ - function getPathFromPathComponents(pathComponents) { - if (pathComponents.length === 0) - return ""; - var root = pathComponents[0] && ts.ensureTrailingDirectorySeparator(pathComponents[0]); - return root + pathComponents.slice(1).join(ts.directorySeparator); - } - ts.getPathFromPathComponents = getPathFromPathComponents; - function getNormalizedAbsolutePathWithoutRoot(fileName, currentDirectory) { - return getPathWithoutRoot(getNormalizedPathComponents(fileName, currentDirectory)); - } - ts.getNormalizedAbsolutePathWithoutRoot = getNormalizedAbsolutePathWithoutRoot; - function getPathWithoutRoot(pathComponents) { - if (pathComponents.length === 0) - return ""; - return pathComponents.slice(1).join(ts.directorySeparator); - } function discoverProbableSymlinks(files, getCanonicalFileName, cwd) { var result = ts.createMap(); var symlinks = ts.flatten(ts.mapDefined(files, function (sf) { @@ -16463,15 +17005,15 @@ var ts; } ts.discoverProbableSymlinks = discoverProbableSymlinks; function guessDirectorySymlink(a, b, cwd, getCanonicalFileName) { - var aParts = getPathComponents(ts.toPath(a, cwd, getCanonicalFileName)); - var bParts = getPathComponents(ts.toPath(b, cwd, getCanonicalFileName)); + var aParts = ts.getPathComponents(ts.toPath(a, cwd, getCanonicalFileName)); + var bParts = ts.getPathComponents(ts.toPath(b, cwd, getCanonicalFileName)); while (!isNodeModulesOrScopedPackageDirectory(aParts[aParts.length - 2], getCanonicalFileName) && !isNodeModulesOrScopedPackageDirectory(bParts[bParts.length - 2], getCanonicalFileName) && getCanonicalFileName(aParts[aParts.length - 1]) === getCanonicalFileName(bParts[bParts.length - 1])) { aParts.pop(); bParts.pop(); } - return [getPathFromPathComponents(aParts), getPathFromPathComponents(bParts)]; + return [ts.getPathFromPathComponents(aParts), ts.getPathFromPathComponents(bParts)]; } // KLUDGE: Don't assume one 'node_modules' links to another. More likely a single directory inside the node_modules is the symlink. // ALso, don't assume that an `@foo` directory is linked. More likely the contents of that are linked. @@ -16481,229 +17023,8 @@ var ts; })(ts || (ts = {})); /* @internal */ (function (ts) { - function getPathComponentsRelativeTo(from, to, stringEqualityComparer, getCanonicalFileName) { - var fromComponents = ts.reducePathComponents(ts.getPathComponents(from)); - var toComponents = ts.reducePathComponents(ts.getPathComponents(to)); - var start; - for (start = 0; start < fromComponents.length && start < toComponents.length; start++) { - var fromComponent = getCanonicalFileName(fromComponents[start]); - var toComponent = getCanonicalFileName(toComponents[start]); - var comparer = start === 0 ? ts.equateStringsCaseInsensitive : stringEqualityComparer; - if (!comparer(fromComponent, toComponent)) - break; - } - if (start === 0) { - return toComponents; - } - var components = toComponents.slice(start); - var relative = []; - for (; start < fromComponents.length; start++) { - relative.push(".."); - } - return __spreadArrays([""], relative, components); - } - ts.getPathComponentsRelativeTo = getPathComponentsRelativeTo; - function getRelativePathFromFile(from, to, getCanonicalFileName) { - return ensurePathIsNonModuleName(getRelativePathFromDirectory(ts.getDirectoryPath(from), to, getCanonicalFileName)); - } - ts.getRelativePathFromFile = getRelativePathFromFile; - function getRelativePathFromDirectory(fromDirectory, to, getCanonicalFileNameOrIgnoreCase) { - ts.Debug.assert((ts.getRootLength(fromDirectory) > 0) === (ts.getRootLength(to) > 0), "Paths must either both be absolute or both be relative"); - var getCanonicalFileName = typeof getCanonicalFileNameOrIgnoreCase === "function" ? getCanonicalFileNameOrIgnoreCase : ts.identity; - var ignoreCase = typeof getCanonicalFileNameOrIgnoreCase === "boolean" ? getCanonicalFileNameOrIgnoreCase : false; - var pathComponents = getPathComponentsRelativeTo(fromDirectory, to, ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive, getCanonicalFileName); - return ts.getPathFromPathComponents(pathComponents); - } - ts.getRelativePathFromDirectory = getRelativePathFromDirectory; - function getRelativePathToDirectoryOrUrl(directoryPathOrUrl, relativeOrAbsolutePath, currentDirectory, getCanonicalFileName, isAbsolutePathAnUrl) { - var pathComponents = getPathComponentsRelativeTo(resolvePath(currentDirectory, directoryPathOrUrl), resolvePath(currentDirectory, relativeOrAbsolutePath), ts.equateStringsCaseSensitive, getCanonicalFileName); - var firstComponent = pathComponents[0]; - if (isAbsolutePathAnUrl && ts.isRootedDiskPath(firstComponent)) { - var prefix = firstComponent.charAt(0) === ts.directorySeparator ? "file://" : "file:///"; - pathComponents[0] = prefix + firstComponent; - } - return ts.getPathFromPathComponents(pathComponents); - } - ts.getRelativePathToDirectoryOrUrl = getRelativePathToDirectoryOrUrl; - /** - * Ensures a path is either absolute (prefixed with `/` or `c:`) or dot-relative (prefixed - * with `./` or `../`) so as not to be confused with an unprefixed module name. - */ - function ensurePathIsNonModuleName(path) { - return ts.getRootLength(path) === 0 && !ts.pathIsRelative(path) ? "./" + path : path; - } - ts.ensurePathIsNonModuleName = ensurePathIsNonModuleName; - function getBaseFileName(path, extensions, ignoreCase) { - path = ts.normalizeSlashes(path); - // if the path provided is itself the root, then it has not file name. - var rootLength = ts.getRootLength(path); - if (rootLength === path.length) - return ""; - // return the trailing portion of the path starting after the last (non-terminal) directory - // separator but not including any trailing directory separator. - path = removeTrailingDirectorySeparator(path); - var name = path.slice(Math.max(ts.getRootLength(path), path.lastIndexOf(ts.directorySeparator) + 1)); - var extension = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(name, extensions, ignoreCase) : undefined; - return extension ? name.slice(0, name.length - extension.length) : name; - } - ts.getBaseFileName = getBaseFileName; - /** - * Combines paths. If a path is absolute, it replaces any previous path. - */ - function combinePaths(path) { - var paths = []; - for (var _i = 1; _i < arguments.length; _i++) { - paths[_i - 1] = arguments[_i]; - } - if (path) - path = ts.normalizeSlashes(path); - for (var _a = 0, paths_1 = paths; _a < paths_1.length; _a++) { - var relativePath = paths_1[_a]; - if (!relativePath) - continue; - relativePath = ts.normalizeSlashes(relativePath); - if (!path || ts.getRootLength(relativePath) !== 0) { - path = relativePath; - } - else { - path = ensureTrailingDirectorySeparator(path) + relativePath; - } - } - return path; - } - ts.combinePaths = combinePaths; - /** - * Combines and resolves paths. If a path is absolute, it replaces any previous path. Any - * `.` and `..` path components are resolved. - */ - function resolvePath(path) { - var paths = []; - for (var _i = 1; _i < arguments.length; _i++) { - paths[_i - 1] = arguments[_i]; - } - var combined = ts.some(paths) ? combinePaths.apply(void 0, __spreadArrays([path], paths)) : ts.normalizeSlashes(path); - var normalized = ts.getPathFromPathComponents(ts.reducePathComponents(ts.getPathComponents(combined))); - return normalized && hasTrailingDirectorySeparator(combined) ? ensureTrailingDirectorySeparator(normalized) : normalized; - } - ts.resolvePath = resolvePath; - /** - * Determines whether a path has a trailing separator (`/` or `\\`). - */ - function hasTrailingDirectorySeparator(path) { - if (path.length === 0) - return false; - var ch = path.charCodeAt(path.length - 1); - return ch === 47 /* slash */ || ch === 92 /* backslash */; - } - ts.hasTrailingDirectorySeparator = hasTrailingDirectorySeparator; - function removeTrailingDirectorySeparator(path) { - if (hasTrailingDirectorySeparator(path)) { - return path.substr(0, path.length - 1); - } - return path; - } - ts.removeTrailingDirectorySeparator = removeTrailingDirectorySeparator; - function ensureTrailingDirectorySeparator(path) { - if (!hasTrailingDirectorySeparator(path)) { - return path + ts.directorySeparator; - } - return path; - } - ts.ensureTrailingDirectorySeparator = ensureTrailingDirectorySeparator; - // check path for these segments: '', '.'. '..' - var relativePathSegmentRegExp = /(^|\/)\.{0,2}($|\/)/; - function comparePathsWorker(a, b, componentComparer) { - if (a === b) - return 0 /* EqualTo */; - if (a === undefined) - return -1 /* LessThan */; - if (b === undefined) - return 1 /* GreaterThan */; - // NOTE: Performance optimization - shortcut if the root segments differ as there would be no - // need to perform path reduction. - var aRoot = a.substring(0, ts.getRootLength(a)); - var bRoot = b.substring(0, ts.getRootLength(b)); - var result = ts.compareStringsCaseInsensitive(aRoot, bRoot); - if (result !== 0 /* EqualTo */) { - return result; - } - // NOTE: Performance optimization - shortcut if there are no relative path segments in - // the non-root portion of the path - var aRest = a.substring(aRoot.length); - var bRest = b.substring(bRoot.length); - if (!relativePathSegmentRegExp.test(aRest) && !relativePathSegmentRegExp.test(bRest)) { - return componentComparer(aRest, bRest); - } - // The path contains a relative path segment. Normalize the paths and perform a slower component - // by component comparison. - var aComponents = ts.reducePathComponents(ts.getPathComponents(a)); - var bComponents = ts.reducePathComponents(ts.getPathComponents(b)); - var sharedLength = Math.min(aComponents.length, bComponents.length); - for (var i = 1; i < sharedLength; i++) { - var result_1 = componentComparer(aComponents[i], bComponents[i]); - if (result_1 !== 0 /* EqualTo */) { - return result_1; - } - } - return ts.compareValues(aComponents.length, bComponents.length); - } - /** - * Performs a case-sensitive comparison of two paths. - */ - function comparePathsCaseSensitive(a, b) { - return comparePathsWorker(a, b, ts.compareStringsCaseSensitive); - } - ts.comparePathsCaseSensitive = comparePathsCaseSensitive; - /** - * Performs a case-insensitive comparison of two paths. - */ - function comparePathsCaseInsensitive(a, b) { - return comparePathsWorker(a, b, ts.compareStringsCaseInsensitive); - } - ts.comparePathsCaseInsensitive = comparePathsCaseInsensitive; - function comparePaths(a, b, currentDirectory, ignoreCase) { - if (typeof currentDirectory === "string") { - a = combinePaths(currentDirectory, a); - b = combinePaths(currentDirectory, b); - } - else if (typeof currentDirectory === "boolean") { - ignoreCase = currentDirectory; - } - return comparePathsWorker(a, b, ts.getStringComparer(ignoreCase)); - } - ts.comparePaths = comparePaths; - function containsPath(parent, child, currentDirectory, ignoreCase) { - if (typeof currentDirectory === "string") { - parent = combinePaths(currentDirectory, parent); - child = combinePaths(currentDirectory, child); - } - else if (typeof currentDirectory === "boolean") { - ignoreCase = currentDirectory; - } - if (parent === undefined || child === undefined) - return false; - if (parent === child) - return true; - var parentComponents = ts.reducePathComponents(ts.getPathComponents(parent)); - var childComponents = ts.reducePathComponents(ts.getPathComponents(child)); - if (childComponents.length < parentComponents.length) { - return false; - } - var componentEqualityComparer = ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive; - for (var i = 0; i < parentComponents.length; i++) { - var equalityComparer = i === 0 ? ts.equateStringsCaseInsensitive : componentEqualityComparer; - if (!equalityComparer(parentComponents[i], childComponents[i])) { - return false; - } - } - return true; - } - ts.containsPath = containsPath; - function isDirectorySeparator(charCode) { - return charCode === 47 /* slash */ || charCode === 92 /* backslash */; - } function stripLeadingDirectorySeparator(s) { - return isDirectorySeparator(s.charCodeAt(0)) ? s.slice(1) : undefined; + return ts.isAnyDirectorySeparator(s.charCodeAt(0)) ? s.slice(1) : undefined; } function tryRemoveDirectoryPrefix(path, dirPath, getCanonicalFileName) { var withoutPrefix = ts.tryRemovePrefix(path, dirPath, getCanonicalFileName); @@ -16722,10 +17043,6 @@ var ts; return "\\" + match; } var wildcardCharCodes = [42 /* asterisk */, 63 /* question */]; - function hasExtension(fileName) { - return ts.stringContains(getBaseFileName(fileName), "."); - } - ts.hasExtension = hasExtension; ts.commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"]; var implicitExcludePathRegexPattern = "(?!(" + ts.commonPackageFolders.join("|") + ")(/|$))"; var filesMatcher = { @@ -16801,7 +17118,7 @@ var ts; } // getNormalizedPathComponents includes the separator for the root component. // We need to remove to create our regex correctly. - components[0] = removeTrailingDirectorySeparator(components[0]); + components[0] = ts.removeTrailingDirectorySeparator(components[0]); if (isImplicitGlob(lastComponent)) { components.push("**", "*"); } @@ -16863,7 +17180,7 @@ var ts; function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory) { path = ts.normalizePath(path); currentDirectory = ts.normalizePath(currentDirectory); - var absolutePath = combinePaths(currentDirectory, path); + var absolutePath = ts.combinePaths(currentDirectory, path); return { includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^" + pattern + "$"; }), includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"), @@ -16892,7 +17209,7 @@ var ts; var toCanonical = ts.createGetCanonicalFileName(useCaseSensitiveFileNames); for (var _i = 0, _a = patterns.basePaths; _i < _a.length; _i++) { var basePath = _a[_i]; - visitDirectory(basePath, combinePaths(currentDirectory, basePath), depth); + visitDirectory(basePath, ts.combinePaths(currentDirectory, basePath), depth); } return ts.flatten(results); function visitDirectory(path, absolutePath, depth) { @@ -16902,8 +17219,8 @@ var ts; visited.set(canonicalPath, true); var _a = getFileSystemEntries(path), files = _a.files, directories = _a.directories; var _loop_1 = function (current) { - var name = combinePaths(path, current); - var absoluteName = combinePaths(absolutePath, current); + var name = ts.combinePaths(path, current); + var absoluteName = ts.combinePaths(absolutePath, current); if (extensions && !ts.fileExtensionIsOneOf(name, extensions)) return "continue"; if (excludeRegex && excludeRegex.test(absoluteName)) @@ -16930,8 +17247,8 @@ var ts; } for (var _c = 0, _d = ts.sort(directories, ts.compareStringsCaseSensitive); _c < _d.length; _c++) { var current = _d[_c]; - var name = combinePaths(path, current); - var absoluteName = combinePaths(absolutePath, current); + var name = ts.combinePaths(path, current); + var absoluteName = ts.combinePaths(absolutePath, current); if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) && (!excludeRegex || !excludeRegex.test(absoluteName))) { visitDirectory(name, absoluteName, depth); @@ -16953,14 +17270,14 @@ var ts; var include = includes_1[_i]; // We also need to check the relative paths by converting them to absolute and normalizing // in case they escape the base path (e.g "..\somedirectory") - var absolute = ts.isRootedDiskPath(include) ? include : ts.normalizePath(combinePaths(path, include)); + var absolute = ts.isRootedDiskPath(include) ? include : ts.normalizePath(ts.combinePaths(path, include)); // Append the literal and canonical candidate base paths. includeBasePaths.push(getIncludeBasePath(absolute)); } // Sort the offsets array using either the literal or canonical path representations. includeBasePaths.sort(ts.getStringComparer(!useCaseSensitiveFileNames)); var _loop_2 = function (includeBasePath) { - if (ts.every(basePaths, function (basePath) { return !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames); })) { + if (ts.every(basePaths, function (basePath) { return !ts.containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames); })) { basePaths.push(includeBasePath); } }; @@ -16977,9 +17294,9 @@ var ts; var wildcardOffset = ts.indexOfAnyCharCode(absolute, wildcardCharCodes); if (wildcardOffset < 0) { // No "*" or "?" in the path - return !hasExtension(absolute) + return !ts.hasExtension(absolute) ? absolute - : removeTrailingDirectorySeparator(ts.getDirectoryPath(absolute)); + : ts.removeTrailingDirectorySeparator(ts.getDirectoryPath(absolute)); } return absolute.substring(0, absolute.lastIndexOf(ts.directorySeparator, wildcardOffset)); } @@ -17051,10 +17368,6 @@ var ts; return ts.some(ts.supportedJSExtensions, function (extension) { return ts.fileExtensionIs(fileName, extension); }); } ts.hasJSFileExtension = hasJSFileExtension; - function hasJSOrJsonFileExtension(fileName) { - return ts.supportedJSAndJsonExtensions.some(function (ext) { return ts.fileExtensionIs(fileName, ext); }); - } - ts.hasJSOrJsonFileExtension = hasJSOrJsonFileExtension; function hasTSFileExtension(fileName) { return ts.some(ts.supportedTSExtensions, function (extension) { return ts.fileExtensionIs(fileName, extension); }); } @@ -17144,14 +17457,9 @@ var ts; } ts.removeExtension = removeExtension; function changeExtension(path, newExtension) { - return changeAnyExtension(path, newExtension, extensionsToRemove, /*ignoreCase*/ false); + return ts.changeAnyExtension(path, newExtension, extensionsToRemove, /*ignoreCase*/ false); } ts.changeExtension = changeExtension; - function changeAnyExtension(path, ext, extensions, ignoreCase) { - var pathext = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(path, extensions, ignoreCase) : getAnyExtensionFromPath(path); - return pathext ? path.slice(0, path.length - pathext.length) + (ts.startsWith(ext, ".") ? ext : "." + ext) : path; - } - ts.changeAnyExtension = changeAnyExtension; function tryParsePattern(pattern) { // This should be verified outside of here and a proper error thrown. ts.Debug.assert(ts.hasZeroOrOneAsteriskCharacter(pattern)); @@ -17194,36 +17502,6 @@ var ts; return ts.find(extensionsToRemove, function (e) { return ts.fileExtensionIs(path, e); }); } ts.tryGetExtensionFromPath = tryGetExtensionFromPath; - function getAnyExtensionFromPathWorker(path, extensions, stringEqualityComparer) { - if (typeof extensions === "string") - extensions = [extensions]; - for (var _i = 0, extensions_2 = extensions; _i < extensions_2.length; _i++) { - var extension = extensions_2[_i]; - if (!ts.startsWith(extension, ".")) - extension = "." + extension; - if (path.length >= extension.length && path.charAt(path.length - extension.length) === ".") { - var pathExtension = path.slice(path.length - extension.length); - if (stringEqualityComparer(pathExtension, extension)) { - return pathExtension; - } - } - } - return ""; - } - function getAnyExtensionFromPath(path, extensions, ignoreCase) { - // Retrieves any string from the final "." onwards from a base file name. - // Unlike extensionFromPath, which throws an exception on unrecognized extensions. - if (extensions) { - return getAnyExtensionFromPathWorker(path, extensions, ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive); - } - var baseFileName = getBaseFileName(path); - var extensionIndex = baseFileName.lastIndexOf("."); - if (extensionIndex >= 0) { - return baseFileName.substring(extensionIndex); - } - return ""; - } - ts.getAnyExtensionFromPath = getAnyExtensionFromPath; function isCheckJsEnabledForFile(sourceFile, compilerOptions) { return sourceFile.checkJsDirective ? sourceFile.checkJsDirective.enabled : compilerOptions.checkJs; } @@ -18431,6 +18709,9 @@ var ts; function doInYieldAndAwaitContext(func) { return doInsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */, func); } + function doOutsideOfYieldAndAwaitContext(func) { + return doOutsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */, func); + } function inContext(flags) { return (contextFlags & flags) !== 0; } @@ -22702,18 +22983,7 @@ var ts; node.exclamationToken = parseTokenNode(); } node.type = parseTypeAnnotation(); - // For instance properties specifically, since they are evaluated inside the constructor, - // we do *not * want to parse yield expressions, so we specifically turn the yield context - // off. The grammar would look something like this: - // - // MemberVariableDeclaration[Yield]: - // AccessibilityModifier_opt PropertyName TypeAnnotation_opt Initializer_opt[In]; - // AccessibilityModifier_opt static_opt PropertyName TypeAnnotation_opt Initializer_opt[In, ?Yield]; - // - // The checker may still error in the static case to explicitly disallow the yield expression. - node.initializer = ts.hasModifier(node, 32 /* Static */) - ? allowInAnd(parseInitializer) - : doOutsideOfContext(8192 /* YieldContext */ | 4096 /* DisallowInContext */, parseInitializer); + node.initializer = doOutsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */ | 4096 /* DisallowInContext */, parseInitializer); parseSemicolon(); return finishNode(node); } @@ -23004,7 +23274,7 @@ var ts; parseExpected(87 /* EnumKeyword */); node.name = parseIdentifier(); if (parseExpected(18 /* OpenBraceToken */)) { - node.members = parseDelimitedList(6 /* EnumMembers */, parseEnumMember); + node.members = doOutsideOfYieldAndAwaitContext(function () { return parseDelimitedList(6 /* EnumMembers */, parseEnumMember); }); parseExpected(19 /* CloseBraceToken */); } else { @@ -25066,6 +25336,15 @@ var ts; isCommandLineOnly: true, description: ts.Diagnostics.Print_the_final_configuration_instead_of_building }, + { + name: "listFilesOnly", + type: "boolean", + category: ts.Diagnostics.Command_line_Options, + affectsSemanticDiagnostics: true, + affectsEmit: true, + isCommandLineOnly: true, + description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing + }, // Basic { name: "target", @@ -25897,8 +26176,7 @@ var ts; } } ts.parseListTypeOption = parseListTypeOption; - function parseCommandLineWorker(getOptionNameMap, _a, commandLine, readFile) { - var unknownOptionDiagnostic = _a[0], optionTypeMismatchDiagnostic = _a[1]; + function parseCommandLineWorker(getOptionNameMap, diagnostics, commandLine, readFile) { var options = {}; var fileNames = []; var errors = []; @@ -25925,7 +26203,7 @@ var ts; else { // Check to see if no argument was provided (e.g. "--locale" is the last command-line argument). if (!args[i] && opt.type !== "boolean") { - errors.push(ts.createCompilerDiagnostic(optionTypeMismatchDiagnostic, opt.name)); + errors.push(ts.createCompilerDiagnostic(diagnostics.optionTypeMismatchDiagnostic, opt.name)); } switch (opt.type) { case "number": @@ -25961,7 +26239,13 @@ var ts; } } else { - errors.push(ts.createCompilerDiagnostic(unknownOptionDiagnostic, s)); + var possibleOption = ts.getSpellingSuggestion(s, ts.optionDeclarations, function (opt) { return "--" + opt.name; }); + if (possibleOption) { + errors.push(ts.createCompilerDiagnostic(diagnostics.unknownDidYouMeanDiagnostic, s, possibleOption.name)); + } + else { + errors.push(ts.createCompilerDiagnostic(diagnostics.unknownOptionDiagnostic, s)); + } } } else { @@ -26004,11 +26288,13 @@ var ts; parseStrings(args); } } + var compilerOptionsDefaultDiagnostics = { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_compiler_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_compiler_option_0_Did_you_mean_1, + optionTypeMismatchDiagnostic: ts.Diagnostics.Compiler_option_0_expects_an_argument + }; function parseCommandLine(commandLine, readFile) { - return parseCommandLineWorker(getOptionNameMap, [ - ts.Diagnostics.Unknown_compiler_option_0, - ts.Diagnostics.Compiler_option_0_expects_an_argument - ], commandLine, readFile); + return parseCommandLineWorker(getOptionNameMap, compilerOptionsDefaultDiagnostics, commandLine, readFile); } ts.parseCommandLine = parseCommandLine; /** @internal */ @@ -26033,10 +26319,11 @@ var ts; function parseBuildCommand(args) { var buildOptionNameMap; var returnBuildOptionNameMap = function () { return (buildOptionNameMap || (buildOptionNameMap = createOptionNameMap(ts.buildOpts))); }; - var _a = parseCommandLineWorker(returnBuildOptionNameMap, [ - ts.Diagnostics.Unknown_build_option_0, - ts.Diagnostics.Build_option_0_requires_a_value_of_type_1 - ], args), options = _a.options, projects = _a.fileNames, errors = _a.errors; + var _a = parseCommandLineWorker(returnBuildOptionNameMap, { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_build_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_build_option_0_Did_you_mean_1, + optionTypeMismatchDiagnostic: ts.Diagnostics.Build_option_0_requires_a_value_of_type_1 + }, args), options = _a.options, projects = _a.fileNames, errors = _a.errors; var buildOptions = options; if (projects.length === 0) { // tsc -b invoked with no extra arguments; act as if invoked with "tsc -b ." @@ -26058,6 +26345,7 @@ var ts; return { buildOptions: buildOptions, projects: projects, errors: errors }; } ts.parseBuildCommand = parseBuildCommand; + /* @internal */ function getDiagnosticText(_message) { var _args = []; for (var _i = 1; _i < arguments.length; _i++) { @@ -26066,104 +26354,7 @@ var ts; var diagnostic = ts.createCompilerDiagnostic.apply(undefined, arguments); return diagnostic.messageText; } - /* @internal */ - function printVersion() { - ts.sys.write(getDiagnosticText(ts.Diagnostics.Version_0, ts.version) + ts.sys.newLine); - } - ts.printVersion = printVersion; - /* @internal */ - function printHelp(optionsList, syntaxPrefix) { - if (syntaxPrefix === void 0) { syntaxPrefix = ""; } - var output = []; - // We want to align our "syntax" and "examples" commands to a certain margin. - var syntaxLength = getDiagnosticText(ts.Diagnostics.Syntax_Colon_0, "").length; - var examplesLength = getDiagnosticText(ts.Diagnostics.Examples_Colon_0, "").length; - var marginLength = Math.max(syntaxLength, examplesLength); - // Build up the syntactic skeleton. - var syntax = makePadding(marginLength - syntaxLength); - syntax += "tsc " + syntaxPrefix + "[" + getDiagnosticText(ts.Diagnostics.options) + "] [" + getDiagnosticText(ts.Diagnostics.file) + "...]"; - output.push(getDiagnosticText(ts.Diagnostics.Syntax_Colon_0, syntax)); - output.push(ts.sys.newLine + ts.sys.newLine); - // Build up the list of examples. - var padding = makePadding(marginLength); - output.push(getDiagnosticText(ts.Diagnostics.Examples_Colon_0, makePadding(marginLength - examplesLength) + "tsc hello.ts") + ts.sys.newLine); - output.push(padding + "tsc --outFile file.js file.ts" + ts.sys.newLine); - output.push(padding + "tsc @args.txt" + ts.sys.newLine); - output.push(padding + "tsc --build tsconfig.json" + ts.sys.newLine); - output.push(ts.sys.newLine); - output.push(getDiagnosticText(ts.Diagnostics.Options_Colon) + ts.sys.newLine); - // We want our descriptions to align at the same column in our output, - // so we keep track of the longest option usage string. - marginLength = 0; - var usageColumn = []; // Things like "-d, --declaration" go in here. - var descriptionColumn = []; - var optionsDescriptionMap = ts.createMap(); // Map between option.description and list of option.type if it is a kind - for (var _i = 0, optionsList_1 = optionsList; _i < optionsList_1.length; _i++) { - var option = optionsList_1[_i]; - // If an option lacks a description, - // it is not officially supported. - if (!option.description) { - continue; - } - var usageText_1 = " "; - if (option.shortName) { - usageText_1 += "-" + option.shortName; - usageText_1 += getParamType(option); - usageText_1 += ", "; - } - usageText_1 += "--" + option.name; - usageText_1 += getParamType(option); - usageColumn.push(usageText_1); - var description = void 0; - if (option.name === "lib") { - description = getDiagnosticText(option.description); - var element = option.element; - var typeMap = element.type; - optionsDescriptionMap.set(description, ts.arrayFrom(typeMap.keys()).map(function (key) { return "'" + key + "'"; })); - } - else { - description = getDiagnosticText(option.description); - } - descriptionColumn.push(description); - // Set the new margin for the description column if necessary. - marginLength = Math.max(usageText_1.length, marginLength); - } - // Special case that can't fit in the loop. - var usageText = " @<" + getDiagnosticText(ts.Diagnostics.file) + ">"; - usageColumn.push(usageText); - descriptionColumn.push(getDiagnosticText(ts.Diagnostics.Insert_command_line_options_and_files_from_a_file)); - marginLength = Math.max(usageText.length, marginLength); - // Print out each row, aligning all the descriptions on the same column. - for (var i = 0; i < usageColumn.length; i++) { - var usage = usageColumn[i]; - var description = descriptionColumn[i]; - var kindsList = optionsDescriptionMap.get(description); - output.push(usage + makePadding(marginLength - usage.length + 2) + description + ts.sys.newLine); - if (kindsList) { - output.push(makePadding(marginLength + 4)); - for (var _a = 0, kindsList_1 = kindsList; _a < kindsList_1.length; _a++) { - var kind = kindsList_1[_a]; - output.push(kind + " "); - } - output.push(ts.sys.newLine); - } - } - for (var _b = 0, output_1 = output; _b < output_1.length; _b++) { - var line = output_1[_b]; - ts.sys.write(line); - } - return; - function getParamType(option) { - if (option.paramType !== undefined) { - return " " + getDiagnosticText(option.paramType); - } - return ""; - } - function makePadding(paddingLength) { - return Array(paddingLength + 1).join(" "); - } - } - ts.printHelp = printHelp; + ts.getDiagnosticText = getDiagnosticText; /** * Reads the config file, reports errors if any and exits if the config file cannot be found */ @@ -26247,19 +26438,28 @@ var ts; name: "compilerOptions", type: "object", elementOptions: commandLineOptionsToMap(ts.optionDeclarations), - extraKeyDiagnosticMessage: ts.Diagnostics.Unknown_compiler_option_0 + extraKeyDiagnostics: { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_compiler_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_compiler_option_0_Did_you_mean_1 + }, }, { name: "typingOptions", type: "object", elementOptions: commandLineOptionsToMap(ts.typeAcquisitionDeclarations), - extraKeyDiagnosticMessage: ts.Diagnostics.Unknown_type_acquisition_option_0 + extraKeyDiagnostics: { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1 + }, }, { name: "typeAcquisition", type: "object", elementOptions: commandLineOptionsToMap(ts.typeAcquisitionDeclarations), - extraKeyDiagnosticMessage: ts.Diagnostics.Unknown_type_acquisition_option_0 + extraKeyDiagnostics: { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1 + } }, { name: "extends", @@ -26324,7 +26524,7 @@ var ts; function isRootOptionMap(knownOptions) { return knownRootOptions && knownRootOptions.elementOptions === knownOptions; } - function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnosticMessage, parentOption) { + function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnostics, parentOption) { var result = returnValue ? {} : undefined; for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var element = _a[_i]; @@ -26341,8 +26541,19 @@ var ts; var textOfKey = ts.getTextOfPropertyName(element.name); var keyText = textOfKey && ts.unescapeLeadingUnderscores(textOfKey); var option = keyText && knownOptions ? knownOptions.get(keyText) : undefined; - if (keyText && extraKeyDiagnosticMessage && !option) { - errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnosticMessage, keyText)); + if (keyText && extraKeyDiagnostics && !option) { + if (knownOptions) { + var possibleOption = ts.getSpellingSuggestion(keyText, ts.arrayFrom(knownOptions.keys()), ts.identity); + if (possibleOption) { + errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnostics.unknownDidYouMeanDiagnostic, keyText, possibleOption)); + } + else { + errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnostics.unknownOptionDiagnostic, keyText)); + } + } + else { + errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnostics.unknownOptionDiagnostic, keyText)); + } } var value = convertPropertyValueToJson(element.initializer, option); if (typeof keyText !== "undefined") { @@ -26426,8 +26637,8 @@ var ts; // vs what we set in the json // If need arises, we can modify this interface and callbacks as needed if (option) { - var _a = option, elementOptions = _a.elementOptions, extraKeyDiagnosticMessage = _a.extraKeyDiagnosticMessage, optionName = _a.name; - return convertObjectLiteralExpressionToJson(objectLiteralExpression, elementOptions, extraKeyDiagnosticMessage, optionName); + var _a = option, elementOptions = _a.elementOptions, extraKeyDiagnostics = _a.extraKeyDiagnostics, optionName = _a.name; + return convertObjectLiteralExpressionToJson(objectLiteralExpression, elementOptions, extraKeyDiagnostics, optionName); } else { return convertObjectLiteralExpressionToJson(objectLiteralExpression, /* knownOptions*/ undefined, @@ -26482,7 +26693,7 @@ var ts; /** @internal */ function convertToTSConfig(configParseResult, configFileName, host) { var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames); - var files = ts.map(ts.filter(configParseResult.fileNames, (!configParseResult.configFileSpecs || !configParseResult.configFileSpecs.validatedIncludeSpecs) ? function (_) { return true; } : matchesSpecs(configFileName, configParseResult.configFileSpecs.validatedIncludeSpecs, configParseResult.configFileSpecs.validatedExcludeSpecs)), function (f) { return ts.getRelativePathFromFile(ts.getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), ts.getNormalizedAbsolutePath(f, host.getCurrentDirectory()), getCanonicalFileName); }); + var files = ts.map(ts.filter(configParseResult.fileNames, (!configParseResult.configFileSpecs || !configParseResult.configFileSpecs.validatedIncludeSpecs) ? function (_) { return true; } : matchesSpecs(configFileName, configParseResult.configFileSpecs.validatedIncludeSpecs, configParseResult.configFileSpecs.validatedExcludeSpecs, host)), function (f) { return ts.getRelativePathFromFile(ts.getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), ts.getNormalizedAbsolutePath(f, host.getCurrentDirectory()), getCanonicalFileName); }); var optionMap = serializeCompilerOptions(configParseResult.options, { configFilePath: ts.getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), useCaseSensitiveFileNames: host.useCaseSensitiveFileNames }); var config = __assign(__assign({ compilerOptions: __assign(__assign({}, ts.arrayFrom(optionMap.entries()).reduce(function (prev, cur) { var _a; @@ -26503,12 +26714,12 @@ var ts; return undefined; return specs; } - function matchesSpecs(path, includeSpecs, excludeSpecs) { + function matchesSpecs(path, includeSpecs, excludeSpecs, host) { if (!includeSpecs) return function (_) { return true; }; - var patterns = ts.getFileMatcherPatterns(path, excludeSpecs, includeSpecs, ts.sys.useCaseSensitiveFileNames, ts.sys.getCurrentDirectory()); - var excludeRe = patterns.excludePattern && ts.getRegexFromPattern(patterns.excludePattern, ts.sys.useCaseSensitiveFileNames); - var includeRe = patterns.includeFilePattern && ts.getRegexFromPattern(patterns.includeFilePattern, ts.sys.useCaseSensitiveFileNames); + var patterns = ts.getFileMatcherPatterns(path, excludeSpecs, includeSpecs, host.useCaseSensitiveFileNames, host.getCurrentDirectory()); + var excludeRe = patterns.excludePattern && ts.getRegexFromPattern(patterns.excludePattern, host.useCaseSensitiveFileNames); + var includeRe = patterns.includeFilePattern && ts.getRegexFromPattern(patterns.includeFilePattern, host.useCaseSensitiveFileNames); if (includeRe) { if (excludeRe) { return function (path) { return !(includeRe.test(path) && !excludeRe.test(path)); }; @@ -26685,6 +26896,35 @@ var ts; } } ts.generateTSConfig = generateTSConfig; + /* @internal */ + function convertToOptionsWithAbsolutePaths(options, toAbsolutePath) { + var result = {}; + var optionsNameMap = getOptionNameMap().optionNameMap; + for (var name in options) { + if (ts.hasProperty(options, name)) { + result[name] = convertToOptionValueWithAbsolutePaths(optionsNameMap.get(name.toLowerCase()), options[name], toAbsolutePath); + } + } + if (result.configFilePath) { + result.configFilePath = toAbsolutePath(result.configFilePath); + } + return result; + } + ts.convertToOptionsWithAbsolutePaths = convertToOptionsWithAbsolutePaths; + function convertToOptionValueWithAbsolutePaths(option, value, toAbsolutePath) { + if (option) { + if (option.type === "list") { + var values = value; + if (option.element.isFilePath && values.length) { + return values.map(toAbsolutePath); + } + } + else if (option.isFilePath) { + return toAbsolutePath(value); + } + } + return value; + } /** * Parse the contents of a config file (tsconfig.json). * @param json The contents of the config file to parse @@ -27073,7 +27313,7 @@ var ts; } function convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName) { var options = getDefaultCompilerOptions(configFileName); - convertOptionsFromJson(ts.optionDeclarations, jsonOptions, basePath, options, ts.Diagnostics.Unknown_compiler_option_0, errors); + convertOptionsFromJson(ts.optionDeclarations, jsonOptions, basePath, options, compilerOptionsDefaultDiagnostics, errors); if (configFileName) { options.configFilePath = ts.normalizeSlashes(configFileName); } @@ -27085,10 +27325,14 @@ var ts; function convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName) { var options = getDefaultTypeAcquisition(configFileName); var typeAcquisition = convertEnableAutoDiscoveryToEnable(jsonOptions); - convertOptionsFromJson(ts.typeAcquisitionDeclarations, typeAcquisition, basePath, options, ts.Diagnostics.Unknown_type_acquisition_option_0, errors); + var diagnostics = { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1, + }; + convertOptionsFromJson(ts.typeAcquisitionDeclarations, typeAcquisition, basePath, options, diagnostics, errors); return options; } - function convertOptionsFromJson(optionDeclarations, jsonOptions, basePath, defaultOptions, diagnosticMessage, errors) { + function convertOptionsFromJson(optionDeclarations, jsonOptions, basePath, defaultOptions, diagnostics, errors) { if (!jsonOptions) { return; } @@ -27099,7 +27343,13 @@ var ts; defaultOptions[opt.name] = convertJsonOption(opt, jsonOptions[id], basePath, errors); } else { - errors.push(ts.createCompilerDiagnostic(diagnosticMessage, id)); + var possibleOption = ts.getSpellingSuggestion(id, optionDeclarations, function (opt) { return opt.name; }); + if (possibleOption) { + errors.push(ts.createCompilerDiagnostic(diagnostics.unknownDidYouMeanDiagnostic, id, possibleOption.name)); + } + else { + errors.push(ts.createCompilerDiagnostic(diagnostics.unknownOptionDiagnostic, id)); + } } } } @@ -27135,7 +27385,7 @@ var ts; } function normalizeNonListOptionValue(option, basePath, value) { if (option.isFilePath) { - value = ts.normalizePath(ts.combinePaths(basePath, value)); + value = ts.getNormalizedAbsolutePath(value, basePath); if (value === "") { value = "."; } @@ -28919,7 +29169,10 @@ var ts; ContainerFlags[ContainerFlags["IsInterface"] = 64] = "IsInterface"; ContainerFlags[ContainerFlags["IsObjectLiteralOrClassExpressionMethod"] = 128] = "IsObjectLiteralOrClassExpressionMethod"; })(ContainerFlags || (ContainerFlags = {})); - var flowNodeCreated = ts.identity; + function initFlowNode(node) { + ts.Debug.attachFlowNodeDebugInfo(node); + return node; + } var binder = createBinder(); function bindSourceFile(file, options) { ts.performance.mark("beforeBind"); @@ -28948,6 +29201,7 @@ var ts; var currentReturnTarget; var currentTrueTarget; var currentFalseTarget; + var currentExceptionTarget; var preSwitchCaseFlow; var activeLabels; var hasExplicitReturn; @@ -28983,6 +29237,9 @@ var ts; symbolCount = 0; skipTransformFlagAggregation = file.isDeclarationFile; Symbol = ts.objectAllocator.getSymbolConstructor(); + // Attach debugging information if necessary + ts.Debug.attachFlowNodeDebugInfo(unreachableFlow); + ts.Debug.attachFlowNodeDebugInfo(reportedUnreachableFlow); if (!file.locals) { bind(file); file.symbolCount = symbolCount; @@ -29005,6 +29262,7 @@ var ts; currentReturnTarget = undefined; currentTrueTarget = undefined; currentFalseTarget = undefined; + currentExceptionTarget = undefined; activeLabels = undefined; hasExplicitReturn = false; emitFlags = 0 /* None */; @@ -29326,11 +29584,11 @@ var ts; blockScopeContainer.locals = undefined; } if (containerFlags & 4 /* IsControlFlowContainer */) { - var saveFlowNodeCreated = flowNodeCreated; var saveCurrentFlow = currentFlow; var saveBreakTarget = currentBreakTarget; var saveContinueTarget = currentContinueTarget; var saveReturnTarget = currentReturnTarget; + var saveExceptionTarget = currentExceptionTarget; var saveActiveLabels = activeLabels; var saveHasExplicitReturn = hasExplicitReturn; var isIIFE = containerFlags & 16 /* IsFunctionExpression */ && !ts.hasModifier(node, 256 /* Async */) && @@ -29338,7 +29596,7 @@ var ts; // A non-async, non-generator IIFE is considered part of the containing control flow. Return statements behave // similarly to break statements that exit to a label just past the statement body. if (!isIIFE) { - currentFlow = { flags: 2 /* Start */ }; + currentFlow = initFlowNode({ flags: 2 /* Start */ }); if (containerFlags & (16 /* IsFunctionExpression */ | 128 /* IsObjectLiteralOrClassExpressionMethod */)) { currentFlow.node = node; } @@ -29346,11 +29604,11 @@ var ts; // We create a return control flow graph for IIFEs and constructors. For constructors // we use the return control flow graph in strict property initialization checks. currentReturnTarget = isIIFE || node.kind === 161 /* Constructor */ ? createBranchLabel() : undefined; + currentExceptionTarget = undefined; currentBreakTarget = undefined; currentContinueTarget = undefined; activeLabels = undefined; hasExplicitReturn = false; - flowNodeCreated = ts.identity; bindChildren(node); // Reset all reachability check related flags on node (for incremental scenarios) node.flags &= ~2816 /* ReachabilityAndEmitFlags */; @@ -29376,9 +29634,9 @@ var ts; currentBreakTarget = saveBreakTarget; currentContinueTarget = saveContinueTarget; currentReturnTarget = saveReturnTarget; + currentExceptionTarget = saveExceptionTarget; activeLabels = saveActiveLabels; hasExplicitReturn = saveHasExplicitReturn; - flowNodeCreated = saveFlowNodeCreated; } else if (containerFlags & 64 /* IsInterface */) { seenThisKeyword = false; @@ -29519,9 +29777,6 @@ var ts; case 309 /* JSDocEnumTag */: bindJSDocTypeAlias(node); break; - case 307 /* JSDocClassTag */: - bindJSDocClassTag(node); - break; // In source files and blocks, bind functions first to match hoisting that occurs at runtime case 288 /* SourceFile */: { bindEachFunctionsFirst(node.statements); @@ -29561,9 +29816,8 @@ var ts; function isNarrowableReference(expr) { return expr.kind === 75 /* Identifier */ || expr.kind === 103 /* ThisKeyword */ || expr.kind === 101 /* SuperKeyword */ || (ts.isPropertyAccessExpression(expr) || ts.isNonNullExpression(expr) || ts.isParenthesizedExpression(expr)) && isNarrowableReference(expr.expression) || - ts.isElementAccessExpression(expr) && - ts.isStringOrNumericLiteralLike(expr.argumentExpression) && - isNarrowableReference(expr.expression); + ts.isElementAccessExpression(expr) && ts.isStringOrNumericLiteralLike(expr.argumentExpression) && isNarrowableReference(expr.expression) || + ts.isOptionalChain(expr); } function hasNarrowableArgument(expr) { if (expr.arguments) { @@ -29620,10 +29874,10 @@ var ts; return isNarrowableReference(expr); } function createBranchLabel() { - return { flags: 4 /* BranchLabel */, antecedents: undefined }; + return initFlowNode({ flags: 4 /* BranchLabel */, antecedents: undefined }); } function createLoopLabel() { - return { flags: 8 /* LoopLabel */, antecedents: undefined }; + return initFlowNode({ flags: 8 /* LoopLabel */, antecedents: undefined }); } function setFlowNodeReferenced(flow) { // On first reference we set the Referenced flag, thereafter we set the Shared flag @@ -29642,36 +29896,32 @@ var ts; if (!expression) { return flags & 32 /* TrueCondition */ ? antecedent : unreachableFlow; } - if (expression.kind === 105 /* TrueKeyword */ && flags & 64 /* FalseCondition */ || - expression.kind === 90 /* FalseKeyword */ && flags & 32 /* TrueCondition */) { - if (!ts.isOptionalChainRoot(expression.parent)) { - return unreachableFlow; - } + if ((expression.kind === 105 /* TrueKeyword */ && flags & 64 /* FalseCondition */ || + expression.kind === 90 /* FalseKeyword */ && flags & 32 /* TrueCondition */) && + !ts.isExpressionOfOptionalChainRoot(expression) && !ts.isNullishCoalesce(expression.parent)) { + return unreachableFlow; } if (!isNarrowingExpression(expression)) { return antecedent; } setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: flags, antecedent: antecedent, node: expression }); + return initFlowNode({ flags: flags, antecedent: antecedent, node: expression }); } function createFlowSwitchClause(antecedent, switchStatement, clauseStart, clauseEnd) { - if (!isNarrowingExpression(switchStatement.expression)) { - return antecedent; - } setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: 128 /* SwitchClause */, antecedent: antecedent, switchStatement: switchStatement, clauseStart: clauseStart, clauseEnd: clauseEnd }); + return initFlowNode({ flags: 128 /* SwitchClause */, antecedent: antecedent, switchStatement: switchStatement, clauseStart: clauseStart, clauseEnd: clauseEnd }); } - function createFlowAssignment(antecedent, node) { + function createFlowMutation(flags, antecedent, node) { setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: 16 /* Assignment */, antecedent: antecedent, node: node }); + var result = initFlowNode({ flags: flags, antecedent: antecedent, node: node }); + if (currentExceptionTarget) { + addAntecedent(currentExceptionTarget, result); + } + return result; } function createFlowCall(antecedent, node) { setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: 512 /* Call */, antecedent: antecedent, node: node }); - } - function createFlowArrayMutation(antecedent, node) { - setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: 256 /* ArrayMutation */, antecedent: antecedent, node: node }); + return initFlowNode({ flags: 512 /* Call */, antecedent: antecedent, node: node }); } function finishFlowLabel(flow) { var antecedents = flow.antecedents; @@ -29731,7 +29981,7 @@ var ts; } function bindCondition(node, trueTarget, falseTarget) { doWithConditionalBranches(bind, node, trueTarget, falseTarget); - if (!node || !isLogicalExpression(node) && !(ts.isOptionalChain(node) && isOutermostOptionalChain(node))) { + if (!node || !isLogicalExpression(node) && !(ts.isOptionalChain(node) && ts.isOutermostOptionalChain(node))) { addAntecedent(trueTarget, createFlowCondition(32 /* TrueCondition */, currentFlow, node)); addAntecedent(falseTarget, createFlowCondition(64 /* FalseCondition */, currentFlow, node)); } @@ -29862,87 +30112,56 @@ var ts; } function bindTryStatement(node) { var preFinallyLabel = createBranchLabel(); - var preTryFlow = currentFlow; - var tryPriors = []; - var oldFlowNodeCreated = flowNodeCreated; - // We hook the creation of all flow nodes within the `try` scope and store them so we can add _all_ of them - // as possible antecedents of the start of the `catch` or `finally` blocks. - // Don't bother intercepting the call if there's no finally or catch block that needs the information - if (node.catchClause || node.finallyBlock) { - flowNodeCreated = function (node) { return (tryPriors.push(node), node); }; - } + // We conservatively assume that *any* code in the try block can cause an exception, but we only need + // to track code that causes mutations (because only mutations widen the possible control flow type of + // a variable). The currentExceptionTarget is the target label for control flows that result from + // exceptions. We add all mutation flow nodes as antecedents of this label such that we can analyze them + // as possible antecedents of the start of catch or finally blocks. Furthermore, we add the current + // control flow to represent exceptions that occur before any mutations. + var saveExceptionTarget = currentExceptionTarget; + currentExceptionTarget = createBranchLabel(); + addAntecedent(currentExceptionTarget, currentFlow); bind(node.tryBlock); - flowNodeCreated = oldFlowNodeCreated; addAntecedent(preFinallyLabel, currentFlow); var flowAfterTry = currentFlow; var flowAfterCatch = unreachableFlow; if (node.catchClause) { - currentFlow = preTryFlow; - if (tryPriors.length) { - var preCatchFlow = createBranchLabel(); - addAntecedent(preCatchFlow, currentFlow); - for (var _i = 0, tryPriors_1 = tryPriors; _i < tryPriors_1.length; _i++) { - var p = tryPriors_1[_i]; - addAntecedent(preCatchFlow, p); - } - currentFlow = finishFlowLabel(preCatchFlow); - } + // Start of catch clause is the target of exceptions from try block. + currentFlow = finishFlowLabel(currentExceptionTarget); + // The currentExceptionTarget now represents control flows from exceptions in the catch clause. + // Effectively, in a try-catch-finally, if an exception occurs in the try block, the catch block + // acts like a second try block. + currentExceptionTarget = createBranchLabel(); + addAntecedent(currentExceptionTarget, currentFlow); bind(node.catchClause); addAntecedent(preFinallyLabel, currentFlow); flowAfterCatch = currentFlow; } + var exceptionTarget = finishFlowLabel(currentExceptionTarget); + currentExceptionTarget = saveExceptionTarget; if (node.finallyBlock) { - // We add the nodes within the `try` block to the `finally`'s antecedents if there's no catch block - // (If there is a `catch` block, it will have all these antecedents instead, and the `finally` will - // have the end of the `try` block and the end of the `catch` block) - var preFinallyPrior = preTryFlow; - if (!node.catchClause) { - if (tryPriors.length) { - var preFinallyFlow_1 = createBranchLabel(); - addAntecedent(preFinallyFlow_1, preTryFlow); - for (var _a = 0, tryPriors_2 = tryPriors; _a < tryPriors_2.length; _a++) { - var p = tryPriors_2[_a]; - addAntecedent(preFinallyFlow_1, p); - } - preFinallyPrior = finishFlowLabel(preFinallyFlow_1); - } - } - // in finally flow is combined from pre-try/flow from try/flow from catch - // pre-flow is necessary to make sure that finally is reachable even if finally flows in both try and finally blocks are unreachable - // also for finally blocks we inject two extra edges into the flow graph. - // first -> edge that connects pre-try flow with the label at the beginning of the finally block, it has lock associated with it - // second -> edge that represents post-finally flow. - // these edges are used in following scenario: - // let a; (1) - // try { a = someOperation(); (2)} - // finally { (3) console.log(a) } (4) - // (5) a - // flow graph for this case looks roughly like this (arrows show ): - // (1-pre-try-flow) <--.. <-- (2-post-try-flow) - // ^ ^ - // |*****(3-pre-finally-label) -----| - // ^ - // |-- ... <-- (4-post-finally-label) <--- (5) - // In case when we walk the flow starting from inside the finally block we want to take edge '*****' into account - // since it ensures that finally is always reachable. However when we start outside the finally block and go through label (5) - // then edge '*****' should be discarded because label 4 is only reachable if post-finally label-4 is reachable - // Simply speaking code inside finally block is treated as reachable as pre-try-flow - // since we conservatively assume that any line in try block can throw or return in which case we'll enter finally. - // However code after finally is reachable only if control flow was not abrupted in try/catch or finally blocks - it should be composed from - // final flows of these blocks without taking pre-try flow into account. - // - // extra edges that we inject allows to control this behavior - // if when walking the flow we step on post-finally edge - we can mark matching pre-finally edge as locked so it will be skipped. - var preFinallyFlow = { flags: 4096 /* PreFinally */, antecedent: preFinallyPrior, lock: {} }; + // Possible ways control can reach the finally block: + // 1) Normal completion of try block of a try-finally or try-catch-finally + // 2) Normal completion of catch block (following exception in try block) of a try-catch-finally + // 3) Exception in try block of a try-finally + // 4) Exception in catch block of a try-catch-finally + // When analyzing a control flow graph that starts inside a finally block we want to consider all + // four possibilities above. However, when analyzing a control flow graph that starts outside (past) + // the finally block, we only want to consider the first two (if we're past a finally block then it + // must have completed normally). To make this possible, we inject two extra nodes into the control + // flow graph: An after-finally with an antecedent of the control flow at the end of the finally + // block, and a pre-finally with an antecedent that represents all exceptional control flows. The + // 'lock' property of the pre-finally references the after-finally, and the after-finally has a + // boolean 'locked' property that we set to true when analyzing a control flow that contained the + // the after-finally node. When the lock associated with a pre-finally is locked, the antecedent of + // the pre-finally (i.e. the exceptional control flows) are skipped. + var preFinallyFlow = initFlowNode({ flags: 4096 /* PreFinally */, antecedent: exceptionTarget, lock: {} }); addAntecedent(preFinallyLabel, preFinallyFlow); currentFlow = finishFlowLabel(preFinallyLabel); bind(node.finallyBlock); - // if flow after finally is unreachable - keep it - // otherwise check if flows after try and after catch are unreachable - // if yes - convert current flow to unreachable - // i.e. - // try { return "1" } finally { console.log(1); } - // console.log(2); // this line should be unreachable even if flow falls out of finally block + // If the end of the finally block is reachable, but the end of the try and catch blocks are not, + // convert the current flow to unreachable. For example, 'try { return 1; } finally { ... }' should + // result in an unreachable current control flow. if (!(currentFlow.flags & 1 /* Unreachable */)) { if ((flowAfterTry.flags & 1 /* Unreachable */) && (flowAfterCatch.flags & 1 /* Unreachable */)) { currentFlow = flowAfterTry === reportedUnreachableFlow || flowAfterCatch === reportedUnreachableFlow @@ -29951,7 +30170,7 @@ var ts; } } if (!(currentFlow.flags & 1 /* Unreachable */)) { - var afterFinallyFlow = flowNodeCreated({ flags: 8192 /* AfterFinally */, antecedent: currentFlow }); + var afterFinallyFlow = initFlowNode({ flags: 8192 /* AfterFinally */, antecedent: currentFlow }); preFinallyFlow.lock = afterFinallyFlow; currentFlow = afterFinallyFlow; } @@ -29985,6 +30204,7 @@ var ts; var savedSubtreeTransformFlags = subtreeTransformFlags; subtreeTransformFlags = 0; var clauses = node.clauses; + var isNarrowingSwitch = isNarrowingExpression(node.parent.expression); var fallthroughFlow = unreachableFlow; for (var i = 0; i < clauses.length; i++) { var clauseStart = i; @@ -29993,14 +30213,14 @@ var ts; i++; } var preCaseLabel = createBranchLabel(); - addAntecedent(preCaseLabel, createFlowSwitchClause(preSwitchCaseFlow, node.parent, clauseStart, i + 1)); + addAntecedent(preCaseLabel, isNarrowingSwitch ? createFlowSwitchClause(preSwitchCaseFlow, node.parent, clauseStart, i + 1) : preSwitchCaseFlow); addAntecedent(preCaseLabel, fallthroughFlow); currentFlow = finishFlowLabel(preCaseLabel); var clause = clauses[i]; bind(clause); fallthroughFlow = currentFlow; if (!(currentFlow.flags & 1 /* Unreachable */) && i !== clauses.length - 1 && options.noFallthroughCasesInSwitch) { - errorOnFirstToken(clause, ts.Diagnostics.Fallthrough_case_in_switch); + clause.fallthroughFlowNode = currentFlow; } } clauses.transformFlags = subtreeTransformFlags | 536870912 /* HasComputedFlags */; @@ -30064,7 +30284,7 @@ var ts; } function bindAssignmentTargetFlow(node) { if (isNarrowableReference(node)) { - currentFlow = createFlowAssignment(currentFlow, node); + currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); } else if (node.kind === 191 /* ArrayLiteralExpression */) { for (var _i = 0, _a = node.elements; _i < _a.length; _i++) { @@ -30145,7 +30365,7 @@ var ts; if (operator === 62 /* EqualsToken */ && node.left.kind === 194 /* ElementAccessExpression */) { var elementAccess = node.left; if (isNarrowableOperand(elementAccess.expression)) { - currentFlow = createFlowArrayMutation(currentFlow, node); + currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); } } } @@ -30181,7 +30401,7 @@ var ts; } } else { - currentFlow = createFlowAssignment(currentFlow, node); + currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); } } function bindVariableDeclarationFlow(node) { @@ -30203,12 +30423,9 @@ var ts; addDeclarationToSymbol(host.symbol, host, 32 /* Class */); } } - function isOutermostOptionalChain(node) { - return !ts.isOptionalChain(node.parent) || ts.isOptionalChainRoot(node.parent) || node !== node.parent.expression; - } function bindOptionalExpression(node, trueTarget, falseTarget) { doWithConditionalBranches(bind, node, trueTarget, falseTarget); - if (!ts.isOptionalChain(node) || isOutermostOptionalChain(node)) { + if (!ts.isOptionalChain(node) || ts.isOutermostOptionalChain(node)) { addAntecedent(trueTarget, createFlowCondition(32 /* TrueCondition */, currentFlow, node)); addAntecedent(falseTarget, createFlowCondition(64 /* FalseCondition */, currentFlow, node)); } @@ -30246,7 +30463,7 @@ var ts; currentFlow = finishFlowLabel(preChainLabel); } doWithConditionalBranches(bindOptionalChainRest, node, trueTarget, falseTarget); - if (isOutermostOptionalChain(node)) { + if (ts.isOutermostOptionalChain(node)) { addAntecedent(trueTarget, createFlowCondition(32 /* TrueCondition */, currentFlow, node)); addAntecedent(falseTarget, createFlowCondition(64 /* FalseCondition */, currentFlow, node)); } @@ -30290,7 +30507,7 @@ var ts; if (node.expression.kind === 193 /* PropertyAccessExpression */) { var propertyAccess = node.expression; if (isNarrowableOperand(propertyAccess.expression) && ts.isPushOrUnshiftIdentifier(propertyAccess.name)) { - currentFlow = createFlowArrayMutation(currentFlow, node); + currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); } } } @@ -30590,7 +30807,7 @@ var ts; var host = ts.getJSDocHost(typeAlias); container = ts.findAncestor(host.parent, function (n) { return !!(getContainerFlags(n) & 1 /* IsContainer */); }) || file; blockScopeContainer = ts.getEnclosingBlockScopeContainer(host) || file; - currentFlow = { flags: 2 /* Start */ }; + currentFlow = initFlowNode({ flags: 2 /* Start */ }); parent = typeAlias; bind(typeAlias.typeExpression); var declName = ts.getNameOfDeclaration(typeAlias); @@ -30603,7 +30820,12 @@ var ts; switch (ts.getAssignmentDeclarationPropertyAccessKind(declName.parent)) { case 1 /* ExportsProperty */: case 2 /* ModuleExports */: - container = file; + if (!ts.isExternalOrCommonJsModule(file)) { + container = undefined; + } + else { + container = file; + } break; case 4 /* ThisProperty */: container = declName.parent.expression; @@ -30617,7 +30839,9 @@ var ts; case 0 /* None */: return ts.Debug.fail("Shouldn't have detected typedef or enum on non-assignment declaration"); } - declareModuleMember(typeAlias, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); + if (container) { + declareModuleMember(typeAlias, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); + } container = oldContainer; } } @@ -31013,6 +31237,8 @@ var ts; case 302 /* JSDocTypeLiteral */: case 185 /* MappedType */: return bindAnonymousTypeWorker(node); + case 307 /* JSDocClassTag */: + return bindJSDocClassTag(node); case 192 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); case 200 /* FunctionExpression */: @@ -31232,7 +31458,8 @@ var ts; var flags = ts.exportAssignmentIsAlias(node) ? 2097152 /* Alias */ : 4 /* Property */ | 1048576 /* ExportValue */ | 512 /* ValueModule */; - declareSymbol(file.symbol.exports, file.symbol, node, flags | 67108864 /* Assignment */, 0 /* None */); + var symbol = declareSymbol(file.symbol.exports, file.symbol, node, flags | 67108864 /* Assignment */, 0 /* None */); + setValueDeclaration(symbol, node); } function bindThisPropertyAssignment(node) { ts.Debug.assert(ts.isInJSFile(node)); @@ -31248,7 +31475,7 @@ var ts; constructorSymbol = lookupSymbolForPropertyAccess(l.expression.expression, thisParentContainer); } } - if (constructorSymbol) { + if (constructorSymbol && constructorSymbol.valueDeclaration) { // Declare a 'member' if the container is an ES5 class or ES6 constructor constructorSymbol.members = constructorSymbol.members || ts.createSymbolTable(); // It's acceptable for multiple 'this' assignments of the same identifier to occur @@ -31321,6 +31548,10 @@ var ts; } function bindObjectDefinePrototypeProperty(node) { var namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0].expression); + if (namespaceSymbol) { + // Ensure the namespace symbol becomes class-like + addDeclarationToSymbol(namespaceSymbol, namespaceSymbol.valueDeclaration, 32 /* Class */); + } bindPotentiallyNewExpandoMemberToNamespace(node, namespaceSymbol, /*isPrototypeProperty*/ true); } /** @@ -31395,7 +31626,7 @@ var ts; } }); } - if (containerIsClass && namespaceSymbol) { + if (containerIsClass && namespaceSymbol && namespaceSymbol.valueDeclaration) { addDeclarationToSymbol(namespaceSymbol, namespaceSymbol.valueDeclaration, 32 /* Class */); } return namespaceSymbol; @@ -32044,7 +32275,8 @@ var ts; || ts.hasModifier(node, 2270 /* TypeScriptModifier */) || node.typeParameters || node.type - || !node.body) { + || !node.body + || node.questionToken) { transformFlags |= 1 /* AssertTypeScript */; } // function declarations with object rest destructuring are ES2018 syntax @@ -32081,7 +32313,7 @@ var ts; function computePropertyDeclaration(node, subtreeFlags) { var transformFlags = subtreeFlags | 1048576 /* ContainsClassFields */; // Decorators, TypeScript-specific modifiers, and type annotations are TypeScript syntax. - if (ts.some(node.decorators) || ts.hasModifier(node, 2270 /* TypeScriptModifier */) || node.type) { + if (ts.some(node.decorators) || ts.hasModifier(node, 2270 /* TypeScriptModifier */) || node.type || node.questionToken) { transformFlags |= 1 /* AssertTypeScript */; } // Hoisted variables related to class properties should live within the TypeScript class wrapper. @@ -32886,6 +33118,7 @@ var ts; TypeSystemPropertyName[TypeSystemPropertyName["ImmediateBaseConstraint"] = 4] = "ImmediateBaseConstraint"; TypeSystemPropertyName[TypeSystemPropertyName["EnumTagType"] = 5] = "EnumTagType"; TypeSystemPropertyName[TypeSystemPropertyName["JSDocTypeReference"] = 6] = "JSDocTypeReference"; + TypeSystemPropertyName[TypeSystemPropertyName["ResolvedTypeArguments"] = 7] = "ResolvedTypeArguments"; })(TypeSystemPropertyName || (TypeSystemPropertyName = {})); var CheckMode; (function (CheckMode) { @@ -32896,12 +33129,6 @@ var ts; CheckMode[CheckMode["SkipGenericFunctions"] = 8] = "SkipGenericFunctions"; CheckMode[CheckMode["IsForSignatureHelp"] = 16] = "IsForSignatureHelp"; })(CheckMode || (CheckMode = {})); - var ContextFlags; - (function (ContextFlags) { - ContextFlags[ContextFlags["None"] = 0] = "None"; - ContextFlags[ContextFlags["Signature"] = 1] = "Signature"; - ContextFlags[ContextFlags["NoConstraints"] = 2] = "NoConstraints"; - })(ContextFlags || (ContextFlags = {})); var AccessFlags; (function (AccessFlags) { AccessFlags[AccessFlags["None"] = 0] = "None"; @@ -33035,14 +33262,12 @@ var ts; undefinedSymbol.declarations = []; var globalThisSymbol = createSymbol(1536 /* Module */, "globalThis", 8 /* Readonly */); globalThisSymbol.exports = globals; + globalThisSymbol.declarations = []; globals.set(globalThisSymbol.escapedName, globalThisSymbol); var argumentsSymbol = createSymbol(4 /* Property */, "arguments"); var requireSymbol = createSymbol(4 /* Property */, "require"); /** This will be set during calls to `getResolvedSignature` where services determines an apparent number of arguments greater than what is actually provided. */ var apparentArgumentCount; - // This object is reused for `checkOptionalExpression` return values to avoid frequent GC due to nursery object allocations. - // This object represents a pool-size of 1. - var pooledOptionalTypeResult = { isOptional: false, type: undefined }; // for public members that accept a Node or one of its subtypes, we must guard against // synthetic nodes created during transformations by calling `getParseTreeNode`. // for most of these, we perform the guard only on `checker` to avoid any possible @@ -33161,9 +33386,9 @@ var ts; }, getAugmentedPropertiesOfType: getAugmentedPropertiesOfType, getRootSymbols: getRootSymbols, - getContextualType: function (nodeIn) { + getContextualType: function (nodeIn, contextFlags) { var node = ts.getParseTreeNode(nodeIn, ts.isExpression); - return node ? getContextualType(node) : undefined; + return node ? getContextualType(node, contextFlags) : undefined; }, getContextualTypeForObjectLiteralElement: function (nodeIn) { var node = ts.getParseTreeNode(nodeIn, ts.isObjectLiteralElementLike); @@ -33212,7 +33437,7 @@ var ts; getEmitResolver: getEmitResolver, getExportsOfModule: getExportsOfModuleAsArray, getExportsAndPropertiesOfModule: getExportsAndPropertiesOfModule, - getSymbolWalker: ts.createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignature, getReturnTypeOfSignature, getBaseTypes, resolveStructuredTypeMembers, getTypeOfSymbol, getResolvedSymbol, getIndexTypeOfStructuredType, getConstraintOfTypeParameter, getFirstIdentifier, getTypeArguments), + getSymbolWalker: ts.createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignature, getReturnTypeOfSignature, getBaseTypes, resolveStructuredTypeMembers, getTypeOfSymbol, getResolvedSymbol, getIndexTypeOfStructuredType, getConstraintOfTypeParameter, ts.getFirstIdentifier, getTypeArguments), getAmbientModules: getAmbientModules, getJsxIntrinsicTagNamesAt: getJsxIntrinsicTagNamesAt, isOptionalParameter: function (nodeIn) { @@ -33341,10 +33566,10 @@ var ts; var errorType = createIntrinsicType(1 /* Any */, "error"); var unknownType = createIntrinsicType(2 /* Unknown */, "unknown"); var undefinedType = createIntrinsicType(32768 /* Undefined */, "undefined"); - var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 262144 /* ContainsWideningType */); + var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 524288 /* ContainsWideningType */); var optionalType = createIntrinsicType(32768 /* Undefined */, "undefined"); var nullType = createIntrinsicType(65536 /* Null */, "null"); - var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 262144 /* ContainsWideningType */); + var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 524288 /* ContainsWideningType */); var stringType = createIntrinsicType(4 /* String */, "string"); var numberType = createIntrinsicType(8 /* Number */, "number"); var bigintType = createIntrinsicType(64 /* BigInt */, "bigint"); @@ -33370,7 +33595,7 @@ var ts; var voidType = createIntrinsicType(16384 /* Void */, "void"); var neverType = createIntrinsicType(131072 /* Never */, "never"); var silentNeverType = createIntrinsicType(131072 /* Never */, "never"); - var nonInferrableType = createIntrinsicType(131072 /* Never */, "never", 1048576 /* NonInferrableType */); + var nonInferrableType = createIntrinsicType(131072 /* Never */, "never", 2097152 /* NonInferrableType */); var implicitNeverType = createIntrinsicType(131072 /* Never */, "never"); var unreachableNeverType = createIntrinsicType(131072 /* Never */, "never"); var nonPrimitiveType = createIntrinsicType(67108864 /* NonPrimitive */, "object"); @@ -33388,7 +33613,7 @@ var ts; var anyFunctionType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); // The anyFunctionType contains the anyFunctionType by definition. The flag is further propagated // in getPropagatingFlagsOfTypes, and it is checked in inferFromTypes. - anyFunctionType.objectFlags |= 1048576 /* NonInferrableType */; + anyFunctionType.objectFlags |= 2097152 /* NonInferrableType */; var noConstraintType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); var circularConstraintType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); var resolvingDefaultType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); @@ -33397,10 +33622,10 @@ var ts; markerSubType.constraint = markerSuperType; var markerOtherType = createTypeParameter(); var noTypePredicate = createTypePredicate(1 /* Identifier */, "<>", 0, anyType); - var anySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); - var unknownSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, errorType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); - var resolvingSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); - var silentNeverSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, silentNeverType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); + var anySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */); + var unknownSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, errorType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */); + var resolvingSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */); + var silentNeverSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, silentNeverType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */); var enumNumberIndexInfo = createIndexInfo(stringType, /*isReadonly*/ true); var iterationTypesCache = ts.createMap(); // cache for common IterationTypes instances var noIterationTypes = { @@ -33553,7 +33778,7 @@ var ts; var chosenpragma = ts.isArray(jsxPragma) ? jsxPragma[0] : jsxPragma; file.localJsxFactory = ts.parseIsolatedEntityName(chosenpragma.arguments.factory, languageVersion); if (file.localJsxFactory) { - return file.localJsxNamespace = getFirstIdentifier(file.localJsxFactory).escapedText; + return file.localJsxNamespace = ts.getFirstIdentifier(file.localJsxFactory).escapedText; } } } @@ -33563,7 +33788,7 @@ var ts; if (compilerOptions.jsxFactory) { _jsxFactoryEntity = ts.parseIsolatedEntityName(compilerOptions.jsxFactory, languageVersion); if (_jsxFactoryEntity) { - _jsxNamespace = getFirstIdentifier(_jsxFactoryEntity).escapedText; + _jsxNamespace = ts.getFirstIdentifier(_jsxFactoryEntity).escapedText; } } else if (compilerOptions.reactNamespace) { @@ -35041,7 +35266,7 @@ var ts; var namespaceMeaning = 1920 /* Namespace */ | (ts.isInJSFile(name) ? meaning & 111551 /* Value */ : 0); var symbol; if (name.kind === 75 /* Identifier */) { - var message = meaning === namespaceMeaning ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(getFirstIdentifier(name)); + var message = meaning === namespaceMeaning ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(ts.getFirstIdentifier(name)); var symbolFromJSPrototype = ts.isInJSFile(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined; symbol = resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, /*isUse*/ true); if (!symbol) { @@ -35153,7 +35378,12 @@ var ts; return undefined; } var init = ts.isVariableDeclaration(decl) ? ts.getDeclaredExpandoInitializer(decl) : ts.getAssignedExpandoInitializer(decl); - return init && getSymbolOfNode(init) || undefined; + if (init) { + var initSymbol = getSymbolOfNode(init); + if (initSymbol) { + return mergeJSSymbols(initSymbol, symbol); + } + } } function resolveExternalModuleName(location, moduleReferenceExpression, ignoreErrors) { return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ignoreErrors ? undefined : ts.Diagnostics.Cannot_find_module_0); @@ -35580,8 +35810,8 @@ var ts; } function findConstructorDeclaration(node) { var members = node.members; - for (var _i = 0, members_2 = members; _i < members_2.length; _i++) { - var member = members_2[_i]; + for (var _i = 0, members_3 = members; _i < members_3.length; _i++) { + var member = members_3[_i]; if (member.kind === 161 /* Constructor */ && ts.nodeIsPresent(member.body)) { return member; } @@ -36004,7 +36234,7 @@ var ts; // Type Reference or TypeAlias entity = Identifier meaning = 788968 /* Type */; } - var firstIdentifier = getFirstIdentifier(entityName); + var firstIdentifier = ts.getFirstIdentifier(entityName); var symbol = resolveName(enclosingDeclaration, firstIdentifier.escapedText, meaning, /*nodeNotFoundErrorMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false); // Verify if the symbol is accessible return (symbol && hasVisibleDeclarations(symbol, /*shouldComputeAliasToMakeVisible*/ true)) || { @@ -36496,8 +36726,6 @@ var ts; else if (context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */ && type.symbol.valueDeclaration && ts.isClassLike(type.symbol.valueDeclaration) && - // Use `import` types for refs to other scopes, only anonymize something defined in the same scope - ts.findAncestor(type.symbol.valueDeclaration, function (d) { return d === ts.getSourceFileOfNode(context.enclosingDeclaration); }) && !isValueSymbolAccessible(type.symbol, context.enclosingDeclaration)) { return createAnonymousTypeNode(type); } @@ -36658,9 +36886,9 @@ var ts; } } } - var propertyName = symbolToName(propertySymbol, context, 111551 /* Value */, /*expectsIdentifier*/ true); - context.approximateLength += (ts.symbolName(propertySymbol).length + 1); context.enclosingDeclaration = saveEnclosingDeclaration; + var propertyName = getPropertyNameNodeForSymbol(propertySymbol, context); + context.approximateLength += (ts.symbolName(propertySymbol).length + 1); var optionalToken = propertySymbol.flags & 16777216 /* Optional */ ? ts.createToken(57 /* QuestionToken */) : undefined; if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) { var signatures = getSignaturesOfType(filterType(propertyType, function (t) { return !(t.flags & 32768 /* Undefined */); }), 0 /* Call */); @@ -36859,7 +37087,7 @@ var ts; if (!context.tracker.trackSymbol) return; // get symbol of the first identifier of the entityName - var firstIdentifier = getFirstIdentifier(accessExpression); + var firstIdentifier = ts.getFirstIdentifier(accessExpression); var name = resolveName(firstIdentifier, firstIdentifier.escapedText, 111551 /* Value */ | 1048576 /* ExportValue */, /*nodeNotFoundErrorMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ true); if (name) { context.tracker.trackSymbol(name, enclosingDeclaration, 111551 /* Value */); @@ -37225,22 +37453,34 @@ var ts; } } } + function isSingleQuotedStringNamed(d) { + var name = ts.getNameOfDeclaration(d); + if (name && ts.isStringLiteral(name) && (name.singleQuote || + (!ts.nodeIsSynthesized(name) && ts.startsWith(ts.getTextOfNode(name, /*includeTrivia*/ false), "'")))) { + return true; + } + return false; + } function getPropertyNameNodeForSymbol(symbol, context) { - var fromNameType = getPropertyNameNodeForSymbolFromNameType(symbol, context); + var singleQuote = !!ts.length(symbol.declarations) && ts.every(symbol.declarations, isSingleQuotedStringNamed); + var fromNameType = getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote); if (fromNameType) { return fromNameType; } + if (ts.isKnownSymbol(symbol)) { + return ts.createComputedPropertyName(ts.createPropertyAccess(ts.createIdentifier("Symbol"), symbol.escapedName.substr(3))); + } var rawName = ts.unescapeLeadingUnderscores(symbol.escapedName); - return createPropertyNameNodeForIdentifierOrLiteral(rawName); + return createPropertyNameNodeForIdentifierOrLiteral(rawName, singleQuote); } // See getNameForSymbolFromNameType for a stringy equivalent - function getPropertyNameNodeForSymbolFromNameType(symbol, context) { + function getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote) { var nameType = symbol.nameType; if (nameType) { if (nameType.flags & 384 /* StringOrNumberLiteral */) { var name = "" + nameType.value; if (!ts.isIdentifierText(name, compilerOptions.target) && !isNumericLiteralName(name)) { - return ts.createLiteral(name); + return ts.createLiteral(name, !!singleQuote); } if (isNumericLiteralName(name) && ts.startsWith(name, "-")) { return ts.createComputedPropertyName(ts.createLiteral(+name)); @@ -37252,8 +37492,8 @@ var ts; } } } - function createPropertyNameNodeForIdentifierOrLiteral(name) { - return ts.isIdentifierText(name, compilerOptions.target) ? ts.createIdentifier(name) : ts.createLiteral(isNumericLiteralName(name) ? +name : name); + function createPropertyNameNodeForIdentifierOrLiteral(name, singleQuote) { + return ts.isIdentifierText(name, compilerOptions.target) ? ts.createIdentifier(name) : ts.createLiteral(isNumericLiteralName(name) ? +name : name, !!singleQuote); } function cloneNodeBuilderContext(context) { var initial = __assign({}, context); @@ -37293,7 +37533,7 @@ var ts; var visitedSymbols = ts.createMap(); var deferredPrivates; var oldcontext = context; - context = __assign(__assign({}, oldcontext), { usedSymbolNames: ts.mapMap(symbolTable, function (_symbol, name) { return [ts.unescapeLeadingUnderscores(name), true]; }), remappedSymbolNames: ts.createMap(), tracker: __assign(__assign({}, oldcontext.tracker), { trackSymbol: function (sym, decl, meaning) { + context = __assign(__assign({}, oldcontext), { usedSymbolNames: ts.createMap(), remappedSymbolNames: ts.createMap(), tracker: __assign(__assign({}, oldcontext.tracker), { trackSymbol: function (sym, decl, meaning) { var accessibleResult = isSymbolAccessible(sym, decl, meaning, /*computeALiases*/ false); if (accessibleResult.accessibility === 0 /* Accessible */) { // Lookup the root symbol of the chain of refs we'll use to access it and serialize it @@ -37311,6 +37551,10 @@ var ts; context.usedSymbolNames.set(name, true); }); } + ts.forEachEntry(symbolTable, function (symbol, name) { + var baseName = ts.unescapeLeadingUnderscores(name); + void getInternalSymbolName(symbol, baseName); // Called to cache values into `usedSymbolNames` and `remappedSymbolNames` + }); var addingDeclare = !bundled; var exportEquals = symbolTable.get("export=" /* ExportEquals */); if (exportEquals && symbolTable.size > 1 && exportEquals.flags & 2097152 /* Alias */) { @@ -37502,7 +37746,11 @@ var ts; isPrivate = true; } var modifierFlags = (!isPrivate ? 1 /* Export */ : 0) | (isDefault && !needsPostExportDefault ? 512 /* Default */ : 0); - if (symbol.flags & 16 /* Function */) { + var isConstMergedWithNS = symbol.flags & 1536 /* Module */ && + symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && + symbol.escapedName !== "export=" /* ExportEquals */; + var isConstMergedWithNSPrintableAsSignatureMerge = isConstMergedWithNS && isTypeRepresentableAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol); + if (symbol.flags & 16 /* Function */ || isConstMergedWithNSPrintableAsSignatureMerge) { serializeAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol, getInternalSymbolName(symbol, symbolName), modifierFlags); } if (symbol.flags & 524288 /* TypeAlias */) { @@ -37513,7 +37761,8 @@ var ts; if (symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && symbol.escapedName !== "export=" /* ExportEquals */ && !(symbol.flags & 4194304 /* Prototype */) - && !(symbol.flags & 32 /* Class */)) { + && !(symbol.flags & 32 /* Class */) + && !isConstMergedWithNSPrintableAsSignatureMerge) { serializeVariableOrProperty(symbol, symbolName, isPrivate, needsPostExportDefault, propertyAsAlias, modifierFlags); } if (symbol.flags & 384 /* Enum */) { @@ -37530,7 +37779,7 @@ var ts; serializeAsClass(symbol, getInternalSymbolName(symbol, symbolName), modifierFlags); } } - if (symbol.flags & (512 /* ValueModule */ | 1024 /* NamespaceModule */)) { + if ((symbol.flags & (512 /* ValueModule */ | 1024 /* NamespaceModule */) && (!isConstMergedWithNS || isTypeOnlyNamespace(symbol))) || isConstMergedWithNSPrintableAsSignatureMerge) { serializeModule(symbol, symbolName, modifierFlags); } if (symbol.flags & 64 /* Interface */) { @@ -37558,7 +37807,10 @@ var ts; } } function includePrivateSymbol(symbol) { + if (ts.some(symbol.declarations, ts.isParameterDeclaration)) + return; ts.Debug.assertDefined(deferredPrivates); + getUnusedName(ts.unescapeLeadingUnderscores(symbol.escapedName), symbol); // Call to cache unique name for symbol deferredPrivates.set("" + getSymbolId(symbol), symbol); } function isExportingScope(enclosingDeclaration) { @@ -37617,8 +37869,14 @@ var ts; /*decorators*/ undefined, /*modifiers*/ undefined, getInternalSymbolName(symbol, symbolName), typeParamDecls, heritageClauses, __spreadArrays(indexSignatures, constructSignatures, callSignatures, members)), modifierFlags); } + function getNamespaceMembersForSerialization(symbol) { + return !symbol.exports ? [] : ts.filter(ts.arrayFrom((symbol.exports).values()), function (p) { return !((p.flags & 4194304 /* Prototype */) || (p.escapedName === "prototype")); }); + } + function isTypeOnlyNamespace(symbol) { + return ts.every(getNamespaceMembersForSerialization(symbol), function (m) { return !(resolveSymbol(m).flags & 111551 /* Value */); }); + } function serializeModule(symbol, symbolName, modifierFlags) { - var members = !symbol.exports ? [] : ts.filter(ts.arrayFrom((symbol.exports).values()), function (p) { return !((p.flags & 4194304 /* Prototype */) || (p.escapedName === "prototype")); }); + var members = getNamespaceMembersForSerialization(symbol); // Split NS members up by declaration - members whose parent symbol is the ns symbol vs those whose is not (but were added in later via merging) var locationMap = ts.arrayToMultiMap(members, function (m) { return m.parent && m.parent === symbol ? "real" : "merged"; }); var realMembers = locationMap.get("real") || ts.emptyArray; @@ -37628,17 +37886,20 @@ var ts; // so we don't even have placeholders to fill in. if (ts.length(realMembers)) { var localName = getInternalSymbolName(symbol, symbolName); - serializeAsNamespaceDeclaration(realMembers, localName, modifierFlags, /*suppressNewPrivateContext*/ false); + serializeAsNamespaceDeclaration(realMembers, localName, modifierFlags, !!(symbol.flags & (16 /* Function */ | 67108864 /* Assignment */))); } if (ts.length(mergedMembers)) { var localName = getInternalSymbolName(symbol, symbolName); - ts.forEach(mergedMembers, includePrivateSymbol); var nsBody = ts.createModuleBlock([ts.createExportDeclaration( /*decorators*/ undefined, /*modifiers*/ undefined, ts.createNamedExports(ts.map(ts.filter(mergedMembers, function (n) { return n.escapedName !== "export=" /* ExportEquals */; }), function (s) { var name = ts.unescapeLeadingUnderscores(s.escapedName); var localName = getInternalSymbolName(s, name); - return ts.createExportSpecifier(name === localName ? undefined : localName, name); + var aliasDecl = s.declarations && getDeclarationOfAliasSymbol(s); + var target = aliasDecl && getTargetOfAliasDeclaration(aliasDecl, /*dontRecursivelyResolve*/ true); + includePrivateSymbol(target || s); + var targetName = target ? getInternalSymbolName(target, ts.unescapeLeadingUnderscores(target.escapedName)) : localName; + return ts.createExportSpecifier(name === targetName ? undefined : targetName, name); })))]); addResult(ts.createModuleDeclaration( /*decorators*/ undefined, @@ -37839,7 +38100,11 @@ var ts; case 254 /* ImportClause */: addResult(ts.createImportDeclaration( /*decorators*/ undefined, - /*modifiers*/ undefined, ts.createImportClause(ts.createIdentifier(localName), /*namedBindings*/ undefined), ts.createLiteral(getSpecifierForModuleSymbol(target.parent, context))), 0 /* None */); + /*modifiers*/ undefined, ts.createImportClause(ts.createIdentifier(localName), /*namedBindings*/ undefined), + // We use `target.parent || target` below as `target.parent` is unset when the target is a module which has been export assigned + // And then made into a default by the `esModuleInterop` or `allowSyntheticDefaultImports` flag + // In such cases, the `target` refers to the module itself already + ts.createLiteral(getSpecifierForModuleSymbol(target.parent || target, context))), 0 /* None */); break; case 255 /* NamespaceImport */: addResult(ts.createImportDeclaration( @@ -37851,7 +38116,7 @@ var ts; /*decorators*/ undefined, /*modifiers*/ undefined, ts.createImportClause(/*importClause*/ undefined, ts.createNamedImports([ ts.createImportSpecifier(localName !== verbatimTargetName ? ts.createIdentifier(verbatimTargetName) : undefined, ts.createIdentifier(localName)) - ])), ts.createLiteral(getSpecifierForModuleSymbol(target.parent, context))), 0 /* None */); + ])), ts.createLiteral(getSpecifierForModuleSymbol(target.parent || target, context))), 0 /* None */); break; case 261 /* ExportSpecifier */: // does not use localName because the symbol name in this case refers to the name in the exports table, @@ -37865,6 +38130,7 @@ var ts; serializeMaybeAliasAssignment(symbol); break; case 208 /* BinaryExpression */: + case 193 /* PropertyAccessExpression */: // Could be best encoded as though an export specifier or as though an export assignment // If name is default or export=, do an export assignment // Otherwise do an export specifier @@ -37875,10 +38141,6 @@ var ts; serializeExportSpecifier(localName, targetName); } break; - case 193 /* PropertyAccessExpression */: - // A PAE alias is _always_ going to exist as an append to a top-level export, where our top level - // handling should always be sufficient to encode the export action itself - break; default: return ts.Debug.failBadSyntaxKind(node, "Unhandled alias declaration kind in symbol serializer!"); } @@ -37902,7 +38164,8 @@ var ts; var aliasDecl = symbol.declarations && getDeclarationOfAliasSymbol(symbol); // serialize what the alias points to, preserve the declaration's initializer var target = aliasDecl && getTargetOfAliasDeclaration(aliasDecl, /*dontRecursivelyResolve*/ true); - if (target) { + // If the target resolves and resolves to a thing defined in this file, emit as an alias, otherwise emit as a const + if (target && ts.length(target.declarations) && ts.some(target.declarations, function (d) { return ts.getSourceFileOfNode(d) === ts.getSourceFileOfNode(enclosingDeclaration); })) { // In case `target` refers to a namespace member, look at the declaration and serialize the leftmost symbol in it // eg, `namespace A { export class B {} }; exports = A.B;` // Technically, this is all that's required in the case where the assignment is an entity name expression @@ -37977,6 +38240,7 @@ var ts; return ts.getObjectFlags(typeToSerialize) & (16 /* Anonymous */ | 32 /* Mapped */) && !getIndexInfoOfType(typeToSerialize, 0 /* String */) && !getIndexInfoOfType(typeToSerialize, 1 /* Number */) && + !!(ts.length(getPropertiesOfType(typeToSerialize)) || ts.length(getSignaturesOfType(typeToSerialize, 0 /* Call */))) && !ts.length(getSignaturesOfType(typeToSerialize, 1 /* Construct */)) && // TODO: could probably serialize as function + ns + class, now that that's OK !getDeclarationWithTypeAnnotation(hostSymbol) && !(typeToSerialize.symbol && ts.some(typeToSerialize.symbol.declarations, function (d) { return ts.getSourceFileOfNode(d) !== ctxSrc; })) && @@ -38120,7 +38384,7 @@ var ts; return ts.updateImportTypeNode(node, ts.updateLiteralTypeNode(node.argument, rewriteModuleSpecifier(node, node.argument.literal)), node.qualifier, ts.visitNodes(node.typeArguments, visitExistingNodeTreeSymbols, ts.isTypeNode), node.isTypeOf); } if (ts.isEntityName(node) || ts.isEntityNameExpression(node)) { - var leftmost = getFirstIdentifier(node); + var leftmost = ts.getFirstIdentifier(node); var sym = resolveEntityName(leftmost, 67108863 /* All */, /*ignoreErrors*/ true, /*dontResolveALias*/ true); if (sym) { includePrivateSymbol(sym); @@ -38250,11 +38514,8 @@ var ts; return context.remappedSymbolNames.get("" + getSymbolId(symbol)); } } - if (input === "default" /* Default */) { - input = "_default"; - } - else if (input === "export=" /* ExportEquals */) { - input = "_exports"; + if (symbol) { + input = getNameCandidateWorker(symbol, input); } var i = 0; var original = input; @@ -38268,17 +38529,28 @@ var ts; } return input; } - function getInternalSymbolName(symbol, localName) { - if (context.remappedSymbolNames.has("" + getSymbolId(symbol))) { - return context.remappedSymbolNames.get("" + getSymbolId(symbol)); - } + function getNameCandidateWorker(symbol, localName) { if (localName === "default" /* Default */ || localName === "__class" /* Class */ || localName === "__function" /* Function */) { var flags = context.flags; context.flags |= 16777216 /* InInitialEntityName */; var nameCandidate = getNameOfSymbolAsWritten(symbol, context); context.flags = flags; - localName = ts.isIdentifierText(nameCandidate, languageVersion) && !ts.isStringANonContextualKeyword(nameCandidate) ? nameCandidate : getUnusedName("_default", symbol); + localName = nameCandidate.length > 0 && ts.isSingleOrDoubleQuote(nameCandidate.charCodeAt(0)) ? ts.stripQuotes(nameCandidate) : nameCandidate; } + if (localName === "default" /* Default */) { + localName = "_default"; + } + else if (localName === "export=" /* ExportEquals */) { + localName = "_exports"; + } + localName = ts.isIdentifierText(localName, languageVersion) && !ts.isStringANonContextualKeyword(localName) ? localName : "_" + localName.replace(/[^a-zA-Z0-9]/g, "_"); + return localName; + } + function getInternalSymbolName(symbol, localName) { + if (context.remappedSymbolNames.has("" + getSymbolId(symbol))) { + return context.remappedSymbolNames.get("" + getSymbolId(symbol)); + } + localName = getNameCandidateWorker(symbol, localName); // The result of this is going to be used as the symbol's name - lock it in, so `getUnusedName` will also pick it up context.remappedSymbolNames.set("" + getSymbolId(symbol), localName); return localName; @@ -38543,7 +38815,7 @@ var ts; if (ts.isInternalModuleImportEqualsDeclaration(declaration)) { // Add the referenced top container visible var internalModuleReference = declaration.moduleReference; - var firstIdentifier = getFirstIdentifier(internalModuleReference); + var firstIdentifier = ts.getFirstIdentifier(internalModuleReference); var importSymbol = resolveName(declaration, firstIdentifier.escapedText, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, undefined, undefined, /*isUse*/ false); var id = importSymbol && "" + getSymbolId(importSymbol); if (importSymbol && !visited.has(id)) { @@ -38607,6 +38879,8 @@ var ts; return !!target.immediateBaseConstraint; case 6 /* JSDocTypeReference */: return !!getSymbolLinks(target).resolvedJSDocType; + case 7 /* ResolvedTypeArguments */: + return !!target.resolvedTypeArguments; } return ts.Debug.assertNever(propertyName); } @@ -38692,7 +38966,9 @@ var ts; } var stringIndexInfo = getIndexInfoOfType(source, 0 /* String */); var numberIndexInfo = getIndexInfoOfType(source, 1 /* Number */); - return createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, stringIndexInfo, numberIndexInfo); + var result = createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, stringIndexInfo, numberIndexInfo); + result.objectFlags |= 131072 /* ObjectRestType */; + return result; } // Determine the control flow type associated with a destructuring declaration or assignment. The following // forms of destructuring are possible: @@ -39078,23 +39354,23 @@ var ts; kind === 2 /* ModuleExports */ && symbol.escapedName === "export=" /* ExportEquals */) { var exportedType_1 = resolveStructuredTypeMembers(type); - var members_3 = ts.createSymbolTable(); - ts.copyEntries(exportedType_1.members, members_3); + var members_4 = ts.createSymbolTable(); + ts.copyEntries(exportedType_1.members, members_4); if (resolvedSymbol && !resolvedSymbol.exports) { resolvedSymbol.exports = ts.createSymbolTable(); } (resolvedSymbol || symbol).exports.forEach(function (s, name) { - if (members_3.has(name)) { + if (members_4.has(name)) { var exportedMember = exportedType_1.members.get(name); var union = createSymbol(s.flags | exportedMember.flags, name); union.type = getUnionType([getTypeOfSymbol(s), getTypeOfSymbol(exportedMember)]); - members_3.set(name, union); + members_4.set(name, union); } else { - members_3.set(name, s); + members_4.set(name, s); } }); - var result = createAnonymousType(exportedType_1.symbol, members_3, exportedType_1.callSignatures, exportedType_1.constructSignatures, exportedType_1.stringIndexInfo, exportedType_1.numberIndexInfo); + var result = createAnonymousType(exportedType_1.symbol, members_4, exportedType_1.callSignatures, exportedType_1.constructSignatures, exportedType_1.stringIndexInfo, exportedType_1.numberIndexInfo); result.objectFlags |= (ts.getObjectFlags(type) & 16384 /* JSLiteral */); // Propagate JSLiteral flag return result; } @@ -39154,7 +39430,7 @@ var ts; function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) { var members = ts.createSymbolTable(); var stringIndexInfo; - var objectFlags = 128 /* ObjectLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */; + var objectFlags = 128 /* ObjectLiteral */ | 1048576 /* ContainsObjectOrArrayLiteral */; ts.forEach(pattern.elements, function (e) { var name = e.propertyName || e.name; if (e.dotDotDotToken) { @@ -39294,16 +39570,12 @@ var ts; if (!declaration.statements.length) { return emptyObjectType; } - var type_1 = getWidenedLiteralType(checkExpression(declaration.statements[0].expression)); - if (type_1.flags & 524288 /* Object */) { - return getRegularTypeOfObjectLiteral(type_1); - } - return type_1; + return getWidenedType(getWidenedLiteralType(checkExpression(declaration.statements[0].expression))); } // Handle variable, parameter or property if (!pushTypeResolution(symbol, 0 /* Type */)) { // Symbol is property of some kind that is merged with something - should use `getTypeOfFuncClassEnumModule` and not `getTypeOfVariableOrParameterOrProperty` - if (symbol.flags & 512 /* ValueModule */) { + if (symbol.flags & 512 /* ValueModule */ && !(symbol.flags & 67108864 /* Assignment */)) { return getTypeOfFuncClassEnumModule(symbol); } return reportCircularityError(symbol); @@ -39371,7 +39643,7 @@ var ts; } if (!popTypeResolution()) { // Symbol is property of some kind that is merged with something - should use `getTypeOfFuncClassEnumModule` and not `getTypeOfVariableOrParameterOrProperty` - if (symbol.flags & 512 /* ValueModule */) { + if (symbol.flags & 512 /* ValueModule */ && !(symbol.flags & 67108864 /* Assignment */)) { return getTypeOfFuncClassEnumModule(symbol); } return reportCircularityError(symbol); @@ -39454,7 +39726,9 @@ var ts; } else { ts.Debug.assert(!!getter, "there must exist a getter as we are current checking either setter or getter in this function"); - errorOrSuggestion(noImplicitAny, getter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation, symbolToString(symbol)); + if (!isPrivateWithinAmbient(getter)) { + errorOrSuggestion(noImplicitAny, getter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation, symbolToString(symbol)); + } } return anyType; } @@ -39500,11 +39774,11 @@ var ts; return errorType; } var exportEquals = getMergedSymbol(symbol.exports.get("export=" /* ExportEquals */)); - var type_2 = getWidenedTypeForAssignmentDeclaration(exportEquals, exportEquals === resolvedModule ? undefined : resolvedModule); + var type_1 = getWidenedTypeForAssignmentDeclaration(exportEquals, exportEquals === resolvedModule ? undefined : resolvedModule); if (!popTypeResolution()) { return reportCircularityError(symbol); } - return type_2; + return type_1; } } var type = createObjectType(16 /* Anonymous */, symbol); @@ -39690,6 +39964,7 @@ var ts; // The outer type parameters are those defined by enclosing generic classes, methods, or functions. function getOuterTypeParametersOfClassOrInterface(symbol) { var declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 245 /* InterfaceDeclaration */); + ts.Debug.assert(!!declaration, "Class was missing valueDeclaration -OR- non-class had no interface declarations"); return getOuterTypeParameters(declaration); } // The local type parameters are the combined set of type parameters from all declarations of the class, @@ -39720,7 +39995,7 @@ var ts; var signatures = getSignaturesOfType(type, 1 /* Construct */); if (signatures.length === 1) { var s = signatures[0]; - return !s.typeParameters && s.parameters.length === 1 && s.hasRestParameter && getElementTypeOfArrayType(getTypeOfParameter(s.parameters[0])) === anyType; + return !s.typeParameters && s.parameters.length === 1 && signatureHasRestParameter(s) && getElementTypeOfArrayType(getTypeOfParameter(s.parameters[0])) === anyType; } return false; } @@ -40427,8 +40702,8 @@ var ts; var decl = _a[_i]; var members = ts.getMembersOfDeclaration(decl); if (members) { - for (var _b = 0, members_4 = members; _b < members_4.length; _b++) { - var member = members_4[_b]; + for (var _b = 0, members_5 = members; _b < members_5.length; _b++) { + var member = members_5[_b]; if (isStatic === ts.hasStaticModifier(member) && hasLateBindableName(member)) { lateBindMember(symbol, earlySymbols, lateSymbols, member); } @@ -40557,8 +40832,8 @@ var ts; var paddedTypeArguments = typeArguments.length === typeParameters.length ? typeArguments : ts.concatenate(typeArguments, [type]); resolveObjectTypeMembers(type, source, typeParameters, paddedTypeArguments); } - function createSignature(declaration, typeParameters, thisParameter, parameters, resolvedReturnType, resolvedTypePredicate, minArgumentCount, hasRestParameter, hasLiteralTypes) { - var sig = new Signature(checker); + function createSignature(declaration, typeParameters, thisParameter, parameters, resolvedReturnType, resolvedTypePredicate, minArgumentCount, flags) { + var sig = new Signature(checker, flags); sig.declaration = declaration; sig.typeParameters = typeParameters; sig.parameters = parameters; @@ -40566,15 +40841,13 @@ var ts; sig.resolvedReturnType = resolvedReturnType; sig.resolvedTypePredicate = resolvedTypePredicate; sig.minArgumentCount = minArgumentCount; - sig.hasRestParameter = hasRestParameter; - sig.hasLiteralTypes = hasLiteralTypes; sig.target = undefined; sig.mapper = undefined; return sig; } function cloneSignature(sig) { var result = createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, /*resolvedReturnType*/ undefined, - /*resolvedTypePredicate*/ undefined, sig.minArgumentCount, sig.hasRestParameter, sig.hasLiteralTypes); + /*resolvedTypePredicate*/ undefined, sig.minArgumentCount, sig.flags & 3 /* PropagatingFlags */); result.target = sig.target; result.mapper = sig.mapper; return result; @@ -40586,13 +40859,25 @@ var ts; result.mapper = undefined; return result; } - function createOptionalCallSignature(signature) { + function getOptionalCallSignature(signature, callChainFlags) { + if ((signature.flags & 12 /* CallChainFlags */) === callChainFlags) { + return signature; + } + if (!signature.optionalCallSignatureCache) { + signature.optionalCallSignatureCache = {}; + } + var key = callChainFlags === 4 /* IsInnerCallChain */ ? "inner" : "outer"; + return signature.optionalCallSignatureCache[key] + || (signature.optionalCallSignatureCache[key] = createOptionalCallSignature(signature, callChainFlags)); + } + function createOptionalCallSignature(signature, callChainFlags) { + ts.Debug.assert(callChainFlags === 4 /* IsInnerCallChain */ || callChainFlags === 8 /* IsOuterCallChain */, "An optional call signature can either be for an inner call chain or an outer call chain, but not both."); var result = cloneSignature(signature); - result.isOptionalCall = true; + result.flags |= callChainFlags; return result; } function getExpandedParameters(sig) { - if (sig.hasRestParameter) { + if (signatureHasRestParameter(sig)) { var restIndex_1 = sig.parameters.length - 1; var restParameter = sig.parameters[restIndex_1]; var restType = getTypeOfSymbol(restParameter); @@ -40617,7 +40902,7 @@ var ts; var baseConstructorType = getBaseConstructorTypeOfClass(classType); var baseSignatures = getSignaturesOfType(baseConstructorType, 1 /* Construct */); if (baseSignatures.length === 0) { - return [createSignature(undefined, classType.localTypeParameters, undefined, ts.emptyArray, classType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false)]; + return [createSignature(undefined, classType.localTypeParameters, undefined, ts.emptyArray, classType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */)]; } var baseTypeNode = getBaseTypeNodeOfClass(classType); var isJavaScript = ts.isInJSFile(baseTypeNode); @@ -40781,11 +41066,9 @@ var ts; var params = combineUnionParameters(left, right); var thisParam = combineUnionThisParam(left.thisParameter, right.thisParameter); var minArgCount = Math.max(left.minArgumentCount, right.minArgumentCount); - var hasRestParam = left.hasRestParameter || right.hasRestParameter; - var hasLiteralTypes = left.hasLiteralTypes || right.hasLiteralTypes; var result = createSignature(declaration, left.typeParameters || right.typeParameters, thisParam, params, /*resolvedReturnType*/ undefined, - /*resolvedTypePredicate*/ undefined, minArgCount, hasRestParam, hasLiteralTypes); + /*resolvedTypePredicate*/ undefined, minArgCount, (left.flags | right.flags) & 3 /* PropagatingFlags */); result.unionSignatures = ts.concatenate(left.unionSignatures || [left], [right]); return result; } @@ -40958,7 +41241,7 @@ var ts; var constructSignatures = symbol.members ? getSignaturesOfSymbol(symbol.members.get("__constructor" /* Constructor */)) : ts.emptyArray; if (symbol.flags & 16 /* Function */) { constructSignatures = ts.addRange(constructSignatures.slice(), ts.mapDefined(type.callSignatures, function (sig) { return isJSConstructor(sig.declaration) ? - createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, classType_1, /*resolvedTypePredicate*/ undefined, sig.minArgumentCount, sig.hasRestParameter, sig.hasLiteralTypes) : + createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, classType_1, /*resolvedTypePredicate*/ undefined, sig.minArgumentCount, sig.flags & 3 /* PropagatingFlags */) : undefined; })); } if (!constructSignatures.length) { @@ -41464,8 +41747,8 @@ var ts; var types = t.types; var baseTypes = []; for (var _i = 0, types_6 = types; _i < types_6.length; _i++) { - var type_3 = types_6[_i]; - var baseType = getBaseConstraint(type_3); + var type_2 = types_6[_i]; + var baseType = getBaseConstraint(type_2); if (baseType) { baseTypes.push(baseType); } @@ -41898,7 +42181,7 @@ var ts; var links = getNodeLinks(declaration); if (!links.resolvedSignature) { var parameters = []; - var hasLiteralTypes = false; + var flags = 0 /* None */; var minArgumentCount = 0; var thisParameter = void 0; var hasThisParameter = false; @@ -41929,7 +42212,7 @@ var ts; parameters.push(paramSymbol); } if (type && type.kind === 186 /* LiteralType */) { - hasLiteralTypes = true; + flags |= 2 /* HasLiteralTypes */; } // Record a new minimum argument count if this is not an optional parameter var isOptionalParameter_1 = isOptionalJSDocParameterTag(param) || @@ -41955,9 +42238,11 @@ var ts; getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : undefined; var typeParameters = classType ? classType.localTypeParameters : getTypeParametersFromDeclaration(declaration); - var hasRestLikeParameter = ts.hasRestParameter(declaration) || ts.isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters); + if (ts.hasRestParameter(declaration) || ts.isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters)) { + flags |= 1 /* HasRestParameter */; + } links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, - /*resolvedReturnType*/ undefined, /*resolvedTypePredicate*/ undefined, minArgumentCount, hasRestLikeParameter, hasLiteralTypes); + /*resolvedReturnType*/ undefined, /*resolvedTypePredicate*/ undefined, minArgumentCount, flags); } return links.resolvedSignature; } @@ -42100,8 +42385,11 @@ var ts; signature.unionSignatures ? getUnionType(ts.map(signature.unionSignatures, getReturnTypeOfSignature), 2 /* Subtype */) : getReturnTypeFromAnnotation(signature.declaration) || (ts.nodeIsMissing(signature.declaration.body) ? anyType : getReturnTypeFromBody(signature.declaration)); - if (signature.isOptionalCall) { - type = propagateOptionalTypeMarker(type, /*wasOptional*/ true); + if (signature.flags & 4 /* IsInnerCallChain */) { + type = addOptionalTypeMarker(type); + } + else if (signature.flags & 8 /* IsOuterCallChain */) { + type = getOptionalType(type); } if (!popTypeResolution()) { if (signature.declaration) { @@ -42157,7 +42445,7 @@ var ts; return tryGetRestTypeOfSignature(signature) || anyType; } function tryGetRestTypeOfSignature(signature) { - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var sigRestType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); var restType = isTupleType(sigRestType) ? getRestTypeOfTupleType(sigRestType) : sigRestType; return restType && getIndexTypeOfType(restType, 1 /* Number */); @@ -42374,7 +42662,7 @@ var ts; result |= ts.getObjectFlags(type); } } - return result & 1835008 /* PropagatingFlags */; + return result & 3670016 /* PropagatingFlags */; } function createTypeReference(target, typeArguments) { var id = getTypeListId(typeArguments); @@ -42408,13 +42696,25 @@ var ts; return type; } function getTypeArguments(type) { + var _a, _b; if (!type.resolvedTypeArguments) { + if (!pushTypeResolution(type, 7 /* ResolvedTypeArguments */)) { + return ((_a = type.target.localTypeParameters) === null || _a === void 0 ? void 0 : _a.map(function () { return errorType; })) || ts.emptyArray; + } var node = type.node; var typeArguments = !node ? ts.emptyArray : node.kind === 168 /* TypeReference */ ? ts.concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments(node, type.target.localTypeParameters)) : node.kind === 173 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : ts.map(node.elementTypes, getTypeFromTypeNode); - type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments; + if (popTypeResolution()) { + type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments; + } + else { + type.resolvedTypeArguments = ((_b = type.target.localTypeParameters) === null || _b === void 0 ? void 0 : _b.map(function () { return errorType; })) || ts.emptyArray; + error(type.node || currentNode, type.target.symbol + ? ts.Diagnostics.Type_arguments_for_0_circularly_reference_themselves + : ts.Diagnostics.Tuple_type_arguments_circularly_reference_themselves, type.target.symbol && symbolToString(type.target.symbol)); + } } return type.resolvedTypeArguments; } @@ -42531,7 +42831,7 @@ var ts; errorType; } if (symbol.flags & 111551 /* Value */ && isJSDocTypeReference(node)) { - var jsdocType = getTypeFromJSAlias(node, symbol); + var jsdocType = getTypeFromJSDocValueReference(node, symbol); if (jsdocType) { return jsdocType; } @@ -42544,18 +42844,30 @@ var ts; return errorType; } /** - * A JSdoc TypeReference may be to a value imported from commonjs. - * These should really be aliases, but this special-case code fakes alias resolution - * by producing a type from a value. + * A JSdoc TypeReference may be to a value, but resolve it as a type anyway. + * Note: If the value is imported from commonjs, it should really be an alias, + * but this function's special-case code fakes alias resolution as well. */ - function getTypeFromJSAlias(node, symbol) { + function getTypeFromJSDocValueReference(node, symbol) { var valueType = getTypeOfSymbol(symbol); - var typeType = valueType.symbol && - valueType.symbol !== symbol && // Make sure this is a commonjs export by checking that symbol -> type -> symbol doesn't roundtrip. - getTypeReferenceType(node, valueType.symbol); - if (typeType) { - return getSymbolLinks(symbol).resolvedJSDocType = typeType; + var typeType = valueType; + if (symbol.valueDeclaration) { + var decl = ts.getRootDeclaration(symbol.valueDeclaration); + var isRequireAlias = false; + if (ts.isVariableDeclaration(decl) && decl.initializer) { + var expr = decl.initializer; + // skip past entity names, eg `require("x").a.b.c` + while (ts.isPropertyAccessExpression(expr)) { + expr = expr.expression; + } + isRequireAlias = ts.isCallExpression(expr) && ts.isRequireCall(expr, /*requireStringLiteralLikeArgument*/ true) && !!valueType.symbol; + } + var isImportTypeWithQualifier = node.kind === 187 /* ImportType */ && node.qualifier; + if (isRequireAlias || isImportTypeWithQualifier) { + typeType = getTypeReferenceType(node, valueType.symbol); + } } + return getSymbolLinks(symbol).resolvedJSDocType = typeType; } function getSubstitutionType(typeVariable, substitute) { if (substitute.flags & 3 /* AnyOrUnknown */ || substitute === typeVariable) { @@ -42984,7 +43296,7 @@ var ts; if (type === wildcardType) includes |= 4194304 /* IncludesWildcard */; if (!strictNullChecks && flags & 98304 /* Nullable */) { - if (!(ts.getObjectFlags(type) & 262144 /* ContainsWideningType */)) + if (!(ts.getObjectFlags(type) & 524288 /* ContainsWideningType */)) includes |= 2097152 /* IncludesNonWideningType */; } else { @@ -43111,7 +43423,7 @@ var ts; neverType; } } - return getUnionTypeFromSortedList(typeSet, includes & 66994211 /* NotPrimitiveUnion */ ? 0 : 131072 /* PrimitiveUnion */, aliasSymbol, aliasTypeArguments); + return getUnionTypeFromSortedList(typeSet, includes & 66994211 /* NotPrimitiveUnion */ ? 0 : 262144 /* PrimitiveUnion */, aliasSymbol, aliasTypeArguments); } function getUnionTypePredicate(signatures) { var first; @@ -43261,7 +43573,7 @@ var ts; // other unions and return true. Otherwise, do nothing and return false. function intersectUnionsOfPrimitiveTypes(types) { var unionTypes; - var index = ts.findIndex(types, function (t) { return !!(ts.getObjectFlags(t) & 131072 /* PrimitiveUnion */); }); + var index = ts.findIndex(types, function (t) { return !!(ts.getObjectFlags(t) & 262144 /* PrimitiveUnion */); }); if (index < 0) { return false; } @@ -43270,7 +43582,7 @@ var ts; // the unionTypes array. while (i < types.length) { var t = types[i]; - if (ts.getObjectFlags(t) & 131072 /* PrimitiveUnion */) { + if (ts.getObjectFlags(t) & 262144 /* PrimitiveUnion */) { (unionTypes || (unionTypes = [types[index]])).push(t); ts.orderedRemoveItemAt(types, i); } @@ -43299,7 +43611,7 @@ var ts; } } // Finally replace the first union with the result - types[index] = getUnionTypeFromSortedList(result, 131072 /* PrimitiveUnion */); + types[index] = getUnionTypeFromSortedList(result, 262144 /* PrimitiveUnion */); return true; } function createIntersectionType(types, aliasSymbol, aliasTypeArguments) { @@ -44096,7 +44408,7 @@ var ts; } function getAliasSymbolForTypeNode(node) { var host = node.parent; - while (ts.isParenthesizedTypeNode(host)) { + while (ts.isParenthesizedTypeNode(host) || ts.isTypeOperatorNode(host) && host.operator === 137 /* ReadonlyKeyword */) { host = host.parent; } return ts.isTypeAlias(host) ? getSymbolOfNode(host) : undefined; @@ -44197,7 +44509,7 @@ var ts; } } var spread = createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, getIndexInfoWithReadonly(stringIndexInfo, readonly), getIndexInfoWithReadonly(numberIndexInfo, readonly)); - spread.objectFlags |= 128 /* ObjectLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */ | 1024 /* ContainsSpread */ | objectFlags; + spread.objectFlags |= 128 /* ObjectLiteral */ | 1048576 /* ContainsObjectOrArrayLiteral */ | 1024 /* ContainsSpread */ | objectFlags; return spread; } /** We approximate own properties as non-methods plus methods that are inside the object literal */ @@ -44511,7 +44823,7 @@ var ts; // See GH#17600. var result = createSignature(signature.declaration, freshTypeParameters, signature.thisParameter && instantiateSymbol(signature.thisParameter, mapper), instantiateList(signature.parameters, mapper, instantiateSymbol), /*resolvedReturnType*/ undefined, - /*resolvedTypePredicate*/ undefined, signature.minArgumentCount, signature.hasRestParameter, signature.hasLiteralTypes); + /*resolvedTypePredicate*/ undefined, signature.minArgumentCount, signature.flags & 3 /* PropagatingFlags */); result.target = signature; result.mapper = mapper; return result; @@ -45392,20 +45704,20 @@ var ts; } function isSignatureAssignableTo(source, target, ignoreReturnTypes) { return compareSignaturesRelated(source, target, 0 /* None */, ignoreReturnTypes, /*reportErrors*/ false, - /*errorReporter*/ undefined, /*errorReporter*/ undefined, compareTypesAssignable) !== 0 /* False */; + /*errorReporter*/ undefined, /*errorReporter*/ undefined, compareTypesAssignable, /*reportUnreliableMarkers*/ undefined) !== 0 /* False */; } /** * Returns true if `s` is `(...args: any[]) => any` or `(this: any, ...args: any[]) => any` */ function isAnySignature(s) { return !s.typeParameters && (!s.thisParameter || isTypeAny(getTypeOfParameter(s.thisParameter))) && s.parameters.length === 1 && - s.hasRestParameter && (getTypeOfParameter(s.parameters[0]) === anyArrayType || isTypeAny(getTypeOfParameter(s.parameters[0]))) && + signatureHasRestParameter(s) && (getTypeOfParameter(s.parameters[0]) === anyArrayType || isTypeAny(getTypeOfParameter(s.parameters[0]))) && isTypeAny(getReturnTypeOfSignature(s)); } /** * See signatureRelatedTo, compareSignaturesIdentical */ - function compareSignaturesRelated(source, target, callbackCheck, ignoreReturnTypes, reportErrors, errorReporter, incompatibleErrorReporter, compareTypes) { + function compareSignaturesRelated(source, target, callbackCheck, ignoreReturnTypes, reportErrors, errorReporter, incompatibleErrorReporter, compareTypes, reportUnreliableMarkers) { // TODO (drosen): De-duplicate code between related functions. if (source === target) { return -1 /* True */; @@ -45424,6 +45736,9 @@ var ts; var sourceCount = getParameterCount(source); var sourceRestType = getNonArrayRestType(source); var targetRestType = getNonArrayRestType(target); + if (sourceRestType || targetRestType) { + void instantiateType(sourceRestType || targetRestType, reportUnreliableMarkers); + } if (sourceRestType && targetRestType && sourceCount !== targetCount) { // We're not able to relate misaligned complex rest parameters return 0 /* False */; @@ -45467,7 +45782,7 @@ var ts; (getFalsyFlags(sourceType) & 98304 /* Nullable */) === (getFalsyFlags(targetType) & 98304 /* Nullable */); var related = callbacks ? // TODO: GH#18217 It will work if they're both `undefined`, but not if only one is - compareSignaturesRelated(targetSig, sourceSig, strictVariance ? 2 /* Strict */ : 1 /* Bivariant */, /*ignoreReturnTypes*/ false, reportErrors, errorReporter, incompatibleErrorReporter, compareTypes) : + compareSignaturesRelated(targetSig, sourceSig, strictVariance ? 2 /* Strict */ : 1 /* Bivariant */, /*ignoreReturnTypes*/ false, reportErrors, errorReporter, incompatibleErrorReporter, compareTypes, reportUnreliableMarkers) : !callbackCheck && !strictVariance && compareTypes(sourceType, targetType, /*reportErrors*/ false) || compareTypes(targetType, sourceType, reportErrors); if (!related) { if (reportErrors) { @@ -45481,13 +45796,13 @@ var ts; // If a signature resolution is already in-flight, skip issuing a circularity error // here and just use the `any` type directly var targetReturnType = isResolvingReturnTypeOfSignature(target) ? anyType - : target.declaration && isJSConstructor(target.declaration) ? getDeclaredTypeOfClassOrInterface(target.declaration.symbol) + : target.declaration && isJSConstructor(target.declaration) ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(target.declaration.symbol)) : getReturnTypeOfSignature(target); if (targetReturnType === voidType) { return result; } var sourceReturnType = isResolvingReturnTypeOfSignature(source) ? anyType - : source.declaration && isJSConstructor(source.declaration) ? getDeclaredTypeOfClassOrInterface(source.declaration.symbol) + : source.declaration && isJSConstructor(source.declaration) ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(source.declaration.symbol)) : getReturnTypeOfSignature(source); // The following block preserves behavior forbidding boolean returning functions from being assignable to type guard returning functions var targetTypePredicate = getTypePredicateOfSignature(target); @@ -45674,7 +45989,7 @@ var ts; return true; } if (source.flags & 524288 /* Object */ && target.flags & 524288 /* Object */) { - var related = relation.get(getRelationKey(source, target, relation)); + var related = relation.get(getRelationKey(source, target, /*isIntersectionConstituent*/ false, relation)); if (related !== undefined) { return !!(related & 1 /* Succeeded */); } @@ -46045,7 +46360,7 @@ var ts; // and we need to handle "each" relations before "some" relations for the same kind of type. if (source.flags & 1048576 /* Union */) { result = relation === comparableRelation ? - someTypeRelatedToType(source, target, reportErrors && !(source.flags & 131068 /* Primitive */), isIntersectionConstituent) : + someTypeRelatedToType(source, target, reportErrors && !(source.flags & 131068 /* Primitive */)) : eachTypeRelatedToType(source, target, reportErrors && !(source.flags & 131068 /* Primitive */)); } else { @@ -46083,7 +46398,7 @@ var ts; // // - For a primitive type or type parameter (such as 'number = A & B') there is no point in // breaking the intersection apart. - result = someTypeRelatedToType(source, target, /*reportErrors*/ false, /*isIntersectionConstituent*/ true); + result = someTypeRelatedToType(source, target, /*reportErrors*/ false); } if (!result && (source.flags & 66846720 /* StructuredOrInstantiable */ || target.flags & 66846720 /* StructuredOrInstantiable */)) { if (result = recursiveTypeRelatedTo(source, target, reportErrors, isIntersectionConstituent)) { @@ -46196,7 +46511,7 @@ var ts; // JsxAttributes has an object-literal flag and undergo same type-assignablity check as normal object-literal. // However, using an object-literal error message will be very confusing to the users so we give different a message. // TODO: Spelling suggestions for excess jsx attributes (needs new diagnostic messages) - if (prop.valueDeclaration && ts.isJsxAttribute(prop.valueDeclaration)) { + if (prop.valueDeclaration && ts.isJsxAttribute(prop.valueDeclaration) && ts.getSourceFileOfNode(errorNode) === ts.getSourceFileOfNode(prop.valueDeclaration.name)) { // Note that extraneous children (as in `extra`) don't pass this check, // since `children` is a SyntaxKind.PropertySignature instead of a SyntaxKind.JsxAttribute. errorNode = prop.valueDeclaration.name; @@ -46207,7 +46522,7 @@ var ts; // use the property's value declaration if the property is assigned inside the literal itself var objectLiteralDeclaration_1 = source.symbol && ts.firstOrUndefined(source.symbol.declarations); var suggestion = void 0; - if (prop.valueDeclaration && ts.findAncestor(prop.valueDeclaration, function (d) { return d === objectLiteralDeclaration_1; })) { + if (prop.valueDeclaration && ts.findAncestor(prop.valueDeclaration, function (d) { return d === objectLiteralDeclaration_1; }) && ts.getSourceFileOfNode(objectLiteralDeclaration_1) === ts.getSourceFileOfNode(errorNode)) { var propDeclaration = prop.valueDeclaration; ts.Debug.assertNode(propDeclaration, ts.isObjectLiteralElementLike); errorNode = propDeclaration; @@ -46367,14 +46682,14 @@ var ts; } return result; } - function someTypeRelatedToType(source, target, reportErrors, isIntersectionConstituent) { + function someTypeRelatedToType(source, target, reportErrors) { var sourceTypes = source.types; if (source.flags & 1048576 /* Union */ && containsType(sourceTypes, target)) { return -1 /* True */; } var len = sourceTypes.length; for (var i = 0; i < len; i++) { - var related = isRelatedTo(sourceTypes[i], target, reportErrors && i === len - 1, /*headMessage*/ undefined, isIntersectionConstituent); + var related = isRelatedTo(sourceTypes[i], target, reportErrors && i === len - 1); if (related) { return related; } @@ -46462,7 +46777,7 @@ var ts; if (overflow) { return 0 /* False */; } - var id = getRelationKey(source, target, relation); + var id = getRelationKey(source, target, isIntersectionConstituent, relation); var entry = relation.get(id); if (entry !== undefined) { if (reportErrors && entry & 2 /* Failed */ && !(entry & 4 /* Reported */)) { @@ -47356,7 +47671,7 @@ var ts; * See signatureAssignableTo, compareSignaturesIdentical */ function signatureRelatedTo(source, target, erase, reportErrors, incompatibleReporter) { - return compareSignaturesRelated(erase ? getErasedSignature(source) : source, erase ? getErasedSignature(target) : target, 0 /* None */, /*ignoreReturnTypes*/ false, reportErrors, reportError, incompatibleReporter, isRelatedTo); + return compareSignaturesRelated(erase ? getErasedSignature(source) : source, erase ? getErasedSignature(target) : target, 0 /* None */, /*ignoreReturnTypes*/ false, reportErrors, reportError, incompatibleReporter, isRelatedTo, reportUnreliableMarkers); } function signaturesIdenticalTo(source, target, kind) { var sourceSignatures = getSignaturesOfType(source, kind); @@ -47648,17 +47963,18 @@ var ts; * To improve caching, the relation key for two generic types uses the target's id plus ids of the type parameters. * For other cases, the types ids are used. */ - function getRelationKey(source, target, relation) { + function getRelationKey(source, target, isIntersectionConstituent, relation) { if (relation === identityRelation && source.id > target.id) { var temp = source; source = target; target = temp; } + var intersection = isIntersectionConstituent ? "&" : ""; if (isTypeReferenceWithGenericArguments(source) && isTypeReferenceWithGenericArguments(target)) { var typeParameters = []; - return getTypeReferenceId(source, typeParameters) + "," + getTypeReferenceId(target, typeParameters); + return getTypeReferenceId(source, typeParameters) + "," + getTypeReferenceId(target, typeParameters) + intersection; } - return source.id + "," + target.id; + return source.id + "," + target.id + intersection; } // Invoke the callback for each underlying property symbol of the given symbol and return the first // value that isn't undefined. @@ -47709,7 +48025,7 @@ var ts; // for finite but deeply expanding indexed accesses (eg, for `Q[P1][P2][P3][P4][P5]`). function isDeeplyNestedType(type, stack, depth) { // We track all object types that have an associated symbol (representing the origin of the type) - if (depth >= 5 && type.flags & 524288 /* Object */) { + if (depth >= 5 && type.flags & 524288 /* Object */ && !isObjectOrArrayLiteralType(type)) { var symbol = type.symbol; if (symbol) { var count = 0; @@ -48084,37 +48400,19 @@ var ts; function addOptionalTypeMarker(type) { return strictNullChecks ? getUnionType([type, optionalType]) : type; } + function isNotOptionalTypeMarker(type) { + return type !== optionalType; + } function removeOptionalTypeMarker(type) { - return strictNullChecks ? filterType(type, function (t) { return t !== optionalType; }) : type; + return strictNullChecks ? filterType(type, isNotOptionalTypeMarker) : type; } - function propagateOptionalTypeMarker(type, wasOptional) { - return wasOptional ? addOptionalTypeMarker(type) : type; + function propagateOptionalTypeMarker(type, node, wasOptional) { + return wasOptional ? ts.isOutermostOptionalChain(node) ? getOptionalType(type) : addOptionalTypeMarker(type) : type; } - function createPooledOptionalTypeResult(isOptional, type) { - pooledOptionalTypeResult.isOptional = isOptional; - pooledOptionalTypeResult.type = type; - return pooledOptionalTypeResult; - } - function checkOptionalExpression(parent, expression, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic) { - var isOptional = false; - var type = checkExpression(expression); - if (ts.isOptionalChain(parent)) { - if (parent.questionDotToken) { - // If we have a questionDotToken then we are an OptionalExpression and should remove `null` and - // `undefined` from the type and add the optionalType to the result, if needed. - isOptional = isNullableType(type); - return createPooledOptionalTypeResult(isOptional, isOptional ? getNonNullableType(type) : type); - } - // If we do not have a questionDotToken, then we are an OptionalChain and we remove the optionalType and - // indicate whether we need to add optionalType back into the result. - var nonOptionalType = removeOptionalTypeMarker(type); - if (nonOptionalType !== type) { - isOptional = true; - type = nonOptionalType; - } - } - type = checkNonNullType(type, expression, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic); - return createPooledOptionalTypeResult(isOptional, type); + function getOptionalExpressionType(exprType, expression) { + return ts.isExpressionOfOptionalChainRoot(expression) ? getNonNullableType(exprType) : + ts.isOptionalChain(expression) ? removeOptionalTypeMarker(exprType) : + exprType; } /** * Is source potentially coercible to target type under `==`. @@ -48268,14 +48566,14 @@ var ts; var stringIndexInfo = getIndexInfoOfType(type, 0 /* String */); var numberIndexInfo = getIndexInfoOfType(type, 1 /* Number */); var result = createAnonymousType(type.symbol, members, ts.emptyArray, ts.emptyArray, stringIndexInfo && createIndexInfo(getWidenedType(stringIndexInfo.type), stringIndexInfo.isReadonly), numberIndexInfo && createIndexInfo(getWidenedType(numberIndexInfo.type), numberIndexInfo.isReadonly)); - result.objectFlags |= (ts.getObjectFlags(type) & (16384 /* JSLiteral */ | 1048576 /* NonInferrableType */)); // Retain js literal flag through widening + result.objectFlags |= (ts.getObjectFlags(type) & (16384 /* JSLiteral */ | 2097152 /* NonInferrableType */)); // Retain js literal flag through widening return result; } function getWidenedType(type) { return getWidenedTypeWithContext(type, /*context*/ undefined); } function getWidenedTypeWithContext(type, context) { - if (ts.getObjectFlags(type) & 786432 /* RequiresWidening */) { + if (ts.getObjectFlags(type) & 1572864 /* RequiresWidening */) { if (context === undefined && type.widened) { return type.widened; } @@ -48320,7 +48618,7 @@ var ts; */ function reportWideningErrorsInType(type) { var errorReported = false; - if (ts.getObjectFlags(type) & 262144 /* ContainsWideningType */) { + if (ts.getObjectFlags(type) & 524288 /* ContainsWideningType */) { if (type.flags & 1048576 /* Union */) { if (ts.some(type.types, isEmptyObjectType)) { errorReported = true; @@ -48346,7 +48644,7 @@ var ts; for (var _d = 0, _e = getPropertiesOfObjectType(type); _d < _e.length; _d++) { var p = _e[_d]; var t = getTypeOfSymbol(p); - if (ts.getObjectFlags(t) & 262144 /* ContainsWideningType */) { + if (ts.getObjectFlags(t) & 524288 /* ContainsWideningType */) { if (!reportWideningErrorsInType(t)) { error(p.valueDeclaration, ts.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, symbolToString(p), typeToString(getWidenedType(t))); } @@ -48426,7 +48724,7 @@ var ts; errorOrSuggestion(noImplicitAny, declaration, diagnostic, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)), typeAsString); } function reportErrorsFromWidening(declaration, type, wideningKind) { - if (produceDiagnostics && noImplicitAny && ts.getObjectFlags(type) & 262144 /* ContainsWideningType */) { + if (produceDiagnostics && noImplicitAny && ts.getObjectFlags(type) & 524288 /* ContainsWideningType */) { // Report implicit any error within type if possible, otherwise report error on declaration if (!reportWideningErrorsInType(type)) { reportImplicitAny(declaration, type, wideningKind); @@ -48543,7 +48841,7 @@ var ts; return !!(type.flags & 63176704 /* Instantiable */ || objectFlags & 4 /* Reference */ && (type.node || ts.forEach(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || - objectFlags & 32 /* Mapped */ || + objectFlags & (32 /* Mapped */ | 131072 /* ObjectRestType */) || type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && couldUnionOrIntersectionContainTypeVariables(type)); } function couldUnionOrIntersectionContainTypeVariables(type) { @@ -48598,7 +48896,7 @@ var ts; // literal { a: 123, b: x => true } is marked non-inferable because it contains a context sensitive // arrow function, but is considered partially inferable because property 'a' has an inferable type. function isPartiallyInferableType(type) { - return !(ts.getObjectFlags(type) & 1048576 /* NonInferrableType */) || + return !(ts.getObjectFlags(type) & 2097152 /* NonInferrableType */) || isObjectLiteralType(type) && ts.some(getPropertiesOfType(type), function (prop) { return isPartiallyInferableType(getTypeOfSymbol(prop)); }); } function createReverseMappedType(source, target, constraint) { @@ -48749,10 +49047,7 @@ var ts; // inferring a type parameter constraint. Instead, make a lower priority inference from // the full source to whatever remains in the target. For example, when inferring from // string to 'string | T', make a lower priority inference of string for T. - var savePriority = priority; - priority |= 1 /* NakedTypeVariable */; - inferFromTypes(source, target); - priority = savePriority; + inferWithPriority(source, target, 1 /* NakedTypeVariable */); return; } source = getUnionType(sources); @@ -48785,7 +49080,7 @@ var ts; // not contain anyFunctionType when we come back to this argument for its second round // of inference. Also, we exclude inferences for silentNeverType (which is used as a wildcard // when constructing types from type parameters that had no inference candidates). - if (ts.getObjectFlags(source) & 1048576 /* NonInferrableType */ || source === silentNeverType || (priority & 16 /* ReturnType */ && (source === autoType || source === autoArrayType))) { + if (ts.getObjectFlags(source) & 2097152 /* NonInferrableType */ || source === silentNeverType || (priority & 16 /* ReturnType */ && (source === autoType || source === autoArrayType))) { return; } var inference = getInferenceInfoForType(target); @@ -48852,10 +49147,7 @@ var ts; else if ((isLiteralType(source) || source.flags & 4 /* String */) && target.flags & 4194304 /* Index */) { var empty = createEmptyObjectTypeFromStringLiteral(source); contravariant = !contravariant; - var savePriority = priority; - priority |= 32 /* LiteralKeyof */; - inferFromTypes(empty, target.type); - priority = savePriority; + inferWithPriority(empty, target.type, 32 /* LiteralKeyof */); contravariant = !contravariant; } else if (source.flags & 8388608 /* IndexedAccess */ && target.flags & 8388608 /* IndexedAccess */) { @@ -48907,6 +49199,12 @@ var ts; } } } + function inferWithPriority(source, target, newPriority) { + var savePriority = priority; + priority |= newPriority; + inferFromTypes(source, target); + priority = savePriority; + } function invokeOnce(source, target, action) { var key = source.id + "," + target.id; var status = visited && visited.get(key); @@ -48972,6 +49270,18 @@ var ts; } return undefined; } + function getSingleTypeVariableFromIntersectionTypes(types) { + var typeVariable; + for (var _i = 0, types_13 = types; _i < types_13.length; _i++) { + var type = types_13[_i]; + var t = type.flags & 2097152 /* Intersection */ && ts.find(type.types, function (t) { return !!getInferenceInfoForType(t); }); + if (!t || typeVariable && t !== typeVariable) { + return undefined; + } + typeVariable = t; + } + return typeVariable; + } function inferToMultipleTypes(source, targets, targetFlags) { var typeVariableCount = 0; if (targetFlags & 1048576 /* Union */) { @@ -49001,6 +49311,16 @@ var ts; } } } + if (typeVariableCount === 0) { + // If every target is an intersection of types containing a single naked type variable, + // make a lower priority inference to that type variable. This handles inferring from + // 'A | B' to 'T & (X | Y)' where we want to infer 'A | B' for T. + var intersectionTypeVariable = getSingleTypeVariableFromIntersectionTypes(targets); + if (intersectionTypeVariable) { + inferWithPriority(source, intersectionTypeVariable, 1 /* NakedTypeVariable */); + } + return; + } // If the target has a single naked type variable and no inference circularities were // encountered above (meaning we explored the types fully), create a union of the source // types from which no inferences have been made so far and infer from that union to the @@ -49032,15 +49352,12 @@ var ts; // we want to infer string for T, not Promise | string. For intersection types // we only infer to single naked type variables. if (targetFlags & 2097152 /* Intersection */ ? typeVariableCount === 1 : typeVariableCount > 0) { - var savePriority = priority; - priority |= 1 /* NakedTypeVariable */; for (var _b = 0, targets_4 = targets; _b < targets_4.length; _b++) { var t = targets_4[_b]; if (getInferenceInfoForType(t)) { - inferFromTypes(source, t); + inferWithPriority(source, t, 1 /* NakedTypeVariable */); } } - priority = savePriority; } } function inferToMappedType(source, target, constraintType) { @@ -49061,14 +49378,12 @@ var ts; if (inference && !inference.isFixed) { var inferredType = inferTypeForHomomorphicMappedType(source, target, constraintType); if (inferredType) { - var savePriority = priority; // We assign a lower priority to inferences made from types containing non-inferrable // types because we may only have a partial result (i.e. we may have failed to make // reverse inferences for some properties). - priority |= ts.getObjectFlags(source) & 1048576 /* NonInferrableType */ ? - 4 /* PartialHomomorphicMappedType */ : 2 /* HomomorphicMappedType */; - inferFromTypes(inferredType, inference.typeParameter); - priority = savePriority; + inferWithPriority(inferredType, inference.typeParameter, ts.getObjectFlags(source) & 2097152 /* NonInferrableType */ ? + 4 /* PartialHomomorphicMappedType */ : + 2 /* HomomorphicMappedType */); } } return true; @@ -49076,10 +49391,7 @@ var ts; if (constraintType.flags & 262144 /* TypeParameter */) { // We're inferring from some source type S to a mapped type { [P in K]: X }, where K is a type // parameter. First infer from 'keyof S' to K. - var savePriority = priority; - priority |= 8 /* MappedTypeConstraint */; - inferFromTypes(getIndexType(source), constraintType); - priority = savePriority; + inferWithPriority(getIndexType(source), constraintType, 8 /* MappedTypeConstraint */); // If K is constrained to a type C, also infer to C. Thus, for a mapped type { [P in K]: X }, // where K extends keyof T, we make the same inferences as for a homomorphic mapped type // { [P in keyof T]: X }. This enables us to make meaningful inferences when the target is a @@ -49188,7 +49500,7 @@ var ts; var sourceLen = sourceSignatures.length; var targetLen = targetSignatures.length; var len = sourceLen < targetLen ? sourceLen : targetLen; - var skipParameters = !!(ts.getObjectFlags(source) & 1048576 /* NonInferrableType */); + var skipParameters = !!(ts.getObjectFlags(source) & 2097152 /* NonInferrableType */); for (var i = 0; i < len; i++) { inferFromSignature(getBaseSignature(sourceSignatures[sourceLen - len + i]), getBaseSignature(targetSignatures[targetLen - len + i]), skipParameters); } @@ -49457,6 +49769,15 @@ var ts; } return false; } + function optionalChainContainsReference(source, target) { + while (ts.isOptionalChain(source)) { + source = source.expression; + if (isMatchingReference(source, target)) { + return true; + } + } + return false; + } // Return true if target is a property access xxx.yyy, source is a property access xxx.zzz, the declared // type of xxx is a union type, and yyy is a property that is possibly a discriminant. We consider a property // a possible discriminant if its type differs in the constituents of containing union type, and if every @@ -49577,8 +49898,8 @@ var ts; } function getTypeFactsOfTypes(types) { var result = 0 /* None */; - for (var _i = 0, types_13 = types; _i < types_13.length; _i++) { - var t = types_13[_i]; + for (var _i = 0, types_14 = types; _i < types_14.length; _i++) { + var t = types_14[_i]; result |= getTypeFacts(t); } return result; @@ -49947,8 +50268,8 @@ var ts; } function isEvolvingArrayTypeList(types) { var hasEvolvingArrayType = false; - for (var _i = 0, types_14 = types; _i < types_14.length; _i++) { - var t = types_14[_i]; + for (var _i = 0, types_15 = types; _i < types_15.length; _i++) { + var t = types_15[_i]; if (!(t.flags & 131072 /* Never */)) { if (!(ts.getObjectFlags(t) & 256 /* EvolvingArray */)) { return false; @@ -50029,9 +50350,18 @@ var ts; // expressions are potential type predicate function calls. In order to avoid triggering // circularities in control flow analysis, we use getTypeOfDottedName when resolving the call // target expression of an assertion. - var funcType = node.parent.kind === 225 /* ExpressionStatement */ ? getTypeOfDottedName(node.expression, /*diagnostic*/ undefined) : - node.expression.kind !== 101 /* SuperKeyword */ ? checkOptionalExpression(node, node.expression).type : - undefined; + var funcType = void 0; + if (node.parent.kind === 225 /* ExpressionStatement */) { + funcType = getTypeOfDottedName(node.expression, /*diagnostic*/ undefined); + } + else if (node.expression.kind !== 101 /* SuperKeyword */) { + if (ts.isOptionalChain(node)) { + funcType = checkNonNullType(getOptionalExpressionType(checkExpression(node.expression), node.expression), node.expression); + } + else { + funcType = checkNonNullExpression(node.expression); + } + } var signatures = getSignaturesOfType(funcType && getApparentType(funcType) || unknownType, 0 /* Call */); var candidate = signatures.length === 1 && !signatures[0].typeParameters ? signatures[0] : ts.some(signatures, hasTypePredicateOrNeverReturnType) ? getResolvedSignature(node) : @@ -50044,6 +50374,13 @@ var ts; return !!(getTypePredicateOfSignature(signature) || signature.declaration && (getReturnTypeFromAnnotation(signature.declaration) || unknownType).flags & 131072 /* Never */); } + function getTypePredicateArgument(predicate, callExpression) { + if (predicate.kind === 1 /* Identifier */ || predicate.kind === 3 /* AssertsIdentifier */) { + return callExpression.arguments[predicate.parameterIndex]; + } + var invokedExpression = ts.skipParentheses(callExpression.expression); + return ts.isAccessExpression(invokedExpression) ? ts.skipParentheses(invokedExpression.expression) : undefined; + } function reportFlowControlError(node) { var block = ts.findAncestor(node, ts.isFunctionOrModuleBlock); var sourceFile = ts.getSourceFileOfNode(node); @@ -50059,6 +50396,11 @@ var ts; function isUnlockedReachableFlowNode(flow) { return !(flow.flags & 4096 /* PreFinally */ && flow.lock.locked) && isReachableFlowNodeWorker(flow, /*skipCacheCheck*/ false); } + function isFalseExpression(expr) { + var node = ts.skipParentheses(expr); + return node.kind === 90 /* FalseKeyword */ || node.kind === 208 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || + node.operatorToken.kind === 56 /* BarBarToken */ && isFalseExpression(node.left) && isFalseExpression(node.right)); + } function isReachableFlowNodeWorker(flow, noCacheCheck) { while (true) { if (flow === lastFlowNode) { @@ -50078,8 +50420,17 @@ var ts; } else if (flags & 512 /* Call */) { var signature = getEffectsSignature(flow.node); - if (signature && getReturnTypeOfSignature(signature).flags & 131072 /* Never */) { - return false; + if (signature) { + var predicate = getTypePredicateOfSignature(signature); + if (predicate && predicate.kind === 3 /* AssertsIdentifier */) { + var predicateArgument = flow.node.arguments[predicate.parameterIndex]; + if (predicateArgument && isFalseExpression(predicateArgument)) { + return false; + } + } + if (getReturnTypeOfSignature(signature).flags & 131072 /* Never */) { + return false; + } } flow = flow.antecedent; } @@ -50313,6 +50664,9 @@ var ts; } function narrowTypeByAssertion(type, expr) { var node = ts.skipParentheses(expr); + if (node.kind === 90 /* FalseKeyword */) { + return unreachableNeverType; + } if (node.kind === 208 /* BinaryExpression */) { if (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */) { return narrowTypeByAssertion(narrowTypeByAssertion(type, node.left), node.right); @@ -50331,7 +50685,7 @@ var ts; var flowType = getTypeAtFlowNode(flow.antecedent); var type = getTypeFromFlowType(flowType); var narrowedType = predicate.type ? narrowTypeByTypePredicate(type, predicate, flow.node, /*assumeTrue*/ true) : - predicate.kind === 3 /* AssertsIdentifier */ ? narrowTypeByAssertion(type, flow.node.arguments[predicate.parameterIndex]) : + predicate.kind === 3 /* AssertsIdentifier */ && predicate.parameterIndex >= 0 && predicate.parameterIndex < flow.node.arguments.length ? narrowTypeByAssertion(type, flow.node.arguments[predicate.parameterIndex]) : type; return narrowedType === type ? flowType : createFlowType(narrowedType, isIncomplete(flowType)); } @@ -50402,17 +50756,24 @@ var ts; if (isMatchingReference(reference, expr)) { type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } - else if (isMatchingReferenceDiscriminant(expr, type)) { - type = narrowTypeByDiscriminant(type, expr, function (t) { return narrowTypeBySwitchOnDiscriminant(t, flow.switchStatement, flow.clauseStart, flow.clauseEnd); }); - } else if (expr.kind === 203 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { type = narrowBySwitchOnTypeOf(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } - else if (containsMatchingReferenceDiscriminant(reference, expr)) { - type = declaredType; - } - else if (flow.clauseStart === flow.clauseEnd && isExhaustiveSwitchStatement(flow.switchStatement)) { - return unreachableNeverType; + else { + if (strictNullChecks) { + if (optionalChainContainsReference(expr, reference)) { + type = narrowTypeBySwitchOptionalChainContainment(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd, function (t) { return !(t.flags & (32768 /* Undefined */ | 131072 /* Never */)); }); + } + else if (expr.kind === 203 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { + type = narrowTypeBySwitchOptionalChainContainment(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd, function (t) { return !(t.flags & 131072 /* Never */ || t.flags & 128 /* StringLiteral */ && t.value === "undefined"); }); + } + } + if (isMatchingReferenceDiscriminant(expr, type)) { + type = narrowTypeByDiscriminant(type, expr, function (t) { return narrowTypeBySwitchOnDiscriminant(t, flow.switchStatement, flow.clauseStart, flow.clauseEnd); }); + } + else if (containsMatchingReferenceDiscriminant(reference, expr)) { + type = declaredType; + } } return createFlowType(type, isIncomplete(flowType)); } @@ -50420,6 +50781,7 @@ var ts; var antecedentTypes = []; var subtypeReduction = false; var seenIncomplete = false; + var bypassFlow; for (var _i = 0, _a = flow.antecedents; _i < _a.length; _i++) { var antecedent = _a[_i]; if (antecedent.flags & 4096 /* PreFinally */ && antecedent.lock.locked) { @@ -50428,6 +50790,11 @@ var ts; // in this case we should ignore this branch. continue; } + if (!bypassFlow && antecedent.flags & 128 /* SwitchClause */ && antecedent.clauseStart === antecedent.clauseEnd) { + // The antecedent is the bypass branch of a potentially exhaustive switch statement. + bypassFlow = antecedent; + continue; + } var flowType = getTypeAtFlowNode(antecedent); var type = getTypeFromFlowType(flowType); // If the type at a particular antecedent path is the declared type and the @@ -50448,6 +50815,25 @@ var ts; seenIncomplete = true; } } + if (bypassFlow) { + var flowType = getTypeAtFlowNode(bypassFlow); + var type = getTypeFromFlowType(flowType); + // If the bypass flow contributes a type we haven't seen yet and the switch statement + // isn't exhaustive, process the bypass flow type. Since exhaustiveness checks increase + // the risk of circularities, we only want to perform them when they make a difference. + if (!ts.contains(antecedentTypes, type) && !isExhaustiveSwitchStatement(bypassFlow.switchStatement)) { + if (type === declaredType && declaredType === initialType) { + return type; + } + antecedentTypes.push(type); + if (!isTypeSubsetOf(type, declaredType)) { + subtypeReduction = true; + } + if (isIncomplete(flowType)) { + seenIncomplete = true; + } + } + } return createFlowType(getUnionOrEvolvingArrayType(antecedentTypes, subtypeReduction ? 2 /* Subtype */ : 1 /* Literal */), seenIncomplete); } function getTypeAtFlowLoopLabel(flow) { @@ -50554,6 +50940,9 @@ var ts; if (isMatchingReference(reference, expr)) { return getTypeWithFacts(type, assumeTrue ? 4194304 /* Truthy */ : 8388608 /* Falsy */); } + if (strictNullChecks && assumeTrue && optionalChainContainsReference(expr, reference)) { + type = getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); + } if (isMatchingReferenceDiscriminant(expr, declaredType)) { return narrowTypeByDiscriminant(type, expr, function (t) { return getTypeWithFacts(t, assumeTrue ? 4194304 /* Truthy */ : 8388608 /* Falsy */); }); } @@ -50602,6 +50991,14 @@ var ts; if (isMatchingReference(reference, right_1)) { return narrowTypeByEquality(type, operator_1, left_1, assumeTrue); } + if (strictNullChecks) { + if (optionalChainContainsReference(left_1, reference)) { + type = narrowTypeByOptionalChainContainment(type, operator_1, right_1, assumeTrue); + } + else if (optionalChainContainsReference(right_1, reference)) { + type = narrowTypeByOptionalChainContainment(type, operator_1, left_1, assumeTrue); + } + } if (isMatchingReferenceDiscriminant(left_1, declaredType)) { return narrowTypeByDiscriminant(type, left_1, function (t) { return narrowTypeByEquality(t, operator_1, right_1, assumeTrue); }); } @@ -50625,6 +51022,15 @@ var ts; } return type; } + function narrowTypeByOptionalChainContainment(type, operator, value, assumeTrue) { + // We are in a branch of obj?.foo === value or obj?.foo !== value. We remove undefined and null from + // the type of obj if (a) the operator is === and the type of value doesn't include undefined or (b) the + // operator is !== and the type of value is undefined. + var effectiveTrue = operator === 34 /* EqualsEqualsToken */ || operator === 36 /* EqualsEqualsEqualsToken */ ? assumeTrue : !assumeTrue; + var doubleEquals = operator === 34 /* EqualsEqualsToken */ || operator === 35 /* ExclamationEqualsToken */; + var valueNonNullish = !(getTypeFacts(getTypeOfExpression(value)) & (doubleEquals ? 262144 /* EQUndefinedOrNull */ : 65536 /* EQUndefined */)); + return effectiveTrue === valueNonNullish ? getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */) : type; + } function narrowTypeByEquality(type, operator, value, assumeTrue) { if (type.flags & 1 /* Any */) { return type; @@ -50672,8 +51078,14 @@ var ts; } function narrowTypeByTypeof(type, typeOfExpr, operator, literal, assumeTrue) { // We have '==', '!=', '===', or !==' operator with 'typeof xxx' and string literal operands + if (operator === 35 /* ExclamationEqualsToken */ || operator === 37 /* ExclamationEqualsEqualsToken */) { + assumeTrue = !assumeTrue; + } var target = getReferenceCandidate(typeOfExpr.expression); if (!isMatchingReference(reference, target)) { + if (strictNullChecks && optionalChainContainsReference(target, reference) && assumeTrue === (literal.text !== "undefined")) { + return getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); + } // For a reference of the form 'x.y', a 'typeof x === ...' type guard resets the // narrowed type of 'y' to its declared type. if (containsMatchingReference(reference, target)) { @@ -50681,9 +51093,6 @@ var ts; } return type; } - if (operator === 35 /* ExclamationEqualsToken */ || operator === 37 /* ExclamationEqualsEqualsToken */) { - assumeTrue = !assumeTrue; - } if (type.flags & 1 /* Any */ && literal.text === "function") { return type; } @@ -50716,6 +51125,10 @@ var ts; return type; } } + function narrowTypeBySwitchOptionalChainContainment(type, switchStatement, clauseStart, clauseEnd, clauseCheck) { + var everyClauseChecks = clauseStart !== clauseEnd && ts.every(getSwitchClauseTypes(switchStatement).slice(clauseStart, clauseEnd), clauseCheck); + return everyClauseChecks ? getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */) : type; + } function narrowTypeBySwitchOnDiscriminant(type, switchStatement, clauseStart, clauseEnd) { // We only narrow if all case expressions specify // values with unit types, except for the case where @@ -50848,6 +51261,9 @@ var ts; function narrowTypeByInstanceof(type, expr, assumeTrue) { var left = getReferenceCandidate(expr.left); if (!isMatchingReference(reference, left)) { + if (assumeTrue && strictNullChecks && optionalChainContainsReference(left, reference)) { + return getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); + } // For a reference of the form 'x.y', an 'x instanceof T' type guard resets the // narrowed type of 'y' to its declared type. We do this because preceding 'x.y' // references might reference a different 'y' property. However, we make an exception @@ -50920,39 +51336,28 @@ var ts; } function narrowTypeByTypePredicate(type, predicate, callExpression, assumeTrue) { // Don't narrow from 'any' if the predicate type is exactly 'Object' or 'Function' - if (isTypeAny(type) && (predicate.type === globalObjectType || predicate.type === globalFunctionType)) { - return type; - } - if (predicate.kind === 1 /* Identifier */ || predicate.kind === 3 /* AssertsIdentifier */) { - var predicateArgument = callExpression.arguments[predicate.parameterIndex]; - if (predicateArgument && predicate.type) { + if (predicate.type && !(isTypeAny(type) && (predicate.type === globalObjectType || predicate.type === globalFunctionType))) { + var predicateArgument = getTypePredicateArgument(predicate, callExpression); + if (predicateArgument) { if (isMatchingReference(reference, predicateArgument)) { return getNarrowedType(type, predicate.type, assumeTrue, isTypeSubtypeOf); } + if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) && + !(getTypeFacts(predicate.type) & 65536 /* EQUndefined */)) { + return getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); + } if (containsMatchingReference(reference, predicateArgument)) { return declaredType; } } } - else { - var invokedExpression = ts.skipParentheses(callExpression.expression); - if (ts.isAccessExpression(invokedExpression) && predicate.type) { - var possibleReference = ts.skipParentheses(invokedExpression.expression); - if (isMatchingReference(reference, possibleReference)) { - return getNarrowedType(type, predicate.type, assumeTrue, isTypeSubtypeOf); - } - if (containsMatchingReference(reference, possibleReference)) { - return declaredType; - } - } - } return type; } // Narrow the given type based on the given expression having the assumed boolean value. The returned type // will be a subtype or the same type as the argument. function narrowType(type, expr, assumeTrue) { // for `a?.b`, we emulate a synthetic `a !== null && a !== undefined` condition for `a` - if (ts.isOptionalChainRoot(expr.parent) || + if (ts.isExpressionOfOptionalChainRoot(expr) || ts.isBinaryExpression(expr.parent) && expr.parent.operatorToken.kind === 60 /* QuestionQuestionToken */ && expr.parent.left === expr) { return narrowTypeByOptionality(type, expr, assumeTrue); } @@ -51233,7 +51638,24 @@ var ts; } } else if (!assumeInitialized && !(getFalsyFlags(type) & 32768 /* Undefined */) && getFalsyFlags(flowType) & 32768 /* Undefined */) { - error(node, ts.Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol)); + var diag = error(node, ts.Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol)); + // See GH:32846 - if the user is using a variable whose type is () => T1 | ... | undefined + // they may have meant to specify the type as (() => T1 | ...) | undefined + // This is assumed if: the type is a FunctionType, the return type is a Union, the last constituent of + // the union is `undefined` + if (type.symbol && type.symbol.declarations.length === 1 && ts.isFunctionTypeNode(type.symbol.declarations[0])) { + var funcTypeNode = type.symbol.declarations[0]; + var returnType = getReturnTypeFromAnnotation(funcTypeNode); + if (returnType && returnType.flags & 1048576 /* Union */) { + var unionTypes_3 = funcTypeNode.type.types; + if (unionTypes_3 && unionTypes_3[unionTypes_3.length - 1].kind === 145 /* UndefinedKeyword */) { + var parenedFuncType = ts.getMutableClone(funcTypeNode); + // Highlight to the end of the second to last constituent of the union + parenedFuncType.end = unionTypes_3[unionTypes_3.length - 2].end; + ts.addRelatedInfo(diag, ts.createDiagnosticForNode(parenedFuncType, ts.Diagnostics.Did_you_mean_to_parenthesize_this_function_type)); + } + } + } // Return the declared type to reduce follow-on errors return type; } @@ -52013,18 +52435,22 @@ var ts; return undefined; } // In a typed function call, an argument or substitution expression is contextually typed by the type of the corresponding parameter. - function getContextualTypeForArgument(callTarget, arg) { + function getContextualTypeForArgument(callTarget, arg, contextFlags) { var args = getEffectiveCallArguments(callTarget); var argIndex = args.indexOf(arg); // -1 for e.g. the expression of a CallExpression, or the tag of a TaggedTemplateExpression - return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex); + return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex, contextFlags); } - function getContextualTypeForArgumentAtIndex(callTarget, argIndex) { + function getContextualTypeForArgumentAtIndex(callTarget, argIndex, contextFlags) { // If we're already in the process of resolving the given signature, don't resolve again as // that could cause infinite recursion. Instead, return anySignature. var signature = getNodeLinks(callTarget).resolvedSignature === resolvingSignature ? resolvingSignature : getResolvedSignature(callTarget); if (ts.isJsxOpeningLikeElement(callTarget) && argIndex === 0) { return getEffectiveFirstArgumentForJsxSignature(signature, callTarget); } + if (contextFlags && contextFlags & 4 /* Completion */ && signature.target) { + var baseSignature = getBaseSignature(signature.target); + return intersectTypes(getTypeAtPosition(signature, argIndex), getTypeAtPosition(baseSignature, argIndex)); + } return getTypeAtPosition(signature, argIndex); } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { @@ -52383,7 +52809,7 @@ var ts; } /* falls through */ case 196 /* NewExpression */: - return getContextualTypeForArgument(parent, node); + return getContextualTypeForArgument(parent, node, contextFlags); case 198 /* TypeAssertionExpression */: case 216 /* AsExpression */: return ts.isConstTypeReference(parent.type) ? undefined : getTypeFromTypeNode(parent.type); @@ -52598,8 +53024,8 @@ var ts; } var signatureList; var types = type.types; - for (var _i = 0, types_15 = types; _i < types_15.length; _i++) { - var current = types_15[_i]; + for (var _i = 0, types_16 = types; _i < types_16.length; _i++) { + var current = types_16[_i]; var signature = getContextualCallSignature(current, node); if (signature) { if (!signatureList) { @@ -52700,7 +53126,7 @@ var ts; var literalType = type.literalType; if (!literalType) { literalType = type.literalType = cloneTypeReference(type); - literalType.objectFlags |= 65536 /* ArrayLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */; + literalType.objectFlags |= 65536 /* ArrayLiteral */ | 1048576 /* ContainsObjectOrArrayLiteral */; } return literalType; } @@ -52837,7 +53263,7 @@ var ts; checkTypeAssignableTo(type, getTypeFromTypeNode(enumTag.typeExpression), memberDecl); } } - objectFlags |= ts.getObjectFlags(type) & 1835008 /* PropagatingFlags */; + objectFlags |= ts.getObjectFlags(type) & 3670016 /* PropagatingFlags */; var nameType = computedNameType && isTypeUsableAsPropertyName(computedNameType) ? computedNameType : undefined; var prop = nameType ? createSymbol(4 /* Property */ | member.flags, getPropertyNameFromType(nameType), checkFlags | 4096 /* Late */) : @@ -52946,7 +53372,7 @@ var ts; var stringIndexInfo = hasComputedStringProperty ? getObjectLiteralIndexInfo(node, offset, propertiesArray, 0 /* String */) : undefined; var numberIndexInfo = hasComputedNumberProperty ? getObjectLiteralIndexInfo(node, offset, propertiesArray, 1 /* Number */) : undefined; var result = createAnonymousType(node.symbol, propertiesTable, ts.emptyArray, ts.emptyArray, stringIndexInfo, numberIndexInfo); - result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */; + result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 1048576 /* ContainsObjectOrArrayLiteral */; if (isJSObjectLiteral) { result.objectFlags |= 16384 /* JSLiteral */; } @@ -53044,7 +53470,7 @@ var ts; var member = attributeDecl.symbol; if (ts.isJsxAttribute(attributeDecl)) { var exprType = checkJsxAttribute(attributeDecl, checkMode); - objectFlags |= ts.getObjectFlags(exprType) & 1835008 /* PropagatingFlags */; + objectFlags |= ts.getObjectFlags(exprType) & 3670016 /* PropagatingFlags */; var attributeSymbol = createSymbol(4 /* Property */ | 33554432 /* Transient */ | member.flags, member.escapedName); attributeSymbol.declarations = member.declarations; attributeSymbol.parent = member.parent; @@ -53124,7 +53550,7 @@ var ts; function createJsxAttributesType() { objectFlags |= freshObjectLiteralFlag; var result = createAnonymousType(attributes.symbol, attributesTable, ts.emptyArray, ts.emptyArray, /*stringIndexInfo*/ undefined, /*numberIndexInfo*/ undefined); - result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */; + result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 1048576 /* ContainsObjectOrArrayLiteral */; return result; } } @@ -53596,8 +54022,8 @@ var ts; function symbolHasNonMethodDeclaration(symbol) { return !!forEachProperty(symbol, function (prop) { return !(prop.flags & 8192 /* Method */); }); } - function checkNonNullExpression(node, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic) { - return checkNonNullType(checkExpression(node), node, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic); + function checkNonNullExpression(node) { + return checkNonNullType(checkExpression(node), node); } function isNullableType(type) { return !!((strictNullChecks ? getFalsyFlags(type) : type.flags) & 98304 /* Nullable */); @@ -53605,22 +54031,34 @@ var ts; function getNonNullableTypeIfNeeded(type) { return isNullableType(type) ? getNonNullableType(type) : type; } - function checkNonNullType(type, node, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic) { + function reportObjectPossiblyNullOrUndefinedError(node, flags) { + error(node, flags & 32768 /* Undefined */ ? flags & 65536 /* Null */ ? + ts.Diagnostics.Object_is_possibly_null_or_undefined : + ts.Diagnostics.Object_is_possibly_undefined : + ts.Diagnostics.Object_is_possibly_null); + } + function reportCannotInvokePossiblyNullOrUndefinedError(node, flags) { + error(node, flags & 32768 /* Undefined */ ? flags & 65536 /* Null */ ? + ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null_or_undefined : + ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_undefined : + ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null); + } + function checkNonNullTypeWithReporter(type, node, reportError) { if (strictNullChecks && type.flags & 2 /* Unknown */) { error(node, ts.Diagnostics.Object_is_of_type_unknown); return errorType; } var kind = (strictNullChecks ? getFalsyFlags(type) : type.flags) & 98304 /* Nullable */; if (kind) { - error(node, kind & 32768 /* Undefined */ ? kind & 65536 /* Null */ ? - (nullOrUndefinedDiagnostic || ts.Diagnostics.Object_is_possibly_null_or_undefined) : - (undefinedDiagnostic || ts.Diagnostics.Object_is_possibly_undefined) : - (nullDiagnostic || ts.Diagnostics.Object_is_possibly_null)); + reportError(node, kind); var t = getNonNullableType(type); return t.flags & (98304 /* Nullable */ | 131072 /* Never */) ? errorType : t; } return type; } + function checkNonNullType(type, node) { + return checkNonNullTypeWithReporter(type, node, reportObjectPossiblyNullOrUndefinedError); + } function checkNonNullNonVoidType(type, node) { var nonNullType = checkNonNullType(type, node); if (nonNullType !== errorType && nonNullType.flags & 16384 /* Void */) { @@ -53629,10 +54067,16 @@ var ts; return nonNullType; } function checkPropertyAccessExpression(node) { - return checkPropertyAccessExpressionOrQualifiedName(node, node.expression, node.name); + return node.flags & 32 /* OptionalChain */ ? checkPropertyAccessChain(node) : + checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name); + } + function checkPropertyAccessChain(node) { + var leftType = checkExpression(node.expression); + var nonOptionalType = getOptionalExpressionType(leftType, node.expression); + return propagateOptionalTypeMarker(checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullType(nonOptionalType, node.expression), node.name), node, nonOptionalType !== leftType); } function checkQualifiedName(node) { - return checkPropertyAccessExpressionOrQualifiedName(node, node.left, node.right); + return checkPropertyAccessExpressionOrQualifiedName(node, node.left, checkNonNullExpression(node.left), node.right); } function isMethodAccessForCall(node) { while (node.parent.kind === 199 /* ParenthesizedExpression */) { @@ -53640,8 +54084,7 @@ var ts; } return ts.isCallOrNewExpression(node.parent) && node.parent.expression === node; } - function checkPropertyAccessExpressionOrQualifiedName(node, left, right) { - var _a = checkOptionalExpression(node, left), isOptional = _a.isOptional, leftType = _a.type; + function checkPropertyAccessExpressionOrQualifiedName(node, left, leftType, right) { var parentSymbol = getNodeLinks(left).resolvedSymbol; var assignmentKind = ts.getAssignmentTargetKind(node); var apparentType = getApparentType(assignmentKind !== 0 /* None */ || isMethodAccessForCall(node) ? getWidenedType(leftType) : leftType); @@ -53694,7 +54137,7 @@ var ts; } propType = getConstraintForLocation(getTypeOfSymbol(prop), node); } - return propagateOptionalTypeMarker(getFlowTypeOfAccessExpression(node, prop, propType, right), isOptional); + return getFlowTypeOfAccessExpression(node, prop, propType, right); } function getFlowTypeOfAccessExpression(node, prop, propType, errorNode) { // Only compute control flow type if this is a property access expression that isn't an @@ -54016,7 +54459,15 @@ var ts; return false; } function checkIndexedAccess(node) { - var _a = checkOptionalExpression(node, node.expression), isOptional = _a.isOptional, exprType = _a.type; + return node.flags & 32 /* OptionalChain */ ? checkElementAccessChain(node) : + checkElementAccessExpression(node, checkNonNullExpression(node.expression)); + } + function checkElementAccessChain(node) { + var exprType = checkExpression(node.expression); + var nonOptionalType = getOptionalExpressionType(exprType, node.expression); + return propagateOptionalTypeMarker(checkElementAccessExpression(node, checkNonNullType(nonOptionalType, node.expression)), node, nonOptionalType !== exprType); + } + function checkElementAccessExpression(node, exprType) { var objectType = ts.getAssignmentTargetKind(node) !== 0 /* None */ || isMethodAccessForCall(node) ? getWidenedType(exprType) : exprType; var indexExpression = node.argumentExpression; var indexType = checkExpression(indexExpression); @@ -54032,7 +54483,7 @@ var ts; 2 /* Writing */ | (isGenericObjectType(objectType) && !isThisTypeParameter(objectType) ? 1 /* NoIndexSignatures */ : 0) : 0 /* None */; var indexedAccessType = getIndexedAccessTypeOrUndefined(objectType, effectiveIndexType, node, accessFlags) || errorType; - return propagateOptionalTypeMarker(checkIndexedAccessIndexType(getFlowTypeOfAccessExpression(node, indexedAccessType.symbol, indexedAccessType, indexExpression), node), isOptional); + return checkIndexedAccessIndexType(getFlowTypeOfAccessExpression(node, indexedAccessType.symbol, indexedAccessType, indexExpression), node); } function checkThatExpressionIsProperSymbolReference(expression, expressionType, reportError) { if (expressionType === errorType) { @@ -54103,7 +54554,7 @@ var ts; // interface B extends A { (x: 'foo'): string } // const b: B; // b('foo') // <- here overloads should be processed as [(x:'foo'): string, (x: string): void] - function reorderCandidates(signatures, result, isOptionalCall) { + function reorderCandidates(signatures, result, callChainFlags) { var lastParent; var lastSymbol; var cutoffIndex = 0; @@ -54133,7 +54584,7 @@ var ts; lastSymbol = symbol; // specialized signatures always need to be placed before non-specialized signatures regardless // of the cutoff position; see GH#1133 - if (signature.hasLiteralTypes) { + if (signatureHasLiteralTypes(signature)) { specializedIndex++; spliceIndex = specializedIndex; // The cutoff index always needs to be greater than or equal to the specialized signature index @@ -54144,7 +54595,7 @@ var ts; else { spliceIndex = index; } - result.splice(spliceIndex, 0, isOptionalCall ? createOptionalCallSignature(signature) : signature); + result.splice(spliceIndex, 0, callChainFlags ? getOptionalCallSignature(signature, callChainFlags) : signature); } } function isSpreadArgument(arg) { @@ -54228,7 +54679,7 @@ var ts; // the declared number of type parameters, the call has an incorrect arity. var numTypeParameters = ts.length(signature.typeParameters); var minTypeArgumentCount = getMinTypeArgumentCount(signature.typeParameters); - return !typeArguments || + return !ts.some(typeArguments) || (typeArguments.length >= minTypeArgumentCount && typeArguments.length <= numTypeParameters); } // If type has a single call signature and no other members, return that signature. Otherwise, return undefined. @@ -54439,7 +54890,19 @@ var ts; // If the signature's 'this' type is voidType, then the check is skipped -- anything is compatible. // If the expression is a new expression, then the check is skipped. var thisArgumentNode = getThisArgumentOfCall(node); - var thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType; + var thisArgumentType = void 0; + if (thisArgumentNode) { + thisArgumentType = checkExpression(thisArgumentNode); + if (ts.isOptionalChainRoot(thisArgumentNode.parent)) { + thisArgumentType = getNonNullableType(thisArgumentType); + } + else if (ts.isOptionalChain(thisArgumentNode.parent)) { + thisArgumentType = removeOptionalTypeMarker(thisArgumentType); + } + } + else { + thisArgumentType = voidType; + } var errorNode = reportErrors ? (thisArgumentNode || node) : undefined; var headMessage_1 = ts.Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1; if (!checkTypeRelatedTo(thisArgumentType, thisType, relation, errorNode, headMessage_1, containingMessageChain, errorOutputContainer)) { @@ -54666,7 +55129,7 @@ var ts; if (closestSignature && getMinArgumentCount(closestSignature) > argCount && closestSignature.declaration) { var paramDecl = closestSignature.declaration.parameters[closestSignature.thisParameter ? argCount + 1 : argCount]; if (paramDecl) { - related = ts.createDiagnosticForNode(paramDecl, ts.isBindingPattern(paramDecl.name) ? ts.Diagnostics.An_argument_matching_this_binding_pattern_was_not_provided : ts.Diagnostics.An_argument_for_0_was_not_provided, !paramDecl.name ? argCount : !ts.isBindingPattern(paramDecl.name) ? ts.idText(getFirstIdentifier(paramDecl.name)) : undefined); + related = ts.createDiagnosticForNode(paramDecl, ts.isBindingPattern(paramDecl.name) ? ts.Diagnostics.An_argument_matching_this_binding_pattern_was_not_provided : ts.Diagnostics.An_argument_for_0_was_not_provided, !paramDecl.name ? argCount : !ts.isBindingPattern(paramDecl.name) ? ts.idText(ts.getFirstIdentifier(paramDecl.name)) : undefined); } } if (min < argCount && argCount < max) { @@ -54722,7 +55185,7 @@ var ts; } return ts.createDiagnosticForNodeArray(ts.getSourceFileOfNode(node), typeArguments, ts.Diagnostics.Expected_0_type_arguments_but_got_1, belowArgCount === -Infinity ? aboveArgCount : belowArgCount, argCount); } - function resolveCall(node, signatures, candidatesOutArray, checkMode, isOptionalCall, fallbackError) { + function resolveCall(node, signatures, candidatesOutArray, checkMode, callChainFlags, fallbackError) { var isTaggedTemplate = node.kind === 197 /* TaggedTemplateExpression */; var isDecorator = node.kind === 156 /* Decorator */; var isJsxOpeningOrSelfClosingElement = ts.isJsxOpeningLikeElement(node); @@ -54737,7 +55200,7 @@ var ts; } var candidates = candidatesOutArray || []; // reorderCandidates fills up the candidates array directly - reorderCandidates(signatures, candidates, isOptionalCall); + reorderCandidates(signatures, candidates, callChainFlags); if (!candidates.length) { if (reportErrors) { diagnostics.add(getDiagnosticForCallNode(node, ts.Diagnostics.Call_target_does_not_contain_any_signatures)); @@ -54899,7 +55362,7 @@ var ts; candidateForTypeArgumentError = undefined; if (isSingleNonGenericCandidate) { var candidate = candidates[0]; - if (typeArguments || !hasCorrectArity(node, args, candidate, signatureHelpTrailingComma)) { + if (ts.some(typeArguments) || !hasCorrectArity(node, args, candidate, signatureHelpTrailingComma)) { return undefined; } if (getSignatureApplicabilityError(node, args, candidate, relation, 0 /* Normal */, /*reportErrors*/ false, /*containingMessageChain*/ undefined)) { @@ -54917,7 +55380,7 @@ var ts; var inferenceContext = void 0; if (candidate.typeParameters) { var typeArgumentTypes = void 0; - if (typeArguments) { + if (ts.some(typeArguments)) { typeArgumentTypes = checkTypeArguments(candidate, typeArguments, /*reportErrors*/ false); if (!typeArgumentTypes) { candidateForTypeArgumentError = candidate; @@ -54992,34 +55455,34 @@ var ts; var _a = ts.minAndMax(candidates, getNumNonRestParameters), minArgumentCount = _a.min, maxNonRestParam = _a.max; var parameters = []; var _loop_15 = function (i) { - var symbols = ts.mapDefined(candidates, function (_a) { - var parameters = _a.parameters, hasRestParameter = _a.hasRestParameter; - return hasRestParameter ? - i < parameters.length - 1 ? parameters[i] : ts.last(parameters) : - i < parameters.length ? parameters[i] : undefined; - }); + var symbols = ts.mapDefined(candidates, function (s) { return signatureHasRestParameter(s) ? + i < s.parameters.length - 1 ? s.parameters[i] : ts.last(s.parameters) : + i < s.parameters.length ? s.parameters[i] : undefined; }); ts.Debug.assert(symbols.length !== 0); parameters.push(createCombinedSymbolFromTypes(symbols, ts.mapDefined(candidates, function (candidate) { return tryGetTypeAtPosition(candidate, i); }))); }; for (var i = 0; i < maxNonRestParam; i++) { _loop_15(i); } - var restParameterSymbols = ts.mapDefined(candidates, function (c) { return c.hasRestParameter ? ts.last(c.parameters) : undefined; }); - var hasRestParameter = restParameterSymbols.length !== 0; - if (hasRestParameter) { + var restParameterSymbols = ts.mapDefined(candidates, function (c) { return signatureHasRestParameter(c) ? ts.last(c.parameters) : undefined; }); + var flags = 0 /* None */; + if (restParameterSymbols.length !== 0) { var type = createArrayType(getUnionType(ts.mapDefined(candidates, tryGetRestTypeOfSignature), 2 /* Subtype */)); parameters.push(createCombinedSymbolForOverloadFailure(restParameterSymbols, type)); + flags |= 1 /* HasRestParameter */; + } + if (candidates.some(signatureHasLiteralTypes)) { + flags |= 2 /* HasLiteralTypes */; } return createSignature(candidates[0].declaration, /*typeParameters*/ undefined, // Before calling this we tested for `!candidates.some(c => !!c.typeParameters)`. thisParameter, parameters, /*resolvedReturnType*/ getIntersectionType(candidates.map(getReturnTypeOfSignature)), - /*typePredicate*/ undefined, minArgumentCount, hasRestParameter, - /*hasLiteralTypes*/ candidates.some(function (c) { return c.hasLiteralTypes; })); + /*typePredicate*/ undefined, minArgumentCount, flags); } function getNumNonRestParameters(signature) { var numParams = signature.parameters.length; - return signature.hasRestParameter ? numParams - 1 : numParams; + return signatureHasRestParameter(signature) ? numParams - 1 : numParams; } function createCombinedSymbolFromTypes(sources, types) { return createCombinedSymbolForOverloadFailure(sources, getUnionType(types, 2 /* Subtype */)); @@ -55095,12 +55558,24 @@ var ts; var baseTypeNode = ts.getEffectiveBaseTypeNode(ts.getContainingClass(node)); if (baseTypeNode) { var baseConstructors = getInstantiatedConstructorsForTypeArguments(superType, baseTypeNode.typeArguments, baseTypeNode); - return resolveCall(node, baseConstructors, candidatesOutArray, checkMode, /*isOptional*/ false); + return resolveCall(node, baseConstructors, candidatesOutArray, checkMode, 0 /* None */); } } return resolveUntypedCall(node); } - var _b = checkOptionalExpression(node, node.expression, ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null, ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_undefined, ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null_or_undefined), isOptional = _b.isOptional, funcType = _b.type; + var callChainFlags; + var funcType = checkExpression(node.expression); + if (ts.isCallChain(node)) { + var nonOptionalType = getOptionalExpressionType(funcType, node.expression); + callChainFlags = nonOptionalType === funcType ? 0 /* None */ : + ts.isOutermostOptionalChain(node) ? 8 /* IsOuterCallChain */ : + 4 /* IsInnerCallChain */; + funcType = nonOptionalType; + } + else { + callChainFlags = 0 /* None */; + } + funcType = checkNonNullTypeWithReporter(funcType, node.expression, reportCannotInvokePossiblyNullOrUndefinedError); if (funcType === silentNeverType) { return silentNeverSignature; } @@ -55166,7 +55641,7 @@ var ts; error(node, ts.Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType)); return resolveErrorCall(node); } - return resolveCall(node, callSignatures, candidatesOutArray, checkMode, isOptional); + return resolveCall(node, callSignatures, candidatesOutArray, checkMode, callChainFlags); } function isGenericFunctionReturningFunction(signature) { return !!(signature.typeParameters && isFunctionType(getReturnTypeOfSignature(signature))); @@ -55229,7 +55704,7 @@ var ts; error(node, ts.Diagnostics.Cannot_create_an_instance_of_an_abstract_class); return resolveErrorCall(node); } - return resolveCall(node, constructSignatures, candidatesOutArray, checkMode, /*isOptional*/ false); + return resolveCall(node, constructSignatures, candidatesOutArray, checkMode, 0 /* None */); } // If expressionType's apparent type is an object type with no construct signatures but // one or more call signatures, the expression is processed as a function call. A compile-time @@ -55237,7 +55712,7 @@ var ts; // operation is Any. It is an error to have a Void this type. var callSignatures = getSignaturesOfType(expressionType, 0 /* Call */); if (callSignatures.length) { - var signature = resolveCall(node, callSignatures, candidatesOutArray, checkMode, /*isOptional*/ false); + var signature = resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */); if (!noImplicitAny) { if (signature.declaration && !isJSConstructor(signature.declaration) && getReturnTypeOfSignature(signature) !== voidType) { error(node, ts.Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword); @@ -55322,8 +55797,8 @@ var ts; if (apparentType.flags & 1048576 /* Union */) { var types = apparentType.types; var hasSignatures = false; - for (var _i = 0, types_16 = types; _i < types_16.length; _i++) { - var constituent = types_16[_i]; + for (var _i = 0, types_17 = types; _i < types_17.length; _i++) { + var constituent = types_17[_i]; var signatures = getSignaturesOfType(constituent, kind); if (signatures.length !== 0) { hasSignatures = true; @@ -55414,7 +55889,7 @@ var ts; invocationError(node.tag, apparentType, 0 /* Call */); return resolveErrorCall(node); } - return resolveCall(node, callSignatures, candidatesOutArray, checkMode, /*isOptional*/ false); + return resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */); } /** * Gets the localized diagnostic head message to use for errors when resolving a decorator as a call expression. @@ -55467,7 +55942,7 @@ var ts; invocationErrorRecovery(apparentType, 0 /* Call */, diag); return resolveErrorCall(node); } - return resolveCall(node, callSignatures, candidatesOutArray, checkMode, /*isOptional*/ false, headMessage); + return resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */, headMessage); } function createSignatureForJSXIntrinsic(node, result) { var namespace = getJsxNamespaceAt(node); @@ -55482,9 +55957,7 @@ var ts; return createSignature(declaration, /*typeParameters*/ undefined, /*thisParameter*/ undefined, [parameterSymbol], typeSymbol ? getDeclaredTypeOfSymbol(typeSymbol) : errorType, - /*returnTypePredicate*/ undefined, 1, - /*hasRestparameter*/ false, - /*hasLiteralTypes*/ false); + /*returnTypePredicate*/ undefined, 1, 0 /* None */); } function resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode) { if (isJsxIntrinsicIdentifier(node.tagName)) { @@ -55507,7 +55980,7 @@ var ts; error(node.tagName, ts.Diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, ts.getTextOfNode(node.tagName)); return resolveErrorCall(node); } - return resolveCall(node, signatures, candidatesOutArray, checkMode, /*isOptional*/ false); + return resolveCall(node, signatures, candidatesOutArray, checkMode, 0 /* None */); } /** * Sometimes, we have a decorator that could accept zero arguments, @@ -55517,7 +55990,7 @@ var ts; function isPotentiallyUncalledDecorator(decorator, signatures) { return signatures.length && ts.every(signatures, function (signature) { return signature.minArgumentCount === 0 && - !signature.hasRestParameter && + !signatureHasRestParameter(signature) && signature.parameters.length < getDecoratorArgumentCount(decorator, signature); }); } @@ -55588,7 +56061,7 @@ var ts; return false; } function mergeJSSymbols(target, source) { - if (source && (ts.hasEntries(source.exports) || ts.hasEntries(source.members))) { + if (source) { var links = getSymbolLinks(source); if (!links.inferredClassSymbol || !links.inferredClassSymbol.has("" + getSymbolId(target))) { var inferred = isTransientSymbol(target) ? target : cloneSymbol(target); @@ -55898,7 +56371,7 @@ var ts; return type; } function getParameterNameAtPosition(signature, pos) { - var paramCount = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + var paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); if (pos < paramCount) { return signature.parameters[pos].escapedName; } @@ -55915,11 +56388,11 @@ var ts; return tryGetTypeAtPosition(signature, pos) || anyType; } function tryGetTypeAtPosition(signature, pos) { - var paramCount = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + var paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); if (pos < paramCount) { return getTypeOfParameter(signature.parameters[pos]); } - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { // We want to return the value undefined for an out of bounds parameter position, // so we need to check bounds here before calling getIndexedAccessType (which // otherwise would return the type 'undefined'). @@ -55954,7 +56427,7 @@ var ts; } function getParameterCount(signature) { var length = signature.parameters.length; - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var restType = getTypeOfSymbol(signature.parameters[length - 1]); if (isTupleType(restType)) { return length + getTypeArguments(restType).length - 1; @@ -55963,7 +56436,7 @@ var ts; return length; } function getMinArgumentCount(signature) { - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); if (isTupleType(restType)) { var minLength = restType.target.minLength; @@ -55975,14 +56448,14 @@ var ts; return signature.minArgumentCount; } function hasEffectiveRestParameter(signature) { - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); return !isTupleType(restType) || restType.target.hasRestElement; } return false; } function getEffectiveRestType(signature) { - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); return isTupleType(restType) ? getRestArrayTypeOfTupleType(restType) : restType; } @@ -55999,7 +56472,7 @@ var ts; return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : fallbackType; } function inferFromAnnotatedParameters(signature, context, inferenceContext) { - var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + var len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); for (var i = 0; i < len; i++) { var declaration = signature.parameters[i].valueDeclaration; if (declaration.type) { @@ -56032,7 +56505,7 @@ var ts; assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter)); } } - var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + var len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); for (var i = 0; i < len; i++) { var parameter = signature.parameters[i]; if (!ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) { @@ -56040,7 +56513,7 @@ var ts; assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType); } } - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { // parameter might be a transient symbol generated by use of `arguments` in the function body. var parameter = ts.last(signature.parameters); if (isTransientSymbol(parameter) || !ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) { @@ -56317,8 +56790,8 @@ var ts; var witnesses = getSwitchClauseTypeOfWitnesses(node); // notEqualFacts states that the type of the switched value is not equal to every type in the switch. var notEqualFacts_1 = getFactsFromTypeofSwitch(0, 0, witnesses, /*hasDefault*/ true); - var type_4 = getBaseConstraintOfType(operandType) || operandType; - return !!(filterType(type_4, function (t) { return (getTypeFacts(t) & notEqualFacts_1) === notEqualFacts_1; }).flags & 131072 /* Never */); + var type_3 = getBaseConstraintOfType(operandType) || operandType; + return !!(filterType(type_3, function (t) { return (getTypeFacts(t) & notEqualFacts_1) === notEqualFacts_1; }).flags & 131072 /* Never */); } var type = getTypeOfExpression(node.expression); if (!isLiteralType(type)) { @@ -56445,9 +56918,9 @@ var ts; return links.contextFreeType; } var returnType = getReturnTypeFromBody(node, checkMode); - var returnOnlySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, returnType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); + var returnOnlySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, returnType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */); var returnOnlyType = createAnonymousType(node.symbol, emptySymbols, [returnOnlySignature], ts.emptyArray, undefined, undefined); - returnOnlyType.objectFlags |= 1048576 /* NonInferrableType */; + returnOnlyType.objectFlags |= 2097152 /* NonInferrableType */; return links.contextFreeType = returnOnlyType; } return anyFunctionType; @@ -56676,8 +57149,7 @@ var ts; var span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos); var diagnostic = ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.await_expression_is_only_allowed_within_an_async_function); var func = ts.getContainingFunction(node); - if (func && func.kind !== 161 /* Constructor */) { - ts.Debug.assert((ts.getFunctionFlags(func) & 2 /* Async */) === 0, "Enclosing function should never be an async function."); + if (func && func.kind !== 161 /* Constructor */ && (ts.getFunctionFlags(func) & 2 /* Async */) === 0) { var relatedInfo = ts.createDiagnosticForNode(func, ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async); ts.addRelatedInfo(diagnostic, relatedInfo); } @@ -56778,8 +57250,8 @@ var ts; } if (type.flags & 3145728 /* UnionOrIntersection */) { var types = type.types; - for (var _i = 0, types_17 = types; _i < types_17.length; _i++) { - var t = types_17[_i]; + for (var _i = 0, types_18 = types; _i < types_18.length; _i++) { + var t = types_18[_i]; if (maybeTypeOfKind(t, kind)) { return true; } @@ -57413,25 +57885,10 @@ var ts; } return [effectiveLeft, effectiveRight]; } - function isYieldExpressionInClass(node) { - var current = node; - var parent = node.parent; - while (parent) { - if (ts.isFunctionLike(parent) && current === parent.body) { - return false; - } - else if (ts.isClassLike(current)) { - return true; - } - current = parent; - parent = parent.parent; - } - return false; - } function checkYieldExpression(node) { // Grammar checking if (produceDiagnostics) { - if (!(node.flags & 8192 /* YieldContext */) || isYieldExpressionInClass(node)) { + if (!(node.flags & 8192 /* YieldContext */)) { grammarErrorOnFirstToken(node, ts.Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body); } if (isInParameterInitializerBeforeContainingFunction(node)) { @@ -57767,6 +58224,18 @@ var ts; } } } + function getReturnTypeOfSingleNonGenericCallSignature(funcType) { + var signature = getSingleCallSignature(funcType); + if (signature && !signature.typeParameters) { + return getReturnTypeOfSignature(signature); + } + } + function getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) { + var funcType = checkExpression(expr.expression); + var nonOptionalType = getOptionalExpressionType(funcType, expr.expression); + var returnType = getReturnTypeOfSingleNonGenericCallSignature(funcType); + return returnType && propagateOptionalTypeMarker(returnType, expr, nonOptionalType !== funcType); + } /** * Returns the type of an expression. Unlike checkExpression, this function is simply concerned * with computing the type and may not fully check all contained sub-expressions for errors. @@ -57778,10 +58247,10 @@ var ts; // Optimize for the common case of a call to a function with a single non-generic call // signature where we can just fetch the return type without checking the arguments. if (ts.isCallExpression(expr) && expr.expression.kind !== 101 /* SuperKeyword */ && !ts.isRequireCall(expr, /*checkArgumentIsStringLiteralLike*/ true) && !isSymbolOrSymbolForCall(expr)) { - var _a = checkOptionalExpression(expr, expr.expression), isOptional = _a.isOptional, funcType = _a.type; - var signature = getSingleCallSignature(funcType); - if (signature && !signature.typeParameters) { - return propagateOptionalTypeMarker(getReturnTypeOfSignature(signature), isOptional); + var type = ts.isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : + getReturnTypeOfSingleNonGenericCallSignature(checkNonNullExpression(expr.expression)); + if (type) { + return type; } } else if (ts.isAssertionExpression(expr) && !ts.isConstTypeReference(expr.type)) { @@ -57831,7 +58300,7 @@ var ts; (node.parent.kind === 194 /* ElementAccessExpression */ && node.parent.expression === node) || ((node.kind === 75 /* Identifier */ || node.kind === 152 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || (node.parent.kind === 171 /* TypeQuery */ && node.parent.exprName === node)) || - (node.parent.kind === 261 /* ExportSpecifier */ && (compilerOptions.preserveConstEnums || node.flags & 8388608 /* Ambient */)); // We allow reexporting const enums + (node.parent.kind === 261 /* ExportSpecifier */); // We allow reexporting const enums if (!ok) { error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query); } @@ -58035,7 +58504,7 @@ var ts; } else { if (typePredicate.parameterIndex >= 0) { - if (signature.hasRestParameter && typePredicate.parameterIndex === signature.parameters.length - 1) { + if (signatureHasRestParameter(signature) && typePredicate.parameterIndex === signature.parameters.length - 1) { error(parameterName, ts.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); } else { @@ -59210,7 +59679,7 @@ var ts; return; } // Verify there is no local declaration that could collide with the promise constructor. - var rootName = promiseConstructorName && getFirstIdentifier(promiseConstructorName); + var rootName = promiseConstructorName && ts.getFirstIdentifier(promiseConstructorName); var collidingSymbol = getSymbol(node.locals, rootName.escapedText, 111551 /* Value */); if (collidingSymbol) { error(collidingSymbol.valueDeclaration, ts.Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, ts.idText(rootName), ts.entityNameToString(promiseConstructorName)); @@ -59267,7 +59736,7 @@ var ts; function markEntityNameOrEntityExpressionAsReference(typeName) { if (!typeName) return; - var rootName = getFirstIdentifier(typeName); + var rootName = ts.getFirstIdentifier(typeName); var meaning = (typeName.kind === 75 /* Identifier */ ? 788968 /* Type */ : 1920 /* Namespace */) | 2097152 /* Alias */; var rootSymbol = resolveName(rootName, rootName.escapedText, meaning, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isRefernce*/ true); if (rootSymbol @@ -59307,8 +59776,8 @@ var ts; } function getEntityNameForDecoratorMetadataFromTypeList(types) { var commonEntityName; - for (var _i = 0, types_18 = types; _i < types_18.length; _i++) { - var typeNode = types_18[_i]; + for (var _i = 0, types_19 = types; _i < types_19.length; _i++) { + var typeNode = types_19[_i]; while (typeNode.kind === 181 /* ParenthesizedType */) { typeNode = typeNode.type; // Skip parens if need be } @@ -61083,10 +61552,7 @@ var ts; firstDefaultClause = clause; } else { - var sourceFile = ts.getSourceFileOfNode(node); - var start = ts.skipTrivia(sourceFile.text, clause.pos); - var end = clause.statements.length > 0 ? clause.statements[0].pos : clause.end; - grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement); + grammarErrorOnNode(clause, ts.Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement); hasDuplicateDefaultClause = true; } } @@ -61107,6 +61573,9 @@ var ts; } } ts.forEach(clause.statements, checkSourceElement); + if (compilerOptions.noFallthroughCasesInSwitch && clause.fallthroughFlowNode && isReachableFlowNode(clause.fallthroughFlowNode)) { + error(clause, ts.Diagnostics.Fallthrough_case_in_switch); + } }); if (node.caseBlock.locals) { registerForUnusedIdentifiersCheck(node.caseBlock); @@ -61629,11 +62098,13 @@ var ts; // same when the derived property is from an assignment continue; } - if (basePropertyFlags !== 4 /* Property */ && derivedPropertyFlags === 4 /* Property */) { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_property; - } - else if (basePropertyFlags === 4 /* Property */ && derivedPropertyFlags !== 4 /* Property */) { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_accessor; + var overriddenInstanceProperty = basePropertyFlags !== 4 /* Property */ && derivedPropertyFlags === 4 /* Property */; + var overriddenInstanceAccessor = basePropertyFlags === 4 /* Property */ && derivedPropertyFlags !== 4 /* Property */; + if (overriddenInstanceProperty || overriddenInstanceAccessor) { + var errorMessage_1 = overriddenInstanceProperty ? + ts.Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property : + ts.Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor; + error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage_1, symbolToString(base), typeToString(baseType), typeToString(type)); } else { var uninitialized = ts.find(derived.declarations, function (d) { return d.kind === 158 /* PropertyDeclaration */ && !d.initializer; }); @@ -61649,24 +62120,22 @@ var ts; || !ts.isIdentifier(propName) || !strictNullChecks || !isPropertyInitializedInConstructor(propName, type, constructor)) { - var errorMessage_1 = ts.Diagnostics.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration; - error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage_1, symbolToString(base), typeToString(baseType)); + var errorMessage_2 = ts.Diagnostics.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration; + error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage_2, symbolToString(base), typeToString(baseType)); } } - // correct case - continue; } + // correct case + continue; } else if (isPrototypeProperty(base)) { - if (isPrototypeProperty(derived)) { - // method is overridden with method -- correct case + if (isPrototypeProperty(derived) || derived.flags & 4 /* Property */) { + // method is overridden with method or property -- correct case continue; } - else if (derived.flags & 98304 /* Accessor */) { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor; - } else { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property; + ts.Debug.assert(!!(derived.flags & 98304 /* Accessor */)); + errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor; } } else if (base.flags & 98304 /* Accessor */) { @@ -62172,22 +62641,6 @@ var ts; break; } } - function getFirstIdentifier(node) { - switch (node.kind) { - case 75 /* Identifier */: - return node; - case 152 /* QualifiedName */: - do { - node = node.left; - } while (node.kind !== 75 /* Identifier */); - return node; - case 193 /* PropertyAccessExpression */: - do { - node = node.expression; - } while (node.kind !== 75 /* Identifier */); - return node; - } - } function getFirstNonModuleExportsIdentifier(node) { switch (node.kind) { case 75 /* Identifier */: @@ -62317,7 +62770,7 @@ var ts; if (target !== unknownSymbol) { if (target.flags & 111551 /* Value */) { // Target is a value symbol, check that it is not hidden by a local declaration with the same name - var moduleName = getFirstIdentifier(node.moduleReference); + var moduleName = ts.getFirstIdentifier(node.moduleReference); if (!(resolveEntityName(moduleName, 111551 /* Value */ | 1920 /* Namespace */).flags & 1920 /* Namespace */)) { error(moduleName, ts.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, ts.declarationNameToString(moduleName)); } @@ -62384,7 +62837,7 @@ var ts; // find immediate value referenced by exported name (SymbolFlags.Alias is set so we don't chase down aliases) var symbol = resolveName(exportedName, exportedName.escapedText, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ true); - if (symbol && (symbol === undefinedSymbol || isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0])))) { + if (symbol && (symbol === undefinedSymbol || symbol === globalThisSymbol || isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0])))) { error(exportedName, ts.Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, ts.idText(exportedName)); } else { @@ -64690,10 +65143,10 @@ var ts; if (type.flags & 4 /* String */ || type.flags & 8 /* Number */) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead, ts.getTextOfNode(parameter.name), typeToString(type), typeToString(node.type ? getTypeFromTypeNode(node.type) : anyType)); } - if (type.flags & 1048576 /* Union */ && allTypesAssignableToKind(type, 128 /* StringLiteral */, /*strict*/ true)) { + if (type.flags & 1048576 /* Union */ && allTypesAssignableToKind(type, 384 /* StringOrNumberLiteral */, /*strict*/ true)) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead); } - return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number); + return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_either_string_or_number); } if (!node.type) { return grammarErrorOnNode(node, ts.Diagnostics.An_index_signature_must_have_a_type_annotation); @@ -65576,7 +66029,7 @@ var ts; } function checkGrammarImportCallExpression(node) { if (moduleKind === ts.ModuleKind.ES2015) { - return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext); + return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_commonjs_amd_system_or_umd); } if (node.typeArguments) { return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_cannot_have_type_arguments); @@ -65646,6 +66099,14 @@ var ts; case 2 /* Next */: return "nextType"; } } + function signatureHasRestParameter(s) { + return !!(s.flags & 1 /* HasRestParameter */); + } + ts.signatureHasRestParameter = signatureHasRestParameter; + function signatureHasLiteralTypes(s) { + return !!(s.flags & 2 /* HasLiteralTypes */); + } + ts.signatureHasLiteralTypes = signatureHasLiteralTypes; })(ts || (ts = {})); var ts; (function (ts) { @@ -66579,7 +67040,9 @@ var ts; } ts.createPropertyAccess = createPropertyAccess; function updatePropertyAccess(node, expression, name) { - ts.Debug.assert(!(node.flags & 32 /* OptionalChain */), "Cannot update a PropertyAccessChain using updatePropertyAccess. Use updatePropertyAccessChain instead."); + if (ts.isOptionalChain(node)) { + return updatePropertyAccessChain(node, expression, node.questionDotToken, name); + } // Because we are updating existed propertyAccess we want to inherit its emitFlags // instead of using the default from createPropertyAccess return node.expression !== expression @@ -66617,7 +67080,9 @@ var ts; } ts.createElementAccess = createElementAccess; function updateElementAccess(node, expression, argumentExpression) { - ts.Debug.assert(!(node.flags & 32 /* OptionalChain */), "Cannot update an ElementAccessChain using updateElementAccess. Use updateElementAccessChain instead."); + if (ts.isOptionalChain(node)) { + return updateElementAccessChain(node, expression, node.questionDotToken, argumentExpression); + } return node.expression !== expression || node.argumentExpression !== argumentExpression ? updateNode(createElementAccess(expression, argumentExpression), node) @@ -66651,7 +67116,9 @@ var ts; } ts.createCall = createCall; function updateCall(node, expression, typeArguments, argumentsArray) { - ts.Debug.assert(!(node.flags & 32 /* OptionalChain */), "Cannot update a CallChain using updateCall. Use updateCallChain instead."); + if (ts.isOptionalChain(node)) { + return updateCallChain(node, expression, node.questionDotToken, typeArguments, argumentsArray); + } return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray @@ -67253,7 +67720,7 @@ var ts; var node = createSynthesizedNode(231 /* ForOfStatement */); node.awaitModifier = awaitModifier; node.initializer = initializer; - node.expression = expression; + node.expression = ts.isCommaSequence(expression) ? createParen(expression) : expression; node.statement = asEmbeddedStatement(statement); return node; } @@ -69779,7 +70246,7 @@ var ts; var conditionalPrecedence = ts.getOperatorPrecedence(209 /* ConditionalExpression */, 57 /* QuestionToken */); var emittedCondition = ts.skipPartiallyEmittedExpressions(condition); var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition); - if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1 /* LessThan */) { + if (ts.compareValues(conditionPrecedence, conditionalPrecedence) !== 1 /* GreaterThan */) { return ts.createParen(condition); } return condition; @@ -70377,6 +70844,12 @@ var ts; * Gets the property name of a BindingOrAssignmentElement */ function getPropertyNameOfBindingOrAssignmentElement(bindingElement) { + var propertyName = tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement); + ts.Debug.assert(!!propertyName || ts.isSpreadAssignment(bindingElement), "Invalid property name for binding element."); + return propertyName; + } + ts.getPropertyNameOfBindingOrAssignmentElement = getPropertyNameOfBindingOrAssignmentElement; + function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { case 190 /* BindingElement */: // `a` in `let { a: b } = ...` @@ -70412,9 +70885,8 @@ var ts; ? target.expression : target; } - ts.Debug.fail("Invalid property name for binding element."); } - ts.getPropertyNameOfBindingOrAssignmentElement = getPropertyNameOfBindingOrAssignmentElement; + ts.tryGetPropertyNameOfBindingOrAssignmentElement = tryGetPropertyNameOfBindingOrAssignmentElement; function isStringOrNumericLiteral(node) { var kind = node.kind; return kind === 10 /* StringLiteral */ @@ -72433,7 +72905,8 @@ var ts; }; if (value) { value = ts.visitNode(value, visitor, ts.isExpression); - if (ts.isIdentifier(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText)) { + if (ts.isIdentifier(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText) || + bindingOrAssignmentElementContainsNonLiteralComputedName(node)) { // If the right-hand value of the assignment is also an assignment target then // we need to cache the right-hand value. value = ensureIdentifier(flattenContext, value, /*reuseIdentifierExpressions*/ false, location); @@ -72502,6 +72975,17 @@ var ts; } return false; } + function bindingOrAssignmentElementContainsNonLiteralComputedName(element) { + var propertyName = ts.tryGetPropertyNameOfBindingOrAssignmentElement(element); + if (propertyName && ts.isComputedPropertyName(propertyName) && !ts.isLiteralExpression(propertyName.expression)) { + return true; + } + var target = ts.getTargetOfBindingOrAssignmentElement(element); + return !!target && ts.isBindingOrAssignmentPattern(target) && bindingOrAssignmentPatternContainsNonLiteralComputedName(target); + } + function bindingOrAssignmentPatternContainsNonLiteralComputedName(pattern) { + return !!ts.forEach(ts.getElementsOfBindingOrAssignmentPattern(pattern), bindingOrAssignmentElementContainsNonLiteralComputedName); + } /** * Flattens a VariableDeclaration or ParameterDeclaration to one or more variable declarations. * @@ -72532,7 +73016,8 @@ var ts; }; if (ts.isVariableDeclaration(node)) { var initializer = ts.getInitializerOfBindingOrAssignmentElement(node); - if (initializer && ts.isIdentifier(initializer) && bindingOrAssignmentElementAssignsToName(node, initializer.escapedText)) { + if (initializer && (ts.isIdentifier(initializer) && bindingOrAssignmentElementAssignsToName(node, initializer.escapedText) || + bindingOrAssignmentElementContainsNonLiteralComputedName(node))) { // If the right-hand value of the assignment is also an assignment target then // we need to cache the right-hand value. initializer = ensureIdentifier(flattenContext, initializer, /*reuseIdentifierExpressions*/ false, initializer); @@ -73831,8 +74316,8 @@ var ts; function generateClassElementDecorationExpressions(node, isStatic) { var members = getDecoratedClassElements(node, isStatic); var expressions; - for (var _i = 0, members_5 = members; _i < members_5.length; _i++) { - var member = members_5[_i]; + for (var _i = 0, members_6 = members; _i < members_6.length; _i++) { + var member = members_6[_i]; var expression = generateClassElementDecorationExpression(node, member); if (expression) { if (!expressions) { @@ -74222,8 +74707,8 @@ var ts; // Note when updating logic here also update getEntityNameForDecoratorMetadata // so that aliases can be marked as referenced var serializedUnion; - for (var _i = 0, types_19 = types; _i < types_19.length; _i++) { - var typeNode = types_19[_i]; + for (var _i = 0, types_20 = types; _i < types_20.length; _i++) { + var typeNode = types_20[_i]; while (typeNode.kind === 181 /* ParenthesizedType */) { typeNode = typeNode.type; // Skip parens if need be } @@ -74835,7 +75320,12 @@ var ts; * * @param node The module declaration node. */ - function shouldEmitModuleDeclaration(node) { + function shouldEmitModuleDeclaration(nodeIn) { + var node = ts.getParseTreeNode(nodeIn, ts.isModuleDeclaration); + if (!node) { + // If we can't find a parse tree node, assume the node is instantiated. + return true; + } return ts.isInstantiatedModule(node, !!compilerOptions.preserveConstEnums || !!compilerOptions.isolatedModules); } /** @@ -75654,7 +76144,7 @@ var ts; // Create a temporary variable to store a computed property name (if necessary). // If it's not inlineable, then we emit an expression after the class which assigns // the property name to the temporary variable. - var expr = getPropertyNameExpressionIfNeeded(node.name, !!node.initializer); + var expr = getPropertyNameExpressionIfNeeded(node.name, !!node.initializer || !!context.getCompilerOptions().useDefineForClassFields); if (expr && !ts.isSimpleInlineableExpression(expr)) { (pendingExpressions || (pendingExpressions = [])).push(expr); } @@ -77411,7 +77901,7 @@ var ts; } return ts.updateParen(node, expression); } - function visitNonOptionalPropertyAccessExpression(node, captureThisArg) { + function visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg) { if (ts.isOptionalChain(node)) { // If `node` is an optional chain, then it is the outermost chain of an optional expression. return visitOptionalExpression(node, captureThisArg); @@ -77420,27 +77910,17 @@ var ts; ts.Debug.assertNotNode(expression, ts.isSyntheticReference); var thisArg; if (captureThisArg) { - // `a.b` -> { expression: `(_a = a).b`, thisArg: `_a` } - thisArg = ts.createTempVariable(hoistVariableDeclaration); - expression = ts.createParen(ts.createAssignment(thisArg, expression)); + if (shouldCaptureInTempVariable(expression)) { + thisArg = ts.createTempVariable(hoistVariableDeclaration); + expression = ts.createAssignment(thisArg, expression); + } + else { + thisArg = expression; + } } - expression = ts.updatePropertyAccess(node, expression, ts.visitNode(node.name, visitor, ts.isIdentifier)); - return thisArg ? ts.createSyntheticReferenceExpression(expression, thisArg) : expression; - } - function visitNonOptionalElementAccessExpression(node, captureThisArg) { - if (ts.isOptionalChain(node)) { - // If `node` is an optional chain, then it is the outermost chain of an optional expression. - return visitOptionalExpression(node, captureThisArg); - } - var expression = ts.visitNode(node.expression, visitor, ts.isExpression); - ts.Debug.assertNotNode(expression, ts.isSyntheticReference); - var thisArg; - if (captureThisArg) { - // `a[b]` -> { expression: `(_a = a)[b]`, thisArg: `_a` } - thisArg = ts.createTempVariable(hoistVariableDeclaration); - expression = ts.createParen(ts.createAssignment(thisArg, expression)); - } - expression = ts.updateElementAccess(node, expression, ts.visitNode(node.argumentExpression, visitor, ts.isExpression)); + expression = node.kind === 193 /* PropertyAccessExpression */ + ? ts.updatePropertyAccess(node, expression, ts.visitNode(node.name, visitor, ts.isIdentifier)) + : ts.updateElementAccess(node, expression, ts.visitNode(node.argumentExpression, visitor, ts.isExpression)); return thisArg ? ts.createSyntheticReferenceExpression(expression, thisArg) : expression; } function visitNonOptionalCallExpression(node, captureThisArg) { @@ -77453,8 +77933,8 @@ var ts; function visitNonOptionalExpression(node, captureThisArg) { switch (node.kind) { case 199 /* ParenthesizedExpression */: return visitNonOptionalParenthesizedExpression(node, captureThisArg); - case 193 /* PropertyAccessExpression */: return visitNonOptionalPropertyAccessExpression(node, captureThisArg); - case 194 /* ElementAccessExpression */: return visitNonOptionalElementAccessExpression(node, captureThisArg); + case 193 /* PropertyAccessExpression */: + case 194 /* ElementAccessExpression */: return visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg); case 195 /* CallExpression */: return visitNonOptionalCallExpression(node, captureThisArg); default: return ts.visitNode(node, visitor, ts.isExpression); } @@ -77462,31 +77942,36 @@ var ts; function visitOptionalExpression(node, captureThisArg) { var _a = flattenChain(node), expression = _a.expression, chain = _a.chain; var left = visitNonOptionalExpression(expression, ts.isCallChain(chain[0])); - var temp = ts.createTempVariable(hoistVariableDeclaration); var leftThisArg = ts.isSyntheticReference(left) ? left.thisArg : undefined; var leftExpression = ts.isSyntheticReference(left) ? left.expression : left; - var rightExpression = temp; + var capturedLeft = leftExpression; + if (shouldCaptureInTempVariable(leftExpression)) { + capturedLeft = ts.createTempVariable(hoistVariableDeclaration); + leftExpression = ts.createAssignment(capturedLeft, leftExpression); + } + var rightExpression = capturedLeft; var thisArg; for (var i = 0; i < chain.length; i++) { var segment = chain[i]; switch (segment.kind) { case 193 /* PropertyAccessExpression */: - if (i === chain.length - 1 && captureThisArg) { - thisArg = ts.createTempVariable(hoistVariableDeclaration); - rightExpression = ts.createParen(ts.createAssignment(thisArg, rightExpression)); - } - rightExpression = ts.createPropertyAccess(rightExpression, ts.visitNode(segment.name, visitor, ts.isIdentifier)); - break; case 194 /* ElementAccessExpression */: if (i === chain.length - 1 && captureThisArg) { - thisArg = ts.createTempVariable(hoistVariableDeclaration); - rightExpression = ts.createParen(ts.createAssignment(thisArg, rightExpression)); + if (shouldCaptureInTempVariable(rightExpression)) { + thisArg = ts.createTempVariable(hoistVariableDeclaration); + rightExpression = ts.createAssignment(thisArg, rightExpression); + } + else { + thisArg = rightExpression; + } } - rightExpression = ts.createElementAccess(rightExpression, ts.visitNode(segment.argumentExpression, visitor, ts.isExpression)); + rightExpression = segment.kind === 193 /* PropertyAccessExpression */ + ? ts.createPropertyAccess(rightExpression, ts.visitNode(segment.name, visitor, ts.isIdentifier)) + : ts.createElementAccess(rightExpression, ts.visitNode(segment.argumentExpression, visitor, ts.isExpression)); break; case 195 /* CallExpression */: if (i === 0 && leftThisArg) { - rightExpression = ts.createFunctionCall(rightExpression, leftThisArg, ts.visitNodes(segment.arguments, visitor, ts.isExpression)); + rightExpression = ts.createFunctionCall(rightExpression, leftThisArg.kind === 101 /* SuperKeyword */ ? ts.createThis() : leftThisArg, ts.visitNodes(segment.arguments, visitor, ts.isExpression)); } else { rightExpression = ts.createCall(rightExpression, @@ -77496,22 +77981,27 @@ var ts; } ts.setOriginalNode(rightExpression, segment); } - var target = ts.createConditional(ts.createLogicalOr(ts.createStrictEquality(ts.createAssignment(temp, leftExpression), ts.createNull()), ts.createStrictEquality(temp, ts.createVoidZero())), ts.createVoidZero(), rightExpression); + var target = ts.createConditional(createNotNullCondition(leftExpression, capturedLeft, /*invert*/ true), ts.createVoidZero(), rightExpression); return thisArg ? ts.createSyntheticReferenceExpression(target, thisArg) : target; } - function createNotNullCondition(node) { - return ts.createBinary(ts.createBinary(node, ts.createToken(37 /* ExclamationEqualsEqualsToken */), ts.createNull()), ts.createToken(55 /* AmpersandAmpersandToken */), ts.createBinary(node, ts.createToken(37 /* ExclamationEqualsEqualsToken */), ts.createVoidZero())); + function createNotNullCondition(left, right, invert) { + return ts.createBinary(ts.createBinary(left, ts.createToken(invert ? 36 /* EqualsEqualsEqualsToken */ : 37 /* ExclamationEqualsEqualsToken */), ts.createNull()), ts.createToken(invert ? 56 /* BarBarToken */ : 55 /* AmpersandAmpersandToken */), ts.createBinary(right, ts.createToken(invert ? 36 /* EqualsEqualsEqualsToken */ : 37 /* ExclamationEqualsEqualsToken */), ts.createVoidZero())); } function transformNullishCoalescingExpression(node) { - var expressions = []; var left = ts.visitNode(node.left, visitor, ts.isExpression); - if (!ts.isIdentifier(left)) { - var temp = ts.createTempVariable(hoistVariableDeclaration); - expressions.push(ts.createAssignment(temp, left)); - left = temp; + var right = left; + if (shouldCaptureInTempVariable(left)) { + right = ts.createTempVariable(hoistVariableDeclaration); + left = ts.createAssignment(right, left); } - expressions.push(ts.createParen(ts.createConditional(createNotNullCondition(left), left, ts.visitNode(node.right, visitor, ts.isExpression)))); - return ts.inlineExpressions(expressions); + return ts.createConditional(createNotNullCondition(left, right), right, ts.visitNode(node.right, visitor, ts.isExpression)); + } + function shouldCaptureInTempVariable(expression) { + // don't capture identifiers and `this` in a temporary variable + // `super` cannot be captured as it's no real variable + return !ts.isIdentifier(expression) && + expression.kind !== 103 /* ThisKeyword */ && + expression.kind !== 101 /* SuperKeyword */; } } ts.transformESNext = transformESNext; @@ -87669,6 +88159,7 @@ var ts; var combinedStatements; if (ts.isSourceFileJS(currentSourceFile)) { combinedStatements = ts.createNodeArray(transformDeclarationsForJS(node)); + refs.forEach(referenceVisitor); emittedImports = ts.filter(combinedStatements, ts.isAnyImportSyntax); } else { @@ -89440,7 +89931,11 @@ var ts; bundleBuildInfo.js = printer.bundleFileInfo; } function emitDeclarationFileOrBundle(sourceFileOrBundle, declarationFilePath, declarationMapPath, relativeToBuildInfo) { - if (!sourceFileOrBundle || !declarationFilePath) { + if (!sourceFileOrBundle) + return; + if (!declarationFilePath) { + if (emitOnlyDtsFiles || compilerOptions.emitDeclarationOnly) + emitSkipped = true; return; } var sourceFiles = ts.isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : sourceFileOrBundle.sourceFiles; @@ -92194,8 +92689,8 @@ var ts; bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "reference" /* Reference */, data: directive.fileName }); writeLine(); } - for (var _d = 0, types_20 = types; _d < types_20.length; _d++) { - var directive = types_20[_d]; + for (var _d = 0, types_21 = types; _d < types_21.length; _d++) { + var directive = types_21[_d]; var pos = writer.getTextPos(); writeComment("/// "); if (bundleFileInfo) @@ -94070,31 +94565,39 @@ var ts; if (existingDirectories.has(directoryPath)) { return true; } - if (system.directoryExists(directoryPath)) { + if ((compilerHost.directoryExists || system.directoryExists)(directoryPath)) { existingDirectories.set(directoryPath, true); return true; } return false; } - function ensureDirectoriesExist(directoryPath) { - if (directoryPath.length > ts.getRootLength(directoryPath) && !directoryExists(directoryPath)) { - var parentDirectory = ts.getDirectoryPath(directoryPath); - ensureDirectoriesExist(parentDirectory); - if (compilerHost.createDirectory) { - compilerHost.createDirectory(directoryPath); - } - else { - system.createDirectory(directoryPath); + function writeFile(fileName, data, writeByteOrderMark, onError) { + try { + ts.performance.mark("beforeIOWrite"); + // NOTE: If patchWriteFileEnsuringDirectory has been called, + // the system.writeFile will do its own directory creation and + // the ensureDirectoriesExist call will always be redundant. + ts.writeFileEnsuringDirectories(fileName, data, writeByteOrderMark, function (path, data, writeByteOrderMark) { return writeFileWorker(path, data, writeByteOrderMark); }, function (path) { return (compilerHost.createDirectory || system.createDirectory)(path); }, function (path) { return directoryExists(path); }); + ts.performance.mark("afterIOWrite"); + ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite"); + } + catch (e) { + if (onError) { + onError(e.message); } } } var outputFingerprints; - function writeFileIfUpdated(fileName, data, writeByteOrderMark) { + function writeFileWorker(fileName, data, writeByteOrderMark) { + if (!ts.isWatchSet(options) || !system.createHash || !system.getModifiedTime) { + system.writeFile(fileName, data, writeByteOrderMark); + return; + } if (!outputFingerprints) { outputFingerprints = ts.createMap(); } - var hash = system.createHash(data); // TODO: GH#18217 - var mtimeBefore = system.getModifiedTime(fileName); // TODO: GH#18217 + var hash = system.createHash(data); + var mtimeBefore = system.getModifiedTime(fileName); if (mtimeBefore) { var fingerprint = outputFingerprints.get(fileName); // If output has not been changed, and the file has no external modification @@ -94106,32 +94609,13 @@ var ts; } } system.writeFile(fileName, data, writeByteOrderMark); - var mtimeAfter = system.getModifiedTime(fileName) || ts.missingFileModifiedTime; // TODO: GH#18217 + var mtimeAfter = system.getModifiedTime(fileName) || ts.missingFileModifiedTime; outputFingerprints.set(fileName, { hash: hash, byteOrderMark: writeByteOrderMark, mtime: mtimeAfter }); } - function writeFile(fileName, data, writeByteOrderMark, onError) { - try { - ts.performance.mark("beforeIOWrite"); - ensureDirectoriesExist(ts.getDirectoryPath(ts.normalizePath(fileName))); - if (ts.isWatchSet(options) && system.createHash && system.getModifiedTime) { - writeFileIfUpdated(fileName, data, writeByteOrderMark); - } - else { - system.writeFile(fileName, data, writeByteOrderMark); - } - ts.performance.mark("afterIOWrite"); - ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite"); - } - catch (e) { - if (onError) { - onError(e.message); - } - } - } function getDefaultLibLocation() { return ts.getDirectoryPath(ts.normalizePath(system.getExecutingFilePath())); } @@ -95853,9 +96337,16 @@ var ts; } function getSourceFileFromReferenceWorker(fileName, getSourceFile, fail, refFile) { if (ts.hasExtension(fileName)) { - if (!options.allowNonTsExtensions && !ts.forEach(supportedExtensionsWithJsonIfResolveJsonModule, function (extension) { return ts.fileExtensionIs(host.getCanonicalFileName(fileName), extension); })) { - if (fail) - fail(ts.Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1, fileName, "'" + supportedExtensions.join("', '") + "'"); + var canonicalFileName_1 = host.getCanonicalFileName(fileName); + if (!options.allowNonTsExtensions && !ts.forEach(supportedExtensionsWithJsonIfResolveJsonModule, function (extension) { return ts.fileExtensionIs(canonicalFileName_1, extension); })) { + if (fail) { + if (ts.hasJSFileExtension(canonicalFileName_1)) { + fail(ts.Diagnostics.File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option, fileName); + } + else { + fail(ts.Diagnostics.File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1, fileName, "'" + supportedExtensions.join("', '") + "'"); + } + } return undefined; } var sourceFile = getSourceFile(fileName); @@ -95869,7 +96360,7 @@ var ts; fail(ts.Diagnostics.File_0_not_found, fileName); } } - else if (refFile && host.getCanonicalFileName(fileName) === host.getCanonicalFileName(refFile.fileName)) { + else if (refFile && canonicalFileName_1 === host.getCanonicalFileName(refFile.fileName)) { fail(ts.Diagnostics.A_file_cannot_have_a_reference_to_itself); } } @@ -95927,6 +96418,19 @@ var ts; function findSourceFile(fileName, path, isDefaultLib, ignoreNoDefaultLib, refFile, packageId) { if (useSourceOfProjectReferenceRedirect) { var source = getSourceOfProjectReferenceRedirect(fileName); + // If preserveSymlinks is true, module resolution wont jump the symlink + // but the resolved real path may be the .d.ts from project reference + // Note:: Currently we try the real path only if the + // file is from node_modules to avoid having to run real path on all file paths + if (!source && + host.realpath && + options.preserveSymlinks && + ts.isDeclarationFileName(fileName) && + ts.stringContains(fileName, ts.nodeModulesPathPart)) { + var realPath = host.realpath(fileName); + if (realPath !== fileName) + source = getSourceOfProjectReferenceRedirect(realPath); + } if (source) { var file_1 = ts.isString(source) ? findSourceFile(source, toPath(source), isDefaultLib, ignoreNoDefaultLib, refFile, packageId) : @@ -96457,9 +96961,6 @@ var ts; else if (options.incremental && !options.outFile && !options.out && !options.configFilePath) { programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified)); } - if (options.noEmit && ts.isIncrementalCompilation(options)) { - createDiagnosticForOptionName(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", options.incremental ? "incremental" : "composite"); - } verifyProjectReferences(); // List of collected files is complete; validate exhautiveness if this is a project with a file list if (options.composite) { @@ -97504,6 +98005,7 @@ var ts; ts.Debug.assert(state.seenAffectedFiles === undefined); state.seenAffectedFiles = ts.createMap(); } + state.emittedBuildInfo = !state.changedFilesSet.size && !state.affectedFilesPendingEmit; return state; } function convertToDiagnostics(diagnostics, newProgram, getCanonicalFileName) { @@ -98234,7 +98736,7 @@ var ts; } var state = { fileInfos: fileInfos, - compilerOptions: convertFromReusableCompilerOptions(program.options, toAbsolutePath), + compilerOptions: ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath), referencedMap: getMapOfReferencedSet(program.referencedMap, toPath), exportedModulesMap: getMapOfReferencedSet(program.exportedModulesMap, toPath), semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toPath(ts.isString(value) ? value : value[0]); }, function (value) { return ts.isString(value) ? ts.emptyArray : value[1]; }), @@ -98270,33 +98772,6 @@ var ts; } } ts.createBuildProgramUsingProgramBuildInfo = createBuildProgramUsingProgramBuildInfo; - function convertFromReusableCompilerOptions(options, toAbsolutePath) { - var result = {}; - var optionsNameMap = ts.getOptionNameMap().optionNameMap; - for (var name in options) { - if (ts.hasProperty(options, name)) { - result[name] = convertFromReusableCompilerOptionValue(optionsNameMap.get(name.toLowerCase()), options[name], toAbsolutePath); - } - } - if (result.configFilePath) { - result.configFilePath = toAbsolutePath(result.configFilePath); - } - return result; - } - function convertFromReusableCompilerOptionValue(option, value, toAbsolutePath) { - if (option) { - if (option.type === "list") { - var values = value; - if (option.element.isFilePath && values.length) { - return values.map(toAbsolutePath); - } - } - else if (option.isFilePath) { - return toAbsolutePath(value); - } - } - return value; - } function createRedirectedBuilderProgram(state, configFileParsingDiagnostics) { return { getState: ts.notImplemented, @@ -99029,7 +99504,7 @@ var ts; function getPreferencesForUpdate(compilerOptions, oldImportSpecifier) { return { relativePreference: ts.isExternalModuleNameRelative(oldImportSpecifier) ? 0 /* Relative */ : 1 /* NonRelative */, - ending: ts.hasJSOrJsonFileExtension(oldImportSpecifier) ? + ending: ts.hasJSFileExtension(oldImportSpecifier) ? 2 /* JsExtension */ : ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeJs || ts.endsWith(oldImportSpecifier, "index") ? 1 /* Index */ : 0 /* Minimal */, }; @@ -99115,7 +99590,7 @@ var ts; var imports = _a.imports; return ts.firstDefined(imports, function (_a) { var text = _a.text; - return ts.pathIsRelative(text) ? ts.hasJSOrJsonFileExtension(text) : undefined; + return ts.pathIsRelative(text) ? ts.hasJSFileExtension(text) : undefined; }) || false; } function numberOfDirectorySeparators(str) { @@ -99249,10 +99724,13 @@ var ts; // Simplify the full file path to something that can be resolved by Node. // If the module could be imported by a directory name, use that directory's name var moduleSpecifier = packageNameOnly ? moduleFileName : getDirectoryOrExtensionlessFileName(moduleFileName); + var globalTypingsCacheLocation = host.getGlobalTypingsCacheLocation && host.getGlobalTypingsCacheLocation(); // Get a path that's relative to node_modules or the importing file's path // if node_modules folder is in this folder or any of its parent folders, no need to keep it. - if (!ts.startsWith(sourceDirectory, getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex)))) + var pathToTopLevelNodeModules = getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex)); + if (!(ts.startsWith(sourceDirectory, pathToTopLevelNodeModules) || globalTypingsCacheLocation && ts.startsWith(getCanonicalFileName(globalTypingsCacheLocation), pathToTopLevelNodeModules))) { return undefined; + } // If the module was found in @types, get the actual Node package name var nodeModulesDirectoryName = moduleSpecifier.substring(parts.topLevelPackageNameIndex + 1); var packageName = ts.getPackageNameFromTypesPackageName(nodeModulesDirectoryName); @@ -99477,7 +99955,7 @@ var ts; /** Parses config file using System interface */ function parseConfigFileWithSystem(configFileName, optionsToExtend, system, reportDiagnostic) { var host = system; - host.onUnRecoverableConfigFileDiagnostic = function (diagnostic) { return reportUnrecoverableDiagnostic(ts.sys, reportDiagnostic, diagnostic); }; + host.onUnRecoverableConfigFileDiagnostic = function (diagnostic) { return reportUnrecoverableDiagnostic(system, reportDiagnostic, diagnostic); }; var result = ts.getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host); host.onUnRecoverableConfigFileDiagnostic = undefined; // TODO: GH#18217 return result; @@ -99501,7 +99979,7 @@ var ts; } ts.getErrorSummaryText = getErrorSummaryText; function listFiles(program, writeFileName) { - if (program.getCompilerOptions().listFiles) { + if (program.getCompilerOptions().listFiles || program.getCompilerOptions().listFilesOnly) { ts.forEach(program.getSourceFiles(), function (file) { writeFileName(file.fileName); }); @@ -99512,6 +99990,7 @@ var ts; * Helper that emit files, report diagnostics and lists emitted and/or source files depending on compiler options */ function emitFilesAndReportErrors(program, reportDiagnostic, writeFileName, reportSummary, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers) { + var isListFilesOnly = !!program.getCompilerOptions().listFilesOnly; // First get and report any syntactic errors. var diagnostics = program.getConfigFileParsingDiagnostics().slice(); var configFileParsingDiagnosticsLength = diagnostics.length; @@ -99520,13 +99999,17 @@ var ts; // semantic errors. if (diagnostics.length === configFileParsingDiagnosticsLength) { ts.addRange(diagnostics, program.getOptionsDiagnostics(cancellationToken)); - ts.addRange(diagnostics, program.getGlobalDiagnostics(cancellationToken)); - if (diagnostics.length === configFileParsingDiagnosticsLength) { - ts.addRange(diagnostics, program.getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken)); + if (!isListFilesOnly) { + ts.addRange(diagnostics, program.getGlobalDiagnostics(cancellationToken)); + if (diagnostics.length === configFileParsingDiagnosticsLength) { + ts.addRange(diagnostics, program.getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken)); + } } } // Emit and report any errors we ran into. - var emitResult = program.emit(/*targetSourceFile*/ undefined, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers); + var emitResult = isListFilesOnly + ? { emitSkipped: true, diagnostics: ts.emptyArray } + : program.emit(/*targetSourceFile*/ undefined, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers); var emittedFiles = emitResult.emittedFiles, emitDiagnostics = emitResult.diagnostics; ts.addRange(diagnostics, emitDiagnostics); ts.sortAndDeduplicateDiagnostics(diagnostics).forEach(reportDiagnostic); @@ -99629,19 +100112,13 @@ var ts; createHash: ts.maybeBind(host, host.createHash), readDirectory: ts.maybeBind(host, host.readDirectory), }; - function ensureDirectoriesExist(directoryPath) { - if (directoryPath.length > ts.getRootLength(directoryPath) && !host.directoryExists(directoryPath)) { - var parentDirectory = ts.getDirectoryPath(directoryPath); - ensureDirectoriesExist(parentDirectory); - if (host.createDirectory) - host.createDirectory(directoryPath); - } - } function writeFile(fileName, text, writeByteOrderMark, onError) { try { ts.performance.mark("beforeIOWrite"); - ensureDirectoriesExist(ts.getDirectoryPath(ts.normalizePath(fileName))); - host.writeFile(fileName, text, writeByteOrderMark); + // NOTE: If patchWriteFileEnsuringDirectory has been called, + // the host.writeFile will do its own directory creation and + // the ensureDirectoriesExist call will always be redundant. + ts.writeFileEnsuringDirectories(fileName, text, writeByteOrderMark, function (path, data, writeByteOrderMark) { return host.writeFile(path, data, writeByteOrderMark); }, function (path) { return host.createDirectory(path); }, function (path) { return host.directoryExists(path); }); ts.performance.mark("afterIOWrite"); ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite"); } @@ -101418,30 +101895,25 @@ var ts; setupInitialBuild(state, cancellationToken); var reportQueue = true; var successfulProjects = 0; - var errorProjects = 0; while (true) { var invalidatedProject = getNextInvalidatedProject(state, buildOrder, reportQueue); if (!invalidatedProject) break; reportQueue = false; invalidatedProject.done(cancellationToken); - if (state.diagnostics.has(invalidatedProject.projectPath)) { - errorProjects++; - } - else { + if (!state.diagnostics.has(invalidatedProject.projectPath)) successfulProjects++; - } } disableCache(state); reportErrorSummary(state, buildOrder); startWatching(state, buildOrder); - return isCircularBuildOrder(buildOrder) ? - ts.ExitStatus.ProjectReferenceCycle_OutputsSkupped : - errorProjects ? - successfulProjects ? - ts.ExitStatus.DiagnosticsPresent_OutputsGenerated : - ts.ExitStatus.DiagnosticsPresent_OutputsSkipped : - ts.ExitStatus.Success; + return isCircularBuildOrder(buildOrder) + ? ts.ExitStatus.ProjectReferenceCycle_OutputsSkipped + : !buildOrder.some(function (p) { return state.diagnostics.has(toResolvedConfigFilePath(state, p)); }) + ? ts.ExitStatus.Success + : successfulProjects + ? ts.ExitStatus.DiagnosticsPresent_OutputsGenerated + : ts.ExitStatus.DiagnosticsPresent_OutputsSkipped; } function clean(state, project, onlyReferences) { var buildOrder = getBuildOrderFor(state, project, onlyReferences); @@ -101449,7 +101921,7 @@ var ts; return ts.ExitStatus.InvalidProject_OutputsSkipped; if (isCircularBuildOrder(buildOrder)) { reportErrors(state, buildOrder.circularDiagnostics); - return ts.ExitStatus.ProjectReferenceCycle_OutputsSkupped; + return ts.ExitStatus.ProjectReferenceCycle_OutputsSkipped; } var options = state.options, host = state.host; var filesToDelete = options.dry ? [] : undefined; @@ -103744,6 +104216,25 @@ var ts; return a.fileName === b.fileName && textSpansEqual(a.textSpan, b.textSpan); } ts.documentSpansEqual = documentSpansEqual; + /** + * Iterates through 'array' by index and performs the callback on each element of array until the callback + * returns a truthy value, then returns that value. + * If no such value is found, the callback is applied to each element of array and undefined is returned. + */ + function forEachUnique(array, callback) { + if (array) { + for (var i = 0; i < array.length; i++) { + if (array.indexOf(array[i]) === i) { + var result = callback(array[i], i); + if (result) { + return result; + } + } + } + } + return undefined; + } + ts.forEachUnique = forEachUnique; })(ts || (ts = {})); // Display-part writer helpers /* @internal */ @@ -104491,10 +104982,11 @@ var ts; } var dependencyKeys = ["dependencies", "devDependencies", "optionalDependencies", "peerDependencies"]; var stringContent = host.readFile(fileName); - var content = stringContent && tryParseJson(stringContent); - if (!content) { + if (!stringContent) return undefined; - } + var content = tryParseJson(stringContent); + if (!content) + return false; var info = {}; for (var _i = 0, dependencyKeys_1 = dependencyKeys; _i < dependencyKeys_1.length; _i++) { var key = dependencyKeys_1[_i]; @@ -105019,8 +105511,10 @@ var ts; }); return { spans: spans, endOfLineState: 0 /* None */ }; function pushClassification(start, end, type) { + var length = end - start; + ts.Debug.assert(length > 0, "Classification had non-positive length of " + length); spans.push(start); - spans.push(end - start); + spans.push(length); spans.push(type); } } @@ -105439,8 +105933,7 @@ var ts; return 25 /* bigintLiteral */; } else if (tokenKind === 10 /* StringLiteral */) { - // TODO: GH#18217 - return token.parent.kind === 271 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; + return token && token.parent.kind === 271 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; } else if (tokenKind === 13 /* RegularExpressionLiteral */) { // TODO: we should get another classification type for these literals. @@ -105698,7 +106191,7 @@ var ts; var candidates = []; checker.getResolvedSignature(argumentInfo.invocation, candidates, argumentInfo.argumentCount); var types = ts.flatMap(candidates, function (candidate) { - if (!candidate.hasRestParameter && argumentInfo.argumentCount > candidate.parameters.length) + if (!ts.signatureHasRestParameter(candidate) && argumentInfo.argumentCount > candidate.parameters.length) return; var type = checker.getParameterType(candidate, argumentInfo.argumentIndex); isNewIdentifier = isNewIdentifier || !!(type.flags & 4 /* String */); @@ -106848,6 +107341,7 @@ var ts; var completionKind = 5 /* None */; var isNewIdentifierLocation = false; var keywordFilters = 0 /* None */; + // This also gets mutated in nested-functions after the return var symbols = []; var symbolToOriginInfoMap = []; var symbolToSortTextMap = []; @@ -106954,8 +107448,15 @@ var ts; var type = typeChecker.getTypeOfSymbolAtLocation(symbol, node).getNonOptionalType(); var insertQuestionDot = false; if (type.isNullableType()) { - insertQuestionDot = isRightOfDot && !isRightOfQuestionDot; - type = type.getNonNullableType(); + var canCorrectToQuestionDot = isRightOfDot && + !isRightOfQuestionDot && + preferences.includeAutomaticOptionalChainCompletions !== false; + if (canCorrectToQuestionDot || isRightOfQuestionDot) { + type = type.getNonNullableType(); + if (canCorrectToQuestionDot) { + insertQuestionDot = true; + } + } } addTypeProperties(type, !!(node.flags & 32768 /* AwaitContext */), insertQuestionDot); } @@ -106972,8 +107473,15 @@ var ts; var type = typeChecker.getTypeAtLocation(node).getNonOptionalType(); var insertQuestionDot = false; if (type.isNullableType()) { - insertQuestionDot = isRightOfDot && !isRightOfQuestionDot; - type = type.getNonNullableType(); + var canCorrectToQuestionDot = isRightOfDot && + !isRightOfQuestionDot && + preferences.includeAutomaticOptionalChainCompletions !== false; + if (canCorrectToQuestionDot || isRightOfQuestionDot) { + type = type.getNonNullableType(); + if (canCorrectToQuestionDot) { + insertQuestionDot = true; + } + } } addTypeProperties(type, !!(node.flags & 32768 /* AwaitContext */), insertQuestionDot); } @@ -107275,7 +107783,7 @@ var ts; typeChecker.getExportsOfModule(sym).some(function (e) { return symbolCanBeReferencedAtTypeLocation(e, seenModules); }); } /** - * Gathers symbols that can be imported from other files, deduplicating along the way. Symbols can be “duplicates” + * Gathers symbols that can be imported from other files, de-duplicating along the way. Symbols can be "duplicates" * if re-exported from another module, e.g. `export { foo } from "./a"`. That syntax creates a fresh symbol, but * it’s just an alias to the first, and both have the same name, so we generally want to filter those aliases out, * if and only if the the first can be imported (it may be excluded due to package.json filtering in @@ -107351,7 +107859,7 @@ var ts; // Don't add another completion for `export =` of a symbol that's already global. // So in `declare namespace foo {} declare module "foo" { export = foo; }`, there will just be the global completion for `foo`. if (resolvedModuleSymbol !== moduleSymbol && - ts.every(resolvedModuleSymbol.declarations, function (d) { return !!d.getSourceFile().externalModuleIndicator; })) { + ts.every(resolvedModuleSymbol.declarations, function (d) { return !!d.getSourceFile().externalModuleIndicator && !ts.findAncestor(d, ts.isGlobalScopeAugmentation); })) { pushSymbol(resolvedModuleSymbol, moduleSymbol, /*skipFilter*/ true); } for (var _i = 0, _a = typeChecker.getExportsOfModule(moduleSymbol); _i < _a.length; _i++) { @@ -107465,7 +107973,16 @@ var ts; } if (contextToken.kind === 31 /* GreaterThanToken */ && contextToken.parent) { if (contextToken.parent.kind === 266 /* JsxOpeningElement */) { - return true; + // Two possibilities: + // 1.
/**/ + // - contextToken: GreaterThanToken (before cursor) + // - location: JSXElement + // - different parents (JSXOpeningElement, JSXElement) + // 2. /**/> + // - contextToken: GreaterThanToken (before cursor) + // - location: GreaterThanToken (after cursor) + // - same parent (JSXOpeningElement) + return location.parent.kind !== 266 /* JsxOpeningElement */; } if (contextToken.parent.kind === 267 /* JsxClosingElement */ || contextToken.parent.kind === 265 /* JsxSelfClosingElement */) { return !!contextToken.parent.parent && contextToken.parent.parent.kind === 264 /* JsxElement */; @@ -107540,7 +108057,7 @@ var ts; var typeMembers; var existingMembers; if (objectLikeContainer.kind === 192 /* ObjectLiteralExpression */) { - var typeForObject = typeChecker.getContextualType(objectLikeContainer); + var typeForObject = typeChecker.getContextualType(objectLikeContainer, 4 /* Completion */); if (!typeForObject) return 2 /* Fail */; isNewIdentifierLocation = ts.hasIndexSignature(typeForObject); @@ -108117,6 +108634,8 @@ var ts; return isFunctionLikeBodyKeyword(kind) || kind === 129 /* DeclareKeyword */ || kind === 134 /* ModuleKeyword */ + || kind === 144 /* TypeKeyword */ + || kind === 135 /* NamespaceKeyword */ || ts.isTypeKeyword(kind) && kind !== 145 /* UndefinedKeyword */; case 5 /* FunctionLikeBodyKeywords */: return isFunctionLikeBodyKeyword(kind); @@ -109926,7 +110445,7 @@ var ts; return undefined; } function getReferencedSymbolsForModuleIfDeclaredBySourceFile(symbol, program, sourceFiles, cancellationToken, options, sourceFilesSet) { - var moduleSourceFile = symbol.flags & 1536 /* Module */ ? ts.find(symbol.declarations, ts.isSourceFile) : undefined; + var moduleSourceFile = (symbol.flags & 1536 /* Module */) && symbol.declarations && ts.find(symbol.declarations, ts.isSourceFile); if (!moduleSourceFile) return undefined; var exportEquals = symbol.exports.get("export=" /* ExportEquals */); @@ -110651,8 +111170,10 @@ var ts; || exportSpecifier.name.originalKeywordKind === 83 /* DefaultKeyword */; var exportKind = isDefaultExport ? 1 /* Default */ : 0 /* Named */; var exportSymbol = ts.Debug.assertDefined(exportSpecifier.symbol); - var exportInfo = ts.Debug.assertDefined(FindAllReferences.getExportInfo(exportSymbol, exportKind, state.checker)); - searchForImportsOfExport(referenceLocation, exportSymbol, exportInfo, state); + var exportInfo = FindAllReferences.getExportInfo(exportSymbol, exportKind, state.checker); + if (exportInfo) { + searchForImportsOfExport(referenceLocation, exportSymbol, exportInfo, state); + } } // At `export { x } from "foo"`, also search for the imported symbol `"foo".x`. if (search.comingFrom !== 1 /* Export */ && exportDeclaration.moduleSpecifier && !propertyName && !isForRenameWithPrefixAndSuffixText(state.options)) { @@ -111863,7 +112384,7 @@ var ts; // The property length will have two declarations of property length coming // from Array - Array and Array var documentationComment = []; - forEachUnique(declarations, function (declaration) { + ts.forEachUnique(declarations, function (declaration) { for (var _i = 0, _a = getCommentHavingNodes(declaration); _i < _a.length; _i++) { var comment = _a[_i].comment; if (comment === undefined) @@ -111892,7 +112413,7 @@ var ts; function getJsDocTagsFromDeclarations(declarations) { // Only collect doc comments from duplicate declarations once. var tags = []; - forEachUnique(declarations, function (declaration) { + ts.forEachUnique(declarations, function (declaration) { for (var _i = 0, _a = ts.getJSDocTags(declaration); _i < _a.length; _i++) { var tag = _a[_i]; tags.push({ name: tag.tagName.text, text: getCommentText(tag) }); @@ -111929,24 +112450,6 @@ var ts; return comment === undefined ? s : s + " " + comment; } } - /** - * Iterates through 'array' by index and performs the callback on each element of array until the callback - * returns a truthy value, then returns that value. - * If no such value is found, the callback is applied to each element of array and undefined is returned. - */ - function forEachUnique(array, callback) { - if (array) { - for (var i = 0; i < array.length; i++) { - if (array.indexOf(array[i]) === i) { - var result = callback(array[i], i); - if (result) { - return result; - } - } - } - } - return undefined; - } function getJSDocTagNameCompletions() { return jsDocTagNameCompletionEntries || (jsDocTagNameCompletionEntries = ts.map(jsDocTagNames, function (tagName) { return { @@ -112871,7 +113374,8 @@ var ts; } var declName = ts.getNameOfDeclaration(node); if (declName && ts.isPropertyName(declName)) { - return ts.unescapeLeadingUnderscores(ts.getPropertyNameForPropertyNameNode(declName)); // TODO: GH#18217 + var propertyName = ts.getPropertyNameForPropertyNameNode(declName); + return propertyName && ts.unescapeLeadingUnderscores(propertyName); } switch (node.kind) { case 200 /* FunctionExpression */: @@ -113641,6 +114145,9 @@ var ts; case 265 /* JsxSelfClosingElement */: case 266 /* JsxOpeningElement */: return spanForJSXAttributes(n.attributes); + case 210 /* TemplateExpression */: + case 14 /* NoSubstitutionTemplateLiteral */: + return spanForTemplateLiteral(n); } function spanForJSXElement(node) { var textSpan = ts.createTextSpanFromBounds(node.openingElement.getStart(sourceFile), node.closingElement.getEnd()); @@ -113659,6 +114166,12 @@ var ts; } return createOutliningSpanFromBounds(node.getStart(sourceFile), node.getEnd(), "code" /* Code */); } + function spanForTemplateLiteral(node) { + if (node.kind === 14 /* NoSubstitutionTemplateLiteral */ && node.text.length === 0) { + return undefined; + } + return createOutliningSpanFromBounds(node.getStart(sourceFile), node.getEnd(), "code" /* Code */); + } function spanForObjectOrArrayLiteral(node, open) { if (open === void 0) { open = 18 /* OpenBraceToken */; } // If the block has no leading keywords and is inside an array literal or call expression, @@ -115961,7 +116474,7 @@ var ts; // get the signature from the declaration and write it var functionDeclaration_1 = location.parent; // Use function declaration to write the signatures only if the symbol corresponding to this declaration - var locationIsSymbolDeclaration = ts.find(symbol.declarations, function (declaration) { + var locationIsSymbolDeclaration = symbol.declarations && ts.find(symbol.declarations, function (declaration) { return declaration === (location.kind === 128 /* ConstructorKeyword */ ? functionDeclaration_1.parent : functionDeclaration_1); }); if (locationIsSymbolDeclaration) { @@ -116868,8 +117381,8 @@ var ts; rule("SpaceAfterQuestionMarkInConditionalOperator", 57 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* InsertSpace */), // in other cases there should be no space between '?' and next token rule("NoSpaceAfterQuestionMark", 57 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("NoSpaceBeforeDot", anyToken, 24 /* DotToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("NoSpaceAfterDot", 24 /* DotToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), + rule("NoSpaceBeforeDot", anyToken, [24 /* DotToken */, 28 /* QuestionDotToken */], [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), + rule("NoSpaceAfterDot", [24 /* DotToken */, 28 /* QuestionDotToken */], anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), rule("NoSpaceBetweenImportParenInImportType", 95 /* ImportKeyword */, 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* DeleteSpace */), // Special handling of unary operators. // Prefix operators generally shouldn't have a space between @@ -119001,7 +119514,10 @@ var ts; if (ts.isCallOrNewExpression(parent)) { if (!parent.arguments) return false; - var currentNode = ts.Debug.assertDefined(ts.find(parent.arguments, function (arg) { return arg.pos === child.pos; })); + var currentNode = ts.find(parent.arguments, function (arg) { return arg.pos === child.pos; }); + // If it's not one of the arguments, don't look past this + if (!currentNode) + return false; var currentIndex = parent.arguments.indexOf(currentNode); if (currentIndex === 0) return false; // Can't look at previous node if first @@ -119420,6 +119936,18 @@ var ts; cb(tracker); return tracker.getChanges(); }; + ChangeTracker.prototype.pushRaw = function (sourceFile, change) { + ts.Debug.assertEqual(sourceFile.fileName, change.fileName); + for (var _i = 0, _a = change.textChanges; _i < _a.length; _i++) { + var c = _a[_i]; + this.changes.push({ + kind: ChangeKind.Text, + sourceFile: sourceFile, + text: c.newText, + range: ts.createTextRangeFromSpan(c.span), + }); + } + }; ChangeTracker.prototype.deleteRange = function (sourceFile, range) { this.changes.push({ kind: ChangeKind.Remove, sourceFile: sourceFile, range: range }); }; @@ -119548,7 +120076,7 @@ var ts; endNode = ts.findChildOfKind(node, 21 /* CloseParenToken */, sourceFile); if (!endNode) { if (!ts.isArrowFunction(node)) - return; // Function missing parentheses, give up + return false; // Function missing parentheses, give up // If no `)`, is an arrow function `x => x`, so use the end of the first parameter endNode = ts.first(node.parameters); } @@ -119557,6 +120085,7 @@ var ts; endNode = node.kind !== 241 /* VariableDeclaration */ && node.questionToken ? node.questionToken : node.name; } this.insertNodeAt(sourceFile, endNode.end, type, { prefix: ": " }); + return true; }; ChangeTracker.prototype.tryInsertThisTypeAnnotation = function (sourceFile, node, type) { var start = ts.findChildOfKind(node, 20 /* OpenParenToken */, sourceFile).getStart(sourceFile) + 1; @@ -121183,20 +121712,20 @@ var ts; codefix.registerCodeFix({ errorCodes: errorCodes, getCodeActions: function (context) { - var sourceFile = context.sourceFile, program = context.program, start = context.span.start, errorCode = context.errorCode, cancellationToken = context.cancellationToken, host = context.host; + var sourceFile = context.sourceFile, program = context.program, start = context.span.start, errorCode = context.errorCode, cancellationToken = context.cancellationToken, host = context.host, formatContext = context.formatContext, preferences = context.preferences; var token = ts.getTokenAtPosition(sourceFile, start); var declaration; - var changes = ts.textChanges.ChangeTracker.with(context, function (changes) { declaration = doChange(changes, sourceFile, token, errorCode, program, cancellationToken, /*markSeen*/ ts.returnTrue, host); }); + var changes = ts.textChanges.ChangeTracker.with(context, function (changes) { declaration = doChange(changes, sourceFile, token, errorCode, program, cancellationToken, /*markSeen*/ ts.returnTrue, host, formatContext, preferences); }); var name = declaration && ts.getNameOfDeclaration(declaration); return !name || changes.length === 0 ? undefined : [codefix.createCodeFixAction(fixId, changes, [getDiagnostic(errorCode, token), name.getText(sourceFile)], fixId, ts.Diagnostics.Infer_all_types_from_usage)]; }, fixIds: [fixId], getAllCodeActions: function (context) { - var sourceFile = context.sourceFile, program = context.program, cancellationToken = context.cancellationToken, host = context.host; + var sourceFile = context.sourceFile, program = context.program, cancellationToken = context.cancellationToken, host = context.host, formatContext = context.formatContext, preferences = context.preferences; var markSeen = ts.nodeSeenTracker(); return codefix.codeFixAll(context, errorCodes, function (changes, err) { - doChange(changes, sourceFile, ts.getTokenAtPosition(err.file, err.start), err.code, program, cancellationToken, markSeen, host); + doChange(changes, sourceFile, ts.getTokenAtPosition(err.file, err.start), err.code, program, cancellationToken, markSeen, host, formatContext, preferences); }); }, }); @@ -121236,7 +121765,7 @@ var ts; } return errorCode; } - function doChange(changes, sourceFile, token, errorCode, program, cancellationToken, markSeen, host) { + function doChange(changes, sourceFile, token, errorCode, program, cancellationToken, markSeen, host, formatContext, preferences) { if (!ts.isParameterPropertyModifier(token.kind) && token.kind !== 75 /* Identifier */ && token.kind !== 25 /* DotDotDotToken */ && token.kind !== 103 /* ThisKeyword */) { return undefined; } @@ -121247,7 +121776,7 @@ var ts; case ts.Diagnostics.Member_0_implicitly_has_an_1_type.code: case ts.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code: if ((ts.isVariableDeclaration(parent) && markSeen(parent)) || ts.isPropertyDeclaration(parent) || ts.isPropertySignature(parent)) { // handle bad location - annotateVariableDeclaration(changes, sourceFile, parent, program, host, cancellationToken); + annotateVariableDeclaration(changes, sourceFile, parent, program, host, cancellationToken, formatContext, preferences); return parent; } if (ts.isPropertyAccessExpression(parent)) { @@ -121264,7 +121793,7 @@ var ts; case ts.Diagnostics.Variable_0_implicitly_has_an_1_type.code: { var symbol = program.getTypeChecker().getSymbolAtLocation(token); if (symbol && symbol.valueDeclaration && ts.isVariableDeclaration(symbol.valueDeclaration) && markSeen(symbol.valueDeclaration)) { - annotateVariableDeclaration(changes, sourceFile, symbol.valueDeclaration, program, host, cancellationToken); + annotateVariableDeclaration(changes, sourceFile, symbol.valueDeclaration, program, host, cancellationToken, formatContext, preferences); return symbol.valueDeclaration; } return undefined; @@ -121278,14 +121807,14 @@ var ts; // Parameter declarations case ts.Diagnostics.Parameter_0_implicitly_has_an_1_type.code: if (ts.isSetAccessorDeclaration(containingFunction)) { - annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken); + annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken, formatContext, preferences); return containingFunction; } // falls through case ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code: if (markSeen(containingFunction)) { var param = ts.cast(parent, ts.isParameter); - annotateParameters(changes, sourceFile, param, containingFunction, program, host, cancellationToken); + annotateParameters(changes, sourceFile, param, containingFunction, program, host, cancellationToken, formatContext, preferences); return param; } return undefined; @@ -121293,14 +121822,14 @@ var ts; case ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code: case ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code: if (ts.isGetAccessorDeclaration(containingFunction) && ts.isIdentifier(containingFunction.name)) { - annotate(changes, sourceFile, containingFunction, inferTypeForVariableFromUsage(containingFunction.name, program, cancellationToken), program, host); + annotate(changes, sourceFile, containingFunction, inferTypeForVariableFromUsage(containingFunction.name, program, cancellationToken), program, host, formatContext, preferences); return containingFunction; } return undefined; // Set Accessor declarations case ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code: if (ts.isSetAccessorDeclaration(containingFunction)) { - annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken); + annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken, formatContext, preferences); return containingFunction; } return undefined; @@ -121315,12 +121844,12 @@ var ts; return ts.Debug.fail(String(errorCode)); } } - function annotateVariableDeclaration(changes, sourceFile, declaration, program, host, cancellationToken) { + function annotateVariableDeclaration(changes, sourceFile, declaration, program, host, cancellationToken, formatContext, preferences) { if (ts.isIdentifier(declaration.name)) { - annotate(changes, sourceFile, declaration, inferTypeForVariableFromUsage(declaration.name, program, cancellationToken), program, host); + annotate(changes, sourceFile, declaration, inferTypeForVariableFromUsage(declaration.name, program, cancellationToken), program, host, formatContext, preferences); } } - function annotateParameters(changes, sourceFile, parameterDeclaration, containingFunction, program, host, cancellationToken) { + function annotateParameters(changes, sourceFile, parameterDeclaration, containingFunction, program, host, cancellationToken, formatContext, preferences) { if (!ts.isIdentifier(parameterDeclaration.name)) { return; } @@ -121336,7 +121865,7 @@ var ts; for (var _i = 0, parameterInferences_1 = parameterInferences; _i < parameterInferences_1.length; _i++) { var _a = parameterInferences_1[_i], declaration = _a.declaration, type = _a.type; if (declaration && !declaration.type && !declaration.initializer) { - annotate(changes, sourceFile, declaration, type, program, host); + annotate(changes, sourceFile, declaration, type, program, host, formatContext, preferences); } } if (needParens) @@ -121365,7 +121894,7 @@ var ts; ts.createJSDocThisTag(ts.createJSDocTypeExpression(typeNode)), ]); } - function annotateSetAccessor(changes, sourceFile, setAccessorDeclaration, program, host, cancellationToken) { + function annotateSetAccessor(changes, sourceFile, setAccessorDeclaration, program, host, cancellationToken, formatContext, preferences) { var param = ts.firstOrUndefined(setAccessorDeclaration.parameters); if (param && ts.isIdentifier(setAccessorDeclaration.name) && ts.isIdentifier(param.name)) { var type = inferTypeForVariableFromUsage(setAccessorDeclaration.name, program, cancellationToken); @@ -121376,11 +121905,11 @@ var ts; annotateJSDocParameters(changes, sourceFile, [{ declaration: param, type: type }], program, host); } else { - annotate(changes, sourceFile, param, type, program, host); + annotate(changes, sourceFile, param, type, program, host, formatContext, preferences); } } } - function annotate(changes, sourceFile, declaration, type, program, host) { + function annotate(changes, sourceFile, declaration, type, program, host, formatContext, preferences) { var typeNode = ts.getTypeNodeIfAccessible(type, declaration, program, host); if (typeNode) { if (ts.isInJSFile(sourceFile) && declaration.kind !== 157 /* PropertySignature */) { @@ -121392,11 +121921,32 @@ var ts; var typeTag = ts.isGetAccessorDeclaration(declaration) ? ts.createJSDocReturnTag(typeExpression, "") : ts.createJSDocTypeTag(typeExpression, ""); addJSDocTags(changes, sourceFile, parent, [typeTag]); } - else { + else if (!tryReplaceImportTypeNodeWithAutoImport(typeNode, changes, sourceFile, declaration, type, program, host, formatContext, preferences)) { changes.tryInsertTypeAnnotation(sourceFile, declaration, typeNode); } } } + function tryReplaceImportTypeNodeWithAutoImport(typeNode, changes, sourceFile, declaration, type, program, host, formatContext, preferences) { + var _a; + if (ts.isLiteralImportTypeNode(typeNode) && typeNode.qualifier && type.symbol) { + // Replace 'import("./a").SomeType' with 'SomeType' and an actual import if possible + var moduleSymbol = (_a = ts.find(type.symbol.declarations, function (d) { return !!d.getSourceFile().externalModuleIndicator; })) === null || _a === void 0 ? void 0 : _a.getSourceFile().symbol; + // Symbol for the left-most thing after the dot + if (moduleSymbol) { + var symbol = ts.getFirstIdentifier(typeNode.qualifier).symbol; + var action = codefix.getImportCompletionAction(symbol, moduleSymbol, sourceFile, symbol.name, host, program, formatContext, declaration.pos, preferences); + if (action.codeAction.changes.length && changes.tryInsertTypeAnnotation(sourceFile, declaration, ts.createTypeReferenceNode(typeNode.qualifier, typeNode.typeArguments))) { + for (var _i = 0, _b = action.codeAction.changes; _i < _b.length; _i++) { + var change = _b[_i]; + var file = sourceFile.fileName === change.fileName ? sourceFile : ts.Debug.assertDefined(program.getSourceFile(change.fileName)); + changes.pushRaw(file, change); + } + return true; + } + } + } + return false; + } function annotateJSDocParameters(changes, sourceFile, parameterInferences, program, host) { var signature = parameterInferences.length && parameterInferences[0].declaration.parent; if (!signature) { @@ -122088,7 +122638,7 @@ var ts; } var returnType = combineFromUsage(combineUsages(calls.map(function (call) { return call.return_; }))); // TODO: GH#18217 - return checker.createSignature(/*declaration*/ undefined, /*typeParameters*/ undefined, /*thisParameter*/ undefined, parameters, returnType, /*typePredicate*/ undefined, length, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); + return checker.createSignature(/*declaration*/ undefined, /*typeParameters*/ undefined, /*thisParameter*/ undefined, parameters, returnType, /*typePredicate*/ undefined, length, 0 /* None */); } function addCandidateType(usage, type) { if (type && !(type.flags & 1 /* Any */) && !(type.flags & 131072 /* Never */)) { @@ -123895,6 +124445,7 @@ var ts; var filteredCount = 0; var packageJson = filterByPackageJson && createAutoImportFilter(from, program, host); var allSourceFiles = program.getSourceFiles(); + var globalTypingsCache = host.getGlobalTypingsCacheLocation && host.getGlobalTypingsCacheLocation(); forEachExternalModule(program.getTypeChecker(), allSourceFiles, function (module, sourceFile) { if (sourceFile === undefined) { if (!packageJson || packageJson.allowsImportingAmbientModule(module, allSourceFiles)) { @@ -123904,7 +124455,9 @@ var ts; filteredCount++; } } - else if (sourceFile && sourceFile !== from && isImportablePath(from.fileName, sourceFile.fileName)) { + else if (sourceFile && + sourceFile !== from && + isImportablePath(from.fileName, sourceFile.fileName, ts.hostGetCanonicalFileName(host), globalTypingsCache)) { if (!packageJson || packageJson.allowsImportingSourceFile(sourceFile, allSourceFiles)) { cb(module); } @@ -123934,10 +124487,13 @@ var ts; * 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. */ - function isImportablePath(fromPath, toPath) { + function isImportablePath(fromPath, toPath, getCanonicalFileName, globalCachePath) { // If it's in a `node_modules` but is not reachable from here via a global import, don't bother. var toNodeModules = ts.forEachAncestorDirectory(toPath, function (ancestor) { return ts.getBaseFileName(ancestor) === "node_modules" ? ancestor : undefined; }); - return toNodeModules === undefined || ts.startsWith(fromPath, ts.getDirectoryPath(toNodeModules)); + var toNodeModulesParent = toNodeModules && ts.getDirectoryPath(getCanonicalFileName(toNodeModules)); + return toNodeModulesParent === undefined + || ts.startsWith(getCanonicalFileName(fromPath), toNodeModulesParent) + || (!!globalCachePath && ts.startsWith(getCanonicalFileName(globalCachePath), toNodeModulesParent)); } function moduleSymbolToValidIdentifier(moduleSymbol, target) { return moduleSpecifierToValidIdentifier(ts.removeFileExtension(ts.stripQuotes(moduleSymbol.name)), target); @@ -123982,6 +124538,7 @@ var ts; readFile: ts.maybeBind(host, host.readFile), useCaseSensitiveFileNames: ts.maybeBind(host, host.useCaseSensitiveFileNames), getProbableSymlinks: ts.maybeBind(host, host.getProbableSymlinks) || program.getProbableSymlinks, + getGlobalTypingsCacheLocation: ts.maybeBind(host, host.getGlobalTypingsCacheLocation), }; var usesNodeCoreModules; return { allowsImportingAmbientModule: allowsImportingAmbientModule, allowsImportingSourceFile: allowsImportingSourceFile, allowsImportingSpecifier: allowsImportingSpecifier }; @@ -125557,14 +126114,14 @@ var ts; for (var _i = 0, signatures_2 = signatures; _i < signatures_2.length; _i++) { var sig = signatures_2[_i]; minArgumentCount = Math.min(sig.minArgumentCount, minArgumentCount); - if (sig.hasRestParameter) { + if (ts.signatureHasRestParameter(sig)) { someSigHasRestParameter = true; } - if (sig.parameters.length >= maxArgsSignature.parameters.length && (!sig.hasRestParameter || maxArgsSignature.hasRestParameter)) { + if (sig.parameters.length >= maxArgsSignature.parameters.length && (!ts.signatureHasRestParameter(sig) || ts.signatureHasRestParameter(maxArgsSignature))) { maxArgsSignature = sig; } } - var maxNonRestArgs = maxArgsSignature.parameters.length - (maxArgsSignature.hasRestParameter ? 1 : 0); + var maxNonRestArgs = maxArgsSignature.parameters.length - (ts.signatureHasRestParameter(maxArgsSignature) ? 1 : 0); var maxArgsParameterSymbolNames = maxArgsSignature.parameters.map(function (symbol) { return symbol.name; }); var parameters = createDummyParameters(maxNonRestArgs, maxArgsParameterSymbolNames, /* types */ undefined, minArgumentCount, /*inJs*/ false); if (someSigHasRestParameter) { @@ -128049,7 +128606,7 @@ var ts; if (!selection || !ts.isTypeNode(selection)) return undefined; var checker = context.program.getTypeChecker(); - var firstStatement = ts.Debug.assertDefined(isJS ? ts.findAncestor(selection, isStatementAndHasJSDoc) : ts.findAncestor(selection, ts.isStatement), "Should find a statement"); + var firstStatement = ts.Debug.assertDefined(ts.findAncestor(selection, ts.isStatement), "Should find a statement"); var typeParameters = collectTypeParameters(checker, selection, firstStatement, file); if (!typeParameters) return undefined; @@ -128080,9 +128637,6 @@ var ts; } return undefined; } - function isStatementAndHasJSDoc(n) { - return ts.isStatement(n) && ts.hasJSDocNodes(n); - } function rangeContainsSkipTrivia(r1, node, file) { return ts.rangeContainsStartEnd(r1, ts.skipTrivia(file.text, node.pos), node.end); } @@ -130006,8 +130560,9 @@ var ts; return TypeObject; }()); var SignatureObject = /** @class */ (function () { - function SignatureObject(checker) { + function SignatureObject(checker, flags) { this.checker = checker; + this.flags = flags; } SignatureObject.prototype.getDeclaration = function () { return this.declaration; @@ -130045,13 +130600,12 @@ var ts; return ts.emptyArray; var doc = ts.JsDoc.getJsDocCommentsFromDeclarations(declarations); if (doc.length === 0 || declarations.some(hasJSDocInheritDocTag)) { - for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) { - var declaration = declarations_4[_i]; + ts.forEachUnique(declarations, function (declaration) { var inheritedDocs = findInheritedJSDocComments(declaration, declaration.symbol.name, checker); // TODO: GH#18217 // TODO: GH#16312 Return a ReadonlyArray, avoid copying inheritedDocs if (inheritedDocs) doc = doc.length === 0 ? inheritedDocs.slice() : inheritedDocs.concat(ts.lineBreakPart(), doc); - } + }); } return doc; } @@ -130362,9 +130916,7 @@ var ts; names.push(entry); } else { - if (entry.scriptKind !== 6 /* JSON */) { - names.push(entry.hostFileName); - } + names.push(entry.hostFileName); } }); return names; @@ -130932,12 +131484,11 @@ var ts; var sourceFiles = fileName ? [getValidSourceFile(fileName)] : program.getSourceFiles(); return ts.NavigateTo.getNavigateToItems(sourceFiles, program.getTypeChecker(), cancellationToken, searchValue, maxResultCount, excludeDtsFiles); } - function getEmitOutput(fileName, emitOnlyDtsFiles) { - if (emitOnlyDtsFiles === void 0) { emitOnlyDtsFiles = false; } + function getEmitOutput(fileName, emitOnlyDtsFiles, forceDtsEmit) { synchronizeHostData(); var sourceFile = getValidSourceFile(fileName); var customTransformers = host.getCustomTransformers && host.getCustomTransformers(); - return ts.getFileEmitOutput(program, sourceFile, emitOnlyDtsFiles, cancellationToken, customTransformers); + return ts.getFileEmitOutput(program, sourceFile, !!emitOnlyDtsFiles, cancellationToken, customTransformers, forceDtsEmit); } // Signature help /** diff --git a/lib/typescriptServices.d.ts b/lib/typescriptServices.d.ts index b91087a1585..b01f079dc8b 100644 --- a/lib/typescriptServices.d.ts +++ b/lib/typescriptServices.d.ts @@ -14,7 +14,7 @@ and limitations under the License. ***************************************************************************** */ declare namespace ts { - const versionMajorMinor = "3.7"; + const versionMajorMinor = "3.8"; /** The version of the TypeScript compiler release */ const version: string; } @@ -1964,6 +1964,8 @@ declare namespace ts { DiagnosticsPresent_OutputsSkipped = 1, DiagnosticsPresent_OutputsGenerated = 2, InvalidProject_OutputsSkipped = 3, + ProjectReferenceCycle_OutputsSkipped = 4, + /** @deprecated Use ProjectReferenceCycle_OutputsSkipped instead. */ ProjectReferenceCycle_OutputsSkupped = 4 } export interface EmitResult { @@ -2376,6 +2378,7 @@ declare namespace ts { JSLiteral = 16384, FreshLiteral = 32768, ArrayLiteral = 65536, + ObjectRestType = 131072, ClassOrInterface = 3, } export interface ObjectType extends Type { @@ -3169,8 +3172,9 @@ declare namespace ts { readonly disableSuggestions?: boolean; readonly quotePreference?: "auto" | "double" | "single"; readonly includeCompletionsForModuleExports?: boolean; + readonly includeAutomaticOptionalChainCompletions?: boolean; readonly includeCompletionsWithInsertText?: boolean; - readonly importModuleSpecifierPreference?: "relative" | "non-relative"; + readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative"; /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ readonly importModuleSpecifierEnding?: "minimal" | "index" | "js"; readonly allowTextChangesInNewFiles?: boolean; @@ -3522,6 +3526,7 @@ declare namespace ts { function isCallExpression(node: Node): node is CallExpression; function isCallChain(node: Node): node is CallChain; function isOptionalChain(node: Node): node is PropertyAccessChain | ElementAccessChain | CallChain; + function isNullishCoalesce(node: Node): boolean; function isNewExpression(node: Node): node is NewExpression; function isTaggedTemplateExpression(node: Node): node is TaggedTemplateExpression; function isTypeAssertion(node: Node): node is TypeAssertion; @@ -5071,7 +5076,7 @@ declare namespace ts { getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined): RefactorEditInfo | undefined; organizeImports(scope: OrganizeImportsScope, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[]; getEditsForFileRename(oldFilePath: string, newFilePath: string, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[]; - getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean): EmitOutput; + getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean, forceDtsEmit?: boolean): EmitOutput; getProgram(): Program | undefined; dispose(): void; } @@ -5194,7 +5199,7 @@ declare namespace ts { } interface FileTextChanges { fileName: string; - textChanges: TextChange[]; + textChanges: readonly TextChange[]; isNewFile?: boolean; } interface CodeAction { diff --git a/lib/typescriptServices.js b/lib/typescriptServices.js index f8686be591c..23d6fd75d8d 100644 --- a/lib/typescriptServices.js +++ b/lib/typescriptServices.js @@ -76,67 +76,20 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); +/* @internal */ var ts; (function (ts) { - // WARNING: The script `configureNightly.ts` uses a regexp to parse out these values. - // If changing the text in this section, be sure to test `configureNightly` too. - ts.versionMajorMinor = "3.7"; - /** The version of the TypeScript compiler release */ - ts.version = ts.versionMajorMinor + ".0-dev"; -})(ts || (ts = {})); -(function (ts) { - /* @internal */ - var Comparison; - (function (Comparison) { - Comparison[Comparison["LessThan"] = -1] = "LessThan"; - Comparison[Comparison["EqualTo"] = 0] = "EqualTo"; - Comparison[Comparison["GreaterThan"] = 1] = "GreaterThan"; - })(Comparison = ts.Comparison || (ts.Comparison = {})); -})(ts || (ts = {})); -/* @internal */ -(function (ts) { - ts.emptyArray = []; - /** Create a MapLike with good performance. */ - function createDictionaryObject() { - var map = Object.create(/*prototype*/ null); // eslint-disable-line no-null/no-null - // Using 'delete' on an object causes V8 to put the object in dictionary mode. - // This disables creation of hidden classes, which are expensive when an object is - // constantly changing shape. - map.__ = undefined; - delete map.__; - return map; - } - /** Create a new map. If a template object is provided, the map will copy entries from it. */ - function createMap() { - return new ts.MapCtr(); - } - ts.createMap = createMap; - function createMapFromEntries(entries) { - var map = createMap(); - for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) { - var _a = entries_1[_i], key = _a[0], value = _a[1]; - map.set(key, value); + function createMapShim() { + /** Create a MapLike with good performance. */ + function createDictionaryObject() { + var map = Object.create(/*prototype*/ null); // eslint-disable-line no-null/no-null + // Using 'delete' on an object causes V8 to put the object in dictionary mode. + // This disables creation of hidden classes, which are expensive when an object is + // constantly changing shape. + map.__ = undefined; + delete map.__; + return map; } - return map; - } - ts.createMapFromEntries = createMapFromEntries; - function createMapFromTemplate(template) { - var map = new ts.MapCtr(); - // Copies keys/values from template. Note that for..in will not throw if - // template is undefined, and instead will just exit the loop. - for (var key in template) { - if (hasOwnProperty.call(template, key)) { - map.set(key, template[key]); - } - } - return map; - } - ts.createMapFromTemplate = createMapFromTemplate; - // Internet Explorer's Map doesn't support iteration, so don't use it. - // eslint-disable-next-line no-in-operator - ts.MapCtr = typeof Map !== "undefined" && "entries" in Map.prototype ? Map : shimMap(); - // Keep the class inside a function so it doesn't get compiled if it's not used. - function shimMap() { var MapIterator = /** @class */ (function () { function MapIterator(currentEntry, selector) { this.currentEntry = currentEntry; @@ -272,7 +225,75 @@ var ts; return class_1; }()); } - ts.shimMap = shimMap; + ts.createMapShim = createMapShim; +})(ts || (ts = {})); +var ts; +(function (ts) { + // WARNING: The script `configureNightly.ts` uses a regexp to parse out these values. + // If changing the text in this section, be sure to test `configureNightly` too. + ts.versionMajorMinor = "3.8"; + /** The version of the TypeScript compiler release */ + ts.version = ts.versionMajorMinor + ".0-dev"; +})(ts || (ts = {})); +(function (ts) { + /* @internal */ + var Comparison; + (function (Comparison) { + Comparison[Comparison["LessThan"] = -1] = "LessThan"; + Comparison[Comparison["EqualTo"] = 0] = "EqualTo"; + Comparison[Comparison["GreaterThan"] = 1] = "GreaterThan"; + })(Comparison = ts.Comparison || (ts.Comparison = {})); +})(ts || (ts = {})); +/* @internal */ +(function (ts) { + /** + * Returns the native Map implementation if it is available and compatible (i.e. supports iteration). + */ + function tryGetNativeMap() { + // Internet Explorer's Map doesn't support iteration, so don't use it. + // eslint-disable-next-line no-in-operator + return typeof Map !== "undefined" && "entries" in Map.prototype ? Map : undefined; + } + ts.tryGetNativeMap = tryGetNativeMap; +})(ts || (ts = {})); +/* @internal */ +(function (ts) { + ts.emptyArray = []; + ts.Map = ts.tryGetNativeMap() || (function () { + // NOTE: createMapShim will be defined for typescriptServices.js but not for tsc.js, so we must test for it. + if (typeof ts.createMapShim === "function") { + return ts.createMapShim(); + } + throw new Error("TypeScript requires an environment that provides a compatible native Map implementation."); + })(); + /** Create a new map. */ + function createMap() { + return new ts.Map(); + } + ts.createMap = createMap; + /** Create a new map from an array of entries. */ + function createMapFromEntries(entries) { + var map = createMap(); + for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) { + var _a = entries_1[_i], key = _a[0], value = _a[1]; + map.set(key, value); + } + return map; + } + ts.createMapFromEntries = createMapFromEntries; + /** Create a new map from a template object is provided, the map will copy entries from it. */ + function createMapFromTemplate(template) { + var map = new ts.Map(); + // Copies keys/values from template. Note that for..in will not throw if + // template is undefined, and instead will just exit the loop. + for (var key in template) { + if (hasOwnProperty.call(template, key)) { + map.set(key, template[key]); + } + } + return map; + } + ts.createMapFromTemplate = createMapFromTemplate; function length(array) { return array ? array.length : 0; } @@ -1854,20 +1875,6 @@ var ts; return str.indexOf(substring) !== -1; } ts.stringContains = stringContains; - function fileExtensionIs(path, extension) { - return path.length > extension.length && endsWith(path, extension); - } - ts.fileExtensionIs = fileExtensionIs; - function fileExtensionIsOneOf(path, extensions) { - for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) { - var extension = extensions_1[_i]; - if (fileExtensionIs(path, extension)) { - return true; - } - } - return false; - } - ts.fileExtensionIsOneOf = fileExtensionIsOneOf; /** * Takes a string like "jquery-min.4.2.3" and returns "jquery" */ @@ -2181,11 +2188,14 @@ var ts; if (isFlags) { var result = ""; var remainingFlags = value; - for (var i = members.length - 1; i >= 0 && remainingFlags !== 0; i--) { - var _a = members[i], enumValue = _a[0], enumName = _a[1]; - if (enumValue !== 0 && (remainingFlags & enumValue) === enumValue) { + for (var _i = 0, members_1 = members; _i < members_1.length; _i++) { + var _a = members_1[_i], enumValue = _a[0], enumName = _a[1]; + if (enumValue > value) { + break; + } + if (enumValue !== 0 && enumValue & value) { + result = "" + result + (result ? "|" : "") + enumName; remainingFlags &= ~enumValue; - result = "" + enumName + (result ? "|" : "") + result; } } if (remainingFlags === 0) { @@ -2193,8 +2203,8 @@ var ts; } } else { - for (var _i = 0, members_1 = members; _i < members_1.length; _i++) { - var _b = members_1[_i], enumValue = _b[0], enumName = _b[1]; + for (var _b = 0, members_2 = members; _b < members_2.length; _b++) { + var _c = members_2[_b], enumValue = _c[0], enumName = _c[1]; if (enumValue === value) { return enumName; } @@ -2268,6 +2278,33 @@ var ts; ? function (node, message) { return assert(node === undefined, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was unexpected'."; }, Debug.assertMissingNode); } : ts.noop; var isDebugInfoEnabled = false; + var extendedDebugModule; + function extendedDebug() { + enableDebugInfo(); + if (!extendedDebugModule) { + throw new Error("Debugging helpers could not be loaded."); + } + return extendedDebugModule; + } + function printControlFlowGraph(flowNode) { + return console.log(formatControlFlowGraph(flowNode)); + } + Debug.printControlFlowGraph = printControlFlowGraph; + function formatControlFlowGraph(flowNode) { + return extendedDebug().formatControlFlowGraph(flowNode); + } + Debug.formatControlFlowGraph = formatControlFlowGraph; + function attachFlowNodeDebugInfo(flowNode) { + if (isDebugInfoEnabled) { + if (!("__debugFlowFlags" in flowNode)) { // eslint-disable-line no-in-operator + Object.defineProperties(flowNode, { + __debugFlowFlags: { get: function () { return formatEnum(this.flags, ts.FlowFlags, /*isFlags*/ true); } }, + __debugToString: { value: function () { return formatControlFlowGraph(this); } } + }); + } + } + } + Debug.attachFlowNodeDebugInfo = attachFlowNodeDebugInfo; /** * Injects debug information into frequently used types. */ @@ -2311,6 +2348,20 @@ var ts; }); } } + // attempt to load extended debugging information + try { + if (ts.sys && ts.sys.require) { + var basePath = ts.getDirectoryPath(ts.resolvePath(ts.sys.getExecutingFilePath())); + var result = ts.sys.require(basePath, "./compiler-debug"); + if (!result.error) { + result.module.init(ts); + extendedDebugModule = result.module; + } + } + } + catch (_a) { + // do nothing + } isDebugInfoEnabled = true; } Debug.enableDebugInfo = enableDebugInfo; @@ -2474,8 +2525,6 @@ var ts; } /** Performance logger that will generate ETW events if possible - check for `logEvent` member, as `etwModule` will be `{}` when browserified */ ts.perfLogger = etwModule && etwModule.logEvent ? etwModule : nullLogger; - var args = typeof process === "undefined" ? [] : process.argv; - ts.perfLogger.logInfoEvent("Starting TypeScript v" + ts.versionMajorMinor + " with command line: " + JSON.stringify(args)); })(ts || (ts = {})); /* @internal */ var ts; @@ -3370,6 +3419,7 @@ var ts; /* @internal */ TokenFlags[TokenFlags["NumericLiteralFlags"] = 1008] = "NumericLiteralFlags"; })(TokenFlags = ts.TokenFlags || (ts.TokenFlags = {})); + // NOTE: Ensure this is up-to-date with src/debug/debug.ts var FlowFlags; (function (FlowFlags) { FlowFlags[FlowFlags["Unreachable"] = 1] = "Unreachable"; @@ -3425,6 +3475,8 @@ var ts; // When build skipped because passed in project is invalid ExitStatus[ExitStatus["InvalidProject_OutputsSkipped"] = 3] = "InvalidProject_OutputsSkipped"; // When build is skipped because project references form cycle + ExitStatus[ExitStatus["ProjectReferenceCycle_OutputsSkipped"] = 4] = "ProjectReferenceCycle_OutputsSkipped"; + /** @deprecated Use ProjectReferenceCycle_OutputsSkipped instead. */ ExitStatus[ExitStatus["ProjectReferenceCycle_OutputsSkupped"] = 4] = "ProjectReferenceCycle_OutputsSkupped"; })(ExitStatus = ts.ExitStatus || (ts.ExitStatus = {})); /* @internal */ @@ -3434,6 +3486,14 @@ var ts; UnionReduction[UnionReduction["Literal"] = 1] = "Literal"; UnionReduction[UnionReduction["Subtype"] = 2] = "Subtype"; })(UnionReduction = ts.UnionReduction || (ts.UnionReduction = {})); + /* @internal */ + var ContextFlags; + (function (ContextFlags) { + ContextFlags[ContextFlags["None"] = 0] = "None"; + ContextFlags[ContextFlags["Signature"] = 1] = "Signature"; + ContextFlags[ContextFlags["NoConstraints"] = 2] = "NoConstraints"; + ContextFlags[ContextFlags["Completion"] = 4] = "Completion"; + })(ContextFlags = ts.ContextFlags || (ts.ContextFlags = {})); // NOTE: If modifying this enum, must modify `TypeFormatFlags` too! var NodeBuilderFlags; (function (NodeBuilderFlags) { @@ -3836,19 +3896,20 @@ var ts; ObjectFlags[ObjectFlags["JSLiteral"] = 16384] = "JSLiteral"; ObjectFlags[ObjectFlags["FreshLiteral"] = 32768] = "FreshLiteral"; ObjectFlags[ObjectFlags["ArrayLiteral"] = 65536] = "ArrayLiteral"; + ObjectFlags[ObjectFlags["ObjectRestType"] = 131072] = "ObjectRestType"; /* @internal */ - ObjectFlags[ObjectFlags["PrimitiveUnion"] = 131072] = "PrimitiveUnion"; + ObjectFlags[ObjectFlags["PrimitiveUnion"] = 262144] = "PrimitiveUnion"; /* @internal */ - ObjectFlags[ObjectFlags["ContainsWideningType"] = 262144] = "ContainsWideningType"; + ObjectFlags[ObjectFlags["ContainsWideningType"] = 524288] = "ContainsWideningType"; /* @internal */ - ObjectFlags[ObjectFlags["ContainsObjectOrArrayLiteral"] = 524288] = "ContainsObjectOrArrayLiteral"; + ObjectFlags[ObjectFlags["ContainsObjectOrArrayLiteral"] = 1048576] = "ContainsObjectOrArrayLiteral"; /* @internal */ - ObjectFlags[ObjectFlags["NonInferrableType"] = 1048576] = "NonInferrableType"; + ObjectFlags[ObjectFlags["NonInferrableType"] = 2097152] = "NonInferrableType"; ObjectFlags[ObjectFlags["ClassOrInterface"] = 3] = "ClassOrInterface"; /* @internal */ - ObjectFlags[ObjectFlags["RequiresWidening"] = 786432] = "RequiresWidening"; + ObjectFlags[ObjectFlags["RequiresWidening"] = 1572864] = "RequiresWidening"; /* @internal */ - ObjectFlags[ObjectFlags["PropagatingFlags"] = 1835008] = "PropagatingFlags"; + ObjectFlags[ObjectFlags["PropagatingFlags"] = 3670016] = "PropagatingFlags"; })(ObjectFlags = ts.ObjectFlags || (ts.ObjectFlags = {})); /* @internal */ var VarianceFlags; @@ -3875,6 +3936,20 @@ var ts; SignatureKind[SignatureKind["Call"] = 0] = "Call"; SignatureKind[SignatureKind["Construct"] = 1] = "Construct"; })(SignatureKind = ts.SignatureKind || (ts.SignatureKind = {})); + /* @internal */ + var SignatureFlags; + (function (SignatureFlags) { + SignatureFlags[SignatureFlags["None"] = 0] = "None"; + SignatureFlags[SignatureFlags["HasRestParameter"] = 1] = "HasRestParameter"; + SignatureFlags[SignatureFlags["HasLiteralTypes"] = 2] = "HasLiteralTypes"; + SignatureFlags[SignatureFlags["IsInnerCallChain"] = 4] = "IsInnerCallChain"; + SignatureFlags[SignatureFlags["IsOuterCallChain"] = 8] = "IsOuterCallChain"; + // We do not propagate `IsInnerCallChain` to instantiated signatures, as that would result in us + // attempting to add `| undefined` on each recursive call to `getReturnTypeOfSignature` when + // instantiating the return type. + SignatureFlags[SignatureFlags["PropagatingFlags"] = 3] = "PropagatingFlags"; + SignatureFlags[SignatureFlags["CallChainFlags"] = 12] = "CallChainFlags"; + })(SignatureFlags = ts.SignatureFlags || (ts.SignatureFlags = {})); var IndexKind; (function (IndexKind) { IndexKind[IndexKind["String"] = 0] = "String"; @@ -4875,16 +4950,6 @@ var ts; } } ts.createRecursiveDirectoryWatcher = createRecursiveDirectoryWatcher; - function recursiveCreateDirectory(directoryPath, sys) { - var basePath = ts.getDirectoryPath(directoryPath); - var shouldCreateParent = basePath !== "" && directoryPath !== basePath && !sys.directoryExists(basePath); - if (shouldCreateParent) { - recursiveCreateDirectory(basePath, sys); - } - if (shouldCreateParent || !sys.directoryExists(directoryPath)) { - sys.createDirectory(directoryPath); - } - } /** * patch writefile to create folder before writing the file */ @@ -4893,11 +4958,7 @@ var ts; // patch writefile to create folder before writing the file var originalWriteFile = sys.writeFile; sys.writeFile = function (path, data, writeBom) { - var directoryPath = ts.getDirectoryPath(ts.normalizeSlashes(path)); - if (directoryPath && !sys.directoryExists(directoryPath)) { - recursiveCreateDirectory(directoryPath, sys); - } - originalWriteFile.call(sys, path, data, writeBom); + return ts.writeFileEnsuringDirectories(path, data, !!writeBom, function (path, data, writeByteOrderMark) { return originalWriteFile.call(sys, path, data, writeByteOrderMark); }, function (path) { return sys.createDirectory(path); }, function (path) { return sys.directoryExists(path); }); }; } ts.patchWriteFileEnsuringDirectory = patchWriteFileEnsuringDirectory; @@ -5046,6 +5107,15 @@ var ts; bufferFrom: bufferFrom, base64decode: function (input) { return bufferFrom(input, "base64").toString("utf8"); }, base64encode: function (input) { return bufferFrom(input).toString("base64"); }, + require: function (baseDir, moduleName) { + try { + var modulePath = ts.resolveJSModule(moduleName, baseDir, nodeSystem); + return { module: require(modulePath), modulePath: modulePath, error: undefined }; + } + catch (error) { + return { module: undefined, modulePath: undefined, error: error }; + } + } }; return nodeSystem; /** @@ -5184,6 +5254,7 @@ var ts; if (fsSupportsRecursive) { return watchDirectoryUsingFsWatch; } + // defer watchDirectoryRecursively as it depends on `ts.createMap()` which may not be usable yet. var watchDirectory = tscWatchDirectory === "RecursiveDirectoryUsingFsWatchFile" ? createWatchDirectoryUsing(fsWatchFile) : tscWatchDirectory === "RecursiveDirectoryUsingDynamicPriorityPolling" ? @@ -5628,6 +5699,673 @@ var ts; ts.Debug.isDebugging = true; } })(ts || (ts = {})); +/* @internal */ +var ts; +(function (ts) { + /** + * Internally, we represent paths as strings with '/' as the directory separator. + * When we make system calls (eg: LanguageServiceHost.getDirectory()), + * we expect the host to correctly handle paths in our specified format. + */ + ts.directorySeparator = "/"; + var altDirectorySeparator = "\\"; + var urlSchemeSeparator = "://"; + var backslashRegExp = /\\/g; + //// Path Tests + /** + * Determines whether a charCode corresponds to `/` or `\`. + */ + function isAnyDirectorySeparator(charCode) { + return charCode === 47 /* slash */ || charCode === 92 /* backslash */; + } + ts.isAnyDirectorySeparator = isAnyDirectorySeparator; + /** + * Determines whether a path starts with a URL scheme (e.g. starts with `http://`, `ftp://`, `file://`, etc.). + */ + function isUrl(path) { + return getEncodedRootLength(path) < 0; + } + ts.isUrl = isUrl; + /** + * Determines whether a path is an absolute disk path (e.g. starts with `/`, or a dos path + * like `c:`, `c:\` or `c:/`). + */ + function isRootedDiskPath(path) { + return getEncodedRootLength(path) > 0; + } + ts.isRootedDiskPath = isRootedDiskPath; + /** + * Determines whether a path consists only of a path root. + */ + function isDiskPathRoot(path) { + var rootLength = getEncodedRootLength(path); + return rootLength > 0 && rootLength === path.length; + } + ts.isDiskPathRoot = isDiskPathRoot; + /** + * Determines whether a path starts with an absolute path component (i.e. `/`, `c:/`, `file://`, etc.). + * + * ```ts + * // POSIX + * pathIsAbsolute("/path/to/file.ext") === true + * // DOS + * pathIsAbsolute("c:/path/to/file.ext") === true + * // URL + * pathIsAbsolute("file:///path/to/file.ext") === true + * // Non-absolute + * pathIsAbsolute("path/to/file.ext") === false + * pathIsAbsolute("./path/to/file.ext") === false + * ``` + */ + function pathIsAbsolute(path) { + return getEncodedRootLength(path) !== 0; + } + ts.pathIsAbsolute = pathIsAbsolute; + /** + * Determines whether a path starts with a relative path component (i.e. `.` or `..`). + */ + function pathIsRelative(path) { + return /^\.\.?($|[\\/])/.test(path); + } + ts.pathIsRelative = pathIsRelative; + function hasExtension(fileName) { + return ts.stringContains(getBaseFileName(fileName), "."); + } + ts.hasExtension = hasExtension; + function fileExtensionIs(path, extension) { + return path.length > extension.length && ts.endsWith(path, extension); + } + ts.fileExtensionIs = fileExtensionIs; + function fileExtensionIsOneOf(path, extensions) { + for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) { + var extension = extensions_1[_i]; + if (fileExtensionIs(path, extension)) { + return true; + } + } + return false; + } + ts.fileExtensionIsOneOf = fileExtensionIsOneOf; + /** + * Determines whether a path has a trailing separator (`/` or `\\`). + */ + function hasTrailingDirectorySeparator(path) { + return path.length > 0 && isAnyDirectorySeparator(path.charCodeAt(path.length - 1)); + } + ts.hasTrailingDirectorySeparator = hasTrailingDirectorySeparator; + //// Path Parsing + function isVolumeCharacter(charCode) { + return (charCode >= 97 /* a */ && charCode <= 122 /* z */) || + (charCode >= 65 /* A */ && charCode <= 90 /* Z */); + } + function getFileUrlVolumeSeparatorEnd(url, start) { + var ch0 = url.charCodeAt(start); + if (ch0 === 58 /* colon */) + return start + 1; + if (ch0 === 37 /* percent */ && url.charCodeAt(start + 1) === 51 /* _3 */) { + var ch2 = url.charCodeAt(start + 2); + if (ch2 === 97 /* a */ || ch2 === 65 /* A */) + return start + 3; + } + return -1; + } + /** + * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). + * If the root is part of a URL, the twos-complement of the root length is returned. + */ + function getEncodedRootLength(path) { + if (!path) + return 0; + var ch0 = path.charCodeAt(0); + // POSIX or UNC + if (ch0 === 47 /* slash */ || ch0 === 92 /* backslash */) { + if (path.charCodeAt(1) !== ch0) + return 1; // POSIX: "/" (or non-normalized "\") + var p1 = path.indexOf(ch0 === 47 /* slash */ ? ts.directorySeparator : altDirectorySeparator, 2); + if (p1 < 0) + return path.length; // UNC: "//server" or "\\server" + return p1 + 1; // UNC: "//server/" or "\\server\" + } + // DOS + if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58 /* colon */) { + var ch2 = path.charCodeAt(2); + if (ch2 === 47 /* slash */ || ch2 === 92 /* backslash */) + return 3; // DOS: "c:/" or "c:\" + if (path.length === 2) + return 2; // DOS: "c:" (but not "c:d") + } + // URL + var schemeEnd = path.indexOf(urlSchemeSeparator); + if (schemeEnd !== -1) { + var authorityStart = schemeEnd + urlSchemeSeparator.length; + var authorityEnd = path.indexOf(ts.directorySeparator, authorityStart); + if (authorityEnd !== -1) { // URL: "file:///", "file://server/", "file://server/path" + // For local "file" URLs, include the leading DOS volume (if present). + // Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a + // special case interpreted as "the machine from which the URL is being interpreted". + var scheme = path.slice(0, schemeEnd); + var authority = path.slice(authorityStart, authorityEnd); + if (scheme === "file" && (authority === "" || authority === "localhost") && + isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) { + var volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2); + if (volumeSeparatorEnd !== -1) { + if (path.charCodeAt(volumeSeparatorEnd) === 47 /* slash */) { + // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/" + return ~(volumeSeparatorEnd + 1); + } + if (volumeSeparatorEnd === path.length) { + // URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a" + // but not "file:///c:d" or "file:///c%3ad" + return ~volumeSeparatorEnd; + } + } + } + return ~(authorityEnd + 1); // URL: "file://server/", "http://server/" + } + return ~path.length; // URL: "file://server", "http://server" + } + // relative + return 0; + } + /** + * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). + * + * For example: + * ```ts + * getRootLength("a") === 0 // "" + * getRootLength("/") === 1 // "/" + * getRootLength("c:") === 2 // "c:" + * getRootLength("c:d") === 0 // "" + * getRootLength("c:/") === 3 // "c:/" + * getRootLength("c:\\") === 3 // "c:\\" + * getRootLength("//server") === 7 // "//server" + * getRootLength("//server/share") === 8 // "//server/" + * getRootLength("\\\\server") === 7 // "\\\\server" + * getRootLength("\\\\server\\share") === 8 // "\\\\server\\" + * getRootLength("file:///path") === 8 // "file:///" + * getRootLength("file:///c:") === 10 // "file:///c:" + * getRootLength("file:///c:d") === 8 // "file:///" + * getRootLength("file:///c:/path") === 11 // "file:///c:/" + * getRootLength("file://server") === 13 // "file://server" + * getRootLength("file://server/path") === 14 // "file://server/" + * getRootLength("http://server") === 13 // "http://server" + * getRootLength("http://server/path") === 14 // "http://server/" + * ``` + */ + function getRootLength(path) { + var rootLength = getEncodedRootLength(path); + return rootLength < 0 ? ~rootLength : rootLength; + } + ts.getRootLength = getRootLength; + function getDirectoryPath(path) { + path = normalizeSlashes(path); + // If the path provided is itself the root, then return it. + var rootLength = getRootLength(path); + if (rootLength === path.length) + return path; + // return the leading portion of the path up to the last (non-terminal) directory separator + // but not including any trailing directory separator. + path = removeTrailingDirectorySeparator(path); + return path.slice(0, Math.max(rootLength, path.lastIndexOf(ts.directorySeparator))); + } + ts.getDirectoryPath = getDirectoryPath; + function getBaseFileName(path, extensions, ignoreCase) { + path = normalizeSlashes(path); + // if the path provided is itself the root, then it has not file name. + var rootLength = getRootLength(path); + if (rootLength === path.length) + return ""; + // return the trailing portion of the path starting after the last (non-terminal) directory + // separator but not including any trailing directory separator. + path = removeTrailingDirectorySeparator(path); + var name = path.slice(Math.max(getRootLength(path), path.lastIndexOf(ts.directorySeparator) + 1)); + var extension = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(name, extensions, ignoreCase) : undefined; + return extension ? name.slice(0, name.length - extension.length) : name; + } + ts.getBaseFileName = getBaseFileName; + function tryGetExtensionFromPath(path, extension, stringEqualityComparer) { + if (!ts.startsWith(extension, ".")) + extension = "." + extension; + if (path.length >= extension.length && path.charCodeAt(path.length - extension.length) === 46 /* dot */) { + var pathExtension = path.slice(path.length - extension.length); + if (stringEqualityComparer(pathExtension, extension)) { + return pathExtension; + } + } + } + function getAnyExtensionFromPathWorker(path, extensions, stringEqualityComparer) { + if (typeof extensions === "string") { + return tryGetExtensionFromPath(path, extensions, stringEqualityComparer) || ""; + } + for (var _i = 0, extensions_2 = extensions; _i < extensions_2.length; _i++) { + var extension = extensions_2[_i]; + var result = tryGetExtensionFromPath(path, extension, stringEqualityComparer); + if (result) + return result; + } + return ""; + } + function getAnyExtensionFromPath(path, extensions, ignoreCase) { + // Retrieves any string from the final "." onwards from a base file name. + // Unlike extensionFromPath, which throws an exception on unrecognized extensions. + if (extensions) { + return getAnyExtensionFromPathWorker(removeTrailingDirectorySeparator(path), extensions, ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive); + } + var baseFileName = getBaseFileName(path); + var extensionIndex = baseFileName.lastIndexOf("."); + if (extensionIndex >= 0) { + return baseFileName.substring(extensionIndex); + } + return ""; + } + ts.getAnyExtensionFromPath = getAnyExtensionFromPath; + function pathComponents(path, rootLength) { + var root = path.substring(0, rootLength); + var rest = path.substring(rootLength).split(ts.directorySeparator); + if (rest.length && !ts.lastOrUndefined(rest)) + rest.pop(); + return __spreadArrays([root], rest); + } + /** + * Parse a path into an array containing a root component (at index 0) and zero or more path + * components (at indices > 0). The result is not normalized. + * If the path is relative, the root component is `""`. + * If the path is absolute, the root component includes the first path separator (`/`). + * + * ```ts + * // POSIX + * getPathComponents("/path/to/file.ext") === ["/", "path", "to", "file.ext"] + * getPathComponents("/path/to/") === ["/", "path", "to"] + * getPathComponents("/") === ["/"] + * // DOS + * getPathComponents("c:/path/to/file.ext") === ["c:/", "path", "to", "file.ext"] + * getPathComponents("c:/path/to/") === ["c:/", "path", "to"] + * getPathComponents("c:/") === ["c:/"] + * getPathComponents("c:") === ["c:"] + * // URL + * getPathComponents("http://typescriptlang.org/path/to/file.ext") === ["http://typescriptlang.org/", "path", "to", "file.ext"] + * getPathComponents("http://typescriptlang.org/path/to/") === ["http://typescriptlang.org/", "path", "to"] + * getPathComponents("http://typescriptlang.org/") === ["http://typescriptlang.org/"] + * getPathComponents("http://typescriptlang.org") === ["http://typescriptlang.org"] + * getPathComponents("file://server/path/to/file.ext") === ["file://server/", "path", "to", "file.ext"] + * getPathComponents("file://server/path/to/") === ["file://server/", "path", "to"] + * getPathComponents("file://server/") === ["file://server/"] + * getPathComponents("file://server") === ["file://server"] + * getPathComponents("file:///path/to/file.ext") === ["file:///", "path", "to", "file.ext"] + * getPathComponents("file:///path/to/") === ["file:///", "path", "to"] + * getPathComponents("file:///") === ["file:///"] + * getPathComponents("file://") === ["file://"] + */ + function getPathComponents(path, currentDirectory) { + if (currentDirectory === void 0) { currentDirectory = ""; } + path = combinePaths(currentDirectory, path); + return pathComponents(path, getRootLength(path)); + } + ts.getPathComponents = getPathComponents; + //// Path Formatting + /** + * Formats a parsed path consisting of a root component (at index 0) and zero or more path + * segments (at indices > 0). + * + * ```ts + * getPathFromPathComponents(["/", "path", "to", "file.ext"]) === "/path/to/file.ext" + * ``` + */ + function getPathFromPathComponents(pathComponents) { + if (pathComponents.length === 0) + return ""; + var root = pathComponents[0] && ensureTrailingDirectorySeparator(pathComponents[0]); + return root + pathComponents.slice(1).join(ts.directorySeparator); + } + ts.getPathFromPathComponents = getPathFromPathComponents; + //// Path Normalization + /** + * Normalize path separators, converting `\` into `/`. + */ + function normalizeSlashes(path) { + return path.replace(backslashRegExp, ts.directorySeparator); + } + ts.normalizeSlashes = normalizeSlashes; + /** + * Reduce an array of path components to a more simplified path by navigating any + * `"."` or `".."` entries in the path. + */ + function reducePathComponents(components) { + if (!ts.some(components)) + return []; + var reduced = [components[0]]; + for (var i = 1; i < components.length; i++) { + var component = components[i]; + if (!component) + continue; + if (component === ".") + continue; + if (component === "..") { + if (reduced.length > 1) { + if (reduced[reduced.length - 1] !== "..") { + reduced.pop(); + continue; + } + } + else if (reduced[0]) + continue; + } + reduced.push(component); + } + return reduced; + } + ts.reducePathComponents = reducePathComponents; + /** + * Combines paths. If a path is absolute, it replaces any previous path. Relative paths are not simplified. + * + * ```ts + * // Non-rooted + * combinePaths("path", "to", "file.ext") === "path/to/file.ext" + * combinePaths("path", "dir", "..", "to", "file.ext") === "path/dir/../to/file.ext" + * // POSIX + * combinePaths("/path", "to", "file.ext") === "/path/to/file.ext" + * combinePaths("/path", "/to", "file.ext") === "/to/file.ext" + * // DOS + * combinePaths("c:/path", "to", "file.ext") === "c:/path/to/file.ext" + * combinePaths("c:/path", "c:/to", "file.ext") === "c:/to/file.ext" + * // URL + * combinePaths("file:///path", "to", "file.ext") === "file:///path/to/file.ext" + * combinePaths("file:///path", "file:///to", "file.ext") === "file:///to/file.ext" + * ``` + */ + function combinePaths(path) { + var paths = []; + for (var _i = 1; _i < arguments.length; _i++) { + paths[_i - 1] = arguments[_i]; + } + if (path) + path = normalizeSlashes(path); + for (var _a = 0, paths_1 = paths; _a < paths_1.length; _a++) { + var relativePath = paths_1[_a]; + if (!relativePath) + continue; + relativePath = normalizeSlashes(relativePath); + if (!path || getRootLength(relativePath) !== 0) { + path = relativePath; + } + else { + path = ensureTrailingDirectorySeparator(path) + relativePath; + } + } + return path; + } + ts.combinePaths = combinePaths; + /** + * Combines and resolves paths. If a path is absolute, it replaces any previous path. Any + * `.` and `..` path components are resolved. Trailing directory separators are preserved. + * + * ```ts + * resolvePath("/path", "to", "file.ext") === "path/to/file.ext" + * resolvePath("/path", "to", "file.ext/") === "path/to/file.ext/" + * resolvePath("/path", "dir", "..", "to", "file.ext") === "path/to/file.ext" + * ``` + */ + function resolvePath(path) { + var paths = []; + for (var _i = 1; _i < arguments.length; _i++) { + paths[_i - 1] = arguments[_i]; + } + return normalizePath(ts.some(paths) ? combinePaths.apply(void 0, __spreadArrays([path], paths)) : normalizeSlashes(path)); + } + ts.resolvePath = resolvePath; + /** + * Parse a path into an array containing a root component (at index 0) and zero or more path + * components (at indices > 0). The result is normalized. + * If the path is relative, the root component is `""`. + * If the path is absolute, the root component includes the first path separator (`/`). + * + * ```ts + * getNormalizedPathComponents("to/dir/../file.ext", "/path/") === ["/", "path", "to", "file.ext"] + */ + function getNormalizedPathComponents(path, currentDirectory) { + return reducePathComponents(getPathComponents(path, currentDirectory)); + } + ts.getNormalizedPathComponents = getNormalizedPathComponents; + function getNormalizedAbsolutePath(fileName, currentDirectory) { + return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory)); + } + ts.getNormalizedAbsolutePath = getNormalizedAbsolutePath; + function normalizePath(path) { + path = normalizeSlashes(path); + var normalized = getPathFromPathComponents(reducePathComponents(getPathComponents(path))); + return normalized && hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(normalized) : normalized; + } + ts.normalizePath = normalizePath; + function getPathWithoutRoot(pathComponents) { + if (pathComponents.length === 0) + return ""; + return pathComponents.slice(1).join(ts.directorySeparator); + } + function getNormalizedAbsolutePathWithoutRoot(fileName, currentDirectory) { + return getPathWithoutRoot(getNormalizedPathComponents(fileName, currentDirectory)); + } + ts.getNormalizedAbsolutePathWithoutRoot = getNormalizedAbsolutePathWithoutRoot; + function toPath(fileName, basePath, getCanonicalFileName) { + var nonCanonicalizedPath = isRootedDiskPath(fileName) + ? normalizePath(fileName) + : getNormalizedAbsolutePath(fileName, basePath); + return getCanonicalFileName(nonCanonicalizedPath); + } + ts.toPath = toPath; + function normalizePathAndParts(path) { + path = normalizeSlashes(path); + var _a = reducePathComponents(getPathComponents(path)), root = _a[0], parts = _a.slice(1); + if (parts.length) { + var joinedParts = root + parts.join(ts.directorySeparator); + return { path: hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(joinedParts) : joinedParts, parts: parts }; + } + else { + return { path: root, parts: parts }; + } + } + ts.normalizePathAndParts = normalizePathAndParts; + function removeTrailingDirectorySeparator(path) { + if (hasTrailingDirectorySeparator(path)) { + return path.substr(0, path.length - 1); + } + return path; + } + ts.removeTrailingDirectorySeparator = removeTrailingDirectorySeparator; + function ensureTrailingDirectorySeparator(path) { + if (!hasTrailingDirectorySeparator(path)) { + return path + ts.directorySeparator; + } + return path; + } + ts.ensureTrailingDirectorySeparator = ensureTrailingDirectorySeparator; + /** + * Ensures a path is either absolute (prefixed with `/` or `c:`) or dot-relative (prefixed + * with `./` or `../`) so as not to be confused with an unprefixed module name. + * + * ```ts + * ensurePathIsNonModuleName("/path/to/file.ext") === "/path/to/file.ext" + * ensurePathIsNonModuleName("./path/to/file.ext") === "./path/to/file.ext" + * ensurePathIsNonModuleName("../path/to/file.ext") === "../path/to/file.ext" + * ensurePathIsNonModuleName("path/to/file.ext") === "./path/to/file.ext" + * ``` + */ + function ensurePathIsNonModuleName(path) { + return !pathIsAbsolute(path) && !pathIsRelative(path) ? "./" + path : path; + } + ts.ensurePathIsNonModuleName = ensurePathIsNonModuleName; + function changeAnyExtension(path, ext, extensions, ignoreCase) { + var pathext = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(path, extensions, ignoreCase) : getAnyExtensionFromPath(path); + return pathext ? path.slice(0, path.length - pathext.length) + (ts.startsWith(ext, ".") ? ext : "." + ext) : path; + } + ts.changeAnyExtension = changeAnyExtension; + //// Path Comparisons + // check path for these segments: '', '.'. '..' + var relativePathSegmentRegExp = /(^|\/)\.{0,2}($|\/)/; + function comparePathsWorker(a, b, componentComparer) { + if (a === b) + return 0 /* EqualTo */; + if (a === undefined) + return -1 /* LessThan */; + if (b === undefined) + return 1 /* GreaterThan */; + // NOTE: Performance optimization - shortcut if the root segments differ as there would be no + // need to perform path reduction. + var aRoot = a.substring(0, getRootLength(a)); + var bRoot = b.substring(0, getRootLength(b)); + var result = ts.compareStringsCaseInsensitive(aRoot, bRoot); + if (result !== 0 /* EqualTo */) { + return result; + } + // NOTE: Performance optimization - shortcut if there are no relative path segments in + // the non-root portion of the path + var aRest = a.substring(aRoot.length); + var bRest = b.substring(bRoot.length); + if (!relativePathSegmentRegExp.test(aRest) && !relativePathSegmentRegExp.test(bRest)) { + return componentComparer(aRest, bRest); + } + // The path contains a relative path segment. Normalize the paths and perform a slower component + // by component comparison. + var aComponents = reducePathComponents(getPathComponents(a)); + var bComponents = reducePathComponents(getPathComponents(b)); + var sharedLength = Math.min(aComponents.length, bComponents.length); + for (var i = 1; i < sharedLength; i++) { + var result_1 = componentComparer(aComponents[i], bComponents[i]); + if (result_1 !== 0 /* EqualTo */) { + return result_1; + } + } + return ts.compareValues(aComponents.length, bComponents.length); + } + /** + * Performs a case-sensitive comparison of two paths. Path roots are always compared case-insensitively. + */ + function comparePathsCaseSensitive(a, b) { + return comparePathsWorker(a, b, ts.compareStringsCaseSensitive); + } + ts.comparePathsCaseSensitive = comparePathsCaseSensitive; + /** + * Performs a case-insensitive comparison of two paths. + */ + function comparePathsCaseInsensitive(a, b) { + return comparePathsWorker(a, b, ts.compareStringsCaseInsensitive); + } + ts.comparePathsCaseInsensitive = comparePathsCaseInsensitive; + function comparePaths(a, b, currentDirectory, ignoreCase) { + if (typeof currentDirectory === "string") { + a = combinePaths(currentDirectory, a); + b = combinePaths(currentDirectory, b); + } + else if (typeof currentDirectory === "boolean") { + ignoreCase = currentDirectory; + } + return comparePathsWorker(a, b, ts.getStringComparer(ignoreCase)); + } + ts.comparePaths = comparePaths; + function containsPath(parent, child, currentDirectory, ignoreCase) { + if (typeof currentDirectory === "string") { + parent = combinePaths(currentDirectory, parent); + child = combinePaths(currentDirectory, child); + } + else if (typeof currentDirectory === "boolean") { + ignoreCase = currentDirectory; + } + if (parent === undefined || child === undefined) + return false; + if (parent === child) + return true; + var parentComponents = reducePathComponents(getPathComponents(parent)); + var childComponents = reducePathComponents(getPathComponents(child)); + if (childComponents.length < parentComponents.length) { + return false; + } + var componentEqualityComparer = ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive; + for (var i = 0; i < parentComponents.length; i++) { + var equalityComparer = i === 0 ? ts.equateStringsCaseInsensitive : componentEqualityComparer; + if (!equalityComparer(parentComponents[i], childComponents[i])) { + return false; + } + } + return true; + } + ts.containsPath = containsPath; + /** + * Determines whether `fileName` starts with the specified `directoryName` using the provided path canonicalization callback. + * Comparison is case-sensitive between the canonical paths. + * + * @deprecated Use `containsPath` if possible. + */ + function startsWithDirectory(fileName, directoryName, getCanonicalFileName) { + var canonicalFileName = getCanonicalFileName(fileName); + var canonicalDirectoryName = getCanonicalFileName(directoryName); + return ts.startsWith(canonicalFileName, canonicalDirectoryName + "/") || ts.startsWith(canonicalFileName, canonicalDirectoryName + "\\"); + } + ts.startsWithDirectory = startsWithDirectory; + //// Relative Paths + function getPathComponentsRelativeTo(from, to, stringEqualityComparer, getCanonicalFileName) { + var fromComponents = reducePathComponents(getPathComponents(from)); + var toComponents = reducePathComponents(getPathComponents(to)); + var start; + for (start = 0; start < fromComponents.length && start < toComponents.length; start++) { + var fromComponent = getCanonicalFileName(fromComponents[start]); + var toComponent = getCanonicalFileName(toComponents[start]); + var comparer = start === 0 ? ts.equateStringsCaseInsensitive : stringEqualityComparer; + if (!comparer(fromComponent, toComponent)) + break; + } + if (start === 0) { + return toComponents; + } + var components = toComponents.slice(start); + var relative = []; + for (; start < fromComponents.length; start++) { + relative.push(".."); + } + return __spreadArrays([""], relative, components); + } + ts.getPathComponentsRelativeTo = getPathComponentsRelativeTo; + function getRelativePathFromDirectory(fromDirectory, to, getCanonicalFileNameOrIgnoreCase) { + ts.Debug.assert((getRootLength(fromDirectory) > 0) === (getRootLength(to) > 0), "Paths must either both be absolute or both be relative"); + var getCanonicalFileName = typeof getCanonicalFileNameOrIgnoreCase === "function" ? getCanonicalFileNameOrIgnoreCase : ts.identity; + var ignoreCase = typeof getCanonicalFileNameOrIgnoreCase === "boolean" ? getCanonicalFileNameOrIgnoreCase : false; + var pathComponents = getPathComponentsRelativeTo(fromDirectory, to, ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive, getCanonicalFileName); + return getPathFromPathComponents(pathComponents); + } + ts.getRelativePathFromDirectory = getRelativePathFromDirectory; + function convertToRelativePath(absoluteOrRelativePath, basePath, getCanonicalFileName) { + return !isRootedDiskPath(absoluteOrRelativePath) + ? absoluteOrRelativePath + : getRelativePathToDirectoryOrUrl(basePath, absoluteOrRelativePath, basePath, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); + } + ts.convertToRelativePath = convertToRelativePath; + function getRelativePathFromFile(from, to, getCanonicalFileName) { + return ensurePathIsNonModuleName(getRelativePathFromDirectory(getDirectoryPath(from), to, getCanonicalFileName)); + } + ts.getRelativePathFromFile = getRelativePathFromFile; + function getRelativePathToDirectoryOrUrl(directoryPathOrUrl, relativeOrAbsolutePath, currentDirectory, getCanonicalFileName, isAbsolutePathAnUrl) { + var pathComponents = getPathComponentsRelativeTo(resolvePath(currentDirectory, directoryPathOrUrl), resolvePath(currentDirectory, relativeOrAbsolutePath), ts.equateStringsCaseSensitive, getCanonicalFileName); + var firstComponent = pathComponents[0]; + if (isAbsolutePathAnUrl && isRootedDiskPath(firstComponent)) { + var prefix = firstComponent.charAt(0) === ts.directorySeparator ? "file://" : "file:///"; + pathComponents[0] = prefix + firstComponent; + } + return getPathFromPathComponents(pathComponents); + } + ts.getRelativePathToDirectoryOrUrl = getRelativePathToDirectoryOrUrl; + function forEachAncestorDirectory(directory, callback) { + while (true) { + var result = callback(directory); + if (result !== undefined) { + return result; + } + var parentPath = getDirectoryPath(directory); + if (parentPath === directory) { + return undefined; + } + directory = parentPath; + } + } + ts.forEachAncestorDirectory = forEachAncestorDirectory; +})(ts || (ts = {})); // // generated from './diagnosticInformationMap.generated.ts' by 'src/compiler' /* @internal */ @@ -5655,7 +6393,7 @@ var ts; An_index_signature_parameter_cannot_have_an_initializer: diag(1020, ts.DiagnosticCategory.Error, "An_index_signature_parameter_cannot_have_an_initializer_1020", "An index signature parameter cannot have an initializer."), An_index_signature_must_have_a_type_annotation: diag(1021, ts.DiagnosticCategory.Error, "An_index_signature_must_have_a_type_annotation_1021", "An index signature must have a type annotation."), An_index_signature_parameter_must_have_a_type_annotation: diag(1022, ts.DiagnosticCategory.Error, "An_index_signature_parameter_must_have_a_type_annotation_1022", "An index signature parameter must have a type annotation."), - An_index_signature_parameter_type_must_be_string_or_number: diag(1023, ts.DiagnosticCategory.Error, "An_index_signature_parameter_type_must_be_string_or_number_1023", "An index signature parameter type must be 'string' or 'number'."), + An_index_signature_parameter_type_must_be_either_string_or_number: diag(1023, ts.DiagnosticCategory.Error, "An_index_signature_parameter_type_must_be_either_string_or_number_1023", "An index signature parameter type must be either 'string' or 'number'."), readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature: diag(1024, ts.DiagnosticCategory.Error, "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024", "'readonly' modifier can only appear on a property declaration or index signature."), Accessibility_modifier_already_seen: diag(1028, ts.DiagnosticCategory.Error, "Accessibility_modifier_already_seen_1028", "Accessibility modifier already seen."), _0_modifier_must_precede_1_modifier: diag(1029, ts.DiagnosticCategory.Error, "_0_modifier_must_precede_1_modifier_1029", "'{0}' modifier must precede '{1}' modifier."), @@ -5863,7 +6601,7 @@ var ts; Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1320, ts.DiagnosticCategory.Error, "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."), Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1321, ts.DiagnosticCategory.Error, "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."), Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1322, ts.DiagnosticCategory.Error, "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."), - Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext: diag(1323, ts.DiagnosticCategory.Error, "Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323", "Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'."), + Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_commonjs_amd_system_or_umd: diag(1323, ts.DiagnosticCategory.Error, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_commonjs_amd_system_or_umd_1323", "Dynamic imports are only supported when the '--module' flag is set to 'esnext', 'commonjs', 'amd', 'system', or 'umd'."), Dynamic_import_must_have_one_specifier_as_an_argument: diag(1324, ts.DiagnosticCategory.Error, "Dynamic_import_must_have_one_specifier_as_an_argument_1324", "Dynamic import must have one specifier as an argument."), Specifier_of_dynamic_import_cannot_be_spread_element: diag(1325, ts.DiagnosticCategory.Error, "Specifier_of_dynamic_import_cannot_be_spread_element_1325", "Specifier of dynamic import cannot be spread element."), Dynamic_import_cannot_have_type_arguments: diag(1326, ts.DiagnosticCategory.Error, "Dynamic_import_cannot_have_type_arguments_1326", "Dynamic import cannot have type arguments"), @@ -5899,6 +6637,7 @@ var ts; An_enum_member_name_must_be_followed_by_a_or: diag(1357, ts.DiagnosticCategory.Error, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."), Tagged_template_expressions_are_not_permitted_in_an_optional_chain: diag(1358, ts.DiagnosticCategory.Error, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."), Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here: diag(1359, ts.DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359", "Identifier expected. '{0}' is a reserved word that cannot be used here."), + Did_you_mean_to_parenthesize_this_function_type: diag(1360, ts.DiagnosticCategory.Error, "Did_you_mean_to_parenthesize_this_function_type_1360", "Did you mean to parenthesize this function type?"), The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."), The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."), Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), @@ -6026,7 +6765,6 @@ var ts; Class_0_incorrectly_implements_interface_1: diag(2420, ts.DiagnosticCategory.Error, "Class_0_incorrectly_implements_interface_1_2420", "Class '{0}' incorrectly implements interface '{1}'."), A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2422, ts.DiagnosticCategory.Error, "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422", "A class can only implement an object type or intersection of object types with statically known members."), Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: diag(2423, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423", "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."), - Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: diag(2424, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424", "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property."), Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: diag(2425, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425", "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."), Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: diag(2426, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426", "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."), Interface_name_cannot_be_0: diag(2427, ts.DiagnosticCategory.Error, "Interface_name_cannot_be_0_2427", "Interface name cannot be '{0}'."), @@ -6196,8 +6934,8 @@ var ts; JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: diag(2607, ts.DiagnosticCategory.Error, "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", "JSX element class does not support attributes because it does not have a '{0}' property."), The_global_type_JSX_0_may_not_have_more_than_one_property: diag(2608, ts.DiagnosticCategory.Error, "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", "The global type 'JSX.{0}' may not have more than one property."), JSX_spread_child_must_be_an_array_type: diag(2609, ts.DiagnosticCategory.Error, "JSX_spread_child_must_be_an_array_type_2609", "JSX spread child must be an array type."), - Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_property: diag(2610, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_proper_2610", "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member property."), - Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_accessor: diag(2611, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_access_2611", "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member accessor."), + _0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property: diag(2610, ts.DiagnosticCategory.Error, "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610", "'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property."), + _0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor: diag(2611, ts.DiagnosticCategory.Error, "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611", "'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor."), Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration: diag(2612, ts.DiagnosticCategory.Error, "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612", "Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration."), Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead: diag(2613, ts.DiagnosticCategory.Error, "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613", "Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"), Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead: diag(2614, ts.DiagnosticCategory.Error, "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614", "Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"), @@ -6420,6 +7158,8 @@ var ts; Parameter_0_of_accessor_has_or_is_using_private_name_1: diag(4106, ts.DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106", "Parameter '{0}' of accessor has or is using private name '{1}'."), Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2: diag(4107, ts.DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107", "Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."), Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4108, ts.DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108", "Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."), + Type_arguments_for_0_circularly_reference_themselves: diag(4109, ts.DiagnosticCategory.Error, "Type_arguments_for_0_circularly_reference_themselves_4109", "Type arguments for '{0}' circularly reference themselves."), + Tuple_type_arguments_circularly_reference_themselves: diag(4110, ts.DiagnosticCategory.Error, "Tuple_type_arguments_circularly_reference_themselves_4110", "Tuple type arguments circularly reference themselves."), The_current_host_does_not_support_the_0_option: diag(5001, ts.DiagnosticCategory.Error, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."), Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, ts.DiagnosticCategory.Error, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."), File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, ts.DiagnosticCategory.Error, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."), @@ -6427,6 +7167,7 @@ var ts; Failed_to_parse_file_0_Colon_1: diag(5014, ts.DiagnosticCategory.Error, "Failed_to_parse_file_0_Colon_1_5014", "Failed to parse file '{0}': {1}."), Unknown_compiler_option_0: diag(5023, ts.DiagnosticCategory.Error, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."), Compiler_option_0_requires_a_value_of_type_1: diag(5024, ts.DiagnosticCategory.Error, "Compiler_option_0_requires_a_value_of_type_1_5024", "Compiler option '{0}' requires a value of type {1}."), + Unknown_compiler_option_0_Did_you_mean_1: diag(5025, ts.DiagnosticCategory.Error, "Unknown_compiler_option_0_Did_you_mean_1_5025", "Unknown compiler option '{0}'. Did you mean '{1}'?"), Could_not_write_file_0_Colon_1: diag(5033, ts.DiagnosticCategory.Error, "Could_not_write_file_0_Colon_1_5033", "Could not write file '{0}': {1}."), Option_project_cannot_be_mixed_with_source_files_on_a_command_line: diag(5042, ts.DiagnosticCategory.Error, "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042", "Option 'project' cannot be mixed with source files on a command line."), Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher: diag(5047, ts.DiagnosticCategory.Error, "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047", "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."), @@ -6457,6 +7198,7 @@ var ts; Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified: diag(5074, ts.DiagnosticCategory.Error, "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074", "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option `--tsBuildInfoFile` is specified."), _0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2: diag(5075, ts.DiagnosticCategory.Error, "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075", "'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."), _0_and_1_operations_cannot_be_mixed_without_parentheses: diag(5076, ts.DiagnosticCategory.Error, "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076", "'{0}' and '{1}' operations cannot be mixed without parentheses."), + Unknown_build_option_0_Did_you_mean_1: diag(5077, ts.DiagnosticCategory.Error, "Unknown_build_option_0_Did_you_mean_1_5077", "Unknown build option '{0}'. Did you mean '{1}'?"), Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6000, ts.DiagnosticCategory.Message, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."), Concatenate_and_emit_output_to_single_file: diag(6001, ts.DiagnosticCategory.Message, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."), Generates_corresponding_d_ts_file: diag(6002, ts.DiagnosticCategory.Message, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), @@ -6503,7 +7245,7 @@ var ts; Corrupted_locale_file_0: diag(6051, ts.DiagnosticCategory.Error, "Corrupted_locale_file_0_6051", "Corrupted locale file {0}."), Raise_error_on_expressions_and_declarations_with_an_implied_any_type: diag(6052, ts.DiagnosticCategory.Message, "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052", "Raise error on expressions and declarations with an implied 'any' type."), File_0_not_found: diag(6053, ts.DiagnosticCategory.Error, "File_0_not_found_6053", "File '{0}' not found."), - File_0_has_unsupported_extension_The_only_supported_extensions_are_1: diag(6054, ts.DiagnosticCategory.Error, "File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054", "File '{0}' has unsupported extension. The only supported extensions are {1}."), + File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1: diag(6054, ts.DiagnosticCategory.Error, "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054", "File '{0}' has an unsupported extension. The only supported extensions are {1}."), Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: diag(6055, ts.DiagnosticCategory.Message, "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055", "Suppress noImplicitAny errors for indexing objects lacking index signatures."), Do_not_emit_declarations_for_code_that_has_an_internal_annotation: diag(6056, ts.DiagnosticCategory.Message, "Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056", "Do not emit declarations for code that has an '@internal' annotation."), Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: diag(6058, ts.DiagnosticCategory.Message, "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058", "Specify the root directory of input files. Use to control the output directory structure with --outDir."), @@ -6711,6 +7453,8 @@ var ts; The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", "The expected type comes from property '{0}' which is declared here on type '{1}'"), The_expected_type_comes_from_this_index_signature: diag(6501, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."), The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."), + Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing: diag(6503, ts.DiagnosticCategory.Message, "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503", "Print names of files that are part of the compilation and then stop processing."), + File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option: diag(6504, ts.DiagnosticCategory.Error, "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504", "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"), Variable_0_implicitly_has_an_1_type: diag(7005, ts.DiagnosticCategory.Error, "Variable_0_implicitly_has_an_1_type_7005", "Variable '{0}' implicitly has an '{1}' type."), Parameter_0_implicitly_has_an_1_type: diag(7006, ts.DiagnosticCategory.Error, "Parameter_0_implicitly_has_an_1_type_7006", "Parameter '{0}' implicitly has an '{1}' type."), Member_0_implicitly_has_an_1_type: diag(7008, ts.DiagnosticCategory.Error, "Member_0_implicitly_has_an_1_type_7008", "Member '{0}' implicitly has an '{1}' type."), @@ -6814,6 +7558,7 @@ var ts; Expected_corresponding_closing_tag_for_JSX_fragment: diag(17015, ts.DiagnosticCategory.Error, "Expected_corresponding_closing_tag_for_JSX_fragment_17015", "Expected corresponding closing tag for JSX fragment."), JSX_fragment_is_not_supported_when_using_jsxFactory: diag(17016, ts.DiagnosticCategory.Error, "JSX_fragment_is_not_supported_when_using_jsxFactory_17016", "JSX fragment is not supported when using --jsxFactory"), JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma: diag(17017, ts.DiagnosticCategory.Error, "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017", "JSX fragment is not supported when using an inline JSX factory pragma"), + Unknown_type_acquisition_option_0_Did_you_mean_1: diag(17018, ts.DiagnosticCategory.Error, "Unknown_type_acquisition_option_0_Did_you_mean_1_17018", "Unknown type acquisition option '{0}'. Did you mean '{1}'?"), Circularity_detected_while_resolving_configuration_Colon_0: diag(18000, ts.DiagnosticCategory.Error, "Circularity_detected_while_resolving_configuration_Colon_0_18000", "Circularity detected while resolving configuration: {0}"), A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not: diag(18001, ts.DiagnosticCategory.Error, "A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not_18001", "A path in an 'extends' option must be relative or rooted, but '{0}' is not."), The_files_list_in_config_file_0_is_empty: diag(18002, ts.DiagnosticCategory.Error, "The_files_list_in_config_file_0_is_empty_18002", "The 'files' list in config file '{0}' is empty."), @@ -9046,7 +9791,7 @@ var ts; ts.getDeclarationOfKind = getDeclarationOfKind; /** Create a new escaped identifier map. */ function createUnderscoreEscapedMap() { - return new ts.MapCtr(); + return new ts.Map(); } ts.createUnderscoreEscapedMap = createUnderscoreEscapedMap; function hasEntries(map) { @@ -9102,13 +9847,6 @@ var ts; reportPrivateInBaseOfClassExpression: ts.noop, }; } - function toPath(fileName, basePath, getCanonicalFileName) { - var nonCanonicalizedPath = ts.isRootedDiskPath(fileName) - ? ts.normalizePath(fileName) - : ts.getNormalizedAbsolutePath(fileName, basePath); - return getCanonicalFileName(nonCanonicalizedPath); - } - ts.toPath = toPath; function changesAffectModuleResolution(oldOptions, newOptions) { return oldOptions.configFilePath !== newOptions.configFilePath || optionsHaveModuleResolutionChanges(oldOptions, newOptions); @@ -9915,6 +10653,11 @@ var ts; break; case 201 /* ArrowFunction */: return getErrorSpanForArrowFunction(sourceFile, node); + case 275 /* CaseClause */: + case 276 /* DefaultClause */: + var start = ts.skipTrivia(sourceFile.text, node.pos); + var end = node.statements.length > 0 ? node.statements[0].pos : node.end; + return ts.createTextSpanFromBounds(start, end); } if (errorNode === undefined) { // If we don't have a better node, then just set the error on the first token of @@ -10727,7 +11470,7 @@ var ts; (node.typeArguments[0].kind === 142 /* StringKeyword */ || node.typeArguments[0].kind === 139 /* NumberKeyword */); } ts.isJSDocIndexSignature = isJSDocIndexSignature; - function isRequireCall(callExpression, checkArgumentIsStringLiteralLike) { + function isRequireCall(callExpression, requireStringLiteralLikeArgument) { if (callExpression.kind !== 195 /* CallExpression */) { return false; } @@ -10739,7 +11482,7 @@ var ts; return false; } var arg = args[0]; - return !checkArgumentIsStringLiteralLike || ts.isStringLiteralLike(arg); + return !requireStringLiteralLikeArgument || ts.isStringLiteralLike(arg); } ts.isRequireCall = isRequireCall; function isSingleOrDoubleQuote(charCode) { @@ -10961,27 +11704,31 @@ var ts; isBindableStaticNameExpression(expr.arguments[0], /*excludeThisKeyword*/ true); } ts.isBindableObjectDefinePropertyCall = isBindableObjectDefinePropertyCall; - function isBindableStaticElementAccessExpression(node, excludeThisKeyword) { - return isLiteralLikeElementAccess(node) - && ((!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */) || - isEntityNameExpression(node.expression) || - isBindableStaticElementAccessExpression(node.expression, /*excludeThisKeyword*/ true)); - } - ts.isBindableStaticElementAccessExpression = isBindableStaticElementAccessExpression; + /** x.y OR x[0] */ function isLiteralLikeAccess(node) { return ts.isPropertyAccessExpression(node) || isLiteralLikeElementAccess(node); } ts.isLiteralLikeAccess = isLiteralLikeAccess; + /** x[0] OR x['a'] OR x[Symbol.y] */ function isLiteralLikeElementAccess(node) { return ts.isElementAccessExpression(node) && (isStringOrNumericLiteralLike(node.argumentExpression) || isWellKnownSymbolSyntactically(node.argumentExpression)); } ts.isLiteralLikeElementAccess = isLiteralLikeElementAccess; + /** Any series of property and element accesses. */ function isBindableStaticAccessExpression(node, excludeThisKeyword) { return ts.isPropertyAccessExpression(node) && (!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */ || isBindableStaticNameExpression(node.expression, /*excludeThisKeyword*/ true)) || isBindableStaticElementAccessExpression(node, excludeThisKeyword); } ts.isBindableStaticAccessExpression = isBindableStaticAccessExpression; + /** Any series of property and element accesses, ending in a literal element access */ + function isBindableStaticElementAccessExpression(node, excludeThisKeyword) { + return isLiteralLikeElementAccess(node) + && ((!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */) || + isEntityNameExpression(node.expression) || + isBindableStaticAccessExpression(node.expression, /*excludeThisKeyword*/ true)); + } + ts.isBindableStaticElementAccessExpression = isBindableStaticElementAccessExpression; function isBindableStaticNameExpression(node, excludeThisKeyword) { return isEntityNameExpression(node) || isBindableStaticAccessExpression(node, excludeThisKeyword); } @@ -11010,7 +11757,7 @@ var ts; if (expr.operatorToken.kind !== 62 /* EqualsToken */ || !isAccessExpression(expr.left)) { return 0 /* None */; } - if (isBindableStaticNameExpression(expr.left.expression) && getElementOrPropertyAccessName(expr.left) === "prototype" && ts.isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) { + if (isBindableStaticNameExpression(expr.left.expression, /*excludeThisKeyword*/ true) && getElementOrPropertyAccessName(expr.left) === "prototype" && ts.isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) { // F.prototype = { ... } return 6 /* Prototype */; } @@ -11066,13 +11813,17 @@ var ts; nextToLast = nextToLast.expression; } var id = nextToLast.expression; - if (id.escapedText === "exports" || - id.escapedText === "module" && getElementOrPropertyAccessName(nextToLast) === "exports") { - // exports.name = expr OR module.exports.name = expr + if ((id.escapedText === "exports" || + id.escapedText === "module" && getElementOrPropertyAccessName(nextToLast) === "exports") && + // ExportsProperty does not support binding with computed names + isBindableStaticAccessExpression(lhs)) { + // exports.name = expr OR module.exports.name = expr OR exports["name"] = expr ... return 1 /* ExportsProperty */; } - // F.G...x = expr - return 5 /* Property */; + if (isBindableStaticNameExpression(lhs, /*excludeThisKeyword*/ true) || (ts.isElementAccessExpression(lhs) && isDynamicName(lhs) && lhs.expression.kind !== 103 /* ThisKeyword */)) { + // F.G...x = expr + return 5 /* Property */; + } } return 0 /* None */; } @@ -12394,7 +13145,7 @@ var ts; */ function getExternalModuleNameFromPath(host, fileName, referencePath) { var getCanonicalFileName = function (f) { return host.getCanonicalFileName(f); }; - var dir = toPath(referencePath ? ts.getDirectoryPath(referencePath) : host.getCommonSourceDirectory(), host.getCurrentDirectory(), getCanonicalFileName); + var dir = ts.toPath(referencePath ? ts.getDirectoryPath(referencePath) : host.getCommonSourceDirectory(), host.getCurrentDirectory(), getCanonicalFileName); var filePath = ts.getNormalizedAbsolutePath(fileName, host.getCurrentDirectory()); var relativePath = ts.getRelativePathToDirectoryOrUrl(dir, filePath, dir, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); var extensionless = ts.removeFileExtension(relativePath); @@ -12477,6 +13228,25 @@ var ts; }, sourceFiles); } ts.writeFile = writeFile; + function ensureDirectoriesExist(directoryPath, createDirectory, directoryExists) { + if (directoryPath.length > ts.getRootLength(directoryPath) && !directoryExists(directoryPath)) { + var parentDirectory = ts.getDirectoryPath(directoryPath); + ensureDirectoriesExist(parentDirectory, createDirectory, directoryExists); + createDirectory(directoryPath); + } + } + function writeFileEnsuringDirectories(path, data, writeByteOrderMark, writeFile, createDirectory, directoryExists) { + // PERF: Checking for directory existence is expensive. Instead, assume the directory exists + // and fall back to creating it if the file write fails. + try { + writeFile(path, data, writeByteOrderMark); + } + catch (_a) { + ensureDirectoriesExist(ts.getDirectoryPath(ts.normalizePath(path)), createDirectory, directoryExists); + writeFile(path, data, writeByteOrderMark); + } + } + ts.writeFileEnsuringDirectories = writeFileEnsuringDirectories; function getLineOfLocalPosition(currentSourceFile, pos) { return ts.getLineAndCharacterOfPosition(currentSourceFile, pos).line; } @@ -12916,6 +13686,23 @@ var ts; return node.kind === 75 /* Identifier */ || isPropertyAccessEntityNameExpression(node); } ts.isEntityNameExpression = isEntityNameExpression; + function getFirstIdentifier(node) { + switch (node.kind) { + case 75 /* Identifier */: + return node; + case 152 /* QualifiedName */: + do { + node = node.left; + } while (node.kind !== 75 /* Identifier */); + return node; + case 193 /* PropertyAccessExpression */: + do { + node = node.expression; + } while (node.kind !== 75 /* Identifier */); + return node; + } + } + ts.getFirstIdentifier = getFirstIdentifier; function isDottedName(node) { return node.kind === 75 /* Identifier */ || node.kind === 103 /* ThisKeyword */ || node.kind === 193 /* PropertyAccessExpression */ && isDottedName(node.expression) || @@ -13434,20 +14221,6 @@ var ts; }); } ts.mutateMap = mutateMap; - function forEachAncestorDirectory(directory, callback) { - while (true) { - var result = callback(directory); - if (result !== undefined) { - return result; - } - var parentPath = ts.getDirectoryPath(directory); - if (parentPath === directory) { - return undefined; - } - directory = parentPath; - } - } - ts.forEachAncestorDirectory = forEachAncestorDirectory; // Return true if the given type is the constructor type for an abstract class function isAbstractConstructorType(type) { return !!(getObjectFlags(type) & 16 /* Anonymous */) && !!type.symbol && isAbstractConstructorSymbol(type.symbol); @@ -13474,7 +14247,7 @@ var ts; } ts.typeHasCallOrConstructSignatures = typeHasCallOrConstructSignatures; function forSomeAncestorDirectory(directory, callback) { - return !!forEachAncestorDirectory(directory, function (d) { return callback(d) ? true : undefined; }); + return !!ts.forEachAncestorDirectory(directory, function (d) { return callback(d) ? true : undefined; }); } ts.forSomeAncestorDirectory = forSomeAncestorDirectory; function isUMDExportSymbol(symbol) { @@ -14539,11 +15312,47 @@ var ts; } ts.isCallChain = isCallChain; function isOptionalChain(node) { - return isPropertyAccessChain(node) - || isElementAccessChain(node) - || isCallChain(node); + var kind = node.kind; + return !!(node.flags & 32 /* OptionalChain */) && + (kind === 193 /* PropertyAccessExpression */ + || kind === 194 /* ElementAccessExpression */ + || kind === 195 /* CallExpression */); } ts.isOptionalChain = isOptionalChain; + /* @internal */ + function isOptionalChainRoot(node) { + return isOptionalChain(node) && !!node.questionDotToken; + } + ts.isOptionalChainRoot = isOptionalChainRoot; + /** + * Determines whether a node is the expression preceding an optional chain (i.e. `a` in `a?.b`). + */ + /* @internal */ + function isExpressionOfOptionalChainRoot(node) { + return isOptionalChainRoot(node.parent) && node.parent.expression === node; + } + ts.isExpressionOfOptionalChainRoot = isExpressionOfOptionalChainRoot; + /** + * Determines whether a node is the outermost `OptionalChain` in an ECMAScript `OptionalExpression`: + * + * 1. For `a?.b.c`, the outermost chain is `a?.b.c` (`c` is the end of the chain starting at `a?.`) + * 2. For `(a?.b.c).d`, the outermost chain is `a?.b.c` (`c` is the end of the chain starting at `a?.` since parens end the chain) + * 3. For `a?.b.c?.d`, both `a?.b.c` and `a?.b.c?.d` are outermost (`c` is the end of the chain starting at `a?.`, and `d` is + * the end of the chain starting at `c?.`) + * 4. For `a?.(b?.c).d`, both `b?.c` and `a?.(b?.c)d` are outermost (`c` is the end of the chain starting at `b`, and `d` is + * the end of the chain starting at `a?.`) + */ + /* @internal */ + function isOutermostOptionalChain(node) { + return !isOptionalChain(node.parent) // cases 1 and 2 + || isOptionalChainRoot(node.parent) // case 3 + || node !== node.parent.expression; // case 4 + } + ts.isOutermostOptionalChain = isOutermostOptionalChain; + function isNullishCoalesce(node) { + return node.kind === 208 /* BinaryExpression */ && node.operatorToken.kind === 60 /* QuestionQuestionToken */; + } + ts.isNullishCoalesce = isNullishCoalesce; function isNewExpression(node) { return node.kind === 196 /* NewExpression */; } @@ -15814,11 +16623,6 @@ var ts; return node.kind === 162 /* GetAccessor */; } ts.isGetAccessor = isGetAccessor; - /* @internal */ - function isOptionalChainRoot(node) { - return ts.isOptionalChain(node) && !!node.questionDotToken; - } - ts.isOptionalChainRoot = isOptionalChainRoot; /** True if has jsdoc nodes attached to it. */ /* @internal */ // TODO: GH#19856 Would like to return `node is Node & { jsDoc: JSDoc[] }` but it causes long compile times @@ -15905,7 +16709,12 @@ var ts; this.checker = checker; } } - function Signature() { } + function Signature(checker, flags) { + this.flags = flags; + if (ts.Debug.isDebugging) { + this.checker = checker; + } + } function Node(kind, pos, end) { this.pos = pos; this.end = end; @@ -16180,273 +16989,6 @@ var ts; return true; } ts.hasZeroOrOneAsteriskCharacter = hasZeroOrOneAsteriskCharacter; - /** - * Internally, we represent paths as strings with '/' as the directory separator. - * When we make system calls (eg: LanguageServiceHost.getDirectory()), - * we expect the host to correctly handle paths in our specified format. - */ - ts.directorySeparator = "/"; - var altDirectorySeparator = "\\"; - var urlSchemeSeparator = "://"; - var backslashRegExp = /\\/g; - /** - * Normalize path separators. - */ - function normalizeSlashes(path) { - return path.replace(backslashRegExp, ts.directorySeparator); - } - ts.normalizeSlashes = normalizeSlashes; - function isVolumeCharacter(charCode) { - return (charCode >= 97 /* a */ && charCode <= 122 /* z */) || - (charCode >= 65 /* A */ && charCode <= 90 /* Z */); - } - function getFileUrlVolumeSeparatorEnd(url, start) { - var ch0 = url.charCodeAt(start); - if (ch0 === 58 /* colon */) - return start + 1; - if (ch0 === 37 /* percent */ && url.charCodeAt(start + 1) === 51 /* _3 */) { - var ch2 = url.charCodeAt(start + 2); - if (ch2 === 97 /* a */ || ch2 === 65 /* A */) - return start + 3; - } - return -1; - } - /** - * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). - * If the root is part of a URL, the twos-complement of the root length is returned. - */ - function getEncodedRootLength(path) { - if (!path) - return 0; - var ch0 = path.charCodeAt(0); - // POSIX or UNC - if (ch0 === 47 /* slash */ || ch0 === 92 /* backslash */) { - if (path.charCodeAt(1) !== ch0) - return 1; // POSIX: "/" (or non-normalized "\") - var p1 = path.indexOf(ch0 === 47 /* slash */ ? ts.directorySeparator : altDirectorySeparator, 2); - if (p1 < 0) - return path.length; // UNC: "//server" or "\\server" - return p1 + 1; // UNC: "//server/" or "\\server\" - } - // DOS - if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58 /* colon */) { - var ch2 = path.charCodeAt(2); - if (ch2 === 47 /* slash */ || ch2 === 92 /* backslash */) - return 3; // DOS: "c:/" or "c:\" - if (path.length === 2) - return 2; // DOS: "c:" (but not "c:d") - } - // URL - var schemeEnd = path.indexOf(urlSchemeSeparator); - if (schemeEnd !== -1) { - var authorityStart = schemeEnd + urlSchemeSeparator.length; - var authorityEnd = path.indexOf(ts.directorySeparator, authorityStart); - if (authorityEnd !== -1) { // URL: "file:///", "file://server/", "file://server/path" - // For local "file" URLs, include the leading DOS volume (if present). - // Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a - // special case interpreted as "the machine from which the URL is being interpreted". - var scheme = path.slice(0, schemeEnd); - var authority = path.slice(authorityStart, authorityEnd); - if (scheme === "file" && (authority === "" || authority === "localhost") && - isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) { - var volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2); - if (volumeSeparatorEnd !== -1) { - if (path.charCodeAt(volumeSeparatorEnd) === 47 /* slash */) { - // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/" - return ~(volumeSeparatorEnd + 1); - } - if (volumeSeparatorEnd === path.length) { - // URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a" - // but not "file:///c:d" or "file:///c%3ad" - return ~volumeSeparatorEnd; - } - } - } - return ~(authorityEnd + 1); // URL: "file://server/", "http://server/" - } - return ~path.length; // URL: "file://server", "http://server" - } - // relative - return 0; - } - /** - * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). - * - * For example: - * ```ts - * getRootLength("a") === 0 // "" - * getRootLength("/") === 1 // "/" - * getRootLength("c:") === 2 // "c:" - * getRootLength("c:d") === 0 // "" - * getRootLength("c:/") === 3 // "c:/" - * getRootLength("c:\\") === 3 // "c:\\" - * getRootLength("//server") === 7 // "//server" - * getRootLength("//server/share") === 8 // "//server/" - * getRootLength("\\\\server") === 7 // "\\\\server" - * getRootLength("\\\\server\\share") === 8 // "\\\\server\\" - * getRootLength("file:///path") === 8 // "file:///" - * getRootLength("file:///c:") === 10 // "file:///c:" - * getRootLength("file:///c:d") === 8 // "file:///" - * getRootLength("file:///c:/path") === 11 // "file:///c:/" - * getRootLength("file://server") === 13 // "file://server" - * getRootLength("file://server/path") === 14 // "file://server/" - * getRootLength("http://server") === 13 // "http://server" - * getRootLength("http://server/path") === 14 // "http://server/" - * ``` - */ - function getRootLength(path) { - var rootLength = getEncodedRootLength(path); - return rootLength < 0 ? ~rootLength : rootLength; - } - ts.getRootLength = getRootLength; - // TODO(rbuckton): replace references with `resolvePath` - function normalizePath(path) { - return ts.resolvePath(path); - } - ts.normalizePath = normalizePath; - function normalizePathAndParts(path) { - path = normalizeSlashes(path); - var _a = reducePathComponents(getPathComponents(path)), root = _a[0], parts = _a.slice(1); - if (parts.length) { - var joinedParts = root + parts.join(ts.directorySeparator); - return { path: ts.hasTrailingDirectorySeparator(path) ? ts.ensureTrailingDirectorySeparator(joinedParts) : joinedParts, parts: parts }; - } - else { - return { path: root, parts: parts }; - } - } - ts.normalizePathAndParts = normalizePathAndParts; - function getDirectoryPath(path) { - path = normalizeSlashes(path); - // If the path provided is itself the root, then return it. - var rootLength = getRootLength(path); - if (rootLength === path.length) - return path; - // return the leading portion of the path up to the last (non-terminal) directory separator - // but not including any trailing directory separator. - path = ts.removeTrailingDirectorySeparator(path); - return path.slice(0, Math.max(rootLength, path.lastIndexOf(ts.directorySeparator))); - } - ts.getDirectoryPath = getDirectoryPath; - function startsWithDirectory(fileName, directoryName, getCanonicalFileName) { - var canonicalFileName = getCanonicalFileName(fileName); - var canonicalDirectoryName = getCanonicalFileName(directoryName); - return ts.startsWith(canonicalFileName, canonicalDirectoryName + "/") || ts.startsWith(canonicalFileName, canonicalDirectoryName + "\\"); - } - ts.startsWithDirectory = startsWithDirectory; - function isUrl(path) { - return getEncodedRootLength(path) < 0; - } - ts.isUrl = isUrl; - function pathIsRelative(path) { - return /^\.\.?($|[\\/])/.test(path); - } - ts.pathIsRelative = pathIsRelative; - /** - * Determines whether a path is an absolute path (e.g. starts with `/`, or a dos path - * like `c:`, `c:\` or `c:/`). - */ - function isRootedDiskPath(path) { - return getEncodedRootLength(path) > 0; - } - ts.isRootedDiskPath = isRootedDiskPath; - /** - * Determines whether a path consists only of a path root. - */ - function isDiskPathRoot(path) { - var rootLength = getEncodedRootLength(path); - return rootLength > 0 && rootLength === path.length; - } - ts.isDiskPathRoot = isDiskPathRoot; - function convertToRelativePath(absoluteOrRelativePath, basePath, getCanonicalFileName) { - return !isRootedDiskPath(absoluteOrRelativePath) - ? absoluteOrRelativePath - : ts.getRelativePathToDirectoryOrUrl(basePath, absoluteOrRelativePath, basePath, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); - } - ts.convertToRelativePath = convertToRelativePath; - function pathComponents(path, rootLength) { - var root = path.substring(0, rootLength); - var rest = path.substring(rootLength).split(ts.directorySeparator); - if (rest.length && !ts.lastOrUndefined(rest)) - rest.pop(); - return __spreadArrays([root], rest); - } - /** - * Parse a path into an array containing a root component (at index 0) and zero or more path - * components (at indices > 0). The result is not normalized. - * If the path is relative, the root component is `""`. - * If the path is absolute, the root component includes the first path separator (`/`). - */ - function getPathComponents(path, currentDirectory) { - if (currentDirectory === void 0) { currentDirectory = ""; } - path = ts.combinePaths(currentDirectory, path); - var rootLength = getRootLength(path); - return pathComponents(path, rootLength); - } - ts.getPathComponents = getPathComponents; - /** - * Reduce an array of path components to a more simplified path by navigating any - * `"."` or `".."` entries in the path. - */ - function reducePathComponents(components) { - if (!ts.some(components)) - return []; - var reduced = [components[0]]; - for (var i = 1; i < components.length; i++) { - var component = components[i]; - if (!component) - continue; - if (component === ".") - continue; - if (component === "..") { - if (reduced.length > 1) { - if (reduced[reduced.length - 1] !== "..") { - reduced.pop(); - continue; - } - } - else if (reduced[0]) - continue; - } - reduced.push(component); - } - return reduced; - } - ts.reducePathComponents = reducePathComponents; - /** - * Parse a path into an array containing a root component (at index 0) and zero or more path - * components (at indices > 0). The result is normalized. - * If the path is relative, the root component is `""`. - * If the path is absolute, the root component includes the first path separator (`/`). - */ - function getNormalizedPathComponents(path, currentDirectory) { - return reducePathComponents(getPathComponents(path, currentDirectory)); - } - ts.getNormalizedPathComponents = getNormalizedPathComponents; - function getNormalizedAbsolutePath(fileName, currentDirectory) { - return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory)); - } - ts.getNormalizedAbsolutePath = getNormalizedAbsolutePath; - /** - * Formats a parsed path consisting of a root component (at index 0) and zero or more path - * segments (at indices > 0). - */ - function getPathFromPathComponents(pathComponents) { - if (pathComponents.length === 0) - return ""; - var root = pathComponents[0] && ts.ensureTrailingDirectorySeparator(pathComponents[0]); - return root + pathComponents.slice(1).join(ts.directorySeparator); - } - ts.getPathFromPathComponents = getPathFromPathComponents; - function getNormalizedAbsolutePathWithoutRoot(fileName, currentDirectory) { - return getPathWithoutRoot(getNormalizedPathComponents(fileName, currentDirectory)); - } - ts.getNormalizedAbsolutePathWithoutRoot = getNormalizedAbsolutePathWithoutRoot; - function getPathWithoutRoot(pathComponents) { - if (pathComponents.length === 0) - return ""; - return pathComponents.slice(1).join(ts.directorySeparator); - } function discoverProbableSymlinks(files, getCanonicalFileName, cwd) { var result = ts.createMap(); var symlinks = ts.flatten(ts.mapDefined(files, function (sf) { @@ -16463,15 +17005,15 @@ var ts; } ts.discoverProbableSymlinks = discoverProbableSymlinks; function guessDirectorySymlink(a, b, cwd, getCanonicalFileName) { - var aParts = getPathComponents(ts.toPath(a, cwd, getCanonicalFileName)); - var bParts = getPathComponents(ts.toPath(b, cwd, getCanonicalFileName)); + var aParts = ts.getPathComponents(ts.toPath(a, cwd, getCanonicalFileName)); + var bParts = ts.getPathComponents(ts.toPath(b, cwd, getCanonicalFileName)); while (!isNodeModulesOrScopedPackageDirectory(aParts[aParts.length - 2], getCanonicalFileName) && !isNodeModulesOrScopedPackageDirectory(bParts[bParts.length - 2], getCanonicalFileName) && getCanonicalFileName(aParts[aParts.length - 1]) === getCanonicalFileName(bParts[bParts.length - 1])) { aParts.pop(); bParts.pop(); } - return [getPathFromPathComponents(aParts), getPathFromPathComponents(bParts)]; + return [ts.getPathFromPathComponents(aParts), ts.getPathFromPathComponents(bParts)]; } // KLUDGE: Don't assume one 'node_modules' links to another. More likely a single directory inside the node_modules is the symlink. // ALso, don't assume that an `@foo` directory is linked. More likely the contents of that are linked. @@ -16481,229 +17023,8 @@ var ts; })(ts || (ts = {})); /* @internal */ (function (ts) { - function getPathComponentsRelativeTo(from, to, stringEqualityComparer, getCanonicalFileName) { - var fromComponents = ts.reducePathComponents(ts.getPathComponents(from)); - var toComponents = ts.reducePathComponents(ts.getPathComponents(to)); - var start; - for (start = 0; start < fromComponents.length && start < toComponents.length; start++) { - var fromComponent = getCanonicalFileName(fromComponents[start]); - var toComponent = getCanonicalFileName(toComponents[start]); - var comparer = start === 0 ? ts.equateStringsCaseInsensitive : stringEqualityComparer; - if (!comparer(fromComponent, toComponent)) - break; - } - if (start === 0) { - return toComponents; - } - var components = toComponents.slice(start); - var relative = []; - for (; start < fromComponents.length; start++) { - relative.push(".."); - } - return __spreadArrays([""], relative, components); - } - ts.getPathComponentsRelativeTo = getPathComponentsRelativeTo; - function getRelativePathFromFile(from, to, getCanonicalFileName) { - return ensurePathIsNonModuleName(getRelativePathFromDirectory(ts.getDirectoryPath(from), to, getCanonicalFileName)); - } - ts.getRelativePathFromFile = getRelativePathFromFile; - function getRelativePathFromDirectory(fromDirectory, to, getCanonicalFileNameOrIgnoreCase) { - ts.Debug.assert((ts.getRootLength(fromDirectory) > 0) === (ts.getRootLength(to) > 0), "Paths must either both be absolute or both be relative"); - var getCanonicalFileName = typeof getCanonicalFileNameOrIgnoreCase === "function" ? getCanonicalFileNameOrIgnoreCase : ts.identity; - var ignoreCase = typeof getCanonicalFileNameOrIgnoreCase === "boolean" ? getCanonicalFileNameOrIgnoreCase : false; - var pathComponents = getPathComponentsRelativeTo(fromDirectory, to, ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive, getCanonicalFileName); - return ts.getPathFromPathComponents(pathComponents); - } - ts.getRelativePathFromDirectory = getRelativePathFromDirectory; - function getRelativePathToDirectoryOrUrl(directoryPathOrUrl, relativeOrAbsolutePath, currentDirectory, getCanonicalFileName, isAbsolutePathAnUrl) { - var pathComponents = getPathComponentsRelativeTo(resolvePath(currentDirectory, directoryPathOrUrl), resolvePath(currentDirectory, relativeOrAbsolutePath), ts.equateStringsCaseSensitive, getCanonicalFileName); - var firstComponent = pathComponents[0]; - if (isAbsolutePathAnUrl && ts.isRootedDiskPath(firstComponent)) { - var prefix = firstComponent.charAt(0) === ts.directorySeparator ? "file://" : "file:///"; - pathComponents[0] = prefix + firstComponent; - } - return ts.getPathFromPathComponents(pathComponents); - } - ts.getRelativePathToDirectoryOrUrl = getRelativePathToDirectoryOrUrl; - /** - * Ensures a path is either absolute (prefixed with `/` or `c:`) or dot-relative (prefixed - * with `./` or `../`) so as not to be confused with an unprefixed module name. - */ - function ensurePathIsNonModuleName(path) { - return ts.getRootLength(path) === 0 && !ts.pathIsRelative(path) ? "./" + path : path; - } - ts.ensurePathIsNonModuleName = ensurePathIsNonModuleName; - function getBaseFileName(path, extensions, ignoreCase) { - path = ts.normalizeSlashes(path); - // if the path provided is itself the root, then it has not file name. - var rootLength = ts.getRootLength(path); - if (rootLength === path.length) - return ""; - // return the trailing portion of the path starting after the last (non-terminal) directory - // separator but not including any trailing directory separator. - path = removeTrailingDirectorySeparator(path); - var name = path.slice(Math.max(ts.getRootLength(path), path.lastIndexOf(ts.directorySeparator) + 1)); - var extension = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(name, extensions, ignoreCase) : undefined; - return extension ? name.slice(0, name.length - extension.length) : name; - } - ts.getBaseFileName = getBaseFileName; - /** - * Combines paths. If a path is absolute, it replaces any previous path. - */ - function combinePaths(path) { - var paths = []; - for (var _i = 1; _i < arguments.length; _i++) { - paths[_i - 1] = arguments[_i]; - } - if (path) - path = ts.normalizeSlashes(path); - for (var _a = 0, paths_1 = paths; _a < paths_1.length; _a++) { - var relativePath = paths_1[_a]; - if (!relativePath) - continue; - relativePath = ts.normalizeSlashes(relativePath); - if (!path || ts.getRootLength(relativePath) !== 0) { - path = relativePath; - } - else { - path = ensureTrailingDirectorySeparator(path) + relativePath; - } - } - return path; - } - ts.combinePaths = combinePaths; - /** - * Combines and resolves paths. If a path is absolute, it replaces any previous path. Any - * `.` and `..` path components are resolved. - */ - function resolvePath(path) { - var paths = []; - for (var _i = 1; _i < arguments.length; _i++) { - paths[_i - 1] = arguments[_i]; - } - var combined = ts.some(paths) ? combinePaths.apply(void 0, __spreadArrays([path], paths)) : ts.normalizeSlashes(path); - var normalized = ts.getPathFromPathComponents(ts.reducePathComponents(ts.getPathComponents(combined))); - return normalized && hasTrailingDirectorySeparator(combined) ? ensureTrailingDirectorySeparator(normalized) : normalized; - } - ts.resolvePath = resolvePath; - /** - * Determines whether a path has a trailing separator (`/` or `\\`). - */ - function hasTrailingDirectorySeparator(path) { - if (path.length === 0) - return false; - var ch = path.charCodeAt(path.length - 1); - return ch === 47 /* slash */ || ch === 92 /* backslash */; - } - ts.hasTrailingDirectorySeparator = hasTrailingDirectorySeparator; - function removeTrailingDirectorySeparator(path) { - if (hasTrailingDirectorySeparator(path)) { - return path.substr(0, path.length - 1); - } - return path; - } - ts.removeTrailingDirectorySeparator = removeTrailingDirectorySeparator; - function ensureTrailingDirectorySeparator(path) { - if (!hasTrailingDirectorySeparator(path)) { - return path + ts.directorySeparator; - } - return path; - } - ts.ensureTrailingDirectorySeparator = ensureTrailingDirectorySeparator; - // check path for these segments: '', '.'. '..' - var relativePathSegmentRegExp = /(^|\/)\.{0,2}($|\/)/; - function comparePathsWorker(a, b, componentComparer) { - if (a === b) - return 0 /* EqualTo */; - if (a === undefined) - return -1 /* LessThan */; - if (b === undefined) - return 1 /* GreaterThan */; - // NOTE: Performance optimization - shortcut if the root segments differ as there would be no - // need to perform path reduction. - var aRoot = a.substring(0, ts.getRootLength(a)); - var bRoot = b.substring(0, ts.getRootLength(b)); - var result = ts.compareStringsCaseInsensitive(aRoot, bRoot); - if (result !== 0 /* EqualTo */) { - return result; - } - // NOTE: Performance optimization - shortcut if there are no relative path segments in - // the non-root portion of the path - var aRest = a.substring(aRoot.length); - var bRest = b.substring(bRoot.length); - if (!relativePathSegmentRegExp.test(aRest) && !relativePathSegmentRegExp.test(bRest)) { - return componentComparer(aRest, bRest); - } - // The path contains a relative path segment. Normalize the paths and perform a slower component - // by component comparison. - var aComponents = ts.reducePathComponents(ts.getPathComponents(a)); - var bComponents = ts.reducePathComponents(ts.getPathComponents(b)); - var sharedLength = Math.min(aComponents.length, bComponents.length); - for (var i = 1; i < sharedLength; i++) { - var result_1 = componentComparer(aComponents[i], bComponents[i]); - if (result_1 !== 0 /* EqualTo */) { - return result_1; - } - } - return ts.compareValues(aComponents.length, bComponents.length); - } - /** - * Performs a case-sensitive comparison of two paths. - */ - function comparePathsCaseSensitive(a, b) { - return comparePathsWorker(a, b, ts.compareStringsCaseSensitive); - } - ts.comparePathsCaseSensitive = comparePathsCaseSensitive; - /** - * Performs a case-insensitive comparison of two paths. - */ - function comparePathsCaseInsensitive(a, b) { - return comparePathsWorker(a, b, ts.compareStringsCaseInsensitive); - } - ts.comparePathsCaseInsensitive = comparePathsCaseInsensitive; - function comparePaths(a, b, currentDirectory, ignoreCase) { - if (typeof currentDirectory === "string") { - a = combinePaths(currentDirectory, a); - b = combinePaths(currentDirectory, b); - } - else if (typeof currentDirectory === "boolean") { - ignoreCase = currentDirectory; - } - return comparePathsWorker(a, b, ts.getStringComparer(ignoreCase)); - } - ts.comparePaths = comparePaths; - function containsPath(parent, child, currentDirectory, ignoreCase) { - if (typeof currentDirectory === "string") { - parent = combinePaths(currentDirectory, parent); - child = combinePaths(currentDirectory, child); - } - else if (typeof currentDirectory === "boolean") { - ignoreCase = currentDirectory; - } - if (parent === undefined || child === undefined) - return false; - if (parent === child) - return true; - var parentComponents = ts.reducePathComponents(ts.getPathComponents(parent)); - var childComponents = ts.reducePathComponents(ts.getPathComponents(child)); - if (childComponents.length < parentComponents.length) { - return false; - } - var componentEqualityComparer = ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive; - for (var i = 0; i < parentComponents.length; i++) { - var equalityComparer = i === 0 ? ts.equateStringsCaseInsensitive : componentEqualityComparer; - if (!equalityComparer(parentComponents[i], childComponents[i])) { - return false; - } - } - return true; - } - ts.containsPath = containsPath; - function isDirectorySeparator(charCode) { - return charCode === 47 /* slash */ || charCode === 92 /* backslash */; - } function stripLeadingDirectorySeparator(s) { - return isDirectorySeparator(s.charCodeAt(0)) ? s.slice(1) : undefined; + return ts.isAnyDirectorySeparator(s.charCodeAt(0)) ? s.slice(1) : undefined; } function tryRemoveDirectoryPrefix(path, dirPath, getCanonicalFileName) { var withoutPrefix = ts.tryRemovePrefix(path, dirPath, getCanonicalFileName); @@ -16722,10 +17043,6 @@ var ts; return "\\" + match; } var wildcardCharCodes = [42 /* asterisk */, 63 /* question */]; - function hasExtension(fileName) { - return ts.stringContains(getBaseFileName(fileName), "."); - } - ts.hasExtension = hasExtension; ts.commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"]; var implicitExcludePathRegexPattern = "(?!(" + ts.commonPackageFolders.join("|") + ")(/|$))"; var filesMatcher = { @@ -16801,7 +17118,7 @@ var ts; } // getNormalizedPathComponents includes the separator for the root component. // We need to remove to create our regex correctly. - components[0] = removeTrailingDirectorySeparator(components[0]); + components[0] = ts.removeTrailingDirectorySeparator(components[0]); if (isImplicitGlob(lastComponent)) { components.push("**", "*"); } @@ -16863,7 +17180,7 @@ var ts; function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory) { path = ts.normalizePath(path); currentDirectory = ts.normalizePath(currentDirectory); - var absolutePath = combinePaths(currentDirectory, path); + var absolutePath = ts.combinePaths(currentDirectory, path); return { includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^" + pattern + "$"; }), includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"), @@ -16892,7 +17209,7 @@ var ts; var toCanonical = ts.createGetCanonicalFileName(useCaseSensitiveFileNames); for (var _i = 0, _a = patterns.basePaths; _i < _a.length; _i++) { var basePath = _a[_i]; - visitDirectory(basePath, combinePaths(currentDirectory, basePath), depth); + visitDirectory(basePath, ts.combinePaths(currentDirectory, basePath), depth); } return ts.flatten(results); function visitDirectory(path, absolutePath, depth) { @@ -16902,8 +17219,8 @@ var ts; visited.set(canonicalPath, true); var _a = getFileSystemEntries(path), files = _a.files, directories = _a.directories; var _loop_1 = function (current) { - var name = combinePaths(path, current); - var absoluteName = combinePaths(absolutePath, current); + var name = ts.combinePaths(path, current); + var absoluteName = ts.combinePaths(absolutePath, current); if (extensions && !ts.fileExtensionIsOneOf(name, extensions)) return "continue"; if (excludeRegex && excludeRegex.test(absoluteName)) @@ -16930,8 +17247,8 @@ var ts; } for (var _c = 0, _d = ts.sort(directories, ts.compareStringsCaseSensitive); _c < _d.length; _c++) { var current = _d[_c]; - var name = combinePaths(path, current); - var absoluteName = combinePaths(absolutePath, current); + var name = ts.combinePaths(path, current); + var absoluteName = ts.combinePaths(absolutePath, current); if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) && (!excludeRegex || !excludeRegex.test(absoluteName))) { visitDirectory(name, absoluteName, depth); @@ -16953,14 +17270,14 @@ var ts; var include = includes_1[_i]; // We also need to check the relative paths by converting them to absolute and normalizing // in case they escape the base path (e.g "..\somedirectory") - var absolute = ts.isRootedDiskPath(include) ? include : ts.normalizePath(combinePaths(path, include)); + var absolute = ts.isRootedDiskPath(include) ? include : ts.normalizePath(ts.combinePaths(path, include)); // Append the literal and canonical candidate base paths. includeBasePaths.push(getIncludeBasePath(absolute)); } // Sort the offsets array using either the literal or canonical path representations. includeBasePaths.sort(ts.getStringComparer(!useCaseSensitiveFileNames)); var _loop_2 = function (includeBasePath) { - if (ts.every(basePaths, function (basePath) { return !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames); })) { + if (ts.every(basePaths, function (basePath) { return !ts.containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames); })) { basePaths.push(includeBasePath); } }; @@ -16977,9 +17294,9 @@ var ts; var wildcardOffset = ts.indexOfAnyCharCode(absolute, wildcardCharCodes); if (wildcardOffset < 0) { // No "*" or "?" in the path - return !hasExtension(absolute) + return !ts.hasExtension(absolute) ? absolute - : removeTrailingDirectorySeparator(ts.getDirectoryPath(absolute)); + : ts.removeTrailingDirectorySeparator(ts.getDirectoryPath(absolute)); } return absolute.substring(0, absolute.lastIndexOf(ts.directorySeparator, wildcardOffset)); } @@ -17051,10 +17368,6 @@ var ts; return ts.some(ts.supportedJSExtensions, function (extension) { return ts.fileExtensionIs(fileName, extension); }); } ts.hasJSFileExtension = hasJSFileExtension; - function hasJSOrJsonFileExtension(fileName) { - return ts.supportedJSAndJsonExtensions.some(function (ext) { return ts.fileExtensionIs(fileName, ext); }); - } - ts.hasJSOrJsonFileExtension = hasJSOrJsonFileExtension; function hasTSFileExtension(fileName) { return ts.some(ts.supportedTSExtensions, function (extension) { return ts.fileExtensionIs(fileName, extension); }); } @@ -17144,14 +17457,9 @@ var ts; } ts.removeExtension = removeExtension; function changeExtension(path, newExtension) { - return changeAnyExtension(path, newExtension, extensionsToRemove, /*ignoreCase*/ false); + return ts.changeAnyExtension(path, newExtension, extensionsToRemove, /*ignoreCase*/ false); } ts.changeExtension = changeExtension; - function changeAnyExtension(path, ext, extensions, ignoreCase) { - var pathext = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(path, extensions, ignoreCase) : getAnyExtensionFromPath(path); - return pathext ? path.slice(0, path.length - pathext.length) + (ts.startsWith(ext, ".") ? ext : "." + ext) : path; - } - ts.changeAnyExtension = changeAnyExtension; function tryParsePattern(pattern) { // This should be verified outside of here and a proper error thrown. ts.Debug.assert(ts.hasZeroOrOneAsteriskCharacter(pattern)); @@ -17194,36 +17502,6 @@ var ts; return ts.find(extensionsToRemove, function (e) { return ts.fileExtensionIs(path, e); }); } ts.tryGetExtensionFromPath = tryGetExtensionFromPath; - function getAnyExtensionFromPathWorker(path, extensions, stringEqualityComparer) { - if (typeof extensions === "string") - extensions = [extensions]; - for (var _i = 0, extensions_2 = extensions; _i < extensions_2.length; _i++) { - var extension = extensions_2[_i]; - if (!ts.startsWith(extension, ".")) - extension = "." + extension; - if (path.length >= extension.length && path.charAt(path.length - extension.length) === ".") { - var pathExtension = path.slice(path.length - extension.length); - if (stringEqualityComparer(pathExtension, extension)) { - return pathExtension; - } - } - } - return ""; - } - function getAnyExtensionFromPath(path, extensions, ignoreCase) { - // Retrieves any string from the final "." onwards from a base file name. - // Unlike extensionFromPath, which throws an exception on unrecognized extensions. - if (extensions) { - return getAnyExtensionFromPathWorker(path, extensions, ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive); - } - var baseFileName = getBaseFileName(path); - var extensionIndex = baseFileName.lastIndexOf("."); - if (extensionIndex >= 0) { - return baseFileName.substring(extensionIndex); - } - return ""; - } - ts.getAnyExtensionFromPath = getAnyExtensionFromPath; function isCheckJsEnabledForFile(sourceFile, compilerOptions) { return sourceFile.checkJsDirective ? sourceFile.checkJsDirective.enabled : compilerOptions.checkJs; } @@ -18431,6 +18709,9 @@ var ts; function doInYieldAndAwaitContext(func) { return doInsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */, func); } + function doOutsideOfYieldAndAwaitContext(func) { + return doOutsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */, func); + } function inContext(flags) { return (contextFlags & flags) !== 0; } @@ -22702,18 +22983,7 @@ var ts; node.exclamationToken = parseTokenNode(); } node.type = parseTypeAnnotation(); - // For instance properties specifically, since they are evaluated inside the constructor, - // we do *not * want to parse yield expressions, so we specifically turn the yield context - // off. The grammar would look something like this: - // - // MemberVariableDeclaration[Yield]: - // AccessibilityModifier_opt PropertyName TypeAnnotation_opt Initializer_opt[In]; - // AccessibilityModifier_opt static_opt PropertyName TypeAnnotation_opt Initializer_opt[In, ?Yield]; - // - // The checker may still error in the static case to explicitly disallow the yield expression. - node.initializer = ts.hasModifier(node, 32 /* Static */) - ? allowInAnd(parseInitializer) - : doOutsideOfContext(8192 /* YieldContext */ | 4096 /* DisallowInContext */, parseInitializer); + node.initializer = doOutsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */ | 4096 /* DisallowInContext */, parseInitializer); parseSemicolon(); return finishNode(node); } @@ -23004,7 +23274,7 @@ var ts; parseExpected(87 /* EnumKeyword */); node.name = parseIdentifier(); if (parseExpected(18 /* OpenBraceToken */)) { - node.members = parseDelimitedList(6 /* EnumMembers */, parseEnumMember); + node.members = doOutsideOfYieldAndAwaitContext(function () { return parseDelimitedList(6 /* EnumMembers */, parseEnumMember); }); parseExpected(19 /* CloseBraceToken */); } else { @@ -25066,6 +25336,15 @@ var ts; isCommandLineOnly: true, description: ts.Diagnostics.Print_the_final_configuration_instead_of_building }, + { + name: "listFilesOnly", + type: "boolean", + category: ts.Diagnostics.Command_line_Options, + affectsSemanticDiagnostics: true, + affectsEmit: true, + isCommandLineOnly: true, + description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing + }, // Basic { name: "target", @@ -25897,8 +26176,7 @@ var ts; } } ts.parseListTypeOption = parseListTypeOption; - function parseCommandLineWorker(getOptionNameMap, _a, commandLine, readFile) { - var unknownOptionDiagnostic = _a[0], optionTypeMismatchDiagnostic = _a[1]; + function parseCommandLineWorker(getOptionNameMap, diagnostics, commandLine, readFile) { var options = {}; var fileNames = []; var errors = []; @@ -25925,7 +26203,7 @@ var ts; else { // Check to see if no argument was provided (e.g. "--locale" is the last command-line argument). if (!args[i] && opt.type !== "boolean") { - errors.push(ts.createCompilerDiagnostic(optionTypeMismatchDiagnostic, opt.name)); + errors.push(ts.createCompilerDiagnostic(diagnostics.optionTypeMismatchDiagnostic, opt.name)); } switch (opt.type) { case "number": @@ -25961,7 +26239,13 @@ var ts; } } else { - errors.push(ts.createCompilerDiagnostic(unknownOptionDiagnostic, s)); + var possibleOption = ts.getSpellingSuggestion(s, ts.optionDeclarations, function (opt) { return "--" + opt.name; }); + if (possibleOption) { + errors.push(ts.createCompilerDiagnostic(diagnostics.unknownDidYouMeanDiagnostic, s, possibleOption.name)); + } + else { + errors.push(ts.createCompilerDiagnostic(diagnostics.unknownOptionDiagnostic, s)); + } } } else { @@ -26004,11 +26288,13 @@ var ts; parseStrings(args); } } + var compilerOptionsDefaultDiagnostics = { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_compiler_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_compiler_option_0_Did_you_mean_1, + optionTypeMismatchDiagnostic: ts.Diagnostics.Compiler_option_0_expects_an_argument + }; function parseCommandLine(commandLine, readFile) { - return parseCommandLineWorker(getOptionNameMap, [ - ts.Diagnostics.Unknown_compiler_option_0, - ts.Diagnostics.Compiler_option_0_expects_an_argument - ], commandLine, readFile); + return parseCommandLineWorker(getOptionNameMap, compilerOptionsDefaultDiagnostics, commandLine, readFile); } ts.parseCommandLine = parseCommandLine; /** @internal */ @@ -26033,10 +26319,11 @@ var ts; function parseBuildCommand(args) { var buildOptionNameMap; var returnBuildOptionNameMap = function () { return (buildOptionNameMap || (buildOptionNameMap = createOptionNameMap(ts.buildOpts))); }; - var _a = parseCommandLineWorker(returnBuildOptionNameMap, [ - ts.Diagnostics.Unknown_build_option_0, - ts.Diagnostics.Build_option_0_requires_a_value_of_type_1 - ], args), options = _a.options, projects = _a.fileNames, errors = _a.errors; + var _a = parseCommandLineWorker(returnBuildOptionNameMap, { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_build_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_build_option_0_Did_you_mean_1, + optionTypeMismatchDiagnostic: ts.Diagnostics.Build_option_0_requires_a_value_of_type_1 + }, args), options = _a.options, projects = _a.fileNames, errors = _a.errors; var buildOptions = options; if (projects.length === 0) { // tsc -b invoked with no extra arguments; act as if invoked with "tsc -b ." @@ -26058,6 +26345,7 @@ var ts; return { buildOptions: buildOptions, projects: projects, errors: errors }; } ts.parseBuildCommand = parseBuildCommand; + /* @internal */ function getDiagnosticText(_message) { var _args = []; for (var _i = 1; _i < arguments.length; _i++) { @@ -26066,104 +26354,7 @@ var ts; var diagnostic = ts.createCompilerDiagnostic.apply(undefined, arguments); return diagnostic.messageText; } - /* @internal */ - function printVersion() { - ts.sys.write(getDiagnosticText(ts.Diagnostics.Version_0, ts.version) + ts.sys.newLine); - } - ts.printVersion = printVersion; - /* @internal */ - function printHelp(optionsList, syntaxPrefix) { - if (syntaxPrefix === void 0) { syntaxPrefix = ""; } - var output = []; - // We want to align our "syntax" and "examples" commands to a certain margin. - var syntaxLength = getDiagnosticText(ts.Diagnostics.Syntax_Colon_0, "").length; - var examplesLength = getDiagnosticText(ts.Diagnostics.Examples_Colon_0, "").length; - var marginLength = Math.max(syntaxLength, examplesLength); - // Build up the syntactic skeleton. - var syntax = makePadding(marginLength - syntaxLength); - syntax += "tsc " + syntaxPrefix + "[" + getDiagnosticText(ts.Diagnostics.options) + "] [" + getDiagnosticText(ts.Diagnostics.file) + "...]"; - output.push(getDiagnosticText(ts.Diagnostics.Syntax_Colon_0, syntax)); - output.push(ts.sys.newLine + ts.sys.newLine); - // Build up the list of examples. - var padding = makePadding(marginLength); - output.push(getDiagnosticText(ts.Diagnostics.Examples_Colon_0, makePadding(marginLength - examplesLength) + "tsc hello.ts") + ts.sys.newLine); - output.push(padding + "tsc --outFile file.js file.ts" + ts.sys.newLine); - output.push(padding + "tsc @args.txt" + ts.sys.newLine); - output.push(padding + "tsc --build tsconfig.json" + ts.sys.newLine); - output.push(ts.sys.newLine); - output.push(getDiagnosticText(ts.Diagnostics.Options_Colon) + ts.sys.newLine); - // We want our descriptions to align at the same column in our output, - // so we keep track of the longest option usage string. - marginLength = 0; - var usageColumn = []; // Things like "-d, --declaration" go in here. - var descriptionColumn = []; - var optionsDescriptionMap = ts.createMap(); // Map between option.description and list of option.type if it is a kind - for (var _i = 0, optionsList_1 = optionsList; _i < optionsList_1.length; _i++) { - var option = optionsList_1[_i]; - // If an option lacks a description, - // it is not officially supported. - if (!option.description) { - continue; - } - var usageText_1 = " "; - if (option.shortName) { - usageText_1 += "-" + option.shortName; - usageText_1 += getParamType(option); - usageText_1 += ", "; - } - usageText_1 += "--" + option.name; - usageText_1 += getParamType(option); - usageColumn.push(usageText_1); - var description = void 0; - if (option.name === "lib") { - description = getDiagnosticText(option.description); - var element = option.element; - var typeMap = element.type; - optionsDescriptionMap.set(description, ts.arrayFrom(typeMap.keys()).map(function (key) { return "'" + key + "'"; })); - } - else { - description = getDiagnosticText(option.description); - } - descriptionColumn.push(description); - // Set the new margin for the description column if necessary. - marginLength = Math.max(usageText_1.length, marginLength); - } - // Special case that can't fit in the loop. - var usageText = " @<" + getDiagnosticText(ts.Diagnostics.file) + ">"; - usageColumn.push(usageText); - descriptionColumn.push(getDiagnosticText(ts.Diagnostics.Insert_command_line_options_and_files_from_a_file)); - marginLength = Math.max(usageText.length, marginLength); - // Print out each row, aligning all the descriptions on the same column. - for (var i = 0; i < usageColumn.length; i++) { - var usage = usageColumn[i]; - var description = descriptionColumn[i]; - var kindsList = optionsDescriptionMap.get(description); - output.push(usage + makePadding(marginLength - usage.length + 2) + description + ts.sys.newLine); - if (kindsList) { - output.push(makePadding(marginLength + 4)); - for (var _a = 0, kindsList_1 = kindsList; _a < kindsList_1.length; _a++) { - var kind = kindsList_1[_a]; - output.push(kind + " "); - } - output.push(ts.sys.newLine); - } - } - for (var _b = 0, output_1 = output; _b < output_1.length; _b++) { - var line = output_1[_b]; - ts.sys.write(line); - } - return; - function getParamType(option) { - if (option.paramType !== undefined) { - return " " + getDiagnosticText(option.paramType); - } - return ""; - } - function makePadding(paddingLength) { - return Array(paddingLength + 1).join(" "); - } - } - ts.printHelp = printHelp; + ts.getDiagnosticText = getDiagnosticText; /** * Reads the config file, reports errors if any and exits if the config file cannot be found */ @@ -26247,19 +26438,28 @@ var ts; name: "compilerOptions", type: "object", elementOptions: commandLineOptionsToMap(ts.optionDeclarations), - extraKeyDiagnosticMessage: ts.Diagnostics.Unknown_compiler_option_0 + extraKeyDiagnostics: { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_compiler_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_compiler_option_0_Did_you_mean_1 + }, }, { name: "typingOptions", type: "object", elementOptions: commandLineOptionsToMap(ts.typeAcquisitionDeclarations), - extraKeyDiagnosticMessage: ts.Diagnostics.Unknown_type_acquisition_option_0 + extraKeyDiagnostics: { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1 + }, }, { name: "typeAcquisition", type: "object", elementOptions: commandLineOptionsToMap(ts.typeAcquisitionDeclarations), - extraKeyDiagnosticMessage: ts.Diagnostics.Unknown_type_acquisition_option_0 + extraKeyDiagnostics: { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1 + } }, { name: "extends", @@ -26324,7 +26524,7 @@ var ts; function isRootOptionMap(knownOptions) { return knownRootOptions && knownRootOptions.elementOptions === knownOptions; } - function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnosticMessage, parentOption) { + function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnostics, parentOption) { var result = returnValue ? {} : undefined; for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var element = _a[_i]; @@ -26341,8 +26541,19 @@ var ts; var textOfKey = ts.getTextOfPropertyName(element.name); var keyText = textOfKey && ts.unescapeLeadingUnderscores(textOfKey); var option = keyText && knownOptions ? knownOptions.get(keyText) : undefined; - if (keyText && extraKeyDiagnosticMessage && !option) { - errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnosticMessage, keyText)); + if (keyText && extraKeyDiagnostics && !option) { + if (knownOptions) { + var possibleOption = ts.getSpellingSuggestion(keyText, ts.arrayFrom(knownOptions.keys()), ts.identity); + if (possibleOption) { + errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnostics.unknownDidYouMeanDiagnostic, keyText, possibleOption)); + } + else { + errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnostics.unknownOptionDiagnostic, keyText)); + } + } + else { + errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnostics.unknownOptionDiagnostic, keyText)); + } } var value = convertPropertyValueToJson(element.initializer, option); if (typeof keyText !== "undefined") { @@ -26426,8 +26637,8 @@ var ts; // vs what we set in the json // If need arises, we can modify this interface and callbacks as needed if (option) { - var _a = option, elementOptions = _a.elementOptions, extraKeyDiagnosticMessage = _a.extraKeyDiagnosticMessage, optionName = _a.name; - return convertObjectLiteralExpressionToJson(objectLiteralExpression, elementOptions, extraKeyDiagnosticMessage, optionName); + var _a = option, elementOptions = _a.elementOptions, extraKeyDiagnostics = _a.extraKeyDiagnostics, optionName = _a.name; + return convertObjectLiteralExpressionToJson(objectLiteralExpression, elementOptions, extraKeyDiagnostics, optionName); } else { return convertObjectLiteralExpressionToJson(objectLiteralExpression, /* knownOptions*/ undefined, @@ -26482,7 +26693,7 @@ var ts; /** @internal */ function convertToTSConfig(configParseResult, configFileName, host) { var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames); - var files = ts.map(ts.filter(configParseResult.fileNames, (!configParseResult.configFileSpecs || !configParseResult.configFileSpecs.validatedIncludeSpecs) ? function (_) { return true; } : matchesSpecs(configFileName, configParseResult.configFileSpecs.validatedIncludeSpecs, configParseResult.configFileSpecs.validatedExcludeSpecs)), function (f) { return ts.getRelativePathFromFile(ts.getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), ts.getNormalizedAbsolutePath(f, host.getCurrentDirectory()), getCanonicalFileName); }); + var files = ts.map(ts.filter(configParseResult.fileNames, (!configParseResult.configFileSpecs || !configParseResult.configFileSpecs.validatedIncludeSpecs) ? function (_) { return true; } : matchesSpecs(configFileName, configParseResult.configFileSpecs.validatedIncludeSpecs, configParseResult.configFileSpecs.validatedExcludeSpecs, host)), function (f) { return ts.getRelativePathFromFile(ts.getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), ts.getNormalizedAbsolutePath(f, host.getCurrentDirectory()), getCanonicalFileName); }); var optionMap = serializeCompilerOptions(configParseResult.options, { configFilePath: ts.getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), useCaseSensitiveFileNames: host.useCaseSensitiveFileNames }); var config = __assign(__assign({ compilerOptions: __assign(__assign({}, ts.arrayFrom(optionMap.entries()).reduce(function (prev, cur) { var _a; @@ -26503,12 +26714,12 @@ var ts; return undefined; return specs; } - function matchesSpecs(path, includeSpecs, excludeSpecs) { + function matchesSpecs(path, includeSpecs, excludeSpecs, host) { if (!includeSpecs) return function (_) { return true; }; - var patterns = ts.getFileMatcherPatterns(path, excludeSpecs, includeSpecs, ts.sys.useCaseSensitiveFileNames, ts.sys.getCurrentDirectory()); - var excludeRe = patterns.excludePattern && ts.getRegexFromPattern(patterns.excludePattern, ts.sys.useCaseSensitiveFileNames); - var includeRe = patterns.includeFilePattern && ts.getRegexFromPattern(patterns.includeFilePattern, ts.sys.useCaseSensitiveFileNames); + var patterns = ts.getFileMatcherPatterns(path, excludeSpecs, includeSpecs, host.useCaseSensitiveFileNames, host.getCurrentDirectory()); + var excludeRe = patterns.excludePattern && ts.getRegexFromPattern(patterns.excludePattern, host.useCaseSensitiveFileNames); + var includeRe = patterns.includeFilePattern && ts.getRegexFromPattern(patterns.includeFilePattern, host.useCaseSensitiveFileNames); if (includeRe) { if (excludeRe) { return function (path) { return !(includeRe.test(path) && !excludeRe.test(path)); }; @@ -26685,6 +26896,35 @@ var ts; } } ts.generateTSConfig = generateTSConfig; + /* @internal */ + function convertToOptionsWithAbsolutePaths(options, toAbsolutePath) { + var result = {}; + var optionsNameMap = getOptionNameMap().optionNameMap; + for (var name in options) { + if (ts.hasProperty(options, name)) { + result[name] = convertToOptionValueWithAbsolutePaths(optionsNameMap.get(name.toLowerCase()), options[name], toAbsolutePath); + } + } + if (result.configFilePath) { + result.configFilePath = toAbsolutePath(result.configFilePath); + } + return result; + } + ts.convertToOptionsWithAbsolutePaths = convertToOptionsWithAbsolutePaths; + function convertToOptionValueWithAbsolutePaths(option, value, toAbsolutePath) { + if (option) { + if (option.type === "list") { + var values = value; + if (option.element.isFilePath && values.length) { + return values.map(toAbsolutePath); + } + } + else if (option.isFilePath) { + return toAbsolutePath(value); + } + } + return value; + } /** * Parse the contents of a config file (tsconfig.json). * @param json The contents of the config file to parse @@ -27073,7 +27313,7 @@ var ts; } function convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName) { var options = getDefaultCompilerOptions(configFileName); - convertOptionsFromJson(ts.optionDeclarations, jsonOptions, basePath, options, ts.Diagnostics.Unknown_compiler_option_0, errors); + convertOptionsFromJson(ts.optionDeclarations, jsonOptions, basePath, options, compilerOptionsDefaultDiagnostics, errors); if (configFileName) { options.configFilePath = ts.normalizeSlashes(configFileName); } @@ -27085,10 +27325,14 @@ var ts; function convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName) { var options = getDefaultTypeAcquisition(configFileName); var typeAcquisition = convertEnableAutoDiscoveryToEnable(jsonOptions); - convertOptionsFromJson(ts.typeAcquisitionDeclarations, typeAcquisition, basePath, options, ts.Diagnostics.Unknown_type_acquisition_option_0, errors); + var diagnostics = { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1, + }; + convertOptionsFromJson(ts.typeAcquisitionDeclarations, typeAcquisition, basePath, options, diagnostics, errors); return options; } - function convertOptionsFromJson(optionDeclarations, jsonOptions, basePath, defaultOptions, diagnosticMessage, errors) { + function convertOptionsFromJson(optionDeclarations, jsonOptions, basePath, defaultOptions, diagnostics, errors) { if (!jsonOptions) { return; } @@ -27099,7 +27343,13 @@ var ts; defaultOptions[opt.name] = convertJsonOption(opt, jsonOptions[id], basePath, errors); } else { - errors.push(ts.createCompilerDiagnostic(diagnosticMessage, id)); + var possibleOption = ts.getSpellingSuggestion(id, optionDeclarations, function (opt) { return opt.name; }); + if (possibleOption) { + errors.push(ts.createCompilerDiagnostic(diagnostics.unknownDidYouMeanDiagnostic, id, possibleOption.name)); + } + else { + errors.push(ts.createCompilerDiagnostic(diagnostics.unknownOptionDiagnostic, id)); + } } } } @@ -27135,7 +27385,7 @@ var ts; } function normalizeNonListOptionValue(option, basePath, value) { if (option.isFilePath) { - value = ts.normalizePath(ts.combinePaths(basePath, value)); + value = ts.getNormalizedAbsolutePath(value, basePath); if (value === "") { value = "."; } @@ -28919,7 +29169,10 @@ var ts; ContainerFlags[ContainerFlags["IsInterface"] = 64] = "IsInterface"; ContainerFlags[ContainerFlags["IsObjectLiteralOrClassExpressionMethod"] = 128] = "IsObjectLiteralOrClassExpressionMethod"; })(ContainerFlags || (ContainerFlags = {})); - var flowNodeCreated = ts.identity; + function initFlowNode(node) { + ts.Debug.attachFlowNodeDebugInfo(node); + return node; + } var binder = createBinder(); function bindSourceFile(file, options) { ts.performance.mark("beforeBind"); @@ -28948,6 +29201,7 @@ var ts; var currentReturnTarget; var currentTrueTarget; var currentFalseTarget; + var currentExceptionTarget; var preSwitchCaseFlow; var activeLabels; var hasExplicitReturn; @@ -28983,6 +29237,9 @@ var ts; symbolCount = 0; skipTransformFlagAggregation = file.isDeclarationFile; Symbol = ts.objectAllocator.getSymbolConstructor(); + // Attach debugging information if necessary + ts.Debug.attachFlowNodeDebugInfo(unreachableFlow); + ts.Debug.attachFlowNodeDebugInfo(reportedUnreachableFlow); if (!file.locals) { bind(file); file.symbolCount = symbolCount; @@ -29005,6 +29262,7 @@ var ts; currentReturnTarget = undefined; currentTrueTarget = undefined; currentFalseTarget = undefined; + currentExceptionTarget = undefined; activeLabels = undefined; hasExplicitReturn = false; emitFlags = 0 /* None */; @@ -29326,11 +29584,11 @@ var ts; blockScopeContainer.locals = undefined; } if (containerFlags & 4 /* IsControlFlowContainer */) { - var saveFlowNodeCreated = flowNodeCreated; var saveCurrentFlow = currentFlow; var saveBreakTarget = currentBreakTarget; var saveContinueTarget = currentContinueTarget; var saveReturnTarget = currentReturnTarget; + var saveExceptionTarget = currentExceptionTarget; var saveActiveLabels = activeLabels; var saveHasExplicitReturn = hasExplicitReturn; var isIIFE = containerFlags & 16 /* IsFunctionExpression */ && !ts.hasModifier(node, 256 /* Async */) && @@ -29338,7 +29596,7 @@ var ts; // A non-async, non-generator IIFE is considered part of the containing control flow. Return statements behave // similarly to break statements that exit to a label just past the statement body. if (!isIIFE) { - currentFlow = { flags: 2 /* Start */ }; + currentFlow = initFlowNode({ flags: 2 /* Start */ }); if (containerFlags & (16 /* IsFunctionExpression */ | 128 /* IsObjectLiteralOrClassExpressionMethod */)) { currentFlow.node = node; } @@ -29346,11 +29604,11 @@ var ts; // We create a return control flow graph for IIFEs and constructors. For constructors // we use the return control flow graph in strict property initialization checks. currentReturnTarget = isIIFE || node.kind === 161 /* Constructor */ ? createBranchLabel() : undefined; + currentExceptionTarget = undefined; currentBreakTarget = undefined; currentContinueTarget = undefined; activeLabels = undefined; hasExplicitReturn = false; - flowNodeCreated = ts.identity; bindChildren(node); // Reset all reachability check related flags on node (for incremental scenarios) node.flags &= ~2816 /* ReachabilityAndEmitFlags */; @@ -29376,9 +29634,9 @@ var ts; currentBreakTarget = saveBreakTarget; currentContinueTarget = saveContinueTarget; currentReturnTarget = saveReturnTarget; + currentExceptionTarget = saveExceptionTarget; activeLabels = saveActiveLabels; hasExplicitReturn = saveHasExplicitReturn; - flowNodeCreated = saveFlowNodeCreated; } else if (containerFlags & 64 /* IsInterface */) { seenThisKeyword = false; @@ -29519,9 +29777,6 @@ var ts; case 309 /* JSDocEnumTag */: bindJSDocTypeAlias(node); break; - case 307 /* JSDocClassTag */: - bindJSDocClassTag(node); - break; // In source files and blocks, bind functions first to match hoisting that occurs at runtime case 288 /* SourceFile */: { bindEachFunctionsFirst(node.statements); @@ -29561,9 +29816,8 @@ var ts; function isNarrowableReference(expr) { return expr.kind === 75 /* Identifier */ || expr.kind === 103 /* ThisKeyword */ || expr.kind === 101 /* SuperKeyword */ || (ts.isPropertyAccessExpression(expr) || ts.isNonNullExpression(expr) || ts.isParenthesizedExpression(expr)) && isNarrowableReference(expr.expression) || - ts.isElementAccessExpression(expr) && - ts.isStringOrNumericLiteralLike(expr.argumentExpression) && - isNarrowableReference(expr.expression); + ts.isElementAccessExpression(expr) && ts.isStringOrNumericLiteralLike(expr.argumentExpression) && isNarrowableReference(expr.expression) || + ts.isOptionalChain(expr); } function hasNarrowableArgument(expr) { if (expr.arguments) { @@ -29620,10 +29874,10 @@ var ts; return isNarrowableReference(expr); } function createBranchLabel() { - return { flags: 4 /* BranchLabel */, antecedents: undefined }; + return initFlowNode({ flags: 4 /* BranchLabel */, antecedents: undefined }); } function createLoopLabel() { - return { flags: 8 /* LoopLabel */, antecedents: undefined }; + return initFlowNode({ flags: 8 /* LoopLabel */, antecedents: undefined }); } function setFlowNodeReferenced(flow) { // On first reference we set the Referenced flag, thereafter we set the Shared flag @@ -29642,36 +29896,32 @@ var ts; if (!expression) { return flags & 32 /* TrueCondition */ ? antecedent : unreachableFlow; } - if (expression.kind === 105 /* TrueKeyword */ && flags & 64 /* FalseCondition */ || - expression.kind === 90 /* FalseKeyword */ && flags & 32 /* TrueCondition */) { - if (!ts.isOptionalChainRoot(expression.parent)) { - return unreachableFlow; - } + if ((expression.kind === 105 /* TrueKeyword */ && flags & 64 /* FalseCondition */ || + expression.kind === 90 /* FalseKeyword */ && flags & 32 /* TrueCondition */) && + !ts.isExpressionOfOptionalChainRoot(expression) && !ts.isNullishCoalesce(expression.parent)) { + return unreachableFlow; } if (!isNarrowingExpression(expression)) { return antecedent; } setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: flags, antecedent: antecedent, node: expression }); + return initFlowNode({ flags: flags, antecedent: antecedent, node: expression }); } function createFlowSwitchClause(antecedent, switchStatement, clauseStart, clauseEnd) { - if (!isNarrowingExpression(switchStatement.expression)) { - return antecedent; - } setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: 128 /* SwitchClause */, antecedent: antecedent, switchStatement: switchStatement, clauseStart: clauseStart, clauseEnd: clauseEnd }); + return initFlowNode({ flags: 128 /* SwitchClause */, antecedent: antecedent, switchStatement: switchStatement, clauseStart: clauseStart, clauseEnd: clauseEnd }); } - function createFlowAssignment(antecedent, node) { + function createFlowMutation(flags, antecedent, node) { setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: 16 /* Assignment */, antecedent: antecedent, node: node }); + var result = initFlowNode({ flags: flags, antecedent: antecedent, node: node }); + if (currentExceptionTarget) { + addAntecedent(currentExceptionTarget, result); + } + return result; } function createFlowCall(antecedent, node) { setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: 512 /* Call */, antecedent: antecedent, node: node }); - } - function createFlowArrayMutation(antecedent, node) { - setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: 256 /* ArrayMutation */, antecedent: antecedent, node: node }); + return initFlowNode({ flags: 512 /* Call */, antecedent: antecedent, node: node }); } function finishFlowLabel(flow) { var antecedents = flow.antecedents; @@ -29731,7 +29981,7 @@ var ts; } function bindCondition(node, trueTarget, falseTarget) { doWithConditionalBranches(bind, node, trueTarget, falseTarget); - if (!node || !isLogicalExpression(node) && !(ts.isOptionalChain(node) && isOutermostOptionalChain(node))) { + if (!node || !isLogicalExpression(node) && !(ts.isOptionalChain(node) && ts.isOutermostOptionalChain(node))) { addAntecedent(trueTarget, createFlowCondition(32 /* TrueCondition */, currentFlow, node)); addAntecedent(falseTarget, createFlowCondition(64 /* FalseCondition */, currentFlow, node)); } @@ -29862,87 +30112,56 @@ var ts; } function bindTryStatement(node) { var preFinallyLabel = createBranchLabel(); - var preTryFlow = currentFlow; - var tryPriors = []; - var oldFlowNodeCreated = flowNodeCreated; - // We hook the creation of all flow nodes within the `try` scope and store them so we can add _all_ of them - // as possible antecedents of the start of the `catch` or `finally` blocks. - // Don't bother intercepting the call if there's no finally or catch block that needs the information - if (node.catchClause || node.finallyBlock) { - flowNodeCreated = function (node) { return (tryPriors.push(node), node); }; - } + // We conservatively assume that *any* code in the try block can cause an exception, but we only need + // to track code that causes mutations (because only mutations widen the possible control flow type of + // a variable). The currentExceptionTarget is the target label for control flows that result from + // exceptions. We add all mutation flow nodes as antecedents of this label such that we can analyze them + // as possible antecedents of the start of catch or finally blocks. Furthermore, we add the current + // control flow to represent exceptions that occur before any mutations. + var saveExceptionTarget = currentExceptionTarget; + currentExceptionTarget = createBranchLabel(); + addAntecedent(currentExceptionTarget, currentFlow); bind(node.tryBlock); - flowNodeCreated = oldFlowNodeCreated; addAntecedent(preFinallyLabel, currentFlow); var flowAfterTry = currentFlow; var flowAfterCatch = unreachableFlow; if (node.catchClause) { - currentFlow = preTryFlow; - if (tryPriors.length) { - var preCatchFlow = createBranchLabel(); - addAntecedent(preCatchFlow, currentFlow); - for (var _i = 0, tryPriors_1 = tryPriors; _i < tryPriors_1.length; _i++) { - var p = tryPriors_1[_i]; - addAntecedent(preCatchFlow, p); - } - currentFlow = finishFlowLabel(preCatchFlow); - } + // Start of catch clause is the target of exceptions from try block. + currentFlow = finishFlowLabel(currentExceptionTarget); + // The currentExceptionTarget now represents control flows from exceptions in the catch clause. + // Effectively, in a try-catch-finally, if an exception occurs in the try block, the catch block + // acts like a second try block. + currentExceptionTarget = createBranchLabel(); + addAntecedent(currentExceptionTarget, currentFlow); bind(node.catchClause); addAntecedent(preFinallyLabel, currentFlow); flowAfterCatch = currentFlow; } + var exceptionTarget = finishFlowLabel(currentExceptionTarget); + currentExceptionTarget = saveExceptionTarget; if (node.finallyBlock) { - // We add the nodes within the `try` block to the `finally`'s antecedents if there's no catch block - // (If there is a `catch` block, it will have all these antecedents instead, and the `finally` will - // have the end of the `try` block and the end of the `catch` block) - var preFinallyPrior = preTryFlow; - if (!node.catchClause) { - if (tryPriors.length) { - var preFinallyFlow_1 = createBranchLabel(); - addAntecedent(preFinallyFlow_1, preTryFlow); - for (var _a = 0, tryPriors_2 = tryPriors; _a < tryPriors_2.length; _a++) { - var p = tryPriors_2[_a]; - addAntecedent(preFinallyFlow_1, p); - } - preFinallyPrior = finishFlowLabel(preFinallyFlow_1); - } - } - // in finally flow is combined from pre-try/flow from try/flow from catch - // pre-flow is necessary to make sure that finally is reachable even if finally flows in both try and finally blocks are unreachable - // also for finally blocks we inject two extra edges into the flow graph. - // first -> edge that connects pre-try flow with the label at the beginning of the finally block, it has lock associated with it - // second -> edge that represents post-finally flow. - // these edges are used in following scenario: - // let a; (1) - // try { a = someOperation(); (2)} - // finally { (3) console.log(a) } (4) - // (5) a - // flow graph for this case looks roughly like this (arrows show ): - // (1-pre-try-flow) <--.. <-- (2-post-try-flow) - // ^ ^ - // |*****(3-pre-finally-label) -----| - // ^ - // |-- ... <-- (4-post-finally-label) <--- (5) - // In case when we walk the flow starting from inside the finally block we want to take edge '*****' into account - // since it ensures that finally is always reachable. However when we start outside the finally block and go through label (5) - // then edge '*****' should be discarded because label 4 is only reachable if post-finally label-4 is reachable - // Simply speaking code inside finally block is treated as reachable as pre-try-flow - // since we conservatively assume that any line in try block can throw or return in which case we'll enter finally. - // However code after finally is reachable only if control flow was not abrupted in try/catch or finally blocks - it should be composed from - // final flows of these blocks without taking pre-try flow into account. - // - // extra edges that we inject allows to control this behavior - // if when walking the flow we step on post-finally edge - we can mark matching pre-finally edge as locked so it will be skipped. - var preFinallyFlow = { flags: 4096 /* PreFinally */, antecedent: preFinallyPrior, lock: {} }; + // Possible ways control can reach the finally block: + // 1) Normal completion of try block of a try-finally or try-catch-finally + // 2) Normal completion of catch block (following exception in try block) of a try-catch-finally + // 3) Exception in try block of a try-finally + // 4) Exception in catch block of a try-catch-finally + // When analyzing a control flow graph that starts inside a finally block we want to consider all + // four possibilities above. However, when analyzing a control flow graph that starts outside (past) + // the finally block, we only want to consider the first two (if we're past a finally block then it + // must have completed normally). To make this possible, we inject two extra nodes into the control + // flow graph: An after-finally with an antecedent of the control flow at the end of the finally + // block, and a pre-finally with an antecedent that represents all exceptional control flows. The + // 'lock' property of the pre-finally references the after-finally, and the after-finally has a + // boolean 'locked' property that we set to true when analyzing a control flow that contained the + // the after-finally node. When the lock associated with a pre-finally is locked, the antecedent of + // the pre-finally (i.e. the exceptional control flows) are skipped. + var preFinallyFlow = initFlowNode({ flags: 4096 /* PreFinally */, antecedent: exceptionTarget, lock: {} }); addAntecedent(preFinallyLabel, preFinallyFlow); currentFlow = finishFlowLabel(preFinallyLabel); bind(node.finallyBlock); - // if flow after finally is unreachable - keep it - // otherwise check if flows after try and after catch are unreachable - // if yes - convert current flow to unreachable - // i.e. - // try { return "1" } finally { console.log(1); } - // console.log(2); // this line should be unreachable even if flow falls out of finally block + // If the end of the finally block is reachable, but the end of the try and catch blocks are not, + // convert the current flow to unreachable. For example, 'try { return 1; } finally { ... }' should + // result in an unreachable current control flow. if (!(currentFlow.flags & 1 /* Unreachable */)) { if ((flowAfterTry.flags & 1 /* Unreachable */) && (flowAfterCatch.flags & 1 /* Unreachable */)) { currentFlow = flowAfterTry === reportedUnreachableFlow || flowAfterCatch === reportedUnreachableFlow @@ -29951,7 +30170,7 @@ var ts; } } if (!(currentFlow.flags & 1 /* Unreachable */)) { - var afterFinallyFlow = flowNodeCreated({ flags: 8192 /* AfterFinally */, antecedent: currentFlow }); + var afterFinallyFlow = initFlowNode({ flags: 8192 /* AfterFinally */, antecedent: currentFlow }); preFinallyFlow.lock = afterFinallyFlow; currentFlow = afterFinallyFlow; } @@ -29985,6 +30204,7 @@ var ts; var savedSubtreeTransformFlags = subtreeTransformFlags; subtreeTransformFlags = 0; var clauses = node.clauses; + var isNarrowingSwitch = isNarrowingExpression(node.parent.expression); var fallthroughFlow = unreachableFlow; for (var i = 0; i < clauses.length; i++) { var clauseStart = i; @@ -29993,14 +30213,14 @@ var ts; i++; } var preCaseLabel = createBranchLabel(); - addAntecedent(preCaseLabel, createFlowSwitchClause(preSwitchCaseFlow, node.parent, clauseStart, i + 1)); + addAntecedent(preCaseLabel, isNarrowingSwitch ? createFlowSwitchClause(preSwitchCaseFlow, node.parent, clauseStart, i + 1) : preSwitchCaseFlow); addAntecedent(preCaseLabel, fallthroughFlow); currentFlow = finishFlowLabel(preCaseLabel); var clause = clauses[i]; bind(clause); fallthroughFlow = currentFlow; if (!(currentFlow.flags & 1 /* Unreachable */) && i !== clauses.length - 1 && options.noFallthroughCasesInSwitch) { - errorOnFirstToken(clause, ts.Diagnostics.Fallthrough_case_in_switch); + clause.fallthroughFlowNode = currentFlow; } } clauses.transformFlags = subtreeTransformFlags | 536870912 /* HasComputedFlags */; @@ -30064,7 +30284,7 @@ var ts; } function bindAssignmentTargetFlow(node) { if (isNarrowableReference(node)) { - currentFlow = createFlowAssignment(currentFlow, node); + currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); } else if (node.kind === 191 /* ArrayLiteralExpression */) { for (var _i = 0, _a = node.elements; _i < _a.length; _i++) { @@ -30145,7 +30365,7 @@ var ts; if (operator === 62 /* EqualsToken */ && node.left.kind === 194 /* ElementAccessExpression */) { var elementAccess = node.left; if (isNarrowableOperand(elementAccess.expression)) { - currentFlow = createFlowArrayMutation(currentFlow, node); + currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); } } } @@ -30181,7 +30401,7 @@ var ts; } } else { - currentFlow = createFlowAssignment(currentFlow, node); + currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); } } function bindVariableDeclarationFlow(node) { @@ -30203,12 +30423,9 @@ var ts; addDeclarationToSymbol(host.symbol, host, 32 /* Class */); } } - function isOutermostOptionalChain(node) { - return !ts.isOptionalChain(node.parent) || ts.isOptionalChainRoot(node.parent) || node !== node.parent.expression; - } function bindOptionalExpression(node, trueTarget, falseTarget) { doWithConditionalBranches(bind, node, trueTarget, falseTarget); - if (!ts.isOptionalChain(node) || isOutermostOptionalChain(node)) { + if (!ts.isOptionalChain(node) || ts.isOutermostOptionalChain(node)) { addAntecedent(trueTarget, createFlowCondition(32 /* TrueCondition */, currentFlow, node)); addAntecedent(falseTarget, createFlowCondition(64 /* FalseCondition */, currentFlow, node)); } @@ -30246,7 +30463,7 @@ var ts; currentFlow = finishFlowLabel(preChainLabel); } doWithConditionalBranches(bindOptionalChainRest, node, trueTarget, falseTarget); - if (isOutermostOptionalChain(node)) { + if (ts.isOutermostOptionalChain(node)) { addAntecedent(trueTarget, createFlowCondition(32 /* TrueCondition */, currentFlow, node)); addAntecedent(falseTarget, createFlowCondition(64 /* FalseCondition */, currentFlow, node)); } @@ -30290,7 +30507,7 @@ var ts; if (node.expression.kind === 193 /* PropertyAccessExpression */) { var propertyAccess = node.expression; if (isNarrowableOperand(propertyAccess.expression) && ts.isPushOrUnshiftIdentifier(propertyAccess.name)) { - currentFlow = createFlowArrayMutation(currentFlow, node); + currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); } } } @@ -30590,7 +30807,7 @@ var ts; var host = ts.getJSDocHost(typeAlias); container = ts.findAncestor(host.parent, function (n) { return !!(getContainerFlags(n) & 1 /* IsContainer */); }) || file; blockScopeContainer = ts.getEnclosingBlockScopeContainer(host) || file; - currentFlow = { flags: 2 /* Start */ }; + currentFlow = initFlowNode({ flags: 2 /* Start */ }); parent = typeAlias; bind(typeAlias.typeExpression); var declName = ts.getNameOfDeclaration(typeAlias); @@ -30603,7 +30820,12 @@ var ts; switch (ts.getAssignmentDeclarationPropertyAccessKind(declName.parent)) { case 1 /* ExportsProperty */: case 2 /* ModuleExports */: - container = file; + if (!ts.isExternalOrCommonJsModule(file)) { + container = undefined; + } + else { + container = file; + } break; case 4 /* ThisProperty */: container = declName.parent.expression; @@ -30617,7 +30839,9 @@ var ts; case 0 /* None */: return ts.Debug.fail("Shouldn't have detected typedef or enum on non-assignment declaration"); } - declareModuleMember(typeAlias, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); + if (container) { + declareModuleMember(typeAlias, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); + } container = oldContainer; } } @@ -31013,6 +31237,8 @@ var ts; case 302 /* JSDocTypeLiteral */: case 185 /* MappedType */: return bindAnonymousTypeWorker(node); + case 307 /* JSDocClassTag */: + return bindJSDocClassTag(node); case 192 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); case 200 /* FunctionExpression */: @@ -31232,7 +31458,8 @@ var ts; var flags = ts.exportAssignmentIsAlias(node) ? 2097152 /* Alias */ : 4 /* Property */ | 1048576 /* ExportValue */ | 512 /* ValueModule */; - declareSymbol(file.symbol.exports, file.symbol, node, flags | 67108864 /* Assignment */, 0 /* None */); + var symbol = declareSymbol(file.symbol.exports, file.symbol, node, flags | 67108864 /* Assignment */, 0 /* None */); + setValueDeclaration(symbol, node); } function bindThisPropertyAssignment(node) { ts.Debug.assert(ts.isInJSFile(node)); @@ -31248,7 +31475,7 @@ var ts; constructorSymbol = lookupSymbolForPropertyAccess(l.expression.expression, thisParentContainer); } } - if (constructorSymbol) { + if (constructorSymbol && constructorSymbol.valueDeclaration) { // Declare a 'member' if the container is an ES5 class or ES6 constructor constructorSymbol.members = constructorSymbol.members || ts.createSymbolTable(); // It's acceptable for multiple 'this' assignments of the same identifier to occur @@ -31321,6 +31548,10 @@ var ts; } function bindObjectDefinePrototypeProperty(node) { var namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0].expression); + if (namespaceSymbol) { + // Ensure the namespace symbol becomes class-like + addDeclarationToSymbol(namespaceSymbol, namespaceSymbol.valueDeclaration, 32 /* Class */); + } bindPotentiallyNewExpandoMemberToNamespace(node, namespaceSymbol, /*isPrototypeProperty*/ true); } /** @@ -31395,7 +31626,7 @@ var ts; } }); } - if (containerIsClass && namespaceSymbol) { + if (containerIsClass && namespaceSymbol && namespaceSymbol.valueDeclaration) { addDeclarationToSymbol(namespaceSymbol, namespaceSymbol.valueDeclaration, 32 /* Class */); } return namespaceSymbol; @@ -32044,7 +32275,8 @@ var ts; || ts.hasModifier(node, 2270 /* TypeScriptModifier */) || node.typeParameters || node.type - || !node.body) { + || !node.body + || node.questionToken) { transformFlags |= 1 /* AssertTypeScript */; } // function declarations with object rest destructuring are ES2018 syntax @@ -32081,7 +32313,7 @@ var ts; function computePropertyDeclaration(node, subtreeFlags) { var transformFlags = subtreeFlags | 1048576 /* ContainsClassFields */; // Decorators, TypeScript-specific modifiers, and type annotations are TypeScript syntax. - if (ts.some(node.decorators) || ts.hasModifier(node, 2270 /* TypeScriptModifier */) || node.type) { + if (ts.some(node.decorators) || ts.hasModifier(node, 2270 /* TypeScriptModifier */) || node.type || node.questionToken) { transformFlags |= 1 /* AssertTypeScript */; } // Hoisted variables related to class properties should live within the TypeScript class wrapper. @@ -32886,6 +33118,7 @@ var ts; TypeSystemPropertyName[TypeSystemPropertyName["ImmediateBaseConstraint"] = 4] = "ImmediateBaseConstraint"; TypeSystemPropertyName[TypeSystemPropertyName["EnumTagType"] = 5] = "EnumTagType"; TypeSystemPropertyName[TypeSystemPropertyName["JSDocTypeReference"] = 6] = "JSDocTypeReference"; + TypeSystemPropertyName[TypeSystemPropertyName["ResolvedTypeArguments"] = 7] = "ResolvedTypeArguments"; })(TypeSystemPropertyName || (TypeSystemPropertyName = {})); var CheckMode; (function (CheckMode) { @@ -32896,12 +33129,6 @@ var ts; CheckMode[CheckMode["SkipGenericFunctions"] = 8] = "SkipGenericFunctions"; CheckMode[CheckMode["IsForSignatureHelp"] = 16] = "IsForSignatureHelp"; })(CheckMode || (CheckMode = {})); - var ContextFlags; - (function (ContextFlags) { - ContextFlags[ContextFlags["None"] = 0] = "None"; - ContextFlags[ContextFlags["Signature"] = 1] = "Signature"; - ContextFlags[ContextFlags["NoConstraints"] = 2] = "NoConstraints"; - })(ContextFlags || (ContextFlags = {})); var AccessFlags; (function (AccessFlags) { AccessFlags[AccessFlags["None"] = 0] = "None"; @@ -33035,14 +33262,12 @@ var ts; undefinedSymbol.declarations = []; var globalThisSymbol = createSymbol(1536 /* Module */, "globalThis", 8 /* Readonly */); globalThisSymbol.exports = globals; + globalThisSymbol.declarations = []; globals.set(globalThisSymbol.escapedName, globalThisSymbol); var argumentsSymbol = createSymbol(4 /* Property */, "arguments"); var requireSymbol = createSymbol(4 /* Property */, "require"); /** This will be set during calls to `getResolvedSignature` where services determines an apparent number of arguments greater than what is actually provided. */ var apparentArgumentCount; - // This object is reused for `checkOptionalExpression` return values to avoid frequent GC due to nursery object allocations. - // This object represents a pool-size of 1. - var pooledOptionalTypeResult = { isOptional: false, type: undefined }; // for public members that accept a Node or one of its subtypes, we must guard against // synthetic nodes created during transformations by calling `getParseTreeNode`. // for most of these, we perform the guard only on `checker` to avoid any possible @@ -33161,9 +33386,9 @@ var ts; }, getAugmentedPropertiesOfType: getAugmentedPropertiesOfType, getRootSymbols: getRootSymbols, - getContextualType: function (nodeIn) { + getContextualType: function (nodeIn, contextFlags) { var node = ts.getParseTreeNode(nodeIn, ts.isExpression); - return node ? getContextualType(node) : undefined; + return node ? getContextualType(node, contextFlags) : undefined; }, getContextualTypeForObjectLiteralElement: function (nodeIn) { var node = ts.getParseTreeNode(nodeIn, ts.isObjectLiteralElementLike); @@ -33212,7 +33437,7 @@ var ts; getEmitResolver: getEmitResolver, getExportsOfModule: getExportsOfModuleAsArray, getExportsAndPropertiesOfModule: getExportsAndPropertiesOfModule, - getSymbolWalker: ts.createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignature, getReturnTypeOfSignature, getBaseTypes, resolveStructuredTypeMembers, getTypeOfSymbol, getResolvedSymbol, getIndexTypeOfStructuredType, getConstraintOfTypeParameter, getFirstIdentifier, getTypeArguments), + getSymbolWalker: ts.createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignature, getReturnTypeOfSignature, getBaseTypes, resolveStructuredTypeMembers, getTypeOfSymbol, getResolvedSymbol, getIndexTypeOfStructuredType, getConstraintOfTypeParameter, ts.getFirstIdentifier, getTypeArguments), getAmbientModules: getAmbientModules, getJsxIntrinsicTagNamesAt: getJsxIntrinsicTagNamesAt, isOptionalParameter: function (nodeIn) { @@ -33341,10 +33566,10 @@ var ts; var errorType = createIntrinsicType(1 /* Any */, "error"); var unknownType = createIntrinsicType(2 /* Unknown */, "unknown"); var undefinedType = createIntrinsicType(32768 /* Undefined */, "undefined"); - var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 262144 /* ContainsWideningType */); + var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 524288 /* ContainsWideningType */); var optionalType = createIntrinsicType(32768 /* Undefined */, "undefined"); var nullType = createIntrinsicType(65536 /* Null */, "null"); - var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 262144 /* ContainsWideningType */); + var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 524288 /* ContainsWideningType */); var stringType = createIntrinsicType(4 /* String */, "string"); var numberType = createIntrinsicType(8 /* Number */, "number"); var bigintType = createIntrinsicType(64 /* BigInt */, "bigint"); @@ -33370,7 +33595,7 @@ var ts; var voidType = createIntrinsicType(16384 /* Void */, "void"); var neverType = createIntrinsicType(131072 /* Never */, "never"); var silentNeverType = createIntrinsicType(131072 /* Never */, "never"); - var nonInferrableType = createIntrinsicType(131072 /* Never */, "never", 1048576 /* NonInferrableType */); + var nonInferrableType = createIntrinsicType(131072 /* Never */, "never", 2097152 /* NonInferrableType */); var implicitNeverType = createIntrinsicType(131072 /* Never */, "never"); var unreachableNeverType = createIntrinsicType(131072 /* Never */, "never"); var nonPrimitiveType = createIntrinsicType(67108864 /* NonPrimitive */, "object"); @@ -33388,7 +33613,7 @@ var ts; var anyFunctionType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); // The anyFunctionType contains the anyFunctionType by definition. The flag is further propagated // in getPropagatingFlagsOfTypes, and it is checked in inferFromTypes. - anyFunctionType.objectFlags |= 1048576 /* NonInferrableType */; + anyFunctionType.objectFlags |= 2097152 /* NonInferrableType */; var noConstraintType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); var circularConstraintType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); var resolvingDefaultType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); @@ -33397,10 +33622,10 @@ var ts; markerSubType.constraint = markerSuperType; var markerOtherType = createTypeParameter(); var noTypePredicate = createTypePredicate(1 /* Identifier */, "<>", 0, anyType); - var anySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); - var unknownSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, errorType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); - var resolvingSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); - var silentNeverSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, silentNeverType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); + var anySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */); + var unknownSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, errorType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */); + var resolvingSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */); + var silentNeverSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, silentNeverType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */); var enumNumberIndexInfo = createIndexInfo(stringType, /*isReadonly*/ true); var iterationTypesCache = ts.createMap(); // cache for common IterationTypes instances var noIterationTypes = { @@ -33553,7 +33778,7 @@ var ts; var chosenpragma = ts.isArray(jsxPragma) ? jsxPragma[0] : jsxPragma; file.localJsxFactory = ts.parseIsolatedEntityName(chosenpragma.arguments.factory, languageVersion); if (file.localJsxFactory) { - return file.localJsxNamespace = getFirstIdentifier(file.localJsxFactory).escapedText; + return file.localJsxNamespace = ts.getFirstIdentifier(file.localJsxFactory).escapedText; } } } @@ -33563,7 +33788,7 @@ var ts; if (compilerOptions.jsxFactory) { _jsxFactoryEntity = ts.parseIsolatedEntityName(compilerOptions.jsxFactory, languageVersion); if (_jsxFactoryEntity) { - _jsxNamespace = getFirstIdentifier(_jsxFactoryEntity).escapedText; + _jsxNamespace = ts.getFirstIdentifier(_jsxFactoryEntity).escapedText; } } else if (compilerOptions.reactNamespace) { @@ -35041,7 +35266,7 @@ var ts; var namespaceMeaning = 1920 /* Namespace */ | (ts.isInJSFile(name) ? meaning & 111551 /* Value */ : 0); var symbol; if (name.kind === 75 /* Identifier */) { - var message = meaning === namespaceMeaning ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(getFirstIdentifier(name)); + var message = meaning === namespaceMeaning ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(ts.getFirstIdentifier(name)); var symbolFromJSPrototype = ts.isInJSFile(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined; symbol = resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, /*isUse*/ true); if (!symbol) { @@ -35153,7 +35378,12 @@ var ts; return undefined; } var init = ts.isVariableDeclaration(decl) ? ts.getDeclaredExpandoInitializer(decl) : ts.getAssignedExpandoInitializer(decl); - return init && getSymbolOfNode(init) || undefined; + if (init) { + var initSymbol = getSymbolOfNode(init); + if (initSymbol) { + return mergeJSSymbols(initSymbol, symbol); + } + } } function resolveExternalModuleName(location, moduleReferenceExpression, ignoreErrors) { return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ignoreErrors ? undefined : ts.Diagnostics.Cannot_find_module_0); @@ -35580,8 +35810,8 @@ var ts; } function findConstructorDeclaration(node) { var members = node.members; - for (var _i = 0, members_2 = members; _i < members_2.length; _i++) { - var member = members_2[_i]; + for (var _i = 0, members_3 = members; _i < members_3.length; _i++) { + var member = members_3[_i]; if (member.kind === 161 /* Constructor */ && ts.nodeIsPresent(member.body)) { return member; } @@ -36004,7 +36234,7 @@ var ts; // Type Reference or TypeAlias entity = Identifier meaning = 788968 /* Type */; } - var firstIdentifier = getFirstIdentifier(entityName); + var firstIdentifier = ts.getFirstIdentifier(entityName); var symbol = resolveName(enclosingDeclaration, firstIdentifier.escapedText, meaning, /*nodeNotFoundErrorMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false); // Verify if the symbol is accessible return (symbol && hasVisibleDeclarations(symbol, /*shouldComputeAliasToMakeVisible*/ true)) || { @@ -36496,8 +36726,6 @@ var ts; else if (context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */ && type.symbol.valueDeclaration && ts.isClassLike(type.symbol.valueDeclaration) && - // Use `import` types for refs to other scopes, only anonymize something defined in the same scope - ts.findAncestor(type.symbol.valueDeclaration, function (d) { return d === ts.getSourceFileOfNode(context.enclosingDeclaration); }) && !isValueSymbolAccessible(type.symbol, context.enclosingDeclaration)) { return createAnonymousTypeNode(type); } @@ -36658,9 +36886,9 @@ var ts; } } } - var propertyName = symbolToName(propertySymbol, context, 111551 /* Value */, /*expectsIdentifier*/ true); - context.approximateLength += (ts.symbolName(propertySymbol).length + 1); context.enclosingDeclaration = saveEnclosingDeclaration; + var propertyName = getPropertyNameNodeForSymbol(propertySymbol, context); + context.approximateLength += (ts.symbolName(propertySymbol).length + 1); var optionalToken = propertySymbol.flags & 16777216 /* Optional */ ? ts.createToken(57 /* QuestionToken */) : undefined; if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) { var signatures = getSignaturesOfType(filterType(propertyType, function (t) { return !(t.flags & 32768 /* Undefined */); }), 0 /* Call */); @@ -36859,7 +37087,7 @@ var ts; if (!context.tracker.trackSymbol) return; // get symbol of the first identifier of the entityName - var firstIdentifier = getFirstIdentifier(accessExpression); + var firstIdentifier = ts.getFirstIdentifier(accessExpression); var name = resolveName(firstIdentifier, firstIdentifier.escapedText, 111551 /* Value */ | 1048576 /* ExportValue */, /*nodeNotFoundErrorMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ true); if (name) { context.tracker.trackSymbol(name, enclosingDeclaration, 111551 /* Value */); @@ -37225,22 +37453,34 @@ var ts; } } } + function isSingleQuotedStringNamed(d) { + var name = ts.getNameOfDeclaration(d); + if (name && ts.isStringLiteral(name) && (name.singleQuote || + (!ts.nodeIsSynthesized(name) && ts.startsWith(ts.getTextOfNode(name, /*includeTrivia*/ false), "'")))) { + return true; + } + return false; + } function getPropertyNameNodeForSymbol(symbol, context) { - var fromNameType = getPropertyNameNodeForSymbolFromNameType(symbol, context); + var singleQuote = !!ts.length(symbol.declarations) && ts.every(symbol.declarations, isSingleQuotedStringNamed); + var fromNameType = getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote); if (fromNameType) { return fromNameType; } + if (ts.isKnownSymbol(symbol)) { + return ts.createComputedPropertyName(ts.createPropertyAccess(ts.createIdentifier("Symbol"), symbol.escapedName.substr(3))); + } var rawName = ts.unescapeLeadingUnderscores(symbol.escapedName); - return createPropertyNameNodeForIdentifierOrLiteral(rawName); + return createPropertyNameNodeForIdentifierOrLiteral(rawName, singleQuote); } // See getNameForSymbolFromNameType for a stringy equivalent - function getPropertyNameNodeForSymbolFromNameType(symbol, context) { + function getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote) { var nameType = symbol.nameType; if (nameType) { if (nameType.flags & 384 /* StringOrNumberLiteral */) { var name = "" + nameType.value; if (!ts.isIdentifierText(name, compilerOptions.target) && !isNumericLiteralName(name)) { - return ts.createLiteral(name); + return ts.createLiteral(name, !!singleQuote); } if (isNumericLiteralName(name) && ts.startsWith(name, "-")) { return ts.createComputedPropertyName(ts.createLiteral(+name)); @@ -37252,8 +37492,8 @@ var ts; } } } - function createPropertyNameNodeForIdentifierOrLiteral(name) { - return ts.isIdentifierText(name, compilerOptions.target) ? ts.createIdentifier(name) : ts.createLiteral(isNumericLiteralName(name) ? +name : name); + function createPropertyNameNodeForIdentifierOrLiteral(name, singleQuote) { + return ts.isIdentifierText(name, compilerOptions.target) ? ts.createIdentifier(name) : ts.createLiteral(isNumericLiteralName(name) ? +name : name, !!singleQuote); } function cloneNodeBuilderContext(context) { var initial = __assign({}, context); @@ -37293,7 +37533,7 @@ var ts; var visitedSymbols = ts.createMap(); var deferredPrivates; var oldcontext = context; - context = __assign(__assign({}, oldcontext), { usedSymbolNames: ts.mapMap(symbolTable, function (_symbol, name) { return [ts.unescapeLeadingUnderscores(name), true]; }), remappedSymbolNames: ts.createMap(), tracker: __assign(__assign({}, oldcontext.tracker), { trackSymbol: function (sym, decl, meaning) { + context = __assign(__assign({}, oldcontext), { usedSymbolNames: ts.createMap(), remappedSymbolNames: ts.createMap(), tracker: __assign(__assign({}, oldcontext.tracker), { trackSymbol: function (sym, decl, meaning) { var accessibleResult = isSymbolAccessible(sym, decl, meaning, /*computeALiases*/ false); if (accessibleResult.accessibility === 0 /* Accessible */) { // Lookup the root symbol of the chain of refs we'll use to access it and serialize it @@ -37311,6 +37551,10 @@ var ts; context.usedSymbolNames.set(name, true); }); } + ts.forEachEntry(symbolTable, function (symbol, name) { + var baseName = ts.unescapeLeadingUnderscores(name); + void getInternalSymbolName(symbol, baseName); // Called to cache values into `usedSymbolNames` and `remappedSymbolNames` + }); var addingDeclare = !bundled; var exportEquals = symbolTable.get("export=" /* ExportEquals */); if (exportEquals && symbolTable.size > 1 && exportEquals.flags & 2097152 /* Alias */) { @@ -37502,7 +37746,11 @@ var ts; isPrivate = true; } var modifierFlags = (!isPrivate ? 1 /* Export */ : 0) | (isDefault && !needsPostExportDefault ? 512 /* Default */ : 0); - if (symbol.flags & 16 /* Function */) { + var isConstMergedWithNS = symbol.flags & 1536 /* Module */ && + symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && + symbol.escapedName !== "export=" /* ExportEquals */; + var isConstMergedWithNSPrintableAsSignatureMerge = isConstMergedWithNS && isTypeRepresentableAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol); + if (symbol.flags & 16 /* Function */ || isConstMergedWithNSPrintableAsSignatureMerge) { serializeAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol, getInternalSymbolName(symbol, symbolName), modifierFlags); } if (symbol.flags & 524288 /* TypeAlias */) { @@ -37513,7 +37761,8 @@ var ts; if (symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && symbol.escapedName !== "export=" /* ExportEquals */ && !(symbol.flags & 4194304 /* Prototype */) - && !(symbol.flags & 32 /* Class */)) { + && !(symbol.flags & 32 /* Class */) + && !isConstMergedWithNSPrintableAsSignatureMerge) { serializeVariableOrProperty(symbol, symbolName, isPrivate, needsPostExportDefault, propertyAsAlias, modifierFlags); } if (symbol.flags & 384 /* Enum */) { @@ -37530,7 +37779,7 @@ var ts; serializeAsClass(symbol, getInternalSymbolName(symbol, symbolName), modifierFlags); } } - if (symbol.flags & (512 /* ValueModule */ | 1024 /* NamespaceModule */)) { + if ((symbol.flags & (512 /* ValueModule */ | 1024 /* NamespaceModule */) && (!isConstMergedWithNS || isTypeOnlyNamespace(symbol))) || isConstMergedWithNSPrintableAsSignatureMerge) { serializeModule(symbol, symbolName, modifierFlags); } if (symbol.flags & 64 /* Interface */) { @@ -37558,7 +37807,10 @@ var ts; } } function includePrivateSymbol(symbol) { + if (ts.some(symbol.declarations, ts.isParameterDeclaration)) + return; ts.Debug.assertDefined(deferredPrivates); + getUnusedName(ts.unescapeLeadingUnderscores(symbol.escapedName), symbol); // Call to cache unique name for symbol deferredPrivates.set("" + getSymbolId(symbol), symbol); } function isExportingScope(enclosingDeclaration) { @@ -37617,8 +37869,14 @@ var ts; /*decorators*/ undefined, /*modifiers*/ undefined, getInternalSymbolName(symbol, symbolName), typeParamDecls, heritageClauses, __spreadArrays(indexSignatures, constructSignatures, callSignatures, members)), modifierFlags); } + function getNamespaceMembersForSerialization(symbol) { + return !symbol.exports ? [] : ts.filter(ts.arrayFrom((symbol.exports).values()), function (p) { return !((p.flags & 4194304 /* Prototype */) || (p.escapedName === "prototype")); }); + } + function isTypeOnlyNamespace(symbol) { + return ts.every(getNamespaceMembersForSerialization(symbol), function (m) { return !(resolveSymbol(m).flags & 111551 /* Value */); }); + } function serializeModule(symbol, symbolName, modifierFlags) { - var members = !symbol.exports ? [] : ts.filter(ts.arrayFrom((symbol.exports).values()), function (p) { return !((p.flags & 4194304 /* Prototype */) || (p.escapedName === "prototype")); }); + var members = getNamespaceMembersForSerialization(symbol); // Split NS members up by declaration - members whose parent symbol is the ns symbol vs those whose is not (but were added in later via merging) var locationMap = ts.arrayToMultiMap(members, function (m) { return m.parent && m.parent === symbol ? "real" : "merged"; }); var realMembers = locationMap.get("real") || ts.emptyArray; @@ -37628,17 +37886,20 @@ var ts; // so we don't even have placeholders to fill in. if (ts.length(realMembers)) { var localName = getInternalSymbolName(symbol, symbolName); - serializeAsNamespaceDeclaration(realMembers, localName, modifierFlags, /*suppressNewPrivateContext*/ false); + serializeAsNamespaceDeclaration(realMembers, localName, modifierFlags, !!(symbol.flags & (16 /* Function */ | 67108864 /* Assignment */))); } if (ts.length(mergedMembers)) { var localName = getInternalSymbolName(symbol, symbolName); - ts.forEach(mergedMembers, includePrivateSymbol); var nsBody = ts.createModuleBlock([ts.createExportDeclaration( /*decorators*/ undefined, /*modifiers*/ undefined, ts.createNamedExports(ts.map(ts.filter(mergedMembers, function (n) { return n.escapedName !== "export=" /* ExportEquals */; }), function (s) { var name = ts.unescapeLeadingUnderscores(s.escapedName); var localName = getInternalSymbolName(s, name); - return ts.createExportSpecifier(name === localName ? undefined : localName, name); + var aliasDecl = s.declarations && getDeclarationOfAliasSymbol(s); + var target = aliasDecl && getTargetOfAliasDeclaration(aliasDecl, /*dontRecursivelyResolve*/ true); + includePrivateSymbol(target || s); + var targetName = target ? getInternalSymbolName(target, ts.unescapeLeadingUnderscores(target.escapedName)) : localName; + return ts.createExportSpecifier(name === targetName ? undefined : targetName, name); })))]); addResult(ts.createModuleDeclaration( /*decorators*/ undefined, @@ -37839,7 +38100,11 @@ var ts; case 254 /* ImportClause */: addResult(ts.createImportDeclaration( /*decorators*/ undefined, - /*modifiers*/ undefined, ts.createImportClause(ts.createIdentifier(localName), /*namedBindings*/ undefined), ts.createLiteral(getSpecifierForModuleSymbol(target.parent, context))), 0 /* None */); + /*modifiers*/ undefined, ts.createImportClause(ts.createIdentifier(localName), /*namedBindings*/ undefined), + // We use `target.parent || target` below as `target.parent` is unset when the target is a module which has been export assigned + // And then made into a default by the `esModuleInterop` or `allowSyntheticDefaultImports` flag + // In such cases, the `target` refers to the module itself already + ts.createLiteral(getSpecifierForModuleSymbol(target.parent || target, context))), 0 /* None */); break; case 255 /* NamespaceImport */: addResult(ts.createImportDeclaration( @@ -37851,7 +38116,7 @@ var ts; /*decorators*/ undefined, /*modifiers*/ undefined, ts.createImportClause(/*importClause*/ undefined, ts.createNamedImports([ ts.createImportSpecifier(localName !== verbatimTargetName ? ts.createIdentifier(verbatimTargetName) : undefined, ts.createIdentifier(localName)) - ])), ts.createLiteral(getSpecifierForModuleSymbol(target.parent, context))), 0 /* None */); + ])), ts.createLiteral(getSpecifierForModuleSymbol(target.parent || target, context))), 0 /* None */); break; case 261 /* ExportSpecifier */: // does not use localName because the symbol name in this case refers to the name in the exports table, @@ -37865,6 +38130,7 @@ var ts; serializeMaybeAliasAssignment(symbol); break; case 208 /* BinaryExpression */: + case 193 /* PropertyAccessExpression */: // Could be best encoded as though an export specifier or as though an export assignment // If name is default or export=, do an export assignment // Otherwise do an export specifier @@ -37875,10 +38141,6 @@ var ts; serializeExportSpecifier(localName, targetName); } break; - case 193 /* PropertyAccessExpression */: - // A PAE alias is _always_ going to exist as an append to a top-level export, where our top level - // handling should always be sufficient to encode the export action itself - break; default: return ts.Debug.failBadSyntaxKind(node, "Unhandled alias declaration kind in symbol serializer!"); } @@ -37902,7 +38164,8 @@ var ts; var aliasDecl = symbol.declarations && getDeclarationOfAliasSymbol(symbol); // serialize what the alias points to, preserve the declaration's initializer var target = aliasDecl && getTargetOfAliasDeclaration(aliasDecl, /*dontRecursivelyResolve*/ true); - if (target) { + // If the target resolves and resolves to a thing defined in this file, emit as an alias, otherwise emit as a const + if (target && ts.length(target.declarations) && ts.some(target.declarations, function (d) { return ts.getSourceFileOfNode(d) === ts.getSourceFileOfNode(enclosingDeclaration); })) { // In case `target` refers to a namespace member, look at the declaration and serialize the leftmost symbol in it // eg, `namespace A { export class B {} }; exports = A.B;` // Technically, this is all that's required in the case where the assignment is an entity name expression @@ -37977,6 +38240,7 @@ var ts; return ts.getObjectFlags(typeToSerialize) & (16 /* Anonymous */ | 32 /* Mapped */) && !getIndexInfoOfType(typeToSerialize, 0 /* String */) && !getIndexInfoOfType(typeToSerialize, 1 /* Number */) && + !!(ts.length(getPropertiesOfType(typeToSerialize)) || ts.length(getSignaturesOfType(typeToSerialize, 0 /* Call */))) && !ts.length(getSignaturesOfType(typeToSerialize, 1 /* Construct */)) && // TODO: could probably serialize as function + ns + class, now that that's OK !getDeclarationWithTypeAnnotation(hostSymbol) && !(typeToSerialize.symbol && ts.some(typeToSerialize.symbol.declarations, function (d) { return ts.getSourceFileOfNode(d) !== ctxSrc; })) && @@ -38120,7 +38384,7 @@ var ts; return ts.updateImportTypeNode(node, ts.updateLiteralTypeNode(node.argument, rewriteModuleSpecifier(node, node.argument.literal)), node.qualifier, ts.visitNodes(node.typeArguments, visitExistingNodeTreeSymbols, ts.isTypeNode), node.isTypeOf); } if (ts.isEntityName(node) || ts.isEntityNameExpression(node)) { - var leftmost = getFirstIdentifier(node); + var leftmost = ts.getFirstIdentifier(node); var sym = resolveEntityName(leftmost, 67108863 /* All */, /*ignoreErrors*/ true, /*dontResolveALias*/ true); if (sym) { includePrivateSymbol(sym); @@ -38250,11 +38514,8 @@ var ts; return context.remappedSymbolNames.get("" + getSymbolId(symbol)); } } - if (input === "default" /* Default */) { - input = "_default"; - } - else if (input === "export=" /* ExportEquals */) { - input = "_exports"; + if (symbol) { + input = getNameCandidateWorker(symbol, input); } var i = 0; var original = input; @@ -38268,17 +38529,28 @@ var ts; } return input; } - function getInternalSymbolName(symbol, localName) { - if (context.remappedSymbolNames.has("" + getSymbolId(symbol))) { - return context.remappedSymbolNames.get("" + getSymbolId(symbol)); - } + function getNameCandidateWorker(symbol, localName) { if (localName === "default" /* Default */ || localName === "__class" /* Class */ || localName === "__function" /* Function */) { var flags = context.flags; context.flags |= 16777216 /* InInitialEntityName */; var nameCandidate = getNameOfSymbolAsWritten(symbol, context); context.flags = flags; - localName = ts.isIdentifierText(nameCandidate, languageVersion) && !ts.isStringANonContextualKeyword(nameCandidate) ? nameCandidate : getUnusedName("_default", symbol); + localName = nameCandidate.length > 0 && ts.isSingleOrDoubleQuote(nameCandidate.charCodeAt(0)) ? ts.stripQuotes(nameCandidate) : nameCandidate; } + if (localName === "default" /* Default */) { + localName = "_default"; + } + else if (localName === "export=" /* ExportEquals */) { + localName = "_exports"; + } + localName = ts.isIdentifierText(localName, languageVersion) && !ts.isStringANonContextualKeyword(localName) ? localName : "_" + localName.replace(/[^a-zA-Z0-9]/g, "_"); + return localName; + } + function getInternalSymbolName(symbol, localName) { + if (context.remappedSymbolNames.has("" + getSymbolId(symbol))) { + return context.remappedSymbolNames.get("" + getSymbolId(symbol)); + } + localName = getNameCandidateWorker(symbol, localName); // The result of this is going to be used as the symbol's name - lock it in, so `getUnusedName` will also pick it up context.remappedSymbolNames.set("" + getSymbolId(symbol), localName); return localName; @@ -38543,7 +38815,7 @@ var ts; if (ts.isInternalModuleImportEqualsDeclaration(declaration)) { // Add the referenced top container visible var internalModuleReference = declaration.moduleReference; - var firstIdentifier = getFirstIdentifier(internalModuleReference); + var firstIdentifier = ts.getFirstIdentifier(internalModuleReference); var importSymbol = resolveName(declaration, firstIdentifier.escapedText, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, undefined, undefined, /*isUse*/ false); var id = importSymbol && "" + getSymbolId(importSymbol); if (importSymbol && !visited.has(id)) { @@ -38607,6 +38879,8 @@ var ts; return !!target.immediateBaseConstraint; case 6 /* JSDocTypeReference */: return !!getSymbolLinks(target).resolvedJSDocType; + case 7 /* ResolvedTypeArguments */: + return !!target.resolvedTypeArguments; } return ts.Debug.assertNever(propertyName); } @@ -38692,7 +38966,9 @@ var ts; } var stringIndexInfo = getIndexInfoOfType(source, 0 /* String */); var numberIndexInfo = getIndexInfoOfType(source, 1 /* Number */); - return createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, stringIndexInfo, numberIndexInfo); + var result = createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, stringIndexInfo, numberIndexInfo); + result.objectFlags |= 131072 /* ObjectRestType */; + return result; } // Determine the control flow type associated with a destructuring declaration or assignment. The following // forms of destructuring are possible: @@ -39078,23 +39354,23 @@ var ts; kind === 2 /* ModuleExports */ && symbol.escapedName === "export=" /* ExportEquals */) { var exportedType_1 = resolveStructuredTypeMembers(type); - var members_3 = ts.createSymbolTable(); - ts.copyEntries(exportedType_1.members, members_3); + var members_4 = ts.createSymbolTable(); + ts.copyEntries(exportedType_1.members, members_4); if (resolvedSymbol && !resolvedSymbol.exports) { resolvedSymbol.exports = ts.createSymbolTable(); } (resolvedSymbol || symbol).exports.forEach(function (s, name) { - if (members_3.has(name)) { + if (members_4.has(name)) { var exportedMember = exportedType_1.members.get(name); var union = createSymbol(s.flags | exportedMember.flags, name); union.type = getUnionType([getTypeOfSymbol(s), getTypeOfSymbol(exportedMember)]); - members_3.set(name, union); + members_4.set(name, union); } else { - members_3.set(name, s); + members_4.set(name, s); } }); - var result = createAnonymousType(exportedType_1.symbol, members_3, exportedType_1.callSignatures, exportedType_1.constructSignatures, exportedType_1.stringIndexInfo, exportedType_1.numberIndexInfo); + var result = createAnonymousType(exportedType_1.symbol, members_4, exportedType_1.callSignatures, exportedType_1.constructSignatures, exportedType_1.stringIndexInfo, exportedType_1.numberIndexInfo); result.objectFlags |= (ts.getObjectFlags(type) & 16384 /* JSLiteral */); // Propagate JSLiteral flag return result; } @@ -39154,7 +39430,7 @@ var ts; function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) { var members = ts.createSymbolTable(); var stringIndexInfo; - var objectFlags = 128 /* ObjectLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */; + var objectFlags = 128 /* ObjectLiteral */ | 1048576 /* ContainsObjectOrArrayLiteral */; ts.forEach(pattern.elements, function (e) { var name = e.propertyName || e.name; if (e.dotDotDotToken) { @@ -39294,16 +39570,12 @@ var ts; if (!declaration.statements.length) { return emptyObjectType; } - var type_1 = getWidenedLiteralType(checkExpression(declaration.statements[0].expression)); - if (type_1.flags & 524288 /* Object */) { - return getRegularTypeOfObjectLiteral(type_1); - } - return type_1; + return getWidenedType(getWidenedLiteralType(checkExpression(declaration.statements[0].expression))); } // Handle variable, parameter or property if (!pushTypeResolution(symbol, 0 /* Type */)) { // Symbol is property of some kind that is merged with something - should use `getTypeOfFuncClassEnumModule` and not `getTypeOfVariableOrParameterOrProperty` - if (symbol.flags & 512 /* ValueModule */) { + if (symbol.flags & 512 /* ValueModule */ && !(symbol.flags & 67108864 /* Assignment */)) { return getTypeOfFuncClassEnumModule(symbol); } return reportCircularityError(symbol); @@ -39371,7 +39643,7 @@ var ts; } if (!popTypeResolution()) { // Symbol is property of some kind that is merged with something - should use `getTypeOfFuncClassEnumModule` and not `getTypeOfVariableOrParameterOrProperty` - if (symbol.flags & 512 /* ValueModule */) { + if (symbol.flags & 512 /* ValueModule */ && !(symbol.flags & 67108864 /* Assignment */)) { return getTypeOfFuncClassEnumModule(symbol); } return reportCircularityError(symbol); @@ -39454,7 +39726,9 @@ var ts; } else { ts.Debug.assert(!!getter, "there must exist a getter as we are current checking either setter or getter in this function"); - errorOrSuggestion(noImplicitAny, getter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation, symbolToString(symbol)); + if (!isPrivateWithinAmbient(getter)) { + errorOrSuggestion(noImplicitAny, getter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation, symbolToString(symbol)); + } } return anyType; } @@ -39500,11 +39774,11 @@ var ts; return errorType; } var exportEquals = getMergedSymbol(symbol.exports.get("export=" /* ExportEquals */)); - var type_2 = getWidenedTypeForAssignmentDeclaration(exportEquals, exportEquals === resolvedModule ? undefined : resolvedModule); + var type_1 = getWidenedTypeForAssignmentDeclaration(exportEquals, exportEquals === resolvedModule ? undefined : resolvedModule); if (!popTypeResolution()) { return reportCircularityError(symbol); } - return type_2; + return type_1; } } var type = createObjectType(16 /* Anonymous */, symbol); @@ -39690,6 +39964,7 @@ var ts; // The outer type parameters are those defined by enclosing generic classes, methods, or functions. function getOuterTypeParametersOfClassOrInterface(symbol) { var declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 245 /* InterfaceDeclaration */); + ts.Debug.assert(!!declaration, "Class was missing valueDeclaration -OR- non-class had no interface declarations"); return getOuterTypeParameters(declaration); } // The local type parameters are the combined set of type parameters from all declarations of the class, @@ -39720,7 +39995,7 @@ var ts; var signatures = getSignaturesOfType(type, 1 /* Construct */); if (signatures.length === 1) { var s = signatures[0]; - return !s.typeParameters && s.parameters.length === 1 && s.hasRestParameter && getElementTypeOfArrayType(getTypeOfParameter(s.parameters[0])) === anyType; + return !s.typeParameters && s.parameters.length === 1 && signatureHasRestParameter(s) && getElementTypeOfArrayType(getTypeOfParameter(s.parameters[0])) === anyType; } return false; } @@ -40427,8 +40702,8 @@ var ts; var decl = _a[_i]; var members = ts.getMembersOfDeclaration(decl); if (members) { - for (var _b = 0, members_4 = members; _b < members_4.length; _b++) { - var member = members_4[_b]; + for (var _b = 0, members_5 = members; _b < members_5.length; _b++) { + var member = members_5[_b]; if (isStatic === ts.hasStaticModifier(member) && hasLateBindableName(member)) { lateBindMember(symbol, earlySymbols, lateSymbols, member); } @@ -40557,8 +40832,8 @@ var ts; var paddedTypeArguments = typeArguments.length === typeParameters.length ? typeArguments : ts.concatenate(typeArguments, [type]); resolveObjectTypeMembers(type, source, typeParameters, paddedTypeArguments); } - function createSignature(declaration, typeParameters, thisParameter, parameters, resolvedReturnType, resolvedTypePredicate, minArgumentCount, hasRestParameter, hasLiteralTypes) { - var sig = new Signature(checker); + function createSignature(declaration, typeParameters, thisParameter, parameters, resolvedReturnType, resolvedTypePredicate, minArgumentCount, flags) { + var sig = new Signature(checker, flags); sig.declaration = declaration; sig.typeParameters = typeParameters; sig.parameters = parameters; @@ -40566,15 +40841,13 @@ var ts; sig.resolvedReturnType = resolvedReturnType; sig.resolvedTypePredicate = resolvedTypePredicate; sig.minArgumentCount = minArgumentCount; - sig.hasRestParameter = hasRestParameter; - sig.hasLiteralTypes = hasLiteralTypes; sig.target = undefined; sig.mapper = undefined; return sig; } function cloneSignature(sig) { var result = createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, /*resolvedReturnType*/ undefined, - /*resolvedTypePredicate*/ undefined, sig.minArgumentCount, sig.hasRestParameter, sig.hasLiteralTypes); + /*resolvedTypePredicate*/ undefined, sig.minArgumentCount, sig.flags & 3 /* PropagatingFlags */); result.target = sig.target; result.mapper = sig.mapper; return result; @@ -40586,13 +40859,25 @@ var ts; result.mapper = undefined; return result; } - function createOptionalCallSignature(signature) { + function getOptionalCallSignature(signature, callChainFlags) { + if ((signature.flags & 12 /* CallChainFlags */) === callChainFlags) { + return signature; + } + if (!signature.optionalCallSignatureCache) { + signature.optionalCallSignatureCache = {}; + } + var key = callChainFlags === 4 /* IsInnerCallChain */ ? "inner" : "outer"; + return signature.optionalCallSignatureCache[key] + || (signature.optionalCallSignatureCache[key] = createOptionalCallSignature(signature, callChainFlags)); + } + function createOptionalCallSignature(signature, callChainFlags) { + ts.Debug.assert(callChainFlags === 4 /* IsInnerCallChain */ || callChainFlags === 8 /* IsOuterCallChain */, "An optional call signature can either be for an inner call chain or an outer call chain, but not both."); var result = cloneSignature(signature); - result.isOptionalCall = true; + result.flags |= callChainFlags; return result; } function getExpandedParameters(sig) { - if (sig.hasRestParameter) { + if (signatureHasRestParameter(sig)) { var restIndex_1 = sig.parameters.length - 1; var restParameter = sig.parameters[restIndex_1]; var restType = getTypeOfSymbol(restParameter); @@ -40617,7 +40902,7 @@ var ts; var baseConstructorType = getBaseConstructorTypeOfClass(classType); var baseSignatures = getSignaturesOfType(baseConstructorType, 1 /* Construct */); if (baseSignatures.length === 0) { - return [createSignature(undefined, classType.localTypeParameters, undefined, ts.emptyArray, classType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false)]; + return [createSignature(undefined, classType.localTypeParameters, undefined, ts.emptyArray, classType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */)]; } var baseTypeNode = getBaseTypeNodeOfClass(classType); var isJavaScript = ts.isInJSFile(baseTypeNode); @@ -40781,11 +41066,9 @@ var ts; var params = combineUnionParameters(left, right); var thisParam = combineUnionThisParam(left.thisParameter, right.thisParameter); var minArgCount = Math.max(left.minArgumentCount, right.minArgumentCount); - var hasRestParam = left.hasRestParameter || right.hasRestParameter; - var hasLiteralTypes = left.hasLiteralTypes || right.hasLiteralTypes; var result = createSignature(declaration, left.typeParameters || right.typeParameters, thisParam, params, /*resolvedReturnType*/ undefined, - /*resolvedTypePredicate*/ undefined, minArgCount, hasRestParam, hasLiteralTypes); + /*resolvedTypePredicate*/ undefined, minArgCount, (left.flags | right.flags) & 3 /* PropagatingFlags */); result.unionSignatures = ts.concatenate(left.unionSignatures || [left], [right]); return result; } @@ -40958,7 +41241,7 @@ var ts; var constructSignatures = symbol.members ? getSignaturesOfSymbol(symbol.members.get("__constructor" /* Constructor */)) : ts.emptyArray; if (symbol.flags & 16 /* Function */) { constructSignatures = ts.addRange(constructSignatures.slice(), ts.mapDefined(type.callSignatures, function (sig) { return isJSConstructor(sig.declaration) ? - createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, classType_1, /*resolvedTypePredicate*/ undefined, sig.minArgumentCount, sig.hasRestParameter, sig.hasLiteralTypes) : + createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, classType_1, /*resolvedTypePredicate*/ undefined, sig.minArgumentCount, sig.flags & 3 /* PropagatingFlags */) : undefined; })); } if (!constructSignatures.length) { @@ -41464,8 +41747,8 @@ var ts; var types = t.types; var baseTypes = []; for (var _i = 0, types_6 = types; _i < types_6.length; _i++) { - var type_3 = types_6[_i]; - var baseType = getBaseConstraint(type_3); + var type_2 = types_6[_i]; + var baseType = getBaseConstraint(type_2); if (baseType) { baseTypes.push(baseType); } @@ -41898,7 +42181,7 @@ var ts; var links = getNodeLinks(declaration); if (!links.resolvedSignature) { var parameters = []; - var hasLiteralTypes = false; + var flags = 0 /* None */; var minArgumentCount = 0; var thisParameter = void 0; var hasThisParameter = false; @@ -41929,7 +42212,7 @@ var ts; parameters.push(paramSymbol); } if (type && type.kind === 186 /* LiteralType */) { - hasLiteralTypes = true; + flags |= 2 /* HasLiteralTypes */; } // Record a new minimum argument count if this is not an optional parameter var isOptionalParameter_1 = isOptionalJSDocParameterTag(param) || @@ -41955,9 +42238,11 @@ var ts; getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : undefined; var typeParameters = classType ? classType.localTypeParameters : getTypeParametersFromDeclaration(declaration); - var hasRestLikeParameter = ts.hasRestParameter(declaration) || ts.isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters); + if (ts.hasRestParameter(declaration) || ts.isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters)) { + flags |= 1 /* HasRestParameter */; + } links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, - /*resolvedReturnType*/ undefined, /*resolvedTypePredicate*/ undefined, minArgumentCount, hasRestLikeParameter, hasLiteralTypes); + /*resolvedReturnType*/ undefined, /*resolvedTypePredicate*/ undefined, minArgumentCount, flags); } return links.resolvedSignature; } @@ -42100,8 +42385,11 @@ var ts; signature.unionSignatures ? getUnionType(ts.map(signature.unionSignatures, getReturnTypeOfSignature), 2 /* Subtype */) : getReturnTypeFromAnnotation(signature.declaration) || (ts.nodeIsMissing(signature.declaration.body) ? anyType : getReturnTypeFromBody(signature.declaration)); - if (signature.isOptionalCall) { - type = propagateOptionalTypeMarker(type, /*wasOptional*/ true); + if (signature.flags & 4 /* IsInnerCallChain */) { + type = addOptionalTypeMarker(type); + } + else if (signature.flags & 8 /* IsOuterCallChain */) { + type = getOptionalType(type); } if (!popTypeResolution()) { if (signature.declaration) { @@ -42157,7 +42445,7 @@ var ts; return tryGetRestTypeOfSignature(signature) || anyType; } function tryGetRestTypeOfSignature(signature) { - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var sigRestType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); var restType = isTupleType(sigRestType) ? getRestTypeOfTupleType(sigRestType) : sigRestType; return restType && getIndexTypeOfType(restType, 1 /* Number */); @@ -42374,7 +42662,7 @@ var ts; result |= ts.getObjectFlags(type); } } - return result & 1835008 /* PropagatingFlags */; + return result & 3670016 /* PropagatingFlags */; } function createTypeReference(target, typeArguments) { var id = getTypeListId(typeArguments); @@ -42408,13 +42696,25 @@ var ts; return type; } function getTypeArguments(type) { + var _a, _b; if (!type.resolvedTypeArguments) { + if (!pushTypeResolution(type, 7 /* ResolvedTypeArguments */)) { + return ((_a = type.target.localTypeParameters) === null || _a === void 0 ? void 0 : _a.map(function () { return errorType; })) || ts.emptyArray; + } var node = type.node; var typeArguments = !node ? ts.emptyArray : node.kind === 168 /* TypeReference */ ? ts.concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments(node, type.target.localTypeParameters)) : node.kind === 173 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : ts.map(node.elementTypes, getTypeFromTypeNode); - type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments; + if (popTypeResolution()) { + type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments; + } + else { + type.resolvedTypeArguments = ((_b = type.target.localTypeParameters) === null || _b === void 0 ? void 0 : _b.map(function () { return errorType; })) || ts.emptyArray; + error(type.node || currentNode, type.target.symbol + ? ts.Diagnostics.Type_arguments_for_0_circularly_reference_themselves + : ts.Diagnostics.Tuple_type_arguments_circularly_reference_themselves, type.target.symbol && symbolToString(type.target.symbol)); + } } return type.resolvedTypeArguments; } @@ -42531,7 +42831,7 @@ var ts; errorType; } if (symbol.flags & 111551 /* Value */ && isJSDocTypeReference(node)) { - var jsdocType = getTypeFromJSAlias(node, symbol); + var jsdocType = getTypeFromJSDocValueReference(node, symbol); if (jsdocType) { return jsdocType; } @@ -42544,18 +42844,30 @@ var ts; return errorType; } /** - * A JSdoc TypeReference may be to a value imported from commonjs. - * These should really be aliases, but this special-case code fakes alias resolution - * by producing a type from a value. + * A JSdoc TypeReference may be to a value, but resolve it as a type anyway. + * Note: If the value is imported from commonjs, it should really be an alias, + * but this function's special-case code fakes alias resolution as well. */ - function getTypeFromJSAlias(node, symbol) { + function getTypeFromJSDocValueReference(node, symbol) { var valueType = getTypeOfSymbol(symbol); - var typeType = valueType.symbol && - valueType.symbol !== symbol && // Make sure this is a commonjs export by checking that symbol -> type -> symbol doesn't roundtrip. - getTypeReferenceType(node, valueType.symbol); - if (typeType) { - return getSymbolLinks(symbol).resolvedJSDocType = typeType; + var typeType = valueType; + if (symbol.valueDeclaration) { + var decl = ts.getRootDeclaration(symbol.valueDeclaration); + var isRequireAlias = false; + if (ts.isVariableDeclaration(decl) && decl.initializer) { + var expr = decl.initializer; + // skip past entity names, eg `require("x").a.b.c` + while (ts.isPropertyAccessExpression(expr)) { + expr = expr.expression; + } + isRequireAlias = ts.isCallExpression(expr) && ts.isRequireCall(expr, /*requireStringLiteralLikeArgument*/ true) && !!valueType.symbol; + } + var isImportTypeWithQualifier = node.kind === 187 /* ImportType */ && node.qualifier; + if (isRequireAlias || isImportTypeWithQualifier) { + typeType = getTypeReferenceType(node, valueType.symbol); + } } + return getSymbolLinks(symbol).resolvedJSDocType = typeType; } function getSubstitutionType(typeVariable, substitute) { if (substitute.flags & 3 /* AnyOrUnknown */ || substitute === typeVariable) { @@ -42984,7 +43296,7 @@ var ts; if (type === wildcardType) includes |= 4194304 /* IncludesWildcard */; if (!strictNullChecks && flags & 98304 /* Nullable */) { - if (!(ts.getObjectFlags(type) & 262144 /* ContainsWideningType */)) + if (!(ts.getObjectFlags(type) & 524288 /* ContainsWideningType */)) includes |= 2097152 /* IncludesNonWideningType */; } else { @@ -43111,7 +43423,7 @@ var ts; neverType; } } - return getUnionTypeFromSortedList(typeSet, includes & 66994211 /* NotPrimitiveUnion */ ? 0 : 131072 /* PrimitiveUnion */, aliasSymbol, aliasTypeArguments); + return getUnionTypeFromSortedList(typeSet, includes & 66994211 /* NotPrimitiveUnion */ ? 0 : 262144 /* PrimitiveUnion */, aliasSymbol, aliasTypeArguments); } function getUnionTypePredicate(signatures) { var first; @@ -43261,7 +43573,7 @@ var ts; // other unions and return true. Otherwise, do nothing and return false. function intersectUnionsOfPrimitiveTypes(types) { var unionTypes; - var index = ts.findIndex(types, function (t) { return !!(ts.getObjectFlags(t) & 131072 /* PrimitiveUnion */); }); + var index = ts.findIndex(types, function (t) { return !!(ts.getObjectFlags(t) & 262144 /* PrimitiveUnion */); }); if (index < 0) { return false; } @@ -43270,7 +43582,7 @@ var ts; // the unionTypes array. while (i < types.length) { var t = types[i]; - if (ts.getObjectFlags(t) & 131072 /* PrimitiveUnion */) { + if (ts.getObjectFlags(t) & 262144 /* PrimitiveUnion */) { (unionTypes || (unionTypes = [types[index]])).push(t); ts.orderedRemoveItemAt(types, i); } @@ -43299,7 +43611,7 @@ var ts; } } // Finally replace the first union with the result - types[index] = getUnionTypeFromSortedList(result, 131072 /* PrimitiveUnion */); + types[index] = getUnionTypeFromSortedList(result, 262144 /* PrimitiveUnion */); return true; } function createIntersectionType(types, aliasSymbol, aliasTypeArguments) { @@ -44096,7 +44408,7 @@ var ts; } function getAliasSymbolForTypeNode(node) { var host = node.parent; - while (ts.isParenthesizedTypeNode(host)) { + while (ts.isParenthesizedTypeNode(host) || ts.isTypeOperatorNode(host) && host.operator === 137 /* ReadonlyKeyword */) { host = host.parent; } return ts.isTypeAlias(host) ? getSymbolOfNode(host) : undefined; @@ -44197,7 +44509,7 @@ var ts; } } var spread = createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, getIndexInfoWithReadonly(stringIndexInfo, readonly), getIndexInfoWithReadonly(numberIndexInfo, readonly)); - spread.objectFlags |= 128 /* ObjectLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */ | 1024 /* ContainsSpread */ | objectFlags; + spread.objectFlags |= 128 /* ObjectLiteral */ | 1048576 /* ContainsObjectOrArrayLiteral */ | 1024 /* ContainsSpread */ | objectFlags; return spread; } /** We approximate own properties as non-methods plus methods that are inside the object literal */ @@ -44511,7 +44823,7 @@ var ts; // See GH#17600. var result = createSignature(signature.declaration, freshTypeParameters, signature.thisParameter && instantiateSymbol(signature.thisParameter, mapper), instantiateList(signature.parameters, mapper, instantiateSymbol), /*resolvedReturnType*/ undefined, - /*resolvedTypePredicate*/ undefined, signature.minArgumentCount, signature.hasRestParameter, signature.hasLiteralTypes); + /*resolvedTypePredicate*/ undefined, signature.minArgumentCount, signature.flags & 3 /* PropagatingFlags */); result.target = signature; result.mapper = mapper; return result; @@ -45392,20 +45704,20 @@ var ts; } function isSignatureAssignableTo(source, target, ignoreReturnTypes) { return compareSignaturesRelated(source, target, 0 /* None */, ignoreReturnTypes, /*reportErrors*/ false, - /*errorReporter*/ undefined, /*errorReporter*/ undefined, compareTypesAssignable) !== 0 /* False */; + /*errorReporter*/ undefined, /*errorReporter*/ undefined, compareTypesAssignable, /*reportUnreliableMarkers*/ undefined) !== 0 /* False */; } /** * Returns true if `s` is `(...args: any[]) => any` or `(this: any, ...args: any[]) => any` */ function isAnySignature(s) { return !s.typeParameters && (!s.thisParameter || isTypeAny(getTypeOfParameter(s.thisParameter))) && s.parameters.length === 1 && - s.hasRestParameter && (getTypeOfParameter(s.parameters[0]) === anyArrayType || isTypeAny(getTypeOfParameter(s.parameters[0]))) && + signatureHasRestParameter(s) && (getTypeOfParameter(s.parameters[0]) === anyArrayType || isTypeAny(getTypeOfParameter(s.parameters[0]))) && isTypeAny(getReturnTypeOfSignature(s)); } /** * See signatureRelatedTo, compareSignaturesIdentical */ - function compareSignaturesRelated(source, target, callbackCheck, ignoreReturnTypes, reportErrors, errorReporter, incompatibleErrorReporter, compareTypes) { + function compareSignaturesRelated(source, target, callbackCheck, ignoreReturnTypes, reportErrors, errorReporter, incompatibleErrorReporter, compareTypes, reportUnreliableMarkers) { // TODO (drosen): De-duplicate code between related functions. if (source === target) { return -1 /* True */; @@ -45424,6 +45736,9 @@ var ts; var sourceCount = getParameterCount(source); var sourceRestType = getNonArrayRestType(source); var targetRestType = getNonArrayRestType(target); + if (sourceRestType || targetRestType) { + void instantiateType(sourceRestType || targetRestType, reportUnreliableMarkers); + } if (sourceRestType && targetRestType && sourceCount !== targetCount) { // We're not able to relate misaligned complex rest parameters return 0 /* False */; @@ -45467,7 +45782,7 @@ var ts; (getFalsyFlags(sourceType) & 98304 /* Nullable */) === (getFalsyFlags(targetType) & 98304 /* Nullable */); var related = callbacks ? // TODO: GH#18217 It will work if they're both `undefined`, but not if only one is - compareSignaturesRelated(targetSig, sourceSig, strictVariance ? 2 /* Strict */ : 1 /* Bivariant */, /*ignoreReturnTypes*/ false, reportErrors, errorReporter, incompatibleErrorReporter, compareTypes) : + compareSignaturesRelated(targetSig, sourceSig, strictVariance ? 2 /* Strict */ : 1 /* Bivariant */, /*ignoreReturnTypes*/ false, reportErrors, errorReporter, incompatibleErrorReporter, compareTypes, reportUnreliableMarkers) : !callbackCheck && !strictVariance && compareTypes(sourceType, targetType, /*reportErrors*/ false) || compareTypes(targetType, sourceType, reportErrors); if (!related) { if (reportErrors) { @@ -45481,13 +45796,13 @@ var ts; // If a signature resolution is already in-flight, skip issuing a circularity error // here and just use the `any` type directly var targetReturnType = isResolvingReturnTypeOfSignature(target) ? anyType - : target.declaration && isJSConstructor(target.declaration) ? getDeclaredTypeOfClassOrInterface(target.declaration.symbol) + : target.declaration && isJSConstructor(target.declaration) ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(target.declaration.symbol)) : getReturnTypeOfSignature(target); if (targetReturnType === voidType) { return result; } var sourceReturnType = isResolvingReturnTypeOfSignature(source) ? anyType - : source.declaration && isJSConstructor(source.declaration) ? getDeclaredTypeOfClassOrInterface(source.declaration.symbol) + : source.declaration && isJSConstructor(source.declaration) ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(source.declaration.symbol)) : getReturnTypeOfSignature(source); // The following block preserves behavior forbidding boolean returning functions from being assignable to type guard returning functions var targetTypePredicate = getTypePredicateOfSignature(target); @@ -45674,7 +45989,7 @@ var ts; return true; } if (source.flags & 524288 /* Object */ && target.flags & 524288 /* Object */) { - var related = relation.get(getRelationKey(source, target, relation)); + var related = relation.get(getRelationKey(source, target, /*isIntersectionConstituent*/ false, relation)); if (related !== undefined) { return !!(related & 1 /* Succeeded */); } @@ -46045,7 +46360,7 @@ var ts; // and we need to handle "each" relations before "some" relations for the same kind of type. if (source.flags & 1048576 /* Union */) { result = relation === comparableRelation ? - someTypeRelatedToType(source, target, reportErrors && !(source.flags & 131068 /* Primitive */), isIntersectionConstituent) : + someTypeRelatedToType(source, target, reportErrors && !(source.flags & 131068 /* Primitive */)) : eachTypeRelatedToType(source, target, reportErrors && !(source.flags & 131068 /* Primitive */)); } else { @@ -46083,7 +46398,7 @@ var ts; // // - For a primitive type or type parameter (such as 'number = A & B') there is no point in // breaking the intersection apart. - result = someTypeRelatedToType(source, target, /*reportErrors*/ false, /*isIntersectionConstituent*/ true); + result = someTypeRelatedToType(source, target, /*reportErrors*/ false); } if (!result && (source.flags & 66846720 /* StructuredOrInstantiable */ || target.flags & 66846720 /* StructuredOrInstantiable */)) { if (result = recursiveTypeRelatedTo(source, target, reportErrors, isIntersectionConstituent)) { @@ -46196,7 +46511,7 @@ var ts; // JsxAttributes has an object-literal flag and undergo same type-assignablity check as normal object-literal. // However, using an object-literal error message will be very confusing to the users so we give different a message. // TODO: Spelling suggestions for excess jsx attributes (needs new diagnostic messages) - if (prop.valueDeclaration && ts.isJsxAttribute(prop.valueDeclaration)) { + if (prop.valueDeclaration && ts.isJsxAttribute(prop.valueDeclaration) && ts.getSourceFileOfNode(errorNode) === ts.getSourceFileOfNode(prop.valueDeclaration.name)) { // Note that extraneous children (as in `extra`) don't pass this check, // since `children` is a SyntaxKind.PropertySignature instead of a SyntaxKind.JsxAttribute. errorNode = prop.valueDeclaration.name; @@ -46207,7 +46522,7 @@ var ts; // use the property's value declaration if the property is assigned inside the literal itself var objectLiteralDeclaration_1 = source.symbol && ts.firstOrUndefined(source.symbol.declarations); var suggestion = void 0; - if (prop.valueDeclaration && ts.findAncestor(prop.valueDeclaration, function (d) { return d === objectLiteralDeclaration_1; })) { + if (prop.valueDeclaration && ts.findAncestor(prop.valueDeclaration, function (d) { return d === objectLiteralDeclaration_1; }) && ts.getSourceFileOfNode(objectLiteralDeclaration_1) === ts.getSourceFileOfNode(errorNode)) { var propDeclaration = prop.valueDeclaration; ts.Debug.assertNode(propDeclaration, ts.isObjectLiteralElementLike); errorNode = propDeclaration; @@ -46367,14 +46682,14 @@ var ts; } return result; } - function someTypeRelatedToType(source, target, reportErrors, isIntersectionConstituent) { + function someTypeRelatedToType(source, target, reportErrors) { var sourceTypes = source.types; if (source.flags & 1048576 /* Union */ && containsType(sourceTypes, target)) { return -1 /* True */; } var len = sourceTypes.length; for (var i = 0; i < len; i++) { - var related = isRelatedTo(sourceTypes[i], target, reportErrors && i === len - 1, /*headMessage*/ undefined, isIntersectionConstituent); + var related = isRelatedTo(sourceTypes[i], target, reportErrors && i === len - 1); if (related) { return related; } @@ -46462,7 +46777,7 @@ var ts; if (overflow) { return 0 /* False */; } - var id = getRelationKey(source, target, relation); + var id = getRelationKey(source, target, isIntersectionConstituent, relation); var entry = relation.get(id); if (entry !== undefined) { if (reportErrors && entry & 2 /* Failed */ && !(entry & 4 /* Reported */)) { @@ -47356,7 +47671,7 @@ var ts; * See signatureAssignableTo, compareSignaturesIdentical */ function signatureRelatedTo(source, target, erase, reportErrors, incompatibleReporter) { - return compareSignaturesRelated(erase ? getErasedSignature(source) : source, erase ? getErasedSignature(target) : target, 0 /* None */, /*ignoreReturnTypes*/ false, reportErrors, reportError, incompatibleReporter, isRelatedTo); + return compareSignaturesRelated(erase ? getErasedSignature(source) : source, erase ? getErasedSignature(target) : target, 0 /* None */, /*ignoreReturnTypes*/ false, reportErrors, reportError, incompatibleReporter, isRelatedTo, reportUnreliableMarkers); } function signaturesIdenticalTo(source, target, kind) { var sourceSignatures = getSignaturesOfType(source, kind); @@ -47648,17 +47963,18 @@ var ts; * To improve caching, the relation key for two generic types uses the target's id plus ids of the type parameters. * For other cases, the types ids are used. */ - function getRelationKey(source, target, relation) { + function getRelationKey(source, target, isIntersectionConstituent, relation) { if (relation === identityRelation && source.id > target.id) { var temp = source; source = target; target = temp; } + var intersection = isIntersectionConstituent ? "&" : ""; if (isTypeReferenceWithGenericArguments(source) && isTypeReferenceWithGenericArguments(target)) { var typeParameters = []; - return getTypeReferenceId(source, typeParameters) + "," + getTypeReferenceId(target, typeParameters); + return getTypeReferenceId(source, typeParameters) + "," + getTypeReferenceId(target, typeParameters) + intersection; } - return source.id + "," + target.id; + return source.id + "," + target.id + intersection; } // Invoke the callback for each underlying property symbol of the given symbol and return the first // value that isn't undefined. @@ -47709,7 +48025,7 @@ var ts; // for finite but deeply expanding indexed accesses (eg, for `Q[P1][P2][P3][P4][P5]`). function isDeeplyNestedType(type, stack, depth) { // We track all object types that have an associated symbol (representing the origin of the type) - if (depth >= 5 && type.flags & 524288 /* Object */) { + if (depth >= 5 && type.flags & 524288 /* Object */ && !isObjectOrArrayLiteralType(type)) { var symbol = type.symbol; if (symbol) { var count = 0; @@ -48084,37 +48400,19 @@ var ts; function addOptionalTypeMarker(type) { return strictNullChecks ? getUnionType([type, optionalType]) : type; } + function isNotOptionalTypeMarker(type) { + return type !== optionalType; + } function removeOptionalTypeMarker(type) { - return strictNullChecks ? filterType(type, function (t) { return t !== optionalType; }) : type; + return strictNullChecks ? filterType(type, isNotOptionalTypeMarker) : type; } - function propagateOptionalTypeMarker(type, wasOptional) { - return wasOptional ? addOptionalTypeMarker(type) : type; + function propagateOptionalTypeMarker(type, node, wasOptional) { + return wasOptional ? ts.isOutermostOptionalChain(node) ? getOptionalType(type) : addOptionalTypeMarker(type) : type; } - function createPooledOptionalTypeResult(isOptional, type) { - pooledOptionalTypeResult.isOptional = isOptional; - pooledOptionalTypeResult.type = type; - return pooledOptionalTypeResult; - } - function checkOptionalExpression(parent, expression, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic) { - var isOptional = false; - var type = checkExpression(expression); - if (ts.isOptionalChain(parent)) { - if (parent.questionDotToken) { - // If we have a questionDotToken then we are an OptionalExpression and should remove `null` and - // `undefined` from the type and add the optionalType to the result, if needed. - isOptional = isNullableType(type); - return createPooledOptionalTypeResult(isOptional, isOptional ? getNonNullableType(type) : type); - } - // If we do not have a questionDotToken, then we are an OptionalChain and we remove the optionalType and - // indicate whether we need to add optionalType back into the result. - var nonOptionalType = removeOptionalTypeMarker(type); - if (nonOptionalType !== type) { - isOptional = true; - type = nonOptionalType; - } - } - type = checkNonNullType(type, expression, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic); - return createPooledOptionalTypeResult(isOptional, type); + function getOptionalExpressionType(exprType, expression) { + return ts.isExpressionOfOptionalChainRoot(expression) ? getNonNullableType(exprType) : + ts.isOptionalChain(expression) ? removeOptionalTypeMarker(exprType) : + exprType; } /** * Is source potentially coercible to target type under `==`. @@ -48268,14 +48566,14 @@ var ts; var stringIndexInfo = getIndexInfoOfType(type, 0 /* String */); var numberIndexInfo = getIndexInfoOfType(type, 1 /* Number */); var result = createAnonymousType(type.symbol, members, ts.emptyArray, ts.emptyArray, stringIndexInfo && createIndexInfo(getWidenedType(stringIndexInfo.type), stringIndexInfo.isReadonly), numberIndexInfo && createIndexInfo(getWidenedType(numberIndexInfo.type), numberIndexInfo.isReadonly)); - result.objectFlags |= (ts.getObjectFlags(type) & (16384 /* JSLiteral */ | 1048576 /* NonInferrableType */)); // Retain js literal flag through widening + result.objectFlags |= (ts.getObjectFlags(type) & (16384 /* JSLiteral */ | 2097152 /* NonInferrableType */)); // Retain js literal flag through widening return result; } function getWidenedType(type) { return getWidenedTypeWithContext(type, /*context*/ undefined); } function getWidenedTypeWithContext(type, context) { - if (ts.getObjectFlags(type) & 786432 /* RequiresWidening */) { + if (ts.getObjectFlags(type) & 1572864 /* RequiresWidening */) { if (context === undefined && type.widened) { return type.widened; } @@ -48320,7 +48618,7 @@ var ts; */ function reportWideningErrorsInType(type) { var errorReported = false; - if (ts.getObjectFlags(type) & 262144 /* ContainsWideningType */) { + if (ts.getObjectFlags(type) & 524288 /* ContainsWideningType */) { if (type.flags & 1048576 /* Union */) { if (ts.some(type.types, isEmptyObjectType)) { errorReported = true; @@ -48346,7 +48644,7 @@ var ts; for (var _d = 0, _e = getPropertiesOfObjectType(type); _d < _e.length; _d++) { var p = _e[_d]; var t = getTypeOfSymbol(p); - if (ts.getObjectFlags(t) & 262144 /* ContainsWideningType */) { + if (ts.getObjectFlags(t) & 524288 /* ContainsWideningType */) { if (!reportWideningErrorsInType(t)) { error(p.valueDeclaration, ts.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, symbolToString(p), typeToString(getWidenedType(t))); } @@ -48426,7 +48724,7 @@ var ts; errorOrSuggestion(noImplicitAny, declaration, diagnostic, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)), typeAsString); } function reportErrorsFromWidening(declaration, type, wideningKind) { - if (produceDiagnostics && noImplicitAny && ts.getObjectFlags(type) & 262144 /* ContainsWideningType */) { + if (produceDiagnostics && noImplicitAny && ts.getObjectFlags(type) & 524288 /* ContainsWideningType */) { // Report implicit any error within type if possible, otherwise report error on declaration if (!reportWideningErrorsInType(type)) { reportImplicitAny(declaration, type, wideningKind); @@ -48543,7 +48841,7 @@ var ts; return !!(type.flags & 63176704 /* Instantiable */ || objectFlags & 4 /* Reference */ && (type.node || ts.forEach(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || - objectFlags & 32 /* Mapped */ || + objectFlags & (32 /* Mapped */ | 131072 /* ObjectRestType */) || type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && couldUnionOrIntersectionContainTypeVariables(type)); } function couldUnionOrIntersectionContainTypeVariables(type) { @@ -48598,7 +48896,7 @@ var ts; // literal { a: 123, b: x => true } is marked non-inferable because it contains a context sensitive // arrow function, but is considered partially inferable because property 'a' has an inferable type. function isPartiallyInferableType(type) { - return !(ts.getObjectFlags(type) & 1048576 /* NonInferrableType */) || + return !(ts.getObjectFlags(type) & 2097152 /* NonInferrableType */) || isObjectLiteralType(type) && ts.some(getPropertiesOfType(type), function (prop) { return isPartiallyInferableType(getTypeOfSymbol(prop)); }); } function createReverseMappedType(source, target, constraint) { @@ -48749,10 +49047,7 @@ var ts; // inferring a type parameter constraint. Instead, make a lower priority inference from // the full source to whatever remains in the target. For example, when inferring from // string to 'string | T', make a lower priority inference of string for T. - var savePriority = priority; - priority |= 1 /* NakedTypeVariable */; - inferFromTypes(source, target); - priority = savePriority; + inferWithPriority(source, target, 1 /* NakedTypeVariable */); return; } source = getUnionType(sources); @@ -48785,7 +49080,7 @@ var ts; // not contain anyFunctionType when we come back to this argument for its second round // of inference. Also, we exclude inferences for silentNeverType (which is used as a wildcard // when constructing types from type parameters that had no inference candidates). - if (ts.getObjectFlags(source) & 1048576 /* NonInferrableType */ || source === silentNeverType || (priority & 16 /* ReturnType */ && (source === autoType || source === autoArrayType))) { + if (ts.getObjectFlags(source) & 2097152 /* NonInferrableType */ || source === silentNeverType || (priority & 16 /* ReturnType */ && (source === autoType || source === autoArrayType))) { return; } var inference = getInferenceInfoForType(target); @@ -48852,10 +49147,7 @@ var ts; else if ((isLiteralType(source) || source.flags & 4 /* String */) && target.flags & 4194304 /* Index */) { var empty = createEmptyObjectTypeFromStringLiteral(source); contravariant = !contravariant; - var savePriority = priority; - priority |= 32 /* LiteralKeyof */; - inferFromTypes(empty, target.type); - priority = savePriority; + inferWithPriority(empty, target.type, 32 /* LiteralKeyof */); contravariant = !contravariant; } else if (source.flags & 8388608 /* IndexedAccess */ && target.flags & 8388608 /* IndexedAccess */) { @@ -48907,6 +49199,12 @@ var ts; } } } + function inferWithPriority(source, target, newPriority) { + var savePriority = priority; + priority |= newPriority; + inferFromTypes(source, target); + priority = savePriority; + } function invokeOnce(source, target, action) { var key = source.id + "," + target.id; var status = visited && visited.get(key); @@ -48972,6 +49270,18 @@ var ts; } return undefined; } + function getSingleTypeVariableFromIntersectionTypes(types) { + var typeVariable; + for (var _i = 0, types_13 = types; _i < types_13.length; _i++) { + var type = types_13[_i]; + var t = type.flags & 2097152 /* Intersection */ && ts.find(type.types, function (t) { return !!getInferenceInfoForType(t); }); + if (!t || typeVariable && t !== typeVariable) { + return undefined; + } + typeVariable = t; + } + return typeVariable; + } function inferToMultipleTypes(source, targets, targetFlags) { var typeVariableCount = 0; if (targetFlags & 1048576 /* Union */) { @@ -49001,6 +49311,16 @@ var ts; } } } + if (typeVariableCount === 0) { + // If every target is an intersection of types containing a single naked type variable, + // make a lower priority inference to that type variable. This handles inferring from + // 'A | B' to 'T & (X | Y)' where we want to infer 'A | B' for T. + var intersectionTypeVariable = getSingleTypeVariableFromIntersectionTypes(targets); + if (intersectionTypeVariable) { + inferWithPriority(source, intersectionTypeVariable, 1 /* NakedTypeVariable */); + } + return; + } // If the target has a single naked type variable and no inference circularities were // encountered above (meaning we explored the types fully), create a union of the source // types from which no inferences have been made so far and infer from that union to the @@ -49032,15 +49352,12 @@ var ts; // we want to infer string for T, not Promise | string. For intersection types // we only infer to single naked type variables. if (targetFlags & 2097152 /* Intersection */ ? typeVariableCount === 1 : typeVariableCount > 0) { - var savePriority = priority; - priority |= 1 /* NakedTypeVariable */; for (var _b = 0, targets_4 = targets; _b < targets_4.length; _b++) { var t = targets_4[_b]; if (getInferenceInfoForType(t)) { - inferFromTypes(source, t); + inferWithPriority(source, t, 1 /* NakedTypeVariable */); } } - priority = savePriority; } } function inferToMappedType(source, target, constraintType) { @@ -49061,14 +49378,12 @@ var ts; if (inference && !inference.isFixed) { var inferredType = inferTypeForHomomorphicMappedType(source, target, constraintType); if (inferredType) { - var savePriority = priority; // We assign a lower priority to inferences made from types containing non-inferrable // types because we may only have a partial result (i.e. we may have failed to make // reverse inferences for some properties). - priority |= ts.getObjectFlags(source) & 1048576 /* NonInferrableType */ ? - 4 /* PartialHomomorphicMappedType */ : 2 /* HomomorphicMappedType */; - inferFromTypes(inferredType, inference.typeParameter); - priority = savePriority; + inferWithPriority(inferredType, inference.typeParameter, ts.getObjectFlags(source) & 2097152 /* NonInferrableType */ ? + 4 /* PartialHomomorphicMappedType */ : + 2 /* HomomorphicMappedType */); } } return true; @@ -49076,10 +49391,7 @@ var ts; if (constraintType.flags & 262144 /* TypeParameter */) { // We're inferring from some source type S to a mapped type { [P in K]: X }, where K is a type // parameter. First infer from 'keyof S' to K. - var savePriority = priority; - priority |= 8 /* MappedTypeConstraint */; - inferFromTypes(getIndexType(source), constraintType); - priority = savePriority; + inferWithPriority(getIndexType(source), constraintType, 8 /* MappedTypeConstraint */); // If K is constrained to a type C, also infer to C. Thus, for a mapped type { [P in K]: X }, // where K extends keyof T, we make the same inferences as for a homomorphic mapped type // { [P in keyof T]: X }. This enables us to make meaningful inferences when the target is a @@ -49188,7 +49500,7 @@ var ts; var sourceLen = sourceSignatures.length; var targetLen = targetSignatures.length; var len = sourceLen < targetLen ? sourceLen : targetLen; - var skipParameters = !!(ts.getObjectFlags(source) & 1048576 /* NonInferrableType */); + var skipParameters = !!(ts.getObjectFlags(source) & 2097152 /* NonInferrableType */); for (var i = 0; i < len; i++) { inferFromSignature(getBaseSignature(sourceSignatures[sourceLen - len + i]), getBaseSignature(targetSignatures[targetLen - len + i]), skipParameters); } @@ -49457,6 +49769,15 @@ var ts; } return false; } + function optionalChainContainsReference(source, target) { + while (ts.isOptionalChain(source)) { + source = source.expression; + if (isMatchingReference(source, target)) { + return true; + } + } + return false; + } // Return true if target is a property access xxx.yyy, source is a property access xxx.zzz, the declared // type of xxx is a union type, and yyy is a property that is possibly a discriminant. We consider a property // a possible discriminant if its type differs in the constituents of containing union type, and if every @@ -49577,8 +49898,8 @@ var ts; } function getTypeFactsOfTypes(types) { var result = 0 /* None */; - for (var _i = 0, types_13 = types; _i < types_13.length; _i++) { - var t = types_13[_i]; + for (var _i = 0, types_14 = types; _i < types_14.length; _i++) { + var t = types_14[_i]; result |= getTypeFacts(t); } return result; @@ -49947,8 +50268,8 @@ var ts; } function isEvolvingArrayTypeList(types) { var hasEvolvingArrayType = false; - for (var _i = 0, types_14 = types; _i < types_14.length; _i++) { - var t = types_14[_i]; + for (var _i = 0, types_15 = types; _i < types_15.length; _i++) { + var t = types_15[_i]; if (!(t.flags & 131072 /* Never */)) { if (!(ts.getObjectFlags(t) & 256 /* EvolvingArray */)) { return false; @@ -50029,9 +50350,18 @@ var ts; // expressions are potential type predicate function calls. In order to avoid triggering // circularities in control flow analysis, we use getTypeOfDottedName when resolving the call // target expression of an assertion. - var funcType = node.parent.kind === 225 /* ExpressionStatement */ ? getTypeOfDottedName(node.expression, /*diagnostic*/ undefined) : - node.expression.kind !== 101 /* SuperKeyword */ ? checkOptionalExpression(node, node.expression).type : - undefined; + var funcType = void 0; + if (node.parent.kind === 225 /* ExpressionStatement */) { + funcType = getTypeOfDottedName(node.expression, /*diagnostic*/ undefined); + } + else if (node.expression.kind !== 101 /* SuperKeyword */) { + if (ts.isOptionalChain(node)) { + funcType = checkNonNullType(getOptionalExpressionType(checkExpression(node.expression), node.expression), node.expression); + } + else { + funcType = checkNonNullExpression(node.expression); + } + } var signatures = getSignaturesOfType(funcType && getApparentType(funcType) || unknownType, 0 /* Call */); var candidate = signatures.length === 1 && !signatures[0].typeParameters ? signatures[0] : ts.some(signatures, hasTypePredicateOrNeverReturnType) ? getResolvedSignature(node) : @@ -50044,6 +50374,13 @@ var ts; return !!(getTypePredicateOfSignature(signature) || signature.declaration && (getReturnTypeFromAnnotation(signature.declaration) || unknownType).flags & 131072 /* Never */); } + function getTypePredicateArgument(predicate, callExpression) { + if (predicate.kind === 1 /* Identifier */ || predicate.kind === 3 /* AssertsIdentifier */) { + return callExpression.arguments[predicate.parameterIndex]; + } + var invokedExpression = ts.skipParentheses(callExpression.expression); + return ts.isAccessExpression(invokedExpression) ? ts.skipParentheses(invokedExpression.expression) : undefined; + } function reportFlowControlError(node) { var block = ts.findAncestor(node, ts.isFunctionOrModuleBlock); var sourceFile = ts.getSourceFileOfNode(node); @@ -50059,6 +50396,11 @@ var ts; function isUnlockedReachableFlowNode(flow) { return !(flow.flags & 4096 /* PreFinally */ && flow.lock.locked) && isReachableFlowNodeWorker(flow, /*skipCacheCheck*/ false); } + function isFalseExpression(expr) { + var node = ts.skipParentheses(expr); + return node.kind === 90 /* FalseKeyword */ || node.kind === 208 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || + node.operatorToken.kind === 56 /* BarBarToken */ && isFalseExpression(node.left) && isFalseExpression(node.right)); + } function isReachableFlowNodeWorker(flow, noCacheCheck) { while (true) { if (flow === lastFlowNode) { @@ -50078,8 +50420,17 @@ var ts; } else if (flags & 512 /* Call */) { var signature = getEffectsSignature(flow.node); - if (signature && getReturnTypeOfSignature(signature).flags & 131072 /* Never */) { - return false; + if (signature) { + var predicate = getTypePredicateOfSignature(signature); + if (predicate && predicate.kind === 3 /* AssertsIdentifier */) { + var predicateArgument = flow.node.arguments[predicate.parameterIndex]; + if (predicateArgument && isFalseExpression(predicateArgument)) { + return false; + } + } + if (getReturnTypeOfSignature(signature).flags & 131072 /* Never */) { + return false; + } } flow = flow.antecedent; } @@ -50313,6 +50664,9 @@ var ts; } function narrowTypeByAssertion(type, expr) { var node = ts.skipParentheses(expr); + if (node.kind === 90 /* FalseKeyword */) { + return unreachableNeverType; + } if (node.kind === 208 /* BinaryExpression */) { if (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */) { return narrowTypeByAssertion(narrowTypeByAssertion(type, node.left), node.right); @@ -50331,7 +50685,7 @@ var ts; var flowType = getTypeAtFlowNode(flow.antecedent); var type = getTypeFromFlowType(flowType); var narrowedType = predicate.type ? narrowTypeByTypePredicate(type, predicate, flow.node, /*assumeTrue*/ true) : - predicate.kind === 3 /* AssertsIdentifier */ ? narrowTypeByAssertion(type, flow.node.arguments[predicate.parameterIndex]) : + predicate.kind === 3 /* AssertsIdentifier */ && predicate.parameterIndex >= 0 && predicate.parameterIndex < flow.node.arguments.length ? narrowTypeByAssertion(type, flow.node.arguments[predicate.parameterIndex]) : type; return narrowedType === type ? flowType : createFlowType(narrowedType, isIncomplete(flowType)); } @@ -50402,17 +50756,24 @@ var ts; if (isMatchingReference(reference, expr)) { type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } - else if (isMatchingReferenceDiscriminant(expr, type)) { - type = narrowTypeByDiscriminant(type, expr, function (t) { return narrowTypeBySwitchOnDiscriminant(t, flow.switchStatement, flow.clauseStart, flow.clauseEnd); }); - } else if (expr.kind === 203 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { type = narrowBySwitchOnTypeOf(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } - else if (containsMatchingReferenceDiscriminant(reference, expr)) { - type = declaredType; - } - else if (flow.clauseStart === flow.clauseEnd && isExhaustiveSwitchStatement(flow.switchStatement)) { - return unreachableNeverType; + else { + if (strictNullChecks) { + if (optionalChainContainsReference(expr, reference)) { + type = narrowTypeBySwitchOptionalChainContainment(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd, function (t) { return !(t.flags & (32768 /* Undefined */ | 131072 /* Never */)); }); + } + else if (expr.kind === 203 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { + type = narrowTypeBySwitchOptionalChainContainment(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd, function (t) { return !(t.flags & 131072 /* Never */ || t.flags & 128 /* StringLiteral */ && t.value === "undefined"); }); + } + } + if (isMatchingReferenceDiscriminant(expr, type)) { + type = narrowTypeByDiscriminant(type, expr, function (t) { return narrowTypeBySwitchOnDiscriminant(t, flow.switchStatement, flow.clauseStart, flow.clauseEnd); }); + } + else if (containsMatchingReferenceDiscriminant(reference, expr)) { + type = declaredType; + } } return createFlowType(type, isIncomplete(flowType)); } @@ -50420,6 +50781,7 @@ var ts; var antecedentTypes = []; var subtypeReduction = false; var seenIncomplete = false; + var bypassFlow; for (var _i = 0, _a = flow.antecedents; _i < _a.length; _i++) { var antecedent = _a[_i]; if (antecedent.flags & 4096 /* PreFinally */ && antecedent.lock.locked) { @@ -50428,6 +50790,11 @@ var ts; // in this case we should ignore this branch. continue; } + if (!bypassFlow && antecedent.flags & 128 /* SwitchClause */ && antecedent.clauseStart === antecedent.clauseEnd) { + // The antecedent is the bypass branch of a potentially exhaustive switch statement. + bypassFlow = antecedent; + continue; + } var flowType = getTypeAtFlowNode(antecedent); var type = getTypeFromFlowType(flowType); // If the type at a particular antecedent path is the declared type and the @@ -50448,6 +50815,25 @@ var ts; seenIncomplete = true; } } + if (bypassFlow) { + var flowType = getTypeAtFlowNode(bypassFlow); + var type = getTypeFromFlowType(flowType); + // If the bypass flow contributes a type we haven't seen yet and the switch statement + // isn't exhaustive, process the bypass flow type. Since exhaustiveness checks increase + // the risk of circularities, we only want to perform them when they make a difference. + if (!ts.contains(antecedentTypes, type) && !isExhaustiveSwitchStatement(bypassFlow.switchStatement)) { + if (type === declaredType && declaredType === initialType) { + return type; + } + antecedentTypes.push(type); + if (!isTypeSubsetOf(type, declaredType)) { + subtypeReduction = true; + } + if (isIncomplete(flowType)) { + seenIncomplete = true; + } + } + } return createFlowType(getUnionOrEvolvingArrayType(antecedentTypes, subtypeReduction ? 2 /* Subtype */ : 1 /* Literal */), seenIncomplete); } function getTypeAtFlowLoopLabel(flow) { @@ -50554,6 +50940,9 @@ var ts; if (isMatchingReference(reference, expr)) { return getTypeWithFacts(type, assumeTrue ? 4194304 /* Truthy */ : 8388608 /* Falsy */); } + if (strictNullChecks && assumeTrue && optionalChainContainsReference(expr, reference)) { + type = getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); + } if (isMatchingReferenceDiscriminant(expr, declaredType)) { return narrowTypeByDiscriminant(type, expr, function (t) { return getTypeWithFacts(t, assumeTrue ? 4194304 /* Truthy */ : 8388608 /* Falsy */); }); } @@ -50602,6 +50991,14 @@ var ts; if (isMatchingReference(reference, right_1)) { return narrowTypeByEquality(type, operator_1, left_1, assumeTrue); } + if (strictNullChecks) { + if (optionalChainContainsReference(left_1, reference)) { + type = narrowTypeByOptionalChainContainment(type, operator_1, right_1, assumeTrue); + } + else if (optionalChainContainsReference(right_1, reference)) { + type = narrowTypeByOptionalChainContainment(type, operator_1, left_1, assumeTrue); + } + } if (isMatchingReferenceDiscriminant(left_1, declaredType)) { return narrowTypeByDiscriminant(type, left_1, function (t) { return narrowTypeByEquality(t, operator_1, right_1, assumeTrue); }); } @@ -50625,6 +51022,15 @@ var ts; } return type; } + function narrowTypeByOptionalChainContainment(type, operator, value, assumeTrue) { + // We are in a branch of obj?.foo === value or obj?.foo !== value. We remove undefined and null from + // the type of obj if (a) the operator is === and the type of value doesn't include undefined or (b) the + // operator is !== and the type of value is undefined. + var effectiveTrue = operator === 34 /* EqualsEqualsToken */ || operator === 36 /* EqualsEqualsEqualsToken */ ? assumeTrue : !assumeTrue; + var doubleEquals = operator === 34 /* EqualsEqualsToken */ || operator === 35 /* ExclamationEqualsToken */; + var valueNonNullish = !(getTypeFacts(getTypeOfExpression(value)) & (doubleEquals ? 262144 /* EQUndefinedOrNull */ : 65536 /* EQUndefined */)); + return effectiveTrue === valueNonNullish ? getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */) : type; + } function narrowTypeByEquality(type, operator, value, assumeTrue) { if (type.flags & 1 /* Any */) { return type; @@ -50672,8 +51078,14 @@ var ts; } function narrowTypeByTypeof(type, typeOfExpr, operator, literal, assumeTrue) { // We have '==', '!=', '===', or !==' operator with 'typeof xxx' and string literal operands + if (operator === 35 /* ExclamationEqualsToken */ || operator === 37 /* ExclamationEqualsEqualsToken */) { + assumeTrue = !assumeTrue; + } var target = getReferenceCandidate(typeOfExpr.expression); if (!isMatchingReference(reference, target)) { + if (strictNullChecks && optionalChainContainsReference(target, reference) && assumeTrue === (literal.text !== "undefined")) { + return getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); + } // For a reference of the form 'x.y', a 'typeof x === ...' type guard resets the // narrowed type of 'y' to its declared type. if (containsMatchingReference(reference, target)) { @@ -50681,9 +51093,6 @@ var ts; } return type; } - if (operator === 35 /* ExclamationEqualsToken */ || operator === 37 /* ExclamationEqualsEqualsToken */) { - assumeTrue = !assumeTrue; - } if (type.flags & 1 /* Any */ && literal.text === "function") { return type; } @@ -50716,6 +51125,10 @@ var ts; return type; } } + function narrowTypeBySwitchOptionalChainContainment(type, switchStatement, clauseStart, clauseEnd, clauseCheck) { + var everyClauseChecks = clauseStart !== clauseEnd && ts.every(getSwitchClauseTypes(switchStatement).slice(clauseStart, clauseEnd), clauseCheck); + return everyClauseChecks ? getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */) : type; + } function narrowTypeBySwitchOnDiscriminant(type, switchStatement, clauseStart, clauseEnd) { // We only narrow if all case expressions specify // values with unit types, except for the case where @@ -50848,6 +51261,9 @@ var ts; function narrowTypeByInstanceof(type, expr, assumeTrue) { var left = getReferenceCandidate(expr.left); if (!isMatchingReference(reference, left)) { + if (assumeTrue && strictNullChecks && optionalChainContainsReference(left, reference)) { + return getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); + } // For a reference of the form 'x.y', an 'x instanceof T' type guard resets the // narrowed type of 'y' to its declared type. We do this because preceding 'x.y' // references might reference a different 'y' property. However, we make an exception @@ -50920,39 +51336,28 @@ var ts; } function narrowTypeByTypePredicate(type, predicate, callExpression, assumeTrue) { // Don't narrow from 'any' if the predicate type is exactly 'Object' or 'Function' - if (isTypeAny(type) && (predicate.type === globalObjectType || predicate.type === globalFunctionType)) { - return type; - } - if (predicate.kind === 1 /* Identifier */ || predicate.kind === 3 /* AssertsIdentifier */) { - var predicateArgument = callExpression.arguments[predicate.parameterIndex]; - if (predicateArgument && predicate.type) { + if (predicate.type && !(isTypeAny(type) && (predicate.type === globalObjectType || predicate.type === globalFunctionType))) { + var predicateArgument = getTypePredicateArgument(predicate, callExpression); + if (predicateArgument) { if (isMatchingReference(reference, predicateArgument)) { return getNarrowedType(type, predicate.type, assumeTrue, isTypeSubtypeOf); } + if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) && + !(getTypeFacts(predicate.type) & 65536 /* EQUndefined */)) { + return getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); + } if (containsMatchingReference(reference, predicateArgument)) { return declaredType; } } } - else { - var invokedExpression = ts.skipParentheses(callExpression.expression); - if (ts.isAccessExpression(invokedExpression) && predicate.type) { - var possibleReference = ts.skipParentheses(invokedExpression.expression); - if (isMatchingReference(reference, possibleReference)) { - return getNarrowedType(type, predicate.type, assumeTrue, isTypeSubtypeOf); - } - if (containsMatchingReference(reference, possibleReference)) { - return declaredType; - } - } - } return type; } // Narrow the given type based on the given expression having the assumed boolean value. The returned type // will be a subtype or the same type as the argument. function narrowType(type, expr, assumeTrue) { // for `a?.b`, we emulate a synthetic `a !== null && a !== undefined` condition for `a` - if (ts.isOptionalChainRoot(expr.parent) || + if (ts.isExpressionOfOptionalChainRoot(expr) || ts.isBinaryExpression(expr.parent) && expr.parent.operatorToken.kind === 60 /* QuestionQuestionToken */ && expr.parent.left === expr) { return narrowTypeByOptionality(type, expr, assumeTrue); } @@ -51233,7 +51638,24 @@ var ts; } } else if (!assumeInitialized && !(getFalsyFlags(type) & 32768 /* Undefined */) && getFalsyFlags(flowType) & 32768 /* Undefined */) { - error(node, ts.Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol)); + var diag = error(node, ts.Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol)); + // See GH:32846 - if the user is using a variable whose type is () => T1 | ... | undefined + // they may have meant to specify the type as (() => T1 | ...) | undefined + // This is assumed if: the type is a FunctionType, the return type is a Union, the last constituent of + // the union is `undefined` + if (type.symbol && type.symbol.declarations.length === 1 && ts.isFunctionTypeNode(type.symbol.declarations[0])) { + var funcTypeNode = type.symbol.declarations[0]; + var returnType = getReturnTypeFromAnnotation(funcTypeNode); + if (returnType && returnType.flags & 1048576 /* Union */) { + var unionTypes_3 = funcTypeNode.type.types; + if (unionTypes_3 && unionTypes_3[unionTypes_3.length - 1].kind === 145 /* UndefinedKeyword */) { + var parenedFuncType = ts.getMutableClone(funcTypeNode); + // Highlight to the end of the second to last constituent of the union + parenedFuncType.end = unionTypes_3[unionTypes_3.length - 2].end; + ts.addRelatedInfo(diag, ts.createDiagnosticForNode(parenedFuncType, ts.Diagnostics.Did_you_mean_to_parenthesize_this_function_type)); + } + } + } // Return the declared type to reduce follow-on errors return type; } @@ -52013,18 +52435,22 @@ var ts; return undefined; } // In a typed function call, an argument or substitution expression is contextually typed by the type of the corresponding parameter. - function getContextualTypeForArgument(callTarget, arg) { + function getContextualTypeForArgument(callTarget, arg, contextFlags) { var args = getEffectiveCallArguments(callTarget); var argIndex = args.indexOf(arg); // -1 for e.g. the expression of a CallExpression, or the tag of a TaggedTemplateExpression - return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex); + return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex, contextFlags); } - function getContextualTypeForArgumentAtIndex(callTarget, argIndex) { + function getContextualTypeForArgumentAtIndex(callTarget, argIndex, contextFlags) { // If we're already in the process of resolving the given signature, don't resolve again as // that could cause infinite recursion. Instead, return anySignature. var signature = getNodeLinks(callTarget).resolvedSignature === resolvingSignature ? resolvingSignature : getResolvedSignature(callTarget); if (ts.isJsxOpeningLikeElement(callTarget) && argIndex === 0) { return getEffectiveFirstArgumentForJsxSignature(signature, callTarget); } + if (contextFlags && contextFlags & 4 /* Completion */ && signature.target) { + var baseSignature = getBaseSignature(signature.target); + return intersectTypes(getTypeAtPosition(signature, argIndex), getTypeAtPosition(baseSignature, argIndex)); + } return getTypeAtPosition(signature, argIndex); } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { @@ -52383,7 +52809,7 @@ var ts; } /* falls through */ case 196 /* NewExpression */: - return getContextualTypeForArgument(parent, node); + return getContextualTypeForArgument(parent, node, contextFlags); case 198 /* TypeAssertionExpression */: case 216 /* AsExpression */: return ts.isConstTypeReference(parent.type) ? undefined : getTypeFromTypeNode(parent.type); @@ -52598,8 +53024,8 @@ var ts; } var signatureList; var types = type.types; - for (var _i = 0, types_15 = types; _i < types_15.length; _i++) { - var current = types_15[_i]; + for (var _i = 0, types_16 = types; _i < types_16.length; _i++) { + var current = types_16[_i]; var signature = getContextualCallSignature(current, node); if (signature) { if (!signatureList) { @@ -52700,7 +53126,7 @@ var ts; var literalType = type.literalType; if (!literalType) { literalType = type.literalType = cloneTypeReference(type); - literalType.objectFlags |= 65536 /* ArrayLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */; + literalType.objectFlags |= 65536 /* ArrayLiteral */ | 1048576 /* ContainsObjectOrArrayLiteral */; } return literalType; } @@ -52837,7 +53263,7 @@ var ts; checkTypeAssignableTo(type, getTypeFromTypeNode(enumTag.typeExpression), memberDecl); } } - objectFlags |= ts.getObjectFlags(type) & 1835008 /* PropagatingFlags */; + objectFlags |= ts.getObjectFlags(type) & 3670016 /* PropagatingFlags */; var nameType = computedNameType && isTypeUsableAsPropertyName(computedNameType) ? computedNameType : undefined; var prop = nameType ? createSymbol(4 /* Property */ | member.flags, getPropertyNameFromType(nameType), checkFlags | 4096 /* Late */) : @@ -52946,7 +53372,7 @@ var ts; var stringIndexInfo = hasComputedStringProperty ? getObjectLiteralIndexInfo(node, offset, propertiesArray, 0 /* String */) : undefined; var numberIndexInfo = hasComputedNumberProperty ? getObjectLiteralIndexInfo(node, offset, propertiesArray, 1 /* Number */) : undefined; var result = createAnonymousType(node.symbol, propertiesTable, ts.emptyArray, ts.emptyArray, stringIndexInfo, numberIndexInfo); - result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */; + result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 1048576 /* ContainsObjectOrArrayLiteral */; if (isJSObjectLiteral) { result.objectFlags |= 16384 /* JSLiteral */; } @@ -53044,7 +53470,7 @@ var ts; var member = attributeDecl.symbol; if (ts.isJsxAttribute(attributeDecl)) { var exprType = checkJsxAttribute(attributeDecl, checkMode); - objectFlags |= ts.getObjectFlags(exprType) & 1835008 /* PropagatingFlags */; + objectFlags |= ts.getObjectFlags(exprType) & 3670016 /* PropagatingFlags */; var attributeSymbol = createSymbol(4 /* Property */ | 33554432 /* Transient */ | member.flags, member.escapedName); attributeSymbol.declarations = member.declarations; attributeSymbol.parent = member.parent; @@ -53124,7 +53550,7 @@ var ts; function createJsxAttributesType() { objectFlags |= freshObjectLiteralFlag; var result = createAnonymousType(attributes.symbol, attributesTable, ts.emptyArray, ts.emptyArray, /*stringIndexInfo*/ undefined, /*numberIndexInfo*/ undefined); - result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */; + result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 1048576 /* ContainsObjectOrArrayLiteral */; return result; } } @@ -53596,8 +54022,8 @@ var ts; function symbolHasNonMethodDeclaration(symbol) { return !!forEachProperty(symbol, function (prop) { return !(prop.flags & 8192 /* Method */); }); } - function checkNonNullExpression(node, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic) { - return checkNonNullType(checkExpression(node), node, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic); + function checkNonNullExpression(node) { + return checkNonNullType(checkExpression(node), node); } function isNullableType(type) { return !!((strictNullChecks ? getFalsyFlags(type) : type.flags) & 98304 /* Nullable */); @@ -53605,22 +54031,34 @@ var ts; function getNonNullableTypeIfNeeded(type) { return isNullableType(type) ? getNonNullableType(type) : type; } - function checkNonNullType(type, node, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic) { + function reportObjectPossiblyNullOrUndefinedError(node, flags) { + error(node, flags & 32768 /* Undefined */ ? flags & 65536 /* Null */ ? + ts.Diagnostics.Object_is_possibly_null_or_undefined : + ts.Diagnostics.Object_is_possibly_undefined : + ts.Diagnostics.Object_is_possibly_null); + } + function reportCannotInvokePossiblyNullOrUndefinedError(node, flags) { + error(node, flags & 32768 /* Undefined */ ? flags & 65536 /* Null */ ? + ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null_or_undefined : + ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_undefined : + ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null); + } + function checkNonNullTypeWithReporter(type, node, reportError) { if (strictNullChecks && type.flags & 2 /* Unknown */) { error(node, ts.Diagnostics.Object_is_of_type_unknown); return errorType; } var kind = (strictNullChecks ? getFalsyFlags(type) : type.flags) & 98304 /* Nullable */; if (kind) { - error(node, kind & 32768 /* Undefined */ ? kind & 65536 /* Null */ ? - (nullOrUndefinedDiagnostic || ts.Diagnostics.Object_is_possibly_null_or_undefined) : - (undefinedDiagnostic || ts.Diagnostics.Object_is_possibly_undefined) : - (nullDiagnostic || ts.Diagnostics.Object_is_possibly_null)); + reportError(node, kind); var t = getNonNullableType(type); return t.flags & (98304 /* Nullable */ | 131072 /* Never */) ? errorType : t; } return type; } + function checkNonNullType(type, node) { + return checkNonNullTypeWithReporter(type, node, reportObjectPossiblyNullOrUndefinedError); + } function checkNonNullNonVoidType(type, node) { var nonNullType = checkNonNullType(type, node); if (nonNullType !== errorType && nonNullType.flags & 16384 /* Void */) { @@ -53629,10 +54067,16 @@ var ts; return nonNullType; } function checkPropertyAccessExpression(node) { - return checkPropertyAccessExpressionOrQualifiedName(node, node.expression, node.name); + return node.flags & 32 /* OptionalChain */ ? checkPropertyAccessChain(node) : + checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name); + } + function checkPropertyAccessChain(node) { + var leftType = checkExpression(node.expression); + var nonOptionalType = getOptionalExpressionType(leftType, node.expression); + return propagateOptionalTypeMarker(checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullType(nonOptionalType, node.expression), node.name), node, nonOptionalType !== leftType); } function checkQualifiedName(node) { - return checkPropertyAccessExpressionOrQualifiedName(node, node.left, node.right); + return checkPropertyAccessExpressionOrQualifiedName(node, node.left, checkNonNullExpression(node.left), node.right); } function isMethodAccessForCall(node) { while (node.parent.kind === 199 /* ParenthesizedExpression */) { @@ -53640,8 +54084,7 @@ var ts; } return ts.isCallOrNewExpression(node.parent) && node.parent.expression === node; } - function checkPropertyAccessExpressionOrQualifiedName(node, left, right) { - var _a = checkOptionalExpression(node, left), isOptional = _a.isOptional, leftType = _a.type; + function checkPropertyAccessExpressionOrQualifiedName(node, left, leftType, right) { var parentSymbol = getNodeLinks(left).resolvedSymbol; var assignmentKind = ts.getAssignmentTargetKind(node); var apparentType = getApparentType(assignmentKind !== 0 /* None */ || isMethodAccessForCall(node) ? getWidenedType(leftType) : leftType); @@ -53694,7 +54137,7 @@ var ts; } propType = getConstraintForLocation(getTypeOfSymbol(prop), node); } - return propagateOptionalTypeMarker(getFlowTypeOfAccessExpression(node, prop, propType, right), isOptional); + return getFlowTypeOfAccessExpression(node, prop, propType, right); } function getFlowTypeOfAccessExpression(node, prop, propType, errorNode) { // Only compute control flow type if this is a property access expression that isn't an @@ -54016,7 +54459,15 @@ var ts; return false; } function checkIndexedAccess(node) { - var _a = checkOptionalExpression(node, node.expression), isOptional = _a.isOptional, exprType = _a.type; + return node.flags & 32 /* OptionalChain */ ? checkElementAccessChain(node) : + checkElementAccessExpression(node, checkNonNullExpression(node.expression)); + } + function checkElementAccessChain(node) { + var exprType = checkExpression(node.expression); + var nonOptionalType = getOptionalExpressionType(exprType, node.expression); + return propagateOptionalTypeMarker(checkElementAccessExpression(node, checkNonNullType(nonOptionalType, node.expression)), node, nonOptionalType !== exprType); + } + function checkElementAccessExpression(node, exprType) { var objectType = ts.getAssignmentTargetKind(node) !== 0 /* None */ || isMethodAccessForCall(node) ? getWidenedType(exprType) : exprType; var indexExpression = node.argumentExpression; var indexType = checkExpression(indexExpression); @@ -54032,7 +54483,7 @@ var ts; 2 /* Writing */ | (isGenericObjectType(objectType) && !isThisTypeParameter(objectType) ? 1 /* NoIndexSignatures */ : 0) : 0 /* None */; var indexedAccessType = getIndexedAccessTypeOrUndefined(objectType, effectiveIndexType, node, accessFlags) || errorType; - return propagateOptionalTypeMarker(checkIndexedAccessIndexType(getFlowTypeOfAccessExpression(node, indexedAccessType.symbol, indexedAccessType, indexExpression), node), isOptional); + return checkIndexedAccessIndexType(getFlowTypeOfAccessExpression(node, indexedAccessType.symbol, indexedAccessType, indexExpression), node); } function checkThatExpressionIsProperSymbolReference(expression, expressionType, reportError) { if (expressionType === errorType) { @@ -54103,7 +54554,7 @@ var ts; // interface B extends A { (x: 'foo'): string } // const b: B; // b('foo') // <- here overloads should be processed as [(x:'foo'): string, (x: string): void] - function reorderCandidates(signatures, result, isOptionalCall) { + function reorderCandidates(signatures, result, callChainFlags) { var lastParent; var lastSymbol; var cutoffIndex = 0; @@ -54133,7 +54584,7 @@ var ts; lastSymbol = symbol; // specialized signatures always need to be placed before non-specialized signatures regardless // of the cutoff position; see GH#1133 - if (signature.hasLiteralTypes) { + if (signatureHasLiteralTypes(signature)) { specializedIndex++; spliceIndex = specializedIndex; // The cutoff index always needs to be greater than or equal to the specialized signature index @@ -54144,7 +54595,7 @@ var ts; else { spliceIndex = index; } - result.splice(spliceIndex, 0, isOptionalCall ? createOptionalCallSignature(signature) : signature); + result.splice(spliceIndex, 0, callChainFlags ? getOptionalCallSignature(signature, callChainFlags) : signature); } } function isSpreadArgument(arg) { @@ -54228,7 +54679,7 @@ var ts; // the declared number of type parameters, the call has an incorrect arity. var numTypeParameters = ts.length(signature.typeParameters); var minTypeArgumentCount = getMinTypeArgumentCount(signature.typeParameters); - return !typeArguments || + return !ts.some(typeArguments) || (typeArguments.length >= minTypeArgumentCount && typeArguments.length <= numTypeParameters); } // If type has a single call signature and no other members, return that signature. Otherwise, return undefined. @@ -54439,7 +54890,19 @@ var ts; // If the signature's 'this' type is voidType, then the check is skipped -- anything is compatible. // If the expression is a new expression, then the check is skipped. var thisArgumentNode = getThisArgumentOfCall(node); - var thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType; + var thisArgumentType = void 0; + if (thisArgumentNode) { + thisArgumentType = checkExpression(thisArgumentNode); + if (ts.isOptionalChainRoot(thisArgumentNode.parent)) { + thisArgumentType = getNonNullableType(thisArgumentType); + } + else if (ts.isOptionalChain(thisArgumentNode.parent)) { + thisArgumentType = removeOptionalTypeMarker(thisArgumentType); + } + } + else { + thisArgumentType = voidType; + } var errorNode = reportErrors ? (thisArgumentNode || node) : undefined; var headMessage_1 = ts.Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1; if (!checkTypeRelatedTo(thisArgumentType, thisType, relation, errorNode, headMessage_1, containingMessageChain, errorOutputContainer)) { @@ -54666,7 +55129,7 @@ var ts; if (closestSignature && getMinArgumentCount(closestSignature) > argCount && closestSignature.declaration) { var paramDecl = closestSignature.declaration.parameters[closestSignature.thisParameter ? argCount + 1 : argCount]; if (paramDecl) { - related = ts.createDiagnosticForNode(paramDecl, ts.isBindingPattern(paramDecl.name) ? ts.Diagnostics.An_argument_matching_this_binding_pattern_was_not_provided : ts.Diagnostics.An_argument_for_0_was_not_provided, !paramDecl.name ? argCount : !ts.isBindingPattern(paramDecl.name) ? ts.idText(getFirstIdentifier(paramDecl.name)) : undefined); + related = ts.createDiagnosticForNode(paramDecl, ts.isBindingPattern(paramDecl.name) ? ts.Diagnostics.An_argument_matching_this_binding_pattern_was_not_provided : ts.Diagnostics.An_argument_for_0_was_not_provided, !paramDecl.name ? argCount : !ts.isBindingPattern(paramDecl.name) ? ts.idText(ts.getFirstIdentifier(paramDecl.name)) : undefined); } } if (min < argCount && argCount < max) { @@ -54722,7 +55185,7 @@ var ts; } return ts.createDiagnosticForNodeArray(ts.getSourceFileOfNode(node), typeArguments, ts.Diagnostics.Expected_0_type_arguments_but_got_1, belowArgCount === -Infinity ? aboveArgCount : belowArgCount, argCount); } - function resolveCall(node, signatures, candidatesOutArray, checkMode, isOptionalCall, fallbackError) { + function resolveCall(node, signatures, candidatesOutArray, checkMode, callChainFlags, fallbackError) { var isTaggedTemplate = node.kind === 197 /* TaggedTemplateExpression */; var isDecorator = node.kind === 156 /* Decorator */; var isJsxOpeningOrSelfClosingElement = ts.isJsxOpeningLikeElement(node); @@ -54737,7 +55200,7 @@ var ts; } var candidates = candidatesOutArray || []; // reorderCandidates fills up the candidates array directly - reorderCandidates(signatures, candidates, isOptionalCall); + reorderCandidates(signatures, candidates, callChainFlags); if (!candidates.length) { if (reportErrors) { diagnostics.add(getDiagnosticForCallNode(node, ts.Diagnostics.Call_target_does_not_contain_any_signatures)); @@ -54899,7 +55362,7 @@ var ts; candidateForTypeArgumentError = undefined; if (isSingleNonGenericCandidate) { var candidate = candidates[0]; - if (typeArguments || !hasCorrectArity(node, args, candidate, signatureHelpTrailingComma)) { + if (ts.some(typeArguments) || !hasCorrectArity(node, args, candidate, signatureHelpTrailingComma)) { return undefined; } if (getSignatureApplicabilityError(node, args, candidate, relation, 0 /* Normal */, /*reportErrors*/ false, /*containingMessageChain*/ undefined)) { @@ -54917,7 +55380,7 @@ var ts; var inferenceContext = void 0; if (candidate.typeParameters) { var typeArgumentTypes = void 0; - if (typeArguments) { + if (ts.some(typeArguments)) { typeArgumentTypes = checkTypeArguments(candidate, typeArguments, /*reportErrors*/ false); if (!typeArgumentTypes) { candidateForTypeArgumentError = candidate; @@ -54992,34 +55455,34 @@ var ts; var _a = ts.minAndMax(candidates, getNumNonRestParameters), minArgumentCount = _a.min, maxNonRestParam = _a.max; var parameters = []; var _loop_15 = function (i) { - var symbols = ts.mapDefined(candidates, function (_a) { - var parameters = _a.parameters, hasRestParameter = _a.hasRestParameter; - return hasRestParameter ? - i < parameters.length - 1 ? parameters[i] : ts.last(parameters) : - i < parameters.length ? parameters[i] : undefined; - }); + var symbols = ts.mapDefined(candidates, function (s) { return signatureHasRestParameter(s) ? + i < s.parameters.length - 1 ? s.parameters[i] : ts.last(s.parameters) : + i < s.parameters.length ? s.parameters[i] : undefined; }); ts.Debug.assert(symbols.length !== 0); parameters.push(createCombinedSymbolFromTypes(symbols, ts.mapDefined(candidates, function (candidate) { return tryGetTypeAtPosition(candidate, i); }))); }; for (var i = 0; i < maxNonRestParam; i++) { _loop_15(i); } - var restParameterSymbols = ts.mapDefined(candidates, function (c) { return c.hasRestParameter ? ts.last(c.parameters) : undefined; }); - var hasRestParameter = restParameterSymbols.length !== 0; - if (hasRestParameter) { + var restParameterSymbols = ts.mapDefined(candidates, function (c) { return signatureHasRestParameter(c) ? ts.last(c.parameters) : undefined; }); + var flags = 0 /* None */; + if (restParameterSymbols.length !== 0) { var type = createArrayType(getUnionType(ts.mapDefined(candidates, tryGetRestTypeOfSignature), 2 /* Subtype */)); parameters.push(createCombinedSymbolForOverloadFailure(restParameterSymbols, type)); + flags |= 1 /* HasRestParameter */; + } + if (candidates.some(signatureHasLiteralTypes)) { + flags |= 2 /* HasLiteralTypes */; } return createSignature(candidates[0].declaration, /*typeParameters*/ undefined, // Before calling this we tested for `!candidates.some(c => !!c.typeParameters)`. thisParameter, parameters, /*resolvedReturnType*/ getIntersectionType(candidates.map(getReturnTypeOfSignature)), - /*typePredicate*/ undefined, minArgumentCount, hasRestParameter, - /*hasLiteralTypes*/ candidates.some(function (c) { return c.hasLiteralTypes; })); + /*typePredicate*/ undefined, minArgumentCount, flags); } function getNumNonRestParameters(signature) { var numParams = signature.parameters.length; - return signature.hasRestParameter ? numParams - 1 : numParams; + return signatureHasRestParameter(signature) ? numParams - 1 : numParams; } function createCombinedSymbolFromTypes(sources, types) { return createCombinedSymbolForOverloadFailure(sources, getUnionType(types, 2 /* Subtype */)); @@ -55095,12 +55558,24 @@ var ts; var baseTypeNode = ts.getEffectiveBaseTypeNode(ts.getContainingClass(node)); if (baseTypeNode) { var baseConstructors = getInstantiatedConstructorsForTypeArguments(superType, baseTypeNode.typeArguments, baseTypeNode); - return resolveCall(node, baseConstructors, candidatesOutArray, checkMode, /*isOptional*/ false); + return resolveCall(node, baseConstructors, candidatesOutArray, checkMode, 0 /* None */); } } return resolveUntypedCall(node); } - var _b = checkOptionalExpression(node, node.expression, ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null, ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_undefined, ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null_or_undefined), isOptional = _b.isOptional, funcType = _b.type; + var callChainFlags; + var funcType = checkExpression(node.expression); + if (ts.isCallChain(node)) { + var nonOptionalType = getOptionalExpressionType(funcType, node.expression); + callChainFlags = nonOptionalType === funcType ? 0 /* None */ : + ts.isOutermostOptionalChain(node) ? 8 /* IsOuterCallChain */ : + 4 /* IsInnerCallChain */; + funcType = nonOptionalType; + } + else { + callChainFlags = 0 /* None */; + } + funcType = checkNonNullTypeWithReporter(funcType, node.expression, reportCannotInvokePossiblyNullOrUndefinedError); if (funcType === silentNeverType) { return silentNeverSignature; } @@ -55166,7 +55641,7 @@ var ts; error(node, ts.Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType)); return resolveErrorCall(node); } - return resolveCall(node, callSignatures, candidatesOutArray, checkMode, isOptional); + return resolveCall(node, callSignatures, candidatesOutArray, checkMode, callChainFlags); } function isGenericFunctionReturningFunction(signature) { return !!(signature.typeParameters && isFunctionType(getReturnTypeOfSignature(signature))); @@ -55229,7 +55704,7 @@ var ts; error(node, ts.Diagnostics.Cannot_create_an_instance_of_an_abstract_class); return resolveErrorCall(node); } - return resolveCall(node, constructSignatures, candidatesOutArray, checkMode, /*isOptional*/ false); + return resolveCall(node, constructSignatures, candidatesOutArray, checkMode, 0 /* None */); } // If expressionType's apparent type is an object type with no construct signatures but // one or more call signatures, the expression is processed as a function call. A compile-time @@ -55237,7 +55712,7 @@ var ts; // operation is Any. It is an error to have a Void this type. var callSignatures = getSignaturesOfType(expressionType, 0 /* Call */); if (callSignatures.length) { - var signature = resolveCall(node, callSignatures, candidatesOutArray, checkMode, /*isOptional*/ false); + var signature = resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */); if (!noImplicitAny) { if (signature.declaration && !isJSConstructor(signature.declaration) && getReturnTypeOfSignature(signature) !== voidType) { error(node, ts.Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword); @@ -55322,8 +55797,8 @@ var ts; if (apparentType.flags & 1048576 /* Union */) { var types = apparentType.types; var hasSignatures = false; - for (var _i = 0, types_16 = types; _i < types_16.length; _i++) { - var constituent = types_16[_i]; + for (var _i = 0, types_17 = types; _i < types_17.length; _i++) { + var constituent = types_17[_i]; var signatures = getSignaturesOfType(constituent, kind); if (signatures.length !== 0) { hasSignatures = true; @@ -55414,7 +55889,7 @@ var ts; invocationError(node.tag, apparentType, 0 /* Call */); return resolveErrorCall(node); } - return resolveCall(node, callSignatures, candidatesOutArray, checkMode, /*isOptional*/ false); + return resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */); } /** * Gets the localized diagnostic head message to use for errors when resolving a decorator as a call expression. @@ -55467,7 +55942,7 @@ var ts; invocationErrorRecovery(apparentType, 0 /* Call */, diag); return resolveErrorCall(node); } - return resolveCall(node, callSignatures, candidatesOutArray, checkMode, /*isOptional*/ false, headMessage); + return resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */, headMessage); } function createSignatureForJSXIntrinsic(node, result) { var namespace = getJsxNamespaceAt(node); @@ -55482,9 +55957,7 @@ var ts; return createSignature(declaration, /*typeParameters*/ undefined, /*thisParameter*/ undefined, [parameterSymbol], typeSymbol ? getDeclaredTypeOfSymbol(typeSymbol) : errorType, - /*returnTypePredicate*/ undefined, 1, - /*hasRestparameter*/ false, - /*hasLiteralTypes*/ false); + /*returnTypePredicate*/ undefined, 1, 0 /* None */); } function resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode) { if (isJsxIntrinsicIdentifier(node.tagName)) { @@ -55507,7 +55980,7 @@ var ts; error(node.tagName, ts.Diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, ts.getTextOfNode(node.tagName)); return resolveErrorCall(node); } - return resolveCall(node, signatures, candidatesOutArray, checkMode, /*isOptional*/ false); + return resolveCall(node, signatures, candidatesOutArray, checkMode, 0 /* None */); } /** * Sometimes, we have a decorator that could accept zero arguments, @@ -55517,7 +55990,7 @@ var ts; function isPotentiallyUncalledDecorator(decorator, signatures) { return signatures.length && ts.every(signatures, function (signature) { return signature.minArgumentCount === 0 && - !signature.hasRestParameter && + !signatureHasRestParameter(signature) && signature.parameters.length < getDecoratorArgumentCount(decorator, signature); }); } @@ -55588,7 +56061,7 @@ var ts; return false; } function mergeJSSymbols(target, source) { - if (source && (ts.hasEntries(source.exports) || ts.hasEntries(source.members))) { + if (source) { var links = getSymbolLinks(source); if (!links.inferredClassSymbol || !links.inferredClassSymbol.has("" + getSymbolId(target))) { var inferred = isTransientSymbol(target) ? target : cloneSymbol(target); @@ -55898,7 +56371,7 @@ var ts; return type; } function getParameterNameAtPosition(signature, pos) { - var paramCount = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + var paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); if (pos < paramCount) { return signature.parameters[pos].escapedName; } @@ -55915,11 +56388,11 @@ var ts; return tryGetTypeAtPosition(signature, pos) || anyType; } function tryGetTypeAtPosition(signature, pos) { - var paramCount = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + var paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); if (pos < paramCount) { return getTypeOfParameter(signature.parameters[pos]); } - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { // We want to return the value undefined for an out of bounds parameter position, // so we need to check bounds here before calling getIndexedAccessType (which // otherwise would return the type 'undefined'). @@ -55954,7 +56427,7 @@ var ts; } function getParameterCount(signature) { var length = signature.parameters.length; - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var restType = getTypeOfSymbol(signature.parameters[length - 1]); if (isTupleType(restType)) { return length + getTypeArguments(restType).length - 1; @@ -55963,7 +56436,7 @@ var ts; return length; } function getMinArgumentCount(signature) { - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); if (isTupleType(restType)) { var minLength = restType.target.minLength; @@ -55975,14 +56448,14 @@ var ts; return signature.minArgumentCount; } function hasEffectiveRestParameter(signature) { - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); return !isTupleType(restType) || restType.target.hasRestElement; } return false; } function getEffectiveRestType(signature) { - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); return isTupleType(restType) ? getRestArrayTypeOfTupleType(restType) : restType; } @@ -55999,7 +56472,7 @@ var ts; return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : fallbackType; } function inferFromAnnotatedParameters(signature, context, inferenceContext) { - var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + var len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); for (var i = 0; i < len; i++) { var declaration = signature.parameters[i].valueDeclaration; if (declaration.type) { @@ -56032,7 +56505,7 @@ var ts; assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter)); } } - var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + var len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); for (var i = 0; i < len; i++) { var parameter = signature.parameters[i]; if (!ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) { @@ -56040,7 +56513,7 @@ var ts; assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType); } } - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { // parameter might be a transient symbol generated by use of `arguments` in the function body. var parameter = ts.last(signature.parameters); if (isTransientSymbol(parameter) || !ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) { @@ -56317,8 +56790,8 @@ var ts; var witnesses = getSwitchClauseTypeOfWitnesses(node); // notEqualFacts states that the type of the switched value is not equal to every type in the switch. var notEqualFacts_1 = getFactsFromTypeofSwitch(0, 0, witnesses, /*hasDefault*/ true); - var type_4 = getBaseConstraintOfType(operandType) || operandType; - return !!(filterType(type_4, function (t) { return (getTypeFacts(t) & notEqualFacts_1) === notEqualFacts_1; }).flags & 131072 /* Never */); + var type_3 = getBaseConstraintOfType(operandType) || operandType; + return !!(filterType(type_3, function (t) { return (getTypeFacts(t) & notEqualFacts_1) === notEqualFacts_1; }).flags & 131072 /* Never */); } var type = getTypeOfExpression(node.expression); if (!isLiteralType(type)) { @@ -56445,9 +56918,9 @@ var ts; return links.contextFreeType; } var returnType = getReturnTypeFromBody(node, checkMode); - var returnOnlySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, returnType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); + var returnOnlySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, returnType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */); var returnOnlyType = createAnonymousType(node.symbol, emptySymbols, [returnOnlySignature], ts.emptyArray, undefined, undefined); - returnOnlyType.objectFlags |= 1048576 /* NonInferrableType */; + returnOnlyType.objectFlags |= 2097152 /* NonInferrableType */; return links.contextFreeType = returnOnlyType; } return anyFunctionType; @@ -56676,8 +57149,7 @@ var ts; var span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos); var diagnostic = ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.await_expression_is_only_allowed_within_an_async_function); var func = ts.getContainingFunction(node); - if (func && func.kind !== 161 /* Constructor */) { - ts.Debug.assert((ts.getFunctionFlags(func) & 2 /* Async */) === 0, "Enclosing function should never be an async function."); + if (func && func.kind !== 161 /* Constructor */ && (ts.getFunctionFlags(func) & 2 /* Async */) === 0) { var relatedInfo = ts.createDiagnosticForNode(func, ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async); ts.addRelatedInfo(diagnostic, relatedInfo); } @@ -56778,8 +57250,8 @@ var ts; } if (type.flags & 3145728 /* UnionOrIntersection */) { var types = type.types; - for (var _i = 0, types_17 = types; _i < types_17.length; _i++) { - var t = types_17[_i]; + for (var _i = 0, types_18 = types; _i < types_18.length; _i++) { + var t = types_18[_i]; if (maybeTypeOfKind(t, kind)) { return true; } @@ -57413,25 +57885,10 @@ var ts; } return [effectiveLeft, effectiveRight]; } - function isYieldExpressionInClass(node) { - var current = node; - var parent = node.parent; - while (parent) { - if (ts.isFunctionLike(parent) && current === parent.body) { - return false; - } - else if (ts.isClassLike(current)) { - return true; - } - current = parent; - parent = parent.parent; - } - return false; - } function checkYieldExpression(node) { // Grammar checking if (produceDiagnostics) { - if (!(node.flags & 8192 /* YieldContext */) || isYieldExpressionInClass(node)) { + if (!(node.flags & 8192 /* YieldContext */)) { grammarErrorOnFirstToken(node, ts.Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body); } if (isInParameterInitializerBeforeContainingFunction(node)) { @@ -57767,6 +58224,18 @@ var ts; } } } + function getReturnTypeOfSingleNonGenericCallSignature(funcType) { + var signature = getSingleCallSignature(funcType); + if (signature && !signature.typeParameters) { + return getReturnTypeOfSignature(signature); + } + } + function getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) { + var funcType = checkExpression(expr.expression); + var nonOptionalType = getOptionalExpressionType(funcType, expr.expression); + var returnType = getReturnTypeOfSingleNonGenericCallSignature(funcType); + return returnType && propagateOptionalTypeMarker(returnType, expr, nonOptionalType !== funcType); + } /** * Returns the type of an expression. Unlike checkExpression, this function is simply concerned * with computing the type and may not fully check all contained sub-expressions for errors. @@ -57778,10 +58247,10 @@ var ts; // Optimize for the common case of a call to a function with a single non-generic call // signature where we can just fetch the return type without checking the arguments. if (ts.isCallExpression(expr) && expr.expression.kind !== 101 /* SuperKeyword */ && !ts.isRequireCall(expr, /*checkArgumentIsStringLiteralLike*/ true) && !isSymbolOrSymbolForCall(expr)) { - var _a = checkOptionalExpression(expr, expr.expression), isOptional = _a.isOptional, funcType = _a.type; - var signature = getSingleCallSignature(funcType); - if (signature && !signature.typeParameters) { - return propagateOptionalTypeMarker(getReturnTypeOfSignature(signature), isOptional); + var type = ts.isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : + getReturnTypeOfSingleNonGenericCallSignature(checkNonNullExpression(expr.expression)); + if (type) { + return type; } } else if (ts.isAssertionExpression(expr) && !ts.isConstTypeReference(expr.type)) { @@ -57831,7 +58300,7 @@ var ts; (node.parent.kind === 194 /* ElementAccessExpression */ && node.parent.expression === node) || ((node.kind === 75 /* Identifier */ || node.kind === 152 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || (node.parent.kind === 171 /* TypeQuery */ && node.parent.exprName === node)) || - (node.parent.kind === 261 /* ExportSpecifier */ && (compilerOptions.preserveConstEnums || node.flags & 8388608 /* Ambient */)); // We allow reexporting const enums + (node.parent.kind === 261 /* ExportSpecifier */); // We allow reexporting const enums if (!ok) { error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query); } @@ -58035,7 +58504,7 @@ var ts; } else { if (typePredicate.parameterIndex >= 0) { - if (signature.hasRestParameter && typePredicate.parameterIndex === signature.parameters.length - 1) { + if (signatureHasRestParameter(signature) && typePredicate.parameterIndex === signature.parameters.length - 1) { error(parameterName, ts.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); } else { @@ -59210,7 +59679,7 @@ var ts; return; } // Verify there is no local declaration that could collide with the promise constructor. - var rootName = promiseConstructorName && getFirstIdentifier(promiseConstructorName); + var rootName = promiseConstructorName && ts.getFirstIdentifier(promiseConstructorName); var collidingSymbol = getSymbol(node.locals, rootName.escapedText, 111551 /* Value */); if (collidingSymbol) { error(collidingSymbol.valueDeclaration, ts.Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, ts.idText(rootName), ts.entityNameToString(promiseConstructorName)); @@ -59267,7 +59736,7 @@ var ts; function markEntityNameOrEntityExpressionAsReference(typeName) { if (!typeName) return; - var rootName = getFirstIdentifier(typeName); + var rootName = ts.getFirstIdentifier(typeName); var meaning = (typeName.kind === 75 /* Identifier */ ? 788968 /* Type */ : 1920 /* Namespace */) | 2097152 /* Alias */; var rootSymbol = resolveName(rootName, rootName.escapedText, meaning, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isRefernce*/ true); if (rootSymbol @@ -59307,8 +59776,8 @@ var ts; } function getEntityNameForDecoratorMetadataFromTypeList(types) { var commonEntityName; - for (var _i = 0, types_18 = types; _i < types_18.length; _i++) { - var typeNode = types_18[_i]; + for (var _i = 0, types_19 = types; _i < types_19.length; _i++) { + var typeNode = types_19[_i]; while (typeNode.kind === 181 /* ParenthesizedType */) { typeNode = typeNode.type; // Skip parens if need be } @@ -61083,10 +61552,7 @@ var ts; firstDefaultClause = clause; } else { - var sourceFile = ts.getSourceFileOfNode(node); - var start = ts.skipTrivia(sourceFile.text, clause.pos); - var end = clause.statements.length > 0 ? clause.statements[0].pos : clause.end; - grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement); + grammarErrorOnNode(clause, ts.Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement); hasDuplicateDefaultClause = true; } } @@ -61107,6 +61573,9 @@ var ts; } } ts.forEach(clause.statements, checkSourceElement); + if (compilerOptions.noFallthroughCasesInSwitch && clause.fallthroughFlowNode && isReachableFlowNode(clause.fallthroughFlowNode)) { + error(clause, ts.Diagnostics.Fallthrough_case_in_switch); + } }); if (node.caseBlock.locals) { registerForUnusedIdentifiersCheck(node.caseBlock); @@ -61629,11 +62098,13 @@ var ts; // same when the derived property is from an assignment continue; } - if (basePropertyFlags !== 4 /* Property */ && derivedPropertyFlags === 4 /* Property */) { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_property; - } - else if (basePropertyFlags === 4 /* Property */ && derivedPropertyFlags !== 4 /* Property */) { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_accessor; + var overriddenInstanceProperty = basePropertyFlags !== 4 /* Property */ && derivedPropertyFlags === 4 /* Property */; + var overriddenInstanceAccessor = basePropertyFlags === 4 /* Property */ && derivedPropertyFlags !== 4 /* Property */; + if (overriddenInstanceProperty || overriddenInstanceAccessor) { + var errorMessage_1 = overriddenInstanceProperty ? + ts.Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property : + ts.Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor; + error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage_1, symbolToString(base), typeToString(baseType), typeToString(type)); } else { var uninitialized = ts.find(derived.declarations, function (d) { return d.kind === 158 /* PropertyDeclaration */ && !d.initializer; }); @@ -61649,24 +62120,22 @@ var ts; || !ts.isIdentifier(propName) || !strictNullChecks || !isPropertyInitializedInConstructor(propName, type, constructor)) { - var errorMessage_1 = ts.Diagnostics.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration; - error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage_1, symbolToString(base), typeToString(baseType)); + var errorMessage_2 = ts.Diagnostics.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration; + error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage_2, symbolToString(base), typeToString(baseType)); } } - // correct case - continue; } + // correct case + continue; } else if (isPrototypeProperty(base)) { - if (isPrototypeProperty(derived)) { - // method is overridden with method -- correct case + if (isPrototypeProperty(derived) || derived.flags & 4 /* Property */) { + // method is overridden with method or property -- correct case continue; } - else if (derived.flags & 98304 /* Accessor */) { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor; - } else { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property; + ts.Debug.assert(!!(derived.flags & 98304 /* Accessor */)); + errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor; } } else if (base.flags & 98304 /* Accessor */) { @@ -62172,22 +62641,6 @@ var ts; break; } } - function getFirstIdentifier(node) { - switch (node.kind) { - case 75 /* Identifier */: - return node; - case 152 /* QualifiedName */: - do { - node = node.left; - } while (node.kind !== 75 /* Identifier */); - return node; - case 193 /* PropertyAccessExpression */: - do { - node = node.expression; - } while (node.kind !== 75 /* Identifier */); - return node; - } - } function getFirstNonModuleExportsIdentifier(node) { switch (node.kind) { case 75 /* Identifier */: @@ -62317,7 +62770,7 @@ var ts; if (target !== unknownSymbol) { if (target.flags & 111551 /* Value */) { // Target is a value symbol, check that it is not hidden by a local declaration with the same name - var moduleName = getFirstIdentifier(node.moduleReference); + var moduleName = ts.getFirstIdentifier(node.moduleReference); if (!(resolveEntityName(moduleName, 111551 /* Value */ | 1920 /* Namespace */).flags & 1920 /* Namespace */)) { error(moduleName, ts.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, ts.declarationNameToString(moduleName)); } @@ -62384,7 +62837,7 @@ var ts; // find immediate value referenced by exported name (SymbolFlags.Alias is set so we don't chase down aliases) var symbol = resolveName(exportedName, exportedName.escapedText, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ true); - if (symbol && (symbol === undefinedSymbol || isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0])))) { + if (symbol && (symbol === undefinedSymbol || symbol === globalThisSymbol || isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0])))) { error(exportedName, ts.Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, ts.idText(exportedName)); } else { @@ -64690,10 +65143,10 @@ var ts; if (type.flags & 4 /* String */ || type.flags & 8 /* Number */) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead, ts.getTextOfNode(parameter.name), typeToString(type), typeToString(node.type ? getTypeFromTypeNode(node.type) : anyType)); } - if (type.flags & 1048576 /* Union */ && allTypesAssignableToKind(type, 128 /* StringLiteral */, /*strict*/ true)) { + if (type.flags & 1048576 /* Union */ && allTypesAssignableToKind(type, 384 /* StringOrNumberLiteral */, /*strict*/ true)) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead); } - return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number); + return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_either_string_or_number); } if (!node.type) { return grammarErrorOnNode(node, ts.Diagnostics.An_index_signature_must_have_a_type_annotation); @@ -65576,7 +66029,7 @@ var ts; } function checkGrammarImportCallExpression(node) { if (moduleKind === ts.ModuleKind.ES2015) { - return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext); + return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_commonjs_amd_system_or_umd); } if (node.typeArguments) { return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_cannot_have_type_arguments); @@ -65646,6 +66099,14 @@ var ts; case 2 /* Next */: return "nextType"; } } + function signatureHasRestParameter(s) { + return !!(s.flags & 1 /* HasRestParameter */); + } + ts.signatureHasRestParameter = signatureHasRestParameter; + function signatureHasLiteralTypes(s) { + return !!(s.flags & 2 /* HasLiteralTypes */); + } + ts.signatureHasLiteralTypes = signatureHasLiteralTypes; })(ts || (ts = {})); var ts; (function (ts) { @@ -66579,7 +67040,9 @@ var ts; } ts.createPropertyAccess = createPropertyAccess; function updatePropertyAccess(node, expression, name) { - ts.Debug.assert(!(node.flags & 32 /* OptionalChain */), "Cannot update a PropertyAccessChain using updatePropertyAccess. Use updatePropertyAccessChain instead."); + if (ts.isOptionalChain(node)) { + return updatePropertyAccessChain(node, expression, node.questionDotToken, name); + } // Because we are updating existed propertyAccess we want to inherit its emitFlags // instead of using the default from createPropertyAccess return node.expression !== expression @@ -66617,7 +67080,9 @@ var ts; } ts.createElementAccess = createElementAccess; function updateElementAccess(node, expression, argumentExpression) { - ts.Debug.assert(!(node.flags & 32 /* OptionalChain */), "Cannot update an ElementAccessChain using updateElementAccess. Use updateElementAccessChain instead."); + if (ts.isOptionalChain(node)) { + return updateElementAccessChain(node, expression, node.questionDotToken, argumentExpression); + } return node.expression !== expression || node.argumentExpression !== argumentExpression ? updateNode(createElementAccess(expression, argumentExpression), node) @@ -66651,7 +67116,9 @@ var ts; } ts.createCall = createCall; function updateCall(node, expression, typeArguments, argumentsArray) { - ts.Debug.assert(!(node.flags & 32 /* OptionalChain */), "Cannot update a CallChain using updateCall. Use updateCallChain instead."); + if (ts.isOptionalChain(node)) { + return updateCallChain(node, expression, node.questionDotToken, typeArguments, argumentsArray); + } return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray @@ -67253,7 +67720,7 @@ var ts; var node = createSynthesizedNode(231 /* ForOfStatement */); node.awaitModifier = awaitModifier; node.initializer = initializer; - node.expression = expression; + node.expression = ts.isCommaSequence(expression) ? createParen(expression) : expression; node.statement = asEmbeddedStatement(statement); return node; } @@ -69779,7 +70246,7 @@ var ts; var conditionalPrecedence = ts.getOperatorPrecedence(209 /* ConditionalExpression */, 57 /* QuestionToken */); var emittedCondition = ts.skipPartiallyEmittedExpressions(condition); var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition); - if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1 /* LessThan */) { + if (ts.compareValues(conditionPrecedence, conditionalPrecedence) !== 1 /* GreaterThan */) { return ts.createParen(condition); } return condition; @@ -70377,6 +70844,12 @@ var ts; * Gets the property name of a BindingOrAssignmentElement */ function getPropertyNameOfBindingOrAssignmentElement(bindingElement) { + var propertyName = tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement); + ts.Debug.assert(!!propertyName || ts.isSpreadAssignment(bindingElement), "Invalid property name for binding element."); + return propertyName; + } + ts.getPropertyNameOfBindingOrAssignmentElement = getPropertyNameOfBindingOrAssignmentElement; + function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { case 190 /* BindingElement */: // `a` in `let { a: b } = ...` @@ -70412,9 +70885,8 @@ var ts; ? target.expression : target; } - ts.Debug.fail("Invalid property name for binding element."); } - ts.getPropertyNameOfBindingOrAssignmentElement = getPropertyNameOfBindingOrAssignmentElement; + ts.tryGetPropertyNameOfBindingOrAssignmentElement = tryGetPropertyNameOfBindingOrAssignmentElement; function isStringOrNumericLiteral(node) { var kind = node.kind; return kind === 10 /* StringLiteral */ @@ -72433,7 +72905,8 @@ var ts; }; if (value) { value = ts.visitNode(value, visitor, ts.isExpression); - if (ts.isIdentifier(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText)) { + if (ts.isIdentifier(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText) || + bindingOrAssignmentElementContainsNonLiteralComputedName(node)) { // If the right-hand value of the assignment is also an assignment target then // we need to cache the right-hand value. value = ensureIdentifier(flattenContext, value, /*reuseIdentifierExpressions*/ false, location); @@ -72502,6 +72975,17 @@ var ts; } return false; } + function bindingOrAssignmentElementContainsNonLiteralComputedName(element) { + var propertyName = ts.tryGetPropertyNameOfBindingOrAssignmentElement(element); + if (propertyName && ts.isComputedPropertyName(propertyName) && !ts.isLiteralExpression(propertyName.expression)) { + return true; + } + var target = ts.getTargetOfBindingOrAssignmentElement(element); + return !!target && ts.isBindingOrAssignmentPattern(target) && bindingOrAssignmentPatternContainsNonLiteralComputedName(target); + } + function bindingOrAssignmentPatternContainsNonLiteralComputedName(pattern) { + return !!ts.forEach(ts.getElementsOfBindingOrAssignmentPattern(pattern), bindingOrAssignmentElementContainsNonLiteralComputedName); + } /** * Flattens a VariableDeclaration or ParameterDeclaration to one or more variable declarations. * @@ -72532,7 +73016,8 @@ var ts; }; if (ts.isVariableDeclaration(node)) { var initializer = ts.getInitializerOfBindingOrAssignmentElement(node); - if (initializer && ts.isIdentifier(initializer) && bindingOrAssignmentElementAssignsToName(node, initializer.escapedText)) { + if (initializer && (ts.isIdentifier(initializer) && bindingOrAssignmentElementAssignsToName(node, initializer.escapedText) || + bindingOrAssignmentElementContainsNonLiteralComputedName(node))) { // If the right-hand value of the assignment is also an assignment target then // we need to cache the right-hand value. initializer = ensureIdentifier(flattenContext, initializer, /*reuseIdentifierExpressions*/ false, initializer); @@ -73831,8 +74316,8 @@ var ts; function generateClassElementDecorationExpressions(node, isStatic) { var members = getDecoratedClassElements(node, isStatic); var expressions; - for (var _i = 0, members_5 = members; _i < members_5.length; _i++) { - var member = members_5[_i]; + for (var _i = 0, members_6 = members; _i < members_6.length; _i++) { + var member = members_6[_i]; var expression = generateClassElementDecorationExpression(node, member); if (expression) { if (!expressions) { @@ -74222,8 +74707,8 @@ var ts; // Note when updating logic here also update getEntityNameForDecoratorMetadata // so that aliases can be marked as referenced var serializedUnion; - for (var _i = 0, types_19 = types; _i < types_19.length; _i++) { - var typeNode = types_19[_i]; + for (var _i = 0, types_20 = types; _i < types_20.length; _i++) { + var typeNode = types_20[_i]; while (typeNode.kind === 181 /* ParenthesizedType */) { typeNode = typeNode.type; // Skip parens if need be } @@ -74835,7 +75320,12 @@ var ts; * * @param node The module declaration node. */ - function shouldEmitModuleDeclaration(node) { + function shouldEmitModuleDeclaration(nodeIn) { + var node = ts.getParseTreeNode(nodeIn, ts.isModuleDeclaration); + if (!node) { + // If we can't find a parse tree node, assume the node is instantiated. + return true; + } return ts.isInstantiatedModule(node, !!compilerOptions.preserveConstEnums || !!compilerOptions.isolatedModules); } /** @@ -75654,7 +76144,7 @@ var ts; // Create a temporary variable to store a computed property name (if necessary). // If it's not inlineable, then we emit an expression after the class which assigns // the property name to the temporary variable. - var expr = getPropertyNameExpressionIfNeeded(node.name, !!node.initializer); + var expr = getPropertyNameExpressionIfNeeded(node.name, !!node.initializer || !!context.getCompilerOptions().useDefineForClassFields); if (expr && !ts.isSimpleInlineableExpression(expr)) { (pendingExpressions || (pendingExpressions = [])).push(expr); } @@ -77411,7 +77901,7 @@ var ts; } return ts.updateParen(node, expression); } - function visitNonOptionalPropertyAccessExpression(node, captureThisArg) { + function visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg) { if (ts.isOptionalChain(node)) { // If `node` is an optional chain, then it is the outermost chain of an optional expression. return visitOptionalExpression(node, captureThisArg); @@ -77420,27 +77910,17 @@ var ts; ts.Debug.assertNotNode(expression, ts.isSyntheticReference); var thisArg; if (captureThisArg) { - // `a.b` -> { expression: `(_a = a).b`, thisArg: `_a` } - thisArg = ts.createTempVariable(hoistVariableDeclaration); - expression = ts.createParen(ts.createAssignment(thisArg, expression)); + if (shouldCaptureInTempVariable(expression)) { + thisArg = ts.createTempVariable(hoistVariableDeclaration); + expression = ts.createAssignment(thisArg, expression); + } + else { + thisArg = expression; + } } - expression = ts.updatePropertyAccess(node, expression, ts.visitNode(node.name, visitor, ts.isIdentifier)); - return thisArg ? ts.createSyntheticReferenceExpression(expression, thisArg) : expression; - } - function visitNonOptionalElementAccessExpression(node, captureThisArg) { - if (ts.isOptionalChain(node)) { - // If `node` is an optional chain, then it is the outermost chain of an optional expression. - return visitOptionalExpression(node, captureThisArg); - } - var expression = ts.visitNode(node.expression, visitor, ts.isExpression); - ts.Debug.assertNotNode(expression, ts.isSyntheticReference); - var thisArg; - if (captureThisArg) { - // `a[b]` -> { expression: `(_a = a)[b]`, thisArg: `_a` } - thisArg = ts.createTempVariable(hoistVariableDeclaration); - expression = ts.createParen(ts.createAssignment(thisArg, expression)); - } - expression = ts.updateElementAccess(node, expression, ts.visitNode(node.argumentExpression, visitor, ts.isExpression)); + expression = node.kind === 193 /* PropertyAccessExpression */ + ? ts.updatePropertyAccess(node, expression, ts.visitNode(node.name, visitor, ts.isIdentifier)) + : ts.updateElementAccess(node, expression, ts.visitNode(node.argumentExpression, visitor, ts.isExpression)); return thisArg ? ts.createSyntheticReferenceExpression(expression, thisArg) : expression; } function visitNonOptionalCallExpression(node, captureThisArg) { @@ -77453,8 +77933,8 @@ var ts; function visitNonOptionalExpression(node, captureThisArg) { switch (node.kind) { case 199 /* ParenthesizedExpression */: return visitNonOptionalParenthesizedExpression(node, captureThisArg); - case 193 /* PropertyAccessExpression */: return visitNonOptionalPropertyAccessExpression(node, captureThisArg); - case 194 /* ElementAccessExpression */: return visitNonOptionalElementAccessExpression(node, captureThisArg); + case 193 /* PropertyAccessExpression */: + case 194 /* ElementAccessExpression */: return visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg); case 195 /* CallExpression */: return visitNonOptionalCallExpression(node, captureThisArg); default: return ts.visitNode(node, visitor, ts.isExpression); } @@ -77462,31 +77942,36 @@ var ts; function visitOptionalExpression(node, captureThisArg) { var _a = flattenChain(node), expression = _a.expression, chain = _a.chain; var left = visitNonOptionalExpression(expression, ts.isCallChain(chain[0])); - var temp = ts.createTempVariable(hoistVariableDeclaration); var leftThisArg = ts.isSyntheticReference(left) ? left.thisArg : undefined; var leftExpression = ts.isSyntheticReference(left) ? left.expression : left; - var rightExpression = temp; + var capturedLeft = leftExpression; + if (shouldCaptureInTempVariable(leftExpression)) { + capturedLeft = ts.createTempVariable(hoistVariableDeclaration); + leftExpression = ts.createAssignment(capturedLeft, leftExpression); + } + var rightExpression = capturedLeft; var thisArg; for (var i = 0; i < chain.length; i++) { var segment = chain[i]; switch (segment.kind) { case 193 /* PropertyAccessExpression */: - if (i === chain.length - 1 && captureThisArg) { - thisArg = ts.createTempVariable(hoistVariableDeclaration); - rightExpression = ts.createParen(ts.createAssignment(thisArg, rightExpression)); - } - rightExpression = ts.createPropertyAccess(rightExpression, ts.visitNode(segment.name, visitor, ts.isIdentifier)); - break; case 194 /* ElementAccessExpression */: if (i === chain.length - 1 && captureThisArg) { - thisArg = ts.createTempVariable(hoistVariableDeclaration); - rightExpression = ts.createParen(ts.createAssignment(thisArg, rightExpression)); + if (shouldCaptureInTempVariable(rightExpression)) { + thisArg = ts.createTempVariable(hoistVariableDeclaration); + rightExpression = ts.createAssignment(thisArg, rightExpression); + } + else { + thisArg = rightExpression; + } } - rightExpression = ts.createElementAccess(rightExpression, ts.visitNode(segment.argumentExpression, visitor, ts.isExpression)); + rightExpression = segment.kind === 193 /* PropertyAccessExpression */ + ? ts.createPropertyAccess(rightExpression, ts.visitNode(segment.name, visitor, ts.isIdentifier)) + : ts.createElementAccess(rightExpression, ts.visitNode(segment.argumentExpression, visitor, ts.isExpression)); break; case 195 /* CallExpression */: if (i === 0 && leftThisArg) { - rightExpression = ts.createFunctionCall(rightExpression, leftThisArg, ts.visitNodes(segment.arguments, visitor, ts.isExpression)); + rightExpression = ts.createFunctionCall(rightExpression, leftThisArg.kind === 101 /* SuperKeyword */ ? ts.createThis() : leftThisArg, ts.visitNodes(segment.arguments, visitor, ts.isExpression)); } else { rightExpression = ts.createCall(rightExpression, @@ -77496,22 +77981,27 @@ var ts; } ts.setOriginalNode(rightExpression, segment); } - var target = ts.createConditional(ts.createLogicalOr(ts.createStrictEquality(ts.createAssignment(temp, leftExpression), ts.createNull()), ts.createStrictEquality(temp, ts.createVoidZero())), ts.createVoidZero(), rightExpression); + var target = ts.createConditional(createNotNullCondition(leftExpression, capturedLeft, /*invert*/ true), ts.createVoidZero(), rightExpression); return thisArg ? ts.createSyntheticReferenceExpression(target, thisArg) : target; } - function createNotNullCondition(node) { - return ts.createBinary(ts.createBinary(node, ts.createToken(37 /* ExclamationEqualsEqualsToken */), ts.createNull()), ts.createToken(55 /* AmpersandAmpersandToken */), ts.createBinary(node, ts.createToken(37 /* ExclamationEqualsEqualsToken */), ts.createVoidZero())); + function createNotNullCondition(left, right, invert) { + return ts.createBinary(ts.createBinary(left, ts.createToken(invert ? 36 /* EqualsEqualsEqualsToken */ : 37 /* ExclamationEqualsEqualsToken */), ts.createNull()), ts.createToken(invert ? 56 /* BarBarToken */ : 55 /* AmpersandAmpersandToken */), ts.createBinary(right, ts.createToken(invert ? 36 /* EqualsEqualsEqualsToken */ : 37 /* ExclamationEqualsEqualsToken */), ts.createVoidZero())); } function transformNullishCoalescingExpression(node) { - var expressions = []; var left = ts.visitNode(node.left, visitor, ts.isExpression); - if (!ts.isIdentifier(left)) { - var temp = ts.createTempVariable(hoistVariableDeclaration); - expressions.push(ts.createAssignment(temp, left)); - left = temp; + var right = left; + if (shouldCaptureInTempVariable(left)) { + right = ts.createTempVariable(hoistVariableDeclaration); + left = ts.createAssignment(right, left); } - expressions.push(ts.createParen(ts.createConditional(createNotNullCondition(left), left, ts.visitNode(node.right, visitor, ts.isExpression)))); - return ts.inlineExpressions(expressions); + return ts.createConditional(createNotNullCondition(left, right), right, ts.visitNode(node.right, visitor, ts.isExpression)); + } + function shouldCaptureInTempVariable(expression) { + // don't capture identifiers and `this` in a temporary variable + // `super` cannot be captured as it's no real variable + return !ts.isIdentifier(expression) && + expression.kind !== 103 /* ThisKeyword */ && + expression.kind !== 101 /* SuperKeyword */; } } ts.transformESNext = transformESNext; @@ -87669,6 +88159,7 @@ var ts; var combinedStatements; if (ts.isSourceFileJS(currentSourceFile)) { combinedStatements = ts.createNodeArray(transformDeclarationsForJS(node)); + refs.forEach(referenceVisitor); emittedImports = ts.filter(combinedStatements, ts.isAnyImportSyntax); } else { @@ -89440,7 +89931,11 @@ var ts; bundleBuildInfo.js = printer.bundleFileInfo; } function emitDeclarationFileOrBundle(sourceFileOrBundle, declarationFilePath, declarationMapPath, relativeToBuildInfo) { - if (!sourceFileOrBundle || !declarationFilePath) { + if (!sourceFileOrBundle) + return; + if (!declarationFilePath) { + if (emitOnlyDtsFiles || compilerOptions.emitDeclarationOnly) + emitSkipped = true; return; } var sourceFiles = ts.isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : sourceFileOrBundle.sourceFiles; @@ -92194,8 +92689,8 @@ var ts; bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "reference" /* Reference */, data: directive.fileName }); writeLine(); } - for (var _d = 0, types_20 = types; _d < types_20.length; _d++) { - var directive = types_20[_d]; + for (var _d = 0, types_21 = types; _d < types_21.length; _d++) { + var directive = types_21[_d]; var pos = writer.getTextPos(); writeComment("/// "); if (bundleFileInfo) @@ -94070,31 +94565,39 @@ var ts; if (existingDirectories.has(directoryPath)) { return true; } - if (system.directoryExists(directoryPath)) { + if ((compilerHost.directoryExists || system.directoryExists)(directoryPath)) { existingDirectories.set(directoryPath, true); return true; } return false; } - function ensureDirectoriesExist(directoryPath) { - if (directoryPath.length > ts.getRootLength(directoryPath) && !directoryExists(directoryPath)) { - var parentDirectory = ts.getDirectoryPath(directoryPath); - ensureDirectoriesExist(parentDirectory); - if (compilerHost.createDirectory) { - compilerHost.createDirectory(directoryPath); - } - else { - system.createDirectory(directoryPath); + function writeFile(fileName, data, writeByteOrderMark, onError) { + try { + ts.performance.mark("beforeIOWrite"); + // NOTE: If patchWriteFileEnsuringDirectory has been called, + // the system.writeFile will do its own directory creation and + // the ensureDirectoriesExist call will always be redundant. + ts.writeFileEnsuringDirectories(fileName, data, writeByteOrderMark, function (path, data, writeByteOrderMark) { return writeFileWorker(path, data, writeByteOrderMark); }, function (path) { return (compilerHost.createDirectory || system.createDirectory)(path); }, function (path) { return directoryExists(path); }); + ts.performance.mark("afterIOWrite"); + ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite"); + } + catch (e) { + if (onError) { + onError(e.message); } } } var outputFingerprints; - function writeFileIfUpdated(fileName, data, writeByteOrderMark) { + function writeFileWorker(fileName, data, writeByteOrderMark) { + if (!ts.isWatchSet(options) || !system.createHash || !system.getModifiedTime) { + system.writeFile(fileName, data, writeByteOrderMark); + return; + } if (!outputFingerprints) { outputFingerprints = ts.createMap(); } - var hash = system.createHash(data); // TODO: GH#18217 - var mtimeBefore = system.getModifiedTime(fileName); // TODO: GH#18217 + var hash = system.createHash(data); + var mtimeBefore = system.getModifiedTime(fileName); if (mtimeBefore) { var fingerprint = outputFingerprints.get(fileName); // If output has not been changed, and the file has no external modification @@ -94106,32 +94609,13 @@ var ts; } } system.writeFile(fileName, data, writeByteOrderMark); - var mtimeAfter = system.getModifiedTime(fileName) || ts.missingFileModifiedTime; // TODO: GH#18217 + var mtimeAfter = system.getModifiedTime(fileName) || ts.missingFileModifiedTime; outputFingerprints.set(fileName, { hash: hash, byteOrderMark: writeByteOrderMark, mtime: mtimeAfter }); } - function writeFile(fileName, data, writeByteOrderMark, onError) { - try { - ts.performance.mark("beforeIOWrite"); - ensureDirectoriesExist(ts.getDirectoryPath(ts.normalizePath(fileName))); - if (ts.isWatchSet(options) && system.createHash && system.getModifiedTime) { - writeFileIfUpdated(fileName, data, writeByteOrderMark); - } - else { - system.writeFile(fileName, data, writeByteOrderMark); - } - ts.performance.mark("afterIOWrite"); - ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite"); - } - catch (e) { - if (onError) { - onError(e.message); - } - } - } function getDefaultLibLocation() { return ts.getDirectoryPath(ts.normalizePath(system.getExecutingFilePath())); } @@ -95853,9 +96337,16 @@ var ts; } function getSourceFileFromReferenceWorker(fileName, getSourceFile, fail, refFile) { if (ts.hasExtension(fileName)) { - if (!options.allowNonTsExtensions && !ts.forEach(supportedExtensionsWithJsonIfResolveJsonModule, function (extension) { return ts.fileExtensionIs(host.getCanonicalFileName(fileName), extension); })) { - if (fail) - fail(ts.Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1, fileName, "'" + supportedExtensions.join("', '") + "'"); + var canonicalFileName_1 = host.getCanonicalFileName(fileName); + if (!options.allowNonTsExtensions && !ts.forEach(supportedExtensionsWithJsonIfResolveJsonModule, function (extension) { return ts.fileExtensionIs(canonicalFileName_1, extension); })) { + if (fail) { + if (ts.hasJSFileExtension(canonicalFileName_1)) { + fail(ts.Diagnostics.File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option, fileName); + } + else { + fail(ts.Diagnostics.File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1, fileName, "'" + supportedExtensions.join("', '") + "'"); + } + } return undefined; } var sourceFile = getSourceFile(fileName); @@ -95869,7 +96360,7 @@ var ts; fail(ts.Diagnostics.File_0_not_found, fileName); } } - else if (refFile && host.getCanonicalFileName(fileName) === host.getCanonicalFileName(refFile.fileName)) { + else if (refFile && canonicalFileName_1 === host.getCanonicalFileName(refFile.fileName)) { fail(ts.Diagnostics.A_file_cannot_have_a_reference_to_itself); } } @@ -95927,6 +96418,19 @@ var ts; function findSourceFile(fileName, path, isDefaultLib, ignoreNoDefaultLib, refFile, packageId) { if (useSourceOfProjectReferenceRedirect) { var source = getSourceOfProjectReferenceRedirect(fileName); + // If preserveSymlinks is true, module resolution wont jump the symlink + // but the resolved real path may be the .d.ts from project reference + // Note:: Currently we try the real path only if the + // file is from node_modules to avoid having to run real path on all file paths + if (!source && + host.realpath && + options.preserveSymlinks && + ts.isDeclarationFileName(fileName) && + ts.stringContains(fileName, ts.nodeModulesPathPart)) { + var realPath = host.realpath(fileName); + if (realPath !== fileName) + source = getSourceOfProjectReferenceRedirect(realPath); + } if (source) { var file_1 = ts.isString(source) ? findSourceFile(source, toPath(source), isDefaultLib, ignoreNoDefaultLib, refFile, packageId) : @@ -96457,9 +96961,6 @@ var ts; else if (options.incremental && !options.outFile && !options.out && !options.configFilePath) { programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified)); } - if (options.noEmit && ts.isIncrementalCompilation(options)) { - createDiagnosticForOptionName(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", options.incremental ? "incremental" : "composite"); - } verifyProjectReferences(); // List of collected files is complete; validate exhautiveness if this is a project with a file list if (options.composite) { @@ -97504,6 +98005,7 @@ var ts; ts.Debug.assert(state.seenAffectedFiles === undefined); state.seenAffectedFiles = ts.createMap(); } + state.emittedBuildInfo = !state.changedFilesSet.size && !state.affectedFilesPendingEmit; return state; } function convertToDiagnostics(diagnostics, newProgram, getCanonicalFileName) { @@ -98234,7 +98736,7 @@ var ts; } var state = { fileInfos: fileInfos, - compilerOptions: convertFromReusableCompilerOptions(program.options, toAbsolutePath), + compilerOptions: ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath), referencedMap: getMapOfReferencedSet(program.referencedMap, toPath), exportedModulesMap: getMapOfReferencedSet(program.exportedModulesMap, toPath), semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toPath(ts.isString(value) ? value : value[0]); }, function (value) { return ts.isString(value) ? ts.emptyArray : value[1]; }), @@ -98270,33 +98772,6 @@ var ts; } } ts.createBuildProgramUsingProgramBuildInfo = createBuildProgramUsingProgramBuildInfo; - function convertFromReusableCompilerOptions(options, toAbsolutePath) { - var result = {}; - var optionsNameMap = ts.getOptionNameMap().optionNameMap; - for (var name in options) { - if (ts.hasProperty(options, name)) { - result[name] = convertFromReusableCompilerOptionValue(optionsNameMap.get(name.toLowerCase()), options[name], toAbsolutePath); - } - } - if (result.configFilePath) { - result.configFilePath = toAbsolutePath(result.configFilePath); - } - return result; - } - function convertFromReusableCompilerOptionValue(option, value, toAbsolutePath) { - if (option) { - if (option.type === "list") { - var values = value; - if (option.element.isFilePath && values.length) { - return values.map(toAbsolutePath); - } - } - else if (option.isFilePath) { - return toAbsolutePath(value); - } - } - return value; - } function createRedirectedBuilderProgram(state, configFileParsingDiagnostics) { return { getState: ts.notImplemented, @@ -99029,7 +99504,7 @@ var ts; function getPreferencesForUpdate(compilerOptions, oldImportSpecifier) { return { relativePreference: ts.isExternalModuleNameRelative(oldImportSpecifier) ? 0 /* Relative */ : 1 /* NonRelative */, - ending: ts.hasJSOrJsonFileExtension(oldImportSpecifier) ? + ending: ts.hasJSFileExtension(oldImportSpecifier) ? 2 /* JsExtension */ : ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeJs || ts.endsWith(oldImportSpecifier, "index") ? 1 /* Index */ : 0 /* Minimal */, }; @@ -99115,7 +99590,7 @@ var ts; var imports = _a.imports; return ts.firstDefined(imports, function (_a) { var text = _a.text; - return ts.pathIsRelative(text) ? ts.hasJSOrJsonFileExtension(text) : undefined; + return ts.pathIsRelative(text) ? ts.hasJSFileExtension(text) : undefined; }) || false; } function numberOfDirectorySeparators(str) { @@ -99249,10 +99724,13 @@ var ts; // Simplify the full file path to something that can be resolved by Node. // If the module could be imported by a directory name, use that directory's name var moduleSpecifier = packageNameOnly ? moduleFileName : getDirectoryOrExtensionlessFileName(moduleFileName); + var globalTypingsCacheLocation = host.getGlobalTypingsCacheLocation && host.getGlobalTypingsCacheLocation(); // Get a path that's relative to node_modules or the importing file's path // if node_modules folder is in this folder or any of its parent folders, no need to keep it. - if (!ts.startsWith(sourceDirectory, getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex)))) + var pathToTopLevelNodeModules = getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex)); + if (!(ts.startsWith(sourceDirectory, pathToTopLevelNodeModules) || globalTypingsCacheLocation && ts.startsWith(getCanonicalFileName(globalTypingsCacheLocation), pathToTopLevelNodeModules))) { return undefined; + } // If the module was found in @types, get the actual Node package name var nodeModulesDirectoryName = moduleSpecifier.substring(parts.topLevelPackageNameIndex + 1); var packageName = ts.getPackageNameFromTypesPackageName(nodeModulesDirectoryName); @@ -99477,7 +99955,7 @@ var ts; /** Parses config file using System interface */ function parseConfigFileWithSystem(configFileName, optionsToExtend, system, reportDiagnostic) { var host = system; - host.onUnRecoverableConfigFileDiagnostic = function (diagnostic) { return reportUnrecoverableDiagnostic(ts.sys, reportDiagnostic, diagnostic); }; + host.onUnRecoverableConfigFileDiagnostic = function (diagnostic) { return reportUnrecoverableDiagnostic(system, reportDiagnostic, diagnostic); }; var result = ts.getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host); host.onUnRecoverableConfigFileDiagnostic = undefined; // TODO: GH#18217 return result; @@ -99501,7 +99979,7 @@ var ts; } ts.getErrorSummaryText = getErrorSummaryText; function listFiles(program, writeFileName) { - if (program.getCompilerOptions().listFiles) { + if (program.getCompilerOptions().listFiles || program.getCompilerOptions().listFilesOnly) { ts.forEach(program.getSourceFiles(), function (file) { writeFileName(file.fileName); }); @@ -99512,6 +99990,7 @@ var ts; * Helper that emit files, report diagnostics and lists emitted and/or source files depending on compiler options */ function emitFilesAndReportErrors(program, reportDiagnostic, writeFileName, reportSummary, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers) { + var isListFilesOnly = !!program.getCompilerOptions().listFilesOnly; // First get and report any syntactic errors. var diagnostics = program.getConfigFileParsingDiagnostics().slice(); var configFileParsingDiagnosticsLength = diagnostics.length; @@ -99520,13 +99999,17 @@ var ts; // semantic errors. if (diagnostics.length === configFileParsingDiagnosticsLength) { ts.addRange(diagnostics, program.getOptionsDiagnostics(cancellationToken)); - ts.addRange(diagnostics, program.getGlobalDiagnostics(cancellationToken)); - if (diagnostics.length === configFileParsingDiagnosticsLength) { - ts.addRange(diagnostics, program.getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken)); + if (!isListFilesOnly) { + ts.addRange(diagnostics, program.getGlobalDiagnostics(cancellationToken)); + if (diagnostics.length === configFileParsingDiagnosticsLength) { + ts.addRange(diagnostics, program.getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken)); + } } } // Emit and report any errors we ran into. - var emitResult = program.emit(/*targetSourceFile*/ undefined, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers); + var emitResult = isListFilesOnly + ? { emitSkipped: true, diagnostics: ts.emptyArray } + : program.emit(/*targetSourceFile*/ undefined, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers); var emittedFiles = emitResult.emittedFiles, emitDiagnostics = emitResult.diagnostics; ts.addRange(diagnostics, emitDiagnostics); ts.sortAndDeduplicateDiagnostics(diagnostics).forEach(reportDiagnostic); @@ -99629,19 +100112,13 @@ var ts; createHash: ts.maybeBind(host, host.createHash), readDirectory: ts.maybeBind(host, host.readDirectory), }; - function ensureDirectoriesExist(directoryPath) { - if (directoryPath.length > ts.getRootLength(directoryPath) && !host.directoryExists(directoryPath)) { - var parentDirectory = ts.getDirectoryPath(directoryPath); - ensureDirectoriesExist(parentDirectory); - if (host.createDirectory) - host.createDirectory(directoryPath); - } - } function writeFile(fileName, text, writeByteOrderMark, onError) { try { ts.performance.mark("beforeIOWrite"); - ensureDirectoriesExist(ts.getDirectoryPath(ts.normalizePath(fileName))); - host.writeFile(fileName, text, writeByteOrderMark); + // NOTE: If patchWriteFileEnsuringDirectory has been called, + // the host.writeFile will do its own directory creation and + // the ensureDirectoriesExist call will always be redundant. + ts.writeFileEnsuringDirectories(fileName, text, writeByteOrderMark, function (path, data, writeByteOrderMark) { return host.writeFile(path, data, writeByteOrderMark); }, function (path) { return host.createDirectory(path); }, function (path) { return host.directoryExists(path); }); ts.performance.mark("afterIOWrite"); ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite"); } @@ -101418,30 +101895,25 @@ var ts; setupInitialBuild(state, cancellationToken); var reportQueue = true; var successfulProjects = 0; - var errorProjects = 0; while (true) { var invalidatedProject = getNextInvalidatedProject(state, buildOrder, reportQueue); if (!invalidatedProject) break; reportQueue = false; invalidatedProject.done(cancellationToken); - if (state.diagnostics.has(invalidatedProject.projectPath)) { - errorProjects++; - } - else { + if (!state.diagnostics.has(invalidatedProject.projectPath)) successfulProjects++; - } } disableCache(state); reportErrorSummary(state, buildOrder); startWatching(state, buildOrder); - return isCircularBuildOrder(buildOrder) ? - ts.ExitStatus.ProjectReferenceCycle_OutputsSkupped : - errorProjects ? - successfulProjects ? - ts.ExitStatus.DiagnosticsPresent_OutputsGenerated : - ts.ExitStatus.DiagnosticsPresent_OutputsSkipped : - ts.ExitStatus.Success; + return isCircularBuildOrder(buildOrder) + ? ts.ExitStatus.ProjectReferenceCycle_OutputsSkipped + : !buildOrder.some(function (p) { return state.diagnostics.has(toResolvedConfigFilePath(state, p)); }) + ? ts.ExitStatus.Success + : successfulProjects + ? ts.ExitStatus.DiagnosticsPresent_OutputsGenerated + : ts.ExitStatus.DiagnosticsPresent_OutputsSkipped; } function clean(state, project, onlyReferences) { var buildOrder = getBuildOrderFor(state, project, onlyReferences); @@ -101449,7 +101921,7 @@ var ts; return ts.ExitStatus.InvalidProject_OutputsSkipped; if (isCircularBuildOrder(buildOrder)) { reportErrors(state, buildOrder.circularDiagnostics); - return ts.ExitStatus.ProjectReferenceCycle_OutputsSkupped; + return ts.ExitStatus.ProjectReferenceCycle_OutputsSkipped; } var options = state.options, host = state.host; var filesToDelete = options.dry ? [] : undefined; @@ -103744,6 +104216,25 @@ var ts; return a.fileName === b.fileName && textSpansEqual(a.textSpan, b.textSpan); } ts.documentSpansEqual = documentSpansEqual; + /** + * Iterates through 'array' by index and performs the callback on each element of array until the callback + * returns a truthy value, then returns that value. + * If no such value is found, the callback is applied to each element of array and undefined is returned. + */ + function forEachUnique(array, callback) { + if (array) { + for (var i = 0; i < array.length; i++) { + if (array.indexOf(array[i]) === i) { + var result = callback(array[i], i); + if (result) { + return result; + } + } + } + } + return undefined; + } + ts.forEachUnique = forEachUnique; })(ts || (ts = {})); // Display-part writer helpers /* @internal */ @@ -104491,10 +104982,11 @@ var ts; } var dependencyKeys = ["dependencies", "devDependencies", "optionalDependencies", "peerDependencies"]; var stringContent = host.readFile(fileName); - var content = stringContent && tryParseJson(stringContent); - if (!content) { + if (!stringContent) return undefined; - } + var content = tryParseJson(stringContent); + if (!content) + return false; var info = {}; for (var _i = 0, dependencyKeys_1 = dependencyKeys; _i < dependencyKeys_1.length; _i++) { var key = dependencyKeys_1[_i]; @@ -105019,8 +105511,10 @@ var ts; }); return { spans: spans, endOfLineState: 0 /* None */ }; function pushClassification(start, end, type) { + var length = end - start; + ts.Debug.assert(length > 0, "Classification had non-positive length of " + length); spans.push(start); - spans.push(end - start); + spans.push(length); spans.push(type); } } @@ -105439,8 +105933,7 @@ var ts; return 25 /* bigintLiteral */; } else if (tokenKind === 10 /* StringLiteral */) { - // TODO: GH#18217 - return token.parent.kind === 271 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; + return token && token.parent.kind === 271 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; } else if (tokenKind === 13 /* RegularExpressionLiteral */) { // TODO: we should get another classification type for these literals. @@ -105698,7 +106191,7 @@ var ts; var candidates = []; checker.getResolvedSignature(argumentInfo.invocation, candidates, argumentInfo.argumentCount); var types = ts.flatMap(candidates, function (candidate) { - if (!candidate.hasRestParameter && argumentInfo.argumentCount > candidate.parameters.length) + if (!ts.signatureHasRestParameter(candidate) && argumentInfo.argumentCount > candidate.parameters.length) return; var type = checker.getParameterType(candidate, argumentInfo.argumentIndex); isNewIdentifier = isNewIdentifier || !!(type.flags & 4 /* String */); @@ -106848,6 +107341,7 @@ var ts; var completionKind = 5 /* None */; var isNewIdentifierLocation = false; var keywordFilters = 0 /* None */; + // This also gets mutated in nested-functions after the return var symbols = []; var symbolToOriginInfoMap = []; var symbolToSortTextMap = []; @@ -106954,8 +107448,15 @@ var ts; var type = typeChecker.getTypeOfSymbolAtLocation(symbol, node).getNonOptionalType(); var insertQuestionDot = false; if (type.isNullableType()) { - insertQuestionDot = isRightOfDot && !isRightOfQuestionDot; - type = type.getNonNullableType(); + var canCorrectToQuestionDot = isRightOfDot && + !isRightOfQuestionDot && + preferences.includeAutomaticOptionalChainCompletions !== false; + if (canCorrectToQuestionDot || isRightOfQuestionDot) { + type = type.getNonNullableType(); + if (canCorrectToQuestionDot) { + insertQuestionDot = true; + } + } } addTypeProperties(type, !!(node.flags & 32768 /* AwaitContext */), insertQuestionDot); } @@ -106972,8 +107473,15 @@ var ts; var type = typeChecker.getTypeAtLocation(node).getNonOptionalType(); var insertQuestionDot = false; if (type.isNullableType()) { - insertQuestionDot = isRightOfDot && !isRightOfQuestionDot; - type = type.getNonNullableType(); + var canCorrectToQuestionDot = isRightOfDot && + !isRightOfQuestionDot && + preferences.includeAutomaticOptionalChainCompletions !== false; + if (canCorrectToQuestionDot || isRightOfQuestionDot) { + type = type.getNonNullableType(); + if (canCorrectToQuestionDot) { + insertQuestionDot = true; + } + } } addTypeProperties(type, !!(node.flags & 32768 /* AwaitContext */), insertQuestionDot); } @@ -107275,7 +107783,7 @@ var ts; typeChecker.getExportsOfModule(sym).some(function (e) { return symbolCanBeReferencedAtTypeLocation(e, seenModules); }); } /** - * Gathers symbols that can be imported from other files, deduplicating along the way. Symbols can be “duplicates” + * Gathers symbols that can be imported from other files, de-duplicating along the way. Symbols can be "duplicates" * if re-exported from another module, e.g. `export { foo } from "./a"`. That syntax creates a fresh symbol, but * it’s just an alias to the first, and both have the same name, so we generally want to filter those aliases out, * if and only if the the first can be imported (it may be excluded due to package.json filtering in @@ -107351,7 +107859,7 @@ var ts; // Don't add another completion for `export =` of a symbol that's already global. // So in `declare namespace foo {} declare module "foo" { export = foo; }`, there will just be the global completion for `foo`. if (resolvedModuleSymbol !== moduleSymbol && - ts.every(resolvedModuleSymbol.declarations, function (d) { return !!d.getSourceFile().externalModuleIndicator; })) { + ts.every(resolvedModuleSymbol.declarations, function (d) { return !!d.getSourceFile().externalModuleIndicator && !ts.findAncestor(d, ts.isGlobalScopeAugmentation); })) { pushSymbol(resolvedModuleSymbol, moduleSymbol, /*skipFilter*/ true); } for (var _i = 0, _a = typeChecker.getExportsOfModule(moduleSymbol); _i < _a.length; _i++) { @@ -107465,7 +107973,16 @@ var ts; } if (contextToken.kind === 31 /* GreaterThanToken */ && contextToken.parent) { if (contextToken.parent.kind === 266 /* JsxOpeningElement */) { - return true; + // Two possibilities: + // 1.
/**/ + // - contextToken: GreaterThanToken (before cursor) + // - location: JSXElement + // - different parents (JSXOpeningElement, JSXElement) + // 2. /**/> + // - contextToken: GreaterThanToken (before cursor) + // - location: GreaterThanToken (after cursor) + // - same parent (JSXOpeningElement) + return location.parent.kind !== 266 /* JsxOpeningElement */; } if (contextToken.parent.kind === 267 /* JsxClosingElement */ || contextToken.parent.kind === 265 /* JsxSelfClosingElement */) { return !!contextToken.parent.parent && contextToken.parent.parent.kind === 264 /* JsxElement */; @@ -107540,7 +108057,7 @@ var ts; var typeMembers; var existingMembers; if (objectLikeContainer.kind === 192 /* ObjectLiteralExpression */) { - var typeForObject = typeChecker.getContextualType(objectLikeContainer); + var typeForObject = typeChecker.getContextualType(objectLikeContainer, 4 /* Completion */); if (!typeForObject) return 2 /* Fail */; isNewIdentifierLocation = ts.hasIndexSignature(typeForObject); @@ -108117,6 +108634,8 @@ var ts; return isFunctionLikeBodyKeyword(kind) || kind === 129 /* DeclareKeyword */ || kind === 134 /* ModuleKeyword */ + || kind === 144 /* TypeKeyword */ + || kind === 135 /* NamespaceKeyword */ || ts.isTypeKeyword(kind) && kind !== 145 /* UndefinedKeyword */; case 5 /* FunctionLikeBodyKeywords */: return isFunctionLikeBodyKeyword(kind); @@ -109926,7 +110445,7 @@ var ts; return undefined; } function getReferencedSymbolsForModuleIfDeclaredBySourceFile(symbol, program, sourceFiles, cancellationToken, options, sourceFilesSet) { - var moduleSourceFile = symbol.flags & 1536 /* Module */ ? ts.find(symbol.declarations, ts.isSourceFile) : undefined; + var moduleSourceFile = (symbol.flags & 1536 /* Module */) && symbol.declarations && ts.find(symbol.declarations, ts.isSourceFile); if (!moduleSourceFile) return undefined; var exportEquals = symbol.exports.get("export=" /* ExportEquals */); @@ -110651,8 +111170,10 @@ var ts; || exportSpecifier.name.originalKeywordKind === 83 /* DefaultKeyword */; var exportKind = isDefaultExport ? 1 /* Default */ : 0 /* Named */; var exportSymbol = ts.Debug.assertDefined(exportSpecifier.symbol); - var exportInfo = ts.Debug.assertDefined(FindAllReferences.getExportInfo(exportSymbol, exportKind, state.checker)); - searchForImportsOfExport(referenceLocation, exportSymbol, exportInfo, state); + var exportInfo = FindAllReferences.getExportInfo(exportSymbol, exportKind, state.checker); + if (exportInfo) { + searchForImportsOfExport(referenceLocation, exportSymbol, exportInfo, state); + } } // At `export { x } from "foo"`, also search for the imported symbol `"foo".x`. if (search.comingFrom !== 1 /* Export */ && exportDeclaration.moduleSpecifier && !propertyName && !isForRenameWithPrefixAndSuffixText(state.options)) { @@ -111863,7 +112384,7 @@ var ts; // The property length will have two declarations of property length coming // from Array - Array and Array var documentationComment = []; - forEachUnique(declarations, function (declaration) { + ts.forEachUnique(declarations, function (declaration) { for (var _i = 0, _a = getCommentHavingNodes(declaration); _i < _a.length; _i++) { var comment = _a[_i].comment; if (comment === undefined) @@ -111892,7 +112413,7 @@ var ts; function getJsDocTagsFromDeclarations(declarations) { // Only collect doc comments from duplicate declarations once. var tags = []; - forEachUnique(declarations, function (declaration) { + ts.forEachUnique(declarations, function (declaration) { for (var _i = 0, _a = ts.getJSDocTags(declaration); _i < _a.length; _i++) { var tag = _a[_i]; tags.push({ name: tag.tagName.text, text: getCommentText(tag) }); @@ -111929,24 +112450,6 @@ var ts; return comment === undefined ? s : s + " " + comment; } } - /** - * Iterates through 'array' by index and performs the callback on each element of array until the callback - * returns a truthy value, then returns that value. - * If no such value is found, the callback is applied to each element of array and undefined is returned. - */ - function forEachUnique(array, callback) { - if (array) { - for (var i = 0; i < array.length; i++) { - if (array.indexOf(array[i]) === i) { - var result = callback(array[i], i); - if (result) { - return result; - } - } - } - } - return undefined; - } function getJSDocTagNameCompletions() { return jsDocTagNameCompletionEntries || (jsDocTagNameCompletionEntries = ts.map(jsDocTagNames, function (tagName) { return { @@ -112871,7 +113374,8 @@ var ts; } var declName = ts.getNameOfDeclaration(node); if (declName && ts.isPropertyName(declName)) { - return ts.unescapeLeadingUnderscores(ts.getPropertyNameForPropertyNameNode(declName)); // TODO: GH#18217 + var propertyName = ts.getPropertyNameForPropertyNameNode(declName); + return propertyName && ts.unescapeLeadingUnderscores(propertyName); } switch (node.kind) { case 200 /* FunctionExpression */: @@ -113641,6 +114145,9 @@ var ts; case 265 /* JsxSelfClosingElement */: case 266 /* JsxOpeningElement */: return spanForJSXAttributes(n.attributes); + case 210 /* TemplateExpression */: + case 14 /* NoSubstitutionTemplateLiteral */: + return spanForTemplateLiteral(n); } function spanForJSXElement(node) { var textSpan = ts.createTextSpanFromBounds(node.openingElement.getStart(sourceFile), node.closingElement.getEnd()); @@ -113659,6 +114166,12 @@ var ts; } return createOutliningSpanFromBounds(node.getStart(sourceFile), node.getEnd(), "code" /* Code */); } + function spanForTemplateLiteral(node) { + if (node.kind === 14 /* NoSubstitutionTemplateLiteral */ && node.text.length === 0) { + return undefined; + } + return createOutliningSpanFromBounds(node.getStart(sourceFile), node.getEnd(), "code" /* Code */); + } function spanForObjectOrArrayLiteral(node, open) { if (open === void 0) { open = 18 /* OpenBraceToken */; } // If the block has no leading keywords and is inside an array literal or call expression, @@ -115961,7 +116474,7 @@ var ts; // get the signature from the declaration and write it var functionDeclaration_1 = location.parent; // Use function declaration to write the signatures only if the symbol corresponding to this declaration - var locationIsSymbolDeclaration = ts.find(symbol.declarations, function (declaration) { + var locationIsSymbolDeclaration = symbol.declarations && ts.find(symbol.declarations, function (declaration) { return declaration === (location.kind === 128 /* ConstructorKeyword */ ? functionDeclaration_1.parent : functionDeclaration_1); }); if (locationIsSymbolDeclaration) { @@ -116868,8 +117381,8 @@ var ts; rule("SpaceAfterQuestionMarkInConditionalOperator", 57 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* InsertSpace */), // in other cases there should be no space between '?' and next token rule("NoSpaceAfterQuestionMark", 57 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("NoSpaceBeforeDot", anyToken, 24 /* DotToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("NoSpaceAfterDot", 24 /* DotToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), + rule("NoSpaceBeforeDot", anyToken, [24 /* DotToken */, 28 /* QuestionDotToken */], [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), + rule("NoSpaceAfterDot", [24 /* DotToken */, 28 /* QuestionDotToken */], anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), rule("NoSpaceBetweenImportParenInImportType", 95 /* ImportKeyword */, 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* DeleteSpace */), // Special handling of unary operators. // Prefix operators generally shouldn't have a space between @@ -119001,7 +119514,10 @@ var ts; if (ts.isCallOrNewExpression(parent)) { if (!parent.arguments) return false; - var currentNode = ts.Debug.assertDefined(ts.find(parent.arguments, function (arg) { return arg.pos === child.pos; })); + var currentNode = ts.find(parent.arguments, function (arg) { return arg.pos === child.pos; }); + // If it's not one of the arguments, don't look past this + if (!currentNode) + return false; var currentIndex = parent.arguments.indexOf(currentNode); if (currentIndex === 0) return false; // Can't look at previous node if first @@ -119420,6 +119936,18 @@ var ts; cb(tracker); return tracker.getChanges(); }; + ChangeTracker.prototype.pushRaw = function (sourceFile, change) { + ts.Debug.assertEqual(sourceFile.fileName, change.fileName); + for (var _i = 0, _a = change.textChanges; _i < _a.length; _i++) { + var c = _a[_i]; + this.changes.push({ + kind: ChangeKind.Text, + sourceFile: sourceFile, + text: c.newText, + range: ts.createTextRangeFromSpan(c.span), + }); + } + }; ChangeTracker.prototype.deleteRange = function (sourceFile, range) { this.changes.push({ kind: ChangeKind.Remove, sourceFile: sourceFile, range: range }); }; @@ -119548,7 +120076,7 @@ var ts; endNode = ts.findChildOfKind(node, 21 /* CloseParenToken */, sourceFile); if (!endNode) { if (!ts.isArrowFunction(node)) - return; // Function missing parentheses, give up + return false; // Function missing parentheses, give up // If no `)`, is an arrow function `x => x`, so use the end of the first parameter endNode = ts.first(node.parameters); } @@ -119557,6 +120085,7 @@ var ts; endNode = node.kind !== 241 /* VariableDeclaration */ && node.questionToken ? node.questionToken : node.name; } this.insertNodeAt(sourceFile, endNode.end, type, { prefix: ": " }); + return true; }; ChangeTracker.prototype.tryInsertThisTypeAnnotation = function (sourceFile, node, type) { var start = ts.findChildOfKind(node, 20 /* OpenParenToken */, sourceFile).getStart(sourceFile) + 1; @@ -121183,20 +121712,20 @@ var ts; codefix.registerCodeFix({ errorCodes: errorCodes, getCodeActions: function (context) { - var sourceFile = context.sourceFile, program = context.program, start = context.span.start, errorCode = context.errorCode, cancellationToken = context.cancellationToken, host = context.host; + var sourceFile = context.sourceFile, program = context.program, start = context.span.start, errorCode = context.errorCode, cancellationToken = context.cancellationToken, host = context.host, formatContext = context.formatContext, preferences = context.preferences; var token = ts.getTokenAtPosition(sourceFile, start); var declaration; - var changes = ts.textChanges.ChangeTracker.with(context, function (changes) { declaration = doChange(changes, sourceFile, token, errorCode, program, cancellationToken, /*markSeen*/ ts.returnTrue, host); }); + var changes = ts.textChanges.ChangeTracker.with(context, function (changes) { declaration = doChange(changes, sourceFile, token, errorCode, program, cancellationToken, /*markSeen*/ ts.returnTrue, host, formatContext, preferences); }); var name = declaration && ts.getNameOfDeclaration(declaration); return !name || changes.length === 0 ? undefined : [codefix.createCodeFixAction(fixId, changes, [getDiagnostic(errorCode, token), name.getText(sourceFile)], fixId, ts.Diagnostics.Infer_all_types_from_usage)]; }, fixIds: [fixId], getAllCodeActions: function (context) { - var sourceFile = context.sourceFile, program = context.program, cancellationToken = context.cancellationToken, host = context.host; + var sourceFile = context.sourceFile, program = context.program, cancellationToken = context.cancellationToken, host = context.host, formatContext = context.formatContext, preferences = context.preferences; var markSeen = ts.nodeSeenTracker(); return codefix.codeFixAll(context, errorCodes, function (changes, err) { - doChange(changes, sourceFile, ts.getTokenAtPosition(err.file, err.start), err.code, program, cancellationToken, markSeen, host); + doChange(changes, sourceFile, ts.getTokenAtPosition(err.file, err.start), err.code, program, cancellationToken, markSeen, host, formatContext, preferences); }); }, }); @@ -121236,7 +121765,7 @@ var ts; } return errorCode; } - function doChange(changes, sourceFile, token, errorCode, program, cancellationToken, markSeen, host) { + function doChange(changes, sourceFile, token, errorCode, program, cancellationToken, markSeen, host, formatContext, preferences) { if (!ts.isParameterPropertyModifier(token.kind) && token.kind !== 75 /* Identifier */ && token.kind !== 25 /* DotDotDotToken */ && token.kind !== 103 /* ThisKeyword */) { return undefined; } @@ -121247,7 +121776,7 @@ var ts; case ts.Diagnostics.Member_0_implicitly_has_an_1_type.code: case ts.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code: if ((ts.isVariableDeclaration(parent) && markSeen(parent)) || ts.isPropertyDeclaration(parent) || ts.isPropertySignature(parent)) { // handle bad location - annotateVariableDeclaration(changes, sourceFile, parent, program, host, cancellationToken); + annotateVariableDeclaration(changes, sourceFile, parent, program, host, cancellationToken, formatContext, preferences); return parent; } if (ts.isPropertyAccessExpression(parent)) { @@ -121264,7 +121793,7 @@ var ts; case ts.Diagnostics.Variable_0_implicitly_has_an_1_type.code: { var symbol = program.getTypeChecker().getSymbolAtLocation(token); if (symbol && symbol.valueDeclaration && ts.isVariableDeclaration(symbol.valueDeclaration) && markSeen(symbol.valueDeclaration)) { - annotateVariableDeclaration(changes, sourceFile, symbol.valueDeclaration, program, host, cancellationToken); + annotateVariableDeclaration(changes, sourceFile, symbol.valueDeclaration, program, host, cancellationToken, formatContext, preferences); return symbol.valueDeclaration; } return undefined; @@ -121278,14 +121807,14 @@ var ts; // Parameter declarations case ts.Diagnostics.Parameter_0_implicitly_has_an_1_type.code: if (ts.isSetAccessorDeclaration(containingFunction)) { - annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken); + annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken, formatContext, preferences); return containingFunction; } // falls through case ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code: if (markSeen(containingFunction)) { var param = ts.cast(parent, ts.isParameter); - annotateParameters(changes, sourceFile, param, containingFunction, program, host, cancellationToken); + annotateParameters(changes, sourceFile, param, containingFunction, program, host, cancellationToken, formatContext, preferences); return param; } return undefined; @@ -121293,14 +121822,14 @@ var ts; case ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code: case ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code: if (ts.isGetAccessorDeclaration(containingFunction) && ts.isIdentifier(containingFunction.name)) { - annotate(changes, sourceFile, containingFunction, inferTypeForVariableFromUsage(containingFunction.name, program, cancellationToken), program, host); + annotate(changes, sourceFile, containingFunction, inferTypeForVariableFromUsage(containingFunction.name, program, cancellationToken), program, host, formatContext, preferences); return containingFunction; } return undefined; // Set Accessor declarations case ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code: if (ts.isSetAccessorDeclaration(containingFunction)) { - annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken); + annotateSetAccessor(changes, sourceFile, containingFunction, program, host, cancellationToken, formatContext, preferences); return containingFunction; } return undefined; @@ -121315,12 +121844,12 @@ var ts; return ts.Debug.fail(String(errorCode)); } } - function annotateVariableDeclaration(changes, sourceFile, declaration, program, host, cancellationToken) { + function annotateVariableDeclaration(changes, sourceFile, declaration, program, host, cancellationToken, formatContext, preferences) { if (ts.isIdentifier(declaration.name)) { - annotate(changes, sourceFile, declaration, inferTypeForVariableFromUsage(declaration.name, program, cancellationToken), program, host); + annotate(changes, sourceFile, declaration, inferTypeForVariableFromUsage(declaration.name, program, cancellationToken), program, host, formatContext, preferences); } } - function annotateParameters(changes, sourceFile, parameterDeclaration, containingFunction, program, host, cancellationToken) { + function annotateParameters(changes, sourceFile, parameterDeclaration, containingFunction, program, host, cancellationToken, formatContext, preferences) { if (!ts.isIdentifier(parameterDeclaration.name)) { return; } @@ -121336,7 +121865,7 @@ var ts; for (var _i = 0, parameterInferences_1 = parameterInferences; _i < parameterInferences_1.length; _i++) { var _a = parameterInferences_1[_i], declaration = _a.declaration, type = _a.type; if (declaration && !declaration.type && !declaration.initializer) { - annotate(changes, sourceFile, declaration, type, program, host); + annotate(changes, sourceFile, declaration, type, program, host, formatContext, preferences); } } if (needParens) @@ -121365,7 +121894,7 @@ var ts; ts.createJSDocThisTag(ts.createJSDocTypeExpression(typeNode)), ]); } - function annotateSetAccessor(changes, sourceFile, setAccessorDeclaration, program, host, cancellationToken) { + function annotateSetAccessor(changes, sourceFile, setAccessorDeclaration, program, host, cancellationToken, formatContext, preferences) { var param = ts.firstOrUndefined(setAccessorDeclaration.parameters); if (param && ts.isIdentifier(setAccessorDeclaration.name) && ts.isIdentifier(param.name)) { var type = inferTypeForVariableFromUsage(setAccessorDeclaration.name, program, cancellationToken); @@ -121376,11 +121905,11 @@ var ts; annotateJSDocParameters(changes, sourceFile, [{ declaration: param, type: type }], program, host); } else { - annotate(changes, sourceFile, param, type, program, host); + annotate(changes, sourceFile, param, type, program, host, formatContext, preferences); } } } - function annotate(changes, sourceFile, declaration, type, program, host) { + function annotate(changes, sourceFile, declaration, type, program, host, formatContext, preferences) { var typeNode = ts.getTypeNodeIfAccessible(type, declaration, program, host); if (typeNode) { if (ts.isInJSFile(sourceFile) && declaration.kind !== 157 /* PropertySignature */) { @@ -121392,11 +121921,32 @@ var ts; var typeTag = ts.isGetAccessorDeclaration(declaration) ? ts.createJSDocReturnTag(typeExpression, "") : ts.createJSDocTypeTag(typeExpression, ""); addJSDocTags(changes, sourceFile, parent, [typeTag]); } - else { + else if (!tryReplaceImportTypeNodeWithAutoImport(typeNode, changes, sourceFile, declaration, type, program, host, formatContext, preferences)) { changes.tryInsertTypeAnnotation(sourceFile, declaration, typeNode); } } } + function tryReplaceImportTypeNodeWithAutoImport(typeNode, changes, sourceFile, declaration, type, program, host, formatContext, preferences) { + var _a; + if (ts.isLiteralImportTypeNode(typeNode) && typeNode.qualifier && type.symbol) { + // Replace 'import("./a").SomeType' with 'SomeType' and an actual import if possible + var moduleSymbol = (_a = ts.find(type.symbol.declarations, function (d) { return !!d.getSourceFile().externalModuleIndicator; })) === null || _a === void 0 ? void 0 : _a.getSourceFile().symbol; + // Symbol for the left-most thing after the dot + if (moduleSymbol) { + var symbol = ts.getFirstIdentifier(typeNode.qualifier).symbol; + var action = codefix.getImportCompletionAction(symbol, moduleSymbol, sourceFile, symbol.name, host, program, formatContext, declaration.pos, preferences); + if (action.codeAction.changes.length && changes.tryInsertTypeAnnotation(sourceFile, declaration, ts.createTypeReferenceNode(typeNode.qualifier, typeNode.typeArguments))) { + for (var _i = 0, _b = action.codeAction.changes; _i < _b.length; _i++) { + var change = _b[_i]; + var file = sourceFile.fileName === change.fileName ? sourceFile : ts.Debug.assertDefined(program.getSourceFile(change.fileName)); + changes.pushRaw(file, change); + } + return true; + } + } + } + return false; + } function annotateJSDocParameters(changes, sourceFile, parameterInferences, program, host) { var signature = parameterInferences.length && parameterInferences[0].declaration.parent; if (!signature) { @@ -122088,7 +122638,7 @@ var ts; } var returnType = combineFromUsage(combineUsages(calls.map(function (call) { return call.return_; }))); // TODO: GH#18217 - return checker.createSignature(/*declaration*/ undefined, /*typeParameters*/ undefined, /*thisParameter*/ undefined, parameters, returnType, /*typePredicate*/ undefined, length, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); + return checker.createSignature(/*declaration*/ undefined, /*typeParameters*/ undefined, /*thisParameter*/ undefined, parameters, returnType, /*typePredicate*/ undefined, length, 0 /* None */); } function addCandidateType(usage, type) { if (type && !(type.flags & 1 /* Any */) && !(type.flags & 131072 /* Never */)) { @@ -123895,6 +124445,7 @@ var ts; var filteredCount = 0; var packageJson = filterByPackageJson && createAutoImportFilter(from, program, host); var allSourceFiles = program.getSourceFiles(); + var globalTypingsCache = host.getGlobalTypingsCacheLocation && host.getGlobalTypingsCacheLocation(); forEachExternalModule(program.getTypeChecker(), allSourceFiles, function (module, sourceFile) { if (sourceFile === undefined) { if (!packageJson || packageJson.allowsImportingAmbientModule(module, allSourceFiles)) { @@ -123904,7 +124455,9 @@ var ts; filteredCount++; } } - else if (sourceFile && sourceFile !== from && isImportablePath(from.fileName, sourceFile.fileName)) { + else if (sourceFile && + sourceFile !== from && + isImportablePath(from.fileName, sourceFile.fileName, ts.hostGetCanonicalFileName(host), globalTypingsCache)) { if (!packageJson || packageJson.allowsImportingSourceFile(sourceFile, allSourceFiles)) { cb(module); } @@ -123934,10 +124487,13 @@ var ts; * 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. */ - function isImportablePath(fromPath, toPath) { + function isImportablePath(fromPath, toPath, getCanonicalFileName, globalCachePath) { // If it's in a `node_modules` but is not reachable from here via a global import, don't bother. var toNodeModules = ts.forEachAncestorDirectory(toPath, function (ancestor) { return ts.getBaseFileName(ancestor) === "node_modules" ? ancestor : undefined; }); - return toNodeModules === undefined || ts.startsWith(fromPath, ts.getDirectoryPath(toNodeModules)); + var toNodeModulesParent = toNodeModules && ts.getDirectoryPath(getCanonicalFileName(toNodeModules)); + return toNodeModulesParent === undefined + || ts.startsWith(getCanonicalFileName(fromPath), toNodeModulesParent) + || (!!globalCachePath && ts.startsWith(getCanonicalFileName(globalCachePath), toNodeModulesParent)); } function moduleSymbolToValidIdentifier(moduleSymbol, target) { return moduleSpecifierToValidIdentifier(ts.removeFileExtension(ts.stripQuotes(moduleSymbol.name)), target); @@ -123982,6 +124538,7 @@ var ts; readFile: ts.maybeBind(host, host.readFile), useCaseSensitiveFileNames: ts.maybeBind(host, host.useCaseSensitiveFileNames), getProbableSymlinks: ts.maybeBind(host, host.getProbableSymlinks) || program.getProbableSymlinks, + getGlobalTypingsCacheLocation: ts.maybeBind(host, host.getGlobalTypingsCacheLocation), }; var usesNodeCoreModules; return { allowsImportingAmbientModule: allowsImportingAmbientModule, allowsImportingSourceFile: allowsImportingSourceFile, allowsImportingSpecifier: allowsImportingSpecifier }; @@ -125557,14 +126114,14 @@ var ts; for (var _i = 0, signatures_2 = signatures; _i < signatures_2.length; _i++) { var sig = signatures_2[_i]; minArgumentCount = Math.min(sig.minArgumentCount, minArgumentCount); - if (sig.hasRestParameter) { + if (ts.signatureHasRestParameter(sig)) { someSigHasRestParameter = true; } - if (sig.parameters.length >= maxArgsSignature.parameters.length && (!sig.hasRestParameter || maxArgsSignature.hasRestParameter)) { + if (sig.parameters.length >= maxArgsSignature.parameters.length && (!ts.signatureHasRestParameter(sig) || ts.signatureHasRestParameter(maxArgsSignature))) { maxArgsSignature = sig; } } - var maxNonRestArgs = maxArgsSignature.parameters.length - (maxArgsSignature.hasRestParameter ? 1 : 0); + var maxNonRestArgs = maxArgsSignature.parameters.length - (ts.signatureHasRestParameter(maxArgsSignature) ? 1 : 0); var maxArgsParameterSymbolNames = maxArgsSignature.parameters.map(function (symbol) { return symbol.name; }); var parameters = createDummyParameters(maxNonRestArgs, maxArgsParameterSymbolNames, /* types */ undefined, minArgumentCount, /*inJs*/ false); if (someSigHasRestParameter) { @@ -128049,7 +128606,7 @@ var ts; if (!selection || !ts.isTypeNode(selection)) return undefined; var checker = context.program.getTypeChecker(); - var firstStatement = ts.Debug.assertDefined(isJS ? ts.findAncestor(selection, isStatementAndHasJSDoc) : ts.findAncestor(selection, ts.isStatement), "Should find a statement"); + var firstStatement = ts.Debug.assertDefined(ts.findAncestor(selection, ts.isStatement), "Should find a statement"); var typeParameters = collectTypeParameters(checker, selection, firstStatement, file); if (!typeParameters) return undefined; @@ -128080,9 +128637,6 @@ var ts; } return undefined; } - function isStatementAndHasJSDoc(n) { - return ts.isStatement(n) && ts.hasJSDocNodes(n); - } function rangeContainsSkipTrivia(r1, node, file) { return ts.rangeContainsStartEnd(r1, ts.skipTrivia(file.text, node.pos), node.end); } @@ -130006,8 +130560,9 @@ var ts; return TypeObject; }()); var SignatureObject = /** @class */ (function () { - function SignatureObject(checker) { + function SignatureObject(checker, flags) { this.checker = checker; + this.flags = flags; } SignatureObject.prototype.getDeclaration = function () { return this.declaration; @@ -130045,13 +130600,12 @@ var ts; return ts.emptyArray; var doc = ts.JsDoc.getJsDocCommentsFromDeclarations(declarations); if (doc.length === 0 || declarations.some(hasJSDocInheritDocTag)) { - for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) { - var declaration = declarations_4[_i]; + ts.forEachUnique(declarations, function (declaration) { var inheritedDocs = findInheritedJSDocComments(declaration, declaration.symbol.name, checker); // TODO: GH#18217 // TODO: GH#16312 Return a ReadonlyArray, avoid copying inheritedDocs if (inheritedDocs) doc = doc.length === 0 ? inheritedDocs.slice() : inheritedDocs.concat(ts.lineBreakPart(), doc); - } + }); } return doc; } @@ -130362,9 +130916,7 @@ var ts; names.push(entry); } else { - if (entry.scriptKind !== 6 /* JSON */) { - names.push(entry.hostFileName); - } + names.push(entry.hostFileName); } }); return names; @@ -130932,12 +131484,11 @@ var ts; var sourceFiles = fileName ? [getValidSourceFile(fileName)] : program.getSourceFiles(); return ts.NavigateTo.getNavigateToItems(sourceFiles, program.getTypeChecker(), cancellationToken, searchValue, maxResultCount, excludeDtsFiles); } - function getEmitOutput(fileName, emitOnlyDtsFiles) { - if (emitOnlyDtsFiles === void 0) { emitOnlyDtsFiles = false; } + function getEmitOutput(fileName, emitOnlyDtsFiles, forceDtsEmit) { synchronizeHostData(); var sourceFile = getValidSourceFile(fileName); var customTransformers = host.getCustomTransformers && host.getCustomTransformers(); - return ts.getFileEmitOutput(program, sourceFile, emitOnlyDtsFiles, cancellationToken, customTransformers); + return ts.getFileEmitOutput(program, sourceFile, !!emitOnlyDtsFiles, cancellationToken, customTransformers, forceDtsEmit); } // Signature help /** diff --git a/lib/typingsInstaller.js b/lib/typingsInstaller.js index 82af4dd532d..444ea34294a 100644 --- a/lib/typingsInstaller.js +++ b/lib/typingsInstaller.js @@ -81,7 +81,7 @@ var ts; (function (ts) { // WARNING: The script `configureNightly.ts` uses a regexp to parse out these values. // If changing the text in this section, be sure to test `configureNightly` too. - ts.versionMajorMinor = "3.7"; + ts.versionMajorMinor = "3.8"; /** The version of the TypeScript compiler release */ ts.version = ts.versionMajorMinor + ".0-dev"; })(ts || (ts = {})); @@ -96,22 +96,32 @@ var ts; })(ts || (ts = {})); /* @internal */ (function (ts) { - ts.emptyArray = []; - /** Create a MapLike with good performance. */ - function createDictionaryObject() { - var map = Object.create(/*prototype*/ null); // eslint-disable-line no-null/no-null - // Using 'delete' on an object causes V8 to put the object in dictionary mode. - // This disables creation of hidden classes, which are expensive when an object is - // constantly changing shape. - map.__ = undefined; - delete map.__; - return map; + /** + * Returns the native Map implementation if it is available and compatible (i.e. supports iteration). + */ + function tryGetNativeMap() { + // Internet Explorer's Map doesn't support iteration, so don't use it. + // eslint-disable-next-line no-in-operator + return typeof Map !== "undefined" && "entries" in Map.prototype ? Map : undefined; } - /** Create a new map. If a template object is provided, the map will copy entries from it. */ + ts.tryGetNativeMap = tryGetNativeMap; +})(ts || (ts = {})); +/* @internal */ +(function (ts) { + ts.emptyArray = []; + ts.Map = ts.tryGetNativeMap() || (function () { + // NOTE: createMapShim will be defined for typescriptServices.js but not for tsc.js, so we must test for it. + if (typeof ts.createMapShim === "function") { + return ts.createMapShim(); + } + throw new Error("TypeScript requires an environment that provides a compatible native Map implementation."); + })(); + /** Create a new map. */ function createMap() { - return new ts.MapCtr(); + return new ts.Map(); } ts.createMap = createMap; + /** Create a new map from an array of entries. */ function createMapFromEntries(entries) { var map = createMap(); for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) { @@ -121,8 +131,9 @@ var ts; return map; } ts.createMapFromEntries = createMapFromEntries; + /** Create a new map from a template object is provided, the map will copy entries from it. */ function createMapFromTemplate(template) { - var map = new ts.MapCtr(); + var map = new ts.Map(); // Copies keys/values from template. Note that for..in will not throw if // template is undefined, and instead will just exit the loop. for (var key in template) { @@ -133,147 +144,6 @@ var ts; return map; } ts.createMapFromTemplate = createMapFromTemplate; - // Internet Explorer's Map doesn't support iteration, so don't use it. - // eslint-disable-next-line no-in-operator - ts.MapCtr = typeof Map !== "undefined" && "entries" in Map.prototype ? Map : shimMap(); - // Keep the class inside a function so it doesn't get compiled if it's not used. - function shimMap() { - var MapIterator = /** @class */ (function () { - function MapIterator(currentEntry, selector) { - this.currentEntry = currentEntry; - this.selector = selector; - } - MapIterator.prototype.next = function () { - // Navigate to the next entry. - while (this.currentEntry) { - var skipNext = !!this.currentEntry.skipNext; - this.currentEntry = this.currentEntry.nextEntry; - if (!skipNext) { - break; - } - } - if (this.currentEntry) { - return { value: this.selector(this.currentEntry.key, this.currentEntry.value), done: false }; - } - else { - return { value: undefined, done: true }; - } - }; - return MapIterator; - }()); - return /** @class */ (function () { - function class_1() { - this.data = createDictionaryObject(); - this.size = 0; - // Create a first (stub) map entry that will not contain a key - // and value but serves as starting point for iterators. - this.firstEntry = {}; - // When the map is empty, the last entry is the same as the - // first one. - this.lastEntry = this.firstEntry; - } - class_1.prototype.get = function (key) { - var entry = this.data[key]; - return entry && entry.value; - }; - class_1.prototype.set = function (key, value) { - if (!this.has(key)) { - this.size++; - // Create a new entry that will be appended at the - // end of the linked list. - var newEntry = { - key: key, - value: value - }; - this.data[key] = newEntry; - // Adjust the references. - var previousLastEntry = this.lastEntry; - previousLastEntry.nextEntry = newEntry; - newEntry.previousEntry = previousLastEntry; - this.lastEntry = newEntry; - } - else { - this.data[key].value = value; - } - return this; - }; - class_1.prototype.has = function (key) { - // eslint-disable-next-line no-in-operator - return key in this.data; - }; - class_1.prototype.delete = function (key) { - if (this.has(key)) { - this.size--; - var entry = this.data[key]; - delete this.data[key]; - // Adjust the linked list references of the neighbor entries. - var previousEntry = entry.previousEntry; - previousEntry.nextEntry = entry.nextEntry; - if (entry.nextEntry) { - entry.nextEntry.previousEntry = previousEntry; - } - // When the deleted entry was the last one, we need to - // adjust the lastEntry reference. - if (this.lastEntry === entry) { - this.lastEntry = previousEntry; - } - // Adjust the forward reference of the deleted entry - // in case an iterator still references it. This allows us - // to throw away the entry, but when an active iterator - // (which points to the current entry) continues, it will - // navigate to the entry that originally came before the - // current one and skip it. - entry.previousEntry = undefined; - entry.nextEntry = previousEntry; - entry.skipNext = true; - return true; - } - return false; - }; - class_1.prototype.clear = function () { - this.data = createDictionaryObject(); - this.size = 0; - // Reset the linked list. Note that we must adjust the forward - // references of the deleted entries to ensure iterators stuck - // in the middle of the list don't continue with deleted entries, - // but can continue with new entries added after the clear() - // operation. - var firstEntry = this.firstEntry; - var currentEntry = firstEntry.nextEntry; - while (currentEntry) { - var nextEntry = currentEntry.nextEntry; - currentEntry.previousEntry = undefined; - currentEntry.nextEntry = firstEntry; - currentEntry.skipNext = true; - currentEntry = nextEntry; - } - firstEntry.nextEntry = undefined; - this.lastEntry = firstEntry; - }; - class_1.prototype.keys = function () { - return new MapIterator(this.firstEntry, function (key) { return key; }); - }; - class_1.prototype.values = function () { - return new MapIterator(this.firstEntry, function (_key, value) { return value; }); - }; - class_1.prototype.entries = function () { - return new MapIterator(this.firstEntry, function (key, value) { return [key, value]; }); - }; - class_1.prototype.forEach = function (action) { - var iterator = this.entries(); - while (true) { - var iterResult = iterator.next(); - if (iterResult.done) { - break; - } - var _a = iterResult.value, key = _a[0], value = _a[1]; - action(value, key); - } - }; - return class_1; - }()); - } - ts.shimMap = shimMap; function length(array) { return array ? array.length : 0; } @@ -1855,20 +1725,6 @@ var ts; return str.indexOf(substring) !== -1; } ts.stringContains = stringContains; - function fileExtensionIs(path, extension) { - return path.length > extension.length && endsWith(path, extension); - } - ts.fileExtensionIs = fileExtensionIs; - function fileExtensionIsOneOf(path, extensions) { - for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) { - var extension = extensions_1[_i]; - if (fileExtensionIs(path, extension)) { - return true; - } - } - return false; - } - ts.fileExtensionIsOneOf = fileExtensionIsOneOf; /** * Takes a string like "jquery-min.4.2.3" and returns "jquery" */ @@ -2182,11 +2038,14 @@ var ts; if (isFlags) { var result = ""; var remainingFlags = value; - for (var i = members.length - 1; i >= 0 && remainingFlags !== 0; i--) { - var _a = members[i], enumValue = _a[0], enumName = _a[1]; - if (enumValue !== 0 && (remainingFlags & enumValue) === enumValue) { + for (var _i = 0, members_1 = members; _i < members_1.length; _i++) { + var _a = members_1[_i], enumValue = _a[0], enumName = _a[1]; + if (enumValue > value) { + break; + } + if (enumValue !== 0 && enumValue & value) { + result = "" + result + (result ? "|" : "") + enumName; remainingFlags &= ~enumValue; - result = "" + enumName + (result ? "|" : "") + result; } } if (remainingFlags === 0) { @@ -2194,8 +2053,8 @@ var ts; } } else { - for (var _i = 0, members_1 = members; _i < members_1.length; _i++) { - var _b = members_1[_i], enumValue = _b[0], enumName = _b[1]; + for (var _b = 0, members_2 = members; _b < members_2.length; _b++) { + var _c = members_2[_b], enumValue = _c[0], enumName = _c[1]; if (enumValue === value) { return enumName; } @@ -2269,6 +2128,33 @@ var ts; ? function (node, message) { return assert(node === undefined, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was unexpected'."; }, Debug.assertMissingNode); } : ts.noop; var isDebugInfoEnabled = false; + var extendedDebugModule; + function extendedDebug() { + enableDebugInfo(); + if (!extendedDebugModule) { + throw new Error("Debugging helpers could not be loaded."); + } + return extendedDebugModule; + } + function printControlFlowGraph(flowNode) { + return console.log(formatControlFlowGraph(flowNode)); + } + Debug.printControlFlowGraph = printControlFlowGraph; + function formatControlFlowGraph(flowNode) { + return extendedDebug().formatControlFlowGraph(flowNode); + } + Debug.formatControlFlowGraph = formatControlFlowGraph; + function attachFlowNodeDebugInfo(flowNode) { + if (isDebugInfoEnabled) { + if (!("__debugFlowFlags" in flowNode)) { // eslint-disable-line no-in-operator + Object.defineProperties(flowNode, { + __debugFlowFlags: { get: function () { return formatEnum(this.flags, ts.FlowFlags, /*isFlags*/ true); } }, + __debugToString: { value: function () { return formatControlFlowGraph(this); } } + }); + } + } + } + Debug.attachFlowNodeDebugInfo = attachFlowNodeDebugInfo; /** * Injects debug information into frequently used types. */ @@ -2312,6 +2198,20 @@ var ts; }); } } + // attempt to load extended debugging information + try { + if (ts.sys && ts.sys.require) { + var basePath = ts.getDirectoryPath(ts.resolvePath(ts.sys.getExecutingFilePath())); + var result = ts.sys.require(basePath, "./compiler-debug"); + if (!result.error) { + result.module.init(ts); + extendedDebugModule = result.module; + } + } + } + catch (_a) { + // do nothing + } isDebugInfoEnabled = true; } Debug.enableDebugInfo = enableDebugInfo; @@ -2475,8 +2375,6 @@ var ts; } /** Performance logger that will generate ETW events if possible - check for `logEvent` member, as `etwModule` will be `{}` when browserified */ ts.perfLogger = etwModule && etwModule.logEvent ? etwModule : nullLogger; - var args = typeof process === "undefined" ? [] : process.argv; - ts.perfLogger.logInfoEvent("Starting TypeScript v" + ts.versionMajorMinor + " with command line: " + JSON.stringify(args)); })(ts || (ts = {})); /* @internal */ var ts; @@ -3371,6 +3269,7 @@ var ts; /* @internal */ TokenFlags[TokenFlags["NumericLiteralFlags"] = 1008] = "NumericLiteralFlags"; })(TokenFlags = ts.TokenFlags || (ts.TokenFlags = {})); + // NOTE: Ensure this is up-to-date with src/debug/debug.ts var FlowFlags; (function (FlowFlags) { FlowFlags[FlowFlags["Unreachable"] = 1] = "Unreachable"; @@ -3426,6 +3325,8 @@ var ts; // When build skipped because passed in project is invalid ExitStatus[ExitStatus["InvalidProject_OutputsSkipped"] = 3] = "InvalidProject_OutputsSkipped"; // When build is skipped because project references form cycle + ExitStatus[ExitStatus["ProjectReferenceCycle_OutputsSkipped"] = 4] = "ProjectReferenceCycle_OutputsSkipped"; + /** @deprecated Use ProjectReferenceCycle_OutputsSkipped instead. */ ExitStatus[ExitStatus["ProjectReferenceCycle_OutputsSkupped"] = 4] = "ProjectReferenceCycle_OutputsSkupped"; })(ExitStatus = ts.ExitStatus || (ts.ExitStatus = {})); /* @internal */ @@ -3435,6 +3336,14 @@ var ts; UnionReduction[UnionReduction["Literal"] = 1] = "Literal"; UnionReduction[UnionReduction["Subtype"] = 2] = "Subtype"; })(UnionReduction = ts.UnionReduction || (ts.UnionReduction = {})); + /* @internal */ + var ContextFlags; + (function (ContextFlags) { + ContextFlags[ContextFlags["None"] = 0] = "None"; + ContextFlags[ContextFlags["Signature"] = 1] = "Signature"; + ContextFlags[ContextFlags["NoConstraints"] = 2] = "NoConstraints"; + ContextFlags[ContextFlags["Completion"] = 4] = "Completion"; + })(ContextFlags = ts.ContextFlags || (ts.ContextFlags = {})); // NOTE: If modifying this enum, must modify `TypeFormatFlags` too! var NodeBuilderFlags; (function (NodeBuilderFlags) { @@ -3837,19 +3746,20 @@ var ts; ObjectFlags[ObjectFlags["JSLiteral"] = 16384] = "JSLiteral"; ObjectFlags[ObjectFlags["FreshLiteral"] = 32768] = "FreshLiteral"; ObjectFlags[ObjectFlags["ArrayLiteral"] = 65536] = "ArrayLiteral"; + ObjectFlags[ObjectFlags["ObjectRestType"] = 131072] = "ObjectRestType"; /* @internal */ - ObjectFlags[ObjectFlags["PrimitiveUnion"] = 131072] = "PrimitiveUnion"; + ObjectFlags[ObjectFlags["PrimitiveUnion"] = 262144] = "PrimitiveUnion"; /* @internal */ - ObjectFlags[ObjectFlags["ContainsWideningType"] = 262144] = "ContainsWideningType"; + ObjectFlags[ObjectFlags["ContainsWideningType"] = 524288] = "ContainsWideningType"; /* @internal */ - ObjectFlags[ObjectFlags["ContainsObjectOrArrayLiteral"] = 524288] = "ContainsObjectOrArrayLiteral"; + ObjectFlags[ObjectFlags["ContainsObjectOrArrayLiteral"] = 1048576] = "ContainsObjectOrArrayLiteral"; /* @internal */ - ObjectFlags[ObjectFlags["NonInferrableType"] = 1048576] = "NonInferrableType"; + ObjectFlags[ObjectFlags["NonInferrableType"] = 2097152] = "NonInferrableType"; ObjectFlags[ObjectFlags["ClassOrInterface"] = 3] = "ClassOrInterface"; /* @internal */ - ObjectFlags[ObjectFlags["RequiresWidening"] = 786432] = "RequiresWidening"; + ObjectFlags[ObjectFlags["RequiresWidening"] = 1572864] = "RequiresWidening"; /* @internal */ - ObjectFlags[ObjectFlags["PropagatingFlags"] = 1835008] = "PropagatingFlags"; + ObjectFlags[ObjectFlags["PropagatingFlags"] = 3670016] = "PropagatingFlags"; })(ObjectFlags = ts.ObjectFlags || (ts.ObjectFlags = {})); /* @internal */ var VarianceFlags; @@ -3876,6 +3786,20 @@ var ts; SignatureKind[SignatureKind["Call"] = 0] = "Call"; SignatureKind[SignatureKind["Construct"] = 1] = "Construct"; })(SignatureKind = ts.SignatureKind || (ts.SignatureKind = {})); + /* @internal */ + var SignatureFlags; + (function (SignatureFlags) { + SignatureFlags[SignatureFlags["None"] = 0] = "None"; + SignatureFlags[SignatureFlags["HasRestParameter"] = 1] = "HasRestParameter"; + SignatureFlags[SignatureFlags["HasLiteralTypes"] = 2] = "HasLiteralTypes"; + SignatureFlags[SignatureFlags["IsInnerCallChain"] = 4] = "IsInnerCallChain"; + SignatureFlags[SignatureFlags["IsOuterCallChain"] = 8] = "IsOuterCallChain"; + // We do not propagate `IsInnerCallChain` to instantiated signatures, as that would result in us + // attempting to add `| undefined` on each recursive call to `getReturnTypeOfSignature` when + // instantiating the return type. + SignatureFlags[SignatureFlags["PropagatingFlags"] = 3] = "PropagatingFlags"; + SignatureFlags[SignatureFlags["CallChainFlags"] = 12] = "CallChainFlags"; + })(SignatureFlags = ts.SignatureFlags || (ts.SignatureFlags = {})); var IndexKind; (function (IndexKind) { IndexKind[IndexKind["String"] = 0] = "String"; @@ -4876,16 +4800,6 @@ var ts; } } ts.createRecursiveDirectoryWatcher = createRecursiveDirectoryWatcher; - function recursiveCreateDirectory(directoryPath, sys) { - var basePath = ts.getDirectoryPath(directoryPath); - var shouldCreateParent = basePath !== "" && directoryPath !== basePath && !sys.directoryExists(basePath); - if (shouldCreateParent) { - recursiveCreateDirectory(basePath, sys); - } - if (shouldCreateParent || !sys.directoryExists(directoryPath)) { - sys.createDirectory(directoryPath); - } - } /** * patch writefile to create folder before writing the file */ @@ -4894,11 +4808,7 @@ var ts; // patch writefile to create folder before writing the file var originalWriteFile = sys.writeFile; sys.writeFile = function (path, data, writeBom) { - var directoryPath = ts.getDirectoryPath(ts.normalizeSlashes(path)); - if (directoryPath && !sys.directoryExists(directoryPath)) { - recursiveCreateDirectory(directoryPath, sys); - } - originalWriteFile.call(sys, path, data, writeBom); + return ts.writeFileEnsuringDirectories(path, data, !!writeBom, function (path, data, writeByteOrderMark) { return originalWriteFile.call(sys, path, data, writeByteOrderMark); }, function (path) { return sys.createDirectory(path); }, function (path) { return sys.directoryExists(path); }); }; } ts.patchWriteFileEnsuringDirectory = patchWriteFileEnsuringDirectory; @@ -5047,6 +4957,15 @@ var ts; bufferFrom: bufferFrom, base64decode: function (input) { return bufferFrom(input, "base64").toString("utf8"); }, base64encode: function (input) { return bufferFrom(input).toString("base64"); }, + require: function (baseDir, moduleName) { + try { + var modulePath = ts.resolveJSModule(moduleName, baseDir, nodeSystem); + return { module: require(modulePath), modulePath: modulePath, error: undefined }; + } + catch (error) { + return { module: undefined, modulePath: undefined, error: error }; + } + } }; return nodeSystem; /** @@ -5185,6 +5104,7 @@ var ts; if (fsSupportsRecursive) { return watchDirectoryUsingFsWatch; } + // defer watchDirectoryRecursively as it depends on `ts.createMap()` which may not be usable yet. var watchDirectory = tscWatchDirectory === "RecursiveDirectoryUsingFsWatchFile" ? createWatchDirectoryUsing(fsWatchFile) : tscWatchDirectory === "RecursiveDirectoryUsingDynamicPriorityPolling" ? @@ -5629,6 +5549,673 @@ var ts; ts.Debug.isDebugging = true; } })(ts || (ts = {})); +/* @internal */ +var ts; +(function (ts) { + /** + * Internally, we represent paths as strings with '/' as the directory separator. + * When we make system calls (eg: LanguageServiceHost.getDirectory()), + * we expect the host to correctly handle paths in our specified format. + */ + ts.directorySeparator = "/"; + var altDirectorySeparator = "\\"; + var urlSchemeSeparator = "://"; + var backslashRegExp = /\\/g; + //// Path Tests + /** + * Determines whether a charCode corresponds to `/` or `\`. + */ + function isAnyDirectorySeparator(charCode) { + return charCode === 47 /* slash */ || charCode === 92 /* backslash */; + } + ts.isAnyDirectorySeparator = isAnyDirectorySeparator; + /** + * Determines whether a path starts with a URL scheme (e.g. starts with `http://`, `ftp://`, `file://`, etc.). + */ + function isUrl(path) { + return getEncodedRootLength(path) < 0; + } + ts.isUrl = isUrl; + /** + * Determines whether a path is an absolute disk path (e.g. starts with `/`, or a dos path + * like `c:`, `c:\` or `c:/`). + */ + function isRootedDiskPath(path) { + return getEncodedRootLength(path) > 0; + } + ts.isRootedDiskPath = isRootedDiskPath; + /** + * Determines whether a path consists only of a path root. + */ + function isDiskPathRoot(path) { + var rootLength = getEncodedRootLength(path); + return rootLength > 0 && rootLength === path.length; + } + ts.isDiskPathRoot = isDiskPathRoot; + /** + * Determines whether a path starts with an absolute path component (i.e. `/`, `c:/`, `file://`, etc.). + * + * ```ts + * // POSIX + * pathIsAbsolute("/path/to/file.ext") === true + * // DOS + * pathIsAbsolute("c:/path/to/file.ext") === true + * // URL + * pathIsAbsolute("file:///path/to/file.ext") === true + * // Non-absolute + * pathIsAbsolute("path/to/file.ext") === false + * pathIsAbsolute("./path/to/file.ext") === false + * ``` + */ + function pathIsAbsolute(path) { + return getEncodedRootLength(path) !== 0; + } + ts.pathIsAbsolute = pathIsAbsolute; + /** + * Determines whether a path starts with a relative path component (i.e. `.` or `..`). + */ + function pathIsRelative(path) { + return /^\.\.?($|[\\/])/.test(path); + } + ts.pathIsRelative = pathIsRelative; + function hasExtension(fileName) { + return ts.stringContains(getBaseFileName(fileName), "."); + } + ts.hasExtension = hasExtension; + function fileExtensionIs(path, extension) { + return path.length > extension.length && ts.endsWith(path, extension); + } + ts.fileExtensionIs = fileExtensionIs; + function fileExtensionIsOneOf(path, extensions) { + for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) { + var extension = extensions_1[_i]; + if (fileExtensionIs(path, extension)) { + return true; + } + } + return false; + } + ts.fileExtensionIsOneOf = fileExtensionIsOneOf; + /** + * Determines whether a path has a trailing separator (`/` or `\\`). + */ + function hasTrailingDirectorySeparator(path) { + return path.length > 0 && isAnyDirectorySeparator(path.charCodeAt(path.length - 1)); + } + ts.hasTrailingDirectorySeparator = hasTrailingDirectorySeparator; + //// Path Parsing + function isVolumeCharacter(charCode) { + return (charCode >= 97 /* a */ && charCode <= 122 /* z */) || + (charCode >= 65 /* A */ && charCode <= 90 /* Z */); + } + function getFileUrlVolumeSeparatorEnd(url, start) { + var ch0 = url.charCodeAt(start); + if (ch0 === 58 /* colon */) + return start + 1; + if (ch0 === 37 /* percent */ && url.charCodeAt(start + 1) === 51 /* _3 */) { + var ch2 = url.charCodeAt(start + 2); + if (ch2 === 97 /* a */ || ch2 === 65 /* A */) + return start + 3; + } + return -1; + } + /** + * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). + * If the root is part of a URL, the twos-complement of the root length is returned. + */ + function getEncodedRootLength(path) { + if (!path) + return 0; + var ch0 = path.charCodeAt(0); + // POSIX or UNC + if (ch0 === 47 /* slash */ || ch0 === 92 /* backslash */) { + if (path.charCodeAt(1) !== ch0) + return 1; // POSIX: "/" (or non-normalized "\") + var p1 = path.indexOf(ch0 === 47 /* slash */ ? ts.directorySeparator : altDirectorySeparator, 2); + if (p1 < 0) + return path.length; // UNC: "//server" or "\\server" + return p1 + 1; // UNC: "//server/" or "\\server\" + } + // DOS + if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58 /* colon */) { + var ch2 = path.charCodeAt(2); + if (ch2 === 47 /* slash */ || ch2 === 92 /* backslash */) + return 3; // DOS: "c:/" or "c:\" + if (path.length === 2) + return 2; // DOS: "c:" (but not "c:d") + } + // URL + var schemeEnd = path.indexOf(urlSchemeSeparator); + if (schemeEnd !== -1) { + var authorityStart = schemeEnd + urlSchemeSeparator.length; + var authorityEnd = path.indexOf(ts.directorySeparator, authorityStart); + if (authorityEnd !== -1) { // URL: "file:///", "file://server/", "file://server/path" + // For local "file" URLs, include the leading DOS volume (if present). + // Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a + // special case interpreted as "the machine from which the URL is being interpreted". + var scheme = path.slice(0, schemeEnd); + var authority = path.slice(authorityStart, authorityEnd); + if (scheme === "file" && (authority === "" || authority === "localhost") && + isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) { + var volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2); + if (volumeSeparatorEnd !== -1) { + if (path.charCodeAt(volumeSeparatorEnd) === 47 /* slash */) { + // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/" + return ~(volumeSeparatorEnd + 1); + } + if (volumeSeparatorEnd === path.length) { + // URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a" + // but not "file:///c:d" or "file:///c%3ad" + return ~volumeSeparatorEnd; + } + } + } + return ~(authorityEnd + 1); // URL: "file://server/", "http://server/" + } + return ~path.length; // URL: "file://server", "http://server" + } + // relative + return 0; + } + /** + * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). + * + * For example: + * ```ts + * getRootLength("a") === 0 // "" + * getRootLength("/") === 1 // "/" + * getRootLength("c:") === 2 // "c:" + * getRootLength("c:d") === 0 // "" + * getRootLength("c:/") === 3 // "c:/" + * getRootLength("c:\\") === 3 // "c:\\" + * getRootLength("//server") === 7 // "//server" + * getRootLength("//server/share") === 8 // "//server/" + * getRootLength("\\\\server") === 7 // "\\\\server" + * getRootLength("\\\\server\\share") === 8 // "\\\\server\\" + * getRootLength("file:///path") === 8 // "file:///" + * getRootLength("file:///c:") === 10 // "file:///c:" + * getRootLength("file:///c:d") === 8 // "file:///" + * getRootLength("file:///c:/path") === 11 // "file:///c:/" + * getRootLength("file://server") === 13 // "file://server" + * getRootLength("file://server/path") === 14 // "file://server/" + * getRootLength("http://server") === 13 // "http://server" + * getRootLength("http://server/path") === 14 // "http://server/" + * ``` + */ + function getRootLength(path) { + var rootLength = getEncodedRootLength(path); + return rootLength < 0 ? ~rootLength : rootLength; + } + ts.getRootLength = getRootLength; + function getDirectoryPath(path) { + path = normalizeSlashes(path); + // If the path provided is itself the root, then return it. + var rootLength = getRootLength(path); + if (rootLength === path.length) + return path; + // return the leading portion of the path up to the last (non-terminal) directory separator + // but not including any trailing directory separator. + path = removeTrailingDirectorySeparator(path); + return path.slice(0, Math.max(rootLength, path.lastIndexOf(ts.directorySeparator))); + } + ts.getDirectoryPath = getDirectoryPath; + function getBaseFileName(path, extensions, ignoreCase) { + path = normalizeSlashes(path); + // if the path provided is itself the root, then it has not file name. + var rootLength = getRootLength(path); + if (rootLength === path.length) + return ""; + // return the trailing portion of the path starting after the last (non-terminal) directory + // separator but not including any trailing directory separator. + path = removeTrailingDirectorySeparator(path); + var name = path.slice(Math.max(getRootLength(path), path.lastIndexOf(ts.directorySeparator) + 1)); + var extension = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(name, extensions, ignoreCase) : undefined; + return extension ? name.slice(0, name.length - extension.length) : name; + } + ts.getBaseFileName = getBaseFileName; + function tryGetExtensionFromPath(path, extension, stringEqualityComparer) { + if (!ts.startsWith(extension, ".")) + extension = "." + extension; + if (path.length >= extension.length && path.charCodeAt(path.length - extension.length) === 46 /* dot */) { + var pathExtension = path.slice(path.length - extension.length); + if (stringEqualityComparer(pathExtension, extension)) { + return pathExtension; + } + } + } + function getAnyExtensionFromPathWorker(path, extensions, stringEqualityComparer) { + if (typeof extensions === "string") { + return tryGetExtensionFromPath(path, extensions, stringEqualityComparer) || ""; + } + for (var _i = 0, extensions_2 = extensions; _i < extensions_2.length; _i++) { + var extension = extensions_2[_i]; + var result = tryGetExtensionFromPath(path, extension, stringEqualityComparer); + if (result) + return result; + } + return ""; + } + function getAnyExtensionFromPath(path, extensions, ignoreCase) { + // Retrieves any string from the final "." onwards from a base file name. + // Unlike extensionFromPath, which throws an exception on unrecognized extensions. + if (extensions) { + return getAnyExtensionFromPathWorker(removeTrailingDirectorySeparator(path), extensions, ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive); + } + var baseFileName = getBaseFileName(path); + var extensionIndex = baseFileName.lastIndexOf("."); + if (extensionIndex >= 0) { + return baseFileName.substring(extensionIndex); + } + return ""; + } + ts.getAnyExtensionFromPath = getAnyExtensionFromPath; + function pathComponents(path, rootLength) { + var root = path.substring(0, rootLength); + var rest = path.substring(rootLength).split(ts.directorySeparator); + if (rest.length && !ts.lastOrUndefined(rest)) + rest.pop(); + return __spreadArrays([root], rest); + } + /** + * Parse a path into an array containing a root component (at index 0) and zero or more path + * components (at indices > 0). The result is not normalized. + * If the path is relative, the root component is `""`. + * If the path is absolute, the root component includes the first path separator (`/`). + * + * ```ts + * // POSIX + * getPathComponents("/path/to/file.ext") === ["/", "path", "to", "file.ext"] + * getPathComponents("/path/to/") === ["/", "path", "to"] + * getPathComponents("/") === ["/"] + * // DOS + * getPathComponents("c:/path/to/file.ext") === ["c:/", "path", "to", "file.ext"] + * getPathComponents("c:/path/to/") === ["c:/", "path", "to"] + * getPathComponents("c:/") === ["c:/"] + * getPathComponents("c:") === ["c:"] + * // URL + * getPathComponents("http://typescriptlang.org/path/to/file.ext") === ["http://typescriptlang.org/", "path", "to", "file.ext"] + * getPathComponents("http://typescriptlang.org/path/to/") === ["http://typescriptlang.org/", "path", "to"] + * getPathComponents("http://typescriptlang.org/") === ["http://typescriptlang.org/"] + * getPathComponents("http://typescriptlang.org") === ["http://typescriptlang.org"] + * getPathComponents("file://server/path/to/file.ext") === ["file://server/", "path", "to", "file.ext"] + * getPathComponents("file://server/path/to/") === ["file://server/", "path", "to"] + * getPathComponents("file://server/") === ["file://server/"] + * getPathComponents("file://server") === ["file://server"] + * getPathComponents("file:///path/to/file.ext") === ["file:///", "path", "to", "file.ext"] + * getPathComponents("file:///path/to/") === ["file:///", "path", "to"] + * getPathComponents("file:///") === ["file:///"] + * getPathComponents("file://") === ["file://"] + */ + function getPathComponents(path, currentDirectory) { + if (currentDirectory === void 0) { currentDirectory = ""; } + path = combinePaths(currentDirectory, path); + return pathComponents(path, getRootLength(path)); + } + ts.getPathComponents = getPathComponents; + //// Path Formatting + /** + * Formats a parsed path consisting of a root component (at index 0) and zero or more path + * segments (at indices > 0). + * + * ```ts + * getPathFromPathComponents(["/", "path", "to", "file.ext"]) === "/path/to/file.ext" + * ``` + */ + function getPathFromPathComponents(pathComponents) { + if (pathComponents.length === 0) + return ""; + var root = pathComponents[0] && ensureTrailingDirectorySeparator(pathComponents[0]); + return root + pathComponents.slice(1).join(ts.directorySeparator); + } + ts.getPathFromPathComponents = getPathFromPathComponents; + //// Path Normalization + /** + * Normalize path separators, converting `\` into `/`. + */ + function normalizeSlashes(path) { + return path.replace(backslashRegExp, ts.directorySeparator); + } + ts.normalizeSlashes = normalizeSlashes; + /** + * Reduce an array of path components to a more simplified path by navigating any + * `"."` or `".."` entries in the path. + */ + function reducePathComponents(components) { + if (!ts.some(components)) + return []; + var reduced = [components[0]]; + for (var i = 1; i < components.length; i++) { + var component = components[i]; + if (!component) + continue; + if (component === ".") + continue; + if (component === "..") { + if (reduced.length > 1) { + if (reduced[reduced.length - 1] !== "..") { + reduced.pop(); + continue; + } + } + else if (reduced[0]) + continue; + } + reduced.push(component); + } + return reduced; + } + ts.reducePathComponents = reducePathComponents; + /** + * Combines paths. If a path is absolute, it replaces any previous path. Relative paths are not simplified. + * + * ```ts + * // Non-rooted + * combinePaths("path", "to", "file.ext") === "path/to/file.ext" + * combinePaths("path", "dir", "..", "to", "file.ext") === "path/dir/../to/file.ext" + * // POSIX + * combinePaths("/path", "to", "file.ext") === "/path/to/file.ext" + * combinePaths("/path", "/to", "file.ext") === "/to/file.ext" + * // DOS + * combinePaths("c:/path", "to", "file.ext") === "c:/path/to/file.ext" + * combinePaths("c:/path", "c:/to", "file.ext") === "c:/to/file.ext" + * // URL + * combinePaths("file:///path", "to", "file.ext") === "file:///path/to/file.ext" + * combinePaths("file:///path", "file:///to", "file.ext") === "file:///to/file.ext" + * ``` + */ + function combinePaths(path) { + var paths = []; + for (var _i = 1; _i < arguments.length; _i++) { + paths[_i - 1] = arguments[_i]; + } + if (path) + path = normalizeSlashes(path); + for (var _a = 0, paths_1 = paths; _a < paths_1.length; _a++) { + var relativePath = paths_1[_a]; + if (!relativePath) + continue; + relativePath = normalizeSlashes(relativePath); + if (!path || getRootLength(relativePath) !== 0) { + path = relativePath; + } + else { + path = ensureTrailingDirectorySeparator(path) + relativePath; + } + } + return path; + } + ts.combinePaths = combinePaths; + /** + * Combines and resolves paths. If a path is absolute, it replaces any previous path. Any + * `.` and `..` path components are resolved. Trailing directory separators are preserved. + * + * ```ts + * resolvePath("/path", "to", "file.ext") === "path/to/file.ext" + * resolvePath("/path", "to", "file.ext/") === "path/to/file.ext/" + * resolvePath("/path", "dir", "..", "to", "file.ext") === "path/to/file.ext" + * ``` + */ + function resolvePath(path) { + var paths = []; + for (var _i = 1; _i < arguments.length; _i++) { + paths[_i - 1] = arguments[_i]; + } + return normalizePath(ts.some(paths) ? combinePaths.apply(void 0, __spreadArrays([path], paths)) : normalizeSlashes(path)); + } + ts.resolvePath = resolvePath; + /** + * Parse a path into an array containing a root component (at index 0) and zero or more path + * components (at indices > 0). The result is normalized. + * If the path is relative, the root component is `""`. + * If the path is absolute, the root component includes the first path separator (`/`). + * + * ```ts + * getNormalizedPathComponents("to/dir/../file.ext", "/path/") === ["/", "path", "to", "file.ext"] + */ + function getNormalizedPathComponents(path, currentDirectory) { + return reducePathComponents(getPathComponents(path, currentDirectory)); + } + ts.getNormalizedPathComponents = getNormalizedPathComponents; + function getNormalizedAbsolutePath(fileName, currentDirectory) { + return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory)); + } + ts.getNormalizedAbsolutePath = getNormalizedAbsolutePath; + function normalizePath(path) { + path = normalizeSlashes(path); + var normalized = getPathFromPathComponents(reducePathComponents(getPathComponents(path))); + return normalized && hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(normalized) : normalized; + } + ts.normalizePath = normalizePath; + function getPathWithoutRoot(pathComponents) { + if (pathComponents.length === 0) + return ""; + return pathComponents.slice(1).join(ts.directorySeparator); + } + function getNormalizedAbsolutePathWithoutRoot(fileName, currentDirectory) { + return getPathWithoutRoot(getNormalizedPathComponents(fileName, currentDirectory)); + } + ts.getNormalizedAbsolutePathWithoutRoot = getNormalizedAbsolutePathWithoutRoot; + function toPath(fileName, basePath, getCanonicalFileName) { + var nonCanonicalizedPath = isRootedDiskPath(fileName) + ? normalizePath(fileName) + : getNormalizedAbsolutePath(fileName, basePath); + return getCanonicalFileName(nonCanonicalizedPath); + } + ts.toPath = toPath; + function normalizePathAndParts(path) { + path = normalizeSlashes(path); + var _a = reducePathComponents(getPathComponents(path)), root = _a[0], parts = _a.slice(1); + if (parts.length) { + var joinedParts = root + parts.join(ts.directorySeparator); + return { path: hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(joinedParts) : joinedParts, parts: parts }; + } + else { + return { path: root, parts: parts }; + } + } + ts.normalizePathAndParts = normalizePathAndParts; + function removeTrailingDirectorySeparator(path) { + if (hasTrailingDirectorySeparator(path)) { + return path.substr(0, path.length - 1); + } + return path; + } + ts.removeTrailingDirectorySeparator = removeTrailingDirectorySeparator; + function ensureTrailingDirectorySeparator(path) { + if (!hasTrailingDirectorySeparator(path)) { + return path + ts.directorySeparator; + } + return path; + } + ts.ensureTrailingDirectorySeparator = ensureTrailingDirectorySeparator; + /** + * Ensures a path is either absolute (prefixed with `/` or `c:`) or dot-relative (prefixed + * with `./` or `../`) so as not to be confused with an unprefixed module name. + * + * ```ts + * ensurePathIsNonModuleName("/path/to/file.ext") === "/path/to/file.ext" + * ensurePathIsNonModuleName("./path/to/file.ext") === "./path/to/file.ext" + * ensurePathIsNonModuleName("../path/to/file.ext") === "../path/to/file.ext" + * ensurePathIsNonModuleName("path/to/file.ext") === "./path/to/file.ext" + * ``` + */ + function ensurePathIsNonModuleName(path) { + return !pathIsAbsolute(path) && !pathIsRelative(path) ? "./" + path : path; + } + ts.ensurePathIsNonModuleName = ensurePathIsNonModuleName; + function changeAnyExtension(path, ext, extensions, ignoreCase) { + var pathext = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(path, extensions, ignoreCase) : getAnyExtensionFromPath(path); + return pathext ? path.slice(0, path.length - pathext.length) + (ts.startsWith(ext, ".") ? ext : "." + ext) : path; + } + ts.changeAnyExtension = changeAnyExtension; + //// Path Comparisons + // check path for these segments: '', '.'. '..' + var relativePathSegmentRegExp = /(^|\/)\.{0,2}($|\/)/; + function comparePathsWorker(a, b, componentComparer) { + if (a === b) + return 0 /* EqualTo */; + if (a === undefined) + return -1 /* LessThan */; + if (b === undefined) + return 1 /* GreaterThan */; + // NOTE: Performance optimization - shortcut if the root segments differ as there would be no + // need to perform path reduction. + var aRoot = a.substring(0, getRootLength(a)); + var bRoot = b.substring(0, getRootLength(b)); + var result = ts.compareStringsCaseInsensitive(aRoot, bRoot); + if (result !== 0 /* EqualTo */) { + return result; + } + // NOTE: Performance optimization - shortcut if there are no relative path segments in + // the non-root portion of the path + var aRest = a.substring(aRoot.length); + var bRest = b.substring(bRoot.length); + if (!relativePathSegmentRegExp.test(aRest) && !relativePathSegmentRegExp.test(bRest)) { + return componentComparer(aRest, bRest); + } + // The path contains a relative path segment. Normalize the paths and perform a slower component + // by component comparison. + var aComponents = reducePathComponents(getPathComponents(a)); + var bComponents = reducePathComponents(getPathComponents(b)); + var sharedLength = Math.min(aComponents.length, bComponents.length); + for (var i = 1; i < sharedLength; i++) { + var result_1 = componentComparer(aComponents[i], bComponents[i]); + if (result_1 !== 0 /* EqualTo */) { + return result_1; + } + } + return ts.compareValues(aComponents.length, bComponents.length); + } + /** + * Performs a case-sensitive comparison of two paths. Path roots are always compared case-insensitively. + */ + function comparePathsCaseSensitive(a, b) { + return comparePathsWorker(a, b, ts.compareStringsCaseSensitive); + } + ts.comparePathsCaseSensitive = comparePathsCaseSensitive; + /** + * Performs a case-insensitive comparison of two paths. + */ + function comparePathsCaseInsensitive(a, b) { + return comparePathsWorker(a, b, ts.compareStringsCaseInsensitive); + } + ts.comparePathsCaseInsensitive = comparePathsCaseInsensitive; + function comparePaths(a, b, currentDirectory, ignoreCase) { + if (typeof currentDirectory === "string") { + a = combinePaths(currentDirectory, a); + b = combinePaths(currentDirectory, b); + } + else if (typeof currentDirectory === "boolean") { + ignoreCase = currentDirectory; + } + return comparePathsWorker(a, b, ts.getStringComparer(ignoreCase)); + } + ts.comparePaths = comparePaths; + function containsPath(parent, child, currentDirectory, ignoreCase) { + if (typeof currentDirectory === "string") { + parent = combinePaths(currentDirectory, parent); + child = combinePaths(currentDirectory, child); + } + else if (typeof currentDirectory === "boolean") { + ignoreCase = currentDirectory; + } + if (parent === undefined || child === undefined) + return false; + if (parent === child) + return true; + var parentComponents = reducePathComponents(getPathComponents(parent)); + var childComponents = reducePathComponents(getPathComponents(child)); + if (childComponents.length < parentComponents.length) { + return false; + } + var componentEqualityComparer = ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive; + for (var i = 0; i < parentComponents.length; i++) { + var equalityComparer = i === 0 ? ts.equateStringsCaseInsensitive : componentEqualityComparer; + if (!equalityComparer(parentComponents[i], childComponents[i])) { + return false; + } + } + return true; + } + ts.containsPath = containsPath; + /** + * Determines whether `fileName` starts with the specified `directoryName` using the provided path canonicalization callback. + * Comparison is case-sensitive between the canonical paths. + * + * @deprecated Use `containsPath` if possible. + */ + function startsWithDirectory(fileName, directoryName, getCanonicalFileName) { + var canonicalFileName = getCanonicalFileName(fileName); + var canonicalDirectoryName = getCanonicalFileName(directoryName); + return ts.startsWith(canonicalFileName, canonicalDirectoryName + "/") || ts.startsWith(canonicalFileName, canonicalDirectoryName + "\\"); + } + ts.startsWithDirectory = startsWithDirectory; + //// Relative Paths + function getPathComponentsRelativeTo(from, to, stringEqualityComparer, getCanonicalFileName) { + var fromComponents = reducePathComponents(getPathComponents(from)); + var toComponents = reducePathComponents(getPathComponents(to)); + var start; + for (start = 0; start < fromComponents.length && start < toComponents.length; start++) { + var fromComponent = getCanonicalFileName(fromComponents[start]); + var toComponent = getCanonicalFileName(toComponents[start]); + var comparer = start === 0 ? ts.equateStringsCaseInsensitive : stringEqualityComparer; + if (!comparer(fromComponent, toComponent)) + break; + } + if (start === 0) { + return toComponents; + } + var components = toComponents.slice(start); + var relative = []; + for (; start < fromComponents.length; start++) { + relative.push(".."); + } + return __spreadArrays([""], relative, components); + } + ts.getPathComponentsRelativeTo = getPathComponentsRelativeTo; + function getRelativePathFromDirectory(fromDirectory, to, getCanonicalFileNameOrIgnoreCase) { + ts.Debug.assert((getRootLength(fromDirectory) > 0) === (getRootLength(to) > 0), "Paths must either both be absolute or both be relative"); + var getCanonicalFileName = typeof getCanonicalFileNameOrIgnoreCase === "function" ? getCanonicalFileNameOrIgnoreCase : ts.identity; + var ignoreCase = typeof getCanonicalFileNameOrIgnoreCase === "boolean" ? getCanonicalFileNameOrIgnoreCase : false; + var pathComponents = getPathComponentsRelativeTo(fromDirectory, to, ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive, getCanonicalFileName); + return getPathFromPathComponents(pathComponents); + } + ts.getRelativePathFromDirectory = getRelativePathFromDirectory; + function convertToRelativePath(absoluteOrRelativePath, basePath, getCanonicalFileName) { + return !isRootedDiskPath(absoluteOrRelativePath) + ? absoluteOrRelativePath + : getRelativePathToDirectoryOrUrl(basePath, absoluteOrRelativePath, basePath, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); + } + ts.convertToRelativePath = convertToRelativePath; + function getRelativePathFromFile(from, to, getCanonicalFileName) { + return ensurePathIsNonModuleName(getRelativePathFromDirectory(getDirectoryPath(from), to, getCanonicalFileName)); + } + ts.getRelativePathFromFile = getRelativePathFromFile; + function getRelativePathToDirectoryOrUrl(directoryPathOrUrl, relativeOrAbsolutePath, currentDirectory, getCanonicalFileName, isAbsolutePathAnUrl) { + var pathComponents = getPathComponentsRelativeTo(resolvePath(currentDirectory, directoryPathOrUrl), resolvePath(currentDirectory, relativeOrAbsolutePath), ts.equateStringsCaseSensitive, getCanonicalFileName); + var firstComponent = pathComponents[0]; + if (isAbsolutePathAnUrl && isRootedDiskPath(firstComponent)) { + var prefix = firstComponent.charAt(0) === ts.directorySeparator ? "file://" : "file:///"; + pathComponents[0] = prefix + firstComponent; + } + return getPathFromPathComponents(pathComponents); + } + ts.getRelativePathToDirectoryOrUrl = getRelativePathToDirectoryOrUrl; + function forEachAncestorDirectory(directory, callback) { + while (true) { + var result = callback(directory); + if (result !== undefined) { + return result; + } + var parentPath = getDirectoryPath(directory); + if (parentPath === directory) { + return undefined; + } + directory = parentPath; + } + } + ts.forEachAncestorDirectory = forEachAncestorDirectory; +})(ts || (ts = {})); // // generated from './diagnosticInformationMap.generated.ts' by 'src/compiler' /* @internal */ @@ -5656,7 +6243,7 @@ var ts; An_index_signature_parameter_cannot_have_an_initializer: diag(1020, ts.DiagnosticCategory.Error, "An_index_signature_parameter_cannot_have_an_initializer_1020", "An index signature parameter cannot have an initializer."), An_index_signature_must_have_a_type_annotation: diag(1021, ts.DiagnosticCategory.Error, "An_index_signature_must_have_a_type_annotation_1021", "An index signature must have a type annotation."), An_index_signature_parameter_must_have_a_type_annotation: diag(1022, ts.DiagnosticCategory.Error, "An_index_signature_parameter_must_have_a_type_annotation_1022", "An index signature parameter must have a type annotation."), - An_index_signature_parameter_type_must_be_string_or_number: diag(1023, ts.DiagnosticCategory.Error, "An_index_signature_parameter_type_must_be_string_or_number_1023", "An index signature parameter type must be 'string' or 'number'."), + An_index_signature_parameter_type_must_be_either_string_or_number: diag(1023, ts.DiagnosticCategory.Error, "An_index_signature_parameter_type_must_be_either_string_or_number_1023", "An index signature parameter type must be either 'string' or 'number'."), readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature: diag(1024, ts.DiagnosticCategory.Error, "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024", "'readonly' modifier can only appear on a property declaration or index signature."), Accessibility_modifier_already_seen: diag(1028, ts.DiagnosticCategory.Error, "Accessibility_modifier_already_seen_1028", "Accessibility modifier already seen."), _0_modifier_must_precede_1_modifier: diag(1029, ts.DiagnosticCategory.Error, "_0_modifier_must_precede_1_modifier_1029", "'{0}' modifier must precede '{1}' modifier."), @@ -5864,7 +6451,7 @@ var ts; Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1320, ts.DiagnosticCategory.Error, "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."), Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1321, ts.DiagnosticCategory.Error, "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."), Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1322, ts.DiagnosticCategory.Error, "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."), - Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext: diag(1323, ts.DiagnosticCategory.Error, "Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323", "Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'."), + Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_commonjs_amd_system_or_umd: diag(1323, ts.DiagnosticCategory.Error, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_commonjs_amd_system_or_umd_1323", "Dynamic imports are only supported when the '--module' flag is set to 'esnext', 'commonjs', 'amd', 'system', or 'umd'."), Dynamic_import_must_have_one_specifier_as_an_argument: diag(1324, ts.DiagnosticCategory.Error, "Dynamic_import_must_have_one_specifier_as_an_argument_1324", "Dynamic import must have one specifier as an argument."), Specifier_of_dynamic_import_cannot_be_spread_element: diag(1325, ts.DiagnosticCategory.Error, "Specifier_of_dynamic_import_cannot_be_spread_element_1325", "Specifier of dynamic import cannot be spread element."), Dynamic_import_cannot_have_type_arguments: diag(1326, ts.DiagnosticCategory.Error, "Dynamic_import_cannot_have_type_arguments_1326", "Dynamic import cannot have type arguments"), @@ -5900,6 +6487,7 @@ var ts; An_enum_member_name_must_be_followed_by_a_or: diag(1357, ts.DiagnosticCategory.Error, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."), Tagged_template_expressions_are_not_permitted_in_an_optional_chain: diag(1358, ts.DiagnosticCategory.Error, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."), Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here: diag(1359, ts.DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359", "Identifier expected. '{0}' is a reserved word that cannot be used here."), + Did_you_mean_to_parenthesize_this_function_type: diag(1360, ts.DiagnosticCategory.Error, "Did_you_mean_to_parenthesize_this_function_type_1360", "Did you mean to parenthesize this function type?"), The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."), The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."), Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), @@ -6027,7 +6615,6 @@ var ts; Class_0_incorrectly_implements_interface_1: diag(2420, ts.DiagnosticCategory.Error, "Class_0_incorrectly_implements_interface_1_2420", "Class '{0}' incorrectly implements interface '{1}'."), A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2422, ts.DiagnosticCategory.Error, "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422", "A class can only implement an object type or intersection of object types with statically known members."), Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: diag(2423, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423", "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."), - Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: diag(2424, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424", "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property."), Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: diag(2425, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425", "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."), Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: diag(2426, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426", "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."), Interface_name_cannot_be_0: diag(2427, ts.DiagnosticCategory.Error, "Interface_name_cannot_be_0_2427", "Interface name cannot be '{0}'."), @@ -6197,8 +6784,8 @@ var ts; JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: diag(2607, ts.DiagnosticCategory.Error, "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", "JSX element class does not support attributes because it does not have a '{0}' property."), The_global_type_JSX_0_may_not_have_more_than_one_property: diag(2608, ts.DiagnosticCategory.Error, "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", "The global type 'JSX.{0}' may not have more than one property."), JSX_spread_child_must_be_an_array_type: diag(2609, ts.DiagnosticCategory.Error, "JSX_spread_child_must_be_an_array_type_2609", "JSX spread child must be an array type."), - Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_property: diag(2610, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_proper_2610", "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member property."), - Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_accessor: diag(2611, ts.DiagnosticCategory.Error, "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_access_2611", "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member accessor."), + _0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property: diag(2610, ts.DiagnosticCategory.Error, "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610", "'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property."), + _0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor: diag(2611, ts.DiagnosticCategory.Error, "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611", "'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor."), Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration: diag(2612, ts.DiagnosticCategory.Error, "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612", "Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration."), Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead: diag(2613, ts.DiagnosticCategory.Error, "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613", "Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"), Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead: diag(2614, ts.DiagnosticCategory.Error, "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614", "Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"), @@ -6421,6 +7008,8 @@ var ts; Parameter_0_of_accessor_has_or_is_using_private_name_1: diag(4106, ts.DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106", "Parameter '{0}' of accessor has or is using private name '{1}'."), Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2: diag(4107, ts.DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107", "Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."), Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4108, ts.DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108", "Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."), + Type_arguments_for_0_circularly_reference_themselves: diag(4109, ts.DiagnosticCategory.Error, "Type_arguments_for_0_circularly_reference_themselves_4109", "Type arguments for '{0}' circularly reference themselves."), + Tuple_type_arguments_circularly_reference_themselves: diag(4110, ts.DiagnosticCategory.Error, "Tuple_type_arguments_circularly_reference_themselves_4110", "Tuple type arguments circularly reference themselves."), The_current_host_does_not_support_the_0_option: diag(5001, ts.DiagnosticCategory.Error, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."), Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, ts.DiagnosticCategory.Error, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."), File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, ts.DiagnosticCategory.Error, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."), @@ -6428,6 +7017,7 @@ var ts; Failed_to_parse_file_0_Colon_1: diag(5014, ts.DiagnosticCategory.Error, "Failed_to_parse_file_0_Colon_1_5014", "Failed to parse file '{0}': {1}."), Unknown_compiler_option_0: diag(5023, ts.DiagnosticCategory.Error, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."), Compiler_option_0_requires_a_value_of_type_1: diag(5024, ts.DiagnosticCategory.Error, "Compiler_option_0_requires_a_value_of_type_1_5024", "Compiler option '{0}' requires a value of type {1}."), + Unknown_compiler_option_0_Did_you_mean_1: diag(5025, ts.DiagnosticCategory.Error, "Unknown_compiler_option_0_Did_you_mean_1_5025", "Unknown compiler option '{0}'. Did you mean '{1}'?"), Could_not_write_file_0_Colon_1: diag(5033, ts.DiagnosticCategory.Error, "Could_not_write_file_0_Colon_1_5033", "Could not write file '{0}': {1}."), Option_project_cannot_be_mixed_with_source_files_on_a_command_line: diag(5042, ts.DiagnosticCategory.Error, "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042", "Option 'project' cannot be mixed with source files on a command line."), Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher: diag(5047, ts.DiagnosticCategory.Error, "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047", "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."), @@ -6458,6 +7048,7 @@ var ts; Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified: diag(5074, ts.DiagnosticCategory.Error, "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074", "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option `--tsBuildInfoFile` is specified."), _0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2: diag(5075, ts.DiagnosticCategory.Error, "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075", "'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."), _0_and_1_operations_cannot_be_mixed_without_parentheses: diag(5076, ts.DiagnosticCategory.Error, "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076", "'{0}' and '{1}' operations cannot be mixed without parentheses."), + Unknown_build_option_0_Did_you_mean_1: diag(5077, ts.DiagnosticCategory.Error, "Unknown_build_option_0_Did_you_mean_1_5077", "Unknown build option '{0}'. Did you mean '{1}'?"), Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6000, ts.DiagnosticCategory.Message, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."), Concatenate_and_emit_output_to_single_file: diag(6001, ts.DiagnosticCategory.Message, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."), Generates_corresponding_d_ts_file: diag(6002, ts.DiagnosticCategory.Message, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), @@ -6504,7 +7095,7 @@ var ts; Corrupted_locale_file_0: diag(6051, ts.DiagnosticCategory.Error, "Corrupted_locale_file_0_6051", "Corrupted locale file {0}."), Raise_error_on_expressions_and_declarations_with_an_implied_any_type: diag(6052, ts.DiagnosticCategory.Message, "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052", "Raise error on expressions and declarations with an implied 'any' type."), File_0_not_found: diag(6053, ts.DiagnosticCategory.Error, "File_0_not_found_6053", "File '{0}' not found."), - File_0_has_unsupported_extension_The_only_supported_extensions_are_1: diag(6054, ts.DiagnosticCategory.Error, "File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054", "File '{0}' has unsupported extension. The only supported extensions are {1}."), + File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1: diag(6054, ts.DiagnosticCategory.Error, "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054", "File '{0}' has an unsupported extension. The only supported extensions are {1}."), Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: diag(6055, ts.DiagnosticCategory.Message, "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055", "Suppress noImplicitAny errors for indexing objects lacking index signatures."), Do_not_emit_declarations_for_code_that_has_an_internal_annotation: diag(6056, ts.DiagnosticCategory.Message, "Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056", "Do not emit declarations for code that has an '@internal' annotation."), Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: diag(6058, ts.DiagnosticCategory.Message, "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058", "Specify the root directory of input files. Use to control the output directory structure with --outDir."), @@ -6712,6 +7303,8 @@ var ts; The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", "The expected type comes from property '{0}' which is declared here on type '{1}'"), The_expected_type_comes_from_this_index_signature: diag(6501, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."), The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."), + Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing: diag(6503, ts.DiagnosticCategory.Message, "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503", "Print names of files that are part of the compilation and then stop processing."), + File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option: diag(6504, ts.DiagnosticCategory.Error, "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504", "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"), Variable_0_implicitly_has_an_1_type: diag(7005, ts.DiagnosticCategory.Error, "Variable_0_implicitly_has_an_1_type_7005", "Variable '{0}' implicitly has an '{1}' type."), Parameter_0_implicitly_has_an_1_type: diag(7006, ts.DiagnosticCategory.Error, "Parameter_0_implicitly_has_an_1_type_7006", "Parameter '{0}' implicitly has an '{1}' type."), Member_0_implicitly_has_an_1_type: diag(7008, ts.DiagnosticCategory.Error, "Member_0_implicitly_has_an_1_type_7008", "Member '{0}' implicitly has an '{1}' type."), @@ -6815,6 +7408,7 @@ var ts; Expected_corresponding_closing_tag_for_JSX_fragment: diag(17015, ts.DiagnosticCategory.Error, "Expected_corresponding_closing_tag_for_JSX_fragment_17015", "Expected corresponding closing tag for JSX fragment."), JSX_fragment_is_not_supported_when_using_jsxFactory: diag(17016, ts.DiagnosticCategory.Error, "JSX_fragment_is_not_supported_when_using_jsxFactory_17016", "JSX fragment is not supported when using --jsxFactory"), JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma: diag(17017, ts.DiagnosticCategory.Error, "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017", "JSX fragment is not supported when using an inline JSX factory pragma"), + Unknown_type_acquisition_option_0_Did_you_mean_1: diag(17018, ts.DiagnosticCategory.Error, "Unknown_type_acquisition_option_0_Did_you_mean_1_17018", "Unknown type acquisition option '{0}'. Did you mean '{1}'?"), Circularity_detected_while_resolving_configuration_Colon_0: diag(18000, ts.DiagnosticCategory.Error, "Circularity_detected_while_resolving_configuration_Colon_0_18000", "Circularity detected while resolving configuration: {0}"), A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not: diag(18001, ts.DiagnosticCategory.Error, "A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not_18001", "A path in an 'extends' option must be relative or rooted, but '{0}' is not."), The_files_list_in_config_file_0_is_empty: diag(18002, ts.DiagnosticCategory.Error, "The_files_list_in_config_file_0_is_empty_18002", "The 'files' list in config file '{0}' is empty."), @@ -9047,7 +9641,7 @@ var ts; ts.getDeclarationOfKind = getDeclarationOfKind; /** Create a new escaped identifier map. */ function createUnderscoreEscapedMap() { - return new ts.MapCtr(); + return new ts.Map(); } ts.createUnderscoreEscapedMap = createUnderscoreEscapedMap; function hasEntries(map) { @@ -9103,13 +9697,6 @@ var ts; reportPrivateInBaseOfClassExpression: ts.noop, }; } - function toPath(fileName, basePath, getCanonicalFileName) { - var nonCanonicalizedPath = ts.isRootedDiskPath(fileName) - ? ts.normalizePath(fileName) - : ts.getNormalizedAbsolutePath(fileName, basePath); - return getCanonicalFileName(nonCanonicalizedPath); - } - ts.toPath = toPath; function changesAffectModuleResolution(oldOptions, newOptions) { return oldOptions.configFilePath !== newOptions.configFilePath || optionsHaveModuleResolutionChanges(oldOptions, newOptions); @@ -9916,6 +10503,11 @@ var ts; break; case 201 /* ArrowFunction */: return getErrorSpanForArrowFunction(sourceFile, node); + case 275 /* CaseClause */: + case 276 /* DefaultClause */: + var start = ts.skipTrivia(sourceFile.text, node.pos); + var end = node.statements.length > 0 ? node.statements[0].pos : node.end; + return ts.createTextSpanFromBounds(start, end); } if (errorNode === undefined) { // If we don't have a better node, then just set the error on the first token of @@ -10728,7 +11320,7 @@ var ts; (node.typeArguments[0].kind === 142 /* StringKeyword */ || node.typeArguments[0].kind === 139 /* NumberKeyword */); } ts.isJSDocIndexSignature = isJSDocIndexSignature; - function isRequireCall(callExpression, checkArgumentIsStringLiteralLike) { + function isRequireCall(callExpression, requireStringLiteralLikeArgument) { if (callExpression.kind !== 195 /* CallExpression */) { return false; } @@ -10740,7 +11332,7 @@ var ts; return false; } var arg = args[0]; - return !checkArgumentIsStringLiteralLike || ts.isStringLiteralLike(arg); + return !requireStringLiteralLikeArgument || ts.isStringLiteralLike(arg); } ts.isRequireCall = isRequireCall; function isSingleOrDoubleQuote(charCode) { @@ -10962,27 +11554,31 @@ var ts; isBindableStaticNameExpression(expr.arguments[0], /*excludeThisKeyword*/ true); } ts.isBindableObjectDefinePropertyCall = isBindableObjectDefinePropertyCall; - function isBindableStaticElementAccessExpression(node, excludeThisKeyword) { - return isLiteralLikeElementAccess(node) - && ((!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */) || - isEntityNameExpression(node.expression) || - isBindableStaticElementAccessExpression(node.expression, /*excludeThisKeyword*/ true)); - } - ts.isBindableStaticElementAccessExpression = isBindableStaticElementAccessExpression; + /** x.y OR x[0] */ function isLiteralLikeAccess(node) { return ts.isPropertyAccessExpression(node) || isLiteralLikeElementAccess(node); } ts.isLiteralLikeAccess = isLiteralLikeAccess; + /** x[0] OR x['a'] OR x[Symbol.y] */ function isLiteralLikeElementAccess(node) { return ts.isElementAccessExpression(node) && (isStringOrNumericLiteralLike(node.argumentExpression) || isWellKnownSymbolSyntactically(node.argumentExpression)); } ts.isLiteralLikeElementAccess = isLiteralLikeElementAccess; + /** Any series of property and element accesses. */ function isBindableStaticAccessExpression(node, excludeThisKeyword) { return ts.isPropertyAccessExpression(node) && (!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */ || isBindableStaticNameExpression(node.expression, /*excludeThisKeyword*/ true)) || isBindableStaticElementAccessExpression(node, excludeThisKeyword); } ts.isBindableStaticAccessExpression = isBindableStaticAccessExpression; + /** Any series of property and element accesses, ending in a literal element access */ + function isBindableStaticElementAccessExpression(node, excludeThisKeyword) { + return isLiteralLikeElementAccess(node) + && ((!excludeThisKeyword && node.expression.kind === 103 /* ThisKeyword */) || + isEntityNameExpression(node.expression) || + isBindableStaticAccessExpression(node.expression, /*excludeThisKeyword*/ true)); + } + ts.isBindableStaticElementAccessExpression = isBindableStaticElementAccessExpression; function isBindableStaticNameExpression(node, excludeThisKeyword) { return isEntityNameExpression(node) || isBindableStaticAccessExpression(node, excludeThisKeyword); } @@ -11011,7 +11607,7 @@ var ts; if (expr.operatorToken.kind !== 62 /* EqualsToken */ || !isAccessExpression(expr.left)) { return 0 /* None */; } - if (isBindableStaticNameExpression(expr.left.expression) && getElementOrPropertyAccessName(expr.left) === "prototype" && ts.isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) { + if (isBindableStaticNameExpression(expr.left.expression, /*excludeThisKeyword*/ true) && getElementOrPropertyAccessName(expr.left) === "prototype" && ts.isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) { // F.prototype = { ... } return 6 /* Prototype */; } @@ -11067,13 +11663,17 @@ var ts; nextToLast = nextToLast.expression; } var id = nextToLast.expression; - if (id.escapedText === "exports" || - id.escapedText === "module" && getElementOrPropertyAccessName(nextToLast) === "exports") { - // exports.name = expr OR module.exports.name = expr + if ((id.escapedText === "exports" || + id.escapedText === "module" && getElementOrPropertyAccessName(nextToLast) === "exports") && + // ExportsProperty does not support binding with computed names + isBindableStaticAccessExpression(lhs)) { + // exports.name = expr OR module.exports.name = expr OR exports["name"] = expr ... return 1 /* ExportsProperty */; } - // F.G...x = expr - return 5 /* Property */; + if (isBindableStaticNameExpression(lhs, /*excludeThisKeyword*/ true) || (ts.isElementAccessExpression(lhs) && isDynamicName(lhs) && lhs.expression.kind !== 103 /* ThisKeyword */)) { + // F.G...x = expr + return 5 /* Property */; + } } return 0 /* None */; } @@ -12395,7 +12995,7 @@ var ts; */ function getExternalModuleNameFromPath(host, fileName, referencePath) { var getCanonicalFileName = function (f) { return host.getCanonicalFileName(f); }; - var dir = toPath(referencePath ? ts.getDirectoryPath(referencePath) : host.getCommonSourceDirectory(), host.getCurrentDirectory(), getCanonicalFileName); + var dir = ts.toPath(referencePath ? ts.getDirectoryPath(referencePath) : host.getCommonSourceDirectory(), host.getCurrentDirectory(), getCanonicalFileName); var filePath = ts.getNormalizedAbsolutePath(fileName, host.getCurrentDirectory()); var relativePath = ts.getRelativePathToDirectoryOrUrl(dir, filePath, dir, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); var extensionless = ts.removeFileExtension(relativePath); @@ -12478,6 +13078,25 @@ var ts; }, sourceFiles); } ts.writeFile = writeFile; + function ensureDirectoriesExist(directoryPath, createDirectory, directoryExists) { + if (directoryPath.length > ts.getRootLength(directoryPath) && !directoryExists(directoryPath)) { + var parentDirectory = ts.getDirectoryPath(directoryPath); + ensureDirectoriesExist(parentDirectory, createDirectory, directoryExists); + createDirectory(directoryPath); + } + } + function writeFileEnsuringDirectories(path, data, writeByteOrderMark, writeFile, createDirectory, directoryExists) { + // PERF: Checking for directory existence is expensive. Instead, assume the directory exists + // and fall back to creating it if the file write fails. + try { + writeFile(path, data, writeByteOrderMark); + } + catch (_a) { + ensureDirectoriesExist(ts.getDirectoryPath(ts.normalizePath(path)), createDirectory, directoryExists); + writeFile(path, data, writeByteOrderMark); + } + } + ts.writeFileEnsuringDirectories = writeFileEnsuringDirectories; function getLineOfLocalPosition(currentSourceFile, pos) { return ts.getLineAndCharacterOfPosition(currentSourceFile, pos).line; } @@ -12917,6 +13536,23 @@ var ts; return node.kind === 75 /* Identifier */ || isPropertyAccessEntityNameExpression(node); } ts.isEntityNameExpression = isEntityNameExpression; + function getFirstIdentifier(node) { + switch (node.kind) { + case 75 /* Identifier */: + return node; + case 152 /* QualifiedName */: + do { + node = node.left; + } while (node.kind !== 75 /* Identifier */); + return node; + case 193 /* PropertyAccessExpression */: + do { + node = node.expression; + } while (node.kind !== 75 /* Identifier */); + return node; + } + } + ts.getFirstIdentifier = getFirstIdentifier; function isDottedName(node) { return node.kind === 75 /* Identifier */ || node.kind === 103 /* ThisKeyword */ || node.kind === 193 /* PropertyAccessExpression */ && isDottedName(node.expression) || @@ -13435,20 +14071,6 @@ var ts; }); } ts.mutateMap = mutateMap; - function forEachAncestorDirectory(directory, callback) { - while (true) { - var result = callback(directory); - if (result !== undefined) { - return result; - } - var parentPath = ts.getDirectoryPath(directory); - if (parentPath === directory) { - return undefined; - } - directory = parentPath; - } - } - ts.forEachAncestorDirectory = forEachAncestorDirectory; // Return true if the given type is the constructor type for an abstract class function isAbstractConstructorType(type) { return !!(getObjectFlags(type) & 16 /* Anonymous */) && !!type.symbol && isAbstractConstructorSymbol(type.symbol); @@ -13475,7 +14097,7 @@ var ts; } ts.typeHasCallOrConstructSignatures = typeHasCallOrConstructSignatures; function forSomeAncestorDirectory(directory, callback) { - return !!forEachAncestorDirectory(directory, function (d) { return callback(d) ? true : undefined; }); + return !!ts.forEachAncestorDirectory(directory, function (d) { return callback(d) ? true : undefined; }); } ts.forSomeAncestorDirectory = forSomeAncestorDirectory; function isUMDExportSymbol(symbol) { @@ -14540,11 +15162,47 @@ var ts; } ts.isCallChain = isCallChain; function isOptionalChain(node) { - return isPropertyAccessChain(node) - || isElementAccessChain(node) - || isCallChain(node); + var kind = node.kind; + return !!(node.flags & 32 /* OptionalChain */) && + (kind === 193 /* PropertyAccessExpression */ + || kind === 194 /* ElementAccessExpression */ + || kind === 195 /* CallExpression */); } ts.isOptionalChain = isOptionalChain; + /* @internal */ + function isOptionalChainRoot(node) { + return isOptionalChain(node) && !!node.questionDotToken; + } + ts.isOptionalChainRoot = isOptionalChainRoot; + /** + * Determines whether a node is the expression preceding an optional chain (i.e. `a` in `a?.b`). + */ + /* @internal */ + function isExpressionOfOptionalChainRoot(node) { + return isOptionalChainRoot(node.parent) && node.parent.expression === node; + } + ts.isExpressionOfOptionalChainRoot = isExpressionOfOptionalChainRoot; + /** + * Determines whether a node is the outermost `OptionalChain` in an ECMAScript `OptionalExpression`: + * + * 1. For `a?.b.c`, the outermost chain is `a?.b.c` (`c` is the end of the chain starting at `a?.`) + * 2. For `(a?.b.c).d`, the outermost chain is `a?.b.c` (`c` is the end of the chain starting at `a?.` since parens end the chain) + * 3. For `a?.b.c?.d`, both `a?.b.c` and `a?.b.c?.d` are outermost (`c` is the end of the chain starting at `a?.`, and `d` is + * the end of the chain starting at `c?.`) + * 4. For `a?.(b?.c).d`, both `b?.c` and `a?.(b?.c)d` are outermost (`c` is the end of the chain starting at `b`, and `d` is + * the end of the chain starting at `a?.`) + */ + /* @internal */ + function isOutermostOptionalChain(node) { + return !isOptionalChain(node.parent) // cases 1 and 2 + || isOptionalChainRoot(node.parent) // case 3 + || node !== node.parent.expression; // case 4 + } + ts.isOutermostOptionalChain = isOutermostOptionalChain; + function isNullishCoalesce(node) { + return node.kind === 208 /* BinaryExpression */ && node.operatorToken.kind === 60 /* QuestionQuestionToken */; + } + ts.isNullishCoalesce = isNullishCoalesce; function isNewExpression(node) { return node.kind === 196 /* NewExpression */; } @@ -15815,11 +16473,6 @@ var ts; return node.kind === 162 /* GetAccessor */; } ts.isGetAccessor = isGetAccessor; - /* @internal */ - function isOptionalChainRoot(node) { - return ts.isOptionalChain(node) && !!node.questionDotToken; - } - ts.isOptionalChainRoot = isOptionalChainRoot; /** True if has jsdoc nodes attached to it. */ /* @internal */ // TODO: GH#19856 Would like to return `node is Node & { jsDoc: JSDoc[] }` but it causes long compile times @@ -15906,7 +16559,12 @@ var ts; this.checker = checker; } } - function Signature() { } + function Signature(checker, flags) { + this.flags = flags; + if (ts.Debug.isDebugging) { + this.checker = checker; + } + } function Node(kind, pos, end) { this.pos = pos; this.end = end; @@ -16181,273 +16839,6 @@ var ts; return true; } ts.hasZeroOrOneAsteriskCharacter = hasZeroOrOneAsteriskCharacter; - /** - * Internally, we represent paths as strings with '/' as the directory separator. - * When we make system calls (eg: LanguageServiceHost.getDirectory()), - * we expect the host to correctly handle paths in our specified format. - */ - ts.directorySeparator = "/"; - var altDirectorySeparator = "\\"; - var urlSchemeSeparator = "://"; - var backslashRegExp = /\\/g; - /** - * Normalize path separators. - */ - function normalizeSlashes(path) { - return path.replace(backslashRegExp, ts.directorySeparator); - } - ts.normalizeSlashes = normalizeSlashes; - function isVolumeCharacter(charCode) { - return (charCode >= 97 /* a */ && charCode <= 122 /* z */) || - (charCode >= 65 /* A */ && charCode <= 90 /* Z */); - } - function getFileUrlVolumeSeparatorEnd(url, start) { - var ch0 = url.charCodeAt(start); - if (ch0 === 58 /* colon */) - return start + 1; - if (ch0 === 37 /* percent */ && url.charCodeAt(start + 1) === 51 /* _3 */) { - var ch2 = url.charCodeAt(start + 2); - if (ch2 === 97 /* a */ || ch2 === 65 /* A */) - return start + 3; - } - return -1; - } - /** - * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). - * If the root is part of a URL, the twos-complement of the root length is returned. - */ - function getEncodedRootLength(path) { - if (!path) - return 0; - var ch0 = path.charCodeAt(0); - // POSIX or UNC - if (ch0 === 47 /* slash */ || ch0 === 92 /* backslash */) { - if (path.charCodeAt(1) !== ch0) - return 1; // POSIX: "/" (or non-normalized "\") - var p1 = path.indexOf(ch0 === 47 /* slash */ ? ts.directorySeparator : altDirectorySeparator, 2); - if (p1 < 0) - return path.length; // UNC: "//server" or "\\server" - return p1 + 1; // UNC: "//server/" or "\\server\" - } - // DOS - if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58 /* colon */) { - var ch2 = path.charCodeAt(2); - if (ch2 === 47 /* slash */ || ch2 === 92 /* backslash */) - return 3; // DOS: "c:/" or "c:\" - if (path.length === 2) - return 2; // DOS: "c:" (but not "c:d") - } - // URL - var schemeEnd = path.indexOf(urlSchemeSeparator); - if (schemeEnd !== -1) { - var authorityStart = schemeEnd + urlSchemeSeparator.length; - var authorityEnd = path.indexOf(ts.directorySeparator, authorityStart); - if (authorityEnd !== -1) { // URL: "file:///", "file://server/", "file://server/path" - // For local "file" URLs, include the leading DOS volume (if present). - // Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a - // special case interpreted as "the machine from which the URL is being interpreted". - var scheme = path.slice(0, schemeEnd); - var authority = path.slice(authorityStart, authorityEnd); - if (scheme === "file" && (authority === "" || authority === "localhost") && - isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) { - var volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2); - if (volumeSeparatorEnd !== -1) { - if (path.charCodeAt(volumeSeparatorEnd) === 47 /* slash */) { - // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/" - return ~(volumeSeparatorEnd + 1); - } - if (volumeSeparatorEnd === path.length) { - // URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a" - // but not "file:///c:d" or "file:///c%3ad" - return ~volumeSeparatorEnd; - } - } - } - return ~(authorityEnd + 1); // URL: "file://server/", "http://server/" - } - return ~path.length; // URL: "file://server", "http://server" - } - // relative - return 0; - } - /** - * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). - * - * For example: - * ```ts - * getRootLength("a") === 0 // "" - * getRootLength("/") === 1 // "/" - * getRootLength("c:") === 2 // "c:" - * getRootLength("c:d") === 0 // "" - * getRootLength("c:/") === 3 // "c:/" - * getRootLength("c:\\") === 3 // "c:\\" - * getRootLength("//server") === 7 // "//server" - * getRootLength("//server/share") === 8 // "//server/" - * getRootLength("\\\\server") === 7 // "\\\\server" - * getRootLength("\\\\server\\share") === 8 // "\\\\server\\" - * getRootLength("file:///path") === 8 // "file:///" - * getRootLength("file:///c:") === 10 // "file:///c:" - * getRootLength("file:///c:d") === 8 // "file:///" - * getRootLength("file:///c:/path") === 11 // "file:///c:/" - * getRootLength("file://server") === 13 // "file://server" - * getRootLength("file://server/path") === 14 // "file://server/" - * getRootLength("http://server") === 13 // "http://server" - * getRootLength("http://server/path") === 14 // "http://server/" - * ``` - */ - function getRootLength(path) { - var rootLength = getEncodedRootLength(path); - return rootLength < 0 ? ~rootLength : rootLength; - } - ts.getRootLength = getRootLength; - // TODO(rbuckton): replace references with `resolvePath` - function normalizePath(path) { - return ts.resolvePath(path); - } - ts.normalizePath = normalizePath; - function normalizePathAndParts(path) { - path = normalizeSlashes(path); - var _a = reducePathComponents(getPathComponents(path)), root = _a[0], parts = _a.slice(1); - if (parts.length) { - var joinedParts = root + parts.join(ts.directorySeparator); - return { path: ts.hasTrailingDirectorySeparator(path) ? ts.ensureTrailingDirectorySeparator(joinedParts) : joinedParts, parts: parts }; - } - else { - return { path: root, parts: parts }; - } - } - ts.normalizePathAndParts = normalizePathAndParts; - function getDirectoryPath(path) { - path = normalizeSlashes(path); - // If the path provided is itself the root, then return it. - var rootLength = getRootLength(path); - if (rootLength === path.length) - return path; - // return the leading portion of the path up to the last (non-terminal) directory separator - // but not including any trailing directory separator. - path = ts.removeTrailingDirectorySeparator(path); - return path.slice(0, Math.max(rootLength, path.lastIndexOf(ts.directorySeparator))); - } - ts.getDirectoryPath = getDirectoryPath; - function startsWithDirectory(fileName, directoryName, getCanonicalFileName) { - var canonicalFileName = getCanonicalFileName(fileName); - var canonicalDirectoryName = getCanonicalFileName(directoryName); - return ts.startsWith(canonicalFileName, canonicalDirectoryName + "/") || ts.startsWith(canonicalFileName, canonicalDirectoryName + "\\"); - } - ts.startsWithDirectory = startsWithDirectory; - function isUrl(path) { - return getEncodedRootLength(path) < 0; - } - ts.isUrl = isUrl; - function pathIsRelative(path) { - return /^\.\.?($|[\\/])/.test(path); - } - ts.pathIsRelative = pathIsRelative; - /** - * Determines whether a path is an absolute path (e.g. starts with `/`, or a dos path - * like `c:`, `c:\` or `c:/`). - */ - function isRootedDiskPath(path) { - return getEncodedRootLength(path) > 0; - } - ts.isRootedDiskPath = isRootedDiskPath; - /** - * Determines whether a path consists only of a path root. - */ - function isDiskPathRoot(path) { - var rootLength = getEncodedRootLength(path); - return rootLength > 0 && rootLength === path.length; - } - ts.isDiskPathRoot = isDiskPathRoot; - function convertToRelativePath(absoluteOrRelativePath, basePath, getCanonicalFileName) { - return !isRootedDiskPath(absoluteOrRelativePath) - ? absoluteOrRelativePath - : ts.getRelativePathToDirectoryOrUrl(basePath, absoluteOrRelativePath, basePath, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); - } - ts.convertToRelativePath = convertToRelativePath; - function pathComponents(path, rootLength) { - var root = path.substring(0, rootLength); - var rest = path.substring(rootLength).split(ts.directorySeparator); - if (rest.length && !ts.lastOrUndefined(rest)) - rest.pop(); - return __spreadArrays([root], rest); - } - /** - * Parse a path into an array containing a root component (at index 0) and zero or more path - * components (at indices > 0). The result is not normalized. - * If the path is relative, the root component is `""`. - * If the path is absolute, the root component includes the first path separator (`/`). - */ - function getPathComponents(path, currentDirectory) { - if (currentDirectory === void 0) { currentDirectory = ""; } - path = ts.combinePaths(currentDirectory, path); - var rootLength = getRootLength(path); - return pathComponents(path, rootLength); - } - ts.getPathComponents = getPathComponents; - /** - * Reduce an array of path components to a more simplified path by navigating any - * `"."` or `".."` entries in the path. - */ - function reducePathComponents(components) { - if (!ts.some(components)) - return []; - var reduced = [components[0]]; - for (var i = 1; i < components.length; i++) { - var component = components[i]; - if (!component) - continue; - if (component === ".") - continue; - if (component === "..") { - if (reduced.length > 1) { - if (reduced[reduced.length - 1] !== "..") { - reduced.pop(); - continue; - } - } - else if (reduced[0]) - continue; - } - reduced.push(component); - } - return reduced; - } - ts.reducePathComponents = reducePathComponents; - /** - * Parse a path into an array containing a root component (at index 0) and zero or more path - * components (at indices > 0). The result is normalized. - * If the path is relative, the root component is `""`. - * If the path is absolute, the root component includes the first path separator (`/`). - */ - function getNormalizedPathComponents(path, currentDirectory) { - return reducePathComponents(getPathComponents(path, currentDirectory)); - } - ts.getNormalizedPathComponents = getNormalizedPathComponents; - function getNormalizedAbsolutePath(fileName, currentDirectory) { - return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory)); - } - ts.getNormalizedAbsolutePath = getNormalizedAbsolutePath; - /** - * Formats a parsed path consisting of a root component (at index 0) and zero or more path - * segments (at indices > 0). - */ - function getPathFromPathComponents(pathComponents) { - if (pathComponents.length === 0) - return ""; - var root = pathComponents[0] && ts.ensureTrailingDirectorySeparator(pathComponents[0]); - return root + pathComponents.slice(1).join(ts.directorySeparator); - } - ts.getPathFromPathComponents = getPathFromPathComponents; - function getNormalizedAbsolutePathWithoutRoot(fileName, currentDirectory) { - return getPathWithoutRoot(getNormalizedPathComponents(fileName, currentDirectory)); - } - ts.getNormalizedAbsolutePathWithoutRoot = getNormalizedAbsolutePathWithoutRoot; - function getPathWithoutRoot(pathComponents) { - if (pathComponents.length === 0) - return ""; - return pathComponents.slice(1).join(ts.directorySeparator); - } function discoverProbableSymlinks(files, getCanonicalFileName, cwd) { var result = ts.createMap(); var symlinks = ts.flatten(ts.mapDefined(files, function (sf) { @@ -16464,15 +16855,15 @@ var ts; } ts.discoverProbableSymlinks = discoverProbableSymlinks; function guessDirectorySymlink(a, b, cwd, getCanonicalFileName) { - var aParts = getPathComponents(ts.toPath(a, cwd, getCanonicalFileName)); - var bParts = getPathComponents(ts.toPath(b, cwd, getCanonicalFileName)); + var aParts = ts.getPathComponents(ts.toPath(a, cwd, getCanonicalFileName)); + var bParts = ts.getPathComponents(ts.toPath(b, cwd, getCanonicalFileName)); while (!isNodeModulesOrScopedPackageDirectory(aParts[aParts.length - 2], getCanonicalFileName) && !isNodeModulesOrScopedPackageDirectory(bParts[bParts.length - 2], getCanonicalFileName) && getCanonicalFileName(aParts[aParts.length - 1]) === getCanonicalFileName(bParts[bParts.length - 1])) { aParts.pop(); bParts.pop(); } - return [getPathFromPathComponents(aParts), getPathFromPathComponents(bParts)]; + return [ts.getPathFromPathComponents(aParts), ts.getPathFromPathComponents(bParts)]; } // KLUDGE: Don't assume one 'node_modules' links to another. More likely a single directory inside the node_modules is the symlink. // ALso, don't assume that an `@foo` directory is linked. More likely the contents of that are linked. @@ -16482,229 +16873,8 @@ var ts; })(ts || (ts = {})); /* @internal */ (function (ts) { - function getPathComponentsRelativeTo(from, to, stringEqualityComparer, getCanonicalFileName) { - var fromComponents = ts.reducePathComponents(ts.getPathComponents(from)); - var toComponents = ts.reducePathComponents(ts.getPathComponents(to)); - var start; - for (start = 0; start < fromComponents.length && start < toComponents.length; start++) { - var fromComponent = getCanonicalFileName(fromComponents[start]); - var toComponent = getCanonicalFileName(toComponents[start]); - var comparer = start === 0 ? ts.equateStringsCaseInsensitive : stringEqualityComparer; - if (!comparer(fromComponent, toComponent)) - break; - } - if (start === 0) { - return toComponents; - } - var components = toComponents.slice(start); - var relative = []; - for (; start < fromComponents.length; start++) { - relative.push(".."); - } - return __spreadArrays([""], relative, components); - } - ts.getPathComponentsRelativeTo = getPathComponentsRelativeTo; - function getRelativePathFromFile(from, to, getCanonicalFileName) { - return ensurePathIsNonModuleName(getRelativePathFromDirectory(ts.getDirectoryPath(from), to, getCanonicalFileName)); - } - ts.getRelativePathFromFile = getRelativePathFromFile; - function getRelativePathFromDirectory(fromDirectory, to, getCanonicalFileNameOrIgnoreCase) { - ts.Debug.assert((ts.getRootLength(fromDirectory) > 0) === (ts.getRootLength(to) > 0), "Paths must either both be absolute or both be relative"); - var getCanonicalFileName = typeof getCanonicalFileNameOrIgnoreCase === "function" ? getCanonicalFileNameOrIgnoreCase : ts.identity; - var ignoreCase = typeof getCanonicalFileNameOrIgnoreCase === "boolean" ? getCanonicalFileNameOrIgnoreCase : false; - var pathComponents = getPathComponentsRelativeTo(fromDirectory, to, ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive, getCanonicalFileName); - return ts.getPathFromPathComponents(pathComponents); - } - ts.getRelativePathFromDirectory = getRelativePathFromDirectory; - function getRelativePathToDirectoryOrUrl(directoryPathOrUrl, relativeOrAbsolutePath, currentDirectory, getCanonicalFileName, isAbsolutePathAnUrl) { - var pathComponents = getPathComponentsRelativeTo(resolvePath(currentDirectory, directoryPathOrUrl), resolvePath(currentDirectory, relativeOrAbsolutePath), ts.equateStringsCaseSensitive, getCanonicalFileName); - var firstComponent = pathComponents[0]; - if (isAbsolutePathAnUrl && ts.isRootedDiskPath(firstComponent)) { - var prefix = firstComponent.charAt(0) === ts.directorySeparator ? "file://" : "file:///"; - pathComponents[0] = prefix + firstComponent; - } - return ts.getPathFromPathComponents(pathComponents); - } - ts.getRelativePathToDirectoryOrUrl = getRelativePathToDirectoryOrUrl; - /** - * Ensures a path is either absolute (prefixed with `/` or `c:`) or dot-relative (prefixed - * with `./` or `../`) so as not to be confused with an unprefixed module name. - */ - function ensurePathIsNonModuleName(path) { - return ts.getRootLength(path) === 0 && !ts.pathIsRelative(path) ? "./" + path : path; - } - ts.ensurePathIsNonModuleName = ensurePathIsNonModuleName; - function getBaseFileName(path, extensions, ignoreCase) { - path = ts.normalizeSlashes(path); - // if the path provided is itself the root, then it has not file name. - var rootLength = ts.getRootLength(path); - if (rootLength === path.length) - return ""; - // return the trailing portion of the path starting after the last (non-terminal) directory - // separator but not including any trailing directory separator. - path = removeTrailingDirectorySeparator(path); - var name = path.slice(Math.max(ts.getRootLength(path), path.lastIndexOf(ts.directorySeparator) + 1)); - var extension = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(name, extensions, ignoreCase) : undefined; - return extension ? name.slice(0, name.length - extension.length) : name; - } - ts.getBaseFileName = getBaseFileName; - /** - * Combines paths. If a path is absolute, it replaces any previous path. - */ - function combinePaths(path) { - var paths = []; - for (var _i = 1; _i < arguments.length; _i++) { - paths[_i - 1] = arguments[_i]; - } - if (path) - path = ts.normalizeSlashes(path); - for (var _a = 0, paths_1 = paths; _a < paths_1.length; _a++) { - var relativePath = paths_1[_a]; - if (!relativePath) - continue; - relativePath = ts.normalizeSlashes(relativePath); - if (!path || ts.getRootLength(relativePath) !== 0) { - path = relativePath; - } - else { - path = ensureTrailingDirectorySeparator(path) + relativePath; - } - } - return path; - } - ts.combinePaths = combinePaths; - /** - * Combines and resolves paths. If a path is absolute, it replaces any previous path. Any - * `.` and `..` path components are resolved. - */ - function resolvePath(path) { - var paths = []; - for (var _i = 1; _i < arguments.length; _i++) { - paths[_i - 1] = arguments[_i]; - } - var combined = ts.some(paths) ? combinePaths.apply(void 0, __spreadArrays([path], paths)) : ts.normalizeSlashes(path); - var normalized = ts.getPathFromPathComponents(ts.reducePathComponents(ts.getPathComponents(combined))); - return normalized && hasTrailingDirectorySeparator(combined) ? ensureTrailingDirectorySeparator(normalized) : normalized; - } - ts.resolvePath = resolvePath; - /** - * Determines whether a path has a trailing separator (`/` or `\\`). - */ - function hasTrailingDirectorySeparator(path) { - if (path.length === 0) - return false; - var ch = path.charCodeAt(path.length - 1); - return ch === 47 /* slash */ || ch === 92 /* backslash */; - } - ts.hasTrailingDirectorySeparator = hasTrailingDirectorySeparator; - function removeTrailingDirectorySeparator(path) { - if (hasTrailingDirectorySeparator(path)) { - return path.substr(0, path.length - 1); - } - return path; - } - ts.removeTrailingDirectorySeparator = removeTrailingDirectorySeparator; - function ensureTrailingDirectorySeparator(path) { - if (!hasTrailingDirectorySeparator(path)) { - return path + ts.directorySeparator; - } - return path; - } - ts.ensureTrailingDirectorySeparator = ensureTrailingDirectorySeparator; - // check path for these segments: '', '.'. '..' - var relativePathSegmentRegExp = /(^|\/)\.{0,2}($|\/)/; - function comparePathsWorker(a, b, componentComparer) { - if (a === b) - return 0 /* EqualTo */; - if (a === undefined) - return -1 /* LessThan */; - if (b === undefined) - return 1 /* GreaterThan */; - // NOTE: Performance optimization - shortcut if the root segments differ as there would be no - // need to perform path reduction. - var aRoot = a.substring(0, ts.getRootLength(a)); - var bRoot = b.substring(0, ts.getRootLength(b)); - var result = ts.compareStringsCaseInsensitive(aRoot, bRoot); - if (result !== 0 /* EqualTo */) { - return result; - } - // NOTE: Performance optimization - shortcut if there are no relative path segments in - // the non-root portion of the path - var aRest = a.substring(aRoot.length); - var bRest = b.substring(bRoot.length); - if (!relativePathSegmentRegExp.test(aRest) && !relativePathSegmentRegExp.test(bRest)) { - return componentComparer(aRest, bRest); - } - // The path contains a relative path segment. Normalize the paths and perform a slower component - // by component comparison. - var aComponents = ts.reducePathComponents(ts.getPathComponents(a)); - var bComponents = ts.reducePathComponents(ts.getPathComponents(b)); - var sharedLength = Math.min(aComponents.length, bComponents.length); - for (var i = 1; i < sharedLength; i++) { - var result_1 = componentComparer(aComponents[i], bComponents[i]); - if (result_1 !== 0 /* EqualTo */) { - return result_1; - } - } - return ts.compareValues(aComponents.length, bComponents.length); - } - /** - * Performs a case-sensitive comparison of two paths. - */ - function comparePathsCaseSensitive(a, b) { - return comparePathsWorker(a, b, ts.compareStringsCaseSensitive); - } - ts.comparePathsCaseSensitive = comparePathsCaseSensitive; - /** - * Performs a case-insensitive comparison of two paths. - */ - function comparePathsCaseInsensitive(a, b) { - return comparePathsWorker(a, b, ts.compareStringsCaseInsensitive); - } - ts.comparePathsCaseInsensitive = comparePathsCaseInsensitive; - function comparePaths(a, b, currentDirectory, ignoreCase) { - if (typeof currentDirectory === "string") { - a = combinePaths(currentDirectory, a); - b = combinePaths(currentDirectory, b); - } - else if (typeof currentDirectory === "boolean") { - ignoreCase = currentDirectory; - } - return comparePathsWorker(a, b, ts.getStringComparer(ignoreCase)); - } - ts.comparePaths = comparePaths; - function containsPath(parent, child, currentDirectory, ignoreCase) { - if (typeof currentDirectory === "string") { - parent = combinePaths(currentDirectory, parent); - child = combinePaths(currentDirectory, child); - } - else if (typeof currentDirectory === "boolean") { - ignoreCase = currentDirectory; - } - if (parent === undefined || child === undefined) - return false; - if (parent === child) - return true; - var parentComponents = ts.reducePathComponents(ts.getPathComponents(parent)); - var childComponents = ts.reducePathComponents(ts.getPathComponents(child)); - if (childComponents.length < parentComponents.length) { - return false; - } - var componentEqualityComparer = ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive; - for (var i = 0; i < parentComponents.length; i++) { - var equalityComparer = i === 0 ? ts.equateStringsCaseInsensitive : componentEqualityComparer; - if (!equalityComparer(parentComponents[i], childComponents[i])) { - return false; - } - } - return true; - } - ts.containsPath = containsPath; - function isDirectorySeparator(charCode) { - return charCode === 47 /* slash */ || charCode === 92 /* backslash */; - } function stripLeadingDirectorySeparator(s) { - return isDirectorySeparator(s.charCodeAt(0)) ? s.slice(1) : undefined; + return ts.isAnyDirectorySeparator(s.charCodeAt(0)) ? s.slice(1) : undefined; } function tryRemoveDirectoryPrefix(path, dirPath, getCanonicalFileName) { var withoutPrefix = ts.tryRemovePrefix(path, dirPath, getCanonicalFileName); @@ -16723,10 +16893,6 @@ var ts; return "\\" + match; } var wildcardCharCodes = [42 /* asterisk */, 63 /* question */]; - function hasExtension(fileName) { - return ts.stringContains(getBaseFileName(fileName), "."); - } - ts.hasExtension = hasExtension; ts.commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"]; var implicitExcludePathRegexPattern = "(?!(" + ts.commonPackageFolders.join("|") + ")(/|$))"; var filesMatcher = { @@ -16802,7 +16968,7 @@ var ts; } // getNormalizedPathComponents includes the separator for the root component. // We need to remove to create our regex correctly. - components[0] = removeTrailingDirectorySeparator(components[0]); + components[0] = ts.removeTrailingDirectorySeparator(components[0]); if (isImplicitGlob(lastComponent)) { components.push("**", "*"); } @@ -16864,7 +17030,7 @@ var ts; function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory) { path = ts.normalizePath(path); currentDirectory = ts.normalizePath(currentDirectory); - var absolutePath = combinePaths(currentDirectory, path); + var absolutePath = ts.combinePaths(currentDirectory, path); return { includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^" + pattern + "$"; }), includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"), @@ -16893,7 +17059,7 @@ var ts; var toCanonical = ts.createGetCanonicalFileName(useCaseSensitiveFileNames); for (var _i = 0, _a = patterns.basePaths; _i < _a.length; _i++) { var basePath = _a[_i]; - visitDirectory(basePath, combinePaths(currentDirectory, basePath), depth); + visitDirectory(basePath, ts.combinePaths(currentDirectory, basePath), depth); } return ts.flatten(results); function visitDirectory(path, absolutePath, depth) { @@ -16903,8 +17069,8 @@ var ts; visited.set(canonicalPath, true); var _a = getFileSystemEntries(path), files = _a.files, directories = _a.directories; var _loop_1 = function (current) { - var name = combinePaths(path, current); - var absoluteName = combinePaths(absolutePath, current); + var name = ts.combinePaths(path, current); + var absoluteName = ts.combinePaths(absolutePath, current); if (extensions && !ts.fileExtensionIsOneOf(name, extensions)) return "continue"; if (excludeRegex && excludeRegex.test(absoluteName)) @@ -16931,8 +17097,8 @@ var ts; } for (var _c = 0, _d = ts.sort(directories, ts.compareStringsCaseSensitive); _c < _d.length; _c++) { var current = _d[_c]; - var name = combinePaths(path, current); - var absoluteName = combinePaths(absolutePath, current); + var name = ts.combinePaths(path, current); + var absoluteName = ts.combinePaths(absolutePath, current); if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) && (!excludeRegex || !excludeRegex.test(absoluteName))) { visitDirectory(name, absoluteName, depth); @@ -16954,14 +17120,14 @@ var ts; var include = includes_1[_i]; // We also need to check the relative paths by converting them to absolute and normalizing // in case they escape the base path (e.g "..\somedirectory") - var absolute = ts.isRootedDiskPath(include) ? include : ts.normalizePath(combinePaths(path, include)); + var absolute = ts.isRootedDiskPath(include) ? include : ts.normalizePath(ts.combinePaths(path, include)); // Append the literal and canonical candidate base paths. includeBasePaths.push(getIncludeBasePath(absolute)); } // Sort the offsets array using either the literal or canonical path representations. includeBasePaths.sort(ts.getStringComparer(!useCaseSensitiveFileNames)); var _loop_2 = function (includeBasePath) { - if (ts.every(basePaths, function (basePath) { return !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames); })) { + if (ts.every(basePaths, function (basePath) { return !ts.containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames); })) { basePaths.push(includeBasePath); } }; @@ -16978,9 +17144,9 @@ var ts; var wildcardOffset = ts.indexOfAnyCharCode(absolute, wildcardCharCodes); if (wildcardOffset < 0) { // No "*" or "?" in the path - return !hasExtension(absolute) + return !ts.hasExtension(absolute) ? absolute - : removeTrailingDirectorySeparator(ts.getDirectoryPath(absolute)); + : ts.removeTrailingDirectorySeparator(ts.getDirectoryPath(absolute)); } return absolute.substring(0, absolute.lastIndexOf(ts.directorySeparator, wildcardOffset)); } @@ -17052,10 +17218,6 @@ var ts; return ts.some(ts.supportedJSExtensions, function (extension) { return ts.fileExtensionIs(fileName, extension); }); } ts.hasJSFileExtension = hasJSFileExtension; - function hasJSOrJsonFileExtension(fileName) { - return ts.supportedJSAndJsonExtensions.some(function (ext) { return ts.fileExtensionIs(fileName, ext); }); - } - ts.hasJSOrJsonFileExtension = hasJSOrJsonFileExtension; function hasTSFileExtension(fileName) { return ts.some(ts.supportedTSExtensions, function (extension) { return ts.fileExtensionIs(fileName, extension); }); } @@ -17145,14 +17307,9 @@ var ts; } ts.removeExtension = removeExtension; function changeExtension(path, newExtension) { - return changeAnyExtension(path, newExtension, extensionsToRemove, /*ignoreCase*/ false); + return ts.changeAnyExtension(path, newExtension, extensionsToRemove, /*ignoreCase*/ false); } ts.changeExtension = changeExtension; - function changeAnyExtension(path, ext, extensions, ignoreCase) { - var pathext = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(path, extensions, ignoreCase) : getAnyExtensionFromPath(path); - return pathext ? path.slice(0, path.length - pathext.length) + (ts.startsWith(ext, ".") ? ext : "." + ext) : path; - } - ts.changeAnyExtension = changeAnyExtension; function tryParsePattern(pattern) { // This should be verified outside of here and a proper error thrown. ts.Debug.assert(ts.hasZeroOrOneAsteriskCharacter(pattern)); @@ -17195,36 +17352,6 @@ var ts; return ts.find(extensionsToRemove, function (e) { return ts.fileExtensionIs(path, e); }); } ts.tryGetExtensionFromPath = tryGetExtensionFromPath; - function getAnyExtensionFromPathWorker(path, extensions, stringEqualityComparer) { - if (typeof extensions === "string") - extensions = [extensions]; - for (var _i = 0, extensions_2 = extensions; _i < extensions_2.length; _i++) { - var extension = extensions_2[_i]; - if (!ts.startsWith(extension, ".")) - extension = "." + extension; - if (path.length >= extension.length && path.charAt(path.length - extension.length) === ".") { - var pathExtension = path.slice(path.length - extension.length); - if (stringEqualityComparer(pathExtension, extension)) { - return pathExtension; - } - } - } - return ""; - } - function getAnyExtensionFromPath(path, extensions, ignoreCase) { - // Retrieves any string from the final "." onwards from a base file name. - // Unlike extensionFromPath, which throws an exception on unrecognized extensions. - if (extensions) { - return getAnyExtensionFromPathWorker(path, extensions, ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive); - } - var baseFileName = getBaseFileName(path); - var extensionIndex = baseFileName.lastIndexOf("."); - if (extensionIndex >= 0) { - return baseFileName.substring(extensionIndex); - } - return ""; - } - ts.getAnyExtensionFromPath = getAnyExtensionFromPath; function isCheckJsEnabledForFile(sourceFile, compilerOptions) { return sourceFile.checkJsDirective ? sourceFile.checkJsDirective.enabled : compilerOptions.checkJs; } @@ -18432,6 +18559,9 @@ var ts; function doInYieldAndAwaitContext(func) { return doInsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */, func); } + function doOutsideOfYieldAndAwaitContext(func) { + return doOutsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */, func); + } function inContext(flags) { return (contextFlags & flags) !== 0; } @@ -22703,18 +22833,7 @@ var ts; node.exclamationToken = parseTokenNode(); } node.type = parseTypeAnnotation(); - // For instance properties specifically, since they are evaluated inside the constructor, - // we do *not * want to parse yield expressions, so we specifically turn the yield context - // off. The grammar would look something like this: - // - // MemberVariableDeclaration[Yield]: - // AccessibilityModifier_opt PropertyName TypeAnnotation_opt Initializer_opt[In]; - // AccessibilityModifier_opt static_opt PropertyName TypeAnnotation_opt Initializer_opt[In, ?Yield]; - // - // The checker may still error in the static case to explicitly disallow the yield expression. - node.initializer = ts.hasModifier(node, 32 /* Static */) - ? allowInAnd(parseInitializer) - : doOutsideOfContext(8192 /* YieldContext */ | 4096 /* DisallowInContext */, parseInitializer); + node.initializer = doOutsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */ | 4096 /* DisallowInContext */, parseInitializer); parseSemicolon(); return finishNode(node); } @@ -23005,7 +23124,7 @@ var ts; parseExpected(87 /* EnumKeyword */); node.name = parseIdentifier(); if (parseExpected(18 /* OpenBraceToken */)) { - node.members = parseDelimitedList(6 /* EnumMembers */, parseEnumMember); + node.members = doOutsideOfYieldAndAwaitContext(function () { return parseDelimitedList(6 /* EnumMembers */, parseEnumMember); }); parseExpected(19 /* CloseBraceToken */); } else { @@ -25067,6 +25186,15 @@ var ts; isCommandLineOnly: true, description: ts.Diagnostics.Print_the_final_configuration_instead_of_building }, + { + name: "listFilesOnly", + type: "boolean", + category: ts.Diagnostics.Command_line_Options, + affectsSemanticDiagnostics: true, + affectsEmit: true, + isCommandLineOnly: true, + description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing + }, // Basic { name: "target", @@ -25898,8 +26026,7 @@ var ts; } } ts.parseListTypeOption = parseListTypeOption; - function parseCommandLineWorker(getOptionNameMap, _a, commandLine, readFile) { - var unknownOptionDiagnostic = _a[0], optionTypeMismatchDiagnostic = _a[1]; + function parseCommandLineWorker(getOptionNameMap, diagnostics, commandLine, readFile) { var options = {}; var fileNames = []; var errors = []; @@ -25926,7 +26053,7 @@ var ts; else { // Check to see if no argument was provided (e.g. "--locale" is the last command-line argument). if (!args[i] && opt.type !== "boolean") { - errors.push(ts.createCompilerDiagnostic(optionTypeMismatchDiagnostic, opt.name)); + errors.push(ts.createCompilerDiagnostic(diagnostics.optionTypeMismatchDiagnostic, opt.name)); } switch (opt.type) { case "number": @@ -25962,7 +26089,13 @@ var ts; } } else { - errors.push(ts.createCompilerDiagnostic(unknownOptionDiagnostic, s)); + var possibleOption = ts.getSpellingSuggestion(s, ts.optionDeclarations, function (opt) { return "--" + opt.name; }); + if (possibleOption) { + errors.push(ts.createCompilerDiagnostic(diagnostics.unknownDidYouMeanDiagnostic, s, possibleOption.name)); + } + else { + errors.push(ts.createCompilerDiagnostic(diagnostics.unknownOptionDiagnostic, s)); + } } } else { @@ -26005,11 +26138,13 @@ var ts; parseStrings(args); } } + var compilerOptionsDefaultDiagnostics = { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_compiler_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_compiler_option_0_Did_you_mean_1, + optionTypeMismatchDiagnostic: ts.Diagnostics.Compiler_option_0_expects_an_argument + }; function parseCommandLine(commandLine, readFile) { - return parseCommandLineWorker(getOptionNameMap, [ - ts.Diagnostics.Unknown_compiler_option_0, - ts.Diagnostics.Compiler_option_0_expects_an_argument - ], commandLine, readFile); + return parseCommandLineWorker(getOptionNameMap, compilerOptionsDefaultDiagnostics, commandLine, readFile); } ts.parseCommandLine = parseCommandLine; /** @internal */ @@ -26034,10 +26169,11 @@ var ts; function parseBuildCommand(args) { var buildOptionNameMap; var returnBuildOptionNameMap = function () { return (buildOptionNameMap || (buildOptionNameMap = createOptionNameMap(ts.buildOpts))); }; - var _a = parseCommandLineWorker(returnBuildOptionNameMap, [ - ts.Diagnostics.Unknown_build_option_0, - ts.Diagnostics.Build_option_0_requires_a_value_of_type_1 - ], args), options = _a.options, projects = _a.fileNames, errors = _a.errors; + var _a = parseCommandLineWorker(returnBuildOptionNameMap, { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_build_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_build_option_0_Did_you_mean_1, + optionTypeMismatchDiagnostic: ts.Diagnostics.Build_option_0_requires_a_value_of_type_1 + }, args), options = _a.options, projects = _a.fileNames, errors = _a.errors; var buildOptions = options; if (projects.length === 0) { // tsc -b invoked with no extra arguments; act as if invoked with "tsc -b ." @@ -26059,6 +26195,7 @@ var ts; return { buildOptions: buildOptions, projects: projects, errors: errors }; } ts.parseBuildCommand = parseBuildCommand; + /* @internal */ function getDiagnosticText(_message) { var _args = []; for (var _i = 1; _i < arguments.length; _i++) { @@ -26067,104 +26204,7 @@ var ts; var diagnostic = ts.createCompilerDiagnostic.apply(undefined, arguments); return diagnostic.messageText; } - /* @internal */ - function printVersion() { - ts.sys.write(getDiagnosticText(ts.Diagnostics.Version_0, ts.version) + ts.sys.newLine); - } - ts.printVersion = printVersion; - /* @internal */ - function printHelp(optionsList, syntaxPrefix) { - if (syntaxPrefix === void 0) { syntaxPrefix = ""; } - var output = []; - // We want to align our "syntax" and "examples" commands to a certain margin. - var syntaxLength = getDiagnosticText(ts.Diagnostics.Syntax_Colon_0, "").length; - var examplesLength = getDiagnosticText(ts.Diagnostics.Examples_Colon_0, "").length; - var marginLength = Math.max(syntaxLength, examplesLength); - // Build up the syntactic skeleton. - var syntax = makePadding(marginLength - syntaxLength); - syntax += "tsc " + syntaxPrefix + "[" + getDiagnosticText(ts.Diagnostics.options) + "] [" + getDiagnosticText(ts.Diagnostics.file) + "...]"; - output.push(getDiagnosticText(ts.Diagnostics.Syntax_Colon_0, syntax)); - output.push(ts.sys.newLine + ts.sys.newLine); - // Build up the list of examples. - var padding = makePadding(marginLength); - output.push(getDiagnosticText(ts.Diagnostics.Examples_Colon_0, makePadding(marginLength - examplesLength) + "tsc hello.ts") + ts.sys.newLine); - output.push(padding + "tsc --outFile file.js file.ts" + ts.sys.newLine); - output.push(padding + "tsc @args.txt" + ts.sys.newLine); - output.push(padding + "tsc --build tsconfig.json" + ts.sys.newLine); - output.push(ts.sys.newLine); - output.push(getDiagnosticText(ts.Diagnostics.Options_Colon) + ts.sys.newLine); - // We want our descriptions to align at the same column in our output, - // so we keep track of the longest option usage string. - marginLength = 0; - var usageColumn = []; // Things like "-d, --declaration" go in here. - var descriptionColumn = []; - var optionsDescriptionMap = ts.createMap(); // Map between option.description and list of option.type if it is a kind - for (var _i = 0, optionsList_1 = optionsList; _i < optionsList_1.length; _i++) { - var option = optionsList_1[_i]; - // If an option lacks a description, - // it is not officially supported. - if (!option.description) { - continue; - } - var usageText_1 = " "; - if (option.shortName) { - usageText_1 += "-" + option.shortName; - usageText_1 += getParamType(option); - usageText_1 += ", "; - } - usageText_1 += "--" + option.name; - usageText_1 += getParamType(option); - usageColumn.push(usageText_1); - var description = void 0; - if (option.name === "lib") { - description = getDiagnosticText(option.description); - var element = option.element; - var typeMap = element.type; - optionsDescriptionMap.set(description, ts.arrayFrom(typeMap.keys()).map(function (key) { return "'" + key + "'"; })); - } - else { - description = getDiagnosticText(option.description); - } - descriptionColumn.push(description); - // Set the new margin for the description column if necessary. - marginLength = Math.max(usageText_1.length, marginLength); - } - // Special case that can't fit in the loop. - var usageText = " @<" + getDiagnosticText(ts.Diagnostics.file) + ">"; - usageColumn.push(usageText); - descriptionColumn.push(getDiagnosticText(ts.Diagnostics.Insert_command_line_options_and_files_from_a_file)); - marginLength = Math.max(usageText.length, marginLength); - // Print out each row, aligning all the descriptions on the same column. - for (var i = 0; i < usageColumn.length; i++) { - var usage = usageColumn[i]; - var description = descriptionColumn[i]; - var kindsList = optionsDescriptionMap.get(description); - output.push(usage + makePadding(marginLength - usage.length + 2) + description + ts.sys.newLine); - if (kindsList) { - output.push(makePadding(marginLength + 4)); - for (var _a = 0, kindsList_1 = kindsList; _a < kindsList_1.length; _a++) { - var kind = kindsList_1[_a]; - output.push(kind + " "); - } - output.push(ts.sys.newLine); - } - } - for (var _b = 0, output_1 = output; _b < output_1.length; _b++) { - var line = output_1[_b]; - ts.sys.write(line); - } - return; - function getParamType(option) { - if (option.paramType !== undefined) { - return " " + getDiagnosticText(option.paramType); - } - return ""; - } - function makePadding(paddingLength) { - return Array(paddingLength + 1).join(" "); - } - } - ts.printHelp = printHelp; + ts.getDiagnosticText = getDiagnosticText; /** * Reads the config file, reports errors if any and exits if the config file cannot be found */ @@ -26248,19 +26288,28 @@ var ts; name: "compilerOptions", type: "object", elementOptions: commandLineOptionsToMap(ts.optionDeclarations), - extraKeyDiagnosticMessage: ts.Diagnostics.Unknown_compiler_option_0 + extraKeyDiagnostics: { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_compiler_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_compiler_option_0_Did_you_mean_1 + }, }, { name: "typingOptions", type: "object", elementOptions: commandLineOptionsToMap(ts.typeAcquisitionDeclarations), - extraKeyDiagnosticMessage: ts.Diagnostics.Unknown_type_acquisition_option_0 + extraKeyDiagnostics: { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1 + }, }, { name: "typeAcquisition", type: "object", elementOptions: commandLineOptionsToMap(ts.typeAcquisitionDeclarations), - extraKeyDiagnosticMessage: ts.Diagnostics.Unknown_type_acquisition_option_0 + extraKeyDiagnostics: { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1 + } }, { name: "extends", @@ -26325,7 +26374,7 @@ var ts; function isRootOptionMap(knownOptions) { return knownRootOptions && knownRootOptions.elementOptions === knownOptions; } - function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnosticMessage, parentOption) { + function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnostics, parentOption) { var result = returnValue ? {} : undefined; for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var element = _a[_i]; @@ -26342,8 +26391,19 @@ var ts; var textOfKey = ts.getTextOfPropertyName(element.name); var keyText = textOfKey && ts.unescapeLeadingUnderscores(textOfKey); var option = keyText && knownOptions ? knownOptions.get(keyText) : undefined; - if (keyText && extraKeyDiagnosticMessage && !option) { - errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnosticMessage, keyText)); + if (keyText && extraKeyDiagnostics && !option) { + if (knownOptions) { + var possibleOption = ts.getSpellingSuggestion(keyText, ts.arrayFrom(knownOptions.keys()), ts.identity); + if (possibleOption) { + errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnostics.unknownDidYouMeanDiagnostic, keyText, possibleOption)); + } + else { + errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnostics.unknownOptionDiagnostic, keyText)); + } + } + else { + errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnostics.unknownOptionDiagnostic, keyText)); + } } var value = convertPropertyValueToJson(element.initializer, option); if (typeof keyText !== "undefined") { @@ -26427,8 +26487,8 @@ var ts; // vs what we set in the json // If need arises, we can modify this interface and callbacks as needed if (option) { - var _a = option, elementOptions = _a.elementOptions, extraKeyDiagnosticMessage = _a.extraKeyDiagnosticMessage, optionName = _a.name; - return convertObjectLiteralExpressionToJson(objectLiteralExpression, elementOptions, extraKeyDiagnosticMessage, optionName); + var _a = option, elementOptions = _a.elementOptions, extraKeyDiagnostics = _a.extraKeyDiagnostics, optionName = _a.name; + return convertObjectLiteralExpressionToJson(objectLiteralExpression, elementOptions, extraKeyDiagnostics, optionName); } else { return convertObjectLiteralExpressionToJson(objectLiteralExpression, /* knownOptions*/ undefined, @@ -26483,7 +26543,7 @@ var ts; /** @internal */ function convertToTSConfig(configParseResult, configFileName, host) { var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames); - var files = ts.map(ts.filter(configParseResult.fileNames, (!configParseResult.configFileSpecs || !configParseResult.configFileSpecs.validatedIncludeSpecs) ? function (_) { return true; } : matchesSpecs(configFileName, configParseResult.configFileSpecs.validatedIncludeSpecs, configParseResult.configFileSpecs.validatedExcludeSpecs)), function (f) { return ts.getRelativePathFromFile(ts.getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), ts.getNormalizedAbsolutePath(f, host.getCurrentDirectory()), getCanonicalFileName); }); + var files = ts.map(ts.filter(configParseResult.fileNames, (!configParseResult.configFileSpecs || !configParseResult.configFileSpecs.validatedIncludeSpecs) ? function (_) { return true; } : matchesSpecs(configFileName, configParseResult.configFileSpecs.validatedIncludeSpecs, configParseResult.configFileSpecs.validatedExcludeSpecs, host)), function (f) { return ts.getRelativePathFromFile(ts.getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), ts.getNormalizedAbsolutePath(f, host.getCurrentDirectory()), getCanonicalFileName); }); var optionMap = serializeCompilerOptions(configParseResult.options, { configFilePath: ts.getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), useCaseSensitiveFileNames: host.useCaseSensitiveFileNames }); var config = __assign(__assign({ compilerOptions: __assign(__assign({}, ts.arrayFrom(optionMap.entries()).reduce(function (prev, cur) { var _a; @@ -26504,12 +26564,12 @@ var ts; return undefined; return specs; } - function matchesSpecs(path, includeSpecs, excludeSpecs) { + function matchesSpecs(path, includeSpecs, excludeSpecs, host) { if (!includeSpecs) return function (_) { return true; }; - var patterns = ts.getFileMatcherPatterns(path, excludeSpecs, includeSpecs, ts.sys.useCaseSensitiveFileNames, ts.sys.getCurrentDirectory()); - var excludeRe = patterns.excludePattern && ts.getRegexFromPattern(patterns.excludePattern, ts.sys.useCaseSensitiveFileNames); - var includeRe = patterns.includeFilePattern && ts.getRegexFromPattern(patterns.includeFilePattern, ts.sys.useCaseSensitiveFileNames); + var patterns = ts.getFileMatcherPatterns(path, excludeSpecs, includeSpecs, host.useCaseSensitiveFileNames, host.getCurrentDirectory()); + var excludeRe = patterns.excludePattern && ts.getRegexFromPattern(patterns.excludePattern, host.useCaseSensitiveFileNames); + var includeRe = patterns.includeFilePattern && ts.getRegexFromPattern(patterns.includeFilePattern, host.useCaseSensitiveFileNames); if (includeRe) { if (excludeRe) { return function (path) { return !(includeRe.test(path) && !excludeRe.test(path)); }; @@ -26686,6 +26746,35 @@ var ts; } } ts.generateTSConfig = generateTSConfig; + /* @internal */ + function convertToOptionsWithAbsolutePaths(options, toAbsolutePath) { + var result = {}; + var optionsNameMap = getOptionNameMap().optionNameMap; + for (var name in options) { + if (ts.hasProperty(options, name)) { + result[name] = convertToOptionValueWithAbsolutePaths(optionsNameMap.get(name.toLowerCase()), options[name], toAbsolutePath); + } + } + if (result.configFilePath) { + result.configFilePath = toAbsolutePath(result.configFilePath); + } + return result; + } + ts.convertToOptionsWithAbsolutePaths = convertToOptionsWithAbsolutePaths; + function convertToOptionValueWithAbsolutePaths(option, value, toAbsolutePath) { + if (option) { + if (option.type === "list") { + var values = value; + if (option.element.isFilePath && values.length) { + return values.map(toAbsolutePath); + } + } + else if (option.isFilePath) { + return toAbsolutePath(value); + } + } + return value; + } /** * Parse the contents of a config file (tsconfig.json). * @param json The contents of the config file to parse @@ -27074,7 +27163,7 @@ var ts; } function convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName) { var options = getDefaultCompilerOptions(configFileName); - convertOptionsFromJson(ts.optionDeclarations, jsonOptions, basePath, options, ts.Diagnostics.Unknown_compiler_option_0, errors); + convertOptionsFromJson(ts.optionDeclarations, jsonOptions, basePath, options, compilerOptionsDefaultDiagnostics, errors); if (configFileName) { options.configFilePath = ts.normalizeSlashes(configFileName); } @@ -27086,10 +27175,14 @@ var ts; function convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName) { var options = getDefaultTypeAcquisition(configFileName); var typeAcquisition = convertEnableAutoDiscoveryToEnable(jsonOptions); - convertOptionsFromJson(ts.typeAcquisitionDeclarations, typeAcquisition, basePath, options, ts.Diagnostics.Unknown_type_acquisition_option_0, errors); + var diagnostics = { + unknownOptionDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0, + unknownDidYouMeanDiagnostic: ts.Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1, + }; + convertOptionsFromJson(ts.typeAcquisitionDeclarations, typeAcquisition, basePath, options, diagnostics, errors); return options; } - function convertOptionsFromJson(optionDeclarations, jsonOptions, basePath, defaultOptions, diagnosticMessage, errors) { + function convertOptionsFromJson(optionDeclarations, jsonOptions, basePath, defaultOptions, diagnostics, errors) { if (!jsonOptions) { return; } @@ -27100,7 +27193,13 @@ var ts; defaultOptions[opt.name] = convertJsonOption(opt, jsonOptions[id], basePath, errors); } else { - errors.push(ts.createCompilerDiagnostic(diagnosticMessage, id)); + var possibleOption = ts.getSpellingSuggestion(id, optionDeclarations, function (opt) { return opt.name; }); + if (possibleOption) { + errors.push(ts.createCompilerDiagnostic(diagnostics.unknownDidYouMeanDiagnostic, id, possibleOption.name)); + } + else { + errors.push(ts.createCompilerDiagnostic(diagnostics.unknownOptionDiagnostic, id)); + } } } } @@ -27136,7 +27235,7 @@ var ts; } function normalizeNonListOptionValue(option, basePath, value) { if (option.isFilePath) { - value = ts.normalizePath(ts.combinePaths(basePath, value)); + value = ts.getNormalizedAbsolutePath(value, basePath); if (value === "") { value = "."; } @@ -28920,7 +29019,10 @@ var ts; ContainerFlags[ContainerFlags["IsInterface"] = 64] = "IsInterface"; ContainerFlags[ContainerFlags["IsObjectLiteralOrClassExpressionMethod"] = 128] = "IsObjectLiteralOrClassExpressionMethod"; })(ContainerFlags || (ContainerFlags = {})); - var flowNodeCreated = ts.identity; + function initFlowNode(node) { + ts.Debug.attachFlowNodeDebugInfo(node); + return node; + } var binder = createBinder(); function bindSourceFile(file, options) { ts.performance.mark("beforeBind"); @@ -28949,6 +29051,7 @@ var ts; var currentReturnTarget; var currentTrueTarget; var currentFalseTarget; + var currentExceptionTarget; var preSwitchCaseFlow; var activeLabels; var hasExplicitReturn; @@ -28984,6 +29087,9 @@ var ts; symbolCount = 0; skipTransformFlagAggregation = file.isDeclarationFile; Symbol = ts.objectAllocator.getSymbolConstructor(); + // Attach debugging information if necessary + ts.Debug.attachFlowNodeDebugInfo(unreachableFlow); + ts.Debug.attachFlowNodeDebugInfo(reportedUnreachableFlow); if (!file.locals) { bind(file); file.symbolCount = symbolCount; @@ -29006,6 +29112,7 @@ var ts; currentReturnTarget = undefined; currentTrueTarget = undefined; currentFalseTarget = undefined; + currentExceptionTarget = undefined; activeLabels = undefined; hasExplicitReturn = false; emitFlags = 0 /* None */; @@ -29327,11 +29434,11 @@ var ts; blockScopeContainer.locals = undefined; } if (containerFlags & 4 /* IsControlFlowContainer */) { - var saveFlowNodeCreated = flowNodeCreated; var saveCurrentFlow = currentFlow; var saveBreakTarget = currentBreakTarget; var saveContinueTarget = currentContinueTarget; var saveReturnTarget = currentReturnTarget; + var saveExceptionTarget = currentExceptionTarget; var saveActiveLabels = activeLabels; var saveHasExplicitReturn = hasExplicitReturn; var isIIFE = containerFlags & 16 /* IsFunctionExpression */ && !ts.hasModifier(node, 256 /* Async */) && @@ -29339,7 +29446,7 @@ var ts; // A non-async, non-generator IIFE is considered part of the containing control flow. Return statements behave // similarly to break statements that exit to a label just past the statement body. if (!isIIFE) { - currentFlow = { flags: 2 /* Start */ }; + currentFlow = initFlowNode({ flags: 2 /* Start */ }); if (containerFlags & (16 /* IsFunctionExpression */ | 128 /* IsObjectLiteralOrClassExpressionMethod */)) { currentFlow.node = node; } @@ -29347,11 +29454,11 @@ var ts; // We create a return control flow graph for IIFEs and constructors. For constructors // we use the return control flow graph in strict property initialization checks. currentReturnTarget = isIIFE || node.kind === 161 /* Constructor */ ? createBranchLabel() : undefined; + currentExceptionTarget = undefined; currentBreakTarget = undefined; currentContinueTarget = undefined; activeLabels = undefined; hasExplicitReturn = false; - flowNodeCreated = ts.identity; bindChildren(node); // Reset all reachability check related flags on node (for incremental scenarios) node.flags &= ~2816 /* ReachabilityAndEmitFlags */; @@ -29377,9 +29484,9 @@ var ts; currentBreakTarget = saveBreakTarget; currentContinueTarget = saveContinueTarget; currentReturnTarget = saveReturnTarget; + currentExceptionTarget = saveExceptionTarget; activeLabels = saveActiveLabels; hasExplicitReturn = saveHasExplicitReturn; - flowNodeCreated = saveFlowNodeCreated; } else if (containerFlags & 64 /* IsInterface */) { seenThisKeyword = false; @@ -29520,9 +29627,6 @@ var ts; case 309 /* JSDocEnumTag */: bindJSDocTypeAlias(node); break; - case 307 /* JSDocClassTag */: - bindJSDocClassTag(node); - break; // In source files and blocks, bind functions first to match hoisting that occurs at runtime case 288 /* SourceFile */: { bindEachFunctionsFirst(node.statements); @@ -29562,9 +29666,8 @@ var ts; function isNarrowableReference(expr) { return expr.kind === 75 /* Identifier */ || expr.kind === 103 /* ThisKeyword */ || expr.kind === 101 /* SuperKeyword */ || (ts.isPropertyAccessExpression(expr) || ts.isNonNullExpression(expr) || ts.isParenthesizedExpression(expr)) && isNarrowableReference(expr.expression) || - ts.isElementAccessExpression(expr) && - ts.isStringOrNumericLiteralLike(expr.argumentExpression) && - isNarrowableReference(expr.expression); + ts.isElementAccessExpression(expr) && ts.isStringOrNumericLiteralLike(expr.argumentExpression) && isNarrowableReference(expr.expression) || + ts.isOptionalChain(expr); } function hasNarrowableArgument(expr) { if (expr.arguments) { @@ -29621,10 +29724,10 @@ var ts; return isNarrowableReference(expr); } function createBranchLabel() { - return { flags: 4 /* BranchLabel */, antecedents: undefined }; + return initFlowNode({ flags: 4 /* BranchLabel */, antecedents: undefined }); } function createLoopLabel() { - return { flags: 8 /* LoopLabel */, antecedents: undefined }; + return initFlowNode({ flags: 8 /* LoopLabel */, antecedents: undefined }); } function setFlowNodeReferenced(flow) { // On first reference we set the Referenced flag, thereafter we set the Shared flag @@ -29643,36 +29746,32 @@ var ts; if (!expression) { return flags & 32 /* TrueCondition */ ? antecedent : unreachableFlow; } - if (expression.kind === 105 /* TrueKeyword */ && flags & 64 /* FalseCondition */ || - expression.kind === 90 /* FalseKeyword */ && flags & 32 /* TrueCondition */) { - if (!ts.isOptionalChainRoot(expression.parent)) { - return unreachableFlow; - } + if ((expression.kind === 105 /* TrueKeyword */ && flags & 64 /* FalseCondition */ || + expression.kind === 90 /* FalseKeyword */ && flags & 32 /* TrueCondition */) && + !ts.isExpressionOfOptionalChainRoot(expression) && !ts.isNullishCoalesce(expression.parent)) { + return unreachableFlow; } if (!isNarrowingExpression(expression)) { return antecedent; } setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: flags, antecedent: antecedent, node: expression }); + return initFlowNode({ flags: flags, antecedent: antecedent, node: expression }); } function createFlowSwitchClause(antecedent, switchStatement, clauseStart, clauseEnd) { - if (!isNarrowingExpression(switchStatement.expression)) { - return antecedent; - } setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: 128 /* SwitchClause */, antecedent: antecedent, switchStatement: switchStatement, clauseStart: clauseStart, clauseEnd: clauseEnd }); + return initFlowNode({ flags: 128 /* SwitchClause */, antecedent: antecedent, switchStatement: switchStatement, clauseStart: clauseStart, clauseEnd: clauseEnd }); } - function createFlowAssignment(antecedent, node) { + function createFlowMutation(flags, antecedent, node) { setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: 16 /* Assignment */, antecedent: antecedent, node: node }); + var result = initFlowNode({ flags: flags, antecedent: antecedent, node: node }); + if (currentExceptionTarget) { + addAntecedent(currentExceptionTarget, result); + } + return result; } function createFlowCall(antecedent, node) { setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: 512 /* Call */, antecedent: antecedent, node: node }); - } - function createFlowArrayMutation(antecedent, node) { - setFlowNodeReferenced(antecedent); - return flowNodeCreated({ flags: 256 /* ArrayMutation */, antecedent: antecedent, node: node }); + return initFlowNode({ flags: 512 /* Call */, antecedent: antecedent, node: node }); } function finishFlowLabel(flow) { var antecedents = flow.antecedents; @@ -29732,7 +29831,7 @@ var ts; } function bindCondition(node, trueTarget, falseTarget) { doWithConditionalBranches(bind, node, trueTarget, falseTarget); - if (!node || !isLogicalExpression(node) && !(ts.isOptionalChain(node) && isOutermostOptionalChain(node))) { + if (!node || !isLogicalExpression(node) && !(ts.isOptionalChain(node) && ts.isOutermostOptionalChain(node))) { addAntecedent(trueTarget, createFlowCondition(32 /* TrueCondition */, currentFlow, node)); addAntecedent(falseTarget, createFlowCondition(64 /* FalseCondition */, currentFlow, node)); } @@ -29863,87 +29962,56 @@ var ts; } function bindTryStatement(node) { var preFinallyLabel = createBranchLabel(); - var preTryFlow = currentFlow; - var tryPriors = []; - var oldFlowNodeCreated = flowNodeCreated; - // We hook the creation of all flow nodes within the `try` scope and store them so we can add _all_ of them - // as possible antecedents of the start of the `catch` or `finally` blocks. - // Don't bother intercepting the call if there's no finally or catch block that needs the information - if (node.catchClause || node.finallyBlock) { - flowNodeCreated = function (node) { return (tryPriors.push(node), node); }; - } + // We conservatively assume that *any* code in the try block can cause an exception, but we only need + // to track code that causes mutations (because only mutations widen the possible control flow type of + // a variable). The currentExceptionTarget is the target label for control flows that result from + // exceptions. We add all mutation flow nodes as antecedents of this label such that we can analyze them + // as possible antecedents of the start of catch or finally blocks. Furthermore, we add the current + // control flow to represent exceptions that occur before any mutations. + var saveExceptionTarget = currentExceptionTarget; + currentExceptionTarget = createBranchLabel(); + addAntecedent(currentExceptionTarget, currentFlow); bind(node.tryBlock); - flowNodeCreated = oldFlowNodeCreated; addAntecedent(preFinallyLabel, currentFlow); var flowAfterTry = currentFlow; var flowAfterCatch = unreachableFlow; if (node.catchClause) { - currentFlow = preTryFlow; - if (tryPriors.length) { - var preCatchFlow = createBranchLabel(); - addAntecedent(preCatchFlow, currentFlow); - for (var _i = 0, tryPriors_1 = tryPriors; _i < tryPriors_1.length; _i++) { - var p = tryPriors_1[_i]; - addAntecedent(preCatchFlow, p); - } - currentFlow = finishFlowLabel(preCatchFlow); - } + // Start of catch clause is the target of exceptions from try block. + currentFlow = finishFlowLabel(currentExceptionTarget); + // The currentExceptionTarget now represents control flows from exceptions in the catch clause. + // Effectively, in a try-catch-finally, if an exception occurs in the try block, the catch block + // acts like a second try block. + currentExceptionTarget = createBranchLabel(); + addAntecedent(currentExceptionTarget, currentFlow); bind(node.catchClause); addAntecedent(preFinallyLabel, currentFlow); flowAfterCatch = currentFlow; } + var exceptionTarget = finishFlowLabel(currentExceptionTarget); + currentExceptionTarget = saveExceptionTarget; if (node.finallyBlock) { - // We add the nodes within the `try` block to the `finally`'s antecedents if there's no catch block - // (If there is a `catch` block, it will have all these antecedents instead, and the `finally` will - // have the end of the `try` block and the end of the `catch` block) - var preFinallyPrior = preTryFlow; - if (!node.catchClause) { - if (tryPriors.length) { - var preFinallyFlow_1 = createBranchLabel(); - addAntecedent(preFinallyFlow_1, preTryFlow); - for (var _a = 0, tryPriors_2 = tryPriors; _a < tryPriors_2.length; _a++) { - var p = tryPriors_2[_a]; - addAntecedent(preFinallyFlow_1, p); - } - preFinallyPrior = finishFlowLabel(preFinallyFlow_1); - } - } - // in finally flow is combined from pre-try/flow from try/flow from catch - // pre-flow is necessary to make sure that finally is reachable even if finally flows in both try and finally blocks are unreachable - // also for finally blocks we inject two extra edges into the flow graph. - // first -> edge that connects pre-try flow with the label at the beginning of the finally block, it has lock associated with it - // second -> edge that represents post-finally flow. - // these edges are used in following scenario: - // let a; (1) - // try { a = someOperation(); (2)} - // finally { (3) console.log(a) } (4) - // (5) a - // flow graph for this case looks roughly like this (arrows show ): - // (1-pre-try-flow) <--.. <-- (2-post-try-flow) - // ^ ^ - // |*****(3-pre-finally-label) -----| - // ^ - // |-- ... <-- (4-post-finally-label) <--- (5) - // In case when we walk the flow starting from inside the finally block we want to take edge '*****' into account - // since it ensures that finally is always reachable. However when we start outside the finally block and go through label (5) - // then edge '*****' should be discarded because label 4 is only reachable if post-finally label-4 is reachable - // Simply speaking code inside finally block is treated as reachable as pre-try-flow - // since we conservatively assume that any line in try block can throw or return in which case we'll enter finally. - // However code after finally is reachable only if control flow was not abrupted in try/catch or finally blocks - it should be composed from - // final flows of these blocks without taking pre-try flow into account. - // - // extra edges that we inject allows to control this behavior - // if when walking the flow we step on post-finally edge - we can mark matching pre-finally edge as locked so it will be skipped. - var preFinallyFlow = { flags: 4096 /* PreFinally */, antecedent: preFinallyPrior, lock: {} }; + // Possible ways control can reach the finally block: + // 1) Normal completion of try block of a try-finally or try-catch-finally + // 2) Normal completion of catch block (following exception in try block) of a try-catch-finally + // 3) Exception in try block of a try-finally + // 4) Exception in catch block of a try-catch-finally + // When analyzing a control flow graph that starts inside a finally block we want to consider all + // four possibilities above. However, when analyzing a control flow graph that starts outside (past) + // the finally block, we only want to consider the first two (if we're past a finally block then it + // must have completed normally). To make this possible, we inject two extra nodes into the control + // flow graph: An after-finally with an antecedent of the control flow at the end of the finally + // block, and a pre-finally with an antecedent that represents all exceptional control flows. The + // 'lock' property of the pre-finally references the after-finally, and the after-finally has a + // boolean 'locked' property that we set to true when analyzing a control flow that contained the + // the after-finally node. When the lock associated with a pre-finally is locked, the antecedent of + // the pre-finally (i.e. the exceptional control flows) are skipped. + var preFinallyFlow = initFlowNode({ flags: 4096 /* PreFinally */, antecedent: exceptionTarget, lock: {} }); addAntecedent(preFinallyLabel, preFinallyFlow); currentFlow = finishFlowLabel(preFinallyLabel); bind(node.finallyBlock); - // if flow after finally is unreachable - keep it - // otherwise check if flows after try and after catch are unreachable - // if yes - convert current flow to unreachable - // i.e. - // try { return "1" } finally { console.log(1); } - // console.log(2); // this line should be unreachable even if flow falls out of finally block + // If the end of the finally block is reachable, but the end of the try and catch blocks are not, + // convert the current flow to unreachable. For example, 'try { return 1; } finally { ... }' should + // result in an unreachable current control flow. if (!(currentFlow.flags & 1 /* Unreachable */)) { if ((flowAfterTry.flags & 1 /* Unreachable */) && (flowAfterCatch.flags & 1 /* Unreachable */)) { currentFlow = flowAfterTry === reportedUnreachableFlow || flowAfterCatch === reportedUnreachableFlow @@ -29952,7 +30020,7 @@ var ts; } } if (!(currentFlow.flags & 1 /* Unreachable */)) { - var afterFinallyFlow = flowNodeCreated({ flags: 8192 /* AfterFinally */, antecedent: currentFlow }); + var afterFinallyFlow = initFlowNode({ flags: 8192 /* AfterFinally */, antecedent: currentFlow }); preFinallyFlow.lock = afterFinallyFlow; currentFlow = afterFinallyFlow; } @@ -29986,6 +30054,7 @@ var ts; var savedSubtreeTransformFlags = subtreeTransformFlags; subtreeTransformFlags = 0; var clauses = node.clauses; + var isNarrowingSwitch = isNarrowingExpression(node.parent.expression); var fallthroughFlow = unreachableFlow; for (var i = 0; i < clauses.length; i++) { var clauseStart = i; @@ -29994,14 +30063,14 @@ var ts; i++; } var preCaseLabel = createBranchLabel(); - addAntecedent(preCaseLabel, createFlowSwitchClause(preSwitchCaseFlow, node.parent, clauseStart, i + 1)); + addAntecedent(preCaseLabel, isNarrowingSwitch ? createFlowSwitchClause(preSwitchCaseFlow, node.parent, clauseStart, i + 1) : preSwitchCaseFlow); addAntecedent(preCaseLabel, fallthroughFlow); currentFlow = finishFlowLabel(preCaseLabel); var clause = clauses[i]; bind(clause); fallthroughFlow = currentFlow; if (!(currentFlow.flags & 1 /* Unreachable */) && i !== clauses.length - 1 && options.noFallthroughCasesInSwitch) { - errorOnFirstToken(clause, ts.Diagnostics.Fallthrough_case_in_switch); + clause.fallthroughFlowNode = currentFlow; } } clauses.transformFlags = subtreeTransformFlags | 536870912 /* HasComputedFlags */; @@ -30065,7 +30134,7 @@ var ts; } function bindAssignmentTargetFlow(node) { if (isNarrowableReference(node)) { - currentFlow = createFlowAssignment(currentFlow, node); + currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); } else if (node.kind === 191 /* ArrayLiteralExpression */) { for (var _i = 0, _a = node.elements; _i < _a.length; _i++) { @@ -30146,7 +30215,7 @@ var ts; if (operator === 62 /* EqualsToken */ && node.left.kind === 194 /* ElementAccessExpression */) { var elementAccess = node.left; if (isNarrowableOperand(elementAccess.expression)) { - currentFlow = createFlowArrayMutation(currentFlow, node); + currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); } } } @@ -30182,7 +30251,7 @@ var ts; } } else { - currentFlow = createFlowAssignment(currentFlow, node); + currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); } } function bindVariableDeclarationFlow(node) { @@ -30204,12 +30273,9 @@ var ts; addDeclarationToSymbol(host.symbol, host, 32 /* Class */); } } - function isOutermostOptionalChain(node) { - return !ts.isOptionalChain(node.parent) || ts.isOptionalChainRoot(node.parent) || node !== node.parent.expression; - } function bindOptionalExpression(node, trueTarget, falseTarget) { doWithConditionalBranches(bind, node, trueTarget, falseTarget); - if (!ts.isOptionalChain(node) || isOutermostOptionalChain(node)) { + if (!ts.isOptionalChain(node) || ts.isOutermostOptionalChain(node)) { addAntecedent(trueTarget, createFlowCondition(32 /* TrueCondition */, currentFlow, node)); addAntecedent(falseTarget, createFlowCondition(64 /* FalseCondition */, currentFlow, node)); } @@ -30247,7 +30313,7 @@ var ts; currentFlow = finishFlowLabel(preChainLabel); } doWithConditionalBranches(bindOptionalChainRest, node, trueTarget, falseTarget); - if (isOutermostOptionalChain(node)) { + if (ts.isOutermostOptionalChain(node)) { addAntecedent(trueTarget, createFlowCondition(32 /* TrueCondition */, currentFlow, node)); addAntecedent(falseTarget, createFlowCondition(64 /* FalseCondition */, currentFlow, node)); } @@ -30291,7 +30357,7 @@ var ts; if (node.expression.kind === 193 /* PropertyAccessExpression */) { var propertyAccess = node.expression; if (isNarrowableOperand(propertyAccess.expression) && ts.isPushOrUnshiftIdentifier(propertyAccess.name)) { - currentFlow = createFlowArrayMutation(currentFlow, node); + currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); } } } @@ -30591,7 +30657,7 @@ var ts; var host = ts.getJSDocHost(typeAlias); container = ts.findAncestor(host.parent, function (n) { return !!(getContainerFlags(n) & 1 /* IsContainer */); }) || file; blockScopeContainer = ts.getEnclosingBlockScopeContainer(host) || file; - currentFlow = { flags: 2 /* Start */ }; + currentFlow = initFlowNode({ flags: 2 /* Start */ }); parent = typeAlias; bind(typeAlias.typeExpression); var declName = ts.getNameOfDeclaration(typeAlias); @@ -30604,7 +30670,12 @@ var ts; switch (ts.getAssignmentDeclarationPropertyAccessKind(declName.parent)) { case 1 /* ExportsProperty */: case 2 /* ModuleExports */: - container = file; + if (!ts.isExternalOrCommonJsModule(file)) { + container = undefined; + } + else { + container = file; + } break; case 4 /* ThisProperty */: container = declName.parent.expression; @@ -30618,7 +30689,9 @@ var ts; case 0 /* None */: return ts.Debug.fail("Shouldn't have detected typedef or enum on non-assignment declaration"); } - declareModuleMember(typeAlias, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); + if (container) { + declareModuleMember(typeAlias, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); + } container = oldContainer; } } @@ -31014,6 +31087,8 @@ var ts; case 302 /* JSDocTypeLiteral */: case 185 /* MappedType */: return bindAnonymousTypeWorker(node); + case 307 /* JSDocClassTag */: + return bindJSDocClassTag(node); case 192 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); case 200 /* FunctionExpression */: @@ -31233,7 +31308,8 @@ var ts; var flags = ts.exportAssignmentIsAlias(node) ? 2097152 /* Alias */ : 4 /* Property */ | 1048576 /* ExportValue */ | 512 /* ValueModule */; - declareSymbol(file.symbol.exports, file.symbol, node, flags | 67108864 /* Assignment */, 0 /* None */); + var symbol = declareSymbol(file.symbol.exports, file.symbol, node, flags | 67108864 /* Assignment */, 0 /* None */); + setValueDeclaration(symbol, node); } function bindThisPropertyAssignment(node) { ts.Debug.assert(ts.isInJSFile(node)); @@ -31249,7 +31325,7 @@ var ts; constructorSymbol = lookupSymbolForPropertyAccess(l.expression.expression, thisParentContainer); } } - if (constructorSymbol) { + if (constructorSymbol && constructorSymbol.valueDeclaration) { // Declare a 'member' if the container is an ES5 class or ES6 constructor constructorSymbol.members = constructorSymbol.members || ts.createSymbolTable(); // It's acceptable for multiple 'this' assignments of the same identifier to occur @@ -31322,6 +31398,10 @@ var ts; } function bindObjectDefinePrototypeProperty(node) { var namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0].expression); + if (namespaceSymbol) { + // Ensure the namespace symbol becomes class-like + addDeclarationToSymbol(namespaceSymbol, namespaceSymbol.valueDeclaration, 32 /* Class */); + } bindPotentiallyNewExpandoMemberToNamespace(node, namespaceSymbol, /*isPrototypeProperty*/ true); } /** @@ -31396,7 +31476,7 @@ var ts; } }); } - if (containerIsClass && namespaceSymbol) { + if (containerIsClass && namespaceSymbol && namespaceSymbol.valueDeclaration) { addDeclarationToSymbol(namespaceSymbol, namespaceSymbol.valueDeclaration, 32 /* Class */); } return namespaceSymbol; @@ -32045,7 +32125,8 @@ var ts; || ts.hasModifier(node, 2270 /* TypeScriptModifier */) || node.typeParameters || node.type - || !node.body) { + || !node.body + || node.questionToken) { transformFlags |= 1 /* AssertTypeScript */; } // function declarations with object rest destructuring are ES2018 syntax @@ -32082,7 +32163,7 @@ var ts; function computePropertyDeclaration(node, subtreeFlags) { var transformFlags = subtreeFlags | 1048576 /* ContainsClassFields */; // Decorators, TypeScript-specific modifiers, and type annotations are TypeScript syntax. - if (ts.some(node.decorators) || ts.hasModifier(node, 2270 /* TypeScriptModifier */) || node.type) { + if (ts.some(node.decorators) || ts.hasModifier(node, 2270 /* TypeScriptModifier */) || node.type || node.questionToken) { transformFlags |= 1 /* AssertTypeScript */; } // Hoisted variables related to class properties should live within the TypeScript class wrapper. @@ -32887,6 +32968,7 @@ var ts; TypeSystemPropertyName[TypeSystemPropertyName["ImmediateBaseConstraint"] = 4] = "ImmediateBaseConstraint"; TypeSystemPropertyName[TypeSystemPropertyName["EnumTagType"] = 5] = "EnumTagType"; TypeSystemPropertyName[TypeSystemPropertyName["JSDocTypeReference"] = 6] = "JSDocTypeReference"; + TypeSystemPropertyName[TypeSystemPropertyName["ResolvedTypeArguments"] = 7] = "ResolvedTypeArguments"; })(TypeSystemPropertyName || (TypeSystemPropertyName = {})); var CheckMode; (function (CheckMode) { @@ -32897,12 +32979,6 @@ var ts; CheckMode[CheckMode["SkipGenericFunctions"] = 8] = "SkipGenericFunctions"; CheckMode[CheckMode["IsForSignatureHelp"] = 16] = "IsForSignatureHelp"; })(CheckMode || (CheckMode = {})); - var ContextFlags; - (function (ContextFlags) { - ContextFlags[ContextFlags["None"] = 0] = "None"; - ContextFlags[ContextFlags["Signature"] = 1] = "Signature"; - ContextFlags[ContextFlags["NoConstraints"] = 2] = "NoConstraints"; - })(ContextFlags || (ContextFlags = {})); var AccessFlags; (function (AccessFlags) { AccessFlags[AccessFlags["None"] = 0] = "None"; @@ -33036,14 +33112,12 @@ var ts; undefinedSymbol.declarations = []; var globalThisSymbol = createSymbol(1536 /* Module */, "globalThis", 8 /* Readonly */); globalThisSymbol.exports = globals; + globalThisSymbol.declarations = []; globals.set(globalThisSymbol.escapedName, globalThisSymbol); var argumentsSymbol = createSymbol(4 /* Property */, "arguments"); var requireSymbol = createSymbol(4 /* Property */, "require"); /** This will be set during calls to `getResolvedSignature` where services determines an apparent number of arguments greater than what is actually provided. */ var apparentArgumentCount; - // This object is reused for `checkOptionalExpression` return values to avoid frequent GC due to nursery object allocations. - // This object represents a pool-size of 1. - var pooledOptionalTypeResult = { isOptional: false, type: undefined }; // for public members that accept a Node or one of its subtypes, we must guard against // synthetic nodes created during transformations by calling `getParseTreeNode`. // for most of these, we perform the guard only on `checker` to avoid any possible @@ -33162,9 +33236,9 @@ var ts; }, getAugmentedPropertiesOfType: getAugmentedPropertiesOfType, getRootSymbols: getRootSymbols, - getContextualType: function (nodeIn) { + getContextualType: function (nodeIn, contextFlags) { var node = ts.getParseTreeNode(nodeIn, ts.isExpression); - return node ? getContextualType(node) : undefined; + return node ? getContextualType(node, contextFlags) : undefined; }, getContextualTypeForObjectLiteralElement: function (nodeIn) { var node = ts.getParseTreeNode(nodeIn, ts.isObjectLiteralElementLike); @@ -33213,7 +33287,7 @@ var ts; getEmitResolver: getEmitResolver, getExportsOfModule: getExportsOfModuleAsArray, getExportsAndPropertiesOfModule: getExportsAndPropertiesOfModule, - getSymbolWalker: ts.createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignature, getReturnTypeOfSignature, getBaseTypes, resolveStructuredTypeMembers, getTypeOfSymbol, getResolvedSymbol, getIndexTypeOfStructuredType, getConstraintOfTypeParameter, getFirstIdentifier, getTypeArguments), + getSymbolWalker: ts.createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignature, getReturnTypeOfSignature, getBaseTypes, resolveStructuredTypeMembers, getTypeOfSymbol, getResolvedSymbol, getIndexTypeOfStructuredType, getConstraintOfTypeParameter, ts.getFirstIdentifier, getTypeArguments), getAmbientModules: getAmbientModules, getJsxIntrinsicTagNamesAt: getJsxIntrinsicTagNamesAt, isOptionalParameter: function (nodeIn) { @@ -33342,10 +33416,10 @@ var ts; var errorType = createIntrinsicType(1 /* Any */, "error"); var unknownType = createIntrinsicType(2 /* Unknown */, "unknown"); var undefinedType = createIntrinsicType(32768 /* Undefined */, "undefined"); - var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 262144 /* ContainsWideningType */); + var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 524288 /* ContainsWideningType */); var optionalType = createIntrinsicType(32768 /* Undefined */, "undefined"); var nullType = createIntrinsicType(65536 /* Null */, "null"); - var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 262144 /* ContainsWideningType */); + var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 524288 /* ContainsWideningType */); var stringType = createIntrinsicType(4 /* String */, "string"); var numberType = createIntrinsicType(8 /* Number */, "number"); var bigintType = createIntrinsicType(64 /* BigInt */, "bigint"); @@ -33371,7 +33445,7 @@ var ts; var voidType = createIntrinsicType(16384 /* Void */, "void"); var neverType = createIntrinsicType(131072 /* Never */, "never"); var silentNeverType = createIntrinsicType(131072 /* Never */, "never"); - var nonInferrableType = createIntrinsicType(131072 /* Never */, "never", 1048576 /* NonInferrableType */); + var nonInferrableType = createIntrinsicType(131072 /* Never */, "never", 2097152 /* NonInferrableType */); var implicitNeverType = createIntrinsicType(131072 /* Never */, "never"); var unreachableNeverType = createIntrinsicType(131072 /* Never */, "never"); var nonPrimitiveType = createIntrinsicType(67108864 /* NonPrimitive */, "object"); @@ -33389,7 +33463,7 @@ var ts; var anyFunctionType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); // The anyFunctionType contains the anyFunctionType by definition. The flag is further propagated // in getPropagatingFlagsOfTypes, and it is checked in inferFromTypes. - anyFunctionType.objectFlags |= 1048576 /* NonInferrableType */; + anyFunctionType.objectFlags |= 2097152 /* NonInferrableType */; var noConstraintType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); var circularConstraintType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); var resolvingDefaultType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); @@ -33398,10 +33472,10 @@ var ts; markerSubType.constraint = markerSuperType; var markerOtherType = createTypeParameter(); var noTypePredicate = createTypePredicate(1 /* Identifier */, "<>", 0, anyType); - var anySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); - var unknownSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, errorType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); - var resolvingSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); - var silentNeverSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, silentNeverType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); + var anySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */); + var unknownSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, errorType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */); + var resolvingSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */); + var silentNeverSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, silentNeverType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */); var enumNumberIndexInfo = createIndexInfo(stringType, /*isReadonly*/ true); var iterationTypesCache = ts.createMap(); // cache for common IterationTypes instances var noIterationTypes = { @@ -33554,7 +33628,7 @@ var ts; var chosenpragma = ts.isArray(jsxPragma) ? jsxPragma[0] : jsxPragma; file.localJsxFactory = ts.parseIsolatedEntityName(chosenpragma.arguments.factory, languageVersion); if (file.localJsxFactory) { - return file.localJsxNamespace = getFirstIdentifier(file.localJsxFactory).escapedText; + return file.localJsxNamespace = ts.getFirstIdentifier(file.localJsxFactory).escapedText; } } } @@ -33564,7 +33638,7 @@ var ts; if (compilerOptions.jsxFactory) { _jsxFactoryEntity = ts.parseIsolatedEntityName(compilerOptions.jsxFactory, languageVersion); if (_jsxFactoryEntity) { - _jsxNamespace = getFirstIdentifier(_jsxFactoryEntity).escapedText; + _jsxNamespace = ts.getFirstIdentifier(_jsxFactoryEntity).escapedText; } } else if (compilerOptions.reactNamespace) { @@ -35042,7 +35116,7 @@ var ts; var namespaceMeaning = 1920 /* Namespace */ | (ts.isInJSFile(name) ? meaning & 111551 /* Value */ : 0); var symbol; if (name.kind === 75 /* Identifier */) { - var message = meaning === namespaceMeaning ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(getFirstIdentifier(name)); + var message = meaning === namespaceMeaning ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(ts.getFirstIdentifier(name)); var symbolFromJSPrototype = ts.isInJSFile(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined; symbol = resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, /*isUse*/ true); if (!symbol) { @@ -35154,7 +35228,12 @@ var ts; return undefined; } var init = ts.isVariableDeclaration(decl) ? ts.getDeclaredExpandoInitializer(decl) : ts.getAssignedExpandoInitializer(decl); - return init && getSymbolOfNode(init) || undefined; + if (init) { + var initSymbol = getSymbolOfNode(init); + if (initSymbol) { + return mergeJSSymbols(initSymbol, symbol); + } + } } function resolveExternalModuleName(location, moduleReferenceExpression, ignoreErrors) { return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ignoreErrors ? undefined : ts.Diagnostics.Cannot_find_module_0); @@ -35581,8 +35660,8 @@ var ts; } function findConstructorDeclaration(node) { var members = node.members; - for (var _i = 0, members_2 = members; _i < members_2.length; _i++) { - var member = members_2[_i]; + for (var _i = 0, members_3 = members; _i < members_3.length; _i++) { + var member = members_3[_i]; if (member.kind === 161 /* Constructor */ && ts.nodeIsPresent(member.body)) { return member; } @@ -36005,7 +36084,7 @@ var ts; // Type Reference or TypeAlias entity = Identifier meaning = 788968 /* Type */; } - var firstIdentifier = getFirstIdentifier(entityName); + var firstIdentifier = ts.getFirstIdentifier(entityName); var symbol = resolveName(enclosingDeclaration, firstIdentifier.escapedText, meaning, /*nodeNotFoundErrorMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false); // Verify if the symbol is accessible return (symbol && hasVisibleDeclarations(symbol, /*shouldComputeAliasToMakeVisible*/ true)) || { @@ -36497,8 +36576,6 @@ var ts; else if (context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */ && type.symbol.valueDeclaration && ts.isClassLike(type.symbol.valueDeclaration) && - // Use `import` types for refs to other scopes, only anonymize something defined in the same scope - ts.findAncestor(type.symbol.valueDeclaration, function (d) { return d === ts.getSourceFileOfNode(context.enclosingDeclaration); }) && !isValueSymbolAccessible(type.symbol, context.enclosingDeclaration)) { return createAnonymousTypeNode(type); } @@ -36659,9 +36736,9 @@ var ts; } } } - var propertyName = symbolToName(propertySymbol, context, 111551 /* Value */, /*expectsIdentifier*/ true); - context.approximateLength += (ts.symbolName(propertySymbol).length + 1); context.enclosingDeclaration = saveEnclosingDeclaration; + var propertyName = getPropertyNameNodeForSymbol(propertySymbol, context); + context.approximateLength += (ts.symbolName(propertySymbol).length + 1); var optionalToken = propertySymbol.flags & 16777216 /* Optional */ ? ts.createToken(57 /* QuestionToken */) : undefined; if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) { var signatures = getSignaturesOfType(filterType(propertyType, function (t) { return !(t.flags & 32768 /* Undefined */); }), 0 /* Call */); @@ -36860,7 +36937,7 @@ var ts; if (!context.tracker.trackSymbol) return; // get symbol of the first identifier of the entityName - var firstIdentifier = getFirstIdentifier(accessExpression); + var firstIdentifier = ts.getFirstIdentifier(accessExpression); var name = resolveName(firstIdentifier, firstIdentifier.escapedText, 111551 /* Value */ | 1048576 /* ExportValue */, /*nodeNotFoundErrorMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ true); if (name) { context.tracker.trackSymbol(name, enclosingDeclaration, 111551 /* Value */); @@ -37226,22 +37303,34 @@ var ts; } } } + function isSingleQuotedStringNamed(d) { + var name = ts.getNameOfDeclaration(d); + if (name && ts.isStringLiteral(name) && (name.singleQuote || + (!ts.nodeIsSynthesized(name) && ts.startsWith(ts.getTextOfNode(name, /*includeTrivia*/ false), "'")))) { + return true; + } + return false; + } function getPropertyNameNodeForSymbol(symbol, context) { - var fromNameType = getPropertyNameNodeForSymbolFromNameType(symbol, context); + var singleQuote = !!ts.length(symbol.declarations) && ts.every(symbol.declarations, isSingleQuotedStringNamed); + var fromNameType = getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote); if (fromNameType) { return fromNameType; } + if (ts.isKnownSymbol(symbol)) { + return ts.createComputedPropertyName(ts.createPropertyAccess(ts.createIdentifier("Symbol"), symbol.escapedName.substr(3))); + } var rawName = ts.unescapeLeadingUnderscores(symbol.escapedName); - return createPropertyNameNodeForIdentifierOrLiteral(rawName); + return createPropertyNameNodeForIdentifierOrLiteral(rawName, singleQuote); } // See getNameForSymbolFromNameType for a stringy equivalent - function getPropertyNameNodeForSymbolFromNameType(symbol, context) { + function getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote) { var nameType = symbol.nameType; if (nameType) { if (nameType.flags & 384 /* StringOrNumberLiteral */) { var name = "" + nameType.value; if (!ts.isIdentifierText(name, compilerOptions.target) && !isNumericLiteralName(name)) { - return ts.createLiteral(name); + return ts.createLiteral(name, !!singleQuote); } if (isNumericLiteralName(name) && ts.startsWith(name, "-")) { return ts.createComputedPropertyName(ts.createLiteral(+name)); @@ -37253,8 +37342,8 @@ var ts; } } } - function createPropertyNameNodeForIdentifierOrLiteral(name) { - return ts.isIdentifierText(name, compilerOptions.target) ? ts.createIdentifier(name) : ts.createLiteral(isNumericLiteralName(name) ? +name : name); + function createPropertyNameNodeForIdentifierOrLiteral(name, singleQuote) { + return ts.isIdentifierText(name, compilerOptions.target) ? ts.createIdentifier(name) : ts.createLiteral(isNumericLiteralName(name) ? +name : name, !!singleQuote); } function cloneNodeBuilderContext(context) { var initial = __assign({}, context); @@ -37294,7 +37383,7 @@ var ts; var visitedSymbols = ts.createMap(); var deferredPrivates; var oldcontext = context; - context = __assign(__assign({}, oldcontext), { usedSymbolNames: ts.mapMap(symbolTable, function (_symbol, name) { return [ts.unescapeLeadingUnderscores(name), true]; }), remappedSymbolNames: ts.createMap(), tracker: __assign(__assign({}, oldcontext.tracker), { trackSymbol: function (sym, decl, meaning) { + context = __assign(__assign({}, oldcontext), { usedSymbolNames: ts.createMap(), remappedSymbolNames: ts.createMap(), tracker: __assign(__assign({}, oldcontext.tracker), { trackSymbol: function (sym, decl, meaning) { var accessibleResult = isSymbolAccessible(sym, decl, meaning, /*computeALiases*/ false); if (accessibleResult.accessibility === 0 /* Accessible */) { // Lookup the root symbol of the chain of refs we'll use to access it and serialize it @@ -37312,6 +37401,10 @@ var ts; context.usedSymbolNames.set(name, true); }); } + ts.forEachEntry(symbolTable, function (symbol, name) { + var baseName = ts.unescapeLeadingUnderscores(name); + void getInternalSymbolName(symbol, baseName); // Called to cache values into `usedSymbolNames` and `remappedSymbolNames` + }); var addingDeclare = !bundled; var exportEquals = symbolTable.get("export=" /* ExportEquals */); if (exportEquals && symbolTable.size > 1 && exportEquals.flags & 2097152 /* Alias */) { @@ -37503,7 +37596,11 @@ var ts; isPrivate = true; } var modifierFlags = (!isPrivate ? 1 /* Export */ : 0) | (isDefault && !needsPostExportDefault ? 512 /* Default */ : 0); - if (symbol.flags & 16 /* Function */) { + var isConstMergedWithNS = symbol.flags & 1536 /* Module */ && + symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && + symbol.escapedName !== "export=" /* ExportEquals */; + var isConstMergedWithNSPrintableAsSignatureMerge = isConstMergedWithNS && isTypeRepresentableAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol); + if (symbol.flags & 16 /* Function */ || isConstMergedWithNSPrintableAsSignatureMerge) { serializeAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol, getInternalSymbolName(symbol, symbolName), modifierFlags); } if (symbol.flags & 524288 /* TypeAlias */) { @@ -37514,7 +37611,8 @@ var ts; if (symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && symbol.escapedName !== "export=" /* ExportEquals */ && !(symbol.flags & 4194304 /* Prototype */) - && !(symbol.flags & 32 /* Class */)) { + && !(symbol.flags & 32 /* Class */) + && !isConstMergedWithNSPrintableAsSignatureMerge) { serializeVariableOrProperty(symbol, symbolName, isPrivate, needsPostExportDefault, propertyAsAlias, modifierFlags); } if (symbol.flags & 384 /* Enum */) { @@ -37531,7 +37629,7 @@ var ts; serializeAsClass(symbol, getInternalSymbolName(symbol, symbolName), modifierFlags); } } - if (symbol.flags & (512 /* ValueModule */ | 1024 /* NamespaceModule */)) { + if ((symbol.flags & (512 /* ValueModule */ | 1024 /* NamespaceModule */) && (!isConstMergedWithNS || isTypeOnlyNamespace(symbol))) || isConstMergedWithNSPrintableAsSignatureMerge) { serializeModule(symbol, symbolName, modifierFlags); } if (symbol.flags & 64 /* Interface */) { @@ -37559,7 +37657,10 @@ var ts; } } function includePrivateSymbol(symbol) { + if (ts.some(symbol.declarations, ts.isParameterDeclaration)) + return; ts.Debug.assertDefined(deferredPrivates); + getUnusedName(ts.unescapeLeadingUnderscores(symbol.escapedName), symbol); // Call to cache unique name for symbol deferredPrivates.set("" + getSymbolId(symbol), symbol); } function isExportingScope(enclosingDeclaration) { @@ -37618,8 +37719,14 @@ var ts; /*decorators*/ undefined, /*modifiers*/ undefined, getInternalSymbolName(symbol, symbolName), typeParamDecls, heritageClauses, __spreadArrays(indexSignatures, constructSignatures, callSignatures, members)), modifierFlags); } + function getNamespaceMembersForSerialization(symbol) { + return !symbol.exports ? [] : ts.filter(ts.arrayFrom((symbol.exports).values()), function (p) { return !((p.flags & 4194304 /* Prototype */) || (p.escapedName === "prototype")); }); + } + function isTypeOnlyNamespace(symbol) { + return ts.every(getNamespaceMembersForSerialization(symbol), function (m) { return !(resolveSymbol(m).flags & 111551 /* Value */); }); + } function serializeModule(symbol, symbolName, modifierFlags) { - var members = !symbol.exports ? [] : ts.filter(ts.arrayFrom((symbol.exports).values()), function (p) { return !((p.flags & 4194304 /* Prototype */) || (p.escapedName === "prototype")); }); + var members = getNamespaceMembersForSerialization(symbol); // Split NS members up by declaration - members whose parent symbol is the ns symbol vs those whose is not (but were added in later via merging) var locationMap = ts.arrayToMultiMap(members, function (m) { return m.parent && m.parent === symbol ? "real" : "merged"; }); var realMembers = locationMap.get("real") || ts.emptyArray; @@ -37629,17 +37736,20 @@ var ts; // so we don't even have placeholders to fill in. if (ts.length(realMembers)) { var localName = getInternalSymbolName(symbol, symbolName); - serializeAsNamespaceDeclaration(realMembers, localName, modifierFlags, /*suppressNewPrivateContext*/ false); + serializeAsNamespaceDeclaration(realMembers, localName, modifierFlags, !!(symbol.flags & (16 /* Function */ | 67108864 /* Assignment */))); } if (ts.length(mergedMembers)) { var localName = getInternalSymbolName(symbol, symbolName); - ts.forEach(mergedMembers, includePrivateSymbol); var nsBody = ts.createModuleBlock([ts.createExportDeclaration( /*decorators*/ undefined, /*modifiers*/ undefined, ts.createNamedExports(ts.map(ts.filter(mergedMembers, function (n) { return n.escapedName !== "export=" /* ExportEquals */; }), function (s) { var name = ts.unescapeLeadingUnderscores(s.escapedName); var localName = getInternalSymbolName(s, name); - return ts.createExportSpecifier(name === localName ? undefined : localName, name); + var aliasDecl = s.declarations && getDeclarationOfAliasSymbol(s); + var target = aliasDecl && getTargetOfAliasDeclaration(aliasDecl, /*dontRecursivelyResolve*/ true); + includePrivateSymbol(target || s); + var targetName = target ? getInternalSymbolName(target, ts.unescapeLeadingUnderscores(target.escapedName)) : localName; + return ts.createExportSpecifier(name === targetName ? undefined : targetName, name); })))]); addResult(ts.createModuleDeclaration( /*decorators*/ undefined, @@ -37840,7 +37950,11 @@ var ts; case 254 /* ImportClause */: addResult(ts.createImportDeclaration( /*decorators*/ undefined, - /*modifiers*/ undefined, ts.createImportClause(ts.createIdentifier(localName), /*namedBindings*/ undefined), ts.createLiteral(getSpecifierForModuleSymbol(target.parent, context))), 0 /* None */); + /*modifiers*/ undefined, ts.createImportClause(ts.createIdentifier(localName), /*namedBindings*/ undefined), + // We use `target.parent || target` below as `target.parent` is unset when the target is a module which has been export assigned + // And then made into a default by the `esModuleInterop` or `allowSyntheticDefaultImports` flag + // In such cases, the `target` refers to the module itself already + ts.createLiteral(getSpecifierForModuleSymbol(target.parent || target, context))), 0 /* None */); break; case 255 /* NamespaceImport */: addResult(ts.createImportDeclaration( @@ -37852,7 +37966,7 @@ var ts; /*decorators*/ undefined, /*modifiers*/ undefined, ts.createImportClause(/*importClause*/ undefined, ts.createNamedImports([ ts.createImportSpecifier(localName !== verbatimTargetName ? ts.createIdentifier(verbatimTargetName) : undefined, ts.createIdentifier(localName)) - ])), ts.createLiteral(getSpecifierForModuleSymbol(target.parent, context))), 0 /* None */); + ])), ts.createLiteral(getSpecifierForModuleSymbol(target.parent || target, context))), 0 /* None */); break; case 261 /* ExportSpecifier */: // does not use localName because the symbol name in this case refers to the name in the exports table, @@ -37866,6 +37980,7 @@ var ts; serializeMaybeAliasAssignment(symbol); break; case 208 /* BinaryExpression */: + case 193 /* PropertyAccessExpression */: // Could be best encoded as though an export specifier or as though an export assignment // If name is default or export=, do an export assignment // Otherwise do an export specifier @@ -37876,10 +37991,6 @@ var ts; serializeExportSpecifier(localName, targetName); } break; - case 193 /* PropertyAccessExpression */: - // A PAE alias is _always_ going to exist as an append to a top-level export, where our top level - // handling should always be sufficient to encode the export action itself - break; default: return ts.Debug.failBadSyntaxKind(node, "Unhandled alias declaration kind in symbol serializer!"); } @@ -37903,7 +38014,8 @@ var ts; var aliasDecl = symbol.declarations && getDeclarationOfAliasSymbol(symbol); // serialize what the alias points to, preserve the declaration's initializer var target = aliasDecl && getTargetOfAliasDeclaration(aliasDecl, /*dontRecursivelyResolve*/ true); - if (target) { + // If the target resolves and resolves to a thing defined in this file, emit as an alias, otherwise emit as a const + if (target && ts.length(target.declarations) && ts.some(target.declarations, function (d) { return ts.getSourceFileOfNode(d) === ts.getSourceFileOfNode(enclosingDeclaration); })) { // In case `target` refers to a namespace member, look at the declaration and serialize the leftmost symbol in it // eg, `namespace A { export class B {} }; exports = A.B;` // Technically, this is all that's required in the case where the assignment is an entity name expression @@ -37978,6 +38090,7 @@ var ts; return ts.getObjectFlags(typeToSerialize) & (16 /* Anonymous */ | 32 /* Mapped */) && !getIndexInfoOfType(typeToSerialize, 0 /* String */) && !getIndexInfoOfType(typeToSerialize, 1 /* Number */) && + !!(ts.length(getPropertiesOfType(typeToSerialize)) || ts.length(getSignaturesOfType(typeToSerialize, 0 /* Call */))) && !ts.length(getSignaturesOfType(typeToSerialize, 1 /* Construct */)) && // TODO: could probably serialize as function + ns + class, now that that's OK !getDeclarationWithTypeAnnotation(hostSymbol) && !(typeToSerialize.symbol && ts.some(typeToSerialize.symbol.declarations, function (d) { return ts.getSourceFileOfNode(d) !== ctxSrc; })) && @@ -38121,7 +38234,7 @@ var ts; return ts.updateImportTypeNode(node, ts.updateLiteralTypeNode(node.argument, rewriteModuleSpecifier(node, node.argument.literal)), node.qualifier, ts.visitNodes(node.typeArguments, visitExistingNodeTreeSymbols, ts.isTypeNode), node.isTypeOf); } if (ts.isEntityName(node) || ts.isEntityNameExpression(node)) { - var leftmost = getFirstIdentifier(node); + var leftmost = ts.getFirstIdentifier(node); var sym = resolveEntityName(leftmost, 67108863 /* All */, /*ignoreErrors*/ true, /*dontResolveALias*/ true); if (sym) { includePrivateSymbol(sym); @@ -38251,11 +38364,8 @@ var ts; return context.remappedSymbolNames.get("" + getSymbolId(symbol)); } } - if (input === "default" /* Default */) { - input = "_default"; - } - else if (input === "export=" /* ExportEquals */) { - input = "_exports"; + if (symbol) { + input = getNameCandidateWorker(symbol, input); } var i = 0; var original = input; @@ -38269,17 +38379,28 @@ var ts; } return input; } - function getInternalSymbolName(symbol, localName) { - if (context.remappedSymbolNames.has("" + getSymbolId(symbol))) { - return context.remappedSymbolNames.get("" + getSymbolId(symbol)); - } + function getNameCandidateWorker(symbol, localName) { if (localName === "default" /* Default */ || localName === "__class" /* Class */ || localName === "__function" /* Function */) { var flags = context.flags; context.flags |= 16777216 /* InInitialEntityName */; var nameCandidate = getNameOfSymbolAsWritten(symbol, context); context.flags = flags; - localName = ts.isIdentifierText(nameCandidate, languageVersion) && !ts.isStringANonContextualKeyword(nameCandidate) ? nameCandidate : getUnusedName("_default", symbol); + localName = nameCandidate.length > 0 && ts.isSingleOrDoubleQuote(nameCandidate.charCodeAt(0)) ? ts.stripQuotes(nameCandidate) : nameCandidate; } + if (localName === "default" /* Default */) { + localName = "_default"; + } + else if (localName === "export=" /* ExportEquals */) { + localName = "_exports"; + } + localName = ts.isIdentifierText(localName, languageVersion) && !ts.isStringANonContextualKeyword(localName) ? localName : "_" + localName.replace(/[^a-zA-Z0-9]/g, "_"); + return localName; + } + function getInternalSymbolName(symbol, localName) { + if (context.remappedSymbolNames.has("" + getSymbolId(symbol))) { + return context.remappedSymbolNames.get("" + getSymbolId(symbol)); + } + localName = getNameCandidateWorker(symbol, localName); // The result of this is going to be used as the symbol's name - lock it in, so `getUnusedName` will also pick it up context.remappedSymbolNames.set("" + getSymbolId(symbol), localName); return localName; @@ -38544,7 +38665,7 @@ var ts; if (ts.isInternalModuleImportEqualsDeclaration(declaration)) { // Add the referenced top container visible var internalModuleReference = declaration.moduleReference; - var firstIdentifier = getFirstIdentifier(internalModuleReference); + var firstIdentifier = ts.getFirstIdentifier(internalModuleReference); var importSymbol = resolveName(declaration, firstIdentifier.escapedText, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, undefined, undefined, /*isUse*/ false); var id = importSymbol && "" + getSymbolId(importSymbol); if (importSymbol && !visited.has(id)) { @@ -38608,6 +38729,8 @@ var ts; return !!target.immediateBaseConstraint; case 6 /* JSDocTypeReference */: return !!getSymbolLinks(target).resolvedJSDocType; + case 7 /* ResolvedTypeArguments */: + return !!target.resolvedTypeArguments; } return ts.Debug.assertNever(propertyName); } @@ -38693,7 +38816,9 @@ var ts; } var stringIndexInfo = getIndexInfoOfType(source, 0 /* String */); var numberIndexInfo = getIndexInfoOfType(source, 1 /* Number */); - return createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, stringIndexInfo, numberIndexInfo); + var result = createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, stringIndexInfo, numberIndexInfo); + result.objectFlags |= 131072 /* ObjectRestType */; + return result; } // Determine the control flow type associated with a destructuring declaration or assignment. The following // forms of destructuring are possible: @@ -39079,23 +39204,23 @@ var ts; kind === 2 /* ModuleExports */ && symbol.escapedName === "export=" /* ExportEquals */) { var exportedType_1 = resolveStructuredTypeMembers(type); - var members_3 = ts.createSymbolTable(); - ts.copyEntries(exportedType_1.members, members_3); + var members_4 = ts.createSymbolTable(); + ts.copyEntries(exportedType_1.members, members_4); if (resolvedSymbol && !resolvedSymbol.exports) { resolvedSymbol.exports = ts.createSymbolTable(); } (resolvedSymbol || symbol).exports.forEach(function (s, name) { - if (members_3.has(name)) { + if (members_4.has(name)) { var exportedMember = exportedType_1.members.get(name); var union = createSymbol(s.flags | exportedMember.flags, name); union.type = getUnionType([getTypeOfSymbol(s), getTypeOfSymbol(exportedMember)]); - members_3.set(name, union); + members_4.set(name, union); } else { - members_3.set(name, s); + members_4.set(name, s); } }); - var result = createAnonymousType(exportedType_1.symbol, members_3, exportedType_1.callSignatures, exportedType_1.constructSignatures, exportedType_1.stringIndexInfo, exportedType_1.numberIndexInfo); + var result = createAnonymousType(exportedType_1.symbol, members_4, exportedType_1.callSignatures, exportedType_1.constructSignatures, exportedType_1.stringIndexInfo, exportedType_1.numberIndexInfo); result.objectFlags |= (ts.getObjectFlags(type) & 16384 /* JSLiteral */); // Propagate JSLiteral flag return result; } @@ -39155,7 +39280,7 @@ var ts; function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) { var members = ts.createSymbolTable(); var stringIndexInfo; - var objectFlags = 128 /* ObjectLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */; + var objectFlags = 128 /* ObjectLiteral */ | 1048576 /* ContainsObjectOrArrayLiteral */; ts.forEach(pattern.elements, function (e) { var name = e.propertyName || e.name; if (e.dotDotDotToken) { @@ -39295,16 +39420,12 @@ var ts; if (!declaration.statements.length) { return emptyObjectType; } - var type_1 = getWidenedLiteralType(checkExpression(declaration.statements[0].expression)); - if (type_1.flags & 524288 /* Object */) { - return getRegularTypeOfObjectLiteral(type_1); - } - return type_1; + return getWidenedType(getWidenedLiteralType(checkExpression(declaration.statements[0].expression))); } // Handle variable, parameter or property if (!pushTypeResolution(symbol, 0 /* Type */)) { // Symbol is property of some kind that is merged with something - should use `getTypeOfFuncClassEnumModule` and not `getTypeOfVariableOrParameterOrProperty` - if (symbol.flags & 512 /* ValueModule */) { + if (symbol.flags & 512 /* ValueModule */ && !(symbol.flags & 67108864 /* Assignment */)) { return getTypeOfFuncClassEnumModule(symbol); } return reportCircularityError(symbol); @@ -39372,7 +39493,7 @@ var ts; } if (!popTypeResolution()) { // Symbol is property of some kind that is merged with something - should use `getTypeOfFuncClassEnumModule` and not `getTypeOfVariableOrParameterOrProperty` - if (symbol.flags & 512 /* ValueModule */) { + if (symbol.flags & 512 /* ValueModule */ && !(symbol.flags & 67108864 /* Assignment */)) { return getTypeOfFuncClassEnumModule(symbol); } return reportCircularityError(symbol); @@ -39455,7 +39576,9 @@ var ts; } else { ts.Debug.assert(!!getter, "there must exist a getter as we are current checking either setter or getter in this function"); - errorOrSuggestion(noImplicitAny, getter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation, symbolToString(symbol)); + if (!isPrivateWithinAmbient(getter)) { + errorOrSuggestion(noImplicitAny, getter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation, symbolToString(symbol)); + } } return anyType; } @@ -39501,11 +39624,11 @@ var ts; return errorType; } var exportEquals = getMergedSymbol(symbol.exports.get("export=" /* ExportEquals */)); - var type_2 = getWidenedTypeForAssignmentDeclaration(exportEquals, exportEquals === resolvedModule ? undefined : resolvedModule); + var type_1 = getWidenedTypeForAssignmentDeclaration(exportEquals, exportEquals === resolvedModule ? undefined : resolvedModule); if (!popTypeResolution()) { return reportCircularityError(symbol); } - return type_2; + return type_1; } } var type = createObjectType(16 /* Anonymous */, symbol); @@ -39691,6 +39814,7 @@ var ts; // The outer type parameters are those defined by enclosing generic classes, methods, or functions. function getOuterTypeParametersOfClassOrInterface(symbol) { var declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 245 /* InterfaceDeclaration */); + ts.Debug.assert(!!declaration, "Class was missing valueDeclaration -OR- non-class had no interface declarations"); return getOuterTypeParameters(declaration); } // The local type parameters are the combined set of type parameters from all declarations of the class, @@ -39721,7 +39845,7 @@ var ts; var signatures = getSignaturesOfType(type, 1 /* Construct */); if (signatures.length === 1) { var s = signatures[0]; - return !s.typeParameters && s.parameters.length === 1 && s.hasRestParameter && getElementTypeOfArrayType(getTypeOfParameter(s.parameters[0])) === anyType; + return !s.typeParameters && s.parameters.length === 1 && signatureHasRestParameter(s) && getElementTypeOfArrayType(getTypeOfParameter(s.parameters[0])) === anyType; } return false; } @@ -40428,8 +40552,8 @@ var ts; var decl = _a[_i]; var members = ts.getMembersOfDeclaration(decl); if (members) { - for (var _b = 0, members_4 = members; _b < members_4.length; _b++) { - var member = members_4[_b]; + for (var _b = 0, members_5 = members; _b < members_5.length; _b++) { + var member = members_5[_b]; if (isStatic === ts.hasStaticModifier(member) && hasLateBindableName(member)) { lateBindMember(symbol, earlySymbols, lateSymbols, member); } @@ -40558,8 +40682,8 @@ var ts; var paddedTypeArguments = typeArguments.length === typeParameters.length ? typeArguments : ts.concatenate(typeArguments, [type]); resolveObjectTypeMembers(type, source, typeParameters, paddedTypeArguments); } - function createSignature(declaration, typeParameters, thisParameter, parameters, resolvedReturnType, resolvedTypePredicate, minArgumentCount, hasRestParameter, hasLiteralTypes) { - var sig = new Signature(checker); + function createSignature(declaration, typeParameters, thisParameter, parameters, resolvedReturnType, resolvedTypePredicate, minArgumentCount, flags) { + var sig = new Signature(checker, flags); sig.declaration = declaration; sig.typeParameters = typeParameters; sig.parameters = parameters; @@ -40567,15 +40691,13 @@ var ts; sig.resolvedReturnType = resolvedReturnType; sig.resolvedTypePredicate = resolvedTypePredicate; sig.minArgumentCount = minArgumentCount; - sig.hasRestParameter = hasRestParameter; - sig.hasLiteralTypes = hasLiteralTypes; sig.target = undefined; sig.mapper = undefined; return sig; } function cloneSignature(sig) { var result = createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, /*resolvedReturnType*/ undefined, - /*resolvedTypePredicate*/ undefined, sig.minArgumentCount, sig.hasRestParameter, sig.hasLiteralTypes); + /*resolvedTypePredicate*/ undefined, sig.minArgumentCount, sig.flags & 3 /* PropagatingFlags */); result.target = sig.target; result.mapper = sig.mapper; return result; @@ -40587,13 +40709,25 @@ var ts; result.mapper = undefined; return result; } - function createOptionalCallSignature(signature) { + function getOptionalCallSignature(signature, callChainFlags) { + if ((signature.flags & 12 /* CallChainFlags */) === callChainFlags) { + return signature; + } + if (!signature.optionalCallSignatureCache) { + signature.optionalCallSignatureCache = {}; + } + var key = callChainFlags === 4 /* IsInnerCallChain */ ? "inner" : "outer"; + return signature.optionalCallSignatureCache[key] + || (signature.optionalCallSignatureCache[key] = createOptionalCallSignature(signature, callChainFlags)); + } + function createOptionalCallSignature(signature, callChainFlags) { + ts.Debug.assert(callChainFlags === 4 /* IsInnerCallChain */ || callChainFlags === 8 /* IsOuterCallChain */, "An optional call signature can either be for an inner call chain or an outer call chain, but not both."); var result = cloneSignature(signature); - result.isOptionalCall = true; + result.flags |= callChainFlags; return result; } function getExpandedParameters(sig) { - if (sig.hasRestParameter) { + if (signatureHasRestParameter(sig)) { var restIndex_1 = sig.parameters.length - 1; var restParameter = sig.parameters[restIndex_1]; var restType = getTypeOfSymbol(restParameter); @@ -40618,7 +40752,7 @@ var ts; var baseConstructorType = getBaseConstructorTypeOfClass(classType); var baseSignatures = getSignaturesOfType(baseConstructorType, 1 /* Construct */); if (baseSignatures.length === 0) { - return [createSignature(undefined, classType.localTypeParameters, undefined, ts.emptyArray, classType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false)]; + return [createSignature(undefined, classType.localTypeParameters, undefined, ts.emptyArray, classType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */)]; } var baseTypeNode = getBaseTypeNodeOfClass(classType); var isJavaScript = ts.isInJSFile(baseTypeNode); @@ -40782,11 +40916,9 @@ var ts; var params = combineUnionParameters(left, right); var thisParam = combineUnionThisParam(left.thisParameter, right.thisParameter); var minArgCount = Math.max(left.minArgumentCount, right.minArgumentCount); - var hasRestParam = left.hasRestParameter || right.hasRestParameter; - var hasLiteralTypes = left.hasLiteralTypes || right.hasLiteralTypes; var result = createSignature(declaration, left.typeParameters || right.typeParameters, thisParam, params, /*resolvedReturnType*/ undefined, - /*resolvedTypePredicate*/ undefined, minArgCount, hasRestParam, hasLiteralTypes); + /*resolvedTypePredicate*/ undefined, minArgCount, (left.flags | right.flags) & 3 /* PropagatingFlags */); result.unionSignatures = ts.concatenate(left.unionSignatures || [left], [right]); return result; } @@ -40959,7 +41091,7 @@ var ts; var constructSignatures = symbol.members ? getSignaturesOfSymbol(symbol.members.get("__constructor" /* Constructor */)) : ts.emptyArray; if (symbol.flags & 16 /* Function */) { constructSignatures = ts.addRange(constructSignatures.slice(), ts.mapDefined(type.callSignatures, function (sig) { return isJSConstructor(sig.declaration) ? - createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, classType_1, /*resolvedTypePredicate*/ undefined, sig.minArgumentCount, sig.hasRestParameter, sig.hasLiteralTypes) : + createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, classType_1, /*resolvedTypePredicate*/ undefined, sig.minArgumentCount, sig.flags & 3 /* PropagatingFlags */) : undefined; })); } if (!constructSignatures.length) { @@ -41465,8 +41597,8 @@ var ts; var types = t.types; var baseTypes = []; for (var _i = 0, types_6 = types; _i < types_6.length; _i++) { - var type_3 = types_6[_i]; - var baseType = getBaseConstraint(type_3); + var type_2 = types_6[_i]; + var baseType = getBaseConstraint(type_2); if (baseType) { baseTypes.push(baseType); } @@ -41899,7 +42031,7 @@ var ts; var links = getNodeLinks(declaration); if (!links.resolvedSignature) { var parameters = []; - var hasLiteralTypes = false; + var flags = 0 /* None */; var minArgumentCount = 0; var thisParameter = void 0; var hasThisParameter = false; @@ -41930,7 +42062,7 @@ var ts; parameters.push(paramSymbol); } if (type && type.kind === 186 /* LiteralType */) { - hasLiteralTypes = true; + flags |= 2 /* HasLiteralTypes */; } // Record a new minimum argument count if this is not an optional parameter var isOptionalParameter_1 = isOptionalJSDocParameterTag(param) || @@ -41956,9 +42088,11 @@ var ts; getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : undefined; var typeParameters = classType ? classType.localTypeParameters : getTypeParametersFromDeclaration(declaration); - var hasRestLikeParameter = ts.hasRestParameter(declaration) || ts.isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters); + if (ts.hasRestParameter(declaration) || ts.isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters)) { + flags |= 1 /* HasRestParameter */; + } links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, - /*resolvedReturnType*/ undefined, /*resolvedTypePredicate*/ undefined, minArgumentCount, hasRestLikeParameter, hasLiteralTypes); + /*resolvedReturnType*/ undefined, /*resolvedTypePredicate*/ undefined, minArgumentCount, flags); } return links.resolvedSignature; } @@ -42101,8 +42235,11 @@ var ts; signature.unionSignatures ? getUnionType(ts.map(signature.unionSignatures, getReturnTypeOfSignature), 2 /* Subtype */) : getReturnTypeFromAnnotation(signature.declaration) || (ts.nodeIsMissing(signature.declaration.body) ? anyType : getReturnTypeFromBody(signature.declaration)); - if (signature.isOptionalCall) { - type = propagateOptionalTypeMarker(type, /*wasOptional*/ true); + if (signature.flags & 4 /* IsInnerCallChain */) { + type = addOptionalTypeMarker(type); + } + else if (signature.flags & 8 /* IsOuterCallChain */) { + type = getOptionalType(type); } if (!popTypeResolution()) { if (signature.declaration) { @@ -42158,7 +42295,7 @@ var ts; return tryGetRestTypeOfSignature(signature) || anyType; } function tryGetRestTypeOfSignature(signature) { - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var sigRestType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); var restType = isTupleType(sigRestType) ? getRestTypeOfTupleType(sigRestType) : sigRestType; return restType && getIndexTypeOfType(restType, 1 /* Number */); @@ -42375,7 +42512,7 @@ var ts; result |= ts.getObjectFlags(type); } } - return result & 1835008 /* PropagatingFlags */; + return result & 3670016 /* PropagatingFlags */; } function createTypeReference(target, typeArguments) { var id = getTypeListId(typeArguments); @@ -42409,13 +42546,25 @@ var ts; return type; } function getTypeArguments(type) { + var _a, _b; if (!type.resolvedTypeArguments) { + if (!pushTypeResolution(type, 7 /* ResolvedTypeArguments */)) { + return ((_a = type.target.localTypeParameters) === null || _a === void 0 ? void 0 : _a.map(function () { return errorType; })) || ts.emptyArray; + } var node = type.node; var typeArguments = !node ? ts.emptyArray : node.kind === 168 /* TypeReference */ ? ts.concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments(node, type.target.localTypeParameters)) : node.kind === 173 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : ts.map(node.elementTypes, getTypeFromTypeNode); - type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments; + if (popTypeResolution()) { + type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments; + } + else { + type.resolvedTypeArguments = ((_b = type.target.localTypeParameters) === null || _b === void 0 ? void 0 : _b.map(function () { return errorType; })) || ts.emptyArray; + error(type.node || currentNode, type.target.symbol + ? ts.Diagnostics.Type_arguments_for_0_circularly_reference_themselves + : ts.Diagnostics.Tuple_type_arguments_circularly_reference_themselves, type.target.symbol && symbolToString(type.target.symbol)); + } } return type.resolvedTypeArguments; } @@ -42532,7 +42681,7 @@ var ts; errorType; } if (symbol.flags & 111551 /* Value */ && isJSDocTypeReference(node)) { - var jsdocType = getTypeFromJSAlias(node, symbol); + var jsdocType = getTypeFromJSDocValueReference(node, symbol); if (jsdocType) { return jsdocType; } @@ -42545,18 +42694,30 @@ var ts; return errorType; } /** - * A JSdoc TypeReference may be to a value imported from commonjs. - * These should really be aliases, but this special-case code fakes alias resolution - * by producing a type from a value. + * A JSdoc TypeReference may be to a value, but resolve it as a type anyway. + * Note: If the value is imported from commonjs, it should really be an alias, + * but this function's special-case code fakes alias resolution as well. */ - function getTypeFromJSAlias(node, symbol) { + function getTypeFromJSDocValueReference(node, symbol) { var valueType = getTypeOfSymbol(symbol); - var typeType = valueType.symbol && - valueType.symbol !== symbol && // Make sure this is a commonjs export by checking that symbol -> type -> symbol doesn't roundtrip. - getTypeReferenceType(node, valueType.symbol); - if (typeType) { - return getSymbolLinks(symbol).resolvedJSDocType = typeType; + var typeType = valueType; + if (symbol.valueDeclaration) { + var decl = ts.getRootDeclaration(symbol.valueDeclaration); + var isRequireAlias = false; + if (ts.isVariableDeclaration(decl) && decl.initializer) { + var expr = decl.initializer; + // skip past entity names, eg `require("x").a.b.c` + while (ts.isPropertyAccessExpression(expr)) { + expr = expr.expression; + } + isRequireAlias = ts.isCallExpression(expr) && ts.isRequireCall(expr, /*requireStringLiteralLikeArgument*/ true) && !!valueType.symbol; + } + var isImportTypeWithQualifier = node.kind === 187 /* ImportType */ && node.qualifier; + if (isRequireAlias || isImportTypeWithQualifier) { + typeType = getTypeReferenceType(node, valueType.symbol); + } } + return getSymbolLinks(symbol).resolvedJSDocType = typeType; } function getSubstitutionType(typeVariable, substitute) { if (substitute.flags & 3 /* AnyOrUnknown */ || substitute === typeVariable) { @@ -42985,7 +43146,7 @@ var ts; if (type === wildcardType) includes |= 4194304 /* IncludesWildcard */; if (!strictNullChecks && flags & 98304 /* Nullable */) { - if (!(ts.getObjectFlags(type) & 262144 /* ContainsWideningType */)) + if (!(ts.getObjectFlags(type) & 524288 /* ContainsWideningType */)) includes |= 2097152 /* IncludesNonWideningType */; } else { @@ -43112,7 +43273,7 @@ var ts; neverType; } } - return getUnionTypeFromSortedList(typeSet, includes & 66994211 /* NotPrimitiveUnion */ ? 0 : 131072 /* PrimitiveUnion */, aliasSymbol, aliasTypeArguments); + return getUnionTypeFromSortedList(typeSet, includes & 66994211 /* NotPrimitiveUnion */ ? 0 : 262144 /* PrimitiveUnion */, aliasSymbol, aliasTypeArguments); } function getUnionTypePredicate(signatures) { var first; @@ -43262,7 +43423,7 @@ var ts; // other unions and return true. Otherwise, do nothing and return false. function intersectUnionsOfPrimitiveTypes(types) { var unionTypes; - var index = ts.findIndex(types, function (t) { return !!(ts.getObjectFlags(t) & 131072 /* PrimitiveUnion */); }); + var index = ts.findIndex(types, function (t) { return !!(ts.getObjectFlags(t) & 262144 /* PrimitiveUnion */); }); if (index < 0) { return false; } @@ -43271,7 +43432,7 @@ var ts; // the unionTypes array. while (i < types.length) { var t = types[i]; - if (ts.getObjectFlags(t) & 131072 /* PrimitiveUnion */) { + if (ts.getObjectFlags(t) & 262144 /* PrimitiveUnion */) { (unionTypes || (unionTypes = [types[index]])).push(t); ts.orderedRemoveItemAt(types, i); } @@ -43300,7 +43461,7 @@ var ts; } } // Finally replace the first union with the result - types[index] = getUnionTypeFromSortedList(result, 131072 /* PrimitiveUnion */); + types[index] = getUnionTypeFromSortedList(result, 262144 /* PrimitiveUnion */); return true; } function createIntersectionType(types, aliasSymbol, aliasTypeArguments) { @@ -44097,7 +44258,7 @@ var ts; } function getAliasSymbolForTypeNode(node) { var host = node.parent; - while (ts.isParenthesizedTypeNode(host)) { + while (ts.isParenthesizedTypeNode(host) || ts.isTypeOperatorNode(host) && host.operator === 137 /* ReadonlyKeyword */) { host = host.parent; } return ts.isTypeAlias(host) ? getSymbolOfNode(host) : undefined; @@ -44198,7 +44359,7 @@ var ts; } } var spread = createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, getIndexInfoWithReadonly(stringIndexInfo, readonly), getIndexInfoWithReadonly(numberIndexInfo, readonly)); - spread.objectFlags |= 128 /* ObjectLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */ | 1024 /* ContainsSpread */ | objectFlags; + spread.objectFlags |= 128 /* ObjectLiteral */ | 1048576 /* ContainsObjectOrArrayLiteral */ | 1024 /* ContainsSpread */ | objectFlags; return spread; } /** We approximate own properties as non-methods plus methods that are inside the object literal */ @@ -44512,7 +44673,7 @@ var ts; // See GH#17600. var result = createSignature(signature.declaration, freshTypeParameters, signature.thisParameter && instantiateSymbol(signature.thisParameter, mapper), instantiateList(signature.parameters, mapper, instantiateSymbol), /*resolvedReturnType*/ undefined, - /*resolvedTypePredicate*/ undefined, signature.minArgumentCount, signature.hasRestParameter, signature.hasLiteralTypes); + /*resolvedTypePredicate*/ undefined, signature.minArgumentCount, signature.flags & 3 /* PropagatingFlags */); result.target = signature; result.mapper = mapper; return result; @@ -45393,20 +45554,20 @@ var ts; } function isSignatureAssignableTo(source, target, ignoreReturnTypes) { return compareSignaturesRelated(source, target, 0 /* None */, ignoreReturnTypes, /*reportErrors*/ false, - /*errorReporter*/ undefined, /*errorReporter*/ undefined, compareTypesAssignable) !== 0 /* False */; + /*errorReporter*/ undefined, /*errorReporter*/ undefined, compareTypesAssignable, /*reportUnreliableMarkers*/ undefined) !== 0 /* False */; } /** * Returns true if `s` is `(...args: any[]) => any` or `(this: any, ...args: any[]) => any` */ function isAnySignature(s) { return !s.typeParameters && (!s.thisParameter || isTypeAny(getTypeOfParameter(s.thisParameter))) && s.parameters.length === 1 && - s.hasRestParameter && (getTypeOfParameter(s.parameters[0]) === anyArrayType || isTypeAny(getTypeOfParameter(s.parameters[0]))) && + signatureHasRestParameter(s) && (getTypeOfParameter(s.parameters[0]) === anyArrayType || isTypeAny(getTypeOfParameter(s.parameters[0]))) && isTypeAny(getReturnTypeOfSignature(s)); } /** * See signatureRelatedTo, compareSignaturesIdentical */ - function compareSignaturesRelated(source, target, callbackCheck, ignoreReturnTypes, reportErrors, errorReporter, incompatibleErrorReporter, compareTypes) { + function compareSignaturesRelated(source, target, callbackCheck, ignoreReturnTypes, reportErrors, errorReporter, incompatibleErrorReporter, compareTypes, reportUnreliableMarkers) { // TODO (drosen): De-duplicate code between related functions. if (source === target) { return -1 /* True */; @@ -45425,6 +45586,9 @@ var ts; var sourceCount = getParameterCount(source); var sourceRestType = getNonArrayRestType(source); var targetRestType = getNonArrayRestType(target); + if (sourceRestType || targetRestType) { + void instantiateType(sourceRestType || targetRestType, reportUnreliableMarkers); + } if (sourceRestType && targetRestType && sourceCount !== targetCount) { // We're not able to relate misaligned complex rest parameters return 0 /* False */; @@ -45468,7 +45632,7 @@ var ts; (getFalsyFlags(sourceType) & 98304 /* Nullable */) === (getFalsyFlags(targetType) & 98304 /* Nullable */); var related = callbacks ? // TODO: GH#18217 It will work if they're both `undefined`, but not if only one is - compareSignaturesRelated(targetSig, sourceSig, strictVariance ? 2 /* Strict */ : 1 /* Bivariant */, /*ignoreReturnTypes*/ false, reportErrors, errorReporter, incompatibleErrorReporter, compareTypes) : + compareSignaturesRelated(targetSig, sourceSig, strictVariance ? 2 /* Strict */ : 1 /* Bivariant */, /*ignoreReturnTypes*/ false, reportErrors, errorReporter, incompatibleErrorReporter, compareTypes, reportUnreliableMarkers) : !callbackCheck && !strictVariance && compareTypes(sourceType, targetType, /*reportErrors*/ false) || compareTypes(targetType, sourceType, reportErrors); if (!related) { if (reportErrors) { @@ -45482,13 +45646,13 @@ var ts; // If a signature resolution is already in-flight, skip issuing a circularity error // here and just use the `any` type directly var targetReturnType = isResolvingReturnTypeOfSignature(target) ? anyType - : target.declaration && isJSConstructor(target.declaration) ? getDeclaredTypeOfClassOrInterface(target.declaration.symbol) + : target.declaration && isJSConstructor(target.declaration) ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(target.declaration.symbol)) : getReturnTypeOfSignature(target); if (targetReturnType === voidType) { return result; } var sourceReturnType = isResolvingReturnTypeOfSignature(source) ? anyType - : source.declaration && isJSConstructor(source.declaration) ? getDeclaredTypeOfClassOrInterface(source.declaration.symbol) + : source.declaration && isJSConstructor(source.declaration) ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(source.declaration.symbol)) : getReturnTypeOfSignature(source); // The following block preserves behavior forbidding boolean returning functions from being assignable to type guard returning functions var targetTypePredicate = getTypePredicateOfSignature(target); @@ -45675,7 +45839,7 @@ var ts; return true; } if (source.flags & 524288 /* Object */ && target.flags & 524288 /* Object */) { - var related = relation.get(getRelationKey(source, target, relation)); + var related = relation.get(getRelationKey(source, target, /*isIntersectionConstituent*/ false, relation)); if (related !== undefined) { return !!(related & 1 /* Succeeded */); } @@ -46046,7 +46210,7 @@ var ts; // and we need to handle "each" relations before "some" relations for the same kind of type. if (source.flags & 1048576 /* Union */) { result = relation === comparableRelation ? - someTypeRelatedToType(source, target, reportErrors && !(source.flags & 131068 /* Primitive */), isIntersectionConstituent) : + someTypeRelatedToType(source, target, reportErrors && !(source.flags & 131068 /* Primitive */)) : eachTypeRelatedToType(source, target, reportErrors && !(source.flags & 131068 /* Primitive */)); } else { @@ -46084,7 +46248,7 @@ var ts; // // - For a primitive type or type parameter (such as 'number = A & B') there is no point in // breaking the intersection apart. - result = someTypeRelatedToType(source, target, /*reportErrors*/ false, /*isIntersectionConstituent*/ true); + result = someTypeRelatedToType(source, target, /*reportErrors*/ false); } if (!result && (source.flags & 66846720 /* StructuredOrInstantiable */ || target.flags & 66846720 /* StructuredOrInstantiable */)) { if (result = recursiveTypeRelatedTo(source, target, reportErrors, isIntersectionConstituent)) { @@ -46197,7 +46361,7 @@ var ts; // JsxAttributes has an object-literal flag and undergo same type-assignablity check as normal object-literal. // However, using an object-literal error message will be very confusing to the users so we give different a message. // TODO: Spelling suggestions for excess jsx attributes (needs new diagnostic messages) - if (prop.valueDeclaration && ts.isJsxAttribute(prop.valueDeclaration)) { + if (prop.valueDeclaration && ts.isJsxAttribute(prop.valueDeclaration) && ts.getSourceFileOfNode(errorNode) === ts.getSourceFileOfNode(prop.valueDeclaration.name)) { // Note that extraneous children (as in `extra`) don't pass this check, // since `children` is a SyntaxKind.PropertySignature instead of a SyntaxKind.JsxAttribute. errorNode = prop.valueDeclaration.name; @@ -46208,7 +46372,7 @@ var ts; // use the property's value declaration if the property is assigned inside the literal itself var objectLiteralDeclaration_1 = source.symbol && ts.firstOrUndefined(source.symbol.declarations); var suggestion = void 0; - if (prop.valueDeclaration && ts.findAncestor(prop.valueDeclaration, function (d) { return d === objectLiteralDeclaration_1; })) { + if (prop.valueDeclaration && ts.findAncestor(prop.valueDeclaration, function (d) { return d === objectLiteralDeclaration_1; }) && ts.getSourceFileOfNode(objectLiteralDeclaration_1) === ts.getSourceFileOfNode(errorNode)) { var propDeclaration = prop.valueDeclaration; ts.Debug.assertNode(propDeclaration, ts.isObjectLiteralElementLike); errorNode = propDeclaration; @@ -46368,14 +46532,14 @@ var ts; } return result; } - function someTypeRelatedToType(source, target, reportErrors, isIntersectionConstituent) { + function someTypeRelatedToType(source, target, reportErrors) { var sourceTypes = source.types; if (source.flags & 1048576 /* Union */ && containsType(sourceTypes, target)) { return -1 /* True */; } var len = sourceTypes.length; for (var i = 0; i < len; i++) { - var related = isRelatedTo(sourceTypes[i], target, reportErrors && i === len - 1, /*headMessage*/ undefined, isIntersectionConstituent); + var related = isRelatedTo(sourceTypes[i], target, reportErrors && i === len - 1); if (related) { return related; } @@ -46463,7 +46627,7 @@ var ts; if (overflow) { return 0 /* False */; } - var id = getRelationKey(source, target, relation); + var id = getRelationKey(source, target, isIntersectionConstituent, relation); var entry = relation.get(id); if (entry !== undefined) { if (reportErrors && entry & 2 /* Failed */ && !(entry & 4 /* Reported */)) { @@ -47357,7 +47521,7 @@ var ts; * See signatureAssignableTo, compareSignaturesIdentical */ function signatureRelatedTo(source, target, erase, reportErrors, incompatibleReporter) { - return compareSignaturesRelated(erase ? getErasedSignature(source) : source, erase ? getErasedSignature(target) : target, 0 /* None */, /*ignoreReturnTypes*/ false, reportErrors, reportError, incompatibleReporter, isRelatedTo); + return compareSignaturesRelated(erase ? getErasedSignature(source) : source, erase ? getErasedSignature(target) : target, 0 /* None */, /*ignoreReturnTypes*/ false, reportErrors, reportError, incompatibleReporter, isRelatedTo, reportUnreliableMarkers); } function signaturesIdenticalTo(source, target, kind) { var sourceSignatures = getSignaturesOfType(source, kind); @@ -47649,17 +47813,18 @@ var ts; * To improve caching, the relation key for two generic types uses the target's id plus ids of the type parameters. * For other cases, the types ids are used. */ - function getRelationKey(source, target, relation) { + function getRelationKey(source, target, isIntersectionConstituent, relation) { if (relation === identityRelation && source.id > target.id) { var temp = source; source = target; target = temp; } + var intersection = isIntersectionConstituent ? "&" : ""; if (isTypeReferenceWithGenericArguments(source) && isTypeReferenceWithGenericArguments(target)) { var typeParameters = []; - return getTypeReferenceId(source, typeParameters) + "," + getTypeReferenceId(target, typeParameters); + return getTypeReferenceId(source, typeParameters) + "," + getTypeReferenceId(target, typeParameters) + intersection; } - return source.id + "," + target.id; + return source.id + "," + target.id + intersection; } // Invoke the callback for each underlying property symbol of the given symbol and return the first // value that isn't undefined. @@ -47710,7 +47875,7 @@ var ts; // for finite but deeply expanding indexed accesses (eg, for `Q[P1][P2][P3][P4][P5]`). function isDeeplyNestedType(type, stack, depth) { // We track all object types that have an associated symbol (representing the origin of the type) - if (depth >= 5 && type.flags & 524288 /* Object */) { + if (depth >= 5 && type.flags & 524288 /* Object */ && !isObjectOrArrayLiteralType(type)) { var symbol = type.symbol; if (symbol) { var count = 0; @@ -48085,37 +48250,19 @@ var ts; function addOptionalTypeMarker(type) { return strictNullChecks ? getUnionType([type, optionalType]) : type; } + function isNotOptionalTypeMarker(type) { + return type !== optionalType; + } function removeOptionalTypeMarker(type) { - return strictNullChecks ? filterType(type, function (t) { return t !== optionalType; }) : type; + return strictNullChecks ? filterType(type, isNotOptionalTypeMarker) : type; } - function propagateOptionalTypeMarker(type, wasOptional) { - return wasOptional ? addOptionalTypeMarker(type) : type; + function propagateOptionalTypeMarker(type, node, wasOptional) { + return wasOptional ? ts.isOutermostOptionalChain(node) ? getOptionalType(type) : addOptionalTypeMarker(type) : type; } - function createPooledOptionalTypeResult(isOptional, type) { - pooledOptionalTypeResult.isOptional = isOptional; - pooledOptionalTypeResult.type = type; - return pooledOptionalTypeResult; - } - function checkOptionalExpression(parent, expression, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic) { - var isOptional = false; - var type = checkExpression(expression); - if (ts.isOptionalChain(parent)) { - if (parent.questionDotToken) { - // If we have a questionDotToken then we are an OptionalExpression and should remove `null` and - // `undefined` from the type and add the optionalType to the result, if needed. - isOptional = isNullableType(type); - return createPooledOptionalTypeResult(isOptional, isOptional ? getNonNullableType(type) : type); - } - // If we do not have a questionDotToken, then we are an OptionalChain and we remove the optionalType and - // indicate whether we need to add optionalType back into the result. - var nonOptionalType = removeOptionalTypeMarker(type); - if (nonOptionalType !== type) { - isOptional = true; - type = nonOptionalType; - } - } - type = checkNonNullType(type, expression, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic); - return createPooledOptionalTypeResult(isOptional, type); + function getOptionalExpressionType(exprType, expression) { + return ts.isExpressionOfOptionalChainRoot(expression) ? getNonNullableType(exprType) : + ts.isOptionalChain(expression) ? removeOptionalTypeMarker(exprType) : + exprType; } /** * Is source potentially coercible to target type under `==`. @@ -48269,14 +48416,14 @@ var ts; var stringIndexInfo = getIndexInfoOfType(type, 0 /* String */); var numberIndexInfo = getIndexInfoOfType(type, 1 /* Number */); var result = createAnonymousType(type.symbol, members, ts.emptyArray, ts.emptyArray, stringIndexInfo && createIndexInfo(getWidenedType(stringIndexInfo.type), stringIndexInfo.isReadonly), numberIndexInfo && createIndexInfo(getWidenedType(numberIndexInfo.type), numberIndexInfo.isReadonly)); - result.objectFlags |= (ts.getObjectFlags(type) & (16384 /* JSLiteral */ | 1048576 /* NonInferrableType */)); // Retain js literal flag through widening + result.objectFlags |= (ts.getObjectFlags(type) & (16384 /* JSLiteral */ | 2097152 /* NonInferrableType */)); // Retain js literal flag through widening return result; } function getWidenedType(type) { return getWidenedTypeWithContext(type, /*context*/ undefined); } function getWidenedTypeWithContext(type, context) { - if (ts.getObjectFlags(type) & 786432 /* RequiresWidening */) { + if (ts.getObjectFlags(type) & 1572864 /* RequiresWidening */) { if (context === undefined && type.widened) { return type.widened; } @@ -48321,7 +48468,7 @@ var ts; */ function reportWideningErrorsInType(type) { var errorReported = false; - if (ts.getObjectFlags(type) & 262144 /* ContainsWideningType */) { + if (ts.getObjectFlags(type) & 524288 /* ContainsWideningType */) { if (type.flags & 1048576 /* Union */) { if (ts.some(type.types, isEmptyObjectType)) { errorReported = true; @@ -48347,7 +48494,7 @@ var ts; for (var _d = 0, _e = getPropertiesOfObjectType(type); _d < _e.length; _d++) { var p = _e[_d]; var t = getTypeOfSymbol(p); - if (ts.getObjectFlags(t) & 262144 /* ContainsWideningType */) { + if (ts.getObjectFlags(t) & 524288 /* ContainsWideningType */) { if (!reportWideningErrorsInType(t)) { error(p.valueDeclaration, ts.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, symbolToString(p), typeToString(getWidenedType(t))); } @@ -48427,7 +48574,7 @@ var ts; errorOrSuggestion(noImplicitAny, declaration, diagnostic, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)), typeAsString); } function reportErrorsFromWidening(declaration, type, wideningKind) { - if (produceDiagnostics && noImplicitAny && ts.getObjectFlags(type) & 262144 /* ContainsWideningType */) { + if (produceDiagnostics && noImplicitAny && ts.getObjectFlags(type) & 524288 /* ContainsWideningType */) { // Report implicit any error within type if possible, otherwise report error on declaration if (!reportWideningErrorsInType(type)) { reportImplicitAny(declaration, type, wideningKind); @@ -48544,7 +48691,7 @@ var ts; return !!(type.flags & 63176704 /* Instantiable */ || objectFlags & 4 /* Reference */ && (type.node || ts.forEach(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || - objectFlags & 32 /* Mapped */ || + objectFlags & (32 /* Mapped */ | 131072 /* ObjectRestType */) || type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && couldUnionOrIntersectionContainTypeVariables(type)); } function couldUnionOrIntersectionContainTypeVariables(type) { @@ -48599,7 +48746,7 @@ var ts; // literal { a: 123, b: x => true } is marked non-inferable because it contains a context sensitive // arrow function, but is considered partially inferable because property 'a' has an inferable type. function isPartiallyInferableType(type) { - return !(ts.getObjectFlags(type) & 1048576 /* NonInferrableType */) || + return !(ts.getObjectFlags(type) & 2097152 /* NonInferrableType */) || isObjectLiteralType(type) && ts.some(getPropertiesOfType(type), function (prop) { return isPartiallyInferableType(getTypeOfSymbol(prop)); }); } function createReverseMappedType(source, target, constraint) { @@ -48750,10 +48897,7 @@ var ts; // inferring a type parameter constraint. Instead, make a lower priority inference from // the full source to whatever remains in the target. For example, when inferring from // string to 'string | T', make a lower priority inference of string for T. - var savePriority = priority; - priority |= 1 /* NakedTypeVariable */; - inferFromTypes(source, target); - priority = savePriority; + inferWithPriority(source, target, 1 /* NakedTypeVariable */); return; } source = getUnionType(sources); @@ -48786,7 +48930,7 @@ var ts; // not contain anyFunctionType when we come back to this argument for its second round // of inference. Also, we exclude inferences for silentNeverType (which is used as a wildcard // when constructing types from type parameters that had no inference candidates). - if (ts.getObjectFlags(source) & 1048576 /* NonInferrableType */ || source === silentNeverType || (priority & 16 /* ReturnType */ && (source === autoType || source === autoArrayType))) { + if (ts.getObjectFlags(source) & 2097152 /* NonInferrableType */ || source === silentNeverType || (priority & 16 /* ReturnType */ && (source === autoType || source === autoArrayType))) { return; } var inference = getInferenceInfoForType(target); @@ -48853,10 +48997,7 @@ var ts; else if ((isLiteralType(source) || source.flags & 4 /* String */) && target.flags & 4194304 /* Index */) { var empty = createEmptyObjectTypeFromStringLiteral(source); contravariant = !contravariant; - var savePriority = priority; - priority |= 32 /* LiteralKeyof */; - inferFromTypes(empty, target.type); - priority = savePriority; + inferWithPriority(empty, target.type, 32 /* LiteralKeyof */); contravariant = !contravariant; } else if (source.flags & 8388608 /* IndexedAccess */ && target.flags & 8388608 /* IndexedAccess */) { @@ -48908,6 +49049,12 @@ var ts; } } } + function inferWithPriority(source, target, newPriority) { + var savePriority = priority; + priority |= newPriority; + inferFromTypes(source, target); + priority = savePriority; + } function invokeOnce(source, target, action) { var key = source.id + "," + target.id; var status = visited && visited.get(key); @@ -48973,6 +49120,18 @@ var ts; } return undefined; } + function getSingleTypeVariableFromIntersectionTypes(types) { + var typeVariable; + for (var _i = 0, types_13 = types; _i < types_13.length; _i++) { + var type = types_13[_i]; + var t = type.flags & 2097152 /* Intersection */ && ts.find(type.types, function (t) { return !!getInferenceInfoForType(t); }); + if (!t || typeVariable && t !== typeVariable) { + return undefined; + } + typeVariable = t; + } + return typeVariable; + } function inferToMultipleTypes(source, targets, targetFlags) { var typeVariableCount = 0; if (targetFlags & 1048576 /* Union */) { @@ -49002,6 +49161,16 @@ var ts; } } } + if (typeVariableCount === 0) { + // If every target is an intersection of types containing a single naked type variable, + // make a lower priority inference to that type variable. This handles inferring from + // 'A | B' to 'T & (X | Y)' where we want to infer 'A | B' for T. + var intersectionTypeVariable = getSingleTypeVariableFromIntersectionTypes(targets); + if (intersectionTypeVariable) { + inferWithPriority(source, intersectionTypeVariable, 1 /* NakedTypeVariable */); + } + return; + } // If the target has a single naked type variable and no inference circularities were // encountered above (meaning we explored the types fully), create a union of the source // types from which no inferences have been made so far and infer from that union to the @@ -49033,15 +49202,12 @@ var ts; // we want to infer string for T, not Promise | string. For intersection types // we only infer to single naked type variables. if (targetFlags & 2097152 /* Intersection */ ? typeVariableCount === 1 : typeVariableCount > 0) { - var savePriority = priority; - priority |= 1 /* NakedTypeVariable */; for (var _b = 0, targets_4 = targets; _b < targets_4.length; _b++) { var t = targets_4[_b]; if (getInferenceInfoForType(t)) { - inferFromTypes(source, t); + inferWithPriority(source, t, 1 /* NakedTypeVariable */); } } - priority = savePriority; } } function inferToMappedType(source, target, constraintType) { @@ -49062,14 +49228,12 @@ var ts; if (inference && !inference.isFixed) { var inferredType = inferTypeForHomomorphicMappedType(source, target, constraintType); if (inferredType) { - var savePriority = priority; // We assign a lower priority to inferences made from types containing non-inferrable // types because we may only have a partial result (i.e. we may have failed to make // reverse inferences for some properties). - priority |= ts.getObjectFlags(source) & 1048576 /* NonInferrableType */ ? - 4 /* PartialHomomorphicMappedType */ : 2 /* HomomorphicMappedType */; - inferFromTypes(inferredType, inference.typeParameter); - priority = savePriority; + inferWithPriority(inferredType, inference.typeParameter, ts.getObjectFlags(source) & 2097152 /* NonInferrableType */ ? + 4 /* PartialHomomorphicMappedType */ : + 2 /* HomomorphicMappedType */); } } return true; @@ -49077,10 +49241,7 @@ var ts; if (constraintType.flags & 262144 /* TypeParameter */) { // We're inferring from some source type S to a mapped type { [P in K]: X }, where K is a type // parameter. First infer from 'keyof S' to K. - var savePriority = priority; - priority |= 8 /* MappedTypeConstraint */; - inferFromTypes(getIndexType(source), constraintType); - priority = savePriority; + inferWithPriority(getIndexType(source), constraintType, 8 /* MappedTypeConstraint */); // If K is constrained to a type C, also infer to C. Thus, for a mapped type { [P in K]: X }, // where K extends keyof T, we make the same inferences as for a homomorphic mapped type // { [P in keyof T]: X }. This enables us to make meaningful inferences when the target is a @@ -49189,7 +49350,7 @@ var ts; var sourceLen = sourceSignatures.length; var targetLen = targetSignatures.length; var len = sourceLen < targetLen ? sourceLen : targetLen; - var skipParameters = !!(ts.getObjectFlags(source) & 1048576 /* NonInferrableType */); + var skipParameters = !!(ts.getObjectFlags(source) & 2097152 /* NonInferrableType */); for (var i = 0; i < len; i++) { inferFromSignature(getBaseSignature(sourceSignatures[sourceLen - len + i]), getBaseSignature(targetSignatures[targetLen - len + i]), skipParameters); } @@ -49458,6 +49619,15 @@ var ts; } return false; } + function optionalChainContainsReference(source, target) { + while (ts.isOptionalChain(source)) { + source = source.expression; + if (isMatchingReference(source, target)) { + return true; + } + } + return false; + } // Return true if target is a property access xxx.yyy, source is a property access xxx.zzz, the declared // type of xxx is a union type, and yyy is a property that is possibly a discriminant. We consider a property // a possible discriminant if its type differs in the constituents of containing union type, and if every @@ -49578,8 +49748,8 @@ var ts; } function getTypeFactsOfTypes(types) { var result = 0 /* None */; - for (var _i = 0, types_13 = types; _i < types_13.length; _i++) { - var t = types_13[_i]; + for (var _i = 0, types_14 = types; _i < types_14.length; _i++) { + var t = types_14[_i]; result |= getTypeFacts(t); } return result; @@ -49948,8 +50118,8 @@ var ts; } function isEvolvingArrayTypeList(types) { var hasEvolvingArrayType = false; - for (var _i = 0, types_14 = types; _i < types_14.length; _i++) { - var t = types_14[_i]; + for (var _i = 0, types_15 = types; _i < types_15.length; _i++) { + var t = types_15[_i]; if (!(t.flags & 131072 /* Never */)) { if (!(ts.getObjectFlags(t) & 256 /* EvolvingArray */)) { return false; @@ -50030,9 +50200,18 @@ var ts; // expressions are potential type predicate function calls. In order to avoid triggering // circularities in control flow analysis, we use getTypeOfDottedName when resolving the call // target expression of an assertion. - var funcType = node.parent.kind === 225 /* ExpressionStatement */ ? getTypeOfDottedName(node.expression, /*diagnostic*/ undefined) : - node.expression.kind !== 101 /* SuperKeyword */ ? checkOptionalExpression(node, node.expression).type : - undefined; + var funcType = void 0; + if (node.parent.kind === 225 /* ExpressionStatement */) { + funcType = getTypeOfDottedName(node.expression, /*diagnostic*/ undefined); + } + else if (node.expression.kind !== 101 /* SuperKeyword */) { + if (ts.isOptionalChain(node)) { + funcType = checkNonNullType(getOptionalExpressionType(checkExpression(node.expression), node.expression), node.expression); + } + else { + funcType = checkNonNullExpression(node.expression); + } + } var signatures = getSignaturesOfType(funcType && getApparentType(funcType) || unknownType, 0 /* Call */); var candidate = signatures.length === 1 && !signatures[0].typeParameters ? signatures[0] : ts.some(signatures, hasTypePredicateOrNeverReturnType) ? getResolvedSignature(node) : @@ -50045,6 +50224,13 @@ var ts; return !!(getTypePredicateOfSignature(signature) || signature.declaration && (getReturnTypeFromAnnotation(signature.declaration) || unknownType).flags & 131072 /* Never */); } + function getTypePredicateArgument(predicate, callExpression) { + if (predicate.kind === 1 /* Identifier */ || predicate.kind === 3 /* AssertsIdentifier */) { + return callExpression.arguments[predicate.parameterIndex]; + } + var invokedExpression = ts.skipParentheses(callExpression.expression); + return ts.isAccessExpression(invokedExpression) ? ts.skipParentheses(invokedExpression.expression) : undefined; + } function reportFlowControlError(node) { var block = ts.findAncestor(node, ts.isFunctionOrModuleBlock); var sourceFile = ts.getSourceFileOfNode(node); @@ -50060,6 +50246,11 @@ var ts; function isUnlockedReachableFlowNode(flow) { return !(flow.flags & 4096 /* PreFinally */ && flow.lock.locked) && isReachableFlowNodeWorker(flow, /*skipCacheCheck*/ false); } + function isFalseExpression(expr) { + var node = ts.skipParentheses(expr); + return node.kind === 90 /* FalseKeyword */ || node.kind === 208 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || + node.operatorToken.kind === 56 /* BarBarToken */ && isFalseExpression(node.left) && isFalseExpression(node.right)); + } function isReachableFlowNodeWorker(flow, noCacheCheck) { while (true) { if (flow === lastFlowNode) { @@ -50079,8 +50270,17 @@ var ts; } else if (flags & 512 /* Call */) { var signature = getEffectsSignature(flow.node); - if (signature && getReturnTypeOfSignature(signature).flags & 131072 /* Never */) { - return false; + if (signature) { + var predicate = getTypePredicateOfSignature(signature); + if (predicate && predicate.kind === 3 /* AssertsIdentifier */) { + var predicateArgument = flow.node.arguments[predicate.parameterIndex]; + if (predicateArgument && isFalseExpression(predicateArgument)) { + return false; + } + } + if (getReturnTypeOfSignature(signature).flags & 131072 /* Never */) { + return false; + } } flow = flow.antecedent; } @@ -50314,6 +50514,9 @@ var ts; } function narrowTypeByAssertion(type, expr) { var node = ts.skipParentheses(expr); + if (node.kind === 90 /* FalseKeyword */) { + return unreachableNeverType; + } if (node.kind === 208 /* BinaryExpression */) { if (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */) { return narrowTypeByAssertion(narrowTypeByAssertion(type, node.left), node.right); @@ -50332,7 +50535,7 @@ var ts; var flowType = getTypeAtFlowNode(flow.antecedent); var type = getTypeFromFlowType(flowType); var narrowedType = predicate.type ? narrowTypeByTypePredicate(type, predicate, flow.node, /*assumeTrue*/ true) : - predicate.kind === 3 /* AssertsIdentifier */ ? narrowTypeByAssertion(type, flow.node.arguments[predicate.parameterIndex]) : + predicate.kind === 3 /* AssertsIdentifier */ && predicate.parameterIndex >= 0 && predicate.parameterIndex < flow.node.arguments.length ? narrowTypeByAssertion(type, flow.node.arguments[predicate.parameterIndex]) : type; return narrowedType === type ? flowType : createFlowType(narrowedType, isIncomplete(flowType)); } @@ -50403,17 +50606,24 @@ var ts; if (isMatchingReference(reference, expr)) { type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } - else if (isMatchingReferenceDiscriminant(expr, type)) { - type = narrowTypeByDiscriminant(type, expr, function (t) { return narrowTypeBySwitchOnDiscriminant(t, flow.switchStatement, flow.clauseStart, flow.clauseEnd); }); - } else if (expr.kind === 203 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { type = narrowBySwitchOnTypeOf(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } - else if (containsMatchingReferenceDiscriminant(reference, expr)) { - type = declaredType; - } - else if (flow.clauseStart === flow.clauseEnd && isExhaustiveSwitchStatement(flow.switchStatement)) { - return unreachableNeverType; + else { + if (strictNullChecks) { + if (optionalChainContainsReference(expr, reference)) { + type = narrowTypeBySwitchOptionalChainContainment(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd, function (t) { return !(t.flags & (32768 /* Undefined */ | 131072 /* Never */)); }); + } + else if (expr.kind === 203 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { + type = narrowTypeBySwitchOptionalChainContainment(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd, function (t) { return !(t.flags & 131072 /* Never */ || t.flags & 128 /* StringLiteral */ && t.value === "undefined"); }); + } + } + if (isMatchingReferenceDiscriminant(expr, type)) { + type = narrowTypeByDiscriminant(type, expr, function (t) { return narrowTypeBySwitchOnDiscriminant(t, flow.switchStatement, flow.clauseStart, flow.clauseEnd); }); + } + else if (containsMatchingReferenceDiscriminant(reference, expr)) { + type = declaredType; + } } return createFlowType(type, isIncomplete(flowType)); } @@ -50421,6 +50631,7 @@ var ts; var antecedentTypes = []; var subtypeReduction = false; var seenIncomplete = false; + var bypassFlow; for (var _i = 0, _a = flow.antecedents; _i < _a.length; _i++) { var antecedent = _a[_i]; if (antecedent.flags & 4096 /* PreFinally */ && antecedent.lock.locked) { @@ -50429,6 +50640,11 @@ var ts; // in this case we should ignore this branch. continue; } + if (!bypassFlow && antecedent.flags & 128 /* SwitchClause */ && antecedent.clauseStart === antecedent.clauseEnd) { + // The antecedent is the bypass branch of a potentially exhaustive switch statement. + bypassFlow = antecedent; + continue; + } var flowType = getTypeAtFlowNode(antecedent); var type = getTypeFromFlowType(flowType); // If the type at a particular antecedent path is the declared type and the @@ -50449,6 +50665,25 @@ var ts; seenIncomplete = true; } } + if (bypassFlow) { + var flowType = getTypeAtFlowNode(bypassFlow); + var type = getTypeFromFlowType(flowType); + // If the bypass flow contributes a type we haven't seen yet and the switch statement + // isn't exhaustive, process the bypass flow type. Since exhaustiveness checks increase + // the risk of circularities, we only want to perform them when they make a difference. + if (!ts.contains(antecedentTypes, type) && !isExhaustiveSwitchStatement(bypassFlow.switchStatement)) { + if (type === declaredType && declaredType === initialType) { + return type; + } + antecedentTypes.push(type); + if (!isTypeSubsetOf(type, declaredType)) { + subtypeReduction = true; + } + if (isIncomplete(flowType)) { + seenIncomplete = true; + } + } + } return createFlowType(getUnionOrEvolvingArrayType(antecedentTypes, subtypeReduction ? 2 /* Subtype */ : 1 /* Literal */), seenIncomplete); } function getTypeAtFlowLoopLabel(flow) { @@ -50555,6 +50790,9 @@ var ts; if (isMatchingReference(reference, expr)) { return getTypeWithFacts(type, assumeTrue ? 4194304 /* Truthy */ : 8388608 /* Falsy */); } + if (strictNullChecks && assumeTrue && optionalChainContainsReference(expr, reference)) { + type = getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); + } if (isMatchingReferenceDiscriminant(expr, declaredType)) { return narrowTypeByDiscriminant(type, expr, function (t) { return getTypeWithFacts(t, assumeTrue ? 4194304 /* Truthy */ : 8388608 /* Falsy */); }); } @@ -50603,6 +50841,14 @@ var ts; if (isMatchingReference(reference, right_1)) { return narrowTypeByEquality(type, operator_1, left_1, assumeTrue); } + if (strictNullChecks) { + if (optionalChainContainsReference(left_1, reference)) { + type = narrowTypeByOptionalChainContainment(type, operator_1, right_1, assumeTrue); + } + else if (optionalChainContainsReference(right_1, reference)) { + type = narrowTypeByOptionalChainContainment(type, operator_1, left_1, assumeTrue); + } + } if (isMatchingReferenceDiscriminant(left_1, declaredType)) { return narrowTypeByDiscriminant(type, left_1, function (t) { return narrowTypeByEquality(t, operator_1, right_1, assumeTrue); }); } @@ -50626,6 +50872,15 @@ var ts; } return type; } + function narrowTypeByOptionalChainContainment(type, operator, value, assumeTrue) { + // We are in a branch of obj?.foo === value or obj?.foo !== value. We remove undefined and null from + // the type of obj if (a) the operator is === and the type of value doesn't include undefined or (b) the + // operator is !== and the type of value is undefined. + var effectiveTrue = operator === 34 /* EqualsEqualsToken */ || operator === 36 /* EqualsEqualsEqualsToken */ ? assumeTrue : !assumeTrue; + var doubleEquals = operator === 34 /* EqualsEqualsToken */ || operator === 35 /* ExclamationEqualsToken */; + var valueNonNullish = !(getTypeFacts(getTypeOfExpression(value)) & (doubleEquals ? 262144 /* EQUndefinedOrNull */ : 65536 /* EQUndefined */)); + return effectiveTrue === valueNonNullish ? getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */) : type; + } function narrowTypeByEquality(type, operator, value, assumeTrue) { if (type.flags & 1 /* Any */) { return type; @@ -50673,8 +50928,14 @@ var ts; } function narrowTypeByTypeof(type, typeOfExpr, operator, literal, assumeTrue) { // We have '==', '!=', '===', or !==' operator with 'typeof xxx' and string literal operands + if (operator === 35 /* ExclamationEqualsToken */ || operator === 37 /* ExclamationEqualsEqualsToken */) { + assumeTrue = !assumeTrue; + } var target = getReferenceCandidate(typeOfExpr.expression); if (!isMatchingReference(reference, target)) { + if (strictNullChecks && optionalChainContainsReference(target, reference) && assumeTrue === (literal.text !== "undefined")) { + return getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); + } // For a reference of the form 'x.y', a 'typeof x === ...' type guard resets the // narrowed type of 'y' to its declared type. if (containsMatchingReference(reference, target)) { @@ -50682,9 +50943,6 @@ var ts; } return type; } - if (operator === 35 /* ExclamationEqualsToken */ || operator === 37 /* ExclamationEqualsEqualsToken */) { - assumeTrue = !assumeTrue; - } if (type.flags & 1 /* Any */ && literal.text === "function") { return type; } @@ -50717,6 +50975,10 @@ var ts; return type; } } + function narrowTypeBySwitchOptionalChainContainment(type, switchStatement, clauseStart, clauseEnd, clauseCheck) { + var everyClauseChecks = clauseStart !== clauseEnd && ts.every(getSwitchClauseTypes(switchStatement).slice(clauseStart, clauseEnd), clauseCheck); + return everyClauseChecks ? getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */) : type; + } function narrowTypeBySwitchOnDiscriminant(type, switchStatement, clauseStart, clauseEnd) { // We only narrow if all case expressions specify // values with unit types, except for the case where @@ -50849,6 +51111,9 @@ var ts; function narrowTypeByInstanceof(type, expr, assumeTrue) { var left = getReferenceCandidate(expr.left); if (!isMatchingReference(reference, left)) { + if (assumeTrue && strictNullChecks && optionalChainContainsReference(left, reference)) { + return getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); + } // For a reference of the form 'x.y', an 'x instanceof T' type guard resets the // narrowed type of 'y' to its declared type. We do this because preceding 'x.y' // references might reference a different 'y' property. However, we make an exception @@ -50921,39 +51186,28 @@ var ts; } function narrowTypeByTypePredicate(type, predicate, callExpression, assumeTrue) { // Don't narrow from 'any' if the predicate type is exactly 'Object' or 'Function' - if (isTypeAny(type) && (predicate.type === globalObjectType || predicate.type === globalFunctionType)) { - return type; - } - if (predicate.kind === 1 /* Identifier */ || predicate.kind === 3 /* AssertsIdentifier */) { - var predicateArgument = callExpression.arguments[predicate.parameterIndex]; - if (predicateArgument && predicate.type) { + if (predicate.type && !(isTypeAny(type) && (predicate.type === globalObjectType || predicate.type === globalFunctionType))) { + var predicateArgument = getTypePredicateArgument(predicate, callExpression); + if (predicateArgument) { if (isMatchingReference(reference, predicateArgument)) { return getNarrowedType(type, predicate.type, assumeTrue, isTypeSubtypeOf); } + if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) && + !(getTypeFacts(predicate.type) & 65536 /* EQUndefined */)) { + return getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); + } if (containsMatchingReference(reference, predicateArgument)) { return declaredType; } } } - else { - var invokedExpression = ts.skipParentheses(callExpression.expression); - if (ts.isAccessExpression(invokedExpression) && predicate.type) { - var possibleReference = ts.skipParentheses(invokedExpression.expression); - if (isMatchingReference(reference, possibleReference)) { - return getNarrowedType(type, predicate.type, assumeTrue, isTypeSubtypeOf); - } - if (containsMatchingReference(reference, possibleReference)) { - return declaredType; - } - } - } return type; } // Narrow the given type based on the given expression having the assumed boolean value. The returned type // will be a subtype or the same type as the argument. function narrowType(type, expr, assumeTrue) { // for `a?.b`, we emulate a synthetic `a !== null && a !== undefined` condition for `a` - if (ts.isOptionalChainRoot(expr.parent) || + if (ts.isExpressionOfOptionalChainRoot(expr) || ts.isBinaryExpression(expr.parent) && expr.parent.operatorToken.kind === 60 /* QuestionQuestionToken */ && expr.parent.left === expr) { return narrowTypeByOptionality(type, expr, assumeTrue); } @@ -51234,7 +51488,24 @@ var ts; } } else if (!assumeInitialized && !(getFalsyFlags(type) & 32768 /* Undefined */) && getFalsyFlags(flowType) & 32768 /* Undefined */) { - error(node, ts.Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol)); + var diag = error(node, ts.Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol)); + // See GH:32846 - if the user is using a variable whose type is () => T1 | ... | undefined + // they may have meant to specify the type as (() => T1 | ...) | undefined + // This is assumed if: the type is a FunctionType, the return type is a Union, the last constituent of + // the union is `undefined` + if (type.symbol && type.symbol.declarations.length === 1 && ts.isFunctionTypeNode(type.symbol.declarations[0])) { + var funcTypeNode = type.symbol.declarations[0]; + var returnType = getReturnTypeFromAnnotation(funcTypeNode); + if (returnType && returnType.flags & 1048576 /* Union */) { + var unionTypes_3 = funcTypeNode.type.types; + if (unionTypes_3 && unionTypes_3[unionTypes_3.length - 1].kind === 145 /* UndefinedKeyword */) { + var parenedFuncType = ts.getMutableClone(funcTypeNode); + // Highlight to the end of the second to last constituent of the union + parenedFuncType.end = unionTypes_3[unionTypes_3.length - 2].end; + ts.addRelatedInfo(diag, ts.createDiagnosticForNode(parenedFuncType, ts.Diagnostics.Did_you_mean_to_parenthesize_this_function_type)); + } + } + } // Return the declared type to reduce follow-on errors return type; } @@ -52014,18 +52285,22 @@ var ts; return undefined; } // In a typed function call, an argument or substitution expression is contextually typed by the type of the corresponding parameter. - function getContextualTypeForArgument(callTarget, arg) { + function getContextualTypeForArgument(callTarget, arg, contextFlags) { var args = getEffectiveCallArguments(callTarget); var argIndex = args.indexOf(arg); // -1 for e.g. the expression of a CallExpression, or the tag of a TaggedTemplateExpression - return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex); + return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex, contextFlags); } - function getContextualTypeForArgumentAtIndex(callTarget, argIndex) { + function getContextualTypeForArgumentAtIndex(callTarget, argIndex, contextFlags) { // If we're already in the process of resolving the given signature, don't resolve again as // that could cause infinite recursion. Instead, return anySignature. var signature = getNodeLinks(callTarget).resolvedSignature === resolvingSignature ? resolvingSignature : getResolvedSignature(callTarget); if (ts.isJsxOpeningLikeElement(callTarget) && argIndex === 0) { return getEffectiveFirstArgumentForJsxSignature(signature, callTarget); } + if (contextFlags && contextFlags & 4 /* Completion */ && signature.target) { + var baseSignature = getBaseSignature(signature.target); + return intersectTypes(getTypeAtPosition(signature, argIndex), getTypeAtPosition(baseSignature, argIndex)); + } return getTypeAtPosition(signature, argIndex); } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { @@ -52384,7 +52659,7 @@ var ts; } /* falls through */ case 196 /* NewExpression */: - return getContextualTypeForArgument(parent, node); + return getContextualTypeForArgument(parent, node, contextFlags); case 198 /* TypeAssertionExpression */: case 216 /* AsExpression */: return ts.isConstTypeReference(parent.type) ? undefined : getTypeFromTypeNode(parent.type); @@ -52599,8 +52874,8 @@ var ts; } var signatureList; var types = type.types; - for (var _i = 0, types_15 = types; _i < types_15.length; _i++) { - var current = types_15[_i]; + for (var _i = 0, types_16 = types; _i < types_16.length; _i++) { + var current = types_16[_i]; var signature = getContextualCallSignature(current, node); if (signature) { if (!signatureList) { @@ -52701,7 +52976,7 @@ var ts; var literalType = type.literalType; if (!literalType) { literalType = type.literalType = cloneTypeReference(type); - literalType.objectFlags |= 65536 /* ArrayLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */; + literalType.objectFlags |= 65536 /* ArrayLiteral */ | 1048576 /* ContainsObjectOrArrayLiteral */; } return literalType; } @@ -52838,7 +53113,7 @@ var ts; checkTypeAssignableTo(type, getTypeFromTypeNode(enumTag.typeExpression), memberDecl); } } - objectFlags |= ts.getObjectFlags(type) & 1835008 /* PropagatingFlags */; + objectFlags |= ts.getObjectFlags(type) & 3670016 /* PropagatingFlags */; var nameType = computedNameType && isTypeUsableAsPropertyName(computedNameType) ? computedNameType : undefined; var prop = nameType ? createSymbol(4 /* Property */ | member.flags, getPropertyNameFromType(nameType), checkFlags | 4096 /* Late */) : @@ -52947,7 +53222,7 @@ var ts; var stringIndexInfo = hasComputedStringProperty ? getObjectLiteralIndexInfo(node, offset, propertiesArray, 0 /* String */) : undefined; var numberIndexInfo = hasComputedNumberProperty ? getObjectLiteralIndexInfo(node, offset, propertiesArray, 1 /* Number */) : undefined; var result = createAnonymousType(node.symbol, propertiesTable, ts.emptyArray, ts.emptyArray, stringIndexInfo, numberIndexInfo); - result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */; + result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 1048576 /* ContainsObjectOrArrayLiteral */; if (isJSObjectLiteral) { result.objectFlags |= 16384 /* JSLiteral */; } @@ -53045,7 +53320,7 @@ var ts; var member = attributeDecl.symbol; if (ts.isJsxAttribute(attributeDecl)) { var exprType = checkJsxAttribute(attributeDecl, checkMode); - objectFlags |= ts.getObjectFlags(exprType) & 1835008 /* PropagatingFlags */; + objectFlags |= ts.getObjectFlags(exprType) & 3670016 /* PropagatingFlags */; var attributeSymbol = createSymbol(4 /* Property */ | 33554432 /* Transient */ | member.flags, member.escapedName); attributeSymbol.declarations = member.declarations; attributeSymbol.parent = member.parent; @@ -53125,7 +53400,7 @@ var ts; function createJsxAttributesType() { objectFlags |= freshObjectLiteralFlag; var result = createAnonymousType(attributes.symbol, attributesTable, ts.emptyArray, ts.emptyArray, /*stringIndexInfo*/ undefined, /*numberIndexInfo*/ undefined); - result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */; + result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 1048576 /* ContainsObjectOrArrayLiteral */; return result; } } @@ -53597,8 +53872,8 @@ var ts; function symbolHasNonMethodDeclaration(symbol) { return !!forEachProperty(symbol, function (prop) { return !(prop.flags & 8192 /* Method */); }); } - function checkNonNullExpression(node, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic) { - return checkNonNullType(checkExpression(node), node, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic); + function checkNonNullExpression(node) { + return checkNonNullType(checkExpression(node), node); } function isNullableType(type) { return !!((strictNullChecks ? getFalsyFlags(type) : type.flags) & 98304 /* Nullable */); @@ -53606,22 +53881,34 @@ var ts; function getNonNullableTypeIfNeeded(type) { return isNullableType(type) ? getNonNullableType(type) : type; } - function checkNonNullType(type, node, nullDiagnostic, undefinedDiagnostic, nullOrUndefinedDiagnostic) { + function reportObjectPossiblyNullOrUndefinedError(node, flags) { + error(node, flags & 32768 /* Undefined */ ? flags & 65536 /* Null */ ? + ts.Diagnostics.Object_is_possibly_null_or_undefined : + ts.Diagnostics.Object_is_possibly_undefined : + ts.Diagnostics.Object_is_possibly_null); + } + function reportCannotInvokePossiblyNullOrUndefinedError(node, flags) { + error(node, flags & 32768 /* Undefined */ ? flags & 65536 /* Null */ ? + ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null_or_undefined : + ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_undefined : + ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null); + } + function checkNonNullTypeWithReporter(type, node, reportError) { if (strictNullChecks && type.flags & 2 /* Unknown */) { error(node, ts.Diagnostics.Object_is_of_type_unknown); return errorType; } var kind = (strictNullChecks ? getFalsyFlags(type) : type.flags) & 98304 /* Nullable */; if (kind) { - error(node, kind & 32768 /* Undefined */ ? kind & 65536 /* Null */ ? - (nullOrUndefinedDiagnostic || ts.Diagnostics.Object_is_possibly_null_or_undefined) : - (undefinedDiagnostic || ts.Diagnostics.Object_is_possibly_undefined) : - (nullDiagnostic || ts.Diagnostics.Object_is_possibly_null)); + reportError(node, kind); var t = getNonNullableType(type); return t.flags & (98304 /* Nullable */ | 131072 /* Never */) ? errorType : t; } return type; } + function checkNonNullType(type, node) { + return checkNonNullTypeWithReporter(type, node, reportObjectPossiblyNullOrUndefinedError); + } function checkNonNullNonVoidType(type, node) { var nonNullType = checkNonNullType(type, node); if (nonNullType !== errorType && nonNullType.flags & 16384 /* Void */) { @@ -53630,10 +53917,16 @@ var ts; return nonNullType; } function checkPropertyAccessExpression(node) { - return checkPropertyAccessExpressionOrQualifiedName(node, node.expression, node.name); + return node.flags & 32 /* OptionalChain */ ? checkPropertyAccessChain(node) : + checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name); + } + function checkPropertyAccessChain(node) { + var leftType = checkExpression(node.expression); + var nonOptionalType = getOptionalExpressionType(leftType, node.expression); + return propagateOptionalTypeMarker(checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullType(nonOptionalType, node.expression), node.name), node, nonOptionalType !== leftType); } function checkQualifiedName(node) { - return checkPropertyAccessExpressionOrQualifiedName(node, node.left, node.right); + return checkPropertyAccessExpressionOrQualifiedName(node, node.left, checkNonNullExpression(node.left), node.right); } function isMethodAccessForCall(node) { while (node.parent.kind === 199 /* ParenthesizedExpression */) { @@ -53641,8 +53934,7 @@ var ts; } return ts.isCallOrNewExpression(node.parent) && node.parent.expression === node; } - function checkPropertyAccessExpressionOrQualifiedName(node, left, right) { - var _a = checkOptionalExpression(node, left), isOptional = _a.isOptional, leftType = _a.type; + function checkPropertyAccessExpressionOrQualifiedName(node, left, leftType, right) { var parentSymbol = getNodeLinks(left).resolvedSymbol; var assignmentKind = ts.getAssignmentTargetKind(node); var apparentType = getApparentType(assignmentKind !== 0 /* None */ || isMethodAccessForCall(node) ? getWidenedType(leftType) : leftType); @@ -53695,7 +53987,7 @@ var ts; } propType = getConstraintForLocation(getTypeOfSymbol(prop), node); } - return propagateOptionalTypeMarker(getFlowTypeOfAccessExpression(node, prop, propType, right), isOptional); + return getFlowTypeOfAccessExpression(node, prop, propType, right); } function getFlowTypeOfAccessExpression(node, prop, propType, errorNode) { // Only compute control flow type if this is a property access expression that isn't an @@ -54017,7 +54309,15 @@ var ts; return false; } function checkIndexedAccess(node) { - var _a = checkOptionalExpression(node, node.expression), isOptional = _a.isOptional, exprType = _a.type; + return node.flags & 32 /* OptionalChain */ ? checkElementAccessChain(node) : + checkElementAccessExpression(node, checkNonNullExpression(node.expression)); + } + function checkElementAccessChain(node) { + var exprType = checkExpression(node.expression); + var nonOptionalType = getOptionalExpressionType(exprType, node.expression); + return propagateOptionalTypeMarker(checkElementAccessExpression(node, checkNonNullType(nonOptionalType, node.expression)), node, nonOptionalType !== exprType); + } + function checkElementAccessExpression(node, exprType) { var objectType = ts.getAssignmentTargetKind(node) !== 0 /* None */ || isMethodAccessForCall(node) ? getWidenedType(exprType) : exprType; var indexExpression = node.argumentExpression; var indexType = checkExpression(indexExpression); @@ -54033,7 +54333,7 @@ var ts; 2 /* Writing */ | (isGenericObjectType(objectType) && !isThisTypeParameter(objectType) ? 1 /* NoIndexSignatures */ : 0) : 0 /* None */; var indexedAccessType = getIndexedAccessTypeOrUndefined(objectType, effectiveIndexType, node, accessFlags) || errorType; - return propagateOptionalTypeMarker(checkIndexedAccessIndexType(getFlowTypeOfAccessExpression(node, indexedAccessType.symbol, indexedAccessType, indexExpression), node), isOptional); + return checkIndexedAccessIndexType(getFlowTypeOfAccessExpression(node, indexedAccessType.symbol, indexedAccessType, indexExpression), node); } function checkThatExpressionIsProperSymbolReference(expression, expressionType, reportError) { if (expressionType === errorType) { @@ -54104,7 +54404,7 @@ var ts; // interface B extends A { (x: 'foo'): string } // const b: B; // b('foo') // <- here overloads should be processed as [(x:'foo'): string, (x: string): void] - function reorderCandidates(signatures, result, isOptionalCall) { + function reorderCandidates(signatures, result, callChainFlags) { var lastParent; var lastSymbol; var cutoffIndex = 0; @@ -54134,7 +54434,7 @@ var ts; lastSymbol = symbol; // specialized signatures always need to be placed before non-specialized signatures regardless // of the cutoff position; see GH#1133 - if (signature.hasLiteralTypes) { + if (signatureHasLiteralTypes(signature)) { specializedIndex++; spliceIndex = specializedIndex; // The cutoff index always needs to be greater than or equal to the specialized signature index @@ -54145,7 +54445,7 @@ var ts; else { spliceIndex = index; } - result.splice(spliceIndex, 0, isOptionalCall ? createOptionalCallSignature(signature) : signature); + result.splice(spliceIndex, 0, callChainFlags ? getOptionalCallSignature(signature, callChainFlags) : signature); } } function isSpreadArgument(arg) { @@ -54229,7 +54529,7 @@ var ts; // the declared number of type parameters, the call has an incorrect arity. var numTypeParameters = ts.length(signature.typeParameters); var minTypeArgumentCount = getMinTypeArgumentCount(signature.typeParameters); - return !typeArguments || + return !ts.some(typeArguments) || (typeArguments.length >= minTypeArgumentCount && typeArguments.length <= numTypeParameters); } // If type has a single call signature and no other members, return that signature. Otherwise, return undefined. @@ -54440,7 +54740,19 @@ var ts; // If the signature's 'this' type is voidType, then the check is skipped -- anything is compatible. // If the expression is a new expression, then the check is skipped. var thisArgumentNode = getThisArgumentOfCall(node); - var thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType; + var thisArgumentType = void 0; + if (thisArgumentNode) { + thisArgumentType = checkExpression(thisArgumentNode); + if (ts.isOptionalChainRoot(thisArgumentNode.parent)) { + thisArgumentType = getNonNullableType(thisArgumentType); + } + else if (ts.isOptionalChain(thisArgumentNode.parent)) { + thisArgumentType = removeOptionalTypeMarker(thisArgumentType); + } + } + else { + thisArgumentType = voidType; + } var errorNode = reportErrors ? (thisArgumentNode || node) : undefined; var headMessage_1 = ts.Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1; if (!checkTypeRelatedTo(thisArgumentType, thisType, relation, errorNode, headMessage_1, containingMessageChain, errorOutputContainer)) { @@ -54667,7 +54979,7 @@ var ts; if (closestSignature && getMinArgumentCount(closestSignature) > argCount && closestSignature.declaration) { var paramDecl = closestSignature.declaration.parameters[closestSignature.thisParameter ? argCount + 1 : argCount]; if (paramDecl) { - related = ts.createDiagnosticForNode(paramDecl, ts.isBindingPattern(paramDecl.name) ? ts.Diagnostics.An_argument_matching_this_binding_pattern_was_not_provided : ts.Diagnostics.An_argument_for_0_was_not_provided, !paramDecl.name ? argCount : !ts.isBindingPattern(paramDecl.name) ? ts.idText(getFirstIdentifier(paramDecl.name)) : undefined); + related = ts.createDiagnosticForNode(paramDecl, ts.isBindingPattern(paramDecl.name) ? ts.Diagnostics.An_argument_matching_this_binding_pattern_was_not_provided : ts.Diagnostics.An_argument_for_0_was_not_provided, !paramDecl.name ? argCount : !ts.isBindingPattern(paramDecl.name) ? ts.idText(ts.getFirstIdentifier(paramDecl.name)) : undefined); } } if (min < argCount && argCount < max) { @@ -54723,7 +55035,7 @@ var ts; } return ts.createDiagnosticForNodeArray(ts.getSourceFileOfNode(node), typeArguments, ts.Diagnostics.Expected_0_type_arguments_but_got_1, belowArgCount === -Infinity ? aboveArgCount : belowArgCount, argCount); } - function resolveCall(node, signatures, candidatesOutArray, checkMode, isOptionalCall, fallbackError) { + function resolveCall(node, signatures, candidatesOutArray, checkMode, callChainFlags, fallbackError) { var isTaggedTemplate = node.kind === 197 /* TaggedTemplateExpression */; var isDecorator = node.kind === 156 /* Decorator */; var isJsxOpeningOrSelfClosingElement = ts.isJsxOpeningLikeElement(node); @@ -54738,7 +55050,7 @@ var ts; } var candidates = candidatesOutArray || []; // reorderCandidates fills up the candidates array directly - reorderCandidates(signatures, candidates, isOptionalCall); + reorderCandidates(signatures, candidates, callChainFlags); if (!candidates.length) { if (reportErrors) { diagnostics.add(getDiagnosticForCallNode(node, ts.Diagnostics.Call_target_does_not_contain_any_signatures)); @@ -54900,7 +55212,7 @@ var ts; candidateForTypeArgumentError = undefined; if (isSingleNonGenericCandidate) { var candidate = candidates[0]; - if (typeArguments || !hasCorrectArity(node, args, candidate, signatureHelpTrailingComma)) { + if (ts.some(typeArguments) || !hasCorrectArity(node, args, candidate, signatureHelpTrailingComma)) { return undefined; } if (getSignatureApplicabilityError(node, args, candidate, relation, 0 /* Normal */, /*reportErrors*/ false, /*containingMessageChain*/ undefined)) { @@ -54918,7 +55230,7 @@ var ts; var inferenceContext = void 0; if (candidate.typeParameters) { var typeArgumentTypes = void 0; - if (typeArguments) { + if (ts.some(typeArguments)) { typeArgumentTypes = checkTypeArguments(candidate, typeArguments, /*reportErrors*/ false); if (!typeArgumentTypes) { candidateForTypeArgumentError = candidate; @@ -54993,34 +55305,34 @@ var ts; var _a = ts.minAndMax(candidates, getNumNonRestParameters), minArgumentCount = _a.min, maxNonRestParam = _a.max; var parameters = []; var _loop_15 = function (i) { - var symbols = ts.mapDefined(candidates, function (_a) { - var parameters = _a.parameters, hasRestParameter = _a.hasRestParameter; - return hasRestParameter ? - i < parameters.length - 1 ? parameters[i] : ts.last(parameters) : - i < parameters.length ? parameters[i] : undefined; - }); + var symbols = ts.mapDefined(candidates, function (s) { return signatureHasRestParameter(s) ? + i < s.parameters.length - 1 ? s.parameters[i] : ts.last(s.parameters) : + i < s.parameters.length ? s.parameters[i] : undefined; }); ts.Debug.assert(symbols.length !== 0); parameters.push(createCombinedSymbolFromTypes(symbols, ts.mapDefined(candidates, function (candidate) { return tryGetTypeAtPosition(candidate, i); }))); }; for (var i = 0; i < maxNonRestParam; i++) { _loop_15(i); } - var restParameterSymbols = ts.mapDefined(candidates, function (c) { return c.hasRestParameter ? ts.last(c.parameters) : undefined; }); - var hasRestParameter = restParameterSymbols.length !== 0; - if (hasRestParameter) { + var restParameterSymbols = ts.mapDefined(candidates, function (c) { return signatureHasRestParameter(c) ? ts.last(c.parameters) : undefined; }); + var flags = 0 /* None */; + if (restParameterSymbols.length !== 0) { var type = createArrayType(getUnionType(ts.mapDefined(candidates, tryGetRestTypeOfSignature), 2 /* Subtype */)); parameters.push(createCombinedSymbolForOverloadFailure(restParameterSymbols, type)); + flags |= 1 /* HasRestParameter */; + } + if (candidates.some(signatureHasLiteralTypes)) { + flags |= 2 /* HasLiteralTypes */; } return createSignature(candidates[0].declaration, /*typeParameters*/ undefined, // Before calling this we tested for `!candidates.some(c => !!c.typeParameters)`. thisParameter, parameters, /*resolvedReturnType*/ getIntersectionType(candidates.map(getReturnTypeOfSignature)), - /*typePredicate*/ undefined, minArgumentCount, hasRestParameter, - /*hasLiteralTypes*/ candidates.some(function (c) { return c.hasLiteralTypes; })); + /*typePredicate*/ undefined, minArgumentCount, flags); } function getNumNonRestParameters(signature) { var numParams = signature.parameters.length; - return signature.hasRestParameter ? numParams - 1 : numParams; + return signatureHasRestParameter(signature) ? numParams - 1 : numParams; } function createCombinedSymbolFromTypes(sources, types) { return createCombinedSymbolForOverloadFailure(sources, getUnionType(types, 2 /* Subtype */)); @@ -55096,12 +55408,24 @@ var ts; var baseTypeNode = ts.getEffectiveBaseTypeNode(ts.getContainingClass(node)); if (baseTypeNode) { var baseConstructors = getInstantiatedConstructorsForTypeArguments(superType, baseTypeNode.typeArguments, baseTypeNode); - return resolveCall(node, baseConstructors, candidatesOutArray, checkMode, /*isOptional*/ false); + return resolveCall(node, baseConstructors, candidatesOutArray, checkMode, 0 /* None */); } } return resolveUntypedCall(node); } - var _b = checkOptionalExpression(node, node.expression, ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null, ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_undefined, ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null_or_undefined), isOptional = _b.isOptional, funcType = _b.type; + var callChainFlags; + var funcType = checkExpression(node.expression); + if (ts.isCallChain(node)) { + var nonOptionalType = getOptionalExpressionType(funcType, node.expression); + callChainFlags = nonOptionalType === funcType ? 0 /* None */ : + ts.isOutermostOptionalChain(node) ? 8 /* IsOuterCallChain */ : + 4 /* IsInnerCallChain */; + funcType = nonOptionalType; + } + else { + callChainFlags = 0 /* None */; + } + funcType = checkNonNullTypeWithReporter(funcType, node.expression, reportCannotInvokePossiblyNullOrUndefinedError); if (funcType === silentNeverType) { return silentNeverSignature; } @@ -55167,7 +55491,7 @@ var ts; error(node, ts.Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType)); return resolveErrorCall(node); } - return resolveCall(node, callSignatures, candidatesOutArray, checkMode, isOptional); + return resolveCall(node, callSignatures, candidatesOutArray, checkMode, callChainFlags); } function isGenericFunctionReturningFunction(signature) { return !!(signature.typeParameters && isFunctionType(getReturnTypeOfSignature(signature))); @@ -55230,7 +55554,7 @@ var ts; error(node, ts.Diagnostics.Cannot_create_an_instance_of_an_abstract_class); return resolveErrorCall(node); } - return resolveCall(node, constructSignatures, candidatesOutArray, checkMode, /*isOptional*/ false); + return resolveCall(node, constructSignatures, candidatesOutArray, checkMode, 0 /* None */); } // If expressionType's apparent type is an object type with no construct signatures but // one or more call signatures, the expression is processed as a function call. A compile-time @@ -55238,7 +55562,7 @@ var ts; // operation is Any. It is an error to have a Void this type. var callSignatures = getSignaturesOfType(expressionType, 0 /* Call */); if (callSignatures.length) { - var signature = resolveCall(node, callSignatures, candidatesOutArray, checkMode, /*isOptional*/ false); + var signature = resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */); if (!noImplicitAny) { if (signature.declaration && !isJSConstructor(signature.declaration) && getReturnTypeOfSignature(signature) !== voidType) { error(node, ts.Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword); @@ -55323,8 +55647,8 @@ var ts; if (apparentType.flags & 1048576 /* Union */) { var types = apparentType.types; var hasSignatures = false; - for (var _i = 0, types_16 = types; _i < types_16.length; _i++) { - var constituent = types_16[_i]; + for (var _i = 0, types_17 = types; _i < types_17.length; _i++) { + var constituent = types_17[_i]; var signatures = getSignaturesOfType(constituent, kind); if (signatures.length !== 0) { hasSignatures = true; @@ -55415,7 +55739,7 @@ var ts; invocationError(node.tag, apparentType, 0 /* Call */); return resolveErrorCall(node); } - return resolveCall(node, callSignatures, candidatesOutArray, checkMode, /*isOptional*/ false); + return resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */); } /** * Gets the localized diagnostic head message to use for errors when resolving a decorator as a call expression. @@ -55468,7 +55792,7 @@ var ts; invocationErrorRecovery(apparentType, 0 /* Call */, diag); return resolveErrorCall(node); } - return resolveCall(node, callSignatures, candidatesOutArray, checkMode, /*isOptional*/ false, headMessage); + return resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */, headMessage); } function createSignatureForJSXIntrinsic(node, result) { var namespace = getJsxNamespaceAt(node); @@ -55483,9 +55807,7 @@ var ts; return createSignature(declaration, /*typeParameters*/ undefined, /*thisParameter*/ undefined, [parameterSymbol], typeSymbol ? getDeclaredTypeOfSymbol(typeSymbol) : errorType, - /*returnTypePredicate*/ undefined, 1, - /*hasRestparameter*/ false, - /*hasLiteralTypes*/ false); + /*returnTypePredicate*/ undefined, 1, 0 /* None */); } function resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode) { if (isJsxIntrinsicIdentifier(node.tagName)) { @@ -55508,7 +55830,7 @@ var ts; error(node.tagName, ts.Diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, ts.getTextOfNode(node.tagName)); return resolveErrorCall(node); } - return resolveCall(node, signatures, candidatesOutArray, checkMode, /*isOptional*/ false); + return resolveCall(node, signatures, candidatesOutArray, checkMode, 0 /* None */); } /** * Sometimes, we have a decorator that could accept zero arguments, @@ -55518,7 +55840,7 @@ var ts; function isPotentiallyUncalledDecorator(decorator, signatures) { return signatures.length && ts.every(signatures, function (signature) { return signature.minArgumentCount === 0 && - !signature.hasRestParameter && + !signatureHasRestParameter(signature) && signature.parameters.length < getDecoratorArgumentCount(decorator, signature); }); } @@ -55589,7 +55911,7 @@ var ts; return false; } function mergeJSSymbols(target, source) { - if (source && (ts.hasEntries(source.exports) || ts.hasEntries(source.members))) { + if (source) { var links = getSymbolLinks(source); if (!links.inferredClassSymbol || !links.inferredClassSymbol.has("" + getSymbolId(target))) { var inferred = isTransientSymbol(target) ? target : cloneSymbol(target); @@ -55899,7 +56221,7 @@ var ts; return type; } function getParameterNameAtPosition(signature, pos) { - var paramCount = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + var paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); if (pos < paramCount) { return signature.parameters[pos].escapedName; } @@ -55916,11 +56238,11 @@ var ts; return tryGetTypeAtPosition(signature, pos) || anyType; } function tryGetTypeAtPosition(signature, pos) { - var paramCount = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + var paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); if (pos < paramCount) { return getTypeOfParameter(signature.parameters[pos]); } - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { // We want to return the value undefined for an out of bounds parameter position, // so we need to check bounds here before calling getIndexedAccessType (which // otherwise would return the type 'undefined'). @@ -55955,7 +56277,7 @@ var ts; } function getParameterCount(signature) { var length = signature.parameters.length; - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var restType = getTypeOfSymbol(signature.parameters[length - 1]); if (isTupleType(restType)) { return length + getTypeArguments(restType).length - 1; @@ -55964,7 +56286,7 @@ var ts; return length; } function getMinArgumentCount(signature) { - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); if (isTupleType(restType)) { var minLength = restType.target.minLength; @@ -55976,14 +56298,14 @@ var ts; return signature.minArgumentCount; } function hasEffectiveRestParameter(signature) { - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); return !isTupleType(restType) || restType.target.hasRestElement; } return false; } function getEffectiveRestType(signature) { - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { var restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); return isTupleType(restType) ? getRestArrayTypeOfTupleType(restType) : restType; } @@ -56000,7 +56322,7 @@ var ts; return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : fallbackType; } function inferFromAnnotatedParameters(signature, context, inferenceContext) { - var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + var len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); for (var i = 0; i < len; i++) { var declaration = signature.parameters[i].valueDeclaration; if (declaration.type) { @@ -56033,7 +56355,7 @@ var ts; assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter)); } } - var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + var len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); for (var i = 0; i < len; i++) { var parameter = signature.parameters[i]; if (!ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) { @@ -56041,7 +56363,7 @@ var ts; assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType); } } - if (signature.hasRestParameter) { + if (signatureHasRestParameter(signature)) { // parameter might be a transient symbol generated by use of `arguments` in the function body. var parameter = ts.last(signature.parameters); if (isTransientSymbol(parameter) || !ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) { @@ -56318,8 +56640,8 @@ var ts; var witnesses = getSwitchClauseTypeOfWitnesses(node); // notEqualFacts states that the type of the switched value is not equal to every type in the switch. var notEqualFacts_1 = getFactsFromTypeofSwitch(0, 0, witnesses, /*hasDefault*/ true); - var type_4 = getBaseConstraintOfType(operandType) || operandType; - return !!(filterType(type_4, function (t) { return (getTypeFacts(t) & notEqualFacts_1) === notEqualFacts_1; }).flags & 131072 /* Never */); + var type_3 = getBaseConstraintOfType(operandType) || operandType; + return !!(filterType(type_3, function (t) { return (getTypeFacts(t) & notEqualFacts_1) === notEqualFacts_1; }).flags & 131072 /* Never */); } var type = getTypeOfExpression(node.expression); if (!isLiteralType(type)) { @@ -56446,9 +56768,9 @@ var ts; return links.contextFreeType; } var returnType = getReturnTypeFromBody(node, checkMode); - var returnOnlySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, returnType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); + var returnOnlySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, returnType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */); var returnOnlyType = createAnonymousType(node.symbol, emptySymbols, [returnOnlySignature], ts.emptyArray, undefined, undefined); - returnOnlyType.objectFlags |= 1048576 /* NonInferrableType */; + returnOnlyType.objectFlags |= 2097152 /* NonInferrableType */; return links.contextFreeType = returnOnlyType; } return anyFunctionType; @@ -56677,8 +56999,7 @@ var ts; var span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos); var diagnostic = ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.await_expression_is_only_allowed_within_an_async_function); var func = ts.getContainingFunction(node); - if (func && func.kind !== 161 /* Constructor */) { - ts.Debug.assert((ts.getFunctionFlags(func) & 2 /* Async */) === 0, "Enclosing function should never be an async function."); + if (func && func.kind !== 161 /* Constructor */ && (ts.getFunctionFlags(func) & 2 /* Async */) === 0) { var relatedInfo = ts.createDiagnosticForNode(func, ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async); ts.addRelatedInfo(diagnostic, relatedInfo); } @@ -56779,8 +57100,8 @@ var ts; } if (type.flags & 3145728 /* UnionOrIntersection */) { var types = type.types; - for (var _i = 0, types_17 = types; _i < types_17.length; _i++) { - var t = types_17[_i]; + for (var _i = 0, types_18 = types; _i < types_18.length; _i++) { + var t = types_18[_i]; if (maybeTypeOfKind(t, kind)) { return true; } @@ -57414,25 +57735,10 @@ var ts; } return [effectiveLeft, effectiveRight]; } - function isYieldExpressionInClass(node) { - var current = node; - var parent = node.parent; - while (parent) { - if (ts.isFunctionLike(parent) && current === parent.body) { - return false; - } - else if (ts.isClassLike(current)) { - return true; - } - current = parent; - parent = parent.parent; - } - return false; - } function checkYieldExpression(node) { // Grammar checking if (produceDiagnostics) { - if (!(node.flags & 8192 /* YieldContext */) || isYieldExpressionInClass(node)) { + if (!(node.flags & 8192 /* YieldContext */)) { grammarErrorOnFirstToken(node, ts.Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body); } if (isInParameterInitializerBeforeContainingFunction(node)) { @@ -57768,6 +58074,18 @@ var ts; } } } + function getReturnTypeOfSingleNonGenericCallSignature(funcType) { + var signature = getSingleCallSignature(funcType); + if (signature && !signature.typeParameters) { + return getReturnTypeOfSignature(signature); + } + } + function getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) { + var funcType = checkExpression(expr.expression); + var nonOptionalType = getOptionalExpressionType(funcType, expr.expression); + var returnType = getReturnTypeOfSingleNonGenericCallSignature(funcType); + return returnType && propagateOptionalTypeMarker(returnType, expr, nonOptionalType !== funcType); + } /** * Returns the type of an expression. Unlike checkExpression, this function is simply concerned * with computing the type and may not fully check all contained sub-expressions for errors. @@ -57779,10 +58097,10 @@ var ts; // Optimize for the common case of a call to a function with a single non-generic call // signature where we can just fetch the return type without checking the arguments. if (ts.isCallExpression(expr) && expr.expression.kind !== 101 /* SuperKeyword */ && !ts.isRequireCall(expr, /*checkArgumentIsStringLiteralLike*/ true) && !isSymbolOrSymbolForCall(expr)) { - var _a = checkOptionalExpression(expr, expr.expression), isOptional = _a.isOptional, funcType = _a.type; - var signature = getSingleCallSignature(funcType); - if (signature && !signature.typeParameters) { - return propagateOptionalTypeMarker(getReturnTypeOfSignature(signature), isOptional); + var type = ts.isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : + getReturnTypeOfSingleNonGenericCallSignature(checkNonNullExpression(expr.expression)); + if (type) { + return type; } } else if (ts.isAssertionExpression(expr) && !ts.isConstTypeReference(expr.type)) { @@ -57832,7 +58150,7 @@ var ts; (node.parent.kind === 194 /* ElementAccessExpression */ && node.parent.expression === node) || ((node.kind === 75 /* Identifier */ || node.kind === 152 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || (node.parent.kind === 171 /* TypeQuery */ && node.parent.exprName === node)) || - (node.parent.kind === 261 /* ExportSpecifier */ && (compilerOptions.preserveConstEnums || node.flags & 8388608 /* Ambient */)); // We allow reexporting const enums + (node.parent.kind === 261 /* ExportSpecifier */); // We allow reexporting const enums if (!ok) { error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query); } @@ -58036,7 +58354,7 @@ var ts; } else { if (typePredicate.parameterIndex >= 0) { - if (signature.hasRestParameter && typePredicate.parameterIndex === signature.parameters.length - 1) { + if (signatureHasRestParameter(signature) && typePredicate.parameterIndex === signature.parameters.length - 1) { error(parameterName, ts.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); } else { @@ -59211,7 +59529,7 @@ var ts; return; } // Verify there is no local declaration that could collide with the promise constructor. - var rootName = promiseConstructorName && getFirstIdentifier(promiseConstructorName); + var rootName = promiseConstructorName && ts.getFirstIdentifier(promiseConstructorName); var collidingSymbol = getSymbol(node.locals, rootName.escapedText, 111551 /* Value */); if (collidingSymbol) { error(collidingSymbol.valueDeclaration, ts.Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, ts.idText(rootName), ts.entityNameToString(promiseConstructorName)); @@ -59268,7 +59586,7 @@ var ts; function markEntityNameOrEntityExpressionAsReference(typeName) { if (!typeName) return; - var rootName = getFirstIdentifier(typeName); + var rootName = ts.getFirstIdentifier(typeName); var meaning = (typeName.kind === 75 /* Identifier */ ? 788968 /* Type */ : 1920 /* Namespace */) | 2097152 /* Alias */; var rootSymbol = resolveName(rootName, rootName.escapedText, meaning, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isRefernce*/ true); if (rootSymbol @@ -59308,8 +59626,8 @@ var ts; } function getEntityNameForDecoratorMetadataFromTypeList(types) { var commonEntityName; - for (var _i = 0, types_18 = types; _i < types_18.length; _i++) { - var typeNode = types_18[_i]; + for (var _i = 0, types_19 = types; _i < types_19.length; _i++) { + var typeNode = types_19[_i]; while (typeNode.kind === 181 /* ParenthesizedType */) { typeNode = typeNode.type; // Skip parens if need be } @@ -61084,10 +61402,7 @@ var ts; firstDefaultClause = clause; } else { - var sourceFile = ts.getSourceFileOfNode(node); - var start = ts.skipTrivia(sourceFile.text, clause.pos); - var end = clause.statements.length > 0 ? clause.statements[0].pos : clause.end; - grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement); + grammarErrorOnNode(clause, ts.Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement); hasDuplicateDefaultClause = true; } } @@ -61108,6 +61423,9 @@ var ts; } } ts.forEach(clause.statements, checkSourceElement); + if (compilerOptions.noFallthroughCasesInSwitch && clause.fallthroughFlowNode && isReachableFlowNode(clause.fallthroughFlowNode)) { + error(clause, ts.Diagnostics.Fallthrough_case_in_switch); + } }); if (node.caseBlock.locals) { registerForUnusedIdentifiersCheck(node.caseBlock); @@ -61630,11 +61948,13 @@ var ts; // same when the derived property is from an assignment continue; } - if (basePropertyFlags !== 4 /* Property */ && derivedPropertyFlags === 4 /* Property */) { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_property; - } - else if (basePropertyFlags === 4 /* Property */ && derivedPropertyFlags !== 4 /* Property */) { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_accessor; + var overriddenInstanceProperty = basePropertyFlags !== 4 /* Property */ && derivedPropertyFlags === 4 /* Property */; + var overriddenInstanceAccessor = basePropertyFlags === 4 /* Property */ && derivedPropertyFlags !== 4 /* Property */; + if (overriddenInstanceProperty || overriddenInstanceAccessor) { + var errorMessage_1 = overriddenInstanceProperty ? + ts.Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property : + ts.Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor; + error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage_1, symbolToString(base), typeToString(baseType), typeToString(type)); } else { var uninitialized = ts.find(derived.declarations, function (d) { return d.kind === 158 /* PropertyDeclaration */ && !d.initializer; }); @@ -61650,24 +61970,22 @@ var ts; || !ts.isIdentifier(propName) || !strictNullChecks || !isPropertyInitializedInConstructor(propName, type, constructor)) { - var errorMessage_1 = ts.Diagnostics.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration; - error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage_1, symbolToString(base), typeToString(baseType)); + var errorMessage_2 = ts.Diagnostics.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration; + error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage_2, symbolToString(base), typeToString(baseType)); } } - // correct case - continue; } + // correct case + continue; } else if (isPrototypeProperty(base)) { - if (isPrototypeProperty(derived)) { - // method is overridden with method -- correct case + if (isPrototypeProperty(derived) || derived.flags & 4 /* Property */) { + // method is overridden with method or property -- correct case continue; } - else if (derived.flags & 98304 /* Accessor */) { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor; - } else { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property; + ts.Debug.assert(!!(derived.flags & 98304 /* Accessor */)); + errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor; } } else if (base.flags & 98304 /* Accessor */) { @@ -62173,22 +62491,6 @@ var ts; break; } } - function getFirstIdentifier(node) { - switch (node.kind) { - case 75 /* Identifier */: - return node; - case 152 /* QualifiedName */: - do { - node = node.left; - } while (node.kind !== 75 /* Identifier */); - return node; - case 193 /* PropertyAccessExpression */: - do { - node = node.expression; - } while (node.kind !== 75 /* Identifier */); - return node; - } - } function getFirstNonModuleExportsIdentifier(node) { switch (node.kind) { case 75 /* Identifier */: @@ -62318,7 +62620,7 @@ var ts; if (target !== unknownSymbol) { if (target.flags & 111551 /* Value */) { // Target is a value symbol, check that it is not hidden by a local declaration with the same name - var moduleName = getFirstIdentifier(node.moduleReference); + var moduleName = ts.getFirstIdentifier(node.moduleReference); if (!(resolveEntityName(moduleName, 111551 /* Value */ | 1920 /* Namespace */).flags & 1920 /* Namespace */)) { error(moduleName, ts.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, ts.declarationNameToString(moduleName)); } @@ -62385,7 +62687,7 @@ var ts; // find immediate value referenced by exported name (SymbolFlags.Alias is set so we don't chase down aliases) var symbol = resolveName(exportedName, exportedName.escapedText, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ true); - if (symbol && (symbol === undefinedSymbol || isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0])))) { + if (symbol && (symbol === undefinedSymbol || symbol === globalThisSymbol || isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0])))) { error(exportedName, ts.Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, ts.idText(exportedName)); } else { @@ -64691,10 +64993,10 @@ var ts; if (type.flags & 4 /* String */ || type.flags & 8 /* Number */) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead, ts.getTextOfNode(parameter.name), typeToString(type), typeToString(node.type ? getTypeFromTypeNode(node.type) : anyType)); } - if (type.flags & 1048576 /* Union */ && allTypesAssignableToKind(type, 128 /* StringLiteral */, /*strict*/ true)) { + if (type.flags & 1048576 /* Union */ && allTypesAssignableToKind(type, 384 /* StringOrNumberLiteral */, /*strict*/ true)) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead); } - return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number); + return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_either_string_or_number); } if (!node.type) { return grammarErrorOnNode(node, ts.Diagnostics.An_index_signature_must_have_a_type_annotation); @@ -65577,7 +65879,7 @@ var ts; } function checkGrammarImportCallExpression(node) { if (moduleKind === ts.ModuleKind.ES2015) { - return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext); + return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_commonjs_amd_system_or_umd); } if (node.typeArguments) { return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_cannot_have_type_arguments); @@ -65647,6 +65949,14 @@ var ts; case 2 /* Next */: return "nextType"; } } + function signatureHasRestParameter(s) { + return !!(s.flags & 1 /* HasRestParameter */); + } + ts.signatureHasRestParameter = signatureHasRestParameter; + function signatureHasLiteralTypes(s) { + return !!(s.flags & 2 /* HasLiteralTypes */); + } + ts.signatureHasLiteralTypes = signatureHasLiteralTypes; })(ts || (ts = {})); var ts; (function (ts) { @@ -66580,7 +66890,9 @@ var ts; } ts.createPropertyAccess = createPropertyAccess; function updatePropertyAccess(node, expression, name) { - ts.Debug.assert(!(node.flags & 32 /* OptionalChain */), "Cannot update a PropertyAccessChain using updatePropertyAccess. Use updatePropertyAccessChain instead."); + if (ts.isOptionalChain(node)) { + return updatePropertyAccessChain(node, expression, node.questionDotToken, name); + } // Because we are updating existed propertyAccess we want to inherit its emitFlags // instead of using the default from createPropertyAccess return node.expression !== expression @@ -66618,7 +66930,9 @@ var ts; } ts.createElementAccess = createElementAccess; function updateElementAccess(node, expression, argumentExpression) { - ts.Debug.assert(!(node.flags & 32 /* OptionalChain */), "Cannot update an ElementAccessChain using updateElementAccess. Use updateElementAccessChain instead."); + if (ts.isOptionalChain(node)) { + return updateElementAccessChain(node, expression, node.questionDotToken, argumentExpression); + } return node.expression !== expression || node.argumentExpression !== argumentExpression ? updateNode(createElementAccess(expression, argumentExpression), node) @@ -66652,7 +66966,9 @@ var ts; } ts.createCall = createCall; function updateCall(node, expression, typeArguments, argumentsArray) { - ts.Debug.assert(!(node.flags & 32 /* OptionalChain */), "Cannot update a CallChain using updateCall. Use updateCallChain instead."); + if (ts.isOptionalChain(node)) { + return updateCallChain(node, expression, node.questionDotToken, typeArguments, argumentsArray); + } return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray @@ -67254,7 +67570,7 @@ var ts; var node = createSynthesizedNode(231 /* ForOfStatement */); node.awaitModifier = awaitModifier; node.initializer = initializer; - node.expression = expression; + node.expression = ts.isCommaSequence(expression) ? createParen(expression) : expression; node.statement = asEmbeddedStatement(statement); return node; } @@ -69780,7 +70096,7 @@ var ts; var conditionalPrecedence = ts.getOperatorPrecedence(209 /* ConditionalExpression */, 57 /* QuestionToken */); var emittedCondition = ts.skipPartiallyEmittedExpressions(condition); var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition); - if (ts.compareValues(conditionPrecedence, conditionalPrecedence) === -1 /* LessThan */) { + if (ts.compareValues(conditionPrecedence, conditionalPrecedence) !== 1 /* GreaterThan */) { return ts.createParen(condition); } return condition; @@ -70378,6 +70694,12 @@ var ts; * Gets the property name of a BindingOrAssignmentElement */ function getPropertyNameOfBindingOrAssignmentElement(bindingElement) { + var propertyName = tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement); + ts.Debug.assert(!!propertyName || ts.isSpreadAssignment(bindingElement), "Invalid property name for binding element."); + return propertyName; + } + ts.getPropertyNameOfBindingOrAssignmentElement = getPropertyNameOfBindingOrAssignmentElement; + function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { case 190 /* BindingElement */: // `a` in `let { a: b } = ...` @@ -70413,9 +70735,8 @@ var ts; ? target.expression : target; } - ts.Debug.fail("Invalid property name for binding element."); } - ts.getPropertyNameOfBindingOrAssignmentElement = getPropertyNameOfBindingOrAssignmentElement; + ts.tryGetPropertyNameOfBindingOrAssignmentElement = tryGetPropertyNameOfBindingOrAssignmentElement; function isStringOrNumericLiteral(node) { var kind = node.kind; return kind === 10 /* StringLiteral */ @@ -72434,7 +72755,8 @@ var ts; }; if (value) { value = ts.visitNode(value, visitor, ts.isExpression); - if (ts.isIdentifier(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText)) { + if (ts.isIdentifier(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText) || + bindingOrAssignmentElementContainsNonLiteralComputedName(node)) { // If the right-hand value of the assignment is also an assignment target then // we need to cache the right-hand value. value = ensureIdentifier(flattenContext, value, /*reuseIdentifierExpressions*/ false, location); @@ -72503,6 +72825,17 @@ var ts; } return false; } + function bindingOrAssignmentElementContainsNonLiteralComputedName(element) { + var propertyName = ts.tryGetPropertyNameOfBindingOrAssignmentElement(element); + if (propertyName && ts.isComputedPropertyName(propertyName) && !ts.isLiteralExpression(propertyName.expression)) { + return true; + } + var target = ts.getTargetOfBindingOrAssignmentElement(element); + return !!target && ts.isBindingOrAssignmentPattern(target) && bindingOrAssignmentPatternContainsNonLiteralComputedName(target); + } + function bindingOrAssignmentPatternContainsNonLiteralComputedName(pattern) { + return !!ts.forEach(ts.getElementsOfBindingOrAssignmentPattern(pattern), bindingOrAssignmentElementContainsNonLiteralComputedName); + } /** * Flattens a VariableDeclaration or ParameterDeclaration to one or more variable declarations. * @@ -72533,7 +72866,8 @@ var ts; }; if (ts.isVariableDeclaration(node)) { var initializer = ts.getInitializerOfBindingOrAssignmentElement(node); - if (initializer && ts.isIdentifier(initializer) && bindingOrAssignmentElementAssignsToName(node, initializer.escapedText)) { + if (initializer && (ts.isIdentifier(initializer) && bindingOrAssignmentElementAssignsToName(node, initializer.escapedText) || + bindingOrAssignmentElementContainsNonLiteralComputedName(node))) { // If the right-hand value of the assignment is also an assignment target then // we need to cache the right-hand value. initializer = ensureIdentifier(flattenContext, initializer, /*reuseIdentifierExpressions*/ false, initializer); @@ -73832,8 +74166,8 @@ var ts; function generateClassElementDecorationExpressions(node, isStatic) { var members = getDecoratedClassElements(node, isStatic); var expressions; - for (var _i = 0, members_5 = members; _i < members_5.length; _i++) { - var member = members_5[_i]; + for (var _i = 0, members_6 = members; _i < members_6.length; _i++) { + var member = members_6[_i]; var expression = generateClassElementDecorationExpression(node, member); if (expression) { if (!expressions) { @@ -74223,8 +74557,8 @@ var ts; // Note when updating logic here also update getEntityNameForDecoratorMetadata // so that aliases can be marked as referenced var serializedUnion; - for (var _i = 0, types_19 = types; _i < types_19.length; _i++) { - var typeNode = types_19[_i]; + for (var _i = 0, types_20 = types; _i < types_20.length; _i++) { + var typeNode = types_20[_i]; while (typeNode.kind === 181 /* ParenthesizedType */) { typeNode = typeNode.type; // Skip parens if need be } @@ -74836,7 +75170,12 @@ var ts; * * @param node The module declaration node. */ - function shouldEmitModuleDeclaration(node) { + function shouldEmitModuleDeclaration(nodeIn) { + var node = ts.getParseTreeNode(nodeIn, ts.isModuleDeclaration); + if (!node) { + // If we can't find a parse tree node, assume the node is instantiated. + return true; + } return ts.isInstantiatedModule(node, !!compilerOptions.preserveConstEnums || !!compilerOptions.isolatedModules); } /** @@ -75655,7 +75994,7 @@ var ts; // Create a temporary variable to store a computed property name (if necessary). // If it's not inlineable, then we emit an expression after the class which assigns // the property name to the temporary variable. - var expr = getPropertyNameExpressionIfNeeded(node.name, !!node.initializer); + var expr = getPropertyNameExpressionIfNeeded(node.name, !!node.initializer || !!context.getCompilerOptions().useDefineForClassFields); if (expr && !ts.isSimpleInlineableExpression(expr)) { (pendingExpressions || (pendingExpressions = [])).push(expr); } @@ -77412,7 +77751,7 @@ var ts; } return ts.updateParen(node, expression); } - function visitNonOptionalPropertyAccessExpression(node, captureThisArg) { + function visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg) { if (ts.isOptionalChain(node)) { // If `node` is an optional chain, then it is the outermost chain of an optional expression. return visitOptionalExpression(node, captureThisArg); @@ -77421,27 +77760,17 @@ var ts; ts.Debug.assertNotNode(expression, ts.isSyntheticReference); var thisArg; if (captureThisArg) { - // `a.b` -> { expression: `(_a = a).b`, thisArg: `_a` } - thisArg = ts.createTempVariable(hoistVariableDeclaration); - expression = ts.createParen(ts.createAssignment(thisArg, expression)); + if (shouldCaptureInTempVariable(expression)) { + thisArg = ts.createTempVariable(hoistVariableDeclaration); + expression = ts.createAssignment(thisArg, expression); + } + else { + thisArg = expression; + } } - expression = ts.updatePropertyAccess(node, expression, ts.visitNode(node.name, visitor, ts.isIdentifier)); - return thisArg ? ts.createSyntheticReferenceExpression(expression, thisArg) : expression; - } - function visitNonOptionalElementAccessExpression(node, captureThisArg) { - if (ts.isOptionalChain(node)) { - // If `node` is an optional chain, then it is the outermost chain of an optional expression. - return visitOptionalExpression(node, captureThisArg); - } - var expression = ts.visitNode(node.expression, visitor, ts.isExpression); - ts.Debug.assertNotNode(expression, ts.isSyntheticReference); - var thisArg; - if (captureThisArg) { - // `a[b]` -> { expression: `(_a = a)[b]`, thisArg: `_a` } - thisArg = ts.createTempVariable(hoistVariableDeclaration); - expression = ts.createParen(ts.createAssignment(thisArg, expression)); - } - expression = ts.updateElementAccess(node, expression, ts.visitNode(node.argumentExpression, visitor, ts.isExpression)); + expression = node.kind === 193 /* PropertyAccessExpression */ + ? ts.updatePropertyAccess(node, expression, ts.visitNode(node.name, visitor, ts.isIdentifier)) + : ts.updateElementAccess(node, expression, ts.visitNode(node.argumentExpression, visitor, ts.isExpression)); return thisArg ? ts.createSyntheticReferenceExpression(expression, thisArg) : expression; } function visitNonOptionalCallExpression(node, captureThisArg) { @@ -77454,8 +77783,8 @@ var ts; function visitNonOptionalExpression(node, captureThisArg) { switch (node.kind) { case 199 /* ParenthesizedExpression */: return visitNonOptionalParenthesizedExpression(node, captureThisArg); - case 193 /* PropertyAccessExpression */: return visitNonOptionalPropertyAccessExpression(node, captureThisArg); - case 194 /* ElementAccessExpression */: return visitNonOptionalElementAccessExpression(node, captureThisArg); + case 193 /* PropertyAccessExpression */: + case 194 /* ElementAccessExpression */: return visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg); case 195 /* CallExpression */: return visitNonOptionalCallExpression(node, captureThisArg); default: return ts.visitNode(node, visitor, ts.isExpression); } @@ -77463,31 +77792,36 @@ var ts; function visitOptionalExpression(node, captureThisArg) { var _a = flattenChain(node), expression = _a.expression, chain = _a.chain; var left = visitNonOptionalExpression(expression, ts.isCallChain(chain[0])); - var temp = ts.createTempVariable(hoistVariableDeclaration); var leftThisArg = ts.isSyntheticReference(left) ? left.thisArg : undefined; var leftExpression = ts.isSyntheticReference(left) ? left.expression : left; - var rightExpression = temp; + var capturedLeft = leftExpression; + if (shouldCaptureInTempVariable(leftExpression)) { + capturedLeft = ts.createTempVariable(hoistVariableDeclaration); + leftExpression = ts.createAssignment(capturedLeft, leftExpression); + } + var rightExpression = capturedLeft; var thisArg; for (var i = 0; i < chain.length; i++) { var segment = chain[i]; switch (segment.kind) { case 193 /* PropertyAccessExpression */: - if (i === chain.length - 1 && captureThisArg) { - thisArg = ts.createTempVariable(hoistVariableDeclaration); - rightExpression = ts.createParen(ts.createAssignment(thisArg, rightExpression)); - } - rightExpression = ts.createPropertyAccess(rightExpression, ts.visitNode(segment.name, visitor, ts.isIdentifier)); - break; case 194 /* ElementAccessExpression */: if (i === chain.length - 1 && captureThisArg) { - thisArg = ts.createTempVariable(hoistVariableDeclaration); - rightExpression = ts.createParen(ts.createAssignment(thisArg, rightExpression)); + if (shouldCaptureInTempVariable(rightExpression)) { + thisArg = ts.createTempVariable(hoistVariableDeclaration); + rightExpression = ts.createAssignment(thisArg, rightExpression); + } + else { + thisArg = rightExpression; + } } - rightExpression = ts.createElementAccess(rightExpression, ts.visitNode(segment.argumentExpression, visitor, ts.isExpression)); + rightExpression = segment.kind === 193 /* PropertyAccessExpression */ + ? ts.createPropertyAccess(rightExpression, ts.visitNode(segment.name, visitor, ts.isIdentifier)) + : ts.createElementAccess(rightExpression, ts.visitNode(segment.argumentExpression, visitor, ts.isExpression)); break; case 195 /* CallExpression */: if (i === 0 && leftThisArg) { - rightExpression = ts.createFunctionCall(rightExpression, leftThisArg, ts.visitNodes(segment.arguments, visitor, ts.isExpression)); + rightExpression = ts.createFunctionCall(rightExpression, leftThisArg.kind === 101 /* SuperKeyword */ ? ts.createThis() : leftThisArg, ts.visitNodes(segment.arguments, visitor, ts.isExpression)); } else { rightExpression = ts.createCall(rightExpression, @@ -77497,22 +77831,27 @@ var ts; } ts.setOriginalNode(rightExpression, segment); } - var target = ts.createConditional(ts.createLogicalOr(ts.createStrictEquality(ts.createAssignment(temp, leftExpression), ts.createNull()), ts.createStrictEquality(temp, ts.createVoidZero())), ts.createVoidZero(), rightExpression); + var target = ts.createConditional(createNotNullCondition(leftExpression, capturedLeft, /*invert*/ true), ts.createVoidZero(), rightExpression); return thisArg ? ts.createSyntheticReferenceExpression(target, thisArg) : target; } - function createNotNullCondition(node) { - return ts.createBinary(ts.createBinary(node, ts.createToken(37 /* ExclamationEqualsEqualsToken */), ts.createNull()), ts.createToken(55 /* AmpersandAmpersandToken */), ts.createBinary(node, ts.createToken(37 /* ExclamationEqualsEqualsToken */), ts.createVoidZero())); + function createNotNullCondition(left, right, invert) { + return ts.createBinary(ts.createBinary(left, ts.createToken(invert ? 36 /* EqualsEqualsEqualsToken */ : 37 /* ExclamationEqualsEqualsToken */), ts.createNull()), ts.createToken(invert ? 56 /* BarBarToken */ : 55 /* AmpersandAmpersandToken */), ts.createBinary(right, ts.createToken(invert ? 36 /* EqualsEqualsEqualsToken */ : 37 /* ExclamationEqualsEqualsToken */), ts.createVoidZero())); } function transformNullishCoalescingExpression(node) { - var expressions = []; var left = ts.visitNode(node.left, visitor, ts.isExpression); - if (!ts.isIdentifier(left)) { - var temp = ts.createTempVariable(hoistVariableDeclaration); - expressions.push(ts.createAssignment(temp, left)); - left = temp; + var right = left; + if (shouldCaptureInTempVariable(left)) { + right = ts.createTempVariable(hoistVariableDeclaration); + left = ts.createAssignment(right, left); } - expressions.push(ts.createParen(ts.createConditional(createNotNullCondition(left), left, ts.visitNode(node.right, visitor, ts.isExpression)))); - return ts.inlineExpressions(expressions); + return ts.createConditional(createNotNullCondition(left, right), right, ts.visitNode(node.right, visitor, ts.isExpression)); + } + function shouldCaptureInTempVariable(expression) { + // don't capture identifiers and `this` in a temporary variable + // `super` cannot be captured as it's no real variable + return !ts.isIdentifier(expression) && + expression.kind !== 103 /* ThisKeyword */ && + expression.kind !== 101 /* SuperKeyword */; } } ts.transformESNext = transformESNext; @@ -87670,6 +88009,7 @@ var ts; var combinedStatements; if (ts.isSourceFileJS(currentSourceFile)) { combinedStatements = ts.createNodeArray(transformDeclarationsForJS(node)); + refs.forEach(referenceVisitor); emittedImports = ts.filter(combinedStatements, ts.isAnyImportSyntax); } else { @@ -89441,7 +89781,11 @@ var ts; bundleBuildInfo.js = printer.bundleFileInfo; } function emitDeclarationFileOrBundle(sourceFileOrBundle, declarationFilePath, declarationMapPath, relativeToBuildInfo) { - if (!sourceFileOrBundle || !declarationFilePath) { + if (!sourceFileOrBundle) + return; + if (!declarationFilePath) { + if (emitOnlyDtsFiles || compilerOptions.emitDeclarationOnly) + emitSkipped = true; return; } var sourceFiles = ts.isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : sourceFileOrBundle.sourceFiles; @@ -92195,8 +92539,8 @@ var ts; bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "reference" /* Reference */, data: directive.fileName }); writeLine(); } - for (var _d = 0, types_20 = types; _d < types_20.length; _d++) { - var directive = types_20[_d]; + for (var _d = 0, types_21 = types; _d < types_21.length; _d++) { + var directive = types_21[_d]; var pos = writer.getTextPos(); writeComment("/// "); if (bundleFileInfo) @@ -94071,31 +94415,39 @@ var ts; if (existingDirectories.has(directoryPath)) { return true; } - if (system.directoryExists(directoryPath)) { + if ((compilerHost.directoryExists || system.directoryExists)(directoryPath)) { existingDirectories.set(directoryPath, true); return true; } return false; } - function ensureDirectoriesExist(directoryPath) { - if (directoryPath.length > ts.getRootLength(directoryPath) && !directoryExists(directoryPath)) { - var parentDirectory = ts.getDirectoryPath(directoryPath); - ensureDirectoriesExist(parentDirectory); - if (compilerHost.createDirectory) { - compilerHost.createDirectory(directoryPath); - } - else { - system.createDirectory(directoryPath); + function writeFile(fileName, data, writeByteOrderMark, onError) { + try { + ts.performance.mark("beforeIOWrite"); + // NOTE: If patchWriteFileEnsuringDirectory has been called, + // the system.writeFile will do its own directory creation and + // the ensureDirectoriesExist call will always be redundant. + ts.writeFileEnsuringDirectories(fileName, data, writeByteOrderMark, function (path, data, writeByteOrderMark) { return writeFileWorker(path, data, writeByteOrderMark); }, function (path) { return (compilerHost.createDirectory || system.createDirectory)(path); }, function (path) { return directoryExists(path); }); + ts.performance.mark("afterIOWrite"); + ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite"); + } + catch (e) { + if (onError) { + onError(e.message); } } } var outputFingerprints; - function writeFileIfUpdated(fileName, data, writeByteOrderMark) { + function writeFileWorker(fileName, data, writeByteOrderMark) { + if (!ts.isWatchSet(options) || !system.createHash || !system.getModifiedTime) { + system.writeFile(fileName, data, writeByteOrderMark); + return; + } if (!outputFingerprints) { outputFingerprints = ts.createMap(); } - var hash = system.createHash(data); // TODO: GH#18217 - var mtimeBefore = system.getModifiedTime(fileName); // TODO: GH#18217 + var hash = system.createHash(data); + var mtimeBefore = system.getModifiedTime(fileName); if (mtimeBefore) { var fingerprint = outputFingerprints.get(fileName); // If output has not been changed, and the file has no external modification @@ -94107,32 +94459,13 @@ var ts; } } system.writeFile(fileName, data, writeByteOrderMark); - var mtimeAfter = system.getModifiedTime(fileName) || ts.missingFileModifiedTime; // TODO: GH#18217 + var mtimeAfter = system.getModifiedTime(fileName) || ts.missingFileModifiedTime; outputFingerprints.set(fileName, { hash: hash, byteOrderMark: writeByteOrderMark, mtime: mtimeAfter }); } - function writeFile(fileName, data, writeByteOrderMark, onError) { - try { - ts.performance.mark("beforeIOWrite"); - ensureDirectoriesExist(ts.getDirectoryPath(ts.normalizePath(fileName))); - if (ts.isWatchSet(options) && system.createHash && system.getModifiedTime) { - writeFileIfUpdated(fileName, data, writeByteOrderMark); - } - else { - system.writeFile(fileName, data, writeByteOrderMark); - } - ts.performance.mark("afterIOWrite"); - ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite"); - } - catch (e) { - if (onError) { - onError(e.message); - } - } - } function getDefaultLibLocation() { return ts.getDirectoryPath(ts.normalizePath(system.getExecutingFilePath())); } @@ -95854,9 +96187,16 @@ var ts; } function getSourceFileFromReferenceWorker(fileName, getSourceFile, fail, refFile) { if (ts.hasExtension(fileName)) { - if (!options.allowNonTsExtensions && !ts.forEach(supportedExtensionsWithJsonIfResolveJsonModule, function (extension) { return ts.fileExtensionIs(host.getCanonicalFileName(fileName), extension); })) { - if (fail) - fail(ts.Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1, fileName, "'" + supportedExtensions.join("', '") + "'"); + var canonicalFileName_1 = host.getCanonicalFileName(fileName); + if (!options.allowNonTsExtensions && !ts.forEach(supportedExtensionsWithJsonIfResolveJsonModule, function (extension) { return ts.fileExtensionIs(canonicalFileName_1, extension); })) { + if (fail) { + if (ts.hasJSFileExtension(canonicalFileName_1)) { + fail(ts.Diagnostics.File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option, fileName); + } + else { + fail(ts.Diagnostics.File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1, fileName, "'" + supportedExtensions.join("', '") + "'"); + } + } return undefined; } var sourceFile = getSourceFile(fileName); @@ -95870,7 +96210,7 @@ var ts; fail(ts.Diagnostics.File_0_not_found, fileName); } } - else if (refFile && host.getCanonicalFileName(fileName) === host.getCanonicalFileName(refFile.fileName)) { + else if (refFile && canonicalFileName_1 === host.getCanonicalFileName(refFile.fileName)) { fail(ts.Diagnostics.A_file_cannot_have_a_reference_to_itself); } } @@ -95928,6 +96268,19 @@ var ts; function findSourceFile(fileName, path, isDefaultLib, ignoreNoDefaultLib, refFile, packageId) { if (useSourceOfProjectReferenceRedirect) { var source = getSourceOfProjectReferenceRedirect(fileName); + // If preserveSymlinks is true, module resolution wont jump the symlink + // but the resolved real path may be the .d.ts from project reference + // Note:: Currently we try the real path only if the + // file is from node_modules to avoid having to run real path on all file paths + if (!source && + host.realpath && + options.preserveSymlinks && + ts.isDeclarationFileName(fileName) && + ts.stringContains(fileName, ts.nodeModulesPathPart)) { + var realPath = host.realpath(fileName); + if (realPath !== fileName) + source = getSourceOfProjectReferenceRedirect(realPath); + } if (source) { var file_1 = ts.isString(source) ? findSourceFile(source, toPath(source), isDefaultLib, ignoreNoDefaultLib, refFile, packageId) : @@ -96458,9 +96811,6 @@ var ts; else if (options.incremental && !options.outFile && !options.out && !options.configFilePath) { programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified)); } - if (options.noEmit && ts.isIncrementalCompilation(options)) { - createDiagnosticForOptionName(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", options.incremental ? "incremental" : "composite"); - } verifyProjectReferences(); // List of collected files is complete; validate exhautiveness if this is a project with a file list if (options.composite) { @@ -97505,6 +97855,7 @@ var ts; ts.Debug.assert(state.seenAffectedFiles === undefined); state.seenAffectedFiles = ts.createMap(); } + state.emittedBuildInfo = !state.changedFilesSet.size && !state.affectedFilesPendingEmit; return state; } function convertToDiagnostics(diagnostics, newProgram, getCanonicalFileName) { @@ -98235,7 +98586,7 @@ var ts; } var state = { fileInfos: fileInfos, - compilerOptions: convertFromReusableCompilerOptions(program.options, toAbsolutePath), + compilerOptions: ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath), referencedMap: getMapOfReferencedSet(program.referencedMap, toPath), exportedModulesMap: getMapOfReferencedSet(program.exportedModulesMap, toPath), semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toPath(ts.isString(value) ? value : value[0]); }, function (value) { return ts.isString(value) ? ts.emptyArray : value[1]; }), @@ -98271,33 +98622,6 @@ var ts; } } ts.createBuildProgramUsingProgramBuildInfo = createBuildProgramUsingProgramBuildInfo; - function convertFromReusableCompilerOptions(options, toAbsolutePath) { - var result = {}; - var optionsNameMap = ts.getOptionNameMap().optionNameMap; - for (var name in options) { - if (ts.hasProperty(options, name)) { - result[name] = convertFromReusableCompilerOptionValue(optionsNameMap.get(name.toLowerCase()), options[name], toAbsolutePath); - } - } - if (result.configFilePath) { - result.configFilePath = toAbsolutePath(result.configFilePath); - } - return result; - } - function convertFromReusableCompilerOptionValue(option, value, toAbsolutePath) { - if (option) { - if (option.type === "list") { - var values = value; - if (option.element.isFilePath && values.length) { - return values.map(toAbsolutePath); - } - } - else if (option.isFilePath) { - return toAbsolutePath(value); - } - } - return value; - } function createRedirectedBuilderProgram(state, configFileParsingDiagnostics) { return { getState: ts.notImplemented, @@ -99030,7 +99354,7 @@ var ts; function getPreferencesForUpdate(compilerOptions, oldImportSpecifier) { return { relativePreference: ts.isExternalModuleNameRelative(oldImportSpecifier) ? 0 /* Relative */ : 1 /* NonRelative */, - ending: ts.hasJSOrJsonFileExtension(oldImportSpecifier) ? + ending: ts.hasJSFileExtension(oldImportSpecifier) ? 2 /* JsExtension */ : ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeJs || ts.endsWith(oldImportSpecifier, "index") ? 1 /* Index */ : 0 /* Minimal */, }; @@ -99116,7 +99440,7 @@ var ts; var imports = _a.imports; return ts.firstDefined(imports, function (_a) { var text = _a.text; - return ts.pathIsRelative(text) ? ts.hasJSOrJsonFileExtension(text) : undefined; + return ts.pathIsRelative(text) ? ts.hasJSFileExtension(text) : undefined; }) || false; } function numberOfDirectorySeparators(str) { @@ -99250,10 +99574,13 @@ var ts; // Simplify the full file path to something that can be resolved by Node. // If the module could be imported by a directory name, use that directory's name var moduleSpecifier = packageNameOnly ? moduleFileName : getDirectoryOrExtensionlessFileName(moduleFileName); + var globalTypingsCacheLocation = host.getGlobalTypingsCacheLocation && host.getGlobalTypingsCacheLocation(); // Get a path that's relative to node_modules or the importing file's path // if node_modules folder is in this folder or any of its parent folders, no need to keep it. - if (!ts.startsWith(sourceDirectory, getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex)))) + var pathToTopLevelNodeModules = getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex)); + if (!(ts.startsWith(sourceDirectory, pathToTopLevelNodeModules) || globalTypingsCacheLocation && ts.startsWith(getCanonicalFileName(globalTypingsCacheLocation), pathToTopLevelNodeModules))) { return undefined; + } // If the module was found in @types, get the actual Node package name var nodeModulesDirectoryName = moduleSpecifier.substring(parts.topLevelPackageNameIndex + 1); var packageName = ts.getPackageNameFromTypesPackageName(nodeModulesDirectoryName); @@ -99478,7 +99805,7 @@ var ts; /** Parses config file using System interface */ function parseConfigFileWithSystem(configFileName, optionsToExtend, system, reportDiagnostic) { var host = system; - host.onUnRecoverableConfigFileDiagnostic = function (diagnostic) { return reportUnrecoverableDiagnostic(ts.sys, reportDiagnostic, diagnostic); }; + host.onUnRecoverableConfigFileDiagnostic = function (diagnostic) { return reportUnrecoverableDiagnostic(system, reportDiagnostic, diagnostic); }; var result = ts.getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host); host.onUnRecoverableConfigFileDiagnostic = undefined; // TODO: GH#18217 return result; @@ -99502,7 +99829,7 @@ var ts; } ts.getErrorSummaryText = getErrorSummaryText; function listFiles(program, writeFileName) { - if (program.getCompilerOptions().listFiles) { + if (program.getCompilerOptions().listFiles || program.getCompilerOptions().listFilesOnly) { ts.forEach(program.getSourceFiles(), function (file) { writeFileName(file.fileName); }); @@ -99513,6 +99840,7 @@ var ts; * Helper that emit files, report diagnostics and lists emitted and/or source files depending on compiler options */ function emitFilesAndReportErrors(program, reportDiagnostic, writeFileName, reportSummary, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers) { + var isListFilesOnly = !!program.getCompilerOptions().listFilesOnly; // First get and report any syntactic errors. var diagnostics = program.getConfigFileParsingDiagnostics().slice(); var configFileParsingDiagnosticsLength = diagnostics.length; @@ -99521,13 +99849,17 @@ var ts; // semantic errors. if (diagnostics.length === configFileParsingDiagnosticsLength) { ts.addRange(diagnostics, program.getOptionsDiagnostics(cancellationToken)); - ts.addRange(diagnostics, program.getGlobalDiagnostics(cancellationToken)); - if (diagnostics.length === configFileParsingDiagnosticsLength) { - ts.addRange(diagnostics, program.getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken)); + if (!isListFilesOnly) { + ts.addRange(diagnostics, program.getGlobalDiagnostics(cancellationToken)); + if (diagnostics.length === configFileParsingDiagnosticsLength) { + ts.addRange(diagnostics, program.getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken)); + } } } // Emit and report any errors we ran into. - var emitResult = program.emit(/*targetSourceFile*/ undefined, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers); + var emitResult = isListFilesOnly + ? { emitSkipped: true, diagnostics: ts.emptyArray } + : program.emit(/*targetSourceFile*/ undefined, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers); var emittedFiles = emitResult.emittedFiles, emitDiagnostics = emitResult.diagnostics; ts.addRange(diagnostics, emitDiagnostics); ts.sortAndDeduplicateDiagnostics(diagnostics).forEach(reportDiagnostic); @@ -99630,19 +99962,13 @@ var ts; createHash: ts.maybeBind(host, host.createHash), readDirectory: ts.maybeBind(host, host.readDirectory), }; - function ensureDirectoriesExist(directoryPath) { - if (directoryPath.length > ts.getRootLength(directoryPath) && !host.directoryExists(directoryPath)) { - var parentDirectory = ts.getDirectoryPath(directoryPath); - ensureDirectoriesExist(parentDirectory); - if (host.createDirectory) - host.createDirectory(directoryPath); - } - } function writeFile(fileName, text, writeByteOrderMark, onError) { try { ts.performance.mark("beforeIOWrite"); - ensureDirectoriesExist(ts.getDirectoryPath(ts.normalizePath(fileName))); - host.writeFile(fileName, text, writeByteOrderMark); + // NOTE: If patchWriteFileEnsuringDirectory has been called, + // the host.writeFile will do its own directory creation and + // the ensureDirectoriesExist call will always be redundant. + ts.writeFileEnsuringDirectories(fileName, text, writeByteOrderMark, function (path, data, writeByteOrderMark) { return host.writeFile(path, data, writeByteOrderMark); }, function (path) { return host.createDirectory(path); }, function (path) { return host.directoryExists(path); }); ts.performance.mark("afterIOWrite"); ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite"); } @@ -101419,30 +101745,25 @@ var ts; setupInitialBuild(state, cancellationToken); var reportQueue = true; var successfulProjects = 0; - var errorProjects = 0; while (true) { var invalidatedProject = getNextInvalidatedProject(state, buildOrder, reportQueue); if (!invalidatedProject) break; reportQueue = false; invalidatedProject.done(cancellationToken); - if (state.diagnostics.has(invalidatedProject.projectPath)) { - errorProjects++; - } - else { + if (!state.diagnostics.has(invalidatedProject.projectPath)) successfulProjects++; - } } disableCache(state); reportErrorSummary(state, buildOrder); startWatching(state, buildOrder); - return isCircularBuildOrder(buildOrder) ? - ts.ExitStatus.ProjectReferenceCycle_OutputsSkupped : - errorProjects ? - successfulProjects ? - ts.ExitStatus.DiagnosticsPresent_OutputsGenerated : - ts.ExitStatus.DiagnosticsPresent_OutputsSkipped : - ts.ExitStatus.Success; + return isCircularBuildOrder(buildOrder) + ? ts.ExitStatus.ProjectReferenceCycle_OutputsSkipped + : !buildOrder.some(function (p) { return state.diagnostics.has(toResolvedConfigFilePath(state, p)); }) + ? ts.ExitStatus.Success + : successfulProjects + ? ts.ExitStatus.DiagnosticsPresent_OutputsGenerated + : ts.ExitStatus.DiagnosticsPresent_OutputsSkipped; } function clean(state, project, onlyReferences) { var buildOrder = getBuildOrderFor(state, project, onlyReferences); @@ -101450,7 +101771,7 @@ var ts; return ts.ExitStatus.InvalidProject_OutputsSkipped; if (isCircularBuildOrder(buildOrder)) { reportErrors(state, buildOrder.circularDiagnostics); - return ts.ExitStatus.ProjectReferenceCycle_OutputsSkupped; + return ts.ExitStatus.ProjectReferenceCycle_OutputsSkipped; } var options = state.options, host = state.host; var filesToDelete = options.dry ? [] : undefined; diff --git a/lib/zh-cn/diagnosticMessages.generated.json b/lib/zh-cn/diagnosticMessages.generated.json index 2eb27cd9054..062df5844c9 100644 --- a/lib/zh-cn/diagnosticMessages.generated.json +++ b/lib/zh-cn/diagnosticMessages.generated.json @@ -441,7 +441,7 @@ "Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391": "函数实现缺失或未立即出现在声明之后。", "Function_implementation_name_must_be_0_2389": "函数实现名称必须为“{0}”。", "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024": "由于函数不具有返回类型批注并且在它的一个返回表达式中得到直接或间接引用,因此它隐式具有返回类型 \"any\"。", - "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "函数缺少结束返回语句,返回类型不包括 \"undefined\"。", + "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "函数缺少结束 return 语句,返回类型不包括 \"undefined\"。", "Function_overload_must_be_static_2387": "函数重载必须为静态。", "Function_overload_must_not_be_static_2388": "函数重载不能为静态。", "Generate_get_and_set_accessors_95046": "生成 \"get\" 和 \"set\" 访问器", @@ -536,7 +536,7 @@ "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001": "JSX 元素不能具有多个名称相同的特性。", "JSX_expressions_must_have_one_parent_element_2657": "JSX 表达式必须具有一个父元素。", "JSX_fragment_has_no_corresponding_closing_tag_17014": "JSX 片段没有相应的结束标记。", - "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017": "使用内联 JSX 工厂杂注时,不支持 JSX 片段", + "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017": "使用内联 JSX 工厂 pragma 时,不支持 JSX 片段", "JSX_fragment_is_not_supported_when_using_jsxFactory_17016": "使用 --jsxFactory 时不支持 JSX 片段", "JSX_spread_child_must_be_an_array_type_2609": "JSX 扩展子属性必须为数组类型。", "Jump_target_cannot_cross_function_boundary_1107": "跳转目标不能跨越函数边界。", From 196c0aa0783ddd7520f9accd54d53c3223f5a47c Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Fri, 15 Nov 2019 10:59:58 -0800 Subject: [PATCH 18/50] Fix excess property checking for unions with index signatures (#34927) * Fix excess property checking for union targets with index signatures * Accept new baselines * Remove unused code * Add tests * Accept new baselines --- src/compiler/checker.ts | 82 ++++++++----------- src/compiler/types.ts | 2 - ...heckingWhenTargetIsIntersection.errors.txt | 14 ++-- .../discriminateObjectTypesOnly.errors.txt | 17 ---- ...sOnUnionsOfOverlappingObjects01.errors.txt | 10 +-- .../excessPropertyCheckWithUnions.errors.txt | 63 ++++++++++++-- .../excessPropertyCheckWithUnions.js | 33 ++++++++ .../excessPropertyCheckWithUnions.symbols | 56 +++++++++++++ .../excessPropertyCheckWithUnions.types | 52 ++++++++++++ .../mappedTypeIndexedAccess.errors.txt | 20 ++--- ...tUnionNestedExcessPropertyCheck.errors.txt | 30 +++---- ...LiteralsAgainstUnionsOfArrays01.errors.txt | 10 +-- .../compiler/excessPropertyCheckWithUnions.ts | 26 ++++++ 13 files changed, 299 insertions(+), 116 deletions(-) delete mode 100644 tests/baselines/reference/discriminateObjectTypesOnly.errors.txt diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 27ed0388841..b718c72c009 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -9368,25 +9368,6 @@ namespace ts { return type.resolvedProperties; } - function getPossiblePropertiesOfUnionType(type: UnionType): Symbol[] { - if (type.possiblePropertyCache) { - return type.possiblePropertyCache.size ? arrayFrom(type.possiblePropertyCache.values()) : emptyArray; - } - type.possiblePropertyCache = createSymbolTable(); - for (const t of type.types) { - for (const p of getPropertiesOfType(t)) { - if (!type.possiblePropertyCache.has(p.escapedName)) { - const prop = getUnionOrIntersectionProperty(type, p.escapedName); - if (prop) { - type.possiblePropertyCache.set(p.escapedName, prop); - } - } - } - } - // We can't simply use the normal property cache here, since that will contain cached apparent type members :( - return type.possiblePropertyCache.size ? arrayFrom(type.possiblePropertyCache.values()) : emptyArray; - } - function getPropertiesOfType(type: Type): Symbol[] { type = getApparentType(type); return type.flags & TypeFlags.UnionOrIntersection ? @@ -14614,8 +14595,7 @@ namespace ts { const isComparingJsxAttributes = !!(getObjectFlags(source) & ObjectFlags.JsxAttributes); const isPerformingExcessPropertyChecks = !isApparentIntersectionConstituent && (isObjectLiteralType(source) && getObjectFlags(source) & ObjectFlags.FreshLiteral); if (isPerformingExcessPropertyChecks) { - const discriminantType = target.flags & TypeFlags.Union ? findMatchingDiscriminantType(source, target as UnionType) : undefined; - if (hasExcessProperties(source, target, discriminantType, reportErrors)) { + if (hasExcessProperties(source, target, reportErrors)) { if (reportErrors) { reportRelationError(headMessage, source, target); } @@ -14657,13 +14637,6 @@ namespace ts { else { if (target.flags & TypeFlags.Union) { result = typeRelatedToSomeType(getRegularTypeOfObjectLiteral(source), target, reportErrors && !(source.flags & TypeFlags.Primitive) && !(target.flags & TypeFlags.Primitive)); - if (result && (isPerformingExcessPropertyChecks || isPerformingCommonPropertyChecks)) { - // Validate against excess props using the original `source` - const discriminantType = findMatchingDiscriminantType(source, target as UnionType) || filterPrimitivesIfContainsNonPrimitive(target as UnionType); - if (!propertiesRelatedTo(source, discriminantType, reportErrors, /*excludedProperties*/ undefined, isIntersectionConstituent)) { - return Ternary.False; - } - } } else if (target.flags & TypeFlags.Intersection) { isIntersectionConstituent = true; // set here to affect the following trio of checks @@ -14776,26 +14749,38 @@ namespace ts { return Ternary.False; } - function hasExcessProperties(source: FreshObjectLiteralType, target: Type, discriminant: Type | undefined, reportErrors: boolean): boolean { - if (!noImplicitAny && getObjectFlags(target) & ObjectFlags.JSLiteral) { + function getTypeOfPropertyInTypes(types: Type[], name: __String) { + const appendPropType = (propTypes: Type[] | undefined, type: Type) => { + type = getApparentType(type); + const prop = type.flags & TypeFlags.UnionOrIntersection ? getPropertyOfUnionOrIntersectionType(type, name) : getPropertyOfObjectType(type, name); + const propType = prop && getTypeOfSymbol(prop) || isNumericLiteralName(name) && getIndexTypeOfType(type, IndexKind.Number) || getIndexTypeOfType(type, IndexKind.String) || undefinedType; + return append(propTypes, propType); + }; + return getUnionType(reduceLeft(types, appendPropType, /*initial*/ undefined) || emptyArray); + } + + function hasExcessProperties(source: FreshObjectLiteralType, target: Type, reportErrors: boolean): boolean { + if (!isExcessPropertyCheckTarget(target) || !noImplicitAny && getObjectFlags(target) & ObjectFlags.JSLiteral) { return false; // Disable excess property checks on JS literals to simulate having an implicit "index signature" - but only outside of noImplicitAny } - if (isExcessPropertyCheckTarget(target)) { - const isComparingJsxAttributes = !!(getObjectFlags(source) & ObjectFlags.JsxAttributes); - if ((relation === assignableRelation || relation === comparableRelation) && - (isTypeSubsetOf(globalObjectType, target) || (!isComparingJsxAttributes && isEmptyObjectType(target)))) { - return false; - } - if (discriminant) { - // check excess properties against discriminant type only, not the entire union - return hasExcessProperties(source, discriminant, /*discriminant*/ undefined, reportErrors); - } - for (const prop of getPropertiesOfType(source)) { - if (shouldCheckAsExcessProperty(prop, source.symbol) && !isKnownProperty(target, prop.escapedName, isComparingJsxAttributes)) { + const isComparingJsxAttributes = !!(getObjectFlags(source) & ObjectFlags.JsxAttributes); + if ((relation === assignableRelation || relation === comparableRelation) && + (isTypeSubsetOf(globalObjectType, target) || (!isComparingJsxAttributes && isEmptyObjectType(target)))) { + return false; + } + let reducedTarget = target; + let checkTypes: Type[] | undefined; + if (target.flags & TypeFlags.Union) { + reducedTarget = findMatchingDiscriminantType(source, target) || filterPrimitivesIfContainsNonPrimitive(target); + checkTypes = reducedTarget.flags & TypeFlags.Union ? (reducedTarget).types : [reducedTarget]; + } + for (const prop of getPropertiesOfType(source)) { + if (shouldCheckAsExcessProperty(prop, source.symbol)) { + if (!isKnownProperty(reducedTarget, prop.escapedName, isComparingJsxAttributes)) { if (reportErrors) { // Report error in terms of object types in the target as those are the only ones // we check in isKnownProperty. - const errorTarget = filterType(target, isExcessPropertyCheckTarget); + const errorTarget = filterType(reducedTarget, isExcessPropertyCheckTarget); // We know *exactly* where things went wrong when comparing the types. // Use this property as the error node as this will be more helpful in // reasoning about what went wrong. @@ -14826,7 +14811,6 @@ namespace ts { suggestion = getSuggestionForNonexistentProperty(name, errorTarget); } } - if (suggestion !== undefined) { reportError(Diagnostics.Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2, symbolToString(prop), typeToString(errorTarget), suggestion); @@ -14839,6 +14823,12 @@ namespace ts { } return true; } + if (checkTypes && !isRelatedTo(getTypeOfSymbol(prop), getTypeOfPropertyInTypes(checkTypes, prop.escapedName), reportErrors)) { + if (reportErrors) { + reportIncompatibleError(Diagnostics.Types_of_property_0_are_incompatible, symbolToString(prop)); + } + return true; + } } } return false; @@ -15839,7 +15829,7 @@ namespace ts { } // We only call this for union target types when we're attempting to do excess property checking - in those cases, we want to get _all possible props_ // from the target union, across all members - const properties = target.flags & TypeFlags.Union ? getPossiblePropertiesOfUnionType(target as UnionType) : getPropertiesOfType(target); + const properties = getPropertiesOfType(target); const numericNamesOnly = isTupleType(source) && isTupleType(target); for (const targetProp of excludeProperties(properties, excludedProperties)) { const name = targetProp.escapedName; @@ -17348,7 +17338,7 @@ namespace ts { } function* getUnmatchedProperties(source: Type, target: Type, requireOptionalProperties: boolean, matchDiscriminantProperties: boolean): IterableIterator { - const properties = target.flags & TypeFlags.Union ? getPossiblePropertiesOfUnionType(target as UnionType) : getPropertiesOfType(target); + const properties = getPropertiesOfType(target); for (const targetProp of properties) { if (requireOptionalProperties || !(targetProp.flags & SymbolFlags.Optional || getCheckFlags(targetProp) & CheckFlags.Partial)) { const sourceProp = getPropertyOfType(source, targetProp.escapedName); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 9aef31dda4e..78f62f3013e 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -4484,8 +4484,6 @@ namespace ts { } export interface UnionType extends UnionOrIntersectionType { - /* @internal */ - possiblePropertyCache?: SymbolTable; // Cache of _all_ resolved properties less any from aparent members } export interface IntersectionType extends UnionOrIntersectionType { diff --git a/tests/baselines/reference/deepExcessPropertyCheckingWhenTargetIsIntersection.errors.txt b/tests/baselines/reference/deepExcessPropertyCheckingWhenTargetIsIntersection.errors.txt index 1f2552d47f2..975f2a37d38 100644 --- a/tests/baselines/reference/deepExcessPropertyCheckingWhenTargetIsIntersection.errors.txt +++ b/tests/baselines/reference/deepExcessPropertyCheckingWhenTargetIsIntersection.errors.txt @@ -1,8 +1,9 @@ tests/cases/compiler/deepExcessPropertyCheckingWhenTargetIsIntersection.ts(21,33): error TS2322: Type '{ INVALID_PROP_NAME: string; ariaLabel: string; }' is not assignable to type 'ITestProps'. Object literal may only specify known properties, and 'INVALID_PROP_NAME' does not exist in type 'ITestProps'. -tests/cases/compiler/deepExcessPropertyCheckingWhenTargetIsIntersection.ts(27,34): error TS2200: The types of 'icon.props' are incompatible between these types. - Type '{ INVALID_PROP_NAME: string; ariaLabel: string; }' is not assignable to type 'ITestProps'. - Object literal may only specify known properties, and 'INVALID_PROP_NAME' does not exist in type 'ITestProps'. +tests/cases/compiler/deepExcessPropertyCheckingWhenTargetIsIntersection.ts(27,34): error TS2345: Argument of type '{ icon: { props: { INVALID_PROP_NAME: string; ariaLabel: string; }; }; }' is not assignable to parameter of type '(TestProps & { children?: number; }) | ({ props2: { x: number; }; } & { children?: number; })'. + The types of 'icon.props' are incompatible between these types. + Type '{ INVALID_PROP_NAME: string; ariaLabel: string; }' is not assignable to type 'ITestProps'. + Object literal may only specify known properties, and 'INVALID_PROP_NAME' does not exist in type 'ITestProps'. ==== tests/cases/compiler/deepExcessPropertyCheckingWhenTargetIsIntersection.ts (2 errors) ==== @@ -38,7 +39,8 @@ tests/cases/compiler/deepExcessPropertyCheckingWhenTargetIsIntersection.ts(27,34 TestComponent2({icon: { props: { INVALID_PROP_NAME: 'share', ariaLabel: 'test label' } }}); ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2200: The types of 'icon.props' are incompatible between these types. -!!! error TS2200: Type '{ INVALID_PROP_NAME: string; ariaLabel: string; }' is not assignable to type 'ITestProps'. -!!! error TS2200: Object literal may only specify known properties, and 'INVALID_PROP_NAME' does not exist in type 'ITestProps'. +!!! error TS2345: Argument of type '{ icon: { props: { INVALID_PROP_NAME: string; ariaLabel: string; }; }; }' is not assignable to parameter of type '(TestProps & { children?: number; }) | ({ props2: { x: number; }; } & { children?: number; })'. +!!! error TS2345: The types of 'icon.props' are incompatible between these types. +!!! error TS2345: Type '{ INVALID_PROP_NAME: string; ariaLabel: string; }' is not assignable to type 'ITestProps'. +!!! error TS2345: Object literal may only specify known properties, and 'INVALID_PROP_NAME' does not exist in type 'ITestProps'. \ No newline at end of file diff --git a/tests/baselines/reference/discriminateObjectTypesOnly.errors.txt b/tests/baselines/reference/discriminateObjectTypesOnly.errors.txt deleted file mode 100644 index efe5bf4cced..00000000000 --- a/tests/baselines/reference/discriminateObjectTypesOnly.errors.txt +++ /dev/null @@ -1,17 +0,0 @@ -tests/cases/compiler/discriminateObjectTypesOnly.ts(9,7): error TS2741: Property 'toFixed' is missing in type '{ toString: undefined; }' but required in type '{ toFixed: null; toString: undefined; }'. - - -==== tests/cases/compiler/discriminateObjectTypesOnly.ts (1 errors) ==== - type Thing = number | object; - const k: Thing = { toFixed: null }; // OK, satisfies object - - type Thing2 = number | { toFixed: null } | object; - const q: Thing2 = { toFixed: null }; - const h: Thing2 = { toString: null }; // OK, satisfies object - - type Thing3 = number | { toFixed: null, toString: undefined } | object; - const l: Thing3 = { toString: undefined }; // error, toFixed isn't null - ~ -!!! error TS2741: Property 'toFixed' is missing in type '{ toString: undefined; }' but required in type '{ toFixed: null; toString: undefined; }'. -!!! related TS2728 tests/cases/compiler/discriminateObjectTypesOnly.ts:8:26: 'toFixed' is declared here. - \ No newline at end of file diff --git a/tests/baselines/reference/errorsOnUnionsOfOverlappingObjects01.errors.txt b/tests/baselines/reference/errorsOnUnionsOfOverlappingObjects01.errors.txt index 1b8dab19b5b..38ae9542a40 100644 --- a/tests/baselines/reference/errorsOnUnionsOfOverlappingObjects01.errors.txt +++ b/tests/baselines/reference/errorsOnUnionsOfOverlappingObjects01.errors.txt @@ -3,9 +3,8 @@ tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts(18,3): error TS2345 Types of property 'b' are incompatible. Type 'string' is not assignable to type 'number'. tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts(19,3): error TS2345: Argument of type '{ a: string; b: string; }' is not assignable to parameter of type 'Foo | Other'. - Type '{ a: string; b: string; }' is not assignable to type 'Foo'. - Types of property 'b' are incompatible. - Type 'string' is not assignable to type 'number'. + Types of property 'b' are incompatible. + Type 'string' is not assignable to type 'number'. tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts(24,5): error TS2345: Argument of type '{ a: string; b: string; }' is not assignable to parameter of type 'Bar | Other'. Object literal may only specify known properties, and 'a' does not exist in type 'Bar | Other'. tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts(42,10): error TS2345: Argument of type '{ dog: string; }' is not assignable to parameter of type 'ExoticAnimal'. @@ -45,9 +44,8 @@ tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts(47,10): error TS234 f({ a: '', b: '' }) ~~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ a: string; b: string; }' is not assignable to parameter of type 'Foo | Other'. -!!! error TS2345: Type '{ a: string; b: string; }' is not assignable to type 'Foo'. -!!! error TS2345: Types of property 'b' are incompatible. -!!! error TS2345: Type 'string' is not assignable to type 'number'. +!!! error TS2345: Types of property 'b' are incompatible. +!!! error TS2345: Type 'string' is not assignable to type 'number'. declare function g(x: Bar | Other): any; diff --git a/tests/baselines/reference/excessPropertyCheckWithUnions.errors.txt b/tests/baselines/reference/excessPropertyCheckWithUnions.errors.txt index 72da324caf7..0d56383ed9a 100644 --- a/tests/baselines/reference/excessPropertyCheckWithUnions.errors.txt +++ b/tests/baselines/reference/excessPropertyCheckWithUnions.errors.txt @@ -20,14 +20,24 @@ tests/cases/compiler/excessPropertyCheckWithUnions.ts(49,35): error TS2322: Type Object literal may only specify known properties, and 'second' does not exist in type '{ a: 1; b: 1; first: string; }'. tests/cases/compiler/excessPropertyCheckWithUnions.ts(50,35): error TS2322: Type '{ a: 1; b: 1; first: string; third: string; }' is not assignable to type 'Overlapping'. Object literal may only specify known properties, and 'third' does not exist in type '{ a: 1; b: 1; first: string; }'. -tests/cases/compiler/excessPropertyCheckWithUnions.ts(66,9): error TS2326: Types of property 'n' are incompatible. - Type '{ a: string; b: string; }' is not assignable to type 'AN'. - Object literal may only specify known properties, and 'b' does not exist in type 'AN'. +tests/cases/compiler/excessPropertyCheckWithUnions.ts(66,9): error TS2322: Type '{ kind: "A"; n: { a: string; b: string; }; }' is not assignable to type 'AB'. + Types of property 'n' are incompatible. + Type '{ a: string; b: string; }' is not assignable to type 'AN'. + Object literal may only specify known properties, and 'b' does not exist in type 'AN'. tests/cases/compiler/excessPropertyCheckWithUnions.ts(87,5): error TS2322: Type '{ tag: "button"; type: "submit"; href: string; }' is not assignable to type 'Union'. Object literal may only specify known properties, and 'href' does not exist in type 'Button'. +tests/cases/compiler/excessPropertyCheckWithUnions.ts(107,7): error TS2322: Type '{ foo: string; }' is not assignable to type 'ObjectDataSpecification'. + Types of property 'foo' are incompatible. + Type 'string' is not assignable to type 'IValue | undefined'. +tests/cases/compiler/excessPropertyCheckWithUnions.ts(113,7): error TS2322: Type '{ a: string; }' is not assignable to type '{ [x: string]: number; } | { [x: number]: number; }'. + Types of property 'a' are incompatible. + Type 'string' is not assignable to type 'number | undefined'. +tests/cases/compiler/excessPropertyCheckWithUnions.ts(114,7): error TS2322: Type '{ a: number; c: string; }' is not assignable to type '{ [x: string]: number; } | { a: number; }'. + Types of property 'c' are incompatible. + Type 'string' is not assignable to type 'number | undefined'. -==== tests/cases/compiler/excessPropertyCheckWithUnions.ts (11 errors) ==== +==== tests/cases/compiler/excessPropertyCheckWithUnions.ts (14 errors) ==== type ADT = { tag: "A", a1: string @@ -127,9 +137,10 @@ tests/cases/compiler/excessPropertyCheckWithUnions.ts(87,5): error TS2322: Type a: "a", b: "b", // excess -- kind: "A" ~~~~~~ -!!! error TS2326: Types of property 'n' are incompatible. -!!! error TS2326: Type '{ a: string; b: string; }' is not assignable to type 'AN'. -!!! error TS2326: Object literal may only specify known properties, and 'b' does not exist in type 'AN'. +!!! error TS2322: Type '{ kind: "A"; n: { a: string; b: string; }; }' is not assignable to type 'AB'. +!!! error TS2322: Types of property 'n' are incompatible. +!!! error TS2322: Type '{ a: string; b: string; }' is not assignable to type 'AN'. +!!! error TS2322: Object literal may only specify known properties, and 'b' does not exist in type 'AN'. } } const abac: AB = { @@ -155,4 +166,42 @@ tests/cases/compiler/excessPropertyCheckWithUnions.ts(87,5): error TS2322: Type !!! error TS2322: Type '{ tag: "button"; type: "submit"; href: string; }' is not assignable to type 'Union'. !!! error TS2322: Object literal may only specify known properties, and 'href' does not exist in type 'Button'. }; + + // Repro from #34611 + + interface IValue { + value: string + } + + interface StringKeys { + [propertyName: string]: IValue; + }; + + interface NumberKeys { + [propertyName: number]: IValue; + } + + type ObjectDataSpecification = StringKeys | NumberKeys; + + + const dataSpecification: ObjectDataSpecification = { // Error + ~~~~~~~~~~~~~~~~~ +!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'ObjectDataSpecification'. +!!! error TS2322: Types of property 'foo' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'IValue | undefined'. + foo: "asdfsadffsd" + }; + + // Repro from #34611 + + const obj1: { [x: string]: number } | { [x: number]: number } = { a: 'abc' }; // Error + ~~~~ +!!! error TS2322: Type '{ a: string; }' is not assignable to type '{ [x: string]: number; } | { [x: number]: number; }'. +!!! error TS2322: Types of property 'a' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number | undefined'. + const obj2: { [x: string]: number } | { a: number } = { a: 5, c: 'abc' }; // Error + ~~~~ +!!! error TS2322: Type '{ a: number; c: string; }' is not assignable to type '{ [x: string]: number; } | { a: number; }'. +!!! error TS2322: Types of property 'c' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number | undefined'. \ No newline at end of file diff --git a/tests/baselines/reference/excessPropertyCheckWithUnions.js b/tests/baselines/reference/excessPropertyCheckWithUnions.js index 691a64f65b8..34cd337705a 100644 --- a/tests/baselines/reference/excessPropertyCheckWithUnions.js +++ b/tests/baselines/reference/excessPropertyCheckWithUnions.js @@ -87,6 +87,32 @@ const obj: Union = { // should have error here href: 'foo', }; + +// Repro from #34611 + +interface IValue { + value: string +} + +interface StringKeys { + [propertyName: string]: IValue; +}; + +interface NumberKeys { + [propertyName: number]: IValue; +} + +type ObjectDataSpecification = StringKeys | NumberKeys; + + +const dataSpecification: ObjectDataSpecification = { // Error + foo: "asdfsadffsd" +}; + +// Repro from #34611 + +const obj1: { [x: string]: number } | { [x: number]: number } = { a: 'abc' }; // Error +const obj2: { [x: string]: number } | { a: number } = { a: 5, c: 'abc' }; // Error //// [excessPropertyCheckWithUnions.js] @@ -144,3 +170,10 @@ var obj = { // should have error here href: 'foo' }; +; +var dataSpecification = { + foo: "asdfsadffsd" +}; +// Repro from #34611 +var obj1 = { a: 'abc' }; // Error +var obj2 = { a: 5, c: 'abc' }; // Error diff --git a/tests/baselines/reference/excessPropertyCheckWithUnions.symbols b/tests/baselines/reference/excessPropertyCheckWithUnions.symbols index 749e359d4a1..8fb86125a57 100644 --- a/tests/baselines/reference/excessPropertyCheckWithUnions.symbols +++ b/tests/baselines/reference/excessPropertyCheckWithUnions.symbols @@ -254,3 +254,59 @@ const obj: Union = { }; +// Repro from #34611 + +interface IValue { +>IValue : Symbol(IValue, Decl(excessPropertyCheckWithUnions.ts, 87, 2)) + + value: string +>value : Symbol(IValue.value, Decl(excessPropertyCheckWithUnions.ts, 91, 18)) +} + +interface StringKeys { +>StringKeys : Symbol(StringKeys, Decl(excessPropertyCheckWithUnions.ts, 93, 1)) + + [propertyName: string]: IValue; +>propertyName : Symbol(propertyName, Decl(excessPropertyCheckWithUnions.ts, 96, 5)) +>IValue : Symbol(IValue, Decl(excessPropertyCheckWithUnions.ts, 87, 2)) + +}; + +interface NumberKeys { +>NumberKeys : Symbol(NumberKeys, Decl(excessPropertyCheckWithUnions.ts, 97, 2)) + + [propertyName: number]: IValue; +>propertyName : Symbol(propertyName, Decl(excessPropertyCheckWithUnions.ts, 100, 5)) +>IValue : Symbol(IValue, Decl(excessPropertyCheckWithUnions.ts, 87, 2)) +} + +type ObjectDataSpecification = StringKeys | NumberKeys; +>ObjectDataSpecification : Symbol(ObjectDataSpecification, Decl(excessPropertyCheckWithUnions.ts, 101, 1)) +>StringKeys : Symbol(StringKeys, Decl(excessPropertyCheckWithUnions.ts, 93, 1)) +>NumberKeys : Symbol(NumberKeys, Decl(excessPropertyCheckWithUnions.ts, 97, 2)) + + +const dataSpecification: ObjectDataSpecification = { // Error +>dataSpecification : Symbol(dataSpecification, Decl(excessPropertyCheckWithUnions.ts, 106, 5)) +>ObjectDataSpecification : Symbol(ObjectDataSpecification, Decl(excessPropertyCheckWithUnions.ts, 101, 1)) + + foo: "asdfsadffsd" +>foo : Symbol(foo, Decl(excessPropertyCheckWithUnions.ts, 106, 52)) + +}; + +// Repro from #34611 + +const obj1: { [x: string]: number } | { [x: number]: number } = { a: 'abc' }; // Error +>obj1 : Symbol(obj1, Decl(excessPropertyCheckWithUnions.ts, 112, 5)) +>x : Symbol(x, Decl(excessPropertyCheckWithUnions.ts, 112, 15)) +>x : Symbol(x, Decl(excessPropertyCheckWithUnions.ts, 112, 41)) +>a : Symbol(a, Decl(excessPropertyCheckWithUnions.ts, 112, 65)) + +const obj2: { [x: string]: number } | { a: number } = { a: 5, c: 'abc' }; // Error +>obj2 : Symbol(obj2, Decl(excessPropertyCheckWithUnions.ts, 113, 5)) +>x : Symbol(x, Decl(excessPropertyCheckWithUnions.ts, 113, 15)) +>a : Symbol(a, Decl(excessPropertyCheckWithUnions.ts, 113, 39)) +>a : Symbol(a, Decl(excessPropertyCheckWithUnions.ts, 113, 55)) +>c : Symbol(c, Decl(excessPropertyCheckWithUnions.ts, 113, 61)) + diff --git a/tests/baselines/reference/excessPropertyCheckWithUnions.types b/tests/baselines/reference/excessPropertyCheckWithUnions.types index f56aa287daa..38e9a6c81e7 100644 --- a/tests/baselines/reference/excessPropertyCheckWithUnions.types +++ b/tests/baselines/reference/excessPropertyCheckWithUnions.types @@ -312,3 +312,55 @@ const obj: Union = { }; +// Repro from #34611 + +interface IValue { + value: string +>value : string +} + +interface StringKeys { + [propertyName: string]: IValue; +>propertyName : string + +}; + +interface NumberKeys { + [propertyName: number]: IValue; +>propertyName : number +} + +type ObjectDataSpecification = StringKeys | NumberKeys; +>ObjectDataSpecification : ObjectDataSpecification + + +const dataSpecification: ObjectDataSpecification = { // Error +>dataSpecification : ObjectDataSpecification +>{ // Error foo: "asdfsadffsd"} : { foo: string; } + + foo: "asdfsadffsd" +>foo : string +>"asdfsadffsd" : "asdfsadffsd" + +}; + +// Repro from #34611 + +const obj1: { [x: string]: number } | { [x: number]: number } = { a: 'abc' }; // Error +>obj1 : { [x: string]: number; } | { [x: number]: number; } +>x : string +>x : number +>{ a: 'abc' } : { a: string; } +>a : string +>'abc' : "abc" + +const obj2: { [x: string]: number } | { a: number } = { a: 5, c: 'abc' }; // Error +>obj2 : { [x: string]: number; } | { a: number; } +>x : string +>a : number +>{ a: 5, c: 'abc' } : { a: number; c: string; } +>a : number +>5 : 5 +>c : string +>'abc' : "abc" + diff --git a/tests/baselines/reference/mappedTypeIndexedAccess.errors.txt b/tests/baselines/reference/mappedTypeIndexedAccess.errors.txt index 24eae941c61..070f48c216a 100644 --- a/tests/baselines/reference/mappedTypeIndexedAccess.errors.txt +++ b/tests/baselines/reference/mappedTypeIndexedAccess.errors.txt @@ -1,11 +1,9 @@ tests/cases/compiler/mappedTypeIndexedAccess.ts(18,5): error TS2322: Type '{ key: "foo"; value: number; }' is not assignable to type '{ key: "foo"; value: string; } | { key: "bar"; value: number; }'. - Type '{ key: "foo"; value: number; }' is not assignable to type '{ key: "foo"; value: string; }'. - Types of property 'value' are incompatible. - Type 'number' is not assignable to type 'string'. + Types of property 'value' are incompatible. + Type 'number' is not assignable to type 'string'. tests/cases/compiler/mappedTypeIndexedAccess.ts(24,5): error TS2322: Type '{ key: "foo"; value: number; }' is not assignable to type '{ key: "foo"; value: string; } | { key: "bar"; value: number; }'. - Type '{ key: "foo"; value: number; }' is not assignable to type '{ key: "foo"; value: string; }'. - Types of property 'value' are incompatible. - Type 'number' is not assignable to type 'string'. + Types of property 'value' are incompatible. + Type 'number' is not assignable to type 'string'. ==== tests/cases/compiler/mappedTypeIndexedAccess.ts (2 errors) ==== @@ -29,9 +27,8 @@ tests/cases/compiler/mappedTypeIndexedAccess.ts(24,5): error TS2322: Type '{ key let pair1: Pair = { ~~~~~ !!! error TS2322: Type '{ key: "foo"; value: number; }' is not assignable to type '{ key: "foo"; value: string; } | { key: "bar"; value: number; }'. -!!! error TS2322: Type '{ key: "foo"; value: number; }' is not assignable to type '{ key: "foo"; value: string; }'. -!!! error TS2322: Types of property 'value' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Types of property 'value' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. key: "foo", value: 3 }; @@ -40,9 +37,8 @@ tests/cases/compiler/mappedTypeIndexedAccess.ts(24,5): error TS2322: Type '{ key let pair2: Pairs[keyof FooBar] = { ~~~~~ !!! error TS2322: Type '{ key: "foo"; value: number; }' is not assignable to type '{ key: "foo"; value: string; } | { key: "bar"; value: number; }'. -!!! error TS2322: Type '{ key: "foo"; value: number; }' is not assignable to type '{ key: "foo"; value: string; }'. -!!! error TS2322: Types of property 'value' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Types of property 'value' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. key: "foo", value: 3 }; diff --git a/tests/baselines/reference/nonObjectUnionNestedExcessPropertyCheck.errors.txt b/tests/baselines/reference/nonObjectUnionNestedExcessPropertyCheck.errors.txt index 4cf8a99e0ea..55cc7ea4c91 100644 --- a/tests/baselines/reference/nonObjectUnionNestedExcessPropertyCheck.errors.txt +++ b/tests/baselines/reference/nonObjectUnionNestedExcessPropertyCheck.errors.txt @@ -1,12 +1,13 @@ tests/cases/compiler/nonObjectUnionNestedExcessPropertyCheck.ts(13,35): error TS2322: Type '{ INVALID_PROP_NAME: string; iconProp: string; }' is not assignable to type 'number | IProps'. Object literal may only specify known properties, and 'INVALID_PROP_NAME' does not exist in type 'IProps'. -tests/cases/compiler/nonObjectUnionNestedExcessPropertyCheck.ts(16,7): error TS2322: Type '{ nestedProp: { asdfasdf: string; }; iconProp: string; }' is not assignable to type 'number | IProps'. - Type '{ nestedProp: { asdfasdf: string; }; iconProp: string; }' is not assignable to type 'IProps'. - Types of property 'nestedProp' are incompatible. - Type '{ asdfasdf: string; }' has no properties in common with type '{ testBool?: boolean; }'. -tests/cases/compiler/nonObjectUnionNestedExcessPropertyCheck.ts(19,56): error TS2326: Types of property 'nestedProps' are incompatible. - Type '{ INVALID_PROP_NAME: string; iconProp: string; }' is not assignable to type 'IProps'. - Object literal may only specify known properties, and 'INVALID_PROP_NAME' does not exist in type 'IProps'. +tests/cases/compiler/nonObjectUnionNestedExcessPropertyCheck.ts(16,49): error TS2322: Type '{ nestedProp: { asdfasdf: string; }; iconProp: string; }' is not assignable to type 'number | IProps'. + Types of property 'nestedProp' are incompatible. + Type '{ asdfasdf: string; }' is not assignable to type '{ testBool?: boolean; }'. + Object literal may only specify known properties, and 'asdfasdf' does not exist in type '{ testBool?: boolean; }'. +tests/cases/compiler/nonObjectUnionNestedExcessPropertyCheck.ts(19,56): error TS2322: Type '{ nestedProps: { INVALID_PROP_NAME: string; iconProp: string; }; }' is not assignable to type 'number | INestedProps'. + Types of property 'nestedProps' are incompatible. + Type '{ INVALID_PROP_NAME: string; iconProp: string; }' is not assignable to type 'IProps'. + Object literal may only specify known properties, and 'INVALID_PROP_NAME' does not exist in type 'IProps'. ==== tests/cases/compiler/nonObjectUnionNestedExcessPropertyCheck.ts (3 errors) ==== @@ -29,16 +30,17 @@ tests/cases/compiler/nonObjectUnionNestedExcessPropertyCheck.ts(19,56): error TS // Nested typing works here and we also get an expected error: const propB2: IProps | number = { nestedProp: { asdfasdf: 'test' }, iconProp: 'test' }; - ~~~~~~ + ~~~~~~~~~~~~~~~~ !!! error TS2322: Type '{ nestedProp: { asdfasdf: string; }; iconProp: string; }' is not assignable to type 'number | IProps'. -!!! error TS2322: Type '{ nestedProp: { asdfasdf: string; }; iconProp: string; }' is not assignable to type 'IProps'. -!!! error TS2322: Types of property 'nestedProp' are incompatible. -!!! error TS2322: Type '{ asdfasdf: string; }' has no properties in common with type '{ testBool?: boolean; }'. +!!! error TS2322: Types of property 'nestedProp' are incompatible. +!!! error TS2322: Type '{ asdfasdf: string; }' is not assignable to type '{ testBool?: boolean; }'. +!!! error TS2322: Object literal may only specify known properties, and 'asdfasdf' does not exist in type '{ testBool?: boolean; }'. // Want an error generated here but there isn't one. const propA1: INestedProps | number = { nestedProps: { INVALID_PROP_NAME: 'share', iconProp: 'test' } }; ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2326: Types of property 'nestedProps' are incompatible. -!!! error TS2326: Type '{ INVALID_PROP_NAME: string; iconProp: string; }' is not assignable to type 'IProps'. -!!! error TS2326: Object literal may only specify known properties, and 'INVALID_PROP_NAME' does not exist in type 'IProps'. +!!! error TS2322: Type '{ nestedProps: { INVALID_PROP_NAME: string; iconProp: string; }; }' is not assignable to type 'number | INestedProps'. +!!! error TS2322: Types of property 'nestedProps' are incompatible. +!!! error TS2322: Type '{ INVALID_PROP_NAME: string; iconProp: string; }' is not assignable to type 'IProps'. +!!! error TS2322: Object literal may only specify known properties, and 'INVALID_PROP_NAME' does not exist in type 'IProps'. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralsAgainstUnionsOfArrays01.errors.txt b/tests/baselines/reference/objectLiteralsAgainstUnionsOfArrays01.errors.txt index 5260d6a8da6..2959f29bbc9 100644 --- a/tests/baselines/reference/objectLiteralsAgainstUnionsOfArrays01.errors.txt +++ b/tests/baselines/reference/objectLiteralsAgainstUnionsOfArrays01.errors.txt @@ -1,7 +1,6 @@ tests/cases/compiler/objectLiteralsAgainstUnionsOfArrays01.ts(10,5): error TS2322: Type '{ prop: number; }' is not assignable to type 'Bar | Bar[]'. - Type '{ prop: number; }' is not assignable to type 'Bar'. - Types of property 'prop' are incompatible. - Type 'number' is not assignable to type 'string'. + Types of property 'prop' are incompatible. + Type 'number' is not assignable to type 'string'. ==== tests/cases/compiler/objectLiteralsAgainstUnionsOfArrays01.ts (1 errors) ==== @@ -17,9 +16,8 @@ tests/cases/compiler/objectLiteralsAgainstUnionsOfArrays01.ts(10,5): error TS232 { bar: { prop: 100 } } ~~~ !!! error TS2322: Type '{ prop: number; }' is not assignable to type 'Bar | Bar[]'. -!!! error TS2322: Type '{ prop: number; }' is not assignable to type 'Bar'. -!!! error TS2322: Types of property 'prop' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! error TS2322: Types of property 'prop' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. !!! related TS6500 tests/cases/compiler/objectLiteralsAgainstUnionsOfArrays01.ts:2:3: The expected type comes from property 'bar' which is declared here on type 'Foo' ] \ No newline at end of file diff --git a/tests/cases/compiler/excessPropertyCheckWithUnions.ts b/tests/cases/compiler/excessPropertyCheckWithUnions.ts index bb3e59151fc..635c5c2a7d3 100644 --- a/tests/cases/compiler/excessPropertyCheckWithUnions.ts +++ b/tests/cases/compiler/excessPropertyCheckWithUnions.ts @@ -87,3 +87,29 @@ const obj: Union = { // should have error here href: 'foo', }; + +// Repro from #34611 + +interface IValue { + value: string +} + +interface StringKeys { + [propertyName: string]: IValue; +}; + +interface NumberKeys { + [propertyName: number]: IValue; +} + +type ObjectDataSpecification = StringKeys | NumberKeys; + + +const dataSpecification: ObjectDataSpecification = { // Error + foo: "asdfsadffsd" +}; + +// Repro from #34611 + +const obj1: { [x: string]: number } | { [x: number]: number } = { a: 'abc' }; // Error +const obj2: { [x: string]: number } | { a: number } = { a: 5, c: 'abc' }; // Error From 2511f3438b3f84e298178835ab62a6564bc542df Mon Sep 17 00:00:00 2001 From: Sheon Han Date: Mon, 18 Nov 2019 10:36:23 -0500 Subject: [PATCH 19/50] fix: mardkown link syntax error (#35123) --- CONTRIBUTING.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 85fd6ddb233..785f4474e33 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -63,7 +63,7 @@ TypeScript is currently accepting contributions in the form of bug fixes. A bug ## Contributing features -Features (things that add new or improved functionality to TypeScript) may be accepted, but will need to first be approved ([labelled "help wanted"](https://github.com/Microsoft/TypeScript/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22 or in the "Backlog" milestone) by a TypeScript project maintainer) in the suggestion issue. Features with language design impact, or that are adequately satisfied with external tools, will not be accepted. +Features (things that add new or improved functionality to TypeScript) may be accepted, but will need to first be approved (labelled ["help wanted"](https://github.com/Microsoft/TypeScript/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) or in the "Backlog" milestone) by a TypeScript project maintainer) in the suggestion issue. Features with language design impact, or that are adequately satisfied with external tools, will not be accepted. Design changes will not be accepted at this time. If you have a design change proposal, please log a suggestion issue. @@ -71,19 +71,19 @@ Design changes will not be accepted at this time. If you have a design change pr You will need to complete a Contributor License Agreement (CLA). Briefly, this agreement testifies that you are granting us permission to use the submitted change according to the terms of the project's license, and that the work being submitted is under appropriate copyright. -Please submit a Contributor License Agreement (CLA) before submitting a pull request. You may visit https://cla.microsoft.com to sign digitally. Alternatively, download the agreement ([Microsoft Contribution License Agreement.pdf](https://opensource.microsoft.com/pdf/microsoft-contribution-license-agreement.pdf)), sign, scan, and email it back to . Be sure to include your GitHub user name along with the agreement. Once we have received the signed CLA, we'll review the request. +Please submit a Contributor License Agreement (CLA) before submitting a pull request. You may visit https://cla.microsoft.com to sign digitally. Alternatively, download the agreement ([Microsoft Contribution License Agreement.pdf](https://opensource.microsoft.com/pdf/microsoft-contribution-license-agreement.pdf)), sign, scan, and email it back to . Be sure to include your GitHub user name along with the agreement. Once we have received the signed CLA, we'll review the request. ## Housekeeping -Your pull request should: +Your pull request should: * Include a description of what your change intends to do -* Be a child commit of a reasonably recent commit in the **master** branch +* Be a child commit of a reasonably recent commit in the **master** branch * Requests need not be a single commit, but should be a linear sequence of commits (i.e. no merge commits in your PR) * It is desirable, but not necessary, for the tests to pass at each commit -* Have clear commit messages +* Have clear commit messages * e.g. "Minor refactor in goToTypeDefinition", "Fix iterated type in for-await-of", "Add test for preserveWatchOutput on command line" -* Include adequate tests +* Include adequate tests * At least one test should fail in the absence of your non-test code changes. If your PR does not match this criteria, please specify why * Tests should include reasonable permutations of the target fix/change * Include baseline changes with your change @@ -133,7 +133,7 @@ e.g. to run all compiler baseline tests: gulp runtests --tests=compiler ``` -or to run a specific test: `tests\cases\compiler\2dArrays.ts` +or to run a specific test: `tests\cases\compiler\2dArrays.ts` ```Shell gulp runtests --tests=2dArrays From e39bdc3606563124b39f4a8f22b8927bb99d3f2d Mon Sep 17 00:00:00 2001 From: Orta Date: Mon, 18 Nov 2019 12:05:54 -0500 Subject: [PATCH 20/50] Adds back the script to request a playrgound build (#35168) --- scripts/post-vsts-artifact-comment.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/post-vsts-artifact-comment.js b/scripts/post-vsts-artifact-comment.js index adaa2b8214b..d4de2b7c500 100644 --- a/scripts/post-vsts-artifact-comment.js +++ b/scripts/post-vsts-artifact-comment.js @@ -33,7 +33,7 @@ async function main() { // so that the playgrounds deployment process can find these comments. await gh.issues.createComment({ - number: +process.env.SOURCE_ISSUE, + issue_number: +process.env.SOURCE_ISSUE, owner: "Microsoft", repo: "TypeScript", body: `Hey @${process.env.REQUESTING_USER}, I've packed this into [an installable tgz](${link}). You can install it for testing by referencing it in your \`package.json\` like so: @@ -50,8 +50,7 @@ and then running \`npm install\`. // Temporarily disable until we get access controls set up right // Send a ping to https://github.com/orta/make-monaco-builds#pull-request-builds - // await gh.request("POST /repos/orta/make-monaco-builds/dispatches", - // { event_type: +process.env.SOURCE_ISSUE, headers: { "Accept": "application/vnd.github.everest-preview+json" }}) + await gh.request("POST /repos/orta/make-monaco-builds/dispatches", { event_type: process.env.SOURCE_ISSUE, headers: { Accept: "application/vnd.github.everest-preview+json" }}); } main().catch(async e => { From 8b837036328d8a0c1d54b182f7a28ddcf856c917 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Mon, 18 Nov 2019 13:11:36 -0800 Subject: [PATCH 21/50] Properly strip readonly from rest argument types (#35169) * Properly strip readonlyness from rest argument types * Add tests * Accept new baselines --- src/compiler/checker.ts | 8 +- .../genericRestParameters3.errors.txt | 58 +++++--- .../reference/genericRestParameters3.js | 30 +++- .../reference/genericRestParameters3.symbols | 135 +++++++++++------- .../reference/genericRestParameters3.types | 59 +++++++- .../types/rest/genericRestParameters3.ts | 16 ++- 6 files changed, 217 insertions(+), 89 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index b718c72c009..0931b235552 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -23682,10 +23682,10 @@ namespace ts { } function getArrayifiedType(type: Type) { - if (forEachType(type, t => !(t.flags & (TypeFlags.Any | TypeFlags.Instantiable) || isArrayType(t) || isTupleType(t)))) { - return createArrayType(getIndexedAccessType(type, numberType)); - } - return type; + return type.flags & TypeFlags.Union ? mapType(type, getArrayifiedType) : + type.flags & (TypeFlags.Any | TypeFlags.Instantiable) || isMutableArrayOrTuple(type) ? type : + isTupleType(type) ? createTupleType(getTypeArguments(type), type.target.minLength, type.target.hasRestElement, /*readonly*/ false, type.target.associatedNames) : + createArrayType(getIndexedAccessType(type, numberType)); } function getSpreadArgumentType(args: readonly Expression[], index: number, argCount: number, restType: Type, context: InferenceContext | undefined) { diff --git a/tests/baselines/reference/genericRestParameters3.errors.txt b/tests/baselines/reference/genericRestParameters3.errors.txt index 612140ea940..9e3e9d97de4 100644 --- a/tests/baselines/reference/genericRestParameters3.errors.txt +++ b/tests/baselines/reference/genericRestParameters3.errors.txt @@ -1,36 +1,36 @@ -tests/cases/conformance/types/rest/genericRestParameters3.ts(11,11): error TS2345: Argument of type '[10]' is not assignable to parameter of type '[string] | [number, boolean]'. +tests/cases/conformance/types/rest/genericRestParameters3.ts(17,11): error TS2345: Argument of type '[10]' is not assignable to parameter of type '[string] | [number, boolean]'. Type '[10]' is not assignable to type '[string]'. Type '10' is not assignable to type 'string'. -tests/cases/conformance/types/rest/genericRestParameters3.ts(12,1): error TS2345: Argument of type '[]' is not assignable to parameter of type '[string] | [number, boolean]'. +tests/cases/conformance/types/rest/genericRestParameters3.ts(18,1): error TS2345: Argument of type '[]' is not assignable to parameter of type '[string] | [number, boolean]'. Type '[]' is missing the following properties from type '[number, boolean]': 0, 1 -tests/cases/conformance/types/rest/genericRestParameters3.ts(16,1): error TS2322: Type '(x: string, ...args: [string] | [number, boolean]) => void' is not assignable to type '(...args: [string, string] | [string, number, boolean]) => void'. -tests/cases/conformance/types/rest/genericRestParameters3.ts(17,1): error TS2322: Type '(x: string, y: string) => void' is not assignable to type '(x: string, ...args: [string] | [number, boolean]) => void'. +tests/cases/conformance/types/rest/genericRestParameters3.ts(22,1): error TS2322: Type '(x: string, ...args: [string] | [number, boolean]) => void' is not assignable to type '(...args: [string, string] | [string, number, boolean]) => void'. +tests/cases/conformance/types/rest/genericRestParameters3.ts(23,1): error TS2322: Type '(x: string, y: string) => void' is not assignable to type '(x: string, ...args: [string] | [number, boolean]) => void'. Types of parameters 'y' and 'args' are incompatible. Type '[string] | [number, boolean]' is not assignable to type '[string]'. Type '[number, boolean]' is not assignable to type '[string]'. Types of property '0' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/rest/genericRestParameters3.ts(18,1): error TS2322: Type '(x: string, y: number, z: boolean) => void' is not assignable to type '(x: string, ...args: [string] | [number, boolean]) => void'. +tests/cases/conformance/types/rest/genericRestParameters3.ts(24,1): error TS2322: Type '(x: string, y: number, z: boolean) => void' is not assignable to type '(x: string, ...args: [string] | [number, boolean]) => void'. Types of parameters 'y' and 'args' are incompatible. Type '[string] | [number, boolean]' is not assignable to type '[number, boolean]'. Property '1' is missing in type '[string]' but required in type '[number, boolean]'. -tests/cases/conformance/types/rest/genericRestParameters3.ts(19,1): error TS2322: Type '(...args: [string, string] | [string, number, boolean]) => void' is not assignable to type '(x: string, ...args: [string] | [number, boolean]) => void'. -tests/cases/conformance/types/rest/genericRestParameters3.ts(29,1): error TS2554: Expected 1 arguments, but got 0. -tests/cases/conformance/types/rest/genericRestParameters3.ts(30,21): error TS2345: Argument of type '100' is not assignable to parameter of type '(...args: CoolArray) => void'. -tests/cases/conformance/types/rest/genericRestParameters3.ts(31,21): error TS2345: Argument of type '(cb: (...args: T) => void) => void' is not assignable to parameter of type '(...args: CoolArray) => void'. +tests/cases/conformance/types/rest/genericRestParameters3.ts(25,1): error TS2322: Type '(...args: [string, string] | [string, number, boolean]) => void' is not assignable to type '(x: string, ...args: [string] | [number, boolean]) => void'. +tests/cases/conformance/types/rest/genericRestParameters3.ts(35,1): error TS2554: Expected 1 arguments, but got 0. +tests/cases/conformance/types/rest/genericRestParameters3.ts(36,21): error TS2345: Argument of type '100' is not assignable to parameter of type '(...args: CoolArray) => void'. +tests/cases/conformance/types/rest/genericRestParameters3.ts(37,21): error TS2345: Argument of type '(cb: (...args: T) => void) => void' is not assignable to parameter of type '(...args: CoolArray) => void'. Types of parameters 'cb' and 'args' are incompatible. Property '0' is missing in type 'CoolArray' but required in type '[(...args: any[]) => void]'. -tests/cases/conformance/types/rest/genericRestParameters3.ts(38,32): error TS2345: Argument of type '[10, 20]' is not assignable to parameter of type 'CoolArray'. +tests/cases/conformance/types/rest/genericRestParameters3.ts(44,32): error TS2345: Argument of type '[10, 20]' is not assignable to parameter of type 'CoolArray'. Property 'hello' is missing in type '[10, 20]' but required in type 'CoolArray'. -tests/cases/conformance/types/rest/genericRestParameters3.ts(43,1): error TS2345: Argument of type '[]' is not assignable to parameter of type 'CoolArray'. +tests/cases/conformance/types/rest/genericRestParameters3.ts(49,1): error TS2345: Argument of type '[]' is not assignable to parameter of type 'CoolArray'. Property 'hello' is missing in type '[]' but required in type 'CoolArray'. -tests/cases/conformance/types/rest/genericRestParameters3.ts(44,5): error TS2345: Argument of type '[number]' is not assignable to parameter of type 'CoolArray'. +tests/cases/conformance/types/rest/genericRestParameters3.ts(50,5): error TS2345: Argument of type '[number]' is not assignable to parameter of type 'CoolArray'. Property 'hello' is missing in type '[number]' but required in type 'CoolArray'. -tests/cases/conformance/types/rest/genericRestParameters3.ts(45,5): error TS2345: Argument of type '[number, number]' is not assignable to parameter of type 'CoolArray'. +tests/cases/conformance/types/rest/genericRestParameters3.ts(51,5): error TS2345: Argument of type '[number, number]' is not assignable to parameter of type 'CoolArray'. Property 'hello' is missing in type '[number, number]' but required in type 'CoolArray'. -tests/cases/conformance/types/rest/genericRestParameters3.ts(46,5): error TS2345: Argument of type 'number[]' is not assignable to parameter of type 'CoolArray'. +tests/cases/conformance/types/rest/genericRestParameters3.ts(52,5): error TS2345: Argument of type 'number[]' is not assignable to parameter of type 'CoolArray'. Property 'hello' is missing in type 'number[]' but required in type 'CoolArray'. -tests/cases/conformance/types/rest/genericRestParameters3.ts(53,5): error TS2345: Argument of type '["what"]' is not assignable to parameter of type '[] | [number, string]'. +tests/cases/conformance/types/rest/genericRestParameters3.ts(59,5): error TS2345: Argument of type '["what"]' is not assignable to parameter of type '[] | [number, string]'. Property '1' is missing in type '["what"]' but required in type '[number, string]'. @@ -40,11 +40,17 @@ tests/cases/conformance/types/rest/genericRestParameters3.ts(53,5): error TS2345 declare let f3: (x: string, y: number, z: boolean) => void; declare let f4: (...args: [string, string] | [string, number, boolean]) => void; - declare const tt: [string] | [number, boolean]; + declare const t1: [string] | [number, boolean]; + declare const t2: readonly [string] | [number, boolean]; + declare const t3: [string] | readonly [number, boolean]; + declare const t4: readonly [string] | readonly [number, boolean]; f1("foo", "abc"); f1("foo", 10, true); - f1("foo", ...tt); + f1("foo", ...t1); + f1("foo", ...t2); + f1("foo", ...t3); + f1("foo", ...t4); f1("foo", 10); // Error ~~ !!! error TS2345: Argument of type '[10]' is not assignable to parameter of type '[string] | [number, boolean]'. @@ -89,7 +95,7 @@ tests/cases/conformance/types/rest/genericRestParameters3.ts(53,5): error TS2345 foo>(); // Error ~~~~~~~~~~~~~~~~~~~~~ !!! error TS2554: Expected 1 arguments, but got 0. -!!! related TS6210 tests/cases/conformance/types/rest/genericRestParameters3.ts:27:39: An argument for 'cb' was not provided. +!!! related TS6210 tests/cases/conformance/types/rest/genericRestParameters3.ts:33:39: An argument for 'cb' was not provided. foo>(100); // Error ~~~ !!! error TS2345: Argument of type '100' is not assignable to parameter of type '(...args: CoolArray) => void'. @@ -108,7 +114,7 @@ tests/cases/conformance/types/rest/genericRestParameters3.ts(53,5): error TS2345 ~~ !!! error TS2345: Argument of type '[10, 20]' is not assignable to parameter of type 'CoolArray'. !!! error TS2345: Property 'hello' is missing in type '[10, 20]' but required in type 'CoolArray'. -!!! related TS2728 tests/cases/conformance/types/rest/genericRestParameters3.ts:24:5: 'hello' is declared here. +!!! related TS2728 tests/cases/conformance/types/rest/genericRestParameters3.ts:30:5: 'hello' is declared here. declare function baz(...args: CoolArray): void; declare const ca: CoolArray; @@ -117,22 +123,22 @@ tests/cases/conformance/types/rest/genericRestParameters3.ts(53,5): error TS2345 ~~~~~ !!! error TS2345: Argument of type '[]' is not assignable to parameter of type 'CoolArray'. !!! error TS2345: Property 'hello' is missing in type '[]' but required in type 'CoolArray'. -!!! related TS2728 tests/cases/conformance/types/rest/genericRestParameters3.ts:24:5: 'hello' is declared here. +!!! related TS2728 tests/cases/conformance/types/rest/genericRestParameters3.ts:30:5: 'hello' is declared here. baz(1); // Error ~ !!! error TS2345: Argument of type '[number]' is not assignable to parameter of type 'CoolArray'. !!! error TS2345: Property 'hello' is missing in type '[number]' but required in type 'CoolArray'. -!!! related TS2728 tests/cases/conformance/types/rest/genericRestParameters3.ts:24:5: 'hello' is declared here. +!!! related TS2728 tests/cases/conformance/types/rest/genericRestParameters3.ts:30:5: 'hello' is declared here. baz(1, 2); // Error ~ !!! error TS2345: Argument of type '[number, number]' is not assignable to parameter of type 'CoolArray'. !!! error TS2345: Property 'hello' is missing in type '[number, number]' but required in type 'CoolArray'. -!!! related TS2728 tests/cases/conformance/types/rest/genericRestParameters3.ts:24:5: 'hello' is declared here. +!!! related TS2728 tests/cases/conformance/types/rest/genericRestParameters3.ts:30:5: 'hello' is declared here. baz(...ca); // Error ~~~~~ !!! error TS2345: Argument of type 'number[]' is not assignable to parameter of type 'CoolArray'. !!! error TS2345: Property 'hello' is missing in type 'number[]' but required in type 'CoolArray'. -!!! related TS2728 tests/cases/conformance/types/rest/genericRestParameters3.ts:24:5: 'hello' is declared here. +!!! related TS2728 tests/cases/conformance/types/rest/genericRestParameters3.ts:30:5: 'hello' is declared here. // Repro from #26491 @@ -143,4 +149,10 @@ tests/cases/conformance/types/rest/genericRestParameters3.ts(53,5): error TS2345 ~~~~~~ !!! error TS2345: Argument of type '["what"]' is not assignable to parameter of type '[] | [number, string]'. !!! error TS2345: Property '1' is missing in type '["what"]' but required in type '[number, string]'. + + // Repro from #35066 + + declare function foo2(...args: string[] | number[]): void; + let x2: ReadonlyArray = ["hello"]; + foo2(...x2); \ No newline at end of file diff --git a/tests/baselines/reference/genericRestParameters3.js b/tests/baselines/reference/genericRestParameters3.js index 48a54e399f0..6767fa094c9 100644 --- a/tests/baselines/reference/genericRestParameters3.js +++ b/tests/baselines/reference/genericRestParameters3.js @@ -4,11 +4,17 @@ declare let f2: (x: string, y: string) => void; declare let f3: (x: string, y: number, z: boolean) => void; declare let f4: (...args: [string, string] | [string, number, boolean]) => void; -declare const tt: [string] | [number, boolean]; +declare const t1: [string] | [number, boolean]; +declare const t2: readonly [string] | [number, boolean]; +declare const t3: [string] | readonly [number, boolean]; +declare const t4: readonly [string] | readonly [number, boolean]; f1("foo", "abc"); f1("foo", 10, true); -f1("foo", ...tt); +f1("foo", ...t1); +f1("foo", ...t2); +f1("foo", ...t3); +f1("foo", ...t4); f1("foo", 10); // Error f1("foo"); // Error @@ -52,6 +58,12 @@ declare function hmm(...args: A): void; hmm(); // okay, A = [] hmm(1, "s"); // okay, A = [1, "s"] hmm("what"); // no error? A = [] | [number, string] ? + +// Repro from #35066 + +declare function foo2(...args: string[] | number[]): void; +let x2: ReadonlyArray = ["hello"]; +foo2(...x2); //// [genericRestParameters3.js] @@ -65,7 +77,10 @@ var __spreadArrays = (this && this.__spreadArrays) || function () { }; f1("foo", "abc"); f1("foo", 10, true); -f1.apply(void 0, __spreadArrays(["foo"], tt)); +f1.apply(void 0, __spreadArrays(["foo"], t1)); +f1.apply(void 0, __spreadArrays(["foo"], t2)); +f1.apply(void 0, __spreadArrays(["foo"], t3)); +f1.apply(void 0, __spreadArrays(["foo"], t4)); f1("foo", 10); // Error f1("foo"); // Error f2 = f1; @@ -93,6 +108,8 @@ baz.apply(void 0, ca); // Error hmm(); // okay, A = [] hmm(1, "s"); // okay, A = [1, "s"] hmm("what"); // no error? A = [] | [number, string] ? +var x2 = ["hello"]; +foo2.apply(void 0, x2); //// [genericRestParameters3.d.ts] @@ -100,7 +117,10 @@ declare let f1: (x: string, ...args: [string] | [number, boolean]) => void; declare let f2: (x: string, y: string) => void; declare let f3: (x: string, y: number, z: boolean) => void; declare let f4: (...args: [string, string] | [string, number, boolean]) => void; -declare const tt: [string] | [number, boolean]; +declare const t1: [string] | [number, boolean]; +declare const t2: readonly [string] | [number, boolean]; +declare const t3: [string] | readonly [number, boolean]; +declare const t4: readonly [string] | readonly [number, boolean]; interface CoolArray extends Array { hello: number; } @@ -111,3 +131,5 @@ declare let b: any; declare function baz(...args: CoolArray): void; declare const ca: CoolArray; declare function hmm(...args: A): void; +declare function foo2(...args: string[] | number[]): void; +declare let x2: ReadonlyArray; diff --git a/tests/baselines/reference/genericRestParameters3.symbols b/tests/baselines/reference/genericRestParameters3.symbols index a768f205b57..9bad8685db1 100644 --- a/tests/baselines/reference/genericRestParameters3.symbols +++ b/tests/baselines/reference/genericRestParameters3.symbols @@ -19,8 +19,17 @@ declare let f4: (...args: [string, string] | [string, number, boolean]) => void; >f4 : Symbol(f4, Decl(genericRestParameters3.ts, 3, 11)) >args : Symbol(args, Decl(genericRestParameters3.ts, 3, 17)) -declare const tt: [string] | [number, boolean]; ->tt : Symbol(tt, Decl(genericRestParameters3.ts, 5, 13)) +declare const t1: [string] | [number, boolean]; +>t1 : Symbol(t1, Decl(genericRestParameters3.ts, 5, 13)) + +declare const t2: readonly [string] | [number, boolean]; +>t2 : Symbol(t2, Decl(genericRestParameters3.ts, 6, 13)) + +declare const t3: [string] | readonly [number, boolean]; +>t3 : Symbol(t3, Decl(genericRestParameters3.ts, 7, 13)) + +declare const t4: readonly [string] | readonly [number, boolean]; +>t4 : Symbol(t4, Decl(genericRestParameters3.ts, 8, 13)) f1("foo", "abc"); >f1 : Symbol(f1, Decl(genericRestParameters3.ts, 0, 11)) @@ -28,9 +37,21 @@ f1("foo", "abc"); f1("foo", 10, true); >f1 : Symbol(f1, Decl(genericRestParameters3.ts, 0, 11)) -f1("foo", ...tt); +f1("foo", ...t1); >f1 : Symbol(f1, Decl(genericRestParameters3.ts, 0, 11)) ->tt : Symbol(tt, Decl(genericRestParameters3.ts, 5, 13)) +>t1 : Symbol(t1, Decl(genericRestParameters3.ts, 5, 13)) + +f1("foo", ...t2); +>f1 : Symbol(f1, Decl(genericRestParameters3.ts, 0, 11)) +>t2 : Symbol(t2, Decl(genericRestParameters3.ts, 6, 13)) + +f1("foo", ...t3); +>f1 : Symbol(f1, Decl(genericRestParameters3.ts, 0, 11)) +>t3 : Symbol(t3, Decl(genericRestParameters3.ts, 7, 13)) + +f1("foo", ...t4); +>f1 : Symbol(f1, Decl(genericRestParameters3.ts, 0, 11)) +>t4 : Symbol(t4, Decl(genericRestParameters3.ts, 8, 13)) f1("foo", 10); // Error >f1 : Symbol(f1, Decl(genericRestParameters3.ts, 0, 11)) @@ -65,93 +86,107 @@ f1 = f4; // Error, misaligned complex rest types // Repro from #26110 interface CoolArray extends Array { ->CoolArray : Symbol(CoolArray, Decl(genericRestParameters3.ts, 18, 8)) ->E : Symbol(E, Decl(genericRestParameters3.ts, 22, 20)) +>CoolArray : Symbol(CoolArray, Decl(genericRestParameters3.ts, 24, 8)) +>E : Symbol(E, Decl(genericRestParameters3.ts, 28, 20)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->E : Symbol(E, Decl(genericRestParameters3.ts, 22, 20)) +>E : Symbol(E, Decl(genericRestParameters3.ts, 28, 20)) hello: number; ->hello : Symbol(CoolArray.hello, Decl(genericRestParameters3.ts, 22, 41)) +>hello : Symbol(CoolArray.hello, Decl(genericRestParameters3.ts, 28, 41)) } declare function foo(cb: (...args: T) => void): void; ->foo : Symbol(foo, Decl(genericRestParameters3.ts, 24, 1)) ->T : Symbol(T, Decl(genericRestParameters3.ts, 26, 21)) ->cb : Symbol(cb, Decl(genericRestParameters3.ts, 26, 38)) ->args : Symbol(args, Decl(genericRestParameters3.ts, 26, 43)) ->T : Symbol(T, Decl(genericRestParameters3.ts, 26, 21)) +>foo : Symbol(foo, Decl(genericRestParameters3.ts, 30, 1)) +>T : Symbol(T, Decl(genericRestParameters3.ts, 32, 21)) +>cb : Symbol(cb, Decl(genericRestParameters3.ts, 32, 38)) +>args : Symbol(args, Decl(genericRestParameters3.ts, 32, 43)) +>T : Symbol(T, Decl(genericRestParameters3.ts, 32, 21)) foo>(); // Error ->foo : Symbol(foo, Decl(genericRestParameters3.ts, 24, 1)) ->CoolArray : Symbol(CoolArray, Decl(genericRestParameters3.ts, 18, 8)) +>foo : Symbol(foo, Decl(genericRestParameters3.ts, 30, 1)) +>CoolArray : Symbol(CoolArray, Decl(genericRestParameters3.ts, 24, 8)) foo>(100); // Error ->foo : Symbol(foo, Decl(genericRestParameters3.ts, 24, 1)) ->CoolArray : Symbol(CoolArray, Decl(genericRestParameters3.ts, 18, 8)) +>foo : Symbol(foo, Decl(genericRestParameters3.ts, 30, 1)) +>CoolArray : Symbol(CoolArray, Decl(genericRestParameters3.ts, 24, 8)) foo>(foo); // Error ->foo : Symbol(foo, Decl(genericRestParameters3.ts, 24, 1)) ->CoolArray : Symbol(CoolArray, Decl(genericRestParameters3.ts, 18, 8)) ->foo : Symbol(foo, Decl(genericRestParameters3.ts, 24, 1)) +>foo : Symbol(foo, Decl(genericRestParameters3.ts, 30, 1)) +>CoolArray : Symbol(CoolArray, Decl(genericRestParameters3.ts, 24, 8)) +>foo : Symbol(foo, Decl(genericRestParameters3.ts, 30, 1)) function bar(...args: T): T { ->bar : Symbol(bar, Decl(genericRestParameters3.ts, 30, 25)) ->T : Symbol(T, Decl(genericRestParameters3.ts, 32, 13)) ->args : Symbol(args, Decl(genericRestParameters3.ts, 32, 30)) ->T : Symbol(T, Decl(genericRestParameters3.ts, 32, 13)) ->T : Symbol(T, Decl(genericRestParameters3.ts, 32, 13)) +>bar : Symbol(bar, Decl(genericRestParameters3.ts, 36, 25)) +>T : Symbol(T, Decl(genericRestParameters3.ts, 38, 13)) +>args : Symbol(args, Decl(genericRestParameters3.ts, 38, 30)) +>T : Symbol(T, Decl(genericRestParameters3.ts, 38, 13)) +>T : Symbol(T, Decl(genericRestParameters3.ts, 38, 13)) return args; ->args : Symbol(args, Decl(genericRestParameters3.ts, 32, 30)) +>args : Symbol(args, Decl(genericRestParameters3.ts, 38, 30)) } let a = bar(10, 20); ->a : Symbol(a, Decl(genericRestParameters3.ts, 36, 3)) ->bar : Symbol(bar, Decl(genericRestParameters3.ts, 30, 25)) +>a : Symbol(a, Decl(genericRestParameters3.ts, 42, 3)) +>bar : Symbol(bar, Decl(genericRestParameters3.ts, 36, 25)) let b = bar>(10, 20); // Error ->b : Symbol(b, Decl(genericRestParameters3.ts, 37, 3)) ->bar : Symbol(bar, Decl(genericRestParameters3.ts, 30, 25)) ->CoolArray : Symbol(CoolArray, Decl(genericRestParameters3.ts, 18, 8)) +>b : Symbol(b, Decl(genericRestParameters3.ts, 43, 3)) +>bar : Symbol(bar, Decl(genericRestParameters3.ts, 36, 25)) +>CoolArray : Symbol(CoolArray, Decl(genericRestParameters3.ts, 24, 8)) declare function baz(...args: CoolArray): void; ->baz : Symbol(baz, Decl(genericRestParameters3.ts, 37, 39)) ->T : Symbol(T, Decl(genericRestParameters3.ts, 39, 21)) ->args : Symbol(args, Decl(genericRestParameters3.ts, 39, 24)) ->CoolArray : Symbol(CoolArray, Decl(genericRestParameters3.ts, 18, 8)) ->T : Symbol(T, Decl(genericRestParameters3.ts, 39, 21)) +>baz : Symbol(baz, Decl(genericRestParameters3.ts, 43, 39)) +>T : Symbol(T, Decl(genericRestParameters3.ts, 45, 21)) +>args : Symbol(args, Decl(genericRestParameters3.ts, 45, 24)) +>CoolArray : Symbol(CoolArray, Decl(genericRestParameters3.ts, 24, 8)) +>T : Symbol(T, Decl(genericRestParameters3.ts, 45, 21)) declare const ca: CoolArray; ->ca : Symbol(ca, Decl(genericRestParameters3.ts, 40, 13)) ->CoolArray : Symbol(CoolArray, Decl(genericRestParameters3.ts, 18, 8)) +>ca : Symbol(ca, Decl(genericRestParameters3.ts, 46, 13)) +>CoolArray : Symbol(CoolArray, Decl(genericRestParameters3.ts, 24, 8)) baz(); // Error ->baz : Symbol(baz, Decl(genericRestParameters3.ts, 37, 39)) +>baz : Symbol(baz, Decl(genericRestParameters3.ts, 43, 39)) baz(1); // Error ->baz : Symbol(baz, Decl(genericRestParameters3.ts, 37, 39)) +>baz : Symbol(baz, Decl(genericRestParameters3.ts, 43, 39)) baz(1, 2); // Error ->baz : Symbol(baz, Decl(genericRestParameters3.ts, 37, 39)) +>baz : Symbol(baz, Decl(genericRestParameters3.ts, 43, 39)) baz(...ca); // Error ->baz : Symbol(baz, Decl(genericRestParameters3.ts, 37, 39)) ->ca : Symbol(ca, Decl(genericRestParameters3.ts, 40, 13)) +>baz : Symbol(baz, Decl(genericRestParameters3.ts, 43, 39)) +>ca : Symbol(ca, Decl(genericRestParameters3.ts, 46, 13)) // Repro from #26491 declare function hmm(...args: A): void; ->hmm : Symbol(hmm, Decl(genericRestParameters3.ts, 45, 11)) ->A : Symbol(A, Decl(genericRestParameters3.ts, 49, 21)) ->args : Symbol(args, Decl(genericRestParameters3.ts, 49, 54)) ->A : Symbol(A, Decl(genericRestParameters3.ts, 49, 21)) +>hmm : Symbol(hmm, Decl(genericRestParameters3.ts, 51, 11)) +>A : Symbol(A, Decl(genericRestParameters3.ts, 55, 21)) +>args : Symbol(args, Decl(genericRestParameters3.ts, 55, 54)) +>A : Symbol(A, Decl(genericRestParameters3.ts, 55, 21)) hmm(); // okay, A = [] ->hmm : Symbol(hmm, Decl(genericRestParameters3.ts, 45, 11)) +>hmm : Symbol(hmm, Decl(genericRestParameters3.ts, 51, 11)) hmm(1, "s"); // okay, A = [1, "s"] ->hmm : Symbol(hmm, Decl(genericRestParameters3.ts, 45, 11)) +>hmm : Symbol(hmm, Decl(genericRestParameters3.ts, 51, 11)) hmm("what"); // no error? A = [] | [number, string] ? ->hmm : Symbol(hmm, Decl(genericRestParameters3.ts, 45, 11)) +>hmm : Symbol(hmm, Decl(genericRestParameters3.ts, 51, 11)) + +// Repro from #35066 + +declare function foo2(...args: string[] | number[]): void; +>foo2 : Symbol(foo2, Decl(genericRestParameters3.ts, 58, 12)) +>args : Symbol(args, Decl(genericRestParameters3.ts, 62, 22)) + +let x2: ReadonlyArray = ["hello"]; +>x2 : Symbol(x2, Decl(genericRestParameters3.ts, 63, 3)) +>ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --)) + +foo2(...x2); +>foo2 : Symbol(foo2, Decl(genericRestParameters3.ts, 58, 12)) +>x2 : Symbol(x2, Decl(genericRestParameters3.ts, 63, 3)) diff --git a/tests/baselines/reference/genericRestParameters3.types b/tests/baselines/reference/genericRestParameters3.types index 8d8d145a44f..a0d90a308d7 100644 --- a/tests/baselines/reference/genericRestParameters3.types +++ b/tests/baselines/reference/genericRestParameters3.types @@ -19,8 +19,17 @@ declare let f4: (...args: [string, string] | [string, number, boolean]) => void; >f4 : (...args: [string, string] | [string, number, boolean]) => void >args : [string, string] | [string, number, boolean] -declare const tt: [string] | [number, boolean]; ->tt : [string] | [number, boolean] +declare const t1: [string] | [number, boolean]; +>t1 : [string] | [number, boolean] + +declare const t2: readonly [string] | [number, boolean]; +>t2 : [number, boolean] | readonly [string] + +declare const t3: [string] | readonly [number, boolean]; +>t3 : [string] | readonly [number, boolean] + +declare const t4: readonly [string] | readonly [number, boolean]; +>t4 : readonly [string] | readonly [number, boolean] f1("foo", "abc"); >f1("foo", "abc") : void @@ -35,12 +44,33 @@ f1("foo", 10, true); >10 : 10 >true : true -f1("foo", ...tt); ->f1("foo", ...tt) : void +f1("foo", ...t1); +>f1("foo", ...t1) : void >f1 : (x: string, ...args: [string] | [number, boolean]) => void >"foo" : "foo" ->...tt : string | number | boolean ->tt : [string] | [number, boolean] +>...t1 : string | number | boolean +>t1 : [string] | [number, boolean] + +f1("foo", ...t2); +>f1("foo", ...t2) : void +>f1 : (x: string, ...args: [string] | [number, boolean]) => void +>"foo" : "foo" +>...t2 : string | number | boolean +>t2 : [number, boolean] | readonly [string] + +f1("foo", ...t3); +>f1("foo", ...t3) : void +>f1 : (x: string, ...args: [string] | [number, boolean]) => void +>"foo" : "foo" +>...t3 : string | number | boolean +>t3 : [string] | readonly [number, boolean] + +f1("foo", ...t4); +>f1("foo", ...t4) : void +>f1 : (x: string, ...args: [string] | [number, boolean]) => void +>"foo" : "foo" +>...t4 : string | number | boolean +>t4 : readonly [string] | readonly [number, boolean] f1("foo", 10); // Error >f1("foo", 10) : void @@ -180,3 +210,20 @@ hmm("what"); // no error? A = [] | [number, string] ? >hmm : (...args: A) => void >"what" : "what" +// Repro from #35066 + +declare function foo2(...args: string[] | number[]): void; +>foo2 : (...args: string[] | number[]) => void +>args : string[] | number[] + +let x2: ReadonlyArray = ["hello"]; +>x2 : readonly string[] +>["hello"] : string[] +>"hello" : "hello" + +foo2(...x2); +>foo2(...x2) : void +>foo2 : (...args: string[] | number[]) => void +>...x2 : string +>x2 : readonly string[] + diff --git a/tests/cases/conformance/types/rest/genericRestParameters3.ts b/tests/cases/conformance/types/rest/genericRestParameters3.ts index e2e2a3a3fba..4bcc4741695 100644 --- a/tests/cases/conformance/types/rest/genericRestParameters3.ts +++ b/tests/cases/conformance/types/rest/genericRestParameters3.ts @@ -6,11 +6,17 @@ declare let f2: (x: string, y: string) => void; declare let f3: (x: string, y: number, z: boolean) => void; declare let f4: (...args: [string, string] | [string, number, boolean]) => void; -declare const tt: [string] | [number, boolean]; +declare const t1: [string] | [number, boolean]; +declare const t2: readonly [string] | [number, boolean]; +declare const t3: [string] | readonly [number, boolean]; +declare const t4: readonly [string] | readonly [number, boolean]; f1("foo", "abc"); f1("foo", 10, true); -f1("foo", ...tt); +f1("foo", ...t1); +f1("foo", ...t2); +f1("foo", ...t3); +f1("foo", ...t4); f1("foo", 10); // Error f1("foo"); // Error @@ -54,3 +60,9 @@ declare function hmm(...args: A): void; hmm(); // okay, A = [] hmm(1, "s"); // okay, A = [1, "s"] hmm("what"); // no error? A = [] | [number, string] ? + +// Repro from #35066 + +declare function foo2(...args: string[] | number[]): void; +let x2: ReadonlyArray = ["hello"]; +foo2(...x2); From fce728e07fe0a4aa43ecc505419467cd09caacfd Mon Sep 17 00:00:00 2001 From: Klaus Meinhardt Date: Tue, 19 Nov 2019 01:34:47 +0100 Subject: [PATCH 22/50] fix emit for delete on optional chain (#35090) * fix emit for delete on optional chain * Apply suggestions from code review Co-Authored-By: Ron Buckton --- src/compiler/transformers/esnext.ts | 38 ++-- tests/baselines/reference/deleteChain.js | 42 +++++ tests/baselines/reference/deleteChain.symbols | 143 +++++++++++++++ tests/baselines/reference/deleteChain.types | 173 ++++++++++++++++++ .../optionalChaining/delete/deleteChain.ts | 26 +++ 5 files changed, 406 insertions(+), 16 deletions(-) create mode 100644 tests/baselines/reference/deleteChain.js create mode 100644 tests/baselines/reference/deleteChain.symbols create mode 100644 tests/baselines/reference/deleteChain.types create mode 100644 tests/cases/conformance/expressions/optionalChaining/delete/deleteChain.ts diff --git a/src/compiler/transformers/esnext.ts b/src/compiler/transformers/esnext.ts index ab3ecdc9228..2300feeb0e2 100644 --- a/src/compiler/transformers/esnext.ts +++ b/src/compiler/transformers/esnext.ts @@ -24,7 +24,7 @@ namespace ts { case SyntaxKind.ElementAccessExpression: case SyntaxKind.CallExpression: if (node.flags & NodeFlags.OptionalChain) { - const updated = visitOptionalExpression(node as OptionalChain, /*captureThisArg*/ false); + const updated = visitOptionalExpression(node as OptionalChain, /*captureThisArg*/ false, /*isDelete*/ false); Debug.assertNotNode(updated, isSyntheticReference); return updated; } @@ -34,6 +34,8 @@ namespace ts { return transformNullishCoalescingExpression(node); } return visitEachChild(node, visitor, context); + case SyntaxKind.DeleteExpression: + return visitDeleteExpression(node as DeleteExpression); default: return visitEachChild(node, visitor, context); } @@ -48,8 +50,8 @@ namespace ts { return { expression: chain.expression, chain: links }; } - function visitNonOptionalParenthesizedExpression(node: ParenthesizedExpression, captureThisArg: boolean): Expression { - const expression = visitNonOptionalExpression(node.expression, captureThisArg); + function visitNonOptionalParenthesizedExpression(node: ParenthesizedExpression, captureThisArg: boolean, isDelete: boolean): Expression { + const expression = visitNonOptionalExpression(node.expression, captureThisArg, isDelete); if (isSyntheticReference(expression)) { // `(a.b)` -> { expression `((_a = a).b)`, thisArg: `_a` } // `(a[b])` -> { expression `((_a = a)[b])`, thisArg: `_a` } @@ -58,10 +60,10 @@ namespace ts { return updateParen(node, expression); } - function visitNonOptionalPropertyOrElementAccessExpression(node: AccessExpression, captureThisArg: boolean): Expression { + function visitNonOptionalPropertyOrElementAccessExpression(node: AccessExpression, captureThisArg: boolean, isDelete: boolean): Expression { if (isOptionalChain(node)) { // If `node` is an optional chain, then it is the outermost chain of an optional expression. - return visitOptionalExpression(node, captureThisArg); + return visitOptionalExpression(node, captureThisArg, isDelete); } let expression: Expression = visitNode(node.expression, visitor, isExpression); @@ -87,24 +89,24 @@ namespace ts { function visitNonOptionalCallExpression(node: CallExpression, captureThisArg: boolean): Expression { if (isOptionalChain(node)) { // If `node` is an optional chain, then it is the outermost chain of an optional expression. - return visitOptionalExpression(node, captureThisArg); + return visitOptionalExpression(node, captureThisArg, /*isDelete*/ false); } return visitEachChild(node, visitor, context); } - function visitNonOptionalExpression(node: Expression, captureThisArg: boolean): Expression { + function visitNonOptionalExpression(node: Expression, captureThisArg: boolean, isDelete: boolean): Expression { switch (node.kind) { - case SyntaxKind.ParenthesizedExpression: return visitNonOptionalParenthesizedExpression(node as ParenthesizedExpression, captureThisArg); + case SyntaxKind.ParenthesizedExpression: return visitNonOptionalParenthesizedExpression(node as ParenthesizedExpression, captureThisArg, isDelete); case SyntaxKind.PropertyAccessExpression: - case SyntaxKind.ElementAccessExpression: return visitNonOptionalPropertyOrElementAccessExpression(node as AccessExpression, captureThisArg); + case SyntaxKind.ElementAccessExpression: return visitNonOptionalPropertyOrElementAccessExpression(node as AccessExpression, captureThisArg, isDelete); case SyntaxKind.CallExpression: return visitNonOptionalCallExpression(node as CallExpression, captureThisArg); default: return visitNode(node, visitor, isExpression); } } - function visitOptionalExpression(node: OptionalChain, captureThisArg: boolean): Expression { + function visitOptionalExpression(node: OptionalChain, captureThisArg: boolean, isDelete: boolean): Expression { const { expression, chain } = flattenChain(node); - const left = visitNonOptionalExpression(expression, isCallChain(chain[0])); + const left = visitNonOptionalExpression(expression, isCallChain(chain[0]), /*isDelete*/ false); const leftThisArg = isSyntheticReference(left) ? left.thisArg : undefined; let leftExpression = isSyntheticReference(left) ? left.expression : left; let capturedLeft: Expression = leftExpression; @@ -152,11 +154,9 @@ namespace ts { setOriginalNode(rightExpression, segment); } - const target = createConditional( - createNotNullCondition(leftExpression, capturedLeft, /*invert*/ true), - createVoidZero(), - rightExpression, - ); + const target = isDelete + ? createConditional(createNotNullCondition(leftExpression, capturedLeft, /*invert*/ true), createTrue(), createDelete(rightExpression)) + : createConditional(createNotNullCondition(leftExpression, capturedLeft, /*invert*/ true), createVoidZero(), rightExpression); return thisArg ? createSyntheticReferenceExpression(target, thisArg) : target; } @@ -197,5 +197,11 @@ namespace ts { expression.kind !== SyntaxKind.ThisKeyword && expression.kind !== SyntaxKind.SuperKeyword; } + + function visitDeleteExpression(node: DeleteExpression) { + return isOptionalChain(skipParentheses(node.expression)) + ? setOriginalNode(visitNonOptionalExpression(node.expression, /*captureThisArg*/ false, /*isDelete*/ true), node) + : updateDelete(node, visitNode(node.expression, visitor, isExpression)); + } } } diff --git a/tests/baselines/reference/deleteChain.js b/tests/baselines/reference/deleteChain.js new file mode 100644 index 00000000000..1cf168d2724 --- /dev/null +++ b/tests/baselines/reference/deleteChain.js @@ -0,0 +1,42 @@ +//// [deleteChain.ts] +declare const o1: undefined | { b: string }; +delete o1?.b; +delete (o1?.b); + +declare const o2: undefined | { b: { c: string } }; +delete o2?.b.c; +delete (o2?.b.c); + +declare const o3: { b: undefined | { c: string } }; +delete o3.b?.c; +delete (o3.b?.c); + +declare const o4: { b?: { c: { d?: { e: string } } } }; +delete o4.b?.c.d?.e; +delete (o4.b?.c.d)?.e; +delete (o4.b?.c.d?.e); + +declare const o5: { b?(): { c: { d?: { e: string } } } }; +delete o5.b?.().c.d?.e; +delete (o5.b?.().c.d?.e); + +declare const o6: { b?: { c: { d?: { e: string } } } }; +delete o6.b?.['c'].d?.['e']; +delete (o6.b?.['c'].d?.['e']); + +//// [deleteChain.js] +"use strict"; +var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r; +o1 === null || o1 === void 0 ? true : delete o1.b; +(o1 === null || o1 === void 0 ? true : delete o1.b); +o2 === null || o2 === void 0 ? true : delete o2.b.c; +(o2 === null || o2 === void 0 ? true : delete o2.b.c); +(_a = o3.b) === null || _a === void 0 ? true : delete _a.c; +((_b = o3.b) === null || _b === void 0 ? true : delete _b.c); +(_d = (_c = o4.b) === null || _c === void 0 ? void 0 : _c.c.d) === null || _d === void 0 ? true : delete _d.e; +(_f = ((_e = o4.b) === null || _e === void 0 ? void 0 : _e.c.d)) === null || _f === void 0 ? true : delete _f.e; +((_h = (_g = o4.b) === null || _g === void 0 ? void 0 : _g.c.d) === null || _h === void 0 ? true : delete _h.e); +(_k = (_j = o5.b) === null || _j === void 0 ? void 0 : _j.call(o5).c.d) === null || _k === void 0 ? true : delete _k.e; +((_m = (_l = o5.b) === null || _l === void 0 ? void 0 : _l.call(o5).c.d) === null || _m === void 0 ? true : delete _m.e); +(_p = (_o = o6.b) === null || _o === void 0 ? void 0 : _o['c'].d) === null || _p === void 0 ? true : delete _p['e']; +((_r = (_q = o6.b) === null || _q === void 0 ? void 0 : _q['c'].d) === null || _r === void 0 ? true : delete _r['e']); diff --git a/tests/baselines/reference/deleteChain.symbols b/tests/baselines/reference/deleteChain.symbols new file mode 100644 index 00000000000..7efc0abae47 --- /dev/null +++ b/tests/baselines/reference/deleteChain.symbols @@ -0,0 +1,143 @@ +=== tests/cases/conformance/expressions/optionalChaining/delete/deleteChain.ts === +declare const o1: undefined | { b: string }; +>o1 : Symbol(o1, Decl(deleteChain.ts, 0, 13)) +>b : Symbol(b, Decl(deleteChain.ts, 0, 31)) + +delete o1?.b; +>o1?.b : Symbol(b, Decl(deleteChain.ts, 0, 31)) +>o1 : Symbol(o1, Decl(deleteChain.ts, 0, 13)) +>b : Symbol(b, Decl(deleteChain.ts, 0, 31)) + +delete (o1?.b); +>o1?.b : Symbol(b, Decl(deleteChain.ts, 0, 31)) +>o1 : Symbol(o1, Decl(deleteChain.ts, 0, 13)) +>b : Symbol(b, Decl(deleteChain.ts, 0, 31)) + +declare const o2: undefined | { b: { c: string } }; +>o2 : Symbol(o2, Decl(deleteChain.ts, 4, 13)) +>b : Symbol(b, Decl(deleteChain.ts, 4, 31)) +>c : Symbol(c, Decl(deleteChain.ts, 4, 36)) + +delete o2?.b.c; +>o2?.b.c : Symbol(c, Decl(deleteChain.ts, 4, 36)) +>o2?.b : Symbol(b, Decl(deleteChain.ts, 4, 31)) +>o2 : Symbol(o2, Decl(deleteChain.ts, 4, 13)) +>b : Symbol(b, Decl(deleteChain.ts, 4, 31)) +>c : Symbol(c, Decl(deleteChain.ts, 4, 36)) + +delete (o2?.b.c); +>o2?.b.c : Symbol(c, Decl(deleteChain.ts, 4, 36)) +>o2?.b : Symbol(b, Decl(deleteChain.ts, 4, 31)) +>o2 : Symbol(o2, Decl(deleteChain.ts, 4, 13)) +>b : Symbol(b, Decl(deleteChain.ts, 4, 31)) +>c : Symbol(c, Decl(deleteChain.ts, 4, 36)) + +declare const o3: { b: undefined | { c: string } }; +>o3 : Symbol(o3, Decl(deleteChain.ts, 8, 13)) +>b : Symbol(b, Decl(deleteChain.ts, 8, 19)) +>c : Symbol(c, Decl(deleteChain.ts, 8, 36)) + +delete o3.b?.c; +>o3.b?.c : Symbol(c, Decl(deleteChain.ts, 8, 36)) +>o3.b : Symbol(b, Decl(deleteChain.ts, 8, 19)) +>o3 : Symbol(o3, Decl(deleteChain.ts, 8, 13)) +>b : Symbol(b, Decl(deleteChain.ts, 8, 19)) +>c : Symbol(c, Decl(deleteChain.ts, 8, 36)) + +delete (o3.b?.c); +>o3.b?.c : Symbol(c, Decl(deleteChain.ts, 8, 36)) +>o3.b : Symbol(b, Decl(deleteChain.ts, 8, 19)) +>o3 : Symbol(o3, Decl(deleteChain.ts, 8, 13)) +>b : Symbol(b, Decl(deleteChain.ts, 8, 19)) +>c : Symbol(c, Decl(deleteChain.ts, 8, 36)) + +declare const o4: { b?: { c: { d?: { e: string } } } }; +>o4 : Symbol(o4, Decl(deleteChain.ts, 12, 13)) +>b : Symbol(b, Decl(deleteChain.ts, 12, 19)) +>c : Symbol(c, Decl(deleteChain.ts, 12, 25)) +>d : Symbol(d, Decl(deleteChain.ts, 12, 30)) +>e : Symbol(e, Decl(deleteChain.ts, 12, 36)) + +delete o4.b?.c.d?.e; +>o4.b?.c.d?.e : Symbol(e, Decl(deleteChain.ts, 12, 36)) +>o4.b?.c.d : Symbol(d, Decl(deleteChain.ts, 12, 30)) +>o4.b?.c : Symbol(c, Decl(deleteChain.ts, 12, 25)) +>o4.b : Symbol(b, Decl(deleteChain.ts, 12, 19)) +>o4 : Symbol(o4, Decl(deleteChain.ts, 12, 13)) +>b : Symbol(b, Decl(deleteChain.ts, 12, 19)) +>c : Symbol(c, Decl(deleteChain.ts, 12, 25)) +>d : Symbol(d, Decl(deleteChain.ts, 12, 30)) +>e : Symbol(e, Decl(deleteChain.ts, 12, 36)) + +delete (o4.b?.c.d)?.e; +>(o4.b?.c.d)?.e : Symbol(e, Decl(deleteChain.ts, 12, 36)) +>o4.b?.c.d : Symbol(d, Decl(deleteChain.ts, 12, 30)) +>o4.b?.c : Symbol(c, Decl(deleteChain.ts, 12, 25)) +>o4.b : Symbol(b, Decl(deleteChain.ts, 12, 19)) +>o4 : Symbol(o4, Decl(deleteChain.ts, 12, 13)) +>b : Symbol(b, Decl(deleteChain.ts, 12, 19)) +>c : Symbol(c, Decl(deleteChain.ts, 12, 25)) +>d : Symbol(d, Decl(deleteChain.ts, 12, 30)) +>e : Symbol(e, Decl(deleteChain.ts, 12, 36)) + +delete (o4.b?.c.d?.e); +>o4.b?.c.d?.e : Symbol(e, Decl(deleteChain.ts, 12, 36)) +>o4.b?.c.d : Symbol(d, Decl(deleteChain.ts, 12, 30)) +>o4.b?.c : Symbol(c, Decl(deleteChain.ts, 12, 25)) +>o4.b : Symbol(b, Decl(deleteChain.ts, 12, 19)) +>o4 : Symbol(o4, Decl(deleteChain.ts, 12, 13)) +>b : Symbol(b, Decl(deleteChain.ts, 12, 19)) +>c : Symbol(c, Decl(deleteChain.ts, 12, 25)) +>d : Symbol(d, Decl(deleteChain.ts, 12, 30)) +>e : Symbol(e, Decl(deleteChain.ts, 12, 36)) + +declare const o5: { b?(): { c: { d?: { e: string } } } }; +>o5 : Symbol(o5, Decl(deleteChain.ts, 17, 13)) +>b : Symbol(b, Decl(deleteChain.ts, 17, 19)) +>c : Symbol(c, Decl(deleteChain.ts, 17, 27)) +>d : Symbol(d, Decl(deleteChain.ts, 17, 32)) +>e : Symbol(e, Decl(deleteChain.ts, 17, 38)) + +delete o5.b?.().c.d?.e; +>o5.b?.().c.d?.e : Symbol(e, Decl(deleteChain.ts, 17, 38)) +>o5.b?.().c.d : Symbol(d, Decl(deleteChain.ts, 17, 32)) +>o5.b?.().c : Symbol(c, Decl(deleteChain.ts, 17, 27)) +>o5.b : Symbol(b, Decl(deleteChain.ts, 17, 19)) +>o5 : Symbol(o5, Decl(deleteChain.ts, 17, 13)) +>b : Symbol(b, Decl(deleteChain.ts, 17, 19)) +>c : Symbol(c, Decl(deleteChain.ts, 17, 27)) +>d : Symbol(d, Decl(deleteChain.ts, 17, 32)) +>e : Symbol(e, Decl(deleteChain.ts, 17, 38)) + +delete (o5.b?.().c.d?.e); +>o5.b?.().c.d?.e : Symbol(e, Decl(deleteChain.ts, 17, 38)) +>o5.b?.().c.d : Symbol(d, Decl(deleteChain.ts, 17, 32)) +>o5.b?.().c : Symbol(c, Decl(deleteChain.ts, 17, 27)) +>o5.b : Symbol(b, Decl(deleteChain.ts, 17, 19)) +>o5 : Symbol(o5, Decl(deleteChain.ts, 17, 13)) +>b : Symbol(b, Decl(deleteChain.ts, 17, 19)) +>c : Symbol(c, Decl(deleteChain.ts, 17, 27)) +>d : Symbol(d, Decl(deleteChain.ts, 17, 32)) +>e : Symbol(e, Decl(deleteChain.ts, 17, 38)) + +declare const o6: { b?: { c: { d?: { e: string } } } }; +>o6 : Symbol(o6, Decl(deleteChain.ts, 21, 13)) +>b : Symbol(b, Decl(deleteChain.ts, 21, 19)) +>c : Symbol(c, Decl(deleteChain.ts, 21, 25)) +>d : Symbol(d, Decl(deleteChain.ts, 21, 30)) +>e : Symbol(e, Decl(deleteChain.ts, 21, 36)) + +delete o6.b?.['c'].d?.['e']; +>o6.b?.['c'].d : Symbol(d, Decl(deleteChain.ts, 21, 30)) +>o6.b : Symbol(b, Decl(deleteChain.ts, 21, 19)) +>o6 : Symbol(o6, Decl(deleteChain.ts, 21, 13)) +>b : Symbol(b, Decl(deleteChain.ts, 21, 19)) +>d : Symbol(d, Decl(deleteChain.ts, 21, 30)) + +delete (o6.b?.['c'].d?.['e']); +>o6.b?.['c'].d : Symbol(d, Decl(deleteChain.ts, 21, 30)) +>o6.b : Symbol(b, Decl(deleteChain.ts, 21, 19)) +>o6 : Symbol(o6, Decl(deleteChain.ts, 21, 13)) +>b : Symbol(b, Decl(deleteChain.ts, 21, 19)) +>d : Symbol(d, Decl(deleteChain.ts, 21, 30)) + diff --git a/tests/baselines/reference/deleteChain.types b/tests/baselines/reference/deleteChain.types new file mode 100644 index 00000000000..ab7fd8e65b1 --- /dev/null +++ b/tests/baselines/reference/deleteChain.types @@ -0,0 +1,173 @@ +=== tests/cases/conformance/expressions/optionalChaining/delete/deleteChain.ts === +declare const o1: undefined | { b: string }; +>o1 : { b: string; } | undefined +>b : string + +delete o1?.b; +>delete o1?.b : boolean +>o1?.b : string | undefined +>o1 : { b: string; } | undefined +>b : string | undefined + +delete (o1?.b); +>delete (o1?.b) : boolean +>(o1?.b) : string | undefined +>o1?.b : string | undefined +>o1 : { b: string; } | undefined +>b : string | undefined + +declare const o2: undefined | { b: { c: string } }; +>o2 : { b: { c: string; }; } | undefined +>b : { c: string; } +>c : string + +delete o2?.b.c; +>delete o2?.b.c : boolean +>o2?.b.c : string | undefined +>o2?.b : { c: string; } | undefined +>o2 : { b: { c: string; }; } | undefined +>b : { c: string; } | undefined +>c : string | undefined + +delete (o2?.b.c); +>delete (o2?.b.c) : boolean +>(o2?.b.c) : string | undefined +>o2?.b.c : string | undefined +>o2?.b : { c: string; } | undefined +>o2 : { b: { c: string; }; } | undefined +>b : { c: string; } | undefined +>c : string | undefined + +declare const o3: { b: undefined | { c: string } }; +>o3 : { b: { c: string; } | undefined; } +>b : { c: string; } | undefined +>c : string + +delete o3.b?.c; +>delete o3.b?.c : boolean +>o3.b?.c : string | undefined +>o3.b : { c: string; } | undefined +>o3 : { b: { c: string; } | undefined; } +>b : { c: string; } | undefined +>c : string | undefined + +delete (o3.b?.c); +>delete (o3.b?.c) : boolean +>(o3.b?.c) : string | undefined +>o3.b?.c : string | undefined +>o3.b : { c: string; } | undefined +>o3 : { b: { c: string; } | undefined; } +>b : { c: string; } | undefined +>c : string | undefined + +declare const o4: { b?: { c: { d?: { e: string } } } }; +>o4 : { b?: { c: { d?: { e: string; } | undefined; }; } | undefined; } +>b : { c: { d?: { e: string; } | undefined; }; } | undefined +>c : { d?: { e: string; } | undefined; } +>d : { e: string; } | undefined +>e : string + +delete o4.b?.c.d?.e; +>delete o4.b?.c.d?.e : boolean +>o4.b?.c.d?.e : string | undefined +>o4.b?.c.d : { e: string; } | undefined +>o4.b?.c : { d?: { e: string; } | undefined; } | undefined +>o4.b : { c: { d?: { e: string; } | undefined; }; } | undefined +>o4 : { b?: { c: { d?: { e: string; } | undefined; }; } | undefined; } +>b : { c: { d?: { e: string; } | undefined; }; } | undefined +>c : { d?: { e: string; } | undefined; } | undefined +>d : { e: string; } | undefined +>e : string | undefined + +delete (o4.b?.c.d)?.e; +>delete (o4.b?.c.d)?.e : boolean +>(o4.b?.c.d)?.e : string | undefined +>(o4.b?.c.d) : { e: string; } | undefined +>o4.b?.c.d : { e: string; } | undefined +>o4.b?.c : { d?: { e: string; } | undefined; } | undefined +>o4.b : { c: { d?: { e: string; } | undefined; }; } | undefined +>o4 : { b?: { c: { d?: { e: string; } | undefined; }; } | undefined; } +>b : { c: { d?: { e: string; } | undefined; }; } | undefined +>c : { d?: { e: string; } | undefined; } | undefined +>d : { e: string; } | undefined +>e : string | undefined + +delete (o4.b?.c.d?.e); +>delete (o4.b?.c.d?.e) : boolean +>(o4.b?.c.d?.e) : string | undefined +>o4.b?.c.d?.e : string | undefined +>o4.b?.c.d : { e: string; } | undefined +>o4.b?.c : { d?: { e: string; } | undefined; } | undefined +>o4.b : { c: { d?: { e: string; } | undefined; }; } | undefined +>o4 : { b?: { c: { d?: { e: string; } | undefined; }; } | undefined; } +>b : { c: { d?: { e: string; } | undefined; }; } | undefined +>c : { d?: { e: string; } | undefined; } | undefined +>d : { e: string; } | undefined +>e : string | undefined + +declare const o5: { b?(): { c: { d?: { e: string } } } }; +>o5 : { b?(): { c: { d?: { e: string; } | undefined; }; }; } +>b : (() => { c: { d?: { e: string; } | undefined; }; }) | undefined +>c : { d?: { e: string; } | undefined; } +>d : { e: string; } | undefined +>e : string + +delete o5.b?.().c.d?.e; +>delete o5.b?.().c.d?.e : boolean +>o5.b?.().c.d?.e : string | undefined +>o5.b?.().c.d : { e: string; } | undefined +>o5.b?.().c : { d?: { e: string; } | undefined; } | undefined +>o5.b?.() : { c: { d?: { e: string; } | undefined; }; } | undefined +>o5.b : (() => { c: { d?: { e: string; } | undefined; }; }) | undefined +>o5 : { b?(): { c: { d?: { e: string; } | undefined; }; }; } +>b : (() => { c: { d?: { e: string; } | undefined; }; }) | undefined +>c : { d?: { e: string; } | undefined; } | undefined +>d : { e: string; } | undefined +>e : string | undefined + +delete (o5.b?.().c.d?.e); +>delete (o5.b?.().c.d?.e) : boolean +>(o5.b?.().c.d?.e) : string | undefined +>o5.b?.().c.d?.e : string | undefined +>o5.b?.().c.d : { e: string; } | undefined +>o5.b?.().c : { d?: { e: string; } | undefined; } | undefined +>o5.b?.() : { c: { d?: { e: string; } | undefined; }; } | undefined +>o5.b : (() => { c: { d?: { e: string; } | undefined; }; }) | undefined +>o5 : { b?(): { c: { d?: { e: string; } | undefined; }; }; } +>b : (() => { c: { d?: { e: string; } | undefined; }; }) | undefined +>c : { d?: { e: string; } | undefined; } | undefined +>d : { e: string; } | undefined +>e : string | undefined + +declare const o6: { b?: { c: { d?: { e: string } } } }; +>o6 : { b?: { c: { d?: { e: string; } | undefined; }; } | undefined; } +>b : { c: { d?: { e: string; } | undefined; }; } | undefined +>c : { d?: { e: string; } | undefined; } +>d : { e: string; } | undefined +>e : string + +delete o6.b?.['c'].d?.['e']; +>delete o6.b?.['c'].d?.['e'] : boolean +>o6.b?.['c'].d?.['e'] : string | undefined +>o6.b?.['c'].d : { e: string; } | undefined +>o6.b?.['c'] : { d?: { e: string; } | undefined; } | undefined +>o6.b : { c: { d?: { e: string; } | undefined; }; } | undefined +>o6 : { b?: { c: { d?: { e: string; } | undefined; }; } | undefined; } +>b : { c: { d?: { e: string; } | undefined; }; } | undefined +>'c' : "c" +>d : { e: string; } | undefined +>'e' : "e" + +delete (o6.b?.['c'].d?.['e']); +>delete (o6.b?.['c'].d?.['e']) : boolean +>(o6.b?.['c'].d?.['e']) : string | undefined +>o6.b?.['c'].d?.['e'] : string | undefined +>o6.b?.['c'].d : { e: string; } | undefined +>o6.b?.['c'] : { d?: { e: string; } | undefined; } | undefined +>o6.b : { c: { d?: { e: string; } | undefined; }; } | undefined +>o6 : { b?: { c: { d?: { e: string; } | undefined; }; } | undefined; } +>b : { c: { d?: { e: string; } | undefined; }; } | undefined +>'c' : "c" +>d : { e: string; } | undefined +>'e' : "e" + diff --git a/tests/cases/conformance/expressions/optionalChaining/delete/deleteChain.ts b/tests/cases/conformance/expressions/optionalChaining/delete/deleteChain.ts new file mode 100644 index 00000000000..878689704b7 --- /dev/null +++ b/tests/cases/conformance/expressions/optionalChaining/delete/deleteChain.ts @@ -0,0 +1,26 @@ +// @strict: true + +declare const o1: undefined | { b: string }; +delete o1?.b; +delete (o1?.b); + +declare const o2: undefined | { b: { c: string } }; +delete o2?.b.c; +delete (o2?.b.c); + +declare const o3: { b: undefined | { c: string } }; +delete o3.b?.c; +delete (o3.b?.c); + +declare const o4: { b?: { c: { d?: { e: string } } } }; +delete o4.b?.c.d?.e; +delete (o4.b?.c.d)?.e; +delete (o4.b?.c.d?.e); + +declare const o5: { b?(): { c: { d?: { e: string } } } }; +delete o5.b?.().c.d?.e; +delete (o5.b?.().c.d?.e); + +declare const o6: { b?: { c: { d?: { e: string } } } }; +delete o6.b?.['c'].d?.['e']; +delete (o6.b?.['c'].d?.['e']); \ No newline at end of file From 6c59dc34acb84a9cd8b5d28a384a98bbc6dccab6 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Mon, 18 Nov 2019 18:03:37 -0800 Subject: [PATCH 23/50] More tests for super.method call chain, improve vary-by (#35013) --- src/harness/harness.ts | 85 +++++++++++++++++-- src/testRunner/compilerRunner.ts | 26 +++++- .../callChainWithSuper(target=es2016).js | 18 ++++ .../callChainWithSuper(target=es2017).js | 18 ++++ .../callChainWithSuper(target=es2018).js | 18 ++++ .../callChainWithSuper(target=es2019).js | 18 ++++ .../callChainWithSuper(target=es2020).js | 18 ++++ .../callChainWithSuper(target=es5).js | 39 +++++++++ .../callChainWithSuper(target=es6).js | 18 ++++ .../callChainWithSuper(target=esnext).js | 18 ++++ ...tionalMethodDeclarations(target=es2016).js | 13 +++ ...tionalMethodDeclarations(target=esnext).js | 13 +++ .../optionalMethodDeclarations.ts | 8 ++ .../callChain/callChainWithSuper.ts | 10 +++ 14 files changed, 314 insertions(+), 6 deletions(-) create mode 100644 tests/baselines/reference/callChainWithSuper(target=es2016).js create mode 100644 tests/baselines/reference/callChainWithSuper(target=es2017).js create mode 100644 tests/baselines/reference/callChainWithSuper(target=es2018).js create mode 100644 tests/baselines/reference/callChainWithSuper(target=es2019).js create mode 100644 tests/baselines/reference/callChainWithSuper(target=es2020).js create mode 100644 tests/baselines/reference/callChainWithSuper(target=es5).js create mode 100644 tests/baselines/reference/callChainWithSuper(target=es6).js create mode 100644 tests/baselines/reference/callChainWithSuper(target=esnext).js create mode 100644 tests/baselines/reference/optionalMethodDeclarations(target=es2016).js create mode 100644 tests/baselines/reference/optionalMethodDeclarations(target=esnext).js create mode 100644 tests/cases/conformance/classes/methodDeclarations/optionalMethodDeclarations.ts create mode 100644 tests/cases/conformance/expressions/optionalChaining/callChain/callChainWithSuper.ts diff --git a/src/harness/harness.ts b/src/harness/harness.ts index e93033e126b..198e79dd9c3 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -1412,10 +1412,65 @@ namespace Harness { [key: string]: string; } - function splitVaryBySettingValue(text: string): string[] | undefined { + function splitVaryBySettingValue(text: string, varyBy: string): string[] | undefined { if (!text) return undefined; - const entries = text.split(/,/).map(s => s.trim().toLowerCase()).filter(s => s.length > 0); - return entries && entries.length > 1 ? entries : undefined; + + let star = false; + const includes: string[] = []; + const excludes: string[] = []; + for (let s of text.split(/,/g)) { + s = s.trim().toLowerCase(); + if (s.length === 0) continue; + if (s === "*") { + star = true; + } + else if (ts.startsWith(s, "-") || ts.startsWith(s, "!")) { + excludes.push(s.slice(1)); + } + else { + includes.push(s); + } + } + + // do nothing if the setting has no variations + if (includes.length <= 1 && !star && excludes.length === 0) { + return undefined; + } + + const variations: { key: string, value?: string | number }[] = []; + const values = getVaryByStarSettingValues(varyBy); + + // add (and deduplicate) all included entries + for (const include of includes) { + const value = values?.get(include); + if (ts.findIndex(variations, v => v.key === include || value !== undefined && v.value === value) === -1) { + variations.push({ key: include, value }); + } + } + + if (star && values) { + // add all entries + for (const [key, value] of ts.arrayFrom(values.entries())) { + if (ts.findIndex(variations, v => v.key === key || v.value === value) === -1) { + variations.push({ key, value }); + } + } + } + + // remove all excluded entries + for (const exclude of excludes) { + const value = values?.get(exclude); + let index: number; + while ((index = ts.findIndex(variations, v => v.key === exclude || value !== undefined && v.value === value)) >= 0) { + ts.orderedRemoveItemAt(variations, index); + } + } + + if (variations.length === 0) { + throw new Error(`Variations in test option '@${varyBy}' resulted in an empty set.`); + } + + return ts.map(variations, v => v.key); } function computeFileBasedTestConfigurationVariations(configurations: FileBasedTestConfiguration[], variationState: FileBasedTestConfiguration, varyByEntries: [string, string[]][], offset: number) { @@ -1433,17 +1488,37 @@ namespace Harness { } } + let booleanVaryByStarSettingValues: ts.Map | undefined; + + function getVaryByStarSettingValues(varyBy: string): ts.ReadonlyMap | undefined { + const option = ts.forEach(ts.optionDeclarations, decl => ts.equateStringsCaseInsensitive(decl.name, varyBy) ? decl : undefined); + if (option) { + if (typeof option.type === "object") { + return option.type; + } + if (option.type === "boolean") { + return booleanVaryByStarSettingValues || (booleanVaryByStarSettingValues = ts.createMapFromTemplate({ + true: 1, + false: 0 + })); + } + } + } + /** * Compute FileBasedTestConfiguration variations based on a supplied list of variable settings. */ - export function getFileBasedTestConfigurations(settings: TestCaseParser.CompilerSettings, varyBy: string[]): FileBasedTestConfiguration[] | undefined { + export function getFileBasedTestConfigurations(settings: TestCaseParser.CompilerSettings, varyBy: readonly string[]): FileBasedTestConfiguration[] | undefined { let varyByEntries: [string, string[]][] | undefined; + let variationCount = 1; for (const varyByKey of varyBy) { if (ts.hasProperty(settings, varyByKey)) { // we only consider variations when there are 2 or more variable entries. - const entries = splitVaryBySettingValue(settings[varyByKey]); + const entries = splitVaryBySettingValue(settings[varyByKey], varyByKey); if (entries) { if (!varyByEntries) varyByEntries = []; + variationCount *= entries.length; + if (variationCount > 25) throw new Error(`Provided test options exceeded the maximum number of variations: ${varyBy.map(v => `'@${v}'`).join(", ")}`); varyByEntries.push([varyByKey, entries]); } } diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index e922fab5bcf..2a99b34d5a0 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -112,6 +112,30 @@ class CompilerBaselineRunner extends RunnerBase { } class CompilerTest { + private static varyBy: readonly string[] = [ + "module", + "target", + "jsx", + "removeComments", + "importHelpers", + "importHelpers", + "downlevelIteration", + "isolatedModules", + "strict", + "noImplicitAny", + "strictNullChecks", + "strictFunctionTypes", + "strictBindCallApply", + "strictPropertyInitialization", + "noImplicitThis", + "alwaysStrict", + "allowSyntheticDefaultImports", + "esModuleInterop", + "emitDecoratorMetadata", + "skipDefaultLibCheck", + "preserveConstEnums", + "skipLibCheck", + ]; private fileName: string; private justName: string; private configuredName: string; @@ -220,7 +244,7 @@ class CompilerTest { // also see `parseCompilerTestConfigurations` in tests/webTestServer.ts const content = Harness.IO.readFile(file)!; const settings = Harness.TestCaseParser.extractCompilerSettings(content); - const configurations = Harness.getFileBasedTestConfigurations(settings, /*varyBy*/ ["module", "target"]); + const configurations = Harness.getFileBasedTestConfigurations(settings, CompilerTest.varyBy); return { file, configurations, content }; } diff --git a/tests/baselines/reference/callChainWithSuper(target=es2016).js b/tests/baselines/reference/callChainWithSuper(target=es2016).js new file mode 100644 index 00000000000..fcfbb5db553 --- /dev/null +++ b/tests/baselines/reference/callChainWithSuper(target=es2016).js @@ -0,0 +1,18 @@ +//// [callChainWithSuper.ts] +// GH#34952 +class Base { method?() {} } +class Derived extends Base { + method1() { return super.method?.(); } + method2() { return super["method"]?.(); } +} + +//// [callChainWithSuper.js] +"use strict"; +// GH#34952 +class Base { + method() { } +} +class Derived extends Base { + method1() { var _a; return (_a = super.method) === null || _a === void 0 ? void 0 : _a.call(this); } + method2() { var _a; return (_a = super["method"]) === null || _a === void 0 ? void 0 : _a.call(this); } +} diff --git a/tests/baselines/reference/callChainWithSuper(target=es2017).js b/tests/baselines/reference/callChainWithSuper(target=es2017).js new file mode 100644 index 00000000000..fcfbb5db553 --- /dev/null +++ b/tests/baselines/reference/callChainWithSuper(target=es2017).js @@ -0,0 +1,18 @@ +//// [callChainWithSuper.ts] +// GH#34952 +class Base { method?() {} } +class Derived extends Base { + method1() { return super.method?.(); } + method2() { return super["method"]?.(); } +} + +//// [callChainWithSuper.js] +"use strict"; +// GH#34952 +class Base { + method() { } +} +class Derived extends Base { + method1() { var _a; return (_a = super.method) === null || _a === void 0 ? void 0 : _a.call(this); } + method2() { var _a; return (_a = super["method"]) === null || _a === void 0 ? void 0 : _a.call(this); } +} diff --git a/tests/baselines/reference/callChainWithSuper(target=es2018).js b/tests/baselines/reference/callChainWithSuper(target=es2018).js new file mode 100644 index 00000000000..fcfbb5db553 --- /dev/null +++ b/tests/baselines/reference/callChainWithSuper(target=es2018).js @@ -0,0 +1,18 @@ +//// [callChainWithSuper.ts] +// GH#34952 +class Base { method?() {} } +class Derived extends Base { + method1() { return super.method?.(); } + method2() { return super["method"]?.(); } +} + +//// [callChainWithSuper.js] +"use strict"; +// GH#34952 +class Base { + method() { } +} +class Derived extends Base { + method1() { var _a; return (_a = super.method) === null || _a === void 0 ? void 0 : _a.call(this); } + method2() { var _a; return (_a = super["method"]) === null || _a === void 0 ? void 0 : _a.call(this); } +} diff --git a/tests/baselines/reference/callChainWithSuper(target=es2019).js b/tests/baselines/reference/callChainWithSuper(target=es2019).js new file mode 100644 index 00000000000..fcfbb5db553 --- /dev/null +++ b/tests/baselines/reference/callChainWithSuper(target=es2019).js @@ -0,0 +1,18 @@ +//// [callChainWithSuper.ts] +// GH#34952 +class Base { method?() {} } +class Derived extends Base { + method1() { return super.method?.(); } + method2() { return super["method"]?.(); } +} + +//// [callChainWithSuper.js] +"use strict"; +// GH#34952 +class Base { + method() { } +} +class Derived extends Base { + method1() { var _a; return (_a = super.method) === null || _a === void 0 ? void 0 : _a.call(this); } + method2() { var _a; return (_a = super["method"]) === null || _a === void 0 ? void 0 : _a.call(this); } +} diff --git a/tests/baselines/reference/callChainWithSuper(target=es2020).js b/tests/baselines/reference/callChainWithSuper(target=es2020).js new file mode 100644 index 00000000000..fcfbb5db553 --- /dev/null +++ b/tests/baselines/reference/callChainWithSuper(target=es2020).js @@ -0,0 +1,18 @@ +//// [callChainWithSuper.ts] +// GH#34952 +class Base { method?() {} } +class Derived extends Base { + method1() { return super.method?.(); } + method2() { return super["method"]?.(); } +} + +//// [callChainWithSuper.js] +"use strict"; +// GH#34952 +class Base { + method() { } +} +class Derived extends Base { + method1() { var _a; return (_a = super.method) === null || _a === void 0 ? void 0 : _a.call(this); } + method2() { var _a; return (_a = super["method"]) === null || _a === void 0 ? void 0 : _a.call(this); } +} diff --git a/tests/baselines/reference/callChainWithSuper(target=es5).js b/tests/baselines/reference/callChainWithSuper(target=es5).js new file mode 100644 index 00000000000..5487991bc29 --- /dev/null +++ b/tests/baselines/reference/callChainWithSuper(target=es5).js @@ -0,0 +1,39 @@ +//// [callChainWithSuper.ts] +// GH#34952 +class Base { method?() {} } +class Derived extends Base { + method1() { return super.method?.(); } + method2() { return super["method"]?.(); } +} + +//// [callChainWithSuper.js] +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +// GH#34952 +var Base = /** @class */ (function () { + function Base() { + } + Base.prototype.method = function () { }; + return Base; +}()); +var Derived = /** @class */ (function (_super) { + __extends(Derived, _super); + function Derived() { + return _super !== null && _super.apply(this, arguments) || this; + } + Derived.prototype.method1 = function () { var _a; return (_a = _super.prototype.method) === null || _a === void 0 ? void 0 : _a.call(this); }; + Derived.prototype.method2 = function () { var _a; return (_a = _super.prototype["method"]) === null || _a === void 0 ? void 0 : _a.call(this); }; + return Derived; +}(Base)); diff --git a/tests/baselines/reference/callChainWithSuper(target=es6).js b/tests/baselines/reference/callChainWithSuper(target=es6).js new file mode 100644 index 00000000000..fcfbb5db553 --- /dev/null +++ b/tests/baselines/reference/callChainWithSuper(target=es6).js @@ -0,0 +1,18 @@ +//// [callChainWithSuper.ts] +// GH#34952 +class Base { method?() {} } +class Derived extends Base { + method1() { return super.method?.(); } + method2() { return super["method"]?.(); } +} + +//// [callChainWithSuper.js] +"use strict"; +// GH#34952 +class Base { + method() { } +} +class Derived extends Base { + method1() { var _a; return (_a = super.method) === null || _a === void 0 ? void 0 : _a.call(this); } + method2() { var _a; return (_a = super["method"]) === null || _a === void 0 ? void 0 : _a.call(this); } +} diff --git a/tests/baselines/reference/callChainWithSuper(target=esnext).js b/tests/baselines/reference/callChainWithSuper(target=esnext).js new file mode 100644 index 00000000000..30e1ad3886d --- /dev/null +++ b/tests/baselines/reference/callChainWithSuper(target=esnext).js @@ -0,0 +1,18 @@ +//// [callChainWithSuper.ts] +// GH#34952 +class Base { method?() {} } +class Derived extends Base { + method1() { return super.method?.(); } + method2() { return super["method"]?.(); } +} + +//// [callChainWithSuper.js] +"use strict"; +// GH#34952 +class Base { + method() { } +} +class Derived extends Base { + method1() { return super.method?.(); } + method2() { return super["method"]?.(); } +} diff --git a/tests/baselines/reference/optionalMethodDeclarations(target=es2016).js b/tests/baselines/reference/optionalMethodDeclarations(target=es2016).js new file mode 100644 index 00000000000..2b37bff7d80 --- /dev/null +++ b/tests/baselines/reference/optionalMethodDeclarations(target=es2016).js @@ -0,0 +1,13 @@ +//// [optionalMethodDeclarations.ts] +// https://github.com/microsoft/TypeScript/issues/34952#issuecomment-552025027 +class C { + // ? should be removed in emit + method?() {} +} + +//// [optionalMethodDeclarations.js] +// https://github.com/microsoft/TypeScript/issues/34952#issuecomment-552025027 +class C { + // ? should be removed in emit + method() { } +} diff --git a/tests/baselines/reference/optionalMethodDeclarations(target=esnext).js b/tests/baselines/reference/optionalMethodDeclarations(target=esnext).js new file mode 100644 index 00000000000..2b37bff7d80 --- /dev/null +++ b/tests/baselines/reference/optionalMethodDeclarations(target=esnext).js @@ -0,0 +1,13 @@ +//// [optionalMethodDeclarations.ts] +// https://github.com/microsoft/TypeScript/issues/34952#issuecomment-552025027 +class C { + // ? should be removed in emit + method?() {} +} + +//// [optionalMethodDeclarations.js] +// https://github.com/microsoft/TypeScript/issues/34952#issuecomment-552025027 +class C { + // ? should be removed in emit + method() { } +} diff --git a/tests/cases/conformance/classes/methodDeclarations/optionalMethodDeclarations.ts b/tests/cases/conformance/classes/methodDeclarations/optionalMethodDeclarations.ts new file mode 100644 index 00000000000..d1bd1a8d2d0 --- /dev/null +++ b/tests/cases/conformance/classes/methodDeclarations/optionalMethodDeclarations.ts @@ -0,0 +1,8 @@ +// @target: esnext,es2016 +// @noTypesAndSymbols: true + +// https://github.com/microsoft/TypeScript/issues/34952#issuecomment-552025027 +class C { + // ? should be removed in emit + method?() {} +} \ No newline at end of file diff --git a/tests/cases/conformance/expressions/optionalChaining/callChain/callChainWithSuper.ts b/tests/cases/conformance/expressions/optionalChaining/callChain/callChainWithSuper.ts new file mode 100644 index 00000000000..d66c71b1c3a --- /dev/null +++ b/tests/cases/conformance/expressions/optionalChaining/callChain/callChainWithSuper.ts @@ -0,0 +1,10 @@ +// @target: *,-es3 +// @strict: true +// @noTypesAndSymbols: true + +// GH#34952 +class Base { method?() {} } +class Derived extends Base { + method1() { return super.method?.(); } + method2() { return super["method"]?.(); } +} \ No newline at end of file From af0d5d33b63714f70bb1bfe6c7b7afafffc8aaa1 Mon Sep 17 00:00:00 2001 From: Orta Date: Tue, 19 Nov 2019 12:13:50 -0500 Subject: [PATCH 24/50] Improve positioning of the implement interface codefix (#34928) --- .../fixClassIncorrectlyImplementsInterface.ts | 15 ++++++++-- ...ClassImplementInterfaceEmptyTypeLiteral.ts | 16 +++++++++-- ...ImplementInterfaceSomePropertiesPresent.ts | 21 ++++++++++++-- .../codeFixClassImplementInterface_order.ts | 28 +++++++++++++++++++ 4 files changed, 72 insertions(+), 8 deletions(-) create mode 100644 tests/cases/fourslash/codeFixClassImplementInterface_order.ts diff --git a/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts b/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts index 695e71b53c2..ddd5bacea26 100644 --- a/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts +++ b/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts @@ -54,6 +54,7 @@ namespace ts.codefix { const nonPrivateAndNotExistedInHeritageClauseMembers = implementedTypeSymbols.filter(and(symbolPointsToNonPrivateMember, symbol => !maybeHeritageClauseSymbol.has(symbol.escapedName))); const classType = checker.getTypeAtLocation(classDeclaration); + const constructor = find(classDeclaration.members, m => isConstructorDeclaration(m)); if (!classType.getNumberIndexType()) { createMissingIndexSignatureDeclaration(implementedType, IndexKind.Number); @@ -62,12 +63,22 @@ namespace ts.codefix { createMissingIndexSignatureDeclaration(implementedType, IndexKind.String); } - createMissingMemberNodes(classDeclaration, nonPrivateAndNotExistedInHeritageClauseMembers, context, preferences, member => changeTracker.insertNodeAtClassStart(sourceFile, classDeclaration, member)); + createMissingMemberNodes(classDeclaration, nonPrivateAndNotExistedInHeritageClauseMembers, context, preferences, member => insertInterfaceMemberNode(sourceFile, classDeclaration, member)); function createMissingIndexSignatureDeclaration(type: InterfaceType, kind: IndexKind): void { const indexInfoOfKind = checker.getIndexInfoOfType(type, kind); if (indexInfoOfKind) { - changeTracker.insertNodeAtClassStart(sourceFile, classDeclaration, checker.indexInfoToIndexSignatureDeclaration(indexInfoOfKind, kind, classDeclaration, /*flags*/ undefined, getNoopSymbolTrackerWithResolver(context))!); + insertInterfaceMemberNode(sourceFile, classDeclaration, checker.indexInfoToIndexSignatureDeclaration(indexInfoOfKind, kind, classDeclaration, /*flags*/ undefined, getNoopSymbolTrackerWithResolver(context))!); + } + } + + // Either adds the node at the top of the class, or if there's a constructor right after that + function insertInterfaceMemberNode(sourceFile: SourceFile, cls: ClassLikeDeclaration | InterfaceDeclaration, newElement: ClassElement): void { + if (constructor) { + changeTracker.insertNodeAfter(sourceFile, constructor, newElement); + } + else { + changeTracker.insertNodeAtClassStart(sourceFile, cls, newElement); } } } diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceEmptyTypeLiteral.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceEmptyTypeLiteral.ts index 98059017098..6a8a48266ef 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceEmptyTypeLiteral.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceEmptyTypeLiteral.ts @@ -1,5 +1,6 @@ /// +//// //// interface I { //// x: {}; //// } @@ -8,6 +9,15 @@ //// |]constructor() { } //// } -verify.rangeAfterCodeFix(` -x: {}; -`); +verify.codeFix({ + description: "Implement interface 'I'", + newFileContent:` +interface I { + x: {}; +} + +class C implements I { + constructor() { } + x: {}; +}`, +}); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceSomePropertiesPresent.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceSomePropertiesPresent.ts index e667783b995..4b61ea41e40 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceSomePropertiesPresent.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceSomePropertiesPresent.ts @@ -1,5 +1,6 @@ /// +//// //// interface I { //// x: number; //// y: number; @@ -11,6 +12,20 @@ //// y: number; //// } -verify.rangeAfterCodeFix(` -z: number & { __iBrand: any; }; -`); + +verify.codeFix({ + description: "Implement interface 'I'", + newFileContent:` +interface I { + x: number; + y: number; + z: number & { __iBrand: any }; +} + +class C implements I { + constructor(public x: number) { } + z: number & { __iBrand: any; }; + y: number; +}`, +}); + diff --git a/tests/cases/fourslash/codeFixClassImplementInterface_order.ts b/tests/cases/fourslash/codeFixClassImplementInterface_order.ts new file mode 100644 index 00000000000..7e45eeb6cf6 --- /dev/null +++ b/tests/cases/fourslash/codeFixClassImplementInterface_order.ts @@ -0,0 +1,28 @@ +/// + +// #34841 + +////interface IFoo { +//// bar(): void; +////} +//// +////class Foo implements IFoo { +//// private x = 1; +//// constructor() { this.x = 2 } +////} + +verify.codeFix({ + description: "Implement interface 'IFoo'", + index: 0, + newFileContent: +`interface IFoo { + bar(): void; +} + +class Foo implements IFoo { + private x = 1; + constructor() { this.x = 2 } + bar(): void { + throw new Error("Method not implemented."); + } +}`}); From 0bbeab6e611fc404db82e321da7fc157288a183c Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Tue, 19 Nov 2019 12:59:09 -0800 Subject: [PATCH 25/50] Revert "Skip costly tests" (#35197) * Revert "Skip costly tests" * fix package.json format --- Gulpfile.js | 1 - package.json | 4 +- scripts/build/options.js | 1 - scripts/build/tests.js | 9 +-- scripts/costly-tests.js | 103 -------------------------------- src/testRunner/parallel/host.ts | 28 +-------- src/testRunner/runner.ts | 5 -- tests/.test-cost.json | 1 - 8 files changed, 5 insertions(+), 147 deletions(-) delete mode 100644 scripts/costly-tests.js delete mode 100644 tests/.test-cost.json diff --git a/Gulpfile.js b/Gulpfile.js index 4c40a73cdba..44ce8c84b23 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -477,7 +477,6 @@ task("runtests-parallel").flags = { " --workers=": "The number of parallel workers to use.", " --timeout=": "Overrides the default test timeout.", " --built": "Compile using the built version of the compiler.", - " --skipPercent=": "Skip expensive tests with chance to miss an edit. Default 5%.", " --shards": "Total number of shards running tests (default: 1)", " --shardId": "1-based ID of this shard (default: 1)", }; diff --git a/package.json b/package.json index bbba0c28e93..80fc7f1fefb 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,6 @@ "prex": "^0.4.3", "q": "latest", "remove-internal": "^2.9.2", - "simple-git": "^1.113.0", "source-map-support": "latest", "through2": "latest", "travis-fold": "latest", @@ -117,8 +116,7 @@ "lint:ci": "gulp lint --ci", "lint:compiler": "gulp lint-compiler", "lint:scripts": "gulp lint-scripts", - "setup-hooks": "node scripts/link-hooks.js", - "update-costly-tests": "node scripts/costly-tests.js" + "setup-hooks": "node scripts/link-hooks.js" }, "browser": { "fs": false, diff --git a/scripts/build/options.js b/scripts/build/options.js index fbc7e39a153..8eda9e0041d 100644 --- a/scripts/build/options.js +++ b/scripts/build/options.js @@ -14,7 +14,6 @@ module.exports = minimist(process.argv.slice(2), { "ru": "runners", "runner": "runners", "r": "reporter", "c": "colors", "color": "colors", - "skip-percent": "skipPercent", "skippercent": "skipPercent", "w": "workers", "f": "fix" diff --git a/scripts/build/tests.js b/scripts/build/tests.js index 20d2a4c7c2a..f22db233765 100644 --- a/scripts/build/tests.js +++ b/scripts/build/tests.js @@ -31,7 +31,6 @@ async function runConsoleTests(runJs, defaultReporter, runInParallel, watchMode, const inspect = cmdLineOptions.inspect; const runners = cmdLineOptions.runners; const light = cmdLineOptions.light; - const skipPercent = process.env.CI === "true" ? 0 : cmdLineOptions.skipPercent; const stackTraceLimit = cmdLineOptions.stackTraceLimit; const testConfigFile = "test.config"; const failed = cmdLineOptions.failed; @@ -65,8 +64,8 @@ async function runConsoleTests(runJs, defaultReporter, runInParallel, watchMode, testTimeout = 400000; } - if (tests || runners || light || testTimeout || taskConfigsFolder || keepFailed || skipPercent !== undefined || shards || shardId) { - writeTestConfigFile(tests, runners, light, skipPercent, taskConfigsFolder, workerCount, stackTraceLimit, testTimeout, keepFailed, shards, shardId); + if (tests || runners || light || testTimeout || taskConfigsFolder || keepFailed || shards || shardId) { + writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, testTimeout, keepFailed, shards, shardId); } const colors = cmdLineOptions.colors; @@ -161,7 +160,6 @@ exports.cleanTestDirs = cleanTestDirs; * @param {string} tests * @param {string} runners * @param {boolean} light - * @param {string} skipPercent * @param {string} [taskConfigsFolder] * @param {string | number} [workerCount] * @param {string} [stackTraceLimit] @@ -170,12 +168,11 @@ exports.cleanTestDirs = cleanTestDirs; * @param {number | undefined} [shards] * @param {number | undefined} [shardId] */ -function writeTestConfigFile(tests, runners, light, skipPercent, taskConfigsFolder, workerCount, stackTraceLimit, timeout, keepFailed, shards, shardId) { +function writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, timeout, keepFailed, shards, shardId) { const testConfigContents = JSON.stringify({ test: tests ? [tests] : undefined, runners: runners ? runners.split(",") : undefined, light, - skipPercent, workerCount, stackTraceLimit, taskConfigsFolder, diff --git a/scripts/costly-tests.js b/scripts/costly-tests.js deleted file mode 100644 index a0ee64a6bec..00000000000 --- a/scripts/costly-tests.js +++ /dev/null @@ -1,103 +0,0 @@ -// @ts-check -const fs = require("fs"); -const git = require('simple-git/promise')('.') -const readline = require('readline') - -/** @typedef {{ [s: string]: number}} Histogram */ - -async function main() { - /** @type {Histogram} */ - const edits = Object.create(null) - /** @type {Histogram} */ - const perf = JSON.parse(fs.readFileSync('.parallelperf.json', 'utf8')) - - await collectCommits(git, "release-2.3", "master", /*author*/ undefined, files => fillMap(files, edits)) - - const totalTime = Object.values(perf).reduce((n,m) => n + m, 0) - const untouched = Object.values(perf).length - Object.values(edits).length - const totalEdits = Object.values(edits).reduce((n,m) => n + m, 0) + untouched + Object.values(edits).length - - let i = 0 - /** @type {{ name: string, time: number, edits: number, cost: number }[]} */ - let data = [] - for (const k in perf) { - const otherk = k.replace(/tsrunner-[a-z-]+?:\/\//, '') - const percentTime = perf[k] / totalTime - const percentHits = (1 + (edits[otherk] || 0)) / totalEdits - const cost = 5 + Math.log(percentTime / percentHits) - data.push({ name: otherk, time: perf[k], edits: 1 + (edits[otherk] || 0), cost}) - if (edits[otherk]) - i++ - } - const output = { - totalTime, - totalEdits, - data: data.sort((x,y) => y.cost - x.cost).map(x => ({ ...x, cost: x.cost.toFixed(2) })) - } - - fs.writeFileSync('tests/.test-cost.json', JSON.stringify(output), 'utf8') -} - -main().catch(e => { - console.log(e); - process.exit(1); -}) - -/** - * @param {string[]} files - * @param {Histogram} histogram - */ -function fillMap(files, histogram) { - // keep edits to test cases (but not /users), and not file moves - const tests = files.filter(f => f.startsWith('tests/cases/') && !f.startsWith('tests/cases/user') && !/=>/.test(f)) - for (const test of tests) { - histogram[test] = (histogram[test] || 0) + 1 - } -} - -/** - * @param {string} s - */ -function isSquashMergeMessage(s) { - return /\(#[0-9]+\)$/.test(s) -} - -/** - * @param {string} s - */ -function isMergeCommit(s) { - return /Merge pull request #[0-9]+/.test(s) -} - -/** - * @param {string} s - */ -function parseFiles(s) { - const lines = s.split('\n') - // Note that slice(2) only works for merge commits, which have an empty newline after the title - return lines.slice(2, lines.length - 2).map(line => line.split("|")[0].trim()) -} - -/** - * @param {import('simple-git/promise').SimpleGit} git - * @param {string} from - * @param {string} to - * @param {string | undefined} author - only include commits from this author - * @param {(files: string[]) => void} update - */ - async function collectCommits(git, from, to, author, update) { - let i = 0 - for (const commit of (await git.log({ from, to })).all) { - i++ - if ((!author || commit.author_name === author) && isMergeCommit(commit.message) || isSquashMergeMessage(commit.message)) { - readline.clearLine(process.stdout, /*left*/ -1) - readline.cursorTo(process.stdout, 0) - process.stdout.write(i + ": " + commit.date) - const files = parseFiles(await git.show([commit.hash, "--stat=1000,960,40", "--pretty=oneline"])) - update(files) - } - } -} - - - diff --git a/src/testRunner/parallel/host.ts b/src/testRunner/parallel/host.ts index 0273ad7ec4e..c2d338479a6 100644 --- a/src/testRunner/parallel/host.ts +++ b/src/testRunner/parallel/host.ts @@ -11,7 +11,7 @@ namespace Harness.Parallel.Host { const isatty = tty.isatty(1) && tty.isatty(2); const path = require("path") as typeof import("path"); const { fork } = require("child_process") as typeof import("child_process"); - const { statSync, readFileSync } = require("fs") as typeof import("fs"); + const { statSync } = require("fs") as typeof import("fs"); // NOTE: paths for module and types for FailedTestReporter _do not_ line up due to our use of --outFile for run.js const FailedTestReporter = require(path.resolve(__dirname, "../../scripts/failed-tests")) as typeof import("../../../scripts/failed-tests"); @@ -186,31 +186,6 @@ namespace Harness.Parallel.Host { return `tsrunner-${runner}://${test}`; } - function skipCostlyTests(tasks: Task[]) { - if (statSync("tests/.test-cost.json")) { - const costs = JSON.parse(readFileSync("tests/.test-cost.json", "utf8")) as { - totalTime: number, - totalEdits: number, - data: { name: string, time: number, edits: number, costs: number }[] - }; - let skippedEdits = 0; - let skippedTime = 0; - const skippedTests = new Set(); - let i = 0; - for (; i < costs.data.length && (skippedEdits / costs.totalEdits) < (skipPercent / 100); i++) { - skippedEdits += costs.data[i].edits; - skippedTime += costs.data[i].time; - skippedTests.add(costs.data[i].name); - } - console.log(`Skipped ${i} expensive tests; estimated time savings of ${(skippedTime / costs.totalTime * 100).toFixed(2)}% with --skipPercent=${skipPercent.toFixed(2)} chance of missing a test.`); - return tasks.filter(t => !skippedTests.has(t.file)); - } - else { - console.log("No cost analysis discovered."); - return tasks; - } - } - function startDelayed(perfData: { [testHash: string]: number } | undefined, totalCost: number) { console.log(`Discovered ${tasks.length} unittest suites` + (newTasks.length ? ` and ${newTasks.length} new suites.` : ".")); console.log("Discovering runner-based tests..."); @@ -250,7 +225,6 @@ namespace Harness.Parallel.Host { } tasks.sort((a, b) => a.size - b.size); tasks = tasks.concat(newTasks); - tasks = skipCostlyTests(tasks); const batchCount = workerCount; const packfraction = 0.9; const chunkSize = 1000; // ~1KB or 1s for sending batches near the end of a test diff --git a/src/testRunner/runner.ts b/src/testRunner/runner.ts index 6a6e026b624..11b4b88a0db 100644 --- a/src/testRunner/runner.ts +++ b/src/testRunner/runner.ts @@ -67,7 +67,6 @@ let runUnitTests: boolean | undefined; let stackTraceLimit: number | "full" | undefined; let noColors = false; let keepFailed = false; -let skipPercent = 5; interface TestConfig { light?: boolean; @@ -81,7 +80,6 @@ interface TestConfig { noColors?: boolean; timeout?: number; keepFailed?: boolean; - skipPercent?: number; shardId?: number; shards?: number; } @@ -115,9 +113,6 @@ function handleTestConfig() { if (testConfig.keepFailed) { keepFailed = true; } - if (testConfig.skipPercent !== undefined) { - skipPercent = testConfig.skipPercent; - } if (testConfig.shardId) { shardId = testConfig.shardId; } diff --git a/tests/.test-cost.json b/tests/.test-cost.json deleted file mode 100644 index cc5254b8977..00000000000 --- a/tests/.test-cost.json +++ /dev/null @@ -1 +0,0 @@ -{"totalTime":1506341,"totalEdits":18149,"data":[{"name":"unittests:: services:: convertToAsyncFunctions","time":11941,"edits":1,"cost":"9.97"},{"name":"unittests:: tsbuild:: outFile::","time":10578,"edits":1,"cost":"9.85"},{"name":"tests/cases/compiler/unionSubtypeReductionErrors.ts","time":8249,"edits":1,"cost":"9.60"},{"name":"tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts","time":7185,"edits":1,"cost":"9.46"},{"name":"tests/cases/compiler/enumLiteralsSubtypeReduction.ts","time":6627,"edits":1,"cost":"9.38"},{"name":"unittests:: tsserver:: with project references and tsbuild","time":5216,"edits":1,"cost":"9.14"},{"name":"unittests:: tsbuild-watch program updates","time":5126,"edits":1,"cost":"9.12"},{"name":"tests/cases/compiler/largeControlFlowGraph.ts","time":9374,"edits":2,"cost":"9.03"},{"name":"unittests:: services:: extract:: extractFunctions","time":4359,"edits":1,"cost":"8.96"},{"name":"tests/cases/fourslash/server/ngProxy2.ts","time":4276,"edits":1,"cost":"8.94"},{"name":"unittests:: tsbuild:: on 'sample1' project","time":4203,"edits":1,"cost":"8.92"},{"name":"tests/cases/compiler/binaryArithmeticControlFlowGraphNotTooLarge.ts","time":6730,"edits":2,"cost":"8.70"},{"name":"tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts","time":3156,"edits":1,"cost":"8.64"},{"name":"unittests:: services:: extract:: extractConstants","time":3021,"edits":1,"cost":"8.59"},{"name":"tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts","time":2866,"edits":1,"cost":"8.54"},{"name":"unittests:: tsbuild:: outFile:: on amd modules with --out","time":2438,"edits":1,"cost":"8.38"},{"name":"unittests:: tsserver:: events:: ProjectsUpdatedInBackground","time":2359,"edits":1,"cost":"8.35"},{"name":"tests/cases/compiler/mappedTypeRecursiveInference.ts","time":6903,"edits":3,"cost":"8.32"},{"name":"tests/cases/fourslash/reallyLargeFile.ts","time":4384,"edits":2,"cost":"8.27"},{"name":"tests/cases/compiler/verifyDefaultLib_dom.ts","time":2154,"edits":1,"cost":"8.26"},{"name":"tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts","time":2125,"edits":1,"cost":"8.24"},{"name":"tests/cases/compiler/variableDeclarationInStrictMode1.ts","time":1999,"edits":1,"cost":"8.18"},{"name":"tests/cases/conformance/types/members/objectTypeHidingMembersOfExtendedObject.ts","time":1918,"edits":1,"cost":"8.14"},{"name":"tests/cases/compiler/underscoreTest1.ts","time":1863,"edits":1,"cost":"8.11"},{"name":"tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode8.ts","time":1860,"edits":1,"cost":"8.11"},{"name":"tests/cases/conformance/types/members/objectTypeWithStringIndexerHidingObjectIndexer.ts","time":1726,"edits":1,"cost":"8.03"},{"name":"tests/cases/compiler/complexRecursiveCollections.ts","time":6403,"edits":4,"cost":"7.96"},{"name":"unittests:: tsc-watch:: program updates","time":1595,"edits":1,"cost":"7.96"},{"name":"unittests:: services:: organizeImports","time":1592,"edits":1,"cost":"7.95"},{"name":"tests/cases/conformance/types/members/duplicateNumericIndexers.ts","time":1573,"edits":1,"cost":"7.94"},{"name":"unittests:: services:: Transpile","time":1553,"edits":1,"cost":"7.93"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringAssignmentForObjectBindingPatternDefaultValues.ts","time":1551,"edits":1,"cost":"7.93"},{"name":"tests/cases/compiler/reactTagNameComponentWithPropsNoOOM2.tsx","time":3085,"edits":2,"cost":"7.92"},{"name":"tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorStrictMode.ts","time":1513,"edits":1,"cost":"7.90"},{"name":"tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts","time":1484,"edits":1,"cost":"7.88"},{"name":"tests/cases/compiler/promisePermutations.ts","time":1467,"edits":1,"cost":"7.87"},{"name":"unittests:: TransformAPI","time":1339,"edits":1,"cost":"7.78"},{"name":"tests/cases/compiler/tsxStatelessComponentDefaultProps.tsx","time":1325,"edits":1,"cost":"7.77"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringAssignmentForOfObjectBindingPatternDefaultValues.ts","time":1318,"edits":1,"cost":"7.77"},{"name":"tests/cases/compiler/contextualTypeLogicalOr.ts","time":2533,"edits":2,"cost":"7.73"},{"name":"tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts","time":1232,"edits":1,"cost":"7.70"},{"name":"tests/cases/compiler/promisePermutations3.ts","time":1185,"edits":1,"cost":"7.66"},{"name":"tests/cases/compiler/privacyFunctionCannotNameParameterTypeDeclFile.ts","time":1146,"edits":1,"cost":"7.63"},{"name":"tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts","time":1130,"edits":1,"cost":"7.61"},{"name":"tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts","time":1117,"edits":1,"cost":"7.60"},{"name":"tests/cases/compiler/deeplyDependentLargeArrayMutation2.ts","time":2193,"edits":2,"cost":"7.58"},{"name":"tests/cases/compiler/complexNarrowingWithAny.ts","time":1081,"edits":1,"cost":"7.57"},{"name":"unittests:: tsserver:: with declaration file maps:: project references","time":1061,"edits":1,"cost":"7.55"},{"name":"tests/cases/fourslash/server/documentHighlightsTypeParameterInHeritageClause01.ts","time":1037,"edits":1,"cost":"7.53"},{"name":"tests/cases/conformance/async/es2017/asyncAwaitIsolatedModules_es2017.ts","time":1034,"edits":1,"cost":"7.52"},{"name":"tests/cases/compiler/promisePermutations2.ts","time":1010,"edits":1,"cost":"7.50"},{"name":"tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts","time":1002,"edits":1,"cost":"7.49"},{"name":"tests/cases/compiler/stringTrim.ts","time":1000,"edits":1,"cost":"7.49"},{"name":"tests/cases/project/sourceRootAbsolutePathMultifolderNoOutdir.json","time":944,"edits":1,"cost":"7.43"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.ts","time":938,"edits":1,"cost":"7.42"},{"name":"unittests:: tsc-watch:: emit for configured projects","time":927,"edits":1,"cost":"7.41"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringAssignmentForOfArrayBindingPatternDefaultValues.ts","time":925,"edits":1,"cost":"7.41"},{"name":"unittests:: tsserver:: CachingFileSystemInformation:: tsserverProjectSystem CachingFileSystemInformation","time":924,"edits":1,"cost":"7.41"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringAssignmentForArrayBindingPatternDefaultValues.ts","time":921,"edits":1,"cost":"7.41"},{"name":"tests/cases/compiler/callsOnComplexSignatures.tsx","time":1809,"edits":2,"cost":"7.39"},{"name":"tests/cases/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory.json","time":896,"edits":1,"cost":"7.38"},{"name":"tests/cases/compiler/tsxReactPropsInferenceSucceedsOnIntersections.tsx","time":1784,"edits":2,"cost":"7.37"},{"name":"tests/cases/fourslash/localGetReferences.ts","time":875,"edits":1,"cost":"7.36"},{"name":"tests/cases/conformance/es2019/globalThisVarDeclaration.ts","time":872,"edits":1,"cost":"7.35"},{"name":"tests/cases/compiler/promiseTypeStrictNull.ts","time":845,"edits":1,"cost":"7.32"},{"name":"tests/cases/compiler/reactTagNameComponentWithPropsNoOOM.tsx","time":1665,"edits":2,"cost":"7.31"},{"name":"tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx","time":827,"edits":1,"cost":"7.30"},{"name":"tests/cases/project/mapRootRelativePathSingleFileNoOutdir.json","time":825,"edits":1,"cost":"7.30"},{"name":"tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration13_es2017.ts","time":822,"edits":1,"cost":"7.29"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringAssignmentForArrayBindingPattern.ts","time":816,"edits":1,"cost":"7.29"},{"name":"tests/cases/compiler/varianceProblingAndZeroOrderIndexSignatureRelationsAlign.ts","time":1629,"edits":2,"cost":"7.28"},{"name":"tests/cases/compiler/varianceProblingAndZeroOrderIndexSignatureRelationsAlign2.ts","time":1582,"edits":2,"cost":"7.25"},{"name":"tests/cases/compiler/verifyDefaultLib_webworker.ts","time":781,"edits":1,"cost":"7.24"},{"name":"tests/cases/compiler/useBeforeDeclaration_jsx.tsx","time":1552,"edits":2,"cost":"7.24"},{"name":"tests/cases/fourslash/runtimeBehaviorTests.ts","time":773,"edits":1,"cost":"7.23"},{"name":"tests/cases/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputDirectory.json","time":756,"edits":1,"cost":"7.21"},{"name":"tests/cases/compiler/jsxChildrenIndividualErrorElaborations.tsx","time":1508,"edits":2,"cost":"7.21"},{"name":"tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts","time":752,"edits":1,"cost":"7.20"},{"name":"tests/cases/project/quotesInFileAndDirectoryNames.json","time":751,"edits":1,"cost":"7.20"},{"name":"tests/cases/fourslash/refactorExtractType_js6.ts","time":742,"edits":1,"cost":"7.19"},{"name":"tests/cases/compiler/privacyAccessorDeclFile.ts","time":738,"edits":1,"cost":"7.19"},{"name":"unittests:: tsserver:: Projects","time":729,"edits":1,"cost":"7.17"},{"name":"tests/cases/compiler/promiseType.ts","time":723,"edits":1,"cost":"7.16"},{"name":"tests/cases/project/sourcemapMultifolderSpecifyOutputDirectory.json","time":721,"edits":1,"cost":"7.16"},{"name":"tests/cases/project/sourceRootAbsolutePathSingleFileSpecifyOutputDirectory.json","time":706,"edits":1,"cost":"7.14"},{"name":"tests/cases/compiler/stringMatchAll.ts","time":1403,"edits":2,"cost":"7.13"},{"name":"tests/cases/fourslash/refactorExtractType_js3.ts","time":701,"edits":1,"cost":"7.13"},{"name":"unittests:: evaluation:: forAwaitOfEvaluation","time":701,"edits":1,"cost":"7.13"},{"name":"tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression3_es2017.ts","time":699,"edits":1,"cost":"7.13"},{"name":"tests/cases/project/maprootUrlsourcerootUrlSimpleNoOutdir.json","time":693,"edits":1,"cost":"7.12"},{"name":"tests/cases/conformance/jsx/tsxUnionElementType4.tsx","time":690,"edits":1,"cost":"7.12"},{"name":"tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts","time":690,"edits":1,"cost":"7.12"},{"name":"tests/cases/compiler/privacyFunctionReturnTypeDeclFile.ts","time":680,"edits":1,"cost":"7.10"},{"name":"tests/cases/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile.json","time":676,"edits":1,"cost":"7.10"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringForArrayBindingPatternDefaultValues.ts","time":675,"edits":1,"cost":"7.10"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPattern2.ts","time":674,"edits":1,"cost":"7.09"},{"name":"tests/cases/compiler/returnTypePredicateIsInstantiateInContextOfTarget.tsx","time":1338,"edits":2,"cost":"7.09"},{"name":"tests/cases/compiler/bluebirdStaticThis.ts","time":668,"edits":1,"cost":"7.09"},{"name":"unittests:: tsserver:: symLinks","time":666,"edits":1,"cost":"7.08"},{"name":"tests/cases/compiler/jsxImportForSideEffectsNonExtantNoError.tsx","time":1325,"edits":2,"cost":"7.08"},{"name":"tests/cases/fourslash/findAllRefsThisKeywordMultipleFiles.ts","time":1321,"edits":2,"cost":"7.07"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringForOfObjectBindingPatternDefaultValues.ts","time":660,"edits":1,"cost":"7.07"},{"name":"unittests:: BigInt literal base conversions","time":658,"edits":1,"cost":"7.07"},{"name":"tests/cases/project/visibilityOfTypeUsedAcrossModules.json","time":658,"edits":1,"cost":"7.07"},{"name":"tests/cases/compiler/yieldExpressionInFlowLoop.ts","time":1313,"edits":2,"cost":"7.07"},{"name":"tests/cases/compiler/mapConstructorOnReadonlyTuple.ts","time":1308,"edits":2,"cost":"7.06"},{"name":"tests/cases/project/sourcerootUrlModuleMultifolderNoOutdir.json","time":646,"edits":1,"cost":"7.05"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInClass.ts","time":645,"edits":1,"cost":"7.05"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_methodOverrides.ts","time":641,"edits":1,"cost":"7.04"},{"name":"tests/cases/project/mapRootRelativePathSubfolderSpecifyOutputDirectory.json","time":638,"edits":1,"cost":"7.04"},{"name":"tests/cases/project/maprootUrlSubfolderSpecifyOutputDirectory.json","time":633,"edits":1,"cost":"7.03"},{"name":"tests/cases/compiler/regexMatchAll.ts","time":1263,"edits":2,"cost":"7.03"},{"name":"tests/cases/compiler/reactSFCAndFunctionResolvable.tsx","time":1249,"edits":2,"cost":"7.02"},{"name":"tests/cases/project/sourceRootRelativePathSingleFileNoOutdir.json","time":624,"edits":1,"cost":"7.02"},{"name":"tests/cases/project/sourceRootRelativePathSimpleNoOutdir.json","time":621,"edits":1,"cost":"7.01"},{"name":"tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts","time":621,"edits":1,"cost":"7.01"},{"name":"tests/cases/project/mapRootAbsolutePathSimpleSpecifyOutputFile.json","time":620,"edits":1,"cost":"7.01"},{"name":"unittests:: tsserver:: typingsInstaller:: General functionality","time":616,"edits":1,"cost":"7.00"},{"name":"tests/cases/fourslash/commentsClassMembers.ts","time":2464,"edits":4,"cost":"7.00"},{"name":"tests/cases/project/mapRootAbsolutePathSimpleNoOutdir.json","time":615,"edits":1,"cost":"7.00"},{"name":"tests/cases/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory.json","time":613,"edits":1,"cost":"7.00"},{"name":"tests/cases/project/sourceRootRelativePathSubfolderNoOutdir.json","time":613,"edits":1,"cost":"7.00"},{"name":"tests/cases/project/maprootUrlsourcerootUrlSimpleSpecifyOutputFile.json","time":613,"edits":1,"cost":"7.00"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringAssignmentForOfObjectBindingPattern.ts","time":610,"edits":1,"cost":"6.99"},{"name":"tests/cases/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json","time":606,"edits":1,"cost":"6.99"},{"name":"tests/cases/project/declarationsImportedInPrivate.json","time":606,"edits":1,"cost":"6.99"},{"name":"tests/cases/project/sourceRootRelativePathMixedSubfolderNoOutdir.json","time":598,"edits":1,"cost":"6.97"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts","time":595,"edits":1,"cost":"6.97"},{"name":"tests/cases/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json","time":595,"edits":1,"cost":"6.97"},{"name":"tests/cases/project/projectOptionTest.json","time":594,"edits":1,"cost":"6.97"},{"name":"tests/cases/compiler/uniqueSymbolAssignmentOnGlobalAugmentationSuceeds.ts","time":1183,"edits":2,"cost":"6.96"},{"name":"unittests:: tsserver:: resolutionCache:: tsserverProjectSystem module resolution caching","time":591,"edits":1,"cost":"6.96"},{"name":"tests/cases/compiler/duplicateLocalVariable1.ts","time":591,"edits":1,"cost":"6.96"},{"name":"tests/cases/compiler/awaitInNonAsyncFunction.ts","time":1173,"edits":2,"cost":"6.96"},{"name":"tests/cases/fourslash/getOccurrencesOfAnonymousFunction.ts","time":586,"edits":1,"cost":"6.95"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnCallSignature.ts","time":585,"edits":1,"cost":"6.95"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalObjects.ts","time":582,"edits":1,"cost":"6.95"},{"name":"tests/cases/project/sourcerootUrlMultifolderSpecifyOutputDirectory.json","time":580,"edits":1,"cost":"6.94"},{"name":"tests/cases/project/sourceRootAbsolutePathMultifolderSpecifyOutputDirectory.json","time":578,"edits":1,"cost":"6.94"},{"name":"tests/cases/project/mapRootRelativePathModuleSubfolderNoOutdir.json","time":577,"edits":1,"cost":"6.94"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringAssignmentForObjectBindingPattern.ts","time":573,"edits":1,"cost":"6.93"},{"name":"tests/cases/project/mapRootAbsolutePathMultifolderSpecifyOutputFile.json","time":573,"edits":1,"cost":"6.93"},{"name":"tests/cases/fourslash/malformedObjectLiteral.ts","time":573,"edits":1,"cost":"6.93"},{"name":"tests/cases/fourslash/tsxCompletionsGenericComponent.ts","time":1139,"edits":2,"cost":"6.93"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_restParamInference.ts","time":568,"edits":1,"cost":"6.92"},{"name":"tests/cases/fourslash/underscoreTypings01.ts","time":567,"edits":1,"cost":"6.92"},{"name":"tests/cases/conformance/emitter/es2019/noCatchBinding/emitter.noCatchBinding.es2019.ts","time":564,"edits":1,"cost":"6.92"},{"name":"tests/cases/compiler/privacyFunctionParameterDeclFile.ts","time":564,"edits":1,"cost":"6.92"},{"name":"tests/cases/project/mapRootRelativePathMultifolderNoOutdir.json","time":561,"edits":1,"cost":"6.91"},{"name":"tests/cases/fourslash/refactorExtractType_js5.ts","time":560,"edits":1,"cost":"6.91"},{"name":"tests/cases/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory.json","time":559,"edits":1,"cost":"6.91"},{"name":"tests/cases/project/maprootUrlSubfolderNoOutdir.json","time":558,"edits":1,"cost":"6.91"},{"name":"tests/cases/compiler/commentsAfterSpread.ts","time":1110,"edits":2,"cost":"6.90"},{"name":"tests/cases/project/outModuleMultifolderNoOutdir.json","time":550,"edits":1,"cost":"6.89"},{"name":"tests/cases/conformance/jsx/tsxUnionElementType1.tsx","time":548,"edits":1,"cost":"6.89"},{"name":"tests/cases/project/sourceRootAbsolutePathSimpleNoOutdir.json","time":547,"edits":1,"cost":"6.89"},{"name":"tests/cases/project/maprootUrlsourcerootUrlSubfolderNoOutdir.json","time":546,"edits":1,"cost":"6.88"},{"name":"tests/cases/project/sourceRootAbsolutePathMixedSubfolderNoOutdir.json","time":543,"edits":1,"cost":"6.88"},{"name":"tests/cases/project/maprootUrlSingleFileSpecifyOutputDirectory.json","time":543,"edits":1,"cost":"6.88"},{"name":"tests/cases/compiler/typeResolution.ts","time":541,"edits":1,"cost":"6.87"},{"name":"tests/cases/fourslash/refactorExtractType_js1.ts","time":540,"edits":1,"cost":"6.87"},{"name":"tests/cases/project/mapRootAbsolutePathMultifolderNoOutdir.json","time":540,"edits":1,"cost":"6.87"},{"name":"tests/cases/compiler/mixinPrivateAndProtected.ts","time":540,"edits":1,"cost":"6.87"},{"name":"tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts","time":1078,"edits":2,"cost":"6.87"},{"name":"tests/cases/project/maprootUrlMixedSubfolderSpecifyOutputDirectory.json","time":539,"edits":1,"cost":"6.87"},{"name":"tests/cases/fourslash/refactorExtractType9.ts","time":537,"edits":1,"cost":"6.87"},{"name":"tests/cases/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory.json","time":534,"edits":1,"cost":"6.86"},{"name":"tests/cases/project/mapRootAbsolutePathModuleMultifolderNoOutdir.json","time":531,"edits":1,"cost":"6.86"},{"name":"tests/cases/project/sourceRootRelativePathSubfolderSpecifyOutputDirectory.json","time":530,"edits":1,"cost":"6.85"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringForArrayBindingPattern.ts","time":526,"edits":1,"cost":"6.85"},{"name":"tests/cases/project/nestedReferenceTags.json","time":524,"edits":1,"cost":"6.84"},{"name":"tests/cases/fourslash/getOccurrencesThis5.ts","time":1047,"edits":2,"cost":"6.84"},{"name":"tests/cases/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory.json","time":523,"edits":1,"cost":"6.84"},{"name":"tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithEnumUnion.ts","time":522,"edits":1,"cost":"6.84"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts","time":522,"edits":1,"cost":"6.84"},{"name":"tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts","time":520,"edits":1,"cost":"6.84"},{"name":"tests/cases/project/declarationsMultipleTimesMultipleImport.json","time":519,"edits":1,"cost":"6.83"},{"name":"tests/cases/project/sourceRootRelativePathMultifolderNoOutdir.json","time":518,"edits":1,"cost":"6.83"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPattern.ts","time":518,"edits":1,"cost":"6.83"},{"name":"tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts","time":1034,"edits":2,"cost":"6.83"},{"name":"tests/cases/fourslash/smartSelection_templateStrings.ts","time":515,"edits":1,"cost":"6.83"},{"name":"tests/cases/project/outModuleSimpleNoOutdir.json","time":515,"edits":1,"cost":"6.83"},{"name":"tests/cases/project/maprootUrlsourcerootUrlSingleFileNoOutdir.json","time":515,"edits":1,"cost":"6.83"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringAssignmentForOfArrayBindingPattern.ts","time":513,"edits":1,"cost":"6.82"},{"name":"tests/cases/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory.json","time":512,"edits":1,"cost":"6.82"},{"name":"tests/cases/fourslash/formattingFatArrowFunctions.ts","time":510,"edits":1,"cost":"6.82"},{"name":"tests/cases/compiler/umdGlobalAugmentationNoCrash.ts","time":1015,"edits":2,"cost":"6.81"},{"name":"tests/cases/compiler/umdNamespaceMergedWithGlobalAugmentationIsNotCircular.ts","time":1012,"edits":2,"cost":"6.81"},{"name":"tests/cases/conformance/types/literal/numericLiteralTypes2.ts","time":506,"edits":1,"cost":"6.81"},{"name":"tests/cases/fourslash/server/declarationMapsOutOfDateMapping.ts","time":1010,"edits":2,"cost":"6.81"},{"name":"tests/cases/fourslash/genericInterfacePropertyInference1.ts","time":505,"edits":1,"cost":"6.81"},{"name":"tests/cases/fourslash/refactorExtractType49.ts","time":503,"edits":1,"cost":"6.80"},{"name":"tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts","time":499,"edits":1,"cost":"6.79"},{"name":"tests/cases/fourslash/refactorExtractType_js4.ts","time":497,"edits":1,"cost":"6.79"},{"name":"unittests:: Program.isSourceFileFromExternalLibrary","time":495,"edits":1,"cost":"6.79"},{"name":"tests/cases/compiler/useBeforeDeclaration_destructuring.ts","time":978,"edits":2,"cost":"6.77"},{"name":"tests/cases/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory.json","time":489,"edits":1,"cost":"6.77"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.ts","time":489,"edits":1,"cost":"6.77"},{"name":"tests/cases/compiler/es6ModuleConstEnumDeclaration2.ts","time":489,"edits":1,"cost":"6.77"},{"name":"tests/cases/project/outSubfolderNoOutdir.json","time":488,"edits":1,"cost":"6.77"},{"name":"tests/cases/project/maprootUrlModuleSimpleNoOutdir.json","time":487,"edits":1,"cost":"6.77"},{"name":"tests/cases/compiler/expr.ts","time":487,"edits":1,"cost":"6.77"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_recursiveFunction.ts","time":486,"edits":1,"cost":"6.77"},{"name":"unittests:: Incremental Parser","time":486,"edits":1,"cost":"6.77"},{"name":"tests/cases/project/declarationsExportNamespace.json","time":482,"edits":1,"cost":"6.76"},{"name":"tests/cases/compiler/privacyFunctionCannotNameReturnTypeDeclFile.ts","time":482,"edits":1,"cost":"6.76"},{"name":"tests/cases/project/mapRootRelativePathSimpleSpecifyOutputDirectory.json","time":480,"edits":1,"cost":"6.75"},{"name":"tests/cases/fourslash/getOccurrencesPrivate1.ts","time":479,"edits":1,"cost":"6.75"},{"name":"tests/cases/project/mapRootRelativePathMixedSubfolderNoOutdir.json","time":478,"edits":1,"cost":"6.75"},{"name":"tests/cases/project/maprootUrlMultifolderSpecifyOutputDirectory.json","time":477,"edits":1,"cost":"6.75"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_inheritedMethod.ts","time":476,"edits":1,"cost":"6.75"},{"name":"tests/cases/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile.json","time":475,"edits":1,"cost":"6.74"},{"name":"tests/cases/conformance/parser/ecmascript5/parserRealSource9.ts","time":474,"edits":1,"cost":"6.74"},{"name":"tests/cases/fourslash/completionForStringLiteral6.ts","time":474,"edits":1,"cost":"6.74"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringForOfArrayBindingPattern.ts","time":473,"edits":1,"cost":"6.74"},{"name":"tests/cases/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json","time":473,"edits":1,"cost":"6.74"},{"name":"tests/cases/project/declarationsSimpleImport.json","time":472,"edits":1,"cost":"6.74"},{"name":"tests/cases/compiler/privacyCannotNameVarTypeDeclFile.ts","time":471,"edits":1,"cost":"6.74"},{"name":"tests/cases/project/sourcerootUrlMixedSubfolderNoOutdir.json","time":471,"edits":1,"cost":"6.74"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringForObjectBindingPatternDefaultValues.ts","time":471,"edits":1,"cost":"6.74"},{"name":"tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithEnum.ts","time":471,"edits":1,"cost":"6.74"},{"name":"tests/cases/project/sourceRootRelativePathModuleSimpleNoOutdir.json","time":470,"edits":1,"cost":"6.73"},{"name":"tests/cases/fourslash/transitiveExportImports2.ts","time":469,"edits":1,"cost":"6.73"},{"name":"tests/cases/project/sourcemapSingleFileSpecifyOutputDirectory.json","time":468,"edits":1,"cost":"6.73"},{"name":"tests/cases/project/sourcemapModuleMultifolderSpecifyOutputDirectory.json","time":467,"edits":1,"cost":"6.73"},{"name":"tests/cases/project/outMixedSubfolderSpecifyOutputDirectory.json","time":467,"edits":1,"cost":"6.73"},{"name":"tests/cases/project/mapRootAbsolutePathSubfolderSpecifyOutputDirectory.json","time":467,"edits":1,"cost":"6.73"},{"name":"tests/cases/project/maprootUrlSimpleSpecifyOutputFile.json","time":466,"edits":1,"cost":"6.73"},{"name":"tests/cases/project/sourceRootRelativePathModuleMultifolderNoOutdir.json","time":465,"edits":1,"cost":"6.72"},{"name":"tests/cases/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir.json","time":464,"edits":1,"cost":"6.72"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringForObjectBindingPattern.ts","time":460,"edits":1,"cost":"6.71"},{"name":"tests/cases/project/sourcemapSimpleSpecifyOutputDirectory.json","time":459,"edits":1,"cost":"6.71"},{"name":"tests/cases/project/mapRootRelativePathSingleFileSpecifyOutputDirectory.json","time":459,"edits":1,"cost":"6.71"},{"name":"tests/cases/compiler/genericsManyTypeParameters.ts","time":459,"edits":1,"cost":"6.71"},{"name":"tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx","time":916,"edits":2,"cost":"6.71"},{"name":"tests/cases/project/outSingleFileSpecifyOutputFile.json","time":458,"edits":1,"cost":"6.71"},{"name":"unittests:: tsc-watch:: emit file --incremental","time":457,"edits":1,"cost":"6.71"},{"name":"unittests:: config:: matchFiles","time":456,"edits":1,"cost":"6.70"},{"name":"tests/cases/project/mapRootAbsolutePathSubfolderNoOutdir.json","time":456,"edits":1,"cost":"6.70"},{"name":"tests/cases/conformance/classes/members/accessibility/protectedClassPropertyAccessibleWithinSubclass2.ts","time":455,"edits":1,"cost":"6.70"},{"name":"tests/cases/project/maprootUrlMultifolderNoOutdir.json","time":454,"edits":1,"cost":"6.70"},{"name":"tests/cases/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory.json","time":454,"edits":1,"cost":"6.70"},{"name":"tests/cases/project/maprootUrlModuleMultifolderSpecifyOutputDirectory.json","time":454,"edits":1,"cost":"6.70"},{"name":"tests/cases/project/maprootUrlSubfolderSpecifyOutputFile.json","time":452,"edits":1,"cost":"6.69"},{"name":"tests/cases/project/sourceRootRelativePathSimpleSpecifyOutputFile.json","time":452,"edits":1,"cost":"6.69"},{"name":"tests/cases/project/outMultifolderSpecifyOutputDirectory.json","time":450,"edits":1,"cost":"6.69"},{"name":"tests/cases/project/mapRootAbsolutePathSingleFileNoOutdir.json","time":449,"edits":1,"cost":"6.69"},{"name":"tests/cases/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json","time":447,"edits":1,"cost":"6.68"},{"name":"tests/cases/compiler/jsxIntrinsicUnions.tsx","time":891,"edits":2,"cost":"6.68"},{"name":"tests/cases/fourslash/refactorExtractType47.ts","time":445,"edits":1,"cost":"6.68"},{"name":"tests/cases/project/sourcemapMixedSubfolderNoOutdir.json","time":445,"edits":1,"cost":"6.68"},{"name":"tests/cases/project/sourceRootAbsolutePathSubfolderSpecifyOutputDirectory.json","time":445,"edits":1,"cost":"6.68"},{"name":"tests/cases/fourslash/genericCombinators1.ts","time":444,"edits":1,"cost":"6.68"},{"name":"tests/cases/project/outModuleMultifolderSpecifyOutputDirectory.json","time":443,"edits":1,"cost":"6.67"},{"name":"tests/cases/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory.json","time":441,"edits":1,"cost":"6.67"},{"name":"tests/cases/compiler/contextualTyping.ts","time":440,"edits":1,"cost":"6.67"},{"name":"tests/cases/project/mapRootRelativePathModuleMultifolderNoOutdir.json","time":440,"edits":1,"cost":"6.67"},{"name":"tests/cases/project/outModuleMultifolderSpecifyOutputFile.json","time":440,"edits":1,"cost":"6.67"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts","time":439,"edits":1,"cost":"6.67"},{"name":"unittests:: tsserver:: ExternalProjects","time":438,"edits":1,"cost":"6.66"},{"name":"tests/cases/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir.json","time":438,"edits":1,"cost":"6.66"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures2.ts","time":438,"edits":1,"cost":"6.66"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionES6System.ts","time":437,"edits":1,"cost":"6.66"},{"name":"tests/cases/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory.json","time":436,"edits":1,"cost":"6.66"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringVariableStatement1.ts","time":436,"edits":1,"cost":"6.66"},{"name":"tests/cases/project/maprootUrlModuleMultifolderNoOutdir.json","time":435,"edits":1,"cost":"6.66"},{"name":"tests/cases/project/sourceRootRelativePathMultifolderSpecifyOutputDirectory.json","time":435,"edits":1,"cost":"6.66"},{"name":"tests/cases/project/rootDirectory.json","time":435,"edits":1,"cost":"6.66"},{"name":"tests/cases/fourslash/getOccurrencesClassExpressionThis.ts","time":435,"edits":1,"cost":"6.66"},{"name":"tests/cases/compiler/decoratorWithNegativeLiteralTypeNoCrash.ts","time":868,"edits":2,"cost":"6.65"},{"name":"tests/cases/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory.json","time":434,"edits":1,"cost":"6.65"},{"name":"tests/cases/project/sourceRootRelativePathModuleSubfolderNoOutdir.json","time":434,"edits":1,"cost":"6.65"},{"name":"tests/cases/fourslash/refactorExtractType44.ts","time":433,"edits":1,"cost":"6.65"},{"name":"tests/cases/fourslash/getOccurrencesThis4.ts","time":866,"edits":2,"cost":"6.65"},{"name":"tests/cases/project/nodeModulesMaxDepthIncreased.json","time":432,"edits":1,"cost":"6.65"},{"name":"tests/cases/project/sourcerootUrlMultifolderNoOutdir.json","time":432,"edits":1,"cost":"6.65"},{"name":"tests/cases/project/sourcerootUrlSubfolderNoOutdir.json","time":432,"edits":1,"cost":"6.65"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringForOfArrayBindingPatternDefaultValues.ts","time":431,"edits":1,"cost":"6.65"},{"name":"tests/cases/project/maprootUrlSimpleSpecifyOutputDirectory.json","time":431,"edits":1,"cost":"6.65"},{"name":"tests/cases/project/outMultifolderSpecifyOutputFile.json","time":431,"edits":1,"cost":"6.65"},{"name":"tests/cases/project/sourcerootUrlModuleSimpleNoOutdir.json","time":430,"edits":1,"cost":"6.64"},{"name":"unittests:: tsserver:: VersionCache stress test","time":429,"edits":1,"cost":"6.64"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringAssignmentStatementArrayBindingPattern.ts","time":429,"edits":1,"cost":"6.64"},{"name":"tests/cases/fourslash/shims-pp/getImplementationAtPosition.ts","time":429,"edits":1,"cost":"6.64"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts","time":427,"edits":1,"cost":"6.64"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.ts","time":426,"edits":1,"cost":"6.64"},{"name":"tests/cases/project/mapRootAbsolutePathMultifolderSpecifyOutputDirectory.json","time":426,"edits":1,"cost":"6.64"},{"name":"tests/cases/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputFile.json","time":426,"edits":1,"cost":"6.64"},{"name":"tests/cases/fourslash/refactorExtractType5.ts","time":425,"edits":1,"cost":"6.63"},{"name":"tests/cases/compiler/privacyTypeParameterOfFunctionDeclFile.ts","time":424,"edits":1,"cost":"6.63"},{"name":"tests/cases/project/sourcemapModuleMultifolderNoOutdir.json","time":423,"edits":1,"cost":"6.63"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnConstructorSignature.ts","time":423,"edits":1,"cost":"6.63"},{"name":"tests/cases/project/sourcemapMixedSubfolderSpecifyOutputDirectory.json","time":422,"edits":1,"cost":"6.63"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.ts","time":422,"edits":1,"cost":"6.63"},{"name":"tests/cases/project/sourceRootAbsolutePathModuleSimpleNoOutdir.json","time":422,"edits":1,"cost":"6.63"},{"name":"tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditionIsObjectType.ts","time":422,"edits":1,"cost":"6.63"},{"name":"tests/cases/compiler/blockScopedBindingsReassignedInLoop6.ts","time":421,"edits":1,"cost":"6.62"},{"name":"tests/cases/compiler/cacheResolutions.ts","time":421,"edits":1,"cost":"6.62"},{"name":"tests/cases/conformance/async/es2017/asyncAwait_es2017.ts","time":841,"edits":2,"cost":"6.62"},{"name":"tests/cases/project/sourcemapSingleFileSpecifyOutputFile.json","time":420,"edits":1,"cost":"6.62"},{"name":"tests/cases/project/declarationsCascadingImports.json","time":420,"edits":1,"cost":"6.62"},{"name":"tests/cases/fourslash/distinctTypesInCallbacksWithSameNames.ts","time":420,"edits":1,"cost":"6.62"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportNodeModules2.ts","time":420,"edits":1,"cost":"6.62"},{"name":"tests/cases/project/mapRootRelativePathModuleSimpleNoOutdir.json","time":418,"edits":1,"cost":"6.62"},{"name":"tests/cases/conformance/types/thisType/thisTypeInObjectLiterals2.ts","time":418,"edits":1,"cost":"6.62"},{"name":"tests/cases/project/mapRootAbsolutePathModuleSubfolderNoOutdir.json","time":418,"edits":1,"cost":"6.62"},{"name":"tests/cases/project/outMixedSubfolderNoOutdir.json","time":417,"edits":1,"cost":"6.61"},{"name":"tests/cases/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory.json","time":416,"edits":1,"cost":"6.61"},{"name":"tests/cases/compiler/typedArraysCrossAssignability01.ts","time":416,"edits":1,"cost":"6.61"},{"name":"tests/cases/fourslash/refactorExtractType57.ts","time":415,"edits":1,"cost":"6.61"},{"name":"tests/cases/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory.json","time":415,"edits":1,"cost":"6.61"},{"name":"tests/cases/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory.json","time":414,"edits":1,"cost":"6.61"},{"name":"tests/cases/conformance/parser/ecmascript5/parserRealSource2.ts","time":414,"edits":1,"cost":"6.61"},{"name":"tests/cases/project/declarationDir2.json","time":413,"edits":1,"cost":"6.60"},{"name":"tests/cases/project/sourcemapModuleSimpleSpecifyOutputDirectory.json","time":413,"edits":1,"cost":"6.60"},{"name":"tests/cases/project/defaultExcludeNodeModulesAndOutDir.json","time":413,"edits":1,"cost":"6.60"},{"name":"tests/cases/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory.json","time":411,"edits":1,"cost":"6.60"},{"name":"tests/cases/fourslash/genericRespecialization1.ts","time":411,"edits":1,"cost":"6.60"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_methodCalls.ts","time":410,"edits":1,"cost":"6.60"},{"name":"tests/cases/project/outMixedSubfolderSpecifyOutputFile.json","time":408,"edits":1,"cost":"6.59"},{"name":"tests/cases/fourslash/unusedImports3FS.ts","time":408,"edits":1,"cost":"6.59"},{"name":"tests/cases/project/cantFindTheModule.json","time":408,"edits":1,"cost":"6.59"},{"name":"tests/cases/project/mapRootAbsolutePathSingleFileSpecifyOutputDirectory.json","time":406,"edits":1,"cost":"6.59"},{"name":"tests/cases/project/sourcemapSimpleNoOutdir.json","time":405,"edits":1,"cost":"6.59"},{"name":"tests/cases/project/sourcerootUrlMixedSubfolderSpecifyOutputFile.json","time":405,"edits":1,"cost":"6.59"},{"name":"tests/cases/project/sourcerootUrlSingleFileNoOutdir.json","time":404,"edits":1,"cost":"6.58"},{"name":"tests/cases/project/maprootUrlsourcerootUrlSimpleSpecifyOutputDirectory.json","time":404,"edits":1,"cost":"6.58"},{"name":"unittests:: tsserver:: compileOnSave:: affected list","time":402,"edits":1,"cost":"6.58"},{"name":"tests/cases/compiler/inferFromGenericFunctionReturnTypes2.ts","time":804,"edits":2,"cost":"6.58"},{"name":"tests/cases/compiler/capturedLetConstInLoop5.ts","time":400,"edits":1,"cost":"6.57"},{"name":"tests/cases/project/moduleMergingOrdering1.json","time":400,"edits":1,"cost":"6.57"},{"name":"tests/cases/conformance/jsx/checkJsxChildrenProperty15.tsx","time":799,"edits":2,"cost":"6.57"},{"name":"tests/cases/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir.json","time":399,"edits":1,"cost":"6.57"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithConstructSignatures.ts","time":399,"edits":1,"cost":"6.57"},{"name":"tests/cases/fourslash/unusedVariableInForLoop7FS.ts","time":398,"edits":1,"cost":"6.57"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringForOfObjectBindingPattern.ts","time":397,"edits":1,"cost":"6.57"},{"name":"tests/cases/fourslash/getOccurrencesIsDefinitionOfVariable.ts","time":397,"edits":1,"cost":"6.57"},{"name":"tests/cases/project/nestedLocalModuleWithRecursiveTypecheck.json","time":396,"edits":1,"cost":"6.56"},{"name":"tests/cases/project/maprootUrlModuleSubfolderNoOutdir.json","time":395,"edits":1,"cost":"6.56"},{"name":"tests/cases/conformance/types/thisType/thisTypeInFunctions.ts","time":395,"edits":1,"cost":"6.56"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringAssignmentStatementArrayBindingPatternDefaultValues.ts","time":395,"edits":1,"cost":"6.56"},{"name":"tests/cases/project/maprootUrlsourcerootUrlMultifolderSpecifyOutputDirectory.json","time":394,"edits":1,"cost":"6.56"},{"name":"tests/cases/project/sourcemapSubfolderSpecifyOutputDirectory.json","time":393,"edits":1,"cost":"6.55"},{"name":"tests/cases/project/sourceRootRelativePathSimpleSpecifyOutputDirectory.json","time":393,"edits":1,"cost":"6.55"},{"name":"tests/cases/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json","time":393,"edits":1,"cost":"6.55"},{"name":"tests/cases/project/maprootUrlMixedSubfolderNoOutdir.json","time":392,"edits":1,"cost":"6.55"},{"name":"tests/cases/project/referenceResolutionRelativePaths.json","time":390,"edits":1,"cost":"6.55"},{"name":"tests/cases/fourslash/tsxQuickInfo2.ts","time":390,"edits":1,"cost":"6.55"},{"name":"tests/cases/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile.json","time":389,"edits":1,"cost":"6.54"},{"name":"tests/cases/fourslash/renameJsPropertyAssignment2.ts","time":389,"edits":1,"cost":"6.54"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_initializerInference.ts","time":388,"edits":1,"cost":"6.54"},{"name":"tests/cases/fourslash/protoVarInContextualObjectLiteral.ts","time":388,"edits":1,"cost":"6.54"},{"name":"tests/cases/conformance/types/forAwait/types.forAwait.es2018.1.ts","time":387,"edits":1,"cost":"6.54"},{"name":"tests/cases/project/sourcerootUrlSimpleNoOutdir.json","time":387,"edits":1,"cost":"6.54"},{"name":"tests/cases/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputDirectory.json","time":387,"edits":1,"cost":"6.54"},{"name":"tests/cases/compiler/downlevelLetConst16.ts","time":387,"edits":1,"cost":"6.54"},{"name":"tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx","time":1160,"edits":3,"cost":"6.54"},{"name":"tests/cases/project/jsFileCompilationSameNameDTsSpecified.json","time":386,"edits":1,"cost":"6.54"},{"name":"tests/cases/compiler/privacyImportParseErrors.ts","time":386,"edits":1,"cost":"6.54"},{"name":"tests/cases/project/sourceRootAbsolutePathSingleFileNoOutdir.json","time":385,"edits":1,"cost":"6.53"},{"name":"tests/cases/project/defaultExcludeOnlyNodeModules.json","time":385,"edits":1,"cost":"6.53"},{"name":"tests/cases/project/maprootUrlsourcerootUrlMultifolderNoOutdir.json","time":385,"edits":1,"cost":"6.53"},{"name":"tests/cases/project/sourceRootAbsolutePathSimpleSpecifyOutputDirectory.json","time":385,"edits":1,"cost":"6.53"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_classExpressionGoodUsages.ts","time":383,"edits":1,"cost":"6.53"},{"name":"tests/cases/project/sourcemapModuleSimpleNoOutdir.json","time":383,"edits":1,"cost":"6.53"},{"name":"tests/cases/project/mapRootAbsolutePathSimpleSpecifyOutputDirectory.json","time":383,"edits":1,"cost":"6.53"},{"name":"tests/cases/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json","time":383,"edits":1,"cost":"6.53"},{"name":"tests/cases/fourslash/refactorExtractType55.ts","time":382,"edits":1,"cost":"6.53"},{"name":"tests/cases/compiler/tsxInvokeComponentType.tsx","time":764,"edits":2,"cost":"6.53"},{"name":"tests/cases/project/declarationsMultipleTimesImport.json","time":382,"edits":1,"cost":"6.53"},{"name":"tests/cases/project/sourceRootAbsolutePathMultifolderSpecifyOutputFile.json","time":382,"edits":1,"cost":"6.53"},{"name":"tests/cases/fourslash/unusedImports11FS.ts","time":381,"edits":1,"cost":"6.52"},{"name":"unittests:: tsserver:: ConfiguredProjects","time":380,"edits":1,"cost":"6.52"},{"name":"tests/cases/compiler/arrayBestCommonTypes.ts","time":380,"edits":1,"cost":"6.52"},{"name":"tests/cases/project/nestedLocalModuleSimpleCase.json","time":380,"edits":1,"cost":"6.52"},{"name":"tests/cases/project/outModuleSimpleSpecifyOutputDirectory.json","time":380,"edits":1,"cost":"6.52"},{"name":"tests/cases/project/referenceResolutionRelativePathsFromRootDirectory.json","time":379,"edits":1,"cost":"6.52"},{"name":"tests/cases/project/sourcemapModuleSubfolderSpecifyOutputDirectory.json","time":378,"edits":1,"cost":"6.52"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts","time":377,"edits":1,"cost":"6.51"},{"name":"tests/cases/compiler/commentsModules.ts","time":376,"edits":1,"cost":"6.51"},{"name":"tests/cases/fourslash/refactorExtractType46.ts","time":375,"edits":1,"cost":"6.51"},{"name":"tests/cases/project/specifyExcludeUsingRelativepathWithAllowJS.json","time":375,"edits":1,"cost":"6.51"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts","time":375,"edits":1,"cost":"6.51"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardRedundancy.ts","time":374,"edits":1,"cost":"6.51"},{"name":"tests/cases/compiler/giant.ts","time":373,"edits":1,"cost":"6.50"},{"name":"tests/cases/project/mapRootRelativePathMultifolderSpecifyOutputDirectory.json","time":372,"edits":1,"cost":"6.50"},{"name":"tests/cases/fourslash/duplicateIndexers.ts","time":372,"edits":1,"cost":"6.50"},{"name":"tests/cases/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory.json","time":371,"edits":1,"cost":"6.50"},{"name":"tests/cases/project/outMultifolderNoOutdir.json","time":370,"edits":1,"cost":"6.49"},{"name":"tests/cases/conformance/fixSignatureCaching.ts","time":1109,"edits":3,"cost":"6.49"},{"name":"tests/cases/fourslash/signatureHelpCallExpressionTuples.ts","time":739,"edits":2,"cost":"6.49"},{"name":"tests/cases/project/maprootUrlSingleFileNoOutdir.json","time":369,"edits":1,"cost":"6.49"},{"name":"tests/cases/project/jsFileCompilationSameNameDTsSpecifiedWithAllowJs.json","time":369,"edits":1,"cost":"6.49"},{"name":"tests/cases/project/sourcerootUrlSingleFileSpecifyOutputDirectory.json","time":368,"edits":1,"cost":"6.49"},{"name":"tests/cases/fourslash/renameForDefaultExport04.ts","time":368,"edits":1,"cost":"6.49"},{"name":"tests/cases/fourslash/refactorExtractType59.ts","time":367,"edits":1,"cost":"6.49"},{"name":"tests/cases/project/jsFileCompilationSameNameFilesSpecified.json","time":367,"edits":1,"cost":"6.49"},{"name":"tests/cases/project/outSingleFileSpecifyOutputDirectory.json","time":367,"edits":1,"cost":"6.49"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.ts","time":367,"edits":1,"cost":"6.49"},{"name":"tests/cases/conformance/expressions/propertyAccess/propertyAccess.ts","time":367,"edits":1,"cost":"6.49"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfacePropertySignatures.ts","time":367,"edits":1,"cost":"6.49"},{"name":"tests/cases/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory.json","time":366,"edits":1,"cost":"6.48"},{"name":"tests/cases/project/outModuleSubfolderNoOutdir.json","time":365,"edits":1,"cost":"6.48"},{"name":"tests/cases/fourslash/refactorExtractType8.ts","time":364,"edits":1,"cost":"6.48"},{"name":"tests/cases/project/mapRootRelativePathSubfolderSpecifyOutputFile.json","time":363,"edits":1,"cost":"6.48"},{"name":"tests/cases/project/referencePathStatic.json","time":363,"edits":1,"cost":"6.48"},{"name":"tests/cases/conformance/functions/functionWithUseStrictAndSimpleParameterList_es2016.ts","time":725,"edits":2,"cost":"6.47"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_functionComments2.ts","time":362,"edits":1,"cost":"6.47"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_method.ts","time":362,"edits":1,"cost":"6.47"},{"name":"tests/cases/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir.json","time":362,"edits":1,"cost":"6.47"},{"name":"tests/cases/project/sourceRootAbsolutePathModuleMultifolderNoOutdir.json","time":362,"edits":1,"cost":"6.47"},{"name":"tests/cases/project/mapRootRelativePathSubfolderNoOutdir.json","time":362,"edits":1,"cost":"6.47"},{"name":"tests/cases/project/maprootUrlModuleSimpleSpecifyOutputDirectory.json","time":361,"edits":1,"cost":"6.47"},{"name":"tests/cases/conformance/types/objectTypeLiteral/propertySignatures/propertyNamesOfReservedWords.ts","time":361,"edits":1,"cost":"6.47"},{"name":"tests/cases/project/outSingleFileNoOutdir.json","time":360,"edits":1,"cost":"6.47"},{"name":"tests/cases/project/maprootUrlModuleSimpleSpecifyOutputFile.json","time":360,"edits":1,"cost":"6.47"},{"name":"tests/cases/project/sourceRootAbsolutePathSubfolderNoOutdir.json","time":359,"edits":1,"cost":"6.46"},{"name":"tests/cases/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile.json","time":359,"edits":1,"cost":"6.46"},{"name":"tests/cases/project/sourcemapModuleMultifolderSpecifyOutputFile.json","time":357,"edits":1,"cost":"6.46"},{"name":"tests/cases/project/relativeGlobalRef.json","time":357,"edits":1,"cost":"6.46"},{"name":"tests/cases/project/mapRootAbsolutePathMixedSubfolderNoOutdir.json","time":356,"edits":1,"cost":"6.46"},{"name":"tests/cases/project/referenceResolutionRelativePathsRelativeToRootDirectory.json","time":356,"edits":1,"cost":"6.46"},{"name":"tests/cases/project/intReferencingExtAndInt.json","time":356,"edits":1,"cost":"6.46"},{"name":"tests/cases/fourslash/breakpointValidationDecorators.ts","time":356,"edits":1,"cost":"6.46"},{"name":"tests/cases/fourslash/completionListBuilderLocations_VariableDeclarations.ts","time":356,"edits":1,"cost":"6.46"},{"name":"tests/cases/fourslash/codeFixInferFromUsageArrow.ts","time":711,"edits":2,"cost":"6.45"},{"name":"tests/cases/project/referenceResolutionRelativePathsNoResolve.json","time":355,"edits":1,"cost":"6.45"},{"name":"tests/cases/project/sourcemapModuleSubfolderNoOutdir.json","time":354,"edits":1,"cost":"6.45"},{"name":"tests/cases/project/sourceRootAbsolutePathModuleSubfolderNoOutdir.json","time":354,"edits":1,"cost":"6.45"},{"name":"tests/cases/fourslash/refactorExtractType_js2.ts","time":352,"edits":1,"cost":"6.44"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_function.ts","time":352,"edits":1,"cost":"6.44"},{"name":"tests/cases/project/sourcerootUrlModuleMultifolderSpecifyOutputFile.json","time":352,"edits":1,"cost":"6.44"},{"name":"tests/cases/project/declarationsIndirectImportShouldResultInError.json","time":352,"edits":1,"cost":"6.44"},{"name":"tests/cases/fourslash/jsFileJsdocTypedefTagTypeExpressionCompletion3.ts","time":352,"edits":1,"cost":"6.44"},{"name":"tests/cases/fourslash/regexp.ts","time":352,"edits":1,"cost":"6.44"},{"name":"tests/cases/compiler/genericPrototypeProperty.ts","time":352,"edits":1,"cost":"6.44"},{"name":"unittests:: tsc-watch:: resolutionCache:: tsc-watch module resolution caching","time":351,"edits":1,"cost":"6.44"},{"name":"tests/cases/compiler/intersectionsOfLargeUnions2.ts","time":702,"edits":2,"cost":"6.44"},{"name":"tests/cases/fourslash/exportEqualTypes.ts","time":351,"edits":1,"cost":"6.44"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipPrimitiveType.ts","time":351,"edits":1,"cost":"6.44"},{"name":"tests/cases/project/visibilityOfTypeUsedAcrossModules2.json","time":350,"edits":1,"cost":"6.44"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportNodeModules3.ts","time":350,"edits":1,"cost":"6.44"},{"name":"tests/cases/compiler/inferringAnyFunctionType2.ts","time":350,"edits":1,"cost":"6.44"},{"name":"tests/cases/project/maprootUrlModuleSubfolderSpecifyOutputDirectory.json","time":349,"edits":1,"cost":"6.44"},{"name":"tests/cases/project/sourceRootAbsolutePathSingleFileSpecifyOutputFile.json","time":349,"edits":1,"cost":"6.44"},{"name":"tests/cases/project/mapRootAbsolutePathModuleSimpleNoOutdir.json","time":348,"edits":1,"cost":"6.43"},{"name":"tests/cases/project/maprootUrlModuleMultifolderSpecifyOutputFile.json","time":348,"edits":1,"cost":"6.43"},{"name":"tests/cases/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.json","time":348,"edits":1,"cost":"6.43"},{"name":"tests/cases/compiler/overridingPrivateStaticMembers.ts","time":348,"edits":1,"cost":"6.43"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_chainedCall.ts","time":347,"edits":1,"cost":"6.43"},{"name":"tests/cases/fourslash/codefixEnableExperimentalDecorators_missingCompilerOptionsInTsconfig.ts","time":347,"edits":1,"cost":"6.43"},{"name":"tests/cases/project/maprootUrlSimpleNoOutdir.json","time":347,"edits":1,"cost":"6.43"},{"name":"tests/cases/project/sourcemapMultifolderNoOutdir.json","time":347,"edits":1,"cost":"6.43"},{"name":"tests/cases/fourslash/server/openFileWithSyntaxKind.ts","time":346,"edits":1,"cost":"6.43"},{"name":"tests/cases/project/outModuleSubfolderSpecifyOutputDirectory.json","time":345,"edits":1,"cost":"6.42"},{"name":"tests/cases/fourslash/getOccurrencesPublic1.ts","time":345,"edits":1,"cost":"6.42"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.ts","time":345,"edits":1,"cost":"6.42"},{"name":"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportInEs5.ts","time":345,"edits":1,"cost":"6.42"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_constructor.ts","time":344,"edits":1,"cost":"6.42"},{"name":"tests/cases/project/relativeNestedRef.json","time":344,"edits":1,"cost":"6.42"},{"name":"tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts","time":344,"edits":1,"cost":"6.42"},{"name":"tests/cases/fourslash/renameUMDModuleAlias1.ts","time":344,"edits":1,"cost":"6.42"},{"name":"tests/cases/project/sourcerootUrlSubfolderSpecifyOutputDirectory.json","time":343,"edits":1,"cost":"6.42"},{"name":"tests/cases/compiler/declFileMethods.ts","time":343,"edits":1,"cost":"6.42"},{"name":"tests/cases/conformance/jsx/checkJsxUnionSFXContextualTypeInferredCorrectly.tsx","time":685,"edits":2,"cost":"6.42"},{"name":"tests/cases/project/mapRootRelativePathSimpleNoOutdir.json","time":342,"edits":1,"cost":"6.42"},{"name":"unittests:: Reuse program structure:: General","time":340,"edits":1,"cost":"6.41"},{"name":"tests/cases/project/jsFileCompilationSameNameFilesNotSpecified.json","time":340,"edits":1,"cost":"6.41"},{"name":"tests/cases/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.ts","time":340,"edits":1,"cost":"6.41"},{"name":"tests/cases/conformance/es6/templates/templateStringInTaggedTemplate.ts","time":339,"edits":1,"cost":"6.41"},{"name":"tests/cases/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory.json","time":338,"edits":1,"cost":"6.40"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.ts","time":338,"edits":1,"cost":"6.40"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts","time":338,"edits":1,"cost":"6.40"},{"name":"tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration1ES6.ts","time":337,"edits":1,"cost":"6.40"},{"name":"tests/cases/fourslash/server/ngProxy4.ts","time":337,"edits":1,"cost":"6.40"},{"name":"tests/cases/fourslash/refactorExtractType53.ts","time":336,"edits":1,"cost":"6.40"},{"name":"tests/cases/fourslash/codefixEnableExperimentalDecorators_disabledInCompilerOptionsInTsconfig.ts","time":336,"edits":1,"cost":"6.40"},{"name":"tests/cases/project/sourcerootUrlMultifolderSpecifyOutputFile.json","time":336,"edits":1,"cost":"6.40"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.ts","time":336,"edits":1,"cost":"6.40"},{"name":"tests/cases/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory.json","time":335,"edits":1,"cost":"6.40"},{"name":"tests/cases/fourslash/refactorExtractType51.ts","time":334,"edits":1,"cost":"6.39"},{"name":"unittests:: evaluation:: asyncGeneratorEvaluation","time":334,"edits":1,"cost":"6.39"},{"name":"tests/cases/project/sourceRootRelativePathMultifolderSpecifyOutputFile.json","time":334,"edits":1,"cost":"6.39"},{"name":"tests/cases/project/mapRootAbsolutePathSubfolderSpecifyOutputFile.json","time":334,"edits":1,"cost":"6.39"},{"name":"tests/cases/fourslash/genericMethodParam.ts","time":334,"edits":1,"cost":"6.39"},{"name":"tests/cases/fourslash/completionListsThroughTransitiveBaseClasses.ts","time":333,"edits":1,"cost":"6.39"},{"name":"tests/cases/project/declarationsImportedUseInFunction.json","time":332,"edits":1,"cost":"6.39"},{"name":"tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts","time":332,"edits":1,"cost":"6.39"},{"name":"tests/cases/conformance/parser/ecmascript5/parserRealSource4.ts","time":331,"edits":1,"cost":"6.38"},{"name":"tests/cases/compiler/typedArrays.ts","time":661,"edits":2,"cost":"6.38"},{"name":"tests/cases/fourslash/completionListStaticProtectedMembers2.ts","time":330,"edits":1,"cost":"6.38"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_superCall.ts","time":658,"edits":2,"cost":"6.38"},{"name":"tests/cases/project/sourcerootUrlSingleFileSpecifyOutputFile.json","time":328,"edits":1,"cost":"6.37"},{"name":"tests/cases/compiler/staticAnonymousTypeNotReferencingTypeParameter.ts","time":328,"edits":1,"cost":"6.37"},{"name":"tests/cases/project/sourcerootUrlSimpleSpecifyOutputDirectory.json","time":327,"edits":1,"cost":"6.37"},{"name":"tests/cases/project/defaultExcludeNodeModulesAndRelativePathOutDir.json","time":327,"edits":1,"cost":"6.37"},{"name":"tests/cases/fourslash/codeFixAddMissingInvocationForDecorator01.ts","time":327,"edits":1,"cost":"6.37"},{"name":"tests/cases/fourslash/memberCompletionInForEach1.ts","time":327,"edits":1,"cost":"6.37"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThis.ts","time":327,"edits":1,"cost":"6.37"},{"name":"tests/cases/project/outSimpleNoOutdir.json","time":326,"edits":1,"cost":"6.37"},{"name":"tests/cases/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile.json","time":326,"edits":1,"cost":"6.37"},{"name":"tests/cases/project/referenceResolutionSameFileTwice.json","time":325,"edits":1,"cost":"6.37"},{"name":"tests/cases/fourslash/breakpointValidationStatements.ts","time":325,"edits":1,"cost":"6.37"},{"name":"tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts","time":325,"edits":1,"cost":"6.37"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceEmptyTypeLiteral.ts","time":325,"edits":1,"cost":"6.37"},{"name":"tests/cases/fourslash/genericTypeWithMultipleBases1.ts","time":325,"edits":1,"cost":"6.37"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_thisParam.ts","time":324,"edits":1,"cost":"6.36"},{"name":"unittests:: tsc-watch:: Emit times and Error updates in builder after program changes","time":324,"edits":1,"cost":"6.36"},{"name":"tests/cases/project/sourcemapSubfolderNoOutdir.json","time":324,"edits":1,"cost":"6.36"},{"name":"tests/cases/compiler/reactHOCSpreadprops.tsx","time":647,"edits":2,"cost":"6.36"},{"name":"tests/cases/project/sourceRootAbsolutePathSimpleSpecifyOutputFile.json","time":323,"edits":1,"cost":"6.36"},{"name":"tests/cases/project/baseline2.json","time":323,"edits":1,"cost":"6.36"},{"name":"tests/cases/fourslash/tsxCompletionOnClosingTag2.ts","time":323,"edits":1,"cost":"6.36"},{"name":"tests/cases/fourslash/completionListInObjectBindingPattern08.ts","time":323,"edits":1,"cost":"6.36"},{"name":"tests/cases/compiler/conditionalTypeDoesntSpinForever.ts","time":645,"edits":2,"cost":"6.36"},{"name":"tests/cases/compiler/reactReadonlyHOCAssignabilityReal.tsx","time":645,"edits":2,"cost":"6.36"},{"name":"tests/cases/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory.json","time":322,"edits":1,"cost":"6.36"},{"name":"tests/cases/project/declarationDir.json","time":322,"edits":1,"cost":"6.36"},{"name":"tests/cases/project/sourcemapMixedSubfolderSpecifyOutputFile.json","time":322,"edits":1,"cost":"6.36"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess9.ts","time":322,"edits":1,"cost":"6.36"},{"name":"tests/cases/project/referenceResolutionSameFileTwiceNoResolve.json","time":320,"edits":1,"cost":"6.35"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.ts","time":320,"edits":1,"cost":"6.35"},{"name":"tests/cases/project/jsFileCompilationSameNameDtsNotSpecified.json","time":319,"edits":1,"cost":"6.35"},{"name":"tests/cases/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json","time":319,"edits":1,"cost":"6.35"},{"name":"tests/cases/compiler/privacyVarDeclFile.ts","time":319,"edits":1,"cost":"6.35"},{"name":"tests/cases/fourslash/signatureHelpTypeArguments.ts","time":638,"edits":2,"cost":"6.35"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts","time":318,"edits":1,"cost":"6.34"},{"name":"tests/cases/fourslash/refactorExtractType56.ts","time":317,"edits":1,"cost":"6.34"},{"name":"tests/cases/project/emitDecoratorMetadataSystemJSISolatedModules.json","time":317,"edits":1,"cost":"6.34"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts","time":317,"edits":1,"cost":"6.34"},{"name":"tests/cases/fourslash/tripleSlashRefPathCompletionExtensionsAllowJSFalse.ts","time":316,"edits":1,"cost":"6.34"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment9.ts","time":316,"edits":1,"cost":"6.34"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsAny.ts","time":316,"edits":1,"cost":"6.34"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplatesIncomplete6.ts","time":316,"edits":1,"cost":"6.34"},{"name":"tests/cases/project/privacyCheckOnImportedModuleImportStatementInParentModule.json","time":314,"edits":1,"cost":"6.33"},{"name":"tests/cases/project/mapRootRelativePathModuleSimpleSpecifyOutputFile.json","time":314,"edits":1,"cost":"6.33"},{"name":"tests/cases/project/outSimpleSpecifyOutputFile.json","time":314,"edits":1,"cost":"6.33"},{"name":"tests/cases/fourslash/reverseMappedTypeQuickInfo.ts","time":627,"edits":2,"cost":"6.33"},{"name":"tests/cases/fourslash/findAllRefsPrefixSuffixPreference.ts","time":627,"edits":2,"cost":"6.33"},{"name":"tests/cases/project/declarationsGlobalImport.json","time":313,"edits":1,"cost":"6.33"},{"name":"tests/cases/project/mapRootRelativePathSingleFileSpecifyOutputFile.json","time":313,"edits":1,"cost":"6.33"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_arrowFunction.ts","time":312,"edits":1,"cost":"6.32"},{"name":"tests/cases/project/maprootUrlModuleSubfolderSpecifyOutputFile.json","time":312,"edits":1,"cost":"6.32"},{"name":"tests/cases/project/sourcerootUrlModuleSubfolderNoOutdir.json","time":312,"edits":1,"cost":"6.32"},{"name":"tests/cases/project/specifyExcludeWithOutUsingRelativePath.json","time":312,"edits":1,"cost":"6.32"},{"name":"tests/cases/fourslash/quickInfoForContextuallyTypedFunctionInTaggedTemplateExpression2.ts","time":312,"edits":1,"cost":"6.32"},{"name":"tests/cases/project/nonRelative.json","time":311,"edits":1,"cost":"6.32"},{"name":"tests/cases/project/sourcemapMultifolderSpecifyOutputFile.json","time":311,"edits":1,"cost":"6.32"},{"name":"tests/cases/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile.json","time":311,"edits":1,"cost":"6.32"},{"name":"tests/cases/project/sourcemapSubfolderSpecifyOutputFile.json","time":311,"edits":1,"cost":"6.32"},{"name":"tests/cases/compiler/intersectionsOfLargeUnions.ts","time":620,"edits":2,"cost":"6.32"},{"name":"tests/cases/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile.json","time":310,"edits":1,"cost":"6.32"},{"name":"tests/cases/compiler/externalModuleExportingGenericClass.ts","time":310,"edits":1,"cost":"6.32"},{"name":"tests/cases/project/sourcemapSingleFileNoOutdir.json","time":309,"edits":1,"cost":"6.31"},{"name":"tests/cases/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json","time":309,"edits":1,"cost":"6.31"},{"name":"tests/cases/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile.json","time":308,"edits":1,"cost":"6.31"},{"name":"tests/cases/project/maprootUrlSingleFileSpecifyOutputFile.json","time":308,"edits":1,"cost":"6.31"},{"name":"tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrOperatorWithEveryType.ts","time":308,"edits":1,"cost":"6.31"},{"name":"tests/cases/compiler/moduleAugmentationInAmbientModule5.ts","time":308,"edits":1,"cost":"6.31"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.ts","time":307,"edits":1,"cost":"6.31"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_importedFunction5.ts","time":612,"edits":2,"cost":"6.30"},{"name":"tests/cases/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile.json","time":306,"edits":1,"cost":"6.30"},{"name":"tests/cases/project/sourceRootRelativePathSingleFileSpecifyOutputDirectory.json","time":305,"edits":1,"cost":"6.30"},{"name":"tests/cases/fourslash/completionListForGenericInstance1.ts","time":305,"edits":1,"cost":"6.30"},{"name":"tests/cases/conformance/functions/strictBindCallApply1.ts","time":609,"edits":2,"cost":"6.30"},{"name":"tests/cases/project/noProjectOptionAndInputFiles.json","time":304,"edits":1,"cost":"6.30"},{"name":"tests/cases/compiler/commentsInheritance.ts","time":304,"edits":1,"cost":"6.30"},{"name":"tests/cases/fourslash/completionListInNamedFunctionExpression1.ts","time":304,"edits":1,"cost":"6.30"},{"name":"tests/cases/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json","time":303,"edits":1,"cost":"6.29"},{"name":"tests/cases/fourslash/pasteLambdaOverModule.ts","time":303,"edits":1,"cost":"6.29"},{"name":"tests/cases/fourslash/unusedVariableInModule1.ts","time":303,"edits":1,"cost":"6.29"},{"name":"tests/cases/project/outSimpleSpecifyOutputDirectory.json","time":302,"edits":1,"cost":"6.29"},{"name":"tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts","time":302,"edits":1,"cost":"6.29"},{"name":"tests/cases/fourslash/refactorExtractType7.ts","time":301,"edits":1,"cost":"6.29"},{"name":"tests/cases/fourslash/genericCombinators2.ts","time":602,"edits":2,"cost":"6.29"},{"name":"tests/cases/project/jsFileCompilationDifferentNamesSpecifiedWithAllowJs.json","time":301,"edits":1,"cost":"6.29"},{"name":"tests/cases/fourslash/nameOfRetypedClassInModule.ts","time":301,"edits":1,"cost":"6.29"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_classDeclarationAliasing.ts","time":300,"edits":1,"cost":"6.28"},{"name":"unittests:: config:: configurationExtension","time":300,"edits":1,"cost":"6.28"},{"name":"tests/cases/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile.json","time":299,"edits":1,"cost":"6.28"},{"name":"tests/cases/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile.json","time":299,"edits":1,"cost":"6.28"},{"name":"tests/cases/project/mapRootRelativePathMultifolderSpecifyOutputFile.json","time":298,"edits":1,"cost":"6.28"},{"name":"tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts","time":298,"edits":1,"cost":"6.28"},{"name":"tests/cases/project/maprootUrlsourcerootUrlSingleFileSpecifyOutputFile.json","time":296,"edits":1,"cost":"6.27"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts","time":296,"edits":1,"cost":"6.27"},{"name":"tests/cases/fourslash/findAllRefsForUMDModuleAlias1.ts","time":296,"edits":1,"cost":"6.27"},{"name":"tests/cases/project/mapRootRelativePathSimpleSpecifyOutputFile.json","time":295,"edits":1,"cost":"6.27"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts","time":295,"edits":1,"cost":"6.27"},{"name":"tests/cases/project/outSubfolderSpecifyOutputDirectory.json","time":292,"edits":1,"cost":"6.26"},{"name":"tests/cases/project/outModuleSimpleSpecifyOutputFile.json","time":292,"edits":1,"cost":"6.26"},{"name":"tests/cases/conformance/decorators/class/method/parameter/decoratorOnClassMethodParameter2.ts","time":583,"edits":2,"cost":"6.26"},{"name":"tests/cases/project/emitDecoratorMetadataSystemJSISolatedModulesNoResolve.json","time":291,"edits":1,"cost":"6.25"},{"name":"tests/cases/fourslash/getOccurrencesSwitchCaseDefault.ts","time":291,"edits":1,"cost":"6.25"},{"name":"tests/cases/fourslash/todoComments1.ts","time":291,"edits":1,"cost":"6.25"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplates2.ts","time":289,"edits":1,"cost":"6.25"},{"name":"tests/cases/conformance/enums/enumClassification.ts","time":289,"edits":1,"cost":"6.25"},{"name":"tests/cases/fourslash/completionForStringLiteral4.ts","time":289,"edits":1,"cost":"6.25"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPattern2.ts","time":288,"edits":1,"cost":"6.24"},{"name":"tests/cases/fourslash/completionAtDottedNamespace.ts","time":287,"edits":1,"cost":"6.24"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures3.ts","time":287,"edits":1,"cost":"6.24"},{"name":"tests/cases/fourslash/remoteGetReferences.ts","time":574,"edits":2,"cost":"6.24"},{"name":"tests/cases/conformance/types/tuple/optionalTupleElements1.ts","time":287,"edits":1,"cost":"6.24"},{"name":"tests/cases/project/maprootUrlsourcerootUrlSubfolderSpecifyOutputFile.json","time":286,"edits":1,"cost":"6.24"},{"name":"tests/cases/project/emitDecoratorMetadataCommonJSISolatedModules.json","time":286,"edits":1,"cost":"6.24"},{"name":"tests/cases/fourslash/server/completionEntryDetailAcrossFiles01.ts","time":286,"edits":1,"cost":"6.24"},{"name":"tests/cases/fourslash/findReferencesDefinitionDisplayParts.ts","time":286,"edits":1,"cost":"6.24"},{"name":"tests/cases/compiler/vardecl.ts","time":286,"edits":1,"cost":"6.24"},{"name":"tests/cases/project/outSubfolderSpecifyOutputFile.json","time":285,"edits":1,"cost":"6.23"},{"name":"tests/cases/project/nodeModulesMaxDepthExceeded.json","time":285,"edits":1,"cost":"6.23"},{"name":"tests/cases/fourslash/extendArrayInterfaceMember.ts","time":285,"edits":1,"cost":"6.23"},{"name":"tests/cases/fourslash/findAllRefsOfConstructor2.ts","time":568,"edits":2,"cost":"6.23"},{"name":"tests/cases/project/sourcerootUrlSubfolderSpecifyOutputFile.json","time":284,"edits":1,"cost":"6.23"},{"name":"tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts","time":284,"edits":1,"cost":"6.23"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.ts","time":284,"edits":1,"cost":"6.23"},{"name":"tests/cases/fourslash/todoComments13.ts","time":284,"edits":1,"cost":"6.23"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_typedRestParam.ts","time":283,"edits":1,"cost":"6.23"},{"name":"tests/cases/compiler/privacyCannotNameAccessorDeclFile.ts","time":283,"edits":1,"cost":"6.23"},{"name":"tests/cases/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory.json","time":283,"edits":1,"cost":"6.23"},{"name":"tests/cases/conformance/types/literal/enumLiteralTypes2.ts","time":283,"edits":1,"cost":"6.23"},{"name":"unittests:: evaluation:: asyncArrowEvaluation","time":282,"edits":1,"cost":"6.22"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPatternDefaultValues.ts","time":282,"edits":1,"cost":"6.22"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts","time":282,"edits":1,"cost":"6.22"},{"name":"tests/cases/compiler/genericFunctionSpecializations1.ts","time":282,"edits":1,"cost":"6.22"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_functionComments.ts","time":281,"edits":1,"cost":"6.22"},{"name":"tests/cases/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile.json","time":281,"edits":1,"cost":"6.22"},{"name":"tests/cases/fourslash/breakpointValidationFunctions.ts","time":281,"edits":1,"cost":"6.22"},{"name":"tests/cases/conformance/parser/ecmascript5/parserRealSource6.ts","time":281,"edits":1,"cost":"6.22"},{"name":"tests/cases/conformance/types/typeRelationships/bestCommonType/heterogeneousArrayLiterals.ts","time":281,"edits":1,"cost":"6.22"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPattern.ts","time":281,"edits":1,"cost":"6.22"},{"name":"tests/cases/project/emitDecoratorMetadataSystemJS.json","time":280,"edits":1,"cost":"6.22"},{"name":"tests/cases/project/specifyExcludeUsingRelativepath.json","time":279,"edits":1,"cost":"6.21"},{"name":"tests/cases/fourslash/server/openFile.ts","time":279,"edits":1,"cost":"6.21"},{"name":"tests/cases/fourslash/shims/getCompletionsAtPosition.ts","time":279,"edits":1,"cost":"6.21"},{"name":"tests/cases/fourslash/quickInfoForGenericConstraints1.ts","time":279,"edits":1,"cost":"6.21"},{"name":"tests/cases/fourslash/addMemberToInterface.ts","time":279,"edits":1,"cost":"6.21"},{"name":"tests/cases/conformance/types/forAwait/types.forAwait.es2018.2.ts","time":278,"edits":1,"cost":"6.21"},{"name":"tests/cases/fourslash/errorConsistency.ts","time":278,"edits":1,"cost":"6.21"},{"name":"tests/cases/fourslash/findAllRefsModuleAugmentation.ts","time":278,"edits":1,"cost":"6.21"},{"name":"tests/cases/conformance/es6/destructuring/destructuringVariableDeclaration1ES5iterable.ts","time":278,"edits":1,"cost":"6.21"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInInterface.ts","time":277,"edits":1,"cost":"6.21"},{"name":"tests/cases/compiler/genericClassWithStaticFactory.ts","time":277,"edits":1,"cost":"6.21"},{"name":"tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts","time":277,"edits":1,"cost":"6.21"},{"name":"tests/cases/fourslash/jsdocTypedefTagSemanticMeaning1.ts","time":553,"edits":2,"cost":"6.20"},{"name":"tests/cases/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile.json","time":276,"edits":1,"cost":"6.20"},{"name":"tests/cases/fourslash/getOccurrencesClassExpressionStaticThis.ts","time":276,"edits":1,"cost":"6.20"},{"name":"tests/cases/compiler/restParamModifier.ts","time":276,"edits":1,"cost":"6.20"},{"name":"tests/cases/project/privacyCheckOnImportedModuleDeclarationsInsideModule.json","time":275,"edits":1,"cost":"6.20"},{"name":"tests/cases/conformance/jsx/checkJsxChildrenProperty8.tsx","time":550,"edits":2,"cost":"6.20"},{"name":"tests/cases/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory.json","time":275,"edits":1,"cost":"6.20"},{"name":"tests/cases/compiler/fatarrowfunctionsOptionalArgs.ts","time":275,"edits":1,"cost":"6.20"},{"name":"tests/cases/conformance/classes/members/accessibility/protectedClassPropertyAccessibleWithinNestedSubclass1.ts","time":275,"edits":1,"cost":"6.20"},{"name":"tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts","time":274,"edits":1,"cost":"6.19"},{"name":"tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorWithEveryType.ts","time":274,"edits":1,"cost":"6.19"},{"name":"tests/cases/fourslash/quickInfoOnUnResolvedBaseConstructorSignature.ts","time":274,"edits":1,"cost":"6.19"},{"name":"tests/cases/project/maprootUrlMultifolderSpecifyOutputFile.json","time":273,"edits":1,"cost":"6.19"},{"name":"tests/cases/project/outMixedSubfolderSpecifyOutputFileAndOutputDirectory.json","time":273,"edits":1,"cost":"6.19"},{"name":"tests/cases/conformance/jsdoc/jsdocTypeFromChainedAssignment3.ts","time":546,"edits":2,"cost":"6.19"},{"name":"tests/cases/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile.json","time":273,"edits":1,"cost":"6.19"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures3.ts","time":273,"edits":1,"cost":"6.19"},{"name":"tests/cases/fourslash/getEditsForFileRename_renameFromIndex.ts","time":545,"edits":2,"cost":"6.19"},{"name":"tests/cases/project/mapRootSourceRootWithNoSourceMapOption.json","time":272,"edits":1,"cost":"6.19"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_functionTypeParameters.ts","time":271,"edits":1,"cost":"6.18"},{"name":"tests/cases/fourslash/jsSpecialAssignmentMerging2.ts","time":271,"edits":1,"cost":"6.18"},{"name":"tests/cases/compiler/controlFlowCaching.ts","time":271,"edits":1,"cost":"6.18"},{"name":"tests/cases/fourslash/extract-method6.ts","time":271,"edits":1,"cost":"6.18"},{"name":"tests/cases/conformance/externalModules/es6/es6modulekind.ts","time":271,"edits":1,"cost":"6.18"},{"name":"tests/cases/conformance/es6/destructuring/destructuringWithLiteralInitializers.ts","time":270,"edits":1,"cost":"6.18"},{"name":"tests/cases/fourslash/todoComments4.ts","time":270,"edits":1,"cost":"6.18"},{"name":"tests/cases/conformance/parser/ecmascript5/Accessors/parserSetAccessorWithTypeParameters1.ts","time":270,"edits":1,"cost":"6.18"},{"name":"tests/cases/project/relativeGlobal.json","time":268,"edits":1,"cost":"6.17"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPatternDefaultValues2.ts","time":268,"edits":1,"cost":"6.17"},{"name":"tests/cases/fourslash/renameAliasExternalModule2.ts","time":268,"edits":1,"cost":"6.17"},{"name":"tests/cases/fourslash/server/formatSpaceBetweenFunctionAndArrayIndex.ts","time":536,"edits":2,"cost":"6.17"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts","time":268,"edits":1,"cost":"6.17"},{"name":"tests/cases/project/sourcerootUrlSimpleSpecifyOutputFile.json","time":267,"edits":1,"cost":"6.17"},{"name":"tests/cases/compiler/controlFlowSelfReferentialLoop.ts","time":534,"edits":2,"cost":"6.17"},{"name":"tests/cases/conformance/types/literal/literalTypes2.ts","time":267,"edits":1,"cost":"6.17"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsModules.ts","time":267,"edits":1,"cost":"6.17"},{"name":"tests/cases/fourslash/unusedFunctionInNamespace5.ts","time":267,"edits":1,"cost":"6.17"},{"name":"tests/cases/project/emitDecoratorMetadataCommonJSISolatedModulesNoResolve.json","time":266,"edits":1,"cost":"6.16"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint3.ts","time":266,"edits":1,"cost":"6.16"},{"name":"tests/cases/conformance/types/uniqueSymbol/uniqueSymbolsDeclarations.ts","time":265,"edits":1,"cost":"6.16"},{"name":"tests/cases/compiler/intTypeCheck.ts","time":265,"edits":1,"cost":"6.16"},{"name":"tests/cases/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile.json","time":264,"edits":1,"cost":"6.16"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_staticMethod.ts","time":263,"edits":1,"cost":"6.15"},{"name":"unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different polling/non polling options","time":263,"edits":1,"cost":"6.15"},{"name":"tests/cases/project/jsFileCompilationSameNameFilesNotSpecifiedWithAllowJs.json","time":263,"edits":1,"cost":"6.15"},{"name":"tests/cases/project/declarationDir3.json","time":263,"edits":1,"cost":"6.15"},{"name":"tests/cases/conformance/types/objectTypeLiteral/methodSignatures/functionLiterals.ts","time":263,"edits":1,"cost":"6.15"},{"name":"tests/cases/project/circularReferencing2.json","time":262,"edits":1,"cost":"6.15"},{"name":"tests/cases/fourslash/memberConstructorEdits.ts","time":262,"edits":1,"cost":"6.15"},{"name":"tests/cases/conformance/types/members/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.ts","time":262,"edits":1,"cost":"6.15"},{"name":"tests/cases/project/nodeModulesImportHigher.json","time":261,"edits":1,"cost":"6.15"},{"name":"tests/cases/project/sourcemapSimpleSpecifyOutputFile.json","time":261,"edits":1,"cost":"6.15"},{"name":"tests/cases/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile.json","time":261,"edits":1,"cost":"6.15"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts","time":261,"edits":1,"cost":"6.15"},{"name":"tests/cases/fourslash/arrayCallAndConstructTypings.ts","time":261,"edits":1,"cost":"6.15"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_namelessClass.ts","time":520,"edits":2,"cost":"6.14"},{"name":"tests/cases/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile.json","time":260,"edits":1,"cost":"6.14"},{"name":"tests/cases/project/jsFileCompilationDifferentNamesSpecified.json","time":260,"edits":1,"cost":"6.14"},{"name":"tests/cases/compiler/moduledecl.ts","time":260,"edits":1,"cost":"6.14"},{"name":"tests/cases/project/sourceRootAbsolutePathSubfolderSpecifyOutputFile.json","time":260,"edits":1,"cost":"6.14"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts","time":260,"edits":1,"cost":"6.14"},{"name":"tests/cases/fourslash/signatureHelpSimpleConstructorCall.ts","time":260,"edits":1,"cost":"6.14"},{"name":"tests/cases/compiler/sourceMap-EmptyFile1.ts","time":260,"edits":1,"cost":"6.14"},{"name":"unittests:: tsserver:: Inferred projects","time":259,"edits":1,"cost":"6.14"},{"name":"tests/cases/fourslash/genericInterfacePropertyInference2.ts","time":259,"edits":1,"cost":"6.14"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardsInRightOperandOfOrOrOperator.ts","time":259,"edits":1,"cost":"6.14"},{"name":"tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer5.ts","time":259,"edits":1,"cost":"6.14"},{"name":"tests/cases/fourslash/signatureHelpFilteredTriggers01.ts","time":517,"edits":2,"cost":"6.14"},{"name":"tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping.ts","time":517,"edits":2,"cost":"6.14"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_functionExpression.ts","time":258,"edits":1,"cost":"6.13"},{"name":"tests/cases/compiler/nonNullReferenceMatching.ts","time":516,"edits":2,"cost":"6.13"},{"name":"tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts","time":258,"edits":1,"cost":"6.13"},{"name":"tests/cases/project/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule.json","time":258,"edits":1,"cost":"6.13"},{"name":"tests/cases/fourslash/renameParameterPropertyDeclaration2.ts","time":258,"edits":1,"cost":"6.13"},{"name":"tests/cases/fourslash/renameInheritedProperties1.ts","time":258,"edits":1,"cost":"6.13"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts","time":257,"edits":1,"cost":"6.13"},{"name":"tests/cases/fourslash/referencesForGlobalsInExternalModule.ts","time":514,"edits":2,"cost":"6.13"},{"name":"tests/cases/fourslash/renameInheritedProperties7.ts","time":257,"edits":1,"cost":"6.13"},{"name":"tests/cases/fourslash/codeFixSpelling4.ts","time":257,"edits":1,"cost":"6.13"},{"name":"tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration1ES5iterable.ts","time":256,"edits":1,"cost":"6.13"},{"name":"tests/cases/fourslash/shims/quickInfoDisplayPartsVar.ts","time":256,"edits":1,"cost":"6.13"},{"name":"tests/cases/compiler/commentsClassMembers.ts","time":256,"edits":1,"cost":"6.13"},{"name":"tests/cases/compiler/capturedLetConstInLoop6_ES6.ts","time":256,"edits":1,"cost":"6.13"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts","time":256,"edits":1,"cost":"6.13"},{"name":"tests/cases/fourslash/completionListErrorRecovery2.ts","time":256,"edits":1,"cost":"6.13"},{"name":"tests/cases/compiler/extendPrivateConstructorClass.ts","time":256,"edits":1,"cost":"6.13"},{"name":"tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandProperties.ts","time":256,"edits":1,"cost":"6.13"},{"name":"tests/cases/fourslash/signatureHelpJSX.ts","time":511,"edits":2,"cost":"6.12"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_importedFunction4.ts","time":511,"edits":2,"cost":"6.12"},{"name":"tests/cases/compiler/jsxInferenceProducesLiteralAsExpected.tsx","time":510,"edits":2,"cost":"6.12"},{"name":"tests/cases/project/sourcemapModuleSimpleSpecifyOutputFile.json","time":255,"edits":1,"cost":"6.12"},{"name":"tests/cases/project/extReferencingExtAndInt.json","time":255,"edits":1,"cost":"6.12"},{"name":"tests/cases/project/relativeNested.json","time":255,"edits":1,"cost":"6.12"},{"name":"tests/cases/fourslash/server/navto01.ts","time":255,"edits":1,"cost":"6.12"},{"name":"tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts","time":255,"edits":1,"cost":"6.12"},{"name":"tests/cases/compiler/objectCreate2.ts","time":255,"edits":1,"cost":"6.12"},{"name":"unittests:: Reuse program structure:: isProgramUptoDate should return true when there is no change in compiler options and","time":254,"edits":1,"cost":"6.12"},{"name":"tests/cases/project/mapRootWithNoSourceMapOption.json","time":254,"edits":1,"cost":"6.12"},{"name":"tests/cases/fourslash/memberlistOnDDot.ts","time":254,"edits":1,"cost":"6.12"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_classExpressionHeritage.ts","time":253,"edits":1,"cost":"6.11"},{"name":"tests/cases/fourslash/server/documentHighlights01.ts","time":253,"edits":1,"cost":"6.11"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts","time":253,"edits":1,"cost":"6.11"},{"name":"tests/cases/fourslash/unusedMethodInClass1.ts","time":253,"edits":1,"cost":"6.11"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts","time":253,"edits":1,"cost":"6.11"},{"name":"tests/cases/fourslash/getCompletionEntryDetails2.ts","time":252,"edits":1,"cost":"6.11"},{"name":"tests/cases/fourslash/shims-pp/getNavigateToItems.ts","time":252,"edits":1,"cost":"6.11"},{"name":"tests/cases/compiler/missingImportAfterModuleImport.ts","time":252,"edits":1,"cost":"6.11"},{"name":"tests/cases/compiler/capturedLetConstInLoop4_ES6.ts","time":251,"edits":1,"cost":"6.11"},{"name":"tests/cases/fourslash/shims/getNavigateToItems.ts","time":251,"edits":1,"cost":"6.11"},{"name":"tests/cases/fourslash/unusedInterfaceInNamespace2.ts","time":251,"edits":1,"cost":"6.11"},{"name":"unittests:: tsserver:: Session:: General functionality","time":250,"edits":1,"cost":"6.10"},{"name":"tests/cases/project/outModuleSubfolderSpecifyOutputFile.json","time":250,"edits":1,"cost":"6.10"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures4.ts","time":250,"edits":1,"cost":"6.10"},{"name":"tests/cases/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile.json","time":250,"edits":1,"cost":"6.10"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplates6.ts","time":250,"edits":1,"cost":"6.10"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardsInFunction.ts","time":250,"edits":1,"cost":"6.10"},{"name":"tests/cases/fourslash/codeFixInferFromUsageNumberPriority.ts","time":498,"edits":2,"cost":"6.10"},{"name":"unittests:: tsserver:: events:: ProjectLoadingStart and ProjectLoadingFinish events","time":249,"edits":1,"cost":"6.10"},{"name":"tests/cases/project/defaultExcludeNodeModulesAndRelativePathOutDirWithAllowJS.json","time":249,"edits":1,"cost":"6.10"},{"name":"tests/cases/compiler/convertKeywordsYes.ts","time":249,"edits":1,"cost":"6.10"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference.ts","time":249,"edits":1,"cost":"6.10"},{"name":"tests/cases/compiler/assignmentCompatability35.ts","time":249,"edits":1,"cost":"6.10"},{"name":"tests/cases/fourslash/codeFixConvertToMappedObjectType9.ts","time":497,"edits":2,"cost":"6.10"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_paramDecorator.ts","time":248,"edits":1,"cost":"6.09"},{"name":"tests/cases/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile.json","time":248,"edits":1,"cost":"6.09"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPattern2.ts","time":248,"edits":1,"cost":"6.09"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.ts","time":248,"edits":1,"cost":"6.09"},{"name":"tests/cases/fourslash/parameterWithDestructuring.ts","time":248,"edits":1,"cost":"6.09"},{"name":"tests/cases/fourslash/server/completionEntryDetailAcrossFiles02.ts","time":494,"edits":2,"cost":"6.09"},{"name":"tests/cases/project/rootDirectoryErrors.json","time":247,"edits":1,"cost":"6.09"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts","time":247,"edits":1,"cost":"6.09"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts","time":247,"edits":1,"cost":"6.09"},{"name":"tests/cases/fourslash/renameCommentsAndStrings2.ts","time":247,"edits":1,"cost":"6.09"},{"name":"tests/cases/fourslash/refactorExtractType58.ts","time":246,"edits":1,"cost":"6.09"},{"name":"tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts","time":246,"edits":1,"cost":"6.09"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypedTags.ts","time":246,"edits":1,"cost":"6.09"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsEnum2.ts","time":246,"edits":1,"cost":"6.09"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsUndefined.ts","time":245,"edits":1,"cost":"6.08"},{"name":"tests/cases/fourslash/referenceInParameterPropertyDeclaration.ts","time":245,"edits":1,"cost":"6.08"},{"name":"tests/cases/fourslash/codeFixDisableJsDiagnosticsInFile2.ts","time":245,"edits":1,"cost":"6.08"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.ts","time":244,"edits":1,"cost":"6.08"},{"name":"tests/cases/fourslash/memberListAfterDoubleDot.ts","time":244,"edits":1,"cost":"6.08"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.ts","time":244,"edits":1,"cost":"6.08"},{"name":"tests/cases/project/declareVariableCollision.json","time":243,"edits":1,"cost":"6.07"},{"name":"tests/cases/compiler/privacyImport.ts","time":243,"edits":1,"cost":"6.07"},{"name":"tests/cases/fourslash/memberListOfModuleBeforeKeyword.ts","time":243,"edits":1,"cost":"6.07"},{"name":"tests/cases/fourslash/completionEntryForUnionProperty.ts","time":243,"edits":1,"cost":"6.07"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionInUMD4.ts","time":243,"edits":1,"cost":"6.07"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsFunctionExpression.ts","time":243,"edits":1,"cost":"6.07"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_callComments.ts","time":242,"edits":1,"cost":"6.07"},{"name":"unittests:: tsbuild:: with resolveJsonModule option on project resolveJsonModuleAndComposite","time":242,"edits":1,"cost":"6.07"},{"name":"tests/cases/fourslash/breakpointValidationClasses.ts","time":242,"edits":1,"cost":"6.07"},{"name":"tests/cases/fourslash/renameImportAndExport.ts","time":242,"edits":1,"cost":"6.07"},{"name":"tests/cases/fourslash/server/typeReferenceOnServer.ts","time":242,"edits":1,"cost":"6.07"},{"name":"tests/cases/compiler/fatarrowfunctionsErrors.ts","time":242,"edits":1,"cost":"6.07"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern22.ts","time":242,"edits":1,"cost":"6.07"},{"name":"tests/cases/conformance/classes/classExpressions/classExpression5.ts","time":242,"edits":1,"cost":"6.07"},{"name":"tests/cases/conformance/types/mapped/mappedTypeRelationships.ts","time":724,"edits":3,"cost":"6.07"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_initializer.ts","time":241,"edits":1,"cost":"6.07"},{"name":"tests/cases/project/sourcerootUrlModuleSimpleSpecifyOutputFile.json","time":241,"edits":1,"cost":"6.07"},{"name":"tests/cases/fourslash/getOccurrencesIsWriteAccess.ts","time":241,"edits":1,"cost":"6.07"},{"name":"tests/cases/fourslash/completionListInUnclosedForLoop01.ts","time":241,"edits":1,"cost":"6.07"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceInNamespace.ts","time":240,"edits":1,"cost":"6.06"},{"name":"tests/cases/fourslash/renameInheritedProperties2.ts","time":240,"edits":1,"cost":"6.06"},{"name":"tests/cases/conformance/types/primitives/undefined/directReferenceToUndefined.ts","time":240,"edits":1,"cost":"6.06"},{"name":"tests/cases/project/jsFileCompilationDifferentNamesNotSpecified.json","time":239,"edits":1,"cost":"6.06"},{"name":"tests/cases/fourslash/findAllRefsTypeParameterInMergedInterface.ts","time":478,"edits":2,"cost":"6.06"},{"name":"tests/cases/fourslash/getOccurrencesSwitchCaseDefault2.ts","time":239,"edits":1,"cost":"6.06"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplatesIncomplete7.ts","time":239,"edits":1,"cost":"6.06"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceSomePropertiesPresent.ts","time":239,"edits":1,"cost":"6.06"},{"name":"tests/cases/compiler/typeReferenceDirectives8.ts","time":239,"edits":1,"cost":"6.06"},{"name":"tests/cases/conformance/jsx/checkJsxChildrenProperty4.tsx","time":477,"edits":2,"cost":"6.06"},{"name":"tests/cases/project/mapRootAbsolutePathSingleFileSpecifyOutputFile.json","time":238,"edits":1,"cost":"6.05"},{"name":"tests/cases/fourslash/quickInfoOnNarrowedType.ts","time":238,"edits":1,"cost":"6.05"},{"name":"tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping1.ts","time":238,"edits":1,"cost":"6.05"},{"name":"tests/cases/fourslash/importTypeNodeGoToDefinition.ts","time":238,"edits":1,"cost":"6.05"},{"name":"tests/cases/project/sourcerootUrlModuleSubfolderSpecifyOutputFile.json","time":237,"edits":1,"cost":"6.05"},{"name":"tests/cases/fourslash/multiModuleFundule1.ts","time":237,"edits":1,"cost":"6.05"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPattern2.ts","time":237,"edits":1,"cost":"6.05"},{"name":"tests/cases/fourslash/completionListInNamedFunctionExpressionWithShadowing.ts","time":237,"edits":1,"cost":"6.05"},{"name":"tests/cases/fourslash/completionListAfterNumericLiteral.ts","time":237,"edits":1,"cost":"6.05"},{"name":"tests/cases/fourslash/completionEntryOnNarrowedType.ts","time":237,"edits":1,"cost":"6.05"},{"name":"tests/cases/compiler/propertiesAndIndexers.ts","time":237,"edits":1,"cost":"6.05"},{"name":"tests/cases/fourslash/server/declarationMapsGoToDefinitionSameNameDifferentDirectory.ts","time":473,"edits":2,"cost":"6.05"},{"name":"tests/cases/project/nestedDeclare.json","time":236,"edits":1,"cost":"6.05"},{"name":"tests/cases/fourslash/genericMapTyping1.ts","time":236,"edits":1,"cost":"6.05"},{"name":"tests/cases/fourslash/server/completions02.ts","time":236,"edits":1,"cost":"6.05"},{"name":"tests/cases/fourslash/codeFixInferFromUsageConstructor.ts","time":470,"edits":2,"cost":"6.04"},{"name":"tests/cases/compiler/lambdaParamTypes.ts","time":235,"edits":1,"cost":"6.04"},{"name":"tests/cases/compiler/assignmentToExpandingArrayType.ts","time":235,"edits":1,"cost":"6.04"},{"name":"tests/cases/conformance/types/literal/enumLiteralTypes1.ts","time":235,"edits":1,"cost":"6.04"},{"name":"tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts","time":235,"edits":1,"cost":"6.04"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts","time":235,"edits":1,"cost":"6.04"},{"name":"tests/cases/conformance/types/tuple/tupleElementTypes3.ts","time":235,"edits":1,"cost":"6.04"},{"name":"tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration4_es6.ts","time":235,"edits":1,"cost":"6.04"},{"name":"tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts","time":469,"edits":2,"cost":"6.04"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures2.ts","time":234,"edits":1,"cost":"6.04"},{"name":"tests/cases/fourslash/shims/getOccurrencesAtPosition.ts","time":234,"edits":1,"cost":"6.04"},{"name":"tests/cases/fourslash/completionListInTemplateLiteralParts1.ts","time":234,"edits":1,"cost":"6.04"},{"name":"tests/cases/compiler/ipromise4.ts","time":234,"edits":1,"cost":"6.04"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts","time":234,"edits":1,"cost":"6.04"},{"name":"tests/cases/conformance/jsx/tsxAttributeResolution7.tsx","time":234,"edits":1,"cost":"6.04"},{"name":"tests/cases/fourslash/signatureHelpWhenEditingCallExpression.ts","time":233,"edits":1,"cost":"6.03"},{"name":"tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts","time":233,"edits":1,"cost":"6.03"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts","time":233,"edits":1,"cost":"6.03"},{"name":"tests/cases/fourslash/getOccurrencesTryCatchFinally2.ts","time":233,"edits":1,"cost":"6.03"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplatesIncomplete9.ts","time":233,"edits":1,"cost":"6.03"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts","time":232,"edits":1,"cost":"6.03"},{"name":"tests/cases/fourslash/quickfixImplementInterfaceUnreachableTypeUsesRelativeImport.ts","time":462,"edits":2,"cost":"6.02"},{"name":"tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts","time":231,"edits":1,"cost":"6.02"},{"name":"tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload4.tsx","time":231,"edits":1,"cost":"6.02"},{"name":"tests/cases/conformance/classes/mixinClassesAnnotated.ts","time":231,"edits":1,"cost":"6.02"},{"name":"tests/cases/fourslash/goToImplementationInterface_04.ts","time":231,"edits":1,"cost":"6.02"},{"name":"tests/cases/compiler/genericDefaults.ts","time":690,"edits":3,"cost":"6.02"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringForArrayBindingPattern.ts","time":230,"edits":1,"cost":"6.02"},{"name":"tests/cases/fourslash/goToTypeDefinitionPrimitives.ts","time":230,"edits":1,"cost":"6.02"},{"name":"tests/cases/fourslash/referencesForClassLocal.ts","time":230,"edits":1,"cost":"6.02"},{"name":"tests/cases/fourslash/getOccurrencesIsDefinitionOfTypeAlias.ts","time":230,"edits":1,"cost":"6.02"},{"name":"tests/cases/fourslash/navigationItemsSubStringMatch2.ts","time":230,"edits":1,"cost":"6.02"},{"name":"tests/cases/conformance/jsx/inline/inlineJsxFactoryDeclarationsLocalTypes.tsx","time":459,"edits":2,"cost":"6.02"},{"name":"tests/cases/conformance/externalModules/exportNonInitializedVariablesSystem.ts","time":229,"edits":1,"cost":"6.01"},{"name":"tests/cases/fourslash/getOccurrencesIfElseBroken.ts","time":229,"edits":1,"cost":"6.01"},{"name":"tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts","time":229,"edits":1,"cost":"6.01"},{"name":"tests/cases/fourslash/goToDefinitionImportedNames3.ts","time":229,"edits":1,"cost":"6.01"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_classExpression.ts","time":228,"edits":1,"cost":"6.01"},{"name":"tests/cases/fourslash/commentsInheritance.ts","time":1368,"edits":6,"cost":"6.01"},{"name":"tests/cases/compiler/controlFlowArrays.ts","time":228,"edits":1,"cost":"6.01"},{"name":"tests/cases/fourslash/refactorExtractType48.ts","time":227,"edits":1,"cost":"6.01"},{"name":"tests/cases/project/maprootUrlMixedSubfolderSpecifyOutputFile.json","time":227,"edits":1,"cost":"6.01"},{"name":"tests/cases/fourslash/referencesForStatic.ts","time":227,"edits":1,"cost":"6.01"},{"name":"tests/cases/fourslash/findAllRefsOnDefinition2.ts","time":454,"edits":2,"cost":"6.01"},{"name":"tests/cases/fourslash/tripleSlashRefPathCompletionContext.ts","time":227,"edits":1,"cost":"6.01"},{"name":"tests/cases/compiler/capturedLetConstInLoop3_ES6.ts","time":227,"edits":1,"cost":"6.01"},{"name":"tests/cases/fourslash/signatureHelpOnOverloadsDifferentArity2.ts","time":227,"edits":1,"cost":"6.01"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability03.ts","time":227,"edits":1,"cost":"6.01"},{"name":"tests/cases/project/multipleLevelsModuleResolution.json","time":226,"edits":1,"cost":"6.00"},{"name":"tests/cases/fourslash/getOccurrencesThis6.ts","time":226,"edits":1,"cost":"6.00"},{"name":"tests/cases/conformance/expressions/functionCalls/newWithSpreadES5.ts","time":226,"edits":1,"cost":"6.00"},{"name":"tests/cases/fourslash/findAllRefsOfConstructor.ts","time":450,"edits":2,"cost":"6.00"},{"name":"tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts","time":225,"edits":1,"cost":"6.00"},{"name":"tests/cases/project/privacyCheckOnIndirectTypeFromTheExternalType.json","time":225,"edits":1,"cost":"6.00"},{"name":"tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping2.ts","time":450,"edits":2,"cost":"6.00"},{"name":"tests/cases/fourslash/extendArrayInterface.ts","time":225,"edits":1,"cost":"6.00"},{"name":"tests/cases/fourslash/getOccurrencesExport1.ts","time":225,"edits":1,"cost":"6.00"},{"name":"tests/cases/fourslash/server/ngProxy3.ts","time":225,"edits":1,"cost":"6.00"},{"name":"tests/cases/fourslash/shims-pp/getSemanticDiagnostics.ts","time":225,"edits":1,"cost":"6.00"},{"name":"tests/cases/fourslash/goToImplementationInterface_09.ts","time":448,"edits":2,"cost":"5.99"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.ts","time":224,"edits":1,"cost":"5.99"},{"name":"tests/cases/project/sourceRootRelativePathSubfolderSpecifyOutputFile.json","time":224,"edits":1,"cost":"5.99"},{"name":"tests/cases/compiler/exportClassExtendingIntersection.ts","time":224,"edits":1,"cost":"5.99"},{"name":"tests/cases/compiler/unspecializedConstraints.ts","time":224,"edits":1,"cost":"5.99"},{"name":"tests/cases/conformance/parser/ecmascript5/parserRealSource1.ts","time":224,"edits":1,"cost":"5.99"},{"name":"tests/cases/fourslash/refactorExtractType50.ts","time":223,"edits":1,"cost":"5.99"},{"name":"tests/cases/fourslash/refactorExtractType43.ts","time":223,"edits":1,"cost":"5.99"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_callComments2.ts","time":223,"edits":1,"cost":"5.99"},{"name":"tests/cases/fourslash/getOccurrencesLoopBreakContinueNegatives.ts","time":223,"edits":1,"cost":"5.99"},{"name":"tests/cases/fourslash/unclosedArrayErrorRecovery.ts","time":223,"edits":1,"cost":"5.99"},{"name":"tests/cases/fourslash/getJavaScriptCompletions11.ts","time":223,"edits":1,"cost":"5.99"},{"name":"unittests:: JSDocParsing","time":222,"edits":1,"cost":"5.98"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts","time":222,"edits":1,"cost":"5.98"},{"name":"tests/cases/fourslash/completionForStringLiteralNonrelativeImportTypings1.ts","time":222,"edits":1,"cost":"5.98"},{"name":"tests/cases/fourslash/server/ngProxy1.ts","time":222,"edits":1,"cost":"5.98"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplatesIncomplete1.ts","time":222,"edits":1,"cost":"5.98"},{"name":"tests/cases/fourslash/unusedMethodInClass4.ts","time":222,"edits":1,"cost":"5.98"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateU.ts","time":222,"edits":1,"cost":"5.98"},{"name":"tests/cases/conformance/es6/templates/templateStringBinaryOperationsInvalid.ts","time":221,"edits":1,"cost":"5.98"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPattern.ts","time":221,"edits":1,"cost":"5.98"},{"name":"tests/cases/fourslash/unclosedFunctionErrorRecovery3.ts","time":221,"edits":1,"cost":"5.98"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignabilityInInheritance.ts","time":221,"edits":1,"cost":"5.98"},{"name":"tests/cases/fourslash/codeFixInferFromUsage.ts","time":441,"edits":2,"cost":"5.98"},{"name":"tests/cases/compiler/capturedLetConstInLoop3.ts","time":220,"edits":1,"cost":"5.97"},{"name":"tests/cases/fourslash/codeFixUnusedIdentifier_delete_templateTag.ts","time":220,"edits":1,"cost":"5.97"},{"name":"tests/cases/project/privacyCheckOnImportedModuleSimpleReference.json","time":220,"edits":1,"cost":"5.97"},{"name":"tests/cases/fourslash/completionForStringLiteralRelativeImportAllowJSFalse.ts","time":220,"edits":1,"cost":"5.97"},{"name":"tests/cases/fourslash/completionListInIndexSignature01.ts","time":220,"edits":1,"cost":"5.97"},{"name":"tests/cases/fourslash/unusedImports9FS.ts","time":220,"edits":1,"cost":"5.97"},{"name":"tests/cases/fourslash/quickInfoOnMergedInterfaces.ts","time":220,"edits":1,"cost":"5.97"},{"name":"tests/cases/compiler/declFileImportChainInExportAssignment.ts","time":220,"edits":1,"cost":"5.97"},{"name":"tests/cases/fourslash/refactorExtractType52.ts","time":219,"edits":1,"cost":"5.97"},{"name":"unittests:: services:: textChanges","time":219,"edits":1,"cost":"5.97"},{"name":"tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts","time":219,"edits":1,"cost":"5.97"},{"name":"tests/cases/conformance/emitter/es5/asyncGenerators/emitter.asyncGenerators.classMethods.es5.ts","time":219,"edits":1,"cost":"5.97"},{"name":"tests/cases/fourslash/renameJsExports02.ts","time":219,"edits":1,"cost":"5.97"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportAmbient1.ts","time":219,"edits":1,"cost":"5.97"},{"name":"tests/cases/conformance/parser/ecmascript5/Expressions/parseIncompleteBinaryExpression1.ts","time":219,"edits":1,"cost":"5.97"},{"name":"tests/cases/fourslash/getOccurrencesLoopBreakContinue3.ts","time":437,"edits":2,"cost":"5.97"},{"name":"tests/cases/project/relativePaths.json","time":218,"edits":1,"cost":"5.97"},{"name":"tests/cases/fourslash/server/declarationMapsEnableMapping_NoInlineSources.ts","time":436,"edits":2,"cost":"5.97"},{"name":"tests/cases/fourslash/memberCompletionOnTypeParameters.ts","time":218,"edits":1,"cost":"5.97"},{"name":"tests/cases/fourslash/importJsNodeModule1.ts","time":218,"edits":1,"cost":"5.97"},{"name":"unittests:: config:: showConfig","time":217,"edits":1,"cost":"5.96"},{"name":"tests/cases/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory.json","time":217,"edits":1,"cost":"5.96"},{"name":"tests/cases/project/sourcemapModuleSubfolderSpecifyOutputFile.json","time":217,"edits":1,"cost":"5.96"},{"name":"tests/cases/compiler/capturedLetConstInLoop2.ts","time":217,"edits":1,"cost":"5.96"},{"name":"tests/cases/fourslash/completionListInFatArrow.ts","time":217,"edits":1,"cost":"5.96"},{"name":"tests/cases/conformance/salsa/moduleExportAlias.ts","time":216,"edits":1,"cost":"5.96"},{"name":"tests/cases/fourslash/renameContextuallyTypedProperties2.ts","time":216,"edits":1,"cost":"5.96"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceClassExpression.ts","time":216,"edits":1,"cost":"5.96"},{"name":"tests/cases/conformance/types/mapped/mappedTypes1.ts","time":216,"edits":1,"cost":"5.96"},{"name":"tests/cases/fourslash/identifierErrorRecovery.ts","time":216,"edits":1,"cost":"5.96"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance5.ts","time":216,"edits":1,"cost":"5.96"},{"name":"tests/cases/fourslash/getSemanticDiagnosticForDeclaration1.ts","time":216,"edits":1,"cost":"5.96"},{"name":"tests/cases/fourslash/referencesForInheritedProperties9.ts","time":216,"edits":1,"cost":"5.96"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithStringIndexers2.ts","time":216,"edits":1,"cost":"5.96"},{"name":"tests/cases/fourslash/findAllRefsJsDocTypeDef_js.ts","time":430,"edits":2,"cost":"5.95"},{"name":"tests/cases/fourslash/tsxCompletion9.ts","time":215,"edits":1,"cost":"5.95"},{"name":"tests/cases/fourslash/getOccurrencesAbstract01.ts","time":215,"edits":1,"cost":"5.95"},{"name":"tests/cases/compiler/library_DatePrototypeProperties.ts","time":215,"edits":1,"cost":"5.95"},{"name":"tests/cases/fourslash/signatureHelpOnOverloads.ts","time":215,"edits":1,"cost":"5.95"},{"name":"tests/cases/fourslash/getOccurrencesThrow6.ts","time":215,"edits":1,"cost":"5.95"},{"name":"tests/cases/compiler/ipromise2.ts","time":215,"edits":1,"cost":"5.95"},{"name":"tests/cases/fourslash/completionListInImportClause02.ts","time":215,"edits":1,"cost":"5.95"},{"name":"tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionDeclarations.es2018.ts","time":214,"edits":1,"cost":"5.95"},{"name":"tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers2.ts","time":214,"edits":1,"cost":"5.95"},{"name":"tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration1ES5.ts","time":214,"edits":1,"cost":"5.95"},{"name":"tests/cases/project/jsFileCompilationDifferentNamesNotSpecifiedWithAllowJs.json","time":214,"edits":1,"cost":"5.95"},{"name":"tests/cases/fourslash/thisPredicateFunctionQuickInfo02.ts","time":214,"edits":1,"cost":"5.95"},{"name":"tests/cases/fourslash/extract-method8.ts","time":214,"edits":1,"cost":"5.95"},{"name":"tests/cases/fourslash/goToDefinitionShorthandProperty02.ts","time":214,"edits":1,"cost":"5.95"},{"name":"tests/cases/compiler/mapOnTupleTypes01.ts","time":214,"edits":1,"cost":"5.95"},{"name":"tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithNumberType.ts","time":214,"edits":1,"cost":"5.95"},{"name":"tests/cases/compiler/bigIntWithTargetES3.ts","time":213,"edits":1,"cost":"5.94"},{"name":"tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.ambient.ts","time":213,"edits":1,"cost":"5.94"},{"name":"tests/cases/compiler/privacyGloFunc.ts","time":213,"edits":1,"cost":"5.94"},{"name":"tests/cases/fourslash/importNameCodeFixExistingImport3.ts","time":213,"edits":1,"cost":"5.94"},{"name":"tests/cases/compiler/capturedLetConstInLoop1_ES6.ts","time":213,"edits":1,"cost":"5.94"},{"name":"tests/cases/fourslash/getEmitOutputWithDeclarationFile3.ts","time":213,"edits":1,"cost":"5.94"},{"name":"tests/cases/compiler/sourceMapValidationModule.ts","time":213,"edits":1,"cost":"5.94"},{"name":"tests/cases/fourslash/refactorExtractType54.ts","time":212,"edits":1,"cost":"5.94"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringVariableStatementDefaultValues.ts","time":212,"edits":1,"cost":"5.94"},{"name":"tests/cases/fourslash/codeFixUnusedIdentifier_parameter_all.ts","time":424,"edits":2,"cost":"5.94"},{"name":"tests/cases/fourslash/signatureHelpThis.ts","time":212,"edits":1,"cost":"5.94"},{"name":"tests/cases/conformance/types/namedTypes/optionalMethods.ts","time":212,"edits":1,"cost":"5.94"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceConstructSignature.ts","time":212,"edits":1,"cost":"5.94"},{"name":"tests/cases/conformance/types/mapped/mappedTypeModifiers.ts","time":212,"edits":1,"cost":"5.94"},{"name":"tests/cases/compiler/missingFunctionImplementation.ts","time":212,"edits":1,"cost":"5.94"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionES5UMD.ts","time":212,"edits":1,"cost":"5.94"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsClassAccessors.ts","time":211,"edits":1,"cost":"5.93"},{"name":"tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts","time":211,"edits":1,"cost":"5.93"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts","time":211,"edits":1,"cost":"5.93"},{"name":"tests/cases/fourslash/completionListAfterRegularExpressionLiteral04.ts","time":211,"edits":1,"cost":"5.93"},{"name":"tests/cases/fourslash/genericDerivedTypeAcrossModuleBoundary1.ts","time":211,"edits":1,"cost":"5.93"},{"name":"tests/cases/fourslash/contextualTyping.ts","time":421,"edits":2,"cost":"5.93"},{"name":"tests/cases/fourslash/transitiveExportImports.ts","time":421,"edits":2,"cost":"5.93"},{"name":"tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.1.ts","time":210,"edits":1,"cost":"5.93"},{"name":"tests/cases/project/sourceRootRelativePathSingleFileSpecifyOutputFile.json","time":210,"edits":1,"cost":"5.93"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringForOfArrayBindingPattern2.ts","time":210,"edits":1,"cost":"5.93"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts","time":210,"edits":1,"cost":"5.93"},{"name":"tests/cases/fourslash/shims-pp/getCompletionsAtPosition.ts","time":210,"edits":1,"cost":"5.93"},{"name":"tests/cases/fourslash/signatureHelpNoArguments.ts","time":210,"edits":1,"cost":"5.93"},{"name":"tests/cases/fourslash/completionListInClosedFunction07.ts","time":210,"edits":1,"cost":"5.93"},{"name":"tests/cases/compiler/validUseOfThisInSuper.ts","time":210,"edits":1,"cost":"5.93"},{"name":"tests/cases/project/circularReferencing.json","time":209,"edits":1,"cost":"5.92"},{"name":"tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts","time":209,"edits":1,"cost":"5.92"},{"name":"tests/cases/fourslash/getOccurrencesIsDefinitionOfInterface.ts","time":209,"edits":1,"cost":"5.92"},{"name":"tests/cases/fourslash/quickInfoForSyntaxErrorNoError.ts","time":209,"edits":1,"cost":"5.92"},{"name":"unittests:: tsbuild:: inferredTypeFromTransitiveModule::","time":208,"edits":1,"cost":"5.92"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts","time":208,"edits":1,"cost":"5.92"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardsWithInstanceOfByConstructorSignature.ts","time":208,"edits":1,"cost":"5.92"},{"name":"tests/cases/fourslash/signatureHelpNegativeTests2.ts","time":208,"edits":1,"cost":"5.92"},{"name":"tests/cases/project/baseline.json","time":207,"edits":1,"cost":"5.91"},{"name":"tests/cases/compiler/capturedLetConstInLoop2_ES6.ts","time":207,"edits":1,"cost":"5.91"},{"name":"tests/cases/fourslash/thisPredicateFunctionQuickInfo01.ts","time":207,"edits":1,"cost":"5.91"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesOptionalParams.ts","time":207,"edits":1,"cost":"5.91"},{"name":"tests/cases/fourslash/semanticClassificationUninstantiatedModuleWithVariableOfSameName1.ts","time":207,"edits":1,"cost":"5.91"},{"name":"tests/cases/fourslash/getOccurrencesOfUndefinedSymbol.ts","time":207,"edits":1,"cost":"5.91"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberVariableDeclarations/parserMemberVariableDeclaration2.ts","time":207,"edits":1,"cost":"5.91"},{"name":"tests/cases/fourslash/quickInfoGenerics.ts","time":206,"edits":1,"cost":"5.91"},{"name":"tests/cases/compiler/capturedLetConstInLoop5_ES6.ts","time":206,"edits":1,"cost":"5.91"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts","time":206,"edits":1,"cost":"5.91"},{"name":"tests/cases/fourslash/goToDefinitionDifferentFileIndirectly.ts","time":206,"edits":1,"cost":"5.91"},{"name":"tests/cases/fourslash/signatureHelpAtEOF2.ts","time":411,"edits":2,"cost":"5.91"},{"name":"tests/cases/fourslash/completionListInUnclosedTypeArguments.ts","time":411,"edits":2,"cost":"5.91"},{"name":"tests/cases/fourslash/getOccurrencesTryCatchFinallyBroken.ts","time":205,"edits":1,"cost":"5.90"},{"name":"tests/cases/fourslash/goToDefinitionShorthandProperty01.ts","time":205,"edits":1,"cost":"5.90"},{"name":"tests/cases/compiler/privacyGloImportParseErrors.ts","time":205,"edits":1,"cost":"5.90"},{"name":"tests/cases/fourslash/unclosedCommentsInConstructor.ts","time":205,"edits":1,"cost":"5.90"},{"name":"tests/cases/compiler/toStringOnPrimitives.ts","time":205,"edits":1,"cost":"5.90"},{"name":"tests/cases/fourslash/breakpointValidationClass.ts","time":204,"edits":1,"cost":"5.90"},{"name":"tests/cases/fourslash/memberListOfExportedClass.ts","time":204,"edits":1,"cost":"5.90"},{"name":"tests/cases/fourslash/enumUpdate1.ts","time":204,"edits":1,"cost":"5.90"},{"name":"tests/cases/compiler/circularReferenceInImport.ts","time":204,"edits":1,"cost":"5.90"},{"name":"tests/cases/compiler/namespaces1.ts","time":204,"edits":1,"cost":"5.90"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts","time":203,"edits":1,"cost":"5.89"},{"name":"tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts","time":203,"edits":1,"cost":"5.89"},{"name":"tests/cases/fourslash/completionListForObjectSpread.ts","time":203,"edits":1,"cost":"5.89"},{"name":"tests/cases/fourslash/findAllRefsExportAsNamespace.ts","time":203,"edits":1,"cost":"5.89"},{"name":"tests/cases/fourslash/renameJsSpecialAssignmentRhs1.ts","time":203,"edits":1,"cost":"5.89"},{"name":"tests/cases/fourslash/completionListInClosedFunction05.ts","time":203,"edits":1,"cost":"5.89"},{"name":"tests/cases/conformance/statements/breakStatements/invalidSwitchBreakStatement.ts","time":203,"edits":1,"cost":"5.89"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserLabeledStatement1.d.ts","time":203,"edits":1,"cost":"5.89"},{"name":"tests/cases/fourslash/codefixEnableExperimentalDecorators_blankCompilerOptionsInTsconfig.ts","time":202,"edits":1,"cost":"5.89"},{"name":"tests/cases/project/specifyExcludeWithOutUsingRelativePathWithAllowJS.json","time":202,"edits":1,"cost":"5.89"},{"name":"tests/cases/fourslash/codeFixUndeclaredPropertyThisType.ts","time":202,"edits":1,"cost":"5.89"},{"name":"tests/cases/fourslash/quickInfoJSDocFunctionThis.ts","time":202,"edits":1,"cost":"5.89"},{"name":"tests/cases/fourslash/javaScriptModules16.ts","time":202,"edits":1,"cost":"5.89"},{"name":"tests/cases/conformance/types/typeAliases/genericTypeAliases.ts","time":202,"edits":1,"cost":"5.89"},{"name":"tests/cases/conformance/classes/constructorDeclarations/constructorParameters/readonlyInConstructorParameters.ts","time":202,"edits":1,"cost":"5.89"},{"name":"tests/cases/compiler/contextualTyping19.ts","time":202,"edits":1,"cost":"5.89"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractOverrideWithAbstract.ts","time":202,"edits":1,"cost":"5.89"},{"name":"tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts","time":1611,"edits":8,"cost":"5.89"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringParameterNestedObjectBindingPattern.ts","time":201,"edits":1,"cost":"5.88"},{"name":"tests/cases/fourslash/getOccurrencesSwitchCaseDefault5.ts","time":201,"edits":1,"cost":"5.88"},{"name":"tests/cases/fourslash/getOccurrencesClassExpressionPrivate.ts","time":201,"edits":1,"cost":"5.88"},{"name":"tests/cases/compiler/moduleAugmentationsImports4.ts","time":201,"edits":1,"cost":"5.88"},{"name":"tests/cases/fourslash/memberOverloadEdits.ts","time":201,"edits":1,"cost":"5.88"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnIndexSignature.ts","time":201,"edits":1,"cost":"5.88"},{"name":"tests/cases/compiler/sourceMapSample.ts","time":201,"edits":1,"cost":"5.88"},{"name":"tests/cases/fourslash/signatureHelpTypeParametersNotVariadic.ts","time":201,"edits":1,"cost":"5.88"},{"name":"tests/cases/fourslash/removeDeclareInModule.ts","time":201,"edits":1,"cost":"5.88"},{"name":"tests/cases/compiler/capturedLetConstInLoop12.ts","time":201,"edits":1,"cost":"5.88"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserBlockStatement1.d.ts","time":201,"edits":1,"cost":"5.88"},{"name":"tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping2.ts","time":200,"edits":1,"cost":"5.88"},{"name":"tests/cases/fourslash/server/jsdocTypedefTagRename01.ts","time":200,"edits":1,"cost":"5.88"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplates1.ts","time":200,"edits":1,"cost":"5.88"},{"name":"tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts","time":200,"edits":1,"cost":"5.88"},{"name":"tests/cases/fourslash/brokenClassErrorRecovery.ts","time":200,"edits":1,"cost":"5.88"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/FunctionAndModuleWithSameNameAndCommonRoot.ts","time":200,"edits":1,"cost":"5.88"},{"name":"tests/cases/fourslash/breakpointValidationInterface.ts","time":200,"edits":1,"cost":"5.88"},{"name":"tests/cases/fourslash/findAllRefsForVariableInImplementsClause01.ts","time":200,"edits":1,"cost":"5.88"},{"name":"tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts","time":200,"edits":1,"cost":"5.88"},{"name":"tests/cases/compiler/asiInES6Classes.ts","time":200,"edits":1,"cost":"5.88"},{"name":"tests/cases/fourslash/server/references01.ts","time":399,"edits":2,"cost":"5.88"},{"name":"tests/cases/compiler/decoratorsOnComputedProperties.ts","time":398,"edits":2,"cost":"5.87"},{"name":"tests/cases/project/declareExportAdded.json","time":199,"edits":1,"cost":"5.87"},{"name":"tests/cases/compiler/moduleAugmentationsImports3.ts","time":199,"edits":1,"cost":"5.87"},{"name":"tests/cases/fourslash/renameImportOfExportEquals.ts","time":199,"edits":1,"cost":"5.87"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3_ES6.ts","time":199,"edits":1,"cost":"5.87"},{"name":"tests/cases/fourslash/completionListOnParamOfGenericType1.ts","time":199,"edits":1,"cost":"5.87"},{"name":"tests/cases/fourslash/declareFunction.ts","time":398,"edits":2,"cost":"5.87"},{"name":"tests/cases/fourslash/completionListAtIdentifierDefinitionLocations_varDeclarations.ts","time":199,"edits":1,"cost":"5.87"},{"name":"tests/cases/fourslash/documentHighlightAtParameterPropertyDeclaration3.ts","time":199,"edits":1,"cost":"5.87"},{"name":"tests/cases/compiler/collisionExportsRequireAndVar.ts","time":199,"edits":1,"cost":"5.87"},{"name":"tests/cases/conformance/es6/modules/exportsAndImports1-es6.ts","time":199,"edits":1,"cost":"5.87"},{"name":"tests/cases/conformance/es6/spread/iteratorSpreadInCall2.ts","time":199,"edits":1,"cost":"5.87"},{"name":"tests/cases/compiler/commentsInterface.ts","time":198,"edits":1,"cost":"5.87"},{"name":"tests/cases/fourslash/goToImplementationSuper_01.ts","time":198,"edits":1,"cost":"5.87"},{"name":"tests/cases/fourslash/signatureHelpInCallback.ts","time":198,"edits":1,"cost":"5.87"},{"name":"tests/cases/fourslash/nameOrDottedNameStatements.ts","time":198,"edits":1,"cost":"5.87"},{"name":"tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts","time":198,"edits":1,"cost":"5.87"},{"name":"tests/cases/fourslash/insertReturnStatementInDuplicateIdentifierFunction.ts","time":198,"edits":1,"cost":"5.87"},{"name":"tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteralES6.ts","time":198,"edits":1,"cost":"5.87"},{"name":"tests/cases/conformance/internalModules/importDeclarations/shadowedInternalModule.ts","time":198,"edits":1,"cost":"5.87"},{"name":"tests/cases/compiler/collisionExportsRequireAndAlias.ts","time":198,"edits":1,"cost":"5.87"},{"name":"tests/cases/compiler/inheritSameNamePropertiesWithDifferentVisibility.ts","time":198,"edits":1,"cost":"5.87"},{"name":"tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping3.ts","time":395,"edits":2,"cost":"5.87"},{"name":"tests/cases/fourslash/codeFixConvertToMappedObjectType2.ts","time":395,"edits":2,"cost":"5.87"},{"name":"tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts","time":197,"edits":1,"cost":"5.86"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsConst.ts","time":197,"edits":1,"cost":"5.86"},{"name":"tests/cases/conformance/types/literal/stringEnumLiteralTypes2.ts","time":197,"edits":1,"cost":"5.86"},{"name":"tests/cases/fourslash/deleteModifierBeforeVarStatement1.ts","time":197,"edits":1,"cost":"5.86"},{"name":"tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts","time":197,"edits":1,"cost":"5.86"},{"name":"tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVar.ts","time":197,"edits":1,"cost":"5.86"},{"name":"tests/cases/fourslash/getOccurrencesSwitchCaseDefault4.ts","time":197,"edits":1,"cost":"5.86"},{"name":"tests/cases/fourslash/mispeltVariableForInLoopErrorRecovery.ts","time":197,"edits":1,"cost":"5.86"},{"name":"tests/cases/compiler/overload1.ts","time":197,"edits":1,"cost":"5.86"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplatesNested1.ts","time":197,"edits":1,"cost":"5.86"},{"name":"tests/cases/fourslash/unusedEnumInNamespace1.ts","time":197,"edits":1,"cost":"5.86"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints2.ts","time":196,"edits":1,"cost":"5.86"},{"name":"tests/cases/fourslash/jsFileJsdocTypedefTagTypeExpressionCompletion.ts","time":196,"edits":1,"cost":"5.86"},{"name":"tests/cases/fourslash/todoComments11.ts","time":196,"edits":1,"cost":"5.86"},{"name":"tests/cases/fourslash/unusedFunctionInNamespace4.ts","time":196,"edits":1,"cost":"5.86"},{"name":"tests/cases/compiler/moduleAugmentationsBundledOutput1.ts","time":196,"edits":1,"cost":"5.86"},{"name":"tests/cases/conformance/types/localTypes/localTypes4.ts","time":196,"edits":1,"cost":"5.86"},{"name":"tests/cases/fourslash/codeFixInferFromUsageBindingElement.ts","time":390,"edits":2,"cost":"5.85"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsNull.ts","time":195,"edits":1,"cost":"5.85"},{"name":"tests/cases/fourslash/completionListInTypedObjectLiteralsWithPartialPropertyNames.ts","time":195,"edits":1,"cost":"5.85"},{"name":"tests/cases/conformance/types/members/objectTypeWithStringNamedNumericProperty.ts","time":195,"edits":1,"cost":"5.85"},{"name":"tests/cases/conformance/jsx/tsxReactEmit1.tsx","time":195,"edits":1,"cost":"5.85"},{"name":"tests/cases/fourslash/memberListOnThisInClassWithPrivates.ts","time":195,"edits":1,"cost":"5.85"},{"name":"tests/cases/fourslash/underscoreTypings02.ts","time":195,"edits":1,"cost":"5.85"},{"name":"tests/cases/compiler/aliasBug.ts","time":195,"edits":1,"cost":"5.85"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportFileQuoteStyle2.ts","time":389,"edits":2,"cost":"5.85"},{"name":"unittests:: tsserver:: searching for config file","time":194,"edits":1,"cost":"5.85"},{"name":"tests/cases/fourslash/missingMethodAfterEditAfterImport.ts","time":194,"edits":1,"cost":"5.85"},{"name":"tests/cases/fourslash/renameForDefaultExport08.ts","time":194,"edits":1,"cost":"5.85"},{"name":"tests/cases/compiler/genericTypeParameterEquivalence2.ts","time":194,"edits":1,"cost":"5.85"},{"name":"tests/cases/fourslash/referencesForGlobals2.ts","time":194,"edits":1,"cost":"5.85"},{"name":"tests/cases/fourslash/completionListInImportClause04.ts","time":194,"edits":1,"cost":"5.85"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsEnum3.ts","time":194,"edits":1,"cost":"5.85"},{"name":"tests/cases/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts","time":194,"edits":1,"cost":"5.85"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignaturesRest2.ts","time":194,"edits":1,"cost":"5.85"},{"name":"tests/cases/fourslash/prototypeProperty.ts","time":194,"edits":1,"cost":"5.85"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplatesWithOverloadedTags9.ts","time":194,"edits":1,"cost":"5.85"},{"name":"tests/cases/fourslash/refactorExtractType42.ts","time":386,"edits":2,"cost":"5.84"},{"name":"tests/cases/fourslash/quickInfoOnNarrowedTypeInModule.ts","time":386,"edits":2,"cost":"5.84"},{"name":"tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithObjectLiteral.ts","time":193,"edits":1,"cost":"5.84"},{"name":"tests/cases/fourslash/renameInheritedProperties5.ts","time":193,"edits":1,"cost":"5.84"},{"name":"tests/cases/fourslash/getEmitOutputNoErrors.ts","time":193,"edits":1,"cost":"5.84"},{"name":"tests/cases/fourslash/findAllRefsWithLeadingUnderscoreNames9.ts","time":193,"edits":1,"cost":"5.84"},{"name":"tests/cases/compiler/declFileExportImportChain.ts","time":193,"edits":1,"cost":"5.84"},{"name":"tests/cases/fourslash/javaScriptPrototype5.ts","time":193,"edits":1,"cost":"5.84"},{"name":"tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/octalIntegerLiteralES6.ts","time":193,"edits":1,"cost":"5.84"},{"name":"tests/cases/fourslash/getOccurrencesIsDefinitionOfNamespace.ts","time":193,"edits":1,"cost":"5.84"},{"name":"tests/cases/fourslash/server/formatOnEnter.ts","time":193,"edits":1,"cost":"5.84"},{"name":"tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithIndexers.ts","time":193,"edits":1,"cost":"5.84"},{"name":"tests/cases/fourslash/codeFixInferFromUsageArrowJS.ts","time":385,"edits":2,"cost":"5.84"},{"name":"tests/cases/fourslash/refactorExtractType45.ts","time":192,"edits":1,"cost":"5.84"},{"name":"tests/cases/conformance/types/mapped/isomorphicMappedTypeInference.ts","time":384,"edits":2,"cost":"5.84"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference.ts","time":192,"edits":1,"cost":"5.84"},{"name":"tests/cases/fourslash/indexerReturnTypes1.ts","time":192,"edits":1,"cost":"5.84"},{"name":"tests/cases/fourslash/protoPropertyInObjectLiteral.ts","time":192,"edits":1,"cost":"5.84"},{"name":"tests/cases/conformance/types/witness/witness.ts","time":192,"edits":1,"cost":"5.84"},{"name":"tests/cases/fourslash/completionListInComments2.ts","time":192,"edits":1,"cost":"5.84"},{"name":"tests/cases/fourslash/getOccurrencesDeclare3.ts","time":192,"edits":1,"cost":"5.84"},{"name":"tests/cases/fourslash/codeFixClassSuperMustPrecedeThisAccess.ts","time":192,"edits":1,"cost":"5.84"},{"name":"tests/cases/fourslash/completionListPrivateMembers.ts","time":192,"edits":1,"cost":"5.84"},{"name":"tests/cases/fourslash/genericWithSpecializedProperties2.ts","time":192,"edits":1,"cost":"5.84"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions18_ES5.ts","time":192,"edits":1,"cost":"5.84"},{"name":"tests/cases/fourslash/findAllRefsImportStarOfExportEquals.ts","time":383,"edits":2,"cost":"5.84"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_classDeclarationGoodUsages.ts","time":191,"edits":1,"cost":"5.83"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringVariableStatementNestedObjectBindingPattern.ts","time":191,"edits":1,"cost":"5.83"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateDeeply.ts","time":191,"edits":1,"cost":"5.83"},{"name":"tests/cases/conformance/expressions/functionCalls/newWithSpreadES6.ts","time":191,"edits":1,"cost":"5.83"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess_js_4.ts","time":191,"edits":1,"cost":"5.83"},{"name":"tests/cases/fourslash/goToDefinitionObjectLiteralProperties.ts","time":191,"edits":1,"cost":"5.83"},{"name":"tests/cases/fourslash/completionListInImportClause03.ts","time":191,"edits":1,"cost":"5.83"},{"name":"tests/cases/fourslash/javaScriptPrototype4.ts","time":191,"edits":1,"cost":"5.83"},{"name":"tests/cases/fourslash/goToDefinitionPartialImplementation.ts","time":191,"edits":1,"cost":"5.83"},{"name":"tests/cases/conformance/externalModules/multipleExportDefault2.ts","time":191,"edits":1,"cost":"5.83"},{"name":"tests/cases/fourslash/completionListClassMembers.ts","time":190,"edits":1,"cost":"5.83"},{"name":"tests/cases/compiler/commentsCommentParsing.ts","time":190,"edits":1,"cost":"5.83"},{"name":"tests/cases/fourslash/importNameCodeFixExistingImport12.ts","time":190,"edits":1,"cost":"5.83"},{"name":"tests/cases/fourslash/completionListAtIdentifierDefinitionLocations_Generics.ts","time":190,"edits":1,"cost":"5.83"},{"name":"tests/cases/compiler/privacyVar.ts","time":190,"edits":1,"cost":"5.83"},{"name":"tests/cases/fourslash/completionListNewIdentifierBindingElement.ts","time":190,"edits":1,"cost":"5.83"},{"name":"tests/cases/conformance/jsx/tsxEmit1.tsx","time":190,"edits":1,"cost":"5.83"},{"name":"tests/cases/fourslash/documentHighlightAtParameterPropertyDeclaration2.ts","time":190,"edits":1,"cost":"5.83"},{"name":"tests/cases/compiler/defaultIndexProps2.ts","time":190,"edits":1,"cost":"5.83"},{"name":"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding.ts","time":190,"edits":1,"cost":"5.83"},{"name":"tests/cases/compiler/systemModuleAmbientDeclarations.ts","time":190,"edits":1,"cost":"5.83"},{"name":"tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens8.ts","time":190,"edits":1,"cost":"5.83"},{"name":"tests/cases/fourslash/getJavaScriptCompletions18.ts","time":189,"edits":1,"cost":"5.82"},{"name":"tests/cases/fourslash/shims-pp/getPreProcessedFile.ts","time":189,"edits":1,"cost":"5.82"},{"name":"tests/cases/fourslash/referencesForIndexProperty2.ts","time":189,"edits":1,"cost":"5.82"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints4.ts","time":189,"edits":1,"cost":"5.82"},{"name":"tests/cases/fourslash/completionListAfterAnyType.ts","time":189,"edits":1,"cost":"5.82"},{"name":"tests/cases/fourslash/memberListOfModule.ts","time":189,"edits":1,"cost":"5.82"},{"name":"tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts","time":188,"edits":1,"cost":"5.82"},{"name":"tests/cases/compiler/propertyAccess1.ts","time":188,"edits":1,"cost":"5.82"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignatures2.ts","time":188,"edits":1,"cost":"5.82"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithObjectTypeArgsAndConstraints.ts","time":188,"edits":1,"cost":"5.82"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariables/parserErrorRecovery_IncompleteMemberVariable1.ts","time":188,"edits":1,"cost":"5.82"},{"name":"tests/cases/fourslash/codeFixAddMissingMember_classIsNotFirstDeclaration.ts","time":188,"edits":1,"cost":"5.82"},{"name":"tests/cases/fourslash/getOccurrencesIfElse4.ts","time":188,"edits":1,"cost":"5.82"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.ts","time":188,"edits":1,"cost":"5.82"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions18_ES6.ts","time":188,"edits":1,"cost":"5.82"},{"name":"tests/cases/fourslash/codeFixInferFromUsageConstructorFunctionJS.ts","time":374,"edits":2,"cost":"5.81"},{"name":"tests/cases/fourslash/tsxGoToDefinitionClasses.ts","time":187,"edits":1,"cost":"5.81"},{"name":"tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithIdenticalBCT.ts","time":187,"edits":1,"cost":"5.81"},{"name":"tests/cases/fourslash/referencesForLabel5.ts","time":187,"edits":1,"cost":"5.81"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsExternalModules.ts","time":187,"edits":1,"cost":"5.81"},{"name":"tests/cases/fourslash/goToDefinitionUnionTypeProperty4.ts","time":187,"edits":1,"cost":"5.81"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts","time":187,"edits":1,"cost":"5.81"},{"name":"tests/cases/fourslash/genericInterfaceWithInheritanceEdit1.ts","time":187,"edits":1,"cost":"5.81"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_classTypeParameters.ts","time":186,"edits":1,"cost":"5.81"},{"name":"tests/cases/fourslash/completionListInIndexSignature02.ts","time":186,"edits":1,"cost":"5.81"},{"name":"tests/cases/fourslash/promiseTyping2.ts","time":186,"edits":1,"cost":"5.81"},{"name":"tests/cases/fourslash/memberListOnExplicitThis.ts","time":186,"edits":1,"cost":"5.81"},{"name":"tests/cases/fourslash/getOccurrencesSetAndGet2.ts","time":186,"edits":1,"cost":"5.81"},{"name":"tests/cases/fourslash/unusedMethodInClass6.ts","time":186,"edits":1,"cost":"5.81"},{"name":"tests/cases/fourslash/completionListInUnclosedYieldExpression01.ts","time":186,"edits":1,"cost":"5.81"},{"name":"tests/cases/fourslash/quickinfoIsConsistent.ts","time":186,"edits":1,"cost":"5.81"},{"name":"tests/cases/fourslash/localFunction.ts","time":186,"edits":1,"cost":"5.81"},{"name":"tests/cases/project/sourceRootWithNoSourceMapOption.json","time":185,"edits":1,"cost":"5.80"},{"name":"tests/cases/fourslash/server/declarationMapsEnableMapping_NoInline.ts","time":370,"edits":2,"cost":"5.80"},{"name":"tests/cases/conformance/types/union/contextualTypeWithUnionTypeMembers.ts","time":185,"edits":1,"cost":"5.80"},{"name":"tests/cases/fourslash/todoComments14.ts","time":185,"edits":1,"cost":"5.80"},{"name":"tests/cases/compiler/declarationEmitCrossFileImportTypeOfAmbientModule.ts","time":185,"edits":1,"cost":"5.80"},{"name":"tests/cases/fourslash/goToTypeDefinition2.ts","time":185,"edits":1,"cost":"5.80"},{"name":"tests/cases/fourslash/renameParameterPropertyDeclaration3.ts","time":185,"edits":1,"cost":"5.80"},{"name":"tests/cases/fourslash/renameLocationsForClassExpression01.ts","time":185,"edits":1,"cost":"5.80"},{"name":"tests/cases/fourslash/getOccurrencesSetAndGet3.ts","time":185,"edits":1,"cost":"5.80"},{"name":"tests/cases/conformance/ambient/ambientInsideNonAmbient.ts","time":185,"edits":1,"cost":"5.80"},{"name":"tests/cases/fourslash/importNameCodeFixWithPrologue.ts","time":368,"edits":2,"cost":"5.80"},{"name":"tests/cases/fourslash/getJavaScriptQuickInfo8.ts","time":184,"edits":1,"cost":"5.80"},{"name":"tests/cases/conformance/types/mapped/mappedTypes6.ts","time":368,"edits":2,"cost":"5.80"},{"name":"tests/cases/fourslash/referencesForGlobals.ts","time":184,"edits":1,"cost":"5.80"},{"name":"tests/cases/fourslash/findAllRefsOnDecorators.ts","time":184,"edits":1,"cost":"5.80"},{"name":"tests/cases/fourslash/documentHighlightAtInheritedProperties2.ts","time":184,"edits":1,"cost":"5.80"},{"name":"tests/cases/compiler/systemModule11.ts","time":184,"edits":1,"cost":"5.80"},{"name":"tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts","time":184,"edits":1,"cost":"5.80"},{"name":"tests/cases/fourslash/quickInfoOnPrivateConstructorCall.ts","time":184,"edits":1,"cost":"5.80"},{"name":"tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts","time":367,"edits":2,"cost":"5.79"},{"name":"tests/cases/fourslash/referencesForOverrides.ts","time":367,"edits":2,"cost":"5.79"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_methodCallUnion.ts","time":366,"edits":2,"cost":"5.79"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_importedFunction.ts","time":366,"edits":2,"cost":"5.79"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_functionComments1.ts","time":183,"edits":1,"cost":"5.79"},{"name":"tests/cases/fourslash/jsdocTypedefTagSemanticMeaning0.ts","time":549,"edits":3,"cost":"5.79"},{"name":"tests/cases/fourslash/server/tsxIncrementalServer.ts","time":183,"edits":1,"cost":"5.79"},{"name":"tests/cases/fourslash/quickInfoOnObjectLiteralWithOnlyGetter.ts","time":183,"edits":1,"cost":"5.79"},{"name":"tests/cases/fourslash/getEmitOutputTsxFile_Preserve.ts","time":183,"edits":1,"cost":"5.79"},{"name":"tests/cases/fourslash/semanticClassificationModules.ts","time":183,"edits":1,"cost":"5.79"},{"name":"tests/cases/fourslash/renameAcrossMultipleProjects.ts","time":183,"edits":1,"cost":"5.79"},{"name":"tests/cases/fourslash/tsxCompletion13.ts","time":183,"edits":1,"cost":"5.79"},{"name":"tests/cases/fourslash/codeFixUndeclaredPropertyObjectLiteral.ts","time":183,"edits":1,"cost":"5.79"},{"name":"tests/cases/fourslash/completionForStringLiteral.ts","time":183,"edits":1,"cost":"5.79"},{"name":"tests/cases/compiler/moduleElementsInWrongContext2.ts","time":183,"edits":1,"cost":"5.79"},{"name":"tests/cases/project/prologueEmit.json","time":182,"edits":1,"cost":"5.79"},{"name":"tests/cases/fourslash/quickInfoOnCircularTypes.ts","time":182,"edits":1,"cost":"5.79"},{"name":"tests/cases/conformance/es6/modules/exportsAndImports1.ts","time":182,"edits":1,"cost":"5.79"},{"name":"tests/cases/fourslash/goToModuleAliasDefinition.ts","time":182,"edits":1,"cost":"5.79"},{"name":"tests/cases/compiler/cannotInvokeNewOnIndexExpression.ts","time":182,"edits":1,"cost":"5.79"},{"name":"tests/cases/compiler/arrayFrom.ts","time":363,"edits":2,"cost":"5.78"},{"name":"tests/cases/fourslash/refactorExtractType6.ts","time":181,"edits":1,"cost":"5.78"},{"name":"tests/cases/fourslash/shims-pp/getOccurrencesAtPosition.ts","time":181,"edits":1,"cost":"5.78"},{"name":"tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolProperty2.ts","time":181,"edits":1,"cost":"5.78"},{"name":"tests/cases/fourslash/importNameCodeFixExistingImport0.ts","time":181,"edits":1,"cost":"5.78"},{"name":"tests/cases/fourslash/completionListInObjectLiteralPropertyAssignment.ts","time":181,"edits":1,"cost":"5.78"},{"name":"tests/cases/fourslash/completionListModuleMembers.ts","time":181,"edits":1,"cost":"5.78"},{"name":"tests/cases/fourslash/getOccurrencesStringLiteralTypes.ts","time":181,"edits":1,"cost":"5.78"},{"name":"tests/cases/fourslash/refactorConvertImport_notAtDefaultName.ts","time":362,"edits":2,"cost":"5.78"},{"name":"tests/cases/fourslash/unusedLocalsinConstructorFS1.ts","time":181,"edits":1,"cost":"5.78"},{"name":"tests/cases/compiler/unusedParametersinConstructor2.ts","time":181,"edits":1,"cost":"5.78"},{"name":"tests/cases/compiler/genericFunctionInference1.ts","time":903,"edits":5,"cost":"5.78"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_arrowFunctionWithType.ts","time":180,"edits":1,"cost":"5.77"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.ts","time":180,"edits":1,"cost":"5.77"},{"name":"tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts","time":180,"edits":1,"cost":"5.77"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts","time":180,"edits":1,"cost":"5.77"},{"name":"tests/cases/compiler/privacyGloImport.ts","time":180,"edits":1,"cost":"5.77"},{"name":"tests/cases/fourslash/goToDefinitionJsModuleName.ts","time":180,"edits":1,"cost":"5.77"},{"name":"tests/cases/fourslash/goToDefinitionImportedNames4.ts","time":180,"edits":1,"cost":"5.77"},{"name":"tests/cases/fourslash/findAllRefsInsideWithBlock.ts","time":180,"edits":1,"cost":"5.77"},{"name":"tests/cases/fourslash/constEnumQuickInfoAndCompletionList.ts","time":180,"edits":1,"cost":"5.77"},{"name":"tests/cases/compiler/booleanLiteralsContextuallyTypedFromUnion.tsx","time":180,"edits":1,"cost":"5.77"},{"name":"tests/cases/fourslash/semanticClassificationWithUnionTypes.ts","time":180,"edits":1,"cost":"5.77"},{"name":"tests/cases/conformance/types/uniqueSymbol/uniqueSymbols.ts","time":359,"edits":2,"cost":"5.77"},{"name":"tests/cases/conformance/classes/mixinClassesAnonymous.ts","time":179,"edits":1,"cost":"5.77"},{"name":"tests/cases/fourslash/codeFixClassImplementClassPropertyTypeQuery.ts","time":179,"edits":1,"cost":"5.77"},{"name":"tests/cases/fourslash/duplicatePackageServices_fileChanges.ts","time":358,"edits":2,"cost":"5.77"},{"name":"tests/cases/fourslash/selfReferencedExternalModule.ts","time":179,"edits":1,"cost":"5.77"},{"name":"tests/cases/fourslash/mergedDeclarationsWithExportAssignment1.ts","time":179,"edits":1,"cost":"5.77"},{"name":"tests/cases/fourslash/findAllRefsWithLeadingUnderscoreNames8.ts","time":179,"edits":1,"cost":"5.77"},{"name":"tests/cases/fourslash/signatureHelpObjectCreationExpressionNoArgs_NotAvailable.ts","time":179,"edits":1,"cost":"5.77"},{"name":"tests/cases/fourslash/renameThis.ts","time":179,"edits":1,"cost":"5.77"},{"name":"tests/cases/fourslash/getOccurrencesClassExpressionPublic.ts","time":179,"edits":1,"cost":"5.77"},{"name":"tests/cases/fourslash/parameterInfoOnParameterType.ts","time":179,"edits":1,"cost":"5.77"},{"name":"tests/cases/fourslash/completionListOutsideOfForLoop02.ts","time":179,"edits":1,"cost":"5.77"},{"name":"tests/cases/conformance/parser/ecmascript5/parservoidInQualifiedName2.ts","time":179,"edits":1,"cost":"5.77"},{"name":"unittests:: tsserver:: watchEnvironment:: tsserverProjectSystem watchDirectories implementation","time":178,"edits":1,"cost":"5.76"},{"name":"unittests:: tsserver:: ConfiguredProjects:: non-existing directories listed in config file input array","time":178,"edits":1,"cost":"5.76"},{"name":"tests/cases/compiler/declFileGenericType.ts","time":178,"edits":1,"cost":"5.76"},{"name":"tests/cases/conformance/types/union/unionTypeMembers.ts","time":178,"edits":1,"cost":"5.76"},{"name":"tests/cases/fourslash/completionListInUnclosedIndexSignature02.ts","time":178,"edits":1,"cost":"5.76"},{"name":"tests/cases/compiler/privacyTypeParametersOfClassDeclFile.ts","time":178,"edits":1,"cost":"5.76"},{"name":"tests/cases/compiler/es6ImportNamedImportDts.ts","time":178,"edits":1,"cost":"5.76"},{"name":"tests/cases/fourslash/genericTypeArgumentInference1.ts","time":178,"edits":1,"cost":"5.76"},{"name":"tests/cases/fourslash/goToDefinitionMethodOverloads.ts","time":178,"edits":1,"cost":"5.76"},{"name":"tests/cases/fourslash/importNameCodeFixIndentedIdentifier.ts","time":356,"edits":2,"cost":"5.76"},{"name":"tests/cases/fourslash/gotoDefinitionPropertyAccessExpressionHeritageClause.ts","time":178,"edits":1,"cost":"5.76"},{"name":"tests/cases/conformance/es6/templates/templateStringInSwitchAndCaseES6.ts","time":178,"edits":1,"cost":"5.76"},{"name":"tests/cases/fourslash/completionListAfterRegularExpressionLiteral1.ts","time":178,"edits":1,"cost":"5.76"},{"name":"tests/cases/compiler/getAndSetNotIdenticalType3.ts","time":178,"edits":1,"cost":"5.76"},{"name":"tests/cases/fourslash/unusedImports10FS.ts","time":178,"edits":1,"cost":"5.76"},{"name":"tests/cases/fourslash/renameJsPropertyAssignment.ts","time":178,"edits":1,"cost":"5.76"},{"name":"tests/cases/compiler/es6ExportAssignment.ts","time":178,"edits":1,"cost":"5.76"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures4.ts","time":177,"edits":1,"cost":"5.76"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts","time":177,"edits":1,"cost":"5.76"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameter.ts","time":177,"edits":1,"cost":"5.76"},{"name":"tests/cases/fourslash/memberListOnFunctionParameter.ts","time":177,"edits":1,"cost":"5.76"},{"name":"tests/cases/compiler/declarationEmitPromise.ts","time":177,"edits":1,"cost":"5.76"},{"name":"tests/cases/fourslash/quickInfoOnMergedInterfacesWithIncrementalEdits.ts","time":177,"edits":1,"cost":"5.76"},{"name":"tests/cases/compiler/optionalParamArgsTest.ts","time":177,"edits":1,"cost":"5.76"},{"name":"tests/cases/conformance/types/contextualTypes/jsxAttributes/contextuallyTypedStringLiteralsInJsxAttributes02.tsx","time":177,"edits":1,"cost":"5.76"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplatesNested2.ts","time":177,"edits":1,"cost":"5.76"},{"name":"tests/cases/fourslash/objectLiteralBindingInParameter.ts","time":177,"edits":1,"cost":"5.76"},{"name":"tests/cases/fourslash/renameCrossJsTs01.ts","time":177,"edits":1,"cost":"5.76"},{"name":"tests/cases/fourslash/signatureHelpConstructorCallParamProperties.ts","time":177,"edits":1,"cost":"5.76"},{"name":"tests/cases/fourslash/functionTypes.ts","time":177,"edits":1,"cost":"5.76"},{"name":"tests/cases/fourslash/goToDefinitionObjectLiteralProperties1.ts","time":177,"edits":1,"cost":"5.76"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/typeParametersAreIdenticalToThemselves.ts","time":177,"edits":1,"cost":"5.76"},{"name":"tests/cases/compiler/classExpressionWithStaticPropertiesES62.ts","time":177,"edits":1,"cost":"5.76"},{"name":"tests/cases/fourslash/moduleRenamingErrorRecovery.ts","time":177,"edits":1,"cost":"5.76"},{"name":"tests/cases/fourslash/completionListInMiddleOfIdentifierInArrowFunction01.ts","time":177,"edits":1,"cost":"5.76"},{"name":"tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpression5.ts","time":177,"edits":1,"cost":"5.76"},{"name":"tests/cases/compiler/escapedReservedCompilerNamedIdentifier.ts","time":177,"edits":1,"cost":"5.76"},{"name":"tests/cases/compiler/undefinedAssignableToGenericMappedIntersection.ts","time":353,"edits":2,"cost":"5.75"},{"name":"tests/cases/fourslash/referencesForIndexProperty.ts","time":176,"edits":1,"cost":"5.75"},{"name":"tests/cases/fourslash/getOccurrencesSetAndGet.ts","time":176,"edits":1,"cost":"5.75"},{"name":"tests/cases/fourslash/referencesForInheritedProperties3.ts","time":176,"edits":1,"cost":"5.75"},{"name":"tests/cases/fourslash/extendsTArray.ts","time":176,"edits":1,"cost":"5.75"},{"name":"tests/cases/fourslash/findAllRefsReExportStar.ts","time":176,"edits":1,"cost":"5.75"},{"name":"tests/cases/fourslash/tsxCompletion5.ts","time":176,"edits":1,"cost":"5.75"},{"name":"tests/cases/fourslash/codeFixUndeclaredClassInstanceWithTypeParams.ts","time":176,"edits":1,"cost":"5.75"},{"name":"tests/cases/fourslash/jsxSpreadReference.ts","time":176,"edits":1,"cost":"5.75"},{"name":"tests/cases/conformance/es6/templates/templateStringWithPropertyAccess.ts","time":176,"edits":1,"cost":"5.75"},{"name":"tests/cases/fourslash/refactorConvertExport_ambientModule.ts","time":351,"edits":2,"cost":"5.75"},{"name":"tests/cases/fourslash/findAllRefsPropertyContextuallyTypedByTypeParam01.ts","time":526,"edits":3,"cost":"5.75"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_allParamsOptional.ts","time":175,"edits":1,"cost":"5.75"},{"name":"tests/cases/fourslash/referencesForAmbients2.ts","time":175,"edits":1,"cost":"5.75"},{"name":"tests/cases/fourslash/server/jsdocCallbackTagRename01.ts","time":175,"edits":1,"cost":"5.75"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsEnum1.ts","time":175,"edits":1,"cost":"5.75"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts","time":175,"edits":1,"cost":"5.75"},{"name":"tests/cases/fourslash/findAllRefsParameterPropertyDeclaration1.ts","time":175,"edits":1,"cost":"5.75"},{"name":"tests/cases/fourslash/importNameCodeFixExistingImportEquals0.ts","time":175,"edits":1,"cost":"5.75"},{"name":"tests/cases/fourslash/insertInterfaceAndCheckTypeLiteralField.ts","time":175,"edits":1,"cost":"5.75"},{"name":"tests/cases/fourslash/parameterlessSetter.ts","time":175,"edits":1,"cost":"5.75"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportFile2.ts","time":175,"edits":1,"cost":"5.75"},{"name":"tests/cases/fourslash/completionListInUnclosedTaggedTemplate01.ts","time":175,"edits":1,"cost":"5.75"},{"name":"tests/cases/fourslash/recursiveObjectLiteral.ts","time":175,"edits":1,"cost":"5.75"},{"name":"tests/cases/fourslash/aliasMergingWithNamespace.ts","time":175,"edits":1,"cost":"5.75"},{"name":"tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts","time":349,"edits":2,"cost":"5.74"},{"name":"tests/cases/compiler/computedPropertiesInDestructuring1.ts","time":174,"edits":1,"cost":"5.74"},{"name":"tests/cases/fourslash/getOccurrencesSwitchCaseDefault3.ts","time":174,"edits":1,"cost":"5.74"},{"name":"tests/cases/fourslash/completionListInStringLiterals2.ts","time":174,"edits":1,"cost":"5.74"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringParameterObjectBindingPatternDefaultValues.ts","time":174,"edits":1,"cost":"5.74"},{"name":"tests/cases/fourslash/server/jsdocTypedefTagRename04.ts","time":174,"edits":1,"cost":"5.74"},{"name":"tests/cases/fourslash/extract-method4.ts","time":174,"edits":1,"cost":"5.74"},{"name":"tests/cases/conformance/es6/Symbols/symbolDeclarationEmit5.ts","time":174,"edits":1,"cost":"5.74"},{"name":"tests/cases/conformance/types/import/importTypeLocal.ts","time":174,"edits":1,"cost":"5.74"},{"name":"tests/cases/fourslash/referencesForLabel2.ts","time":174,"edits":1,"cost":"5.74"},{"name":"tests/cases/fourslash/symbolNameAtUnparseableFunctionOverload.ts","time":174,"edits":1,"cost":"5.74"},{"name":"tests/cases/compiler/capturedLetConstInLoop8.ts","time":174,"edits":1,"cost":"5.74"},{"name":"tests/cases/conformance/types/thisType/thisTypeAndConstraints.ts","time":174,"edits":1,"cost":"5.74"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment10.ts","time":173,"edits":1,"cost":"5.73"},{"name":"tests/cases/fourslash/tripleSlashRefPathCompletionRelativePaths.ts","time":346,"edits":2,"cost":"5.73"},{"name":"tests/cases/fourslash/getOccurrencesThrow7.ts","time":173,"edits":1,"cost":"5.73"},{"name":"tests/cases/compiler/statics.ts","time":173,"edits":1,"cost":"5.73"},{"name":"tests/cases/fourslash/breakpointValidationObjectLiteralExpressions.ts","time":173,"edits":1,"cost":"5.73"},{"name":"tests/cases/fourslash/javaScriptModules15.ts","time":173,"edits":1,"cost":"5.73"},{"name":"tests/cases/fourslash/javascriptModules22.ts","time":173,"edits":1,"cost":"5.73"},{"name":"tests/cases/fourslash/memberListOfModuleInAnotherModule.ts","time":173,"edits":1,"cost":"5.73"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringVariableStatement.ts","time":173,"edits":1,"cost":"5.73"},{"name":"tests/cases/fourslash/completionListInEmptyFile.ts","time":173,"edits":1,"cost":"5.73"},{"name":"tests/cases/conformance/classes/mixinClassesMembers.ts","time":173,"edits":1,"cost":"5.73"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplatesWithOverloadedTags5.ts","time":173,"edits":1,"cost":"5.73"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames27_ES5.ts","time":173,"edits":1,"cost":"5.73"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of49.ts","time":173,"edits":1,"cost":"5.73"},{"name":"tests/cases/compiler/commentsExternalModules3.ts","time":172,"edits":1,"cost":"5.73"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts","time":172,"edits":1,"cost":"5.73"},{"name":"tests/cases/fourslash/unusedVariableInModule2.ts","time":172,"edits":1,"cost":"5.73"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignabilityInInheritance.ts","time":172,"edits":1,"cost":"5.73"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithCallSignaturesWithOverloads.ts","time":172,"edits":1,"cost":"5.73"},{"name":"tests/cases/fourslash/completionListInObjectBindingPattern11.ts","time":172,"edits":1,"cost":"5.73"},{"name":"tests/cases/fourslash/renameInheritedProperties8.ts","time":172,"edits":1,"cost":"5.73"},{"name":"tests/cases/fourslash/codeFixCalledES2015Import13.ts","time":172,"edits":1,"cost":"5.73"},{"name":"tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts","time":172,"edits":1,"cost":"5.73"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTags01.ts","time":172,"edits":1,"cost":"5.73"},{"name":"tests/cases/fourslash/squiggleFunctionExpression.ts","time":172,"edits":1,"cost":"5.73"},{"name":"tests/cases/fourslash/getEmitOutputSourceRoot.ts","time":172,"edits":1,"cost":"5.73"},{"name":"tests/cases/fourslash/invertedFunduleAfterQuickInfo.ts","time":172,"edits":1,"cost":"5.73"},{"name":"tests/cases/fourslash/quickInfoOnUndefined.ts","time":172,"edits":1,"cost":"5.73"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck9.ts","time":172,"edits":1,"cost":"5.73"},{"name":"tests/cases/fourslash/completionListInObjectBindingPattern07.ts","time":172,"edits":1,"cost":"5.73"},{"name":"tests/cases/compiler/capturedLetConstInLoop1.ts","time":514,"edits":3,"cost":"5.72"},{"name":"tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx","time":342,"edits":2,"cost":"5.72"},{"name":"tests/cases/fourslash/renameReExportDefault.ts","time":171,"edits":1,"cost":"5.72"},{"name":"tests/cases/fourslash/completionListInUnclosedDeleteExpression01.ts","time":171,"edits":1,"cost":"5.72"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesBoth.ts","time":171,"edits":1,"cost":"5.72"},{"name":"tests/cases/fourslash/shims/getRenameInfo.ts","time":171,"edits":1,"cost":"5.72"},{"name":"tests/cases/fourslash/renameLocationsForFunctionExpression01.ts","time":171,"edits":1,"cost":"5.72"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.ts","time":171,"edits":1,"cost":"5.72"},{"name":"tests/cases/fourslash/referencesForIllegalAssignment.ts","time":171,"edits":1,"cost":"5.72"},{"name":"tests/cases/fourslash/argumentsIndexExpression.ts","time":171,"edits":1,"cost":"5.72"},{"name":"tests/cases/fourslash/completionListAfterNumericLiteral1.ts","time":171,"edits":1,"cost":"5.72"},{"name":"tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts","time":171,"edits":1,"cost":"5.72"},{"name":"tests/cases/fourslash/referencesForClassMembersExtendingAbstractClass.ts","time":512,"edits":3,"cost":"5.72"},{"name":"unittests:: tsbuild:: when project reference is referenced transitively","time":170,"edits":1,"cost":"5.72"},{"name":"tests/cases/fourslash/genericTypeWithMultipleBases1MultiFile.ts","time":170,"edits":1,"cost":"5.72"},{"name":"tests/cases/fourslash/codeFixConvertToMappedObjectType4.ts","time":340,"edits":2,"cost":"5.72"},{"name":"tests/cases/fourslash/documentHighlightAtInheritedProperties6.ts","time":170,"edits":1,"cost":"5.72"},{"name":"tests/cases/fourslash/jsDocFunctionSignatures11.ts","time":170,"edits":1,"cost":"5.72"},{"name":"tests/cases/compiler/anyAsReturnTypeForNewOnCall.ts","time":170,"edits":1,"cost":"5.72"},{"name":"tests/cases/fourslash/server/completions03.ts","time":170,"edits":1,"cost":"5.72"},{"name":"tests/cases/fourslash/getOccurrencesThrow.ts","time":339,"edits":2,"cost":"5.71"},{"name":"tests/cases/fourslash/findAllRefsOfConstructor_multipleFiles.ts","time":338,"edits":2,"cost":"5.71"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardOfFormThisMember.ts","time":169,"edits":1,"cost":"5.71"},{"name":"tests/cases/fourslash/genericCallSignaturesInNonGenericTypes2.ts","time":169,"edits":1,"cost":"5.71"},{"name":"tests/cases/fourslash/incrementalResolveFunctionPropertyAssignment.ts","time":169,"edits":1,"cost":"5.71"},{"name":"tests/cases/fourslash/getOccurrencesProtected1.ts","time":169,"edits":1,"cost":"5.71"},{"name":"tests/cases/fourslash/getEmitOutputWithDeclarationFile.ts","time":169,"edits":1,"cost":"5.71"},{"name":"tests/cases/fourslash/parenthesisFatArrows.ts","time":169,"edits":1,"cost":"5.71"},{"name":"tests/cases/fourslash/findAllRefsParameterPropertyDeclaration2.ts","time":169,"edits":1,"cost":"5.71"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts","time":169,"edits":1,"cost":"5.71"},{"name":"tests/cases/fourslash/extract-method17.ts","time":169,"edits":1,"cost":"5.71"},{"name":"tests/cases/conformance/jsx/jsxReactTestSuite.tsx","time":169,"edits":1,"cost":"5.71"},{"name":"tests/cases/fourslash/completionListInImportClause01.ts","time":169,"edits":1,"cost":"5.71"},{"name":"tests/cases/compiler/es6ClassTest8.ts","time":169,"edits":1,"cost":"5.71"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsClassConstructor.ts","time":168,"edits":1,"cost":"5.71"},{"name":"tests/cases/project/defaultExcludeNodeModulesAndOutDirWithAllowJS.json","time":168,"edits":1,"cost":"5.71"},{"name":"tests/cases/conformance/classes/mixinAccessModifiers.ts","time":168,"edits":1,"cost":"5.71"},{"name":"tests/cases/fourslash/invertedCloduleAfterQuickInfo.ts","time":168,"edits":1,"cost":"5.71"},{"name":"tests/cases/fourslash/codeFixClassImplementDeepInheritance.ts","time":168,"edits":1,"cost":"5.71"},{"name":"tests/cases/compiler/es6ExportDefaultClassDeclaration.ts","time":168,"edits":1,"cost":"5.71"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts","time":168,"edits":1,"cost":"5.71"},{"name":"tests/cases/fourslash/removeExportedClassFromReopenedModule.ts","time":168,"edits":1,"cost":"5.71"},{"name":"tests/cases/conformance/jsx/tsxStatelessFunctionComponents2.tsx","time":168,"edits":1,"cost":"5.71"},{"name":"tests/cases/fourslash/addMemberToModule.ts","time":168,"edits":1,"cost":"5.71"},{"name":"tests/cases/fourslash/goToDefinitionImportedNames7.ts","time":168,"edits":1,"cost":"5.71"},{"name":"tests/cases/fourslash/codeFixSpelling1.ts","time":168,"edits":1,"cost":"5.71"},{"name":"tests/cases/fourslash/semanticClassificationInTemplateExpressions.ts","time":168,"edits":1,"cost":"5.71"},{"name":"tests/cases/conformance/types/spread/objectSpread.ts","time":503,"edits":3,"cost":"5.70"},{"name":"tests/cases/compiler/commentsExternalModules2.ts","time":167,"edits":1,"cost":"5.70"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignaturesRest1.ts","time":167,"edits":1,"cost":"5.70"},{"name":"tests/cases/fourslash/completionListInComments3.ts","time":167,"edits":1,"cost":"5.70"},{"name":"tests/cases/fourslash/failureToImplementClass.ts","time":167,"edits":1,"cost":"5.70"},{"name":"tests/cases/compiler/correctOrderOfPromiseMethod.ts","time":334,"edits":2,"cost":"5.70"},{"name":"tests/cases/conformance/es6/templates/templateStringBinaryOperationsES6Invalid.ts","time":167,"edits":1,"cost":"5.70"},{"name":"tests/cases/compiler/importDecl.ts","time":167,"edits":1,"cost":"5.70"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardIntersectionTypes.ts","time":167,"edits":1,"cost":"5.70"},{"name":"tests/cases/fourslash/tsxCompletion8.ts","time":167,"edits":1,"cost":"5.70"},{"name":"tests/cases/fourslash/signatureHelpInFunctionCallOnFunctionDeclarationInMultipleFiles.ts","time":167,"edits":1,"cost":"5.70"},{"name":"tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts","time":167,"edits":1,"cost":"5.70"},{"name":"tests/cases/fourslash/getOccurrencesIsDefinitionOfExport.ts","time":167,"edits":1,"cost":"5.70"},{"name":"tests/cases/compiler/declFileTypeAnnotationTypeQuery.ts","time":167,"edits":1,"cost":"5.70"},{"name":"tests/cases/fourslash/squiggleIllegalClassExtension.ts","time":167,"edits":1,"cost":"5.70"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_shorthandProperty.ts","time":333,"edits":2,"cost":"5.70"},{"name":"tests/cases/project/baseline3.json","time":166,"edits":1,"cost":"5.69"},{"name":"tests/cases/fourslash/moduleReferenceValue.ts","time":166,"edits":1,"cost":"5.69"},{"name":"tests/cases/fourslash/referencesForGlobals3.ts","time":166,"edits":1,"cost":"5.69"},{"name":"tests/cases/fourslash/getOccurrencesReturnBroken.ts","time":166,"edits":1,"cost":"5.69"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint4.ts","time":166,"edits":1,"cost":"5.69"},{"name":"tests/cases/fourslash/unusedImports4FS.ts","time":166,"edits":1,"cost":"5.69"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithCallSignaturesDifferingParamCounts.ts","time":166,"edits":1,"cost":"5.69"},{"name":"tests/cases/compiler/privacyClassExtendsClauseDeclFile.ts","time":166,"edits":1,"cost":"5.69"},{"name":"tests/cases/fourslash/typeParameterListInQuickInfoAfterEdit.ts","time":166,"edits":1,"cost":"5.69"},{"name":"tests/cases/conformance/jsx/tsxAttributeResolution11.tsx","time":166,"edits":1,"cost":"5.69"},{"name":"tests/cases/conformance/functions/functionImplementations.ts","time":165,"edits":1,"cost":"5.69"},{"name":"tests/cases/fourslash/server/jsdocTypedefTag.ts","time":165,"edits":1,"cost":"5.69"},{"name":"tests/cases/compiler/privacyInterface.ts","time":165,"edits":1,"cost":"5.69"},{"name":"tests/cases/fourslash/server/jsdocCallbackTag.ts","time":165,"edits":1,"cost":"5.69"},{"name":"tests/cases/fourslash/server/completions01.ts","time":165,"edits":1,"cost":"5.69"},{"name":"tests/cases/fourslash/getOccurrencesTryCatchFinally.ts","time":165,"edits":1,"cost":"5.69"},{"name":"tests/cases/fourslash/memberListInWithBlock2.ts","time":165,"edits":1,"cost":"5.69"},{"name":"tests/cases/fourslash/codeFixUndeclaredPropertyNumericLiteral.ts","time":165,"edits":1,"cost":"5.69"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators01.ts","time":165,"edits":1,"cost":"5.69"},{"name":"tests/cases/fourslash/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.ts","time":165,"edits":1,"cost":"5.69"},{"name":"tests/cases/fourslash/typeArgCompletion.ts","time":165,"edits":1,"cost":"5.69"},{"name":"tests/cases/fourslash/renameObjectSpread.ts","time":165,"edits":1,"cost":"5.69"},{"name":"tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithProtecteds2.ts","time":165,"edits":1,"cost":"5.69"},{"name":"tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction2_es6.ts","time":165,"edits":1,"cost":"5.69"},{"name":"tests/cases/compiler/unusedSwitchStatement.ts","time":164,"edits":1,"cost":"5.68"},{"name":"tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts","time":164,"edits":1,"cost":"5.68"},{"name":"tests/cases/conformance/types/tuple/restTupleElements1.ts","time":164,"edits":1,"cost":"5.68"},{"name":"tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts","time":164,"edits":1,"cost":"5.68"},{"name":"tests/cases/conformance/types/mapped/mappedTypes4.ts","time":164,"edits":1,"cost":"5.68"},{"name":"tests/cases/fourslash/renameForDefaultExport03.ts","time":164,"edits":1,"cost":"5.68"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInFunctionLikeInTypeAlias.ts","time":164,"edits":1,"cost":"5.68"},{"name":"tests/cases/fourslash/constEnumsEmitOutputInMultipleFiles.ts","time":164,"edits":1,"cost":"5.68"},{"name":"tests/cases/fourslash/inheritedModuleMembersForClodule2.ts","time":164,"edits":1,"cost":"5.68"},{"name":"tests/cases/fourslash/findAllRefsGlobalModuleAugmentation.ts","time":164,"edits":1,"cost":"5.68"},{"name":"tests/cases/fourslash/contextualTypingReturnExpressions.ts","time":164,"edits":1,"cost":"5.68"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments.ts","time":164,"edits":1,"cost":"5.68"},{"name":"tests/cases/conformance/parser/ecmascript5/parserExportAsFunctionIdentifier.ts","time":164,"edits":1,"cost":"5.68"},{"name":"tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedEnums.ts","time":164,"edits":1,"cost":"5.68"},{"name":"tests/cases/compiler/shadowPrivateMembers.ts","time":164,"edits":1,"cost":"5.68"},{"name":"tests/cases/fourslash/jsSpecialAssignmentMerging.ts","time":327,"edits":2,"cost":"5.68"},{"name":"tests/cases/fourslash/getEditsForFileRename_preservePathEnding.ts","time":327,"edits":2,"cost":"5.68"},{"name":"tests/cases/fourslash/server/findAllRefsForStringLiteralTypes.ts","time":327,"edits":2,"cost":"5.68"},{"name":"tests/cases/project/rootDirectoryWithSourceRoot.json","time":163,"edits":1,"cost":"5.67"},{"name":"tests/cases/project/moduleIdentifier.json","time":163,"edits":1,"cost":"5.67"},{"name":"tests/cases/conformance/types/literal/enumLiteralTypes3.ts","time":163,"edits":1,"cost":"5.67"},{"name":"tests/cases/fourslash/codeFixUndeclaredPropertyObjectLiteralStrictNullChecks.ts","time":163,"edits":1,"cost":"5.67"},{"name":"tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts","time":163,"edits":1,"cost":"5.67"},{"name":"tests/cases/compiler/inferenceLimit.ts","time":163,"edits":1,"cost":"5.67"},{"name":"tests/cases/fourslash/getOccurrencesLoopBreakContinue4.ts","time":326,"edits":2,"cost":"5.67"},{"name":"tests/cases/fourslash/tsxRename3.ts","time":163,"edits":1,"cost":"5.67"},{"name":"tests/cases/fourslash/renameJsThisProperty01.ts","time":163,"edits":1,"cost":"5.67"},{"name":"tests/cases/fourslash/goToImplementationInterfaceMethod_01.ts","time":326,"edits":2,"cost":"5.67"},{"name":"tests/cases/fourslash/getJavaScriptCompletions13.ts","time":163,"edits":1,"cost":"5.67"},{"name":"tests/cases/conformance/expressions/functionCalls/callWithSpread.ts","time":163,"edits":1,"cost":"5.67"},{"name":"tests/cases/fourslash/findAllRefsObjectBindingElementPropertyName05.ts","time":163,"edits":1,"cost":"5.67"},{"name":"tests/cases/fourslash/goToImplementationInterface_06.ts","time":163,"edits":1,"cost":"5.67"},{"name":"tests/cases/fourslash/completionListCladule.ts","time":163,"edits":1,"cost":"5.67"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts","time":163,"edits":1,"cost":"5.67"},{"name":"tests/cases/fourslash/renameImportAndExportInDiffFiles.ts","time":162,"edits":1,"cost":"5.67"},{"name":"tests/cases/fourslash/server/jsdocTypedefTag1.ts","time":162,"edits":1,"cost":"5.67"},{"name":"tests/cases/fourslash/completionListInFunctionDeclaration.ts","time":162,"edits":1,"cost":"5.67"},{"name":"tests/cases/fourslash/server/navbar01.ts","time":162,"edits":1,"cost":"5.67"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts","time":162,"edits":1,"cost":"5.67"},{"name":"tests/cases/fourslash/completionForStringLiteral11.ts","time":162,"edits":1,"cost":"5.67"},{"name":"tests/cases/conformance/emitter/es5/asyncGenerators/emitter.asyncGenerators.objectLiteralMethods.es5.ts","time":162,"edits":1,"cost":"5.67"},{"name":"tests/cases/conformance/types/literal/stringEnumLiteralTypes1.ts","time":162,"edits":1,"cost":"5.67"},{"name":"tests/cases/fourslash/codeFixClassExtendAbstractSomePropertiesPresent.ts","time":162,"edits":1,"cost":"5.67"},{"name":"tests/cases/fourslash/renameLocationsForFunctionExpression02.ts","time":162,"edits":1,"cost":"5.67"},{"name":"tests/cases/fourslash/getJavaScriptCompletions10.ts","time":162,"edits":1,"cost":"5.67"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndEnumWithSameNameAndCommonRoot.ts","time":162,"edits":1,"cost":"5.67"},{"name":"tests/cases/fourslash/jsdocTypedefTagServices.ts","time":323,"edits":2,"cost":"5.67"},{"name":"tests/cases/fourslash/importNameCodeFixExistingImport6.ts","time":161,"edits":1,"cost":"5.66"},{"name":"tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFile.ts","time":161,"edits":1,"cost":"5.66"},{"name":"tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts","time":161,"edits":1,"cost":"5.66"},{"name":"tests/cases/fourslash/javaScriptPrototype2.ts","time":161,"edits":1,"cost":"5.66"},{"name":"tests/cases/fourslash/mergedDeclarations1.ts","time":161,"edits":1,"cost":"5.66"},{"name":"tests/cases/fourslash/getCompletionEntryDetails.ts","time":161,"edits":1,"cost":"5.66"},{"name":"tests/cases/fourslash/renameAliasExternalModule3.ts","time":161,"edits":1,"cost":"5.66"},{"name":"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport.ts","time":161,"edits":1,"cost":"5.66"},{"name":"tests/cases/fourslash/semanticClassificationInstantiatedModuleWithVariableOfSameName1.ts","time":161,"edits":1,"cost":"5.66"},{"name":"tests/cases/fourslash/quickInfoInInvalidIndexSignature.ts","time":161,"edits":1,"cost":"5.66"},{"name":"tests/cases/fourslash/goToDefinitionImplicitConstructor.ts","time":161,"edits":1,"cost":"5.66"},{"name":"tests/cases/fourslash/getOccurrencesPrivate2.ts","time":161,"edits":1,"cost":"5.66"},{"name":"tests/cases/fourslash/typeOfAFundule.ts","time":161,"edits":1,"cost":"5.66"},{"name":"tests/cases/compiler/thisExpressionOfGenericObject.ts","time":161,"edits":1,"cost":"5.66"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType2_ES5.ts","time":161,"edits":1,"cost":"5.66"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments09_ES6.ts","time":161,"edits":1,"cost":"5.66"},{"name":"tests/cases/compiler/thisInSuperCall2.ts","time":161,"edits":1,"cost":"5.66"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of25.ts","time":161,"edits":1,"cost":"5.66"},{"name":"tests/cases/compiler/mappedTypeContextualTypesApplied.ts","time":321,"edits":2,"cost":"5.66"},{"name":"tests/cases/conformance/types/mapped/mappedTypes2.ts","time":160,"edits":1,"cost":"5.66"},{"name":"tests/cases/fourslash/signatureHelpFilteredTriggers02.ts","time":320,"edits":2,"cost":"5.66"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignatures.ts","time":160,"edits":1,"cost":"5.66"},{"name":"tests/cases/fourslash/todoComments7.ts","time":160,"edits":1,"cost":"5.66"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.ts","time":160,"edits":1,"cost":"5.66"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts","time":160,"edits":1,"cost":"5.66"},{"name":"tests/cases/fourslash/unusedImports6FS.ts","time":160,"edits":1,"cost":"5.66"},{"name":"tests/cases/fourslash/server/jsdocParamTagSpecialKeywords.ts","time":160,"edits":1,"cost":"5.66"},{"name":"tests/cases/fourslash/quickInfoForAliasedGeneric.ts","time":160,"edits":1,"cost":"5.66"},{"name":"tests/cases/fourslash/unknownVariableErrorRecovery.ts","time":160,"edits":1,"cost":"5.66"},{"name":"tests/cases/compiler/genericWithOpenTypeParameters1.ts","time":160,"edits":1,"cost":"5.66"},{"name":"tests/cases/fourslash/quickInfoForObjectBindingElementName01.ts","time":160,"edits":1,"cost":"5.66"},{"name":"tests/cases/fourslash/incrementalResolveConstructorDeclaration.ts","time":160,"edits":1,"cost":"5.66"},{"name":"tests/cases/fourslash/todoComments10.ts","time":160,"edits":1,"cost":"5.66"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of37.ts","time":160,"edits":1,"cost":"5.66"},{"name":"tests/cases/fourslash/tripleSlashRefPathCompletionBackandForwardSlash.ts","time":319,"edits":2,"cost":"5.65"},{"name":"tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts","time":159,"edits":1,"cost":"5.65"},{"name":"tests/cases/fourslash/importNameCodeFixExistingImport11.ts","time":159,"edits":1,"cost":"5.65"},{"name":"tests/cases/fourslash/completionListBuilderLocations_parameters.ts","time":159,"edits":1,"cost":"5.65"},{"name":"tests/cases/fourslash/completionListInUnclosedForLoop02.ts","time":159,"edits":1,"cost":"5.65"},{"name":"tests/cases/fourslash/findAllRefsWithLeadingUnderscoreNames7.ts","time":159,"edits":1,"cost":"5.65"},{"name":"tests/cases/fourslash/completionListInUnclosedTemplate02.ts","time":159,"edits":1,"cost":"5.65"},{"name":"tests/cases/conformance/externalModules/globalAugmentationModuleResolution.ts","time":159,"edits":1,"cost":"5.65"},{"name":"tests/cases/fourslash/getEmitOutputWithEmitterErrors2.ts","time":159,"edits":1,"cost":"5.65"},{"name":"tests/cases/compiler/genericReturnTypeFromGetter1.ts","time":159,"edits":1,"cost":"5.65"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.ts","time":159,"edits":1,"cost":"5.65"},{"name":"tests/cases/conformance/async/es6/asyncConstructor_es6.ts","time":159,"edits":1,"cost":"5.65"},{"name":"tests/cases/fourslash/refactorExtractType26.ts","time":317,"edits":2,"cost":"5.65"},{"name":"tests/cases/conformance/salsa/typeFromParamTagForFunction.ts","time":317,"edits":2,"cost":"5.65"},{"name":"tests/cases/fourslash/findAllRefsInheritedProperties2.ts","time":317,"edits":2,"cost":"5.65"},{"name":"tests/cases/fourslash/quickInfoOnNewKeyword01.ts","time":316,"edits":2,"cost":"5.64"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInFunction.ts","time":158,"edits":1,"cost":"5.64"},{"name":"tests/cases/fourslash/getEmitOutputSourceMap.ts","time":158,"edits":1,"cost":"5.64"},{"name":"tests/cases/fourslash/server/implementation01.ts","time":158,"edits":1,"cost":"5.64"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsFunction.ts","time":158,"edits":1,"cost":"5.64"},{"name":"tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts","time":158,"edits":1,"cost":"5.64"},{"name":"tests/cases/fourslash/semanticClassificationClassExpression.ts","time":158,"edits":1,"cost":"5.64"},{"name":"tests/cases/fourslash/goToImplementationInterface_08.ts","time":316,"edits":2,"cost":"5.64"},{"name":"tests/cases/fourslash/genericTypeParamUnrelatedToArguments1.ts","time":158,"edits":1,"cost":"5.64"},{"name":"tests/cases/fourslash/codeFixInferFromUsageAlwaysInferJS.ts","time":316,"edits":2,"cost":"5.64"},{"name":"tests/cases/fourslash/extract-method9.ts","time":158,"edits":1,"cost":"5.64"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess_js_6.ts","time":158,"edits":1,"cost":"5.64"},{"name":"tests/cases/fourslash/extract-method-not-for-empty.ts","time":158,"edits":1,"cost":"5.64"},{"name":"tests/cases/fourslash/codeFixUndeclaredClassInstance.ts","time":158,"edits":1,"cost":"5.64"},{"name":"tests/cases/fourslash/shims-pp/getSemanticClassifications.ts","time":158,"edits":1,"cost":"5.64"},{"name":"tests/cases/fourslash/completionListInClosedObjectTypeLiteralInSignature02.ts","time":158,"edits":1,"cost":"5.64"},{"name":"tests/cases/conformance/decorators/class/method/decoratorOnClassMethod12.ts","time":158,"edits":1,"cost":"5.64"},{"name":"tests/cases/fourslash/importNameCodeFixExistingImport10.ts","time":158,"edits":1,"cost":"5.64"},{"name":"tests/cases/conformance/types/thisType/thisTypeInAccessors.ts","time":158,"edits":1,"cost":"5.64"},{"name":"tests/cases/compiler/constraintsThatReferenceOtherContstraints1.ts","time":158,"edits":1,"cost":"5.64"},{"name":"tests/cases/fourslash/completionsStringsWithTriggerCharacter.ts","time":315,"edits":2,"cost":"5.64"},{"name":"unittests:: tsc-watch:: emit with outFile or out setting","time":157,"edits":1,"cost":"5.64"},{"name":"tests/cases/project/invalidRootFile.json","time":157,"edits":1,"cost":"5.64"},{"name":"tests/cases/conformance/types/union/discriminatedUnionTypes1.ts","time":157,"edits":1,"cost":"5.64"},{"name":"tests/cases/fourslash/getOccurrencesIsDefinitionOfFunction.ts","time":157,"edits":1,"cost":"5.64"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit3.ts","time":157,"edits":1,"cost":"5.64"},{"name":"tests/cases/fourslash/findAllRefsParameterPropertyDeclaration3.ts","time":157,"edits":1,"cost":"5.64"},{"name":"tests/cases/fourslash/goToDefinitionAmbiants.ts","time":157,"edits":1,"cost":"5.64"},{"name":"tests/cases/compiler/withExportDecl.ts","time":157,"edits":1,"cost":"5.64"},{"name":"tests/cases/fourslash/getOccurrencesLoopBreakContinue6.ts","time":157,"edits":1,"cost":"5.64"},{"name":"tests/cases/fourslash/goToDefinitionThis.ts","time":157,"edits":1,"cost":"5.64"},{"name":"tests/cases/fourslash/unusedMethodInClass3.ts","time":157,"edits":1,"cost":"5.64"},{"name":"tests/cases/compiler/escapedIdentifiers.ts","time":157,"edits":1,"cost":"5.64"},{"name":"tests/cases/fourslash/completionListAtIdentifierDefinitionLocations_enumMembers2.ts","time":157,"edits":1,"cost":"5.64"},{"name":"tests/cases/fourslash/unusedTypeParametersInLambda1.ts","time":157,"edits":1,"cost":"5.64"},{"name":"tests/cases/fourslash/renameCommentsAndStrings3.ts","time":157,"edits":1,"cost":"5.64"},{"name":"tests/cases/compiler/instantiateContextualTypes.ts","time":313,"edits":2,"cost":"5.63"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsClassMethod.ts","time":156,"edits":1,"cost":"5.63"},{"name":"tests/cases/fourslash/tsxCompletion3.ts","time":156,"edits":1,"cost":"5.63"},{"name":"tests/cases/conformance/expressions/functions/contextuallyTypedIifeStrict.ts","time":156,"edits":1,"cost":"5.63"},{"name":"tests/cases/fourslash/completionListAfterRegularExpressionLiteral01.ts","time":156,"edits":1,"cost":"5.63"},{"name":"tests/cases/fourslash/renameAlias2.ts","time":156,"edits":1,"cost":"5.63"},{"name":"tests/cases/compiler/enumAssignmentCompat.ts","time":156,"edits":1,"cost":"5.63"},{"name":"tests/cases/fourslash/incrementalUpdateToClassImplementingGenericClass.ts","time":156,"edits":1,"cost":"5.63"},{"name":"tests/cases/fourslash/getDeclarationDiagnostics.ts","time":156,"edits":1,"cost":"5.63"},{"name":"tests/cases/fourslash/renameParameterPropertyDeclaration1.ts","time":156,"edits":1,"cost":"5.63"},{"name":"tests/cases/conformance/types/rest/objectRestParameter.ts","time":156,"edits":1,"cost":"5.63"},{"name":"tests/cases/compiler/superCallInNonStaticMethod.ts","time":156,"edits":1,"cost":"5.63"},{"name":"tests/cases/compiler/extBaseClass1.ts","time":156,"edits":1,"cost":"5.63"},{"name":"tests/cases/conformance/es6/destructuring/destructuringObjectBindingPatternAndAssignment5.ts","time":156,"edits":1,"cost":"5.63"},{"name":"tests/cases/fourslash/codefixEnableExperimentalDecorators_missingCompilerOptionsInJsconfig.ts","time":310,"edits":2,"cost":"5.62"},{"name":"tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts","time":310,"edits":2,"cost":"5.62"},{"name":"tests/cases/fourslash/constQuickInfoAndCompletionList.ts","time":155,"edits":1,"cost":"5.62"},{"name":"tests/cases/fourslash/convertFunctionToEs6Class_falsePositive.ts","time":155,"edits":1,"cost":"5.62"},{"name":"tests/cases/fourslash/memberListInWithBlock3.ts","time":155,"edits":1,"cost":"5.62"},{"name":"tests/cases/fourslash/importNameCodeFix_endingPreference.ts","time":310,"edits":2,"cost":"5.62"},{"name":"tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithStringAndEveryType.ts","time":155,"edits":1,"cost":"5.62"},{"name":"tests/cases/fourslash/tsxCompletion4.ts","time":155,"edits":1,"cost":"5.62"},{"name":"tests/cases/fourslash/getEmitOutputDeclarationMultiFiles.ts","time":155,"edits":1,"cost":"5.62"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplatesNegatives2.ts","time":155,"edits":1,"cost":"5.62"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserForInStatement7.ts","time":155,"edits":1,"cost":"5.62"},{"name":"tests/cases/compiler/propertyAccessibility1.ts","time":155,"edits":1,"cost":"5.62"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardsDefeat.ts","time":155,"edits":1,"cost":"5.62"},{"name":"tests/cases/compiler/shadowingViaLocalValue.ts","time":155,"edits":1,"cost":"5.62"},{"name":"tests/cases/compiler/anyIsAssignableToVoid.ts","time":155,"edits":1,"cost":"5.62"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplatesNegatives4.ts","time":154,"edits":1,"cost":"5.62"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts","time":154,"edits":1,"cost":"5.62"},{"name":"tests/cases/fourslash/letQuickInfoAndCompletionList.ts","time":154,"edits":1,"cost":"5.62"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceMultipleImplements1.ts","time":154,"edits":1,"cost":"5.62"},{"name":"tests/cases/fourslash/completionListInUnclosedDeleteExpression02.ts","time":154,"edits":1,"cost":"5.62"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures5.ts","time":154,"edits":1,"cost":"5.62"},{"name":"tests/cases/fourslash/referencesForGlobals4.ts","time":154,"edits":1,"cost":"5.62"},{"name":"tests/cases/fourslash/typeOfThisInStatics.ts","time":154,"edits":1,"cost":"5.62"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts","time":154,"edits":1,"cost":"5.62"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsLet.ts","time":154,"edits":1,"cost":"5.62"},{"name":"tests/cases/fourslash/signatureHelpOnNestedOverloads.ts","time":154,"edits":1,"cost":"5.62"},{"name":"tests/cases/fourslash/completionListAfterSpreadOperator01.ts","time":154,"edits":1,"cost":"5.62"},{"name":"tests/cases/compiler/classSideInheritance3.ts","time":154,"edits":1,"cost":"5.62"},{"name":"tests/cases/fourslash/recursiveClassReference.ts","time":154,"edits":1,"cost":"5.62"},{"name":"tests/cases/fourslash/completionListSuperMembers.ts","time":154,"edits":1,"cost":"5.62"},{"name":"tests/cases/fourslash/signatureHelpWithUnknown.ts","time":154,"edits":1,"cost":"5.62"},{"name":"tests/cases/compiler/parseCommaSeparatedNewlineNumber.ts","time":154,"edits":1,"cost":"5.62"},{"name":"tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnumDeclaration5.ts","time":154,"edits":1,"cost":"5.62"},{"name":"tests/cases/compiler/instantiatedReturnTypeContravariance.ts","time":154,"edits":1,"cost":"5.62"},{"name":"tests/cases/compiler/voidConstructor.ts","time":154,"edits":1,"cost":"5.62"},{"name":"tests/cases/compiler/propTypeValidatorInference.ts","time":307,"edits":2,"cost":"5.61"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_tupleRestParam.ts","time":306,"edits":2,"cost":"5.61"},{"name":"tests/cases/compiler/controlFlowForCatchAndFinally.ts","time":306,"edits":2,"cost":"5.61"},{"name":"tests/cases/project/jsFileCompilationSameNameFilesSpecifiedWithAllowJs.json","time":153,"edits":1,"cost":"5.61"},{"name":"tests/cases/fourslash/signatureHelpOnSuperWhenMembersAreNotResolved.ts","time":153,"edits":1,"cost":"5.61"},{"name":"tests/cases/conformance/expressions/arrayLiterals/arrayLiterals2ES6.ts","time":153,"edits":1,"cost":"5.61"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionInCJS5.ts","time":153,"edits":1,"cost":"5.61"},{"name":"tests/cases/fourslash/moduleEnumModule.ts","time":153,"edits":1,"cost":"5.61"},{"name":"tests/cases/fourslash/goToDefinitionUnionTypeProperty3.ts","time":153,"edits":1,"cost":"5.61"},{"name":"tests/cases/fourslash/functionRenamingErrorRecovery.ts","time":153,"edits":1,"cost":"5.61"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts","time":153,"edits":1,"cost":"5.61"},{"name":"tests/cases/fourslash/extract-method11.ts","time":153,"edits":1,"cost":"5.61"},{"name":"tests/cases/compiler/constDeclarations2.ts","time":153,"edits":1,"cost":"5.61"},{"name":"tests/cases/fourslash/extendInterfaceOverloadedMethod.ts","time":153,"edits":1,"cost":"5.61"},{"name":"tests/cases/fourslash/codeFixConstructorForDerivedNeedSuperCall_all.ts","time":153,"edits":1,"cost":"5.61"},{"name":"tests/cases/fourslash/superInDerivedTypeOfGenericWithStatics.ts","time":153,"edits":1,"cost":"5.61"},{"name":"tests/cases/fourslash/tripleSlashRefPathCompletionAbsolutePaths.ts","time":153,"edits":1,"cost":"5.61"},{"name":"tests/cases/fourslash/completionListInClassExpressionWithTypeParameter.ts","time":153,"edits":1,"cost":"5.61"},{"name":"tests/cases/conformance/typings/typingsLookup4.ts","time":153,"edits":1,"cost":"5.61"},{"name":"tests/cases/fourslash/completionListInUnclosedCommaExpression01.ts","time":153,"edits":1,"cost":"5.61"},{"name":"tests/cases/fourslash/memberListAfterSingleDot.ts","time":153,"edits":1,"cost":"5.61"},{"name":"tests/cases/conformance/parser/ecmascript5/parserS12.11_A3_T4.ts","time":153,"edits":1,"cost":"5.61"},{"name":"tests/cases/fourslash/quickInfoTypeAliasDefinedInDifferentFile.ts","time":305,"edits":2,"cost":"5.61"},{"name":"tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.objectLiteralMethods.es2018.ts","time":152,"edits":1,"cost":"5.61"},{"name":"tests/cases/fourslash/quickInfoForObjectBindingElementPropertyName04.ts","time":152,"edits":1,"cost":"5.61"},{"name":"tests/cases/fourslash/server/renameInConfiguredProject.ts","time":152,"edits":1,"cost":"5.61"},{"name":"tests/cases/compiler/privacyClass.ts","time":152,"edits":1,"cost":"5.61"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplatesWithOverloadedTags3.ts","time":152,"edits":1,"cost":"5.61"},{"name":"tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditionIsNumberType.ts","time":152,"edits":1,"cost":"5.61"},{"name":"tests/cases/fourslash/quickInfoForContextuallyTypedFunctionInReturnStatement.ts","time":152,"edits":1,"cost":"5.61"},{"name":"tests/cases/fourslash/genericSignaturesAreProperlyCleaned.ts","time":152,"edits":1,"cost":"5.61"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPattern2.ts","time":152,"edits":1,"cost":"5.61"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings03_ES6.ts","time":152,"edits":1,"cost":"5.61"},{"name":"unittests:: tsserver:: typingsInstaller:: recomputing resolutions of unresolved imports","time":151,"edits":1,"cost":"5.60"},{"name":"tests/cases/project/moduleMergingOrdering2.json","time":151,"edits":1,"cost":"5.60"},{"name":"tests/cases/conformance/statements/ifDoWhileStatements/ifDoWhileStatements.ts","time":151,"edits":1,"cost":"5.60"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts","time":151,"edits":1,"cost":"5.60"},{"name":"tests/cases/fourslash/memberListOfVarInArrowExpression.ts","time":151,"edits":1,"cost":"5.60"},{"name":"tests/cases/fourslash/getOccurrencesSuper3.ts","time":151,"edits":1,"cost":"5.60"},{"name":"tests/cases/compiler/moduleAugmentationImportsAndExports6.ts","time":151,"edits":1,"cost":"5.60"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplatesNegatives3.ts","time":151,"edits":1,"cost":"5.60"},{"name":"tests/cases/conformance/emitter/es5/asyncGenerators/emitter.asyncGenerators.functionDeclarations.es5.ts","time":151,"edits":1,"cost":"5.60"},{"name":"tests/cases/fourslash/completionInTypeOf1.ts","time":151,"edits":1,"cost":"5.60"},{"name":"tests/cases/fourslash/findAllRefsCatchClause.ts","time":151,"edits":1,"cost":"5.60"},{"name":"tests/cases/fourslash/consistentContextualTypeErrorsAfterEdits.ts","time":151,"edits":1,"cost":"5.60"},{"name":"tests/cases/fourslash/renameUMDModuleAlias2.ts","time":151,"edits":1,"cost":"5.60"},{"name":"tests/cases/fourslash/exportDefaultClass.ts","time":151,"edits":1,"cost":"5.60"},{"name":"tests/cases/fourslash/javascriptModules21.ts","time":151,"edits":1,"cost":"5.60"},{"name":"tests/cases/fourslash/unusedImports5FS.ts","time":151,"edits":1,"cost":"5.60"},{"name":"tests/cases/fourslash/completionListInsideTargetTypedFunction.ts","time":151,"edits":1,"cost":"5.60"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.ts","time":151,"edits":1,"cost":"5.60"},{"name":"tests/cases/fourslash/completionsImport_augmentation.ts","time":452,"edits":3,"cost":"5.60"},{"name":"tests/cases/fourslash/refactorExtractType36.ts","time":301,"edits":2,"cost":"5.60"},{"name":"tests/cases/fourslash/commentsOverloads.ts","time":752,"edits":5,"cost":"5.59"},{"name":"unittests:: tsserver:: Project Errors are reported as appropriate","time":150,"edits":1,"cost":"5.59"},{"name":"unittests:: tsc-watch:: emit file content","time":150,"edits":1,"cost":"5.59"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateT.ts","time":150,"edits":1,"cost":"5.59"},{"name":"tests/cases/fourslash/completionWithNamespaceInsideFunction.ts","time":150,"edits":1,"cost":"5.59"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericContextualTypes1.ts","time":300,"edits":2,"cost":"5.59"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsLiteralLikeNames01.ts","time":150,"edits":1,"cost":"5.59"},{"name":"tests/cases/compiler/declFileImportModuleWithExportAssignment.ts","time":150,"edits":1,"cost":"5.59"},{"name":"tests/cases/fourslash/genericWithSpecializedProperties1.ts","time":150,"edits":1,"cost":"5.59"},{"name":"tests/cases/fourslash/genericCallsWithOptionalParams1.ts","time":150,"edits":1,"cost":"5.59"},{"name":"tests/cases/fourslash/goToImplementationInterface_03.ts","time":150,"edits":1,"cost":"5.59"},{"name":"tests/cases/fourslash/ambientVariablesWithSameName.ts","time":150,"edits":1,"cost":"5.59"},{"name":"tests/cases/fourslash/goToImplementationInterface_00.ts","time":150,"edits":1,"cost":"5.59"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts","time":150,"edits":1,"cost":"5.59"},{"name":"tests/cases/conformance/es6/destructuring/missingAndExcessProperties.ts","time":150,"edits":1,"cost":"5.59"},{"name":"tests/cases/fourslash/importNameCodeFixExistingImport7.ts","time":150,"edits":1,"cost":"5.59"},{"name":"tests/cases/fourslash/completionListAtIdentifierDefinitionLocations_properties.ts","time":150,"edits":1,"cost":"5.59"},{"name":"tests/cases/compiler/checkJsFiles3.ts","time":150,"edits":1,"cost":"5.59"},{"name":"tests/cases/compiler/contextualTyping30.ts","time":150,"edits":1,"cost":"5.59"},{"name":"tests/cases/compiler/collisionExportsRequireAndAmbientClass.ts","time":150,"edits":1,"cost":"5.59"},{"name":"tests/cases/fourslash/incorrectJsDocObjectLiteralType.ts","time":299,"edits":2,"cost":"5.59"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_overloads.ts","time":149,"edits":1,"cost":"5.59"},{"name":"tests/cases/compiler/constEnums.ts","time":298,"edits":2,"cost":"5.59"},{"name":"tests/cases/compiler/jsxFactoryQualifiedName.ts","time":149,"edits":1,"cost":"5.59"},{"name":"tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints3.ts","time":149,"edits":1,"cost":"5.59"},{"name":"tests/cases/fourslash/shims-pp/goToTypeDefinition.ts","time":149,"edits":1,"cost":"5.59"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts","time":149,"edits":1,"cost":"5.59"},{"name":"tests/cases/compiler/moduleAugmentationsImports1.ts","time":149,"edits":1,"cost":"5.59"},{"name":"tests/cases/fourslash/goToDefinitionImportedNames5.ts","time":149,"edits":1,"cost":"5.59"},{"name":"tests/cases/fourslash/thisPredicateFunctionCompletions01.ts","time":149,"edits":1,"cost":"5.59"},{"name":"tests/cases/fourslash/getEmitOutputTsxFile_React.ts","time":149,"edits":1,"cost":"5.59"},{"name":"tests/cases/fourslash/completionListAfterRegularExpressionLiteral05.ts","time":149,"edits":1,"cost":"5.59"},{"name":"tests/cases/fourslash/invalidRestArgError.ts","time":149,"edits":1,"cost":"5.59"},{"name":"tests/cases/fourslash/multiModuleClodule1.ts","time":149,"edits":1,"cost":"5.59"},{"name":"tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts","time":149,"edits":1,"cost":"5.59"},{"name":"tests/cases/fourslash/getEmitOutputSourceMap2.ts","time":149,"edits":1,"cost":"5.59"},{"name":"tests/cases/fourslash/jsDocGenerics2.ts","time":149,"edits":1,"cost":"5.59"},{"name":"tests/cases/fourslash/numericPropertyNames.ts","time":149,"edits":1,"cost":"5.59"},{"name":"tests/cases/fourslash/quickInfoForTypeParameterInTypeAlias2.ts","time":149,"edits":1,"cost":"5.59"},{"name":"tests/cases/fourslash/assertContextualType.ts","time":149,"edits":1,"cost":"5.59"},{"name":"tests/cases/fourslash/goToDefinitionBuiltInTypes.ts","time":149,"edits":1,"cost":"5.59"},{"name":"tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es2017.ts","time":149,"edits":1,"cost":"5.59"},{"name":"tests/cases/compiler/optionalAccessorsInInterface1.ts","time":149,"edits":1,"cost":"5.59"},{"name":"tests/cases/conformance/es6/destructuring/destructuringCatch.ts","time":149,"edits":1,"cost":"5.59"},{"name":"tests/cases/fourslash/typeOfSymbol_localSymbolOfExport.ts","time":297,"edits":2,"cost":"5.58"},{"name":"tests/cases/conformance/types/mapped/mappedTypeErrors.ts","time":296,"edits":2,"cost":"5.58"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplatesWithOverloadedTags4.ts","time":148,"edits":1,"cost":"5.58"},{"name":"tests/cases/fourslash/externalModuleRefernceResolutionOrderInImportDeclaration.ts","time":148,"edits":1,"cost":"5.58"},{"name":"tests/cases/fourslash/documentHighlightAtInheritedProperties3.ts","time":148,"edits":1,"cost":"5.58"},{"name":"tests/cases/fourslash/unusedVariableInClass1.ts","time":148,"edits":1,"cost":"5.58"},{"name":"tests/cases/fourslash/referencesForNoContext.ts","time":148,"edits":1,"cost":"5.58"},{"name":"tests/cases/fourslash/completionListInExportClause01.ts","time":148,"edits":1,"cost":"5.58"},{"name":"tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTempalteString4ES6.ts","time":148,"edits":1,"cost":"5.58"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsExternalModuleAlias.ts","time":148,"edits":1,"cost":"5.58"},{"name":"tests/cases/compiler/doNotEmitTripleSlashCommentsOnNotEmittedNode.ts","time":148,"edits":1,"cost":"5.58"},{"name":"tests/cases/compiler/library_RegExpExecArraySlice.ts","time":148,"edits":1,"cost":"5.58"},{"name":"tests/cases/fourslash/unusedFunctionInNamespace2.ts","time":148,"edits":1,"cost":"5.58"},{"name":"tests/cases/conformance/es6/templates/templateStringTermination4.ts","time":148,"edits":1,"cost":"5.58"},{"name":"tests/cases/compiler/SystemModuleForStatementNoInitializer.ts","time":148,"edits":1,"cost":"5.58"},{"name":"tests/cases/conformance/types/typeRelationships/recursiveTypes/nominalSubtypeCheckOfTypeParameter.ts","time":148,"edits":1,"cost":"5.58"},{"name":"tests/cases/conformance/es6/templates/templateStringInUnaryPlus.ts","time":148,"edits":1,"cost":"5.58"},{"name":"tests/cases/compiler/captureSuperPropertyAccessInSuperCall01.ts","time":148,"edits":1,"cost":"5.58"},{"name":"tests/cases/fourslash/commentsModules.ts","time":735,"edits":5,"cost":"5.57"},{"name":"tests/cases/fourslash/signatureHelpBeforeSemicolon1.ts","time":147,"edits":1,"cost":"5.57"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsLocalFunction.ts","time":147,"edits":1,"cost":"5.57"},{"name":"tests/cases/fourslash/referencesForClassMembersExtendingGenericClass.ts","time":588,"edits":4,"cost":"5.57"},{"name":"tests/cases/fourslash/forwardReference.ts","time":147,"edits":1,"cost":"5.57"},{"name":"tests/cases/fourslash/getEmitOutputSourceRootMultiFiles.ts","time":147,"edits":1,"cost":"5.57"},{"name":"tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts","time":147,"edits":1,"cost":"5.57"},{"name":"tests/cases/compiler/enumAssignmentCompat3.ts","time":147,"edits":1,"cost":"5.57"},{"name":"tests/cases/fourslash/thisPredicateFunctionCompletions02.ts","time":147,"edits":1,"cost":"5.57"},{"name":"tests/cases/fourslash/getOccurrencesPublic2.ts","time":147,"edits":1,"cost":"5.57"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplatesIncomplete8.ts","time":147,"edits":1,"cost":"5.57"},{"name":"tests/cases/conformance/expressions/functionCalls/callWithSpreadES6.ts","time":147,"edits":1,"cost":"5.57"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionAsyncES3UMD.ts","time":147,"edits":1,"cost":"5.57"},{"name":"tests/cases/fourslash/codeFixUndeclaredIndexSignatureNumericLiteral.ts","time":147,"edits":1,"cost":"5.57"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates12_ES5.ts","time":147,"edits":1,"cost":"5.57"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts","time":147,"edits":1,"cost":"5.57"},{"name":"tests/cases/compiler/outModuleConcatES6.ts","time":147,"edits":1,"cost":"5.57"},{"name":"tests/cases/fourslash/quickInfoMeaning.ts","time":293,"edits":2,"cost":"5.57"},{"name":"tests/cases/fourslash/jsDocFunctionSignatures3.ts","time":146,"edits":1,"cost":"5.56"},{"name":"tests/cases/fourslash/enumAddition.ts","time":146,"edits":1,"cost":"5.56"},{"name":"tests/cases/fourslash/unusedVariableInForLoop3FS.ts","time":146,"edits":1,"cost":"5.56"},{"name":"tests/cases/fourslash/completionListInObjectBindingPattern10.ts","time":146,"edits":1,"cost":"5.56"},{"name":"tests/cases/fourslash/quickInfoInWithBlock.ts","time":146,"edits":1,"cost":"5.56"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringVariableStatementArrayBindingPattern2.ts","time":146,"edits":1,"cost":"5.56"},{"name":"tests/cases/fourslash/findAllRefsForStringLiteralTypes.ts","time":146,"edits":1,"cost":"5.56"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionInSystem2.ts","time":146,"edits":1,"cost":"5.56"},{"name":"tests/cases/compiler/taggedTemplatesWithIncompleteNoSubstitutionTemplate1.ts","time":146,"edits":1,"cost":"5.56"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/identicalCallSignatures3.ts","time":146,"edits":1,"cost":"5.56"},{"name":"tests/cases/fourslash/getOccurrencesSuper.ts","time":291,"edits":2,"cost":"5.56"},{"name":"tests/cases/conformance/jsx/correctlyMarkAliasAsReferences3.tsx","time":581,"edits":4,"cost":"5.56"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardsInClassAccessors.ts","time":145,"edits":1,"cost":"5.56"},{"name":"tests/cases/compiler/declFileTypeAnnotationUnionType.ts","time":145,"edits":1,"cost":"5.56"},{"name":"tests/cases/fourslash/instanceTypesForGenericType1.ts","time":145,"edits":1,"cost":"5.56"},{"name":"tests/cases/fourslash/unusedMethodInClass2.ts","time":145,"edits":1,"cost":"5.56"},{"name":"tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts","time":145,"edits":1,"cost":"5.56"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsParameters.ts","time":145,"edits":1,"cost":"5.56"},{"name":"tests/cases/fourslash/getOccurrencesClassExpressionConstructor.ts","time":145,"edits":1,"cost":"5.56"},{"name":"tests/cases/fourslash/codeFixClassSuperMustPrecedeThisAccess_all.ts","time":145,"edits":1,"cost":"5.56"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportNodeModules0.ts","time":145,"edits":1,"cost":"5.56"},{"name":"tests/cases/fourslash/goToImplementationThis_00.ts","time":145,"edits":1,"cost":"5.56"},{"name":"tests/cases/conformance/enums/enumMerging.ts","time":145,"edits":1,"cost":"5.56"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplates3.ts","time":145,"edits":1,"cost":"5.56"},{"name":"tests/cases/fourslash/tsxCompletion6.ts","time":145,"edits":1,"cost":"5.56"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames20_ES6.ts","time":145,"edits":1,"cost":"5.56"},{"name":"tests/cases/compiler/multiModuleClodule1.ts","time":145,"edits":1,"cost":"5.56"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportPaths0.ts","time":433,"edits":3,"cost":"5.55"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_importedFunction6.ts","time":288,"edits":2,"cost":"5.55"},{"name":"tests/cases/fourslash/unusedInterfaceInNamespace1.ts","time":144,"edits":1,"cost":"5.55"},{"name":"tests/cases/fourslash/codeFixAddConvertToUnknownForNonOverlappingTypes_all.ts","time":288,"edits":2,"cost":"5.55"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment8.ts","time":144,"edits":1,"cost":"5.55"},{"name":"tests/cases/fourslash/completionListInArrowFunctionInUnclosedCallSite01.ts","time":144,"edits":1,"cost":"5.55"},{"name":"tests/cases/fourslash/completionListInClosedFunction04.ts","time":144,"edits":1,"cost":"5.55"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsIife.ts","time":144,"edits":1,"cost":"5.55"},{"name":"tests/cases/compiler/es6ModuleConstEnumDeclaration.ts","time":144,"edits":1,"cost":"5.55"},{"name":"tests/cases/fourslash/completionListAtIdentifierDefinitionLocations_functions.ts","time":144,"edits":1,"cost":"5.55"},{"name":"tests/cases/fourslash/completionListAtNodeBoundary.ts","time":144,"edits":1,"cost":"5.55"},{"name":"tests/cases/fourslash/referencesInComment.ts","time":144,"edits":1,"cost":"5.55"},{"name":"tests/cases/fourslash/completionListInUnclosedIndexSignature01.ts","time":144,"edits":1,"cost":"5.55"},{"name":"tests/cases/conformance/types/typeParameters/typeArgumentLists/wrappedAndRecursiveConstraints2.ts","time":144,"edits":1,"cost":"5.55"},{"name":"tests/cases/fourslash/derivedTypeIndexerWithGenericConstraints.ts","time":144,"edits":1,"cost":"5.55"},{"name":"tests/cases/fourslash/breakpointValidationLet.ts","time":144,"edits":1,"cost":"5.55"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportFile4.ts","time":144,"edits":1,"cost":"5.55"},{"name":"tests/cases/conformance/jsx/tsxReactEmitWhitespace2.tsx","time":144,"edits":1,"cost":"5.55"},{"name":"tests/cases/compiler/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.ts","time":144,"edits":1,"cost":"5.55"},{"name":"tests/cases/conformance/parser/ecmascript5/FunctionDeclarations/parserFunctionDeclaration6.ts","time":144,"edits":1,"cost":"5.55"},{"name":"tests/cases/fourslash/codefixEnableExperimentalDecorators_disabledInCompilerOptionsInJsconfig.ts","time":286,"edits":2,"cost":"5.54"},{"name":"unittests:: tsbuild:: lateBoundSymbol:: interface is merged and contains late bound member","time":143,"edits":1,"cost":"5.54"},{"name":"tests/cases/fourslash/genericCombinatorWithConstraints1.ts","time":143,"edits":1,"cost":"5.54"},{"name":"tests/cases/compiler/typeName1.ts","time":143,"edits":1,"cost":"5.54"},{"name":"tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts","time":143,"edits":1,"cost":"5.54"},{"name":"tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.unicodeEscape.ts","time":143,"edits":1,"cost":"5.54"},{"name":"tests/cases/fourslash/shims/getPreProcessedFile.ts","time":143,"edits":1,"cost":"5.54"},{"name":"tests/cases/fourslash/renameObjectSpreadAssignment.ts","time":143,"edits":1,"cost":"5.54"},{"name":"tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments1.tsx","time":143,"edits":1,"cost":"5.54"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesAndTuples01.ts","time":143,"edits":1,"cost":"5.54"},{"name":"tests/cases/fourslash/referencesForLabel6.ts","time":143,"edits":1,"cost":"5.54"},{"name":"tests/cases/fourslash/objectLiteralCallSignatures.ts","time":143,"edits":1,"cost":"5.54"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts","time":143,"edits":1,"cost":"5.54"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignatures.ts","time":143,"edits":1,"cost":"5.54"},{"name":"tests/cases/fourslash/completionListOutsideOfForLoop01.ts","time":143,"edits":1,"cost":"5.54"},{"name":"tests/cases/fourslash/getEmitOutputWithDeclarationFile2.ts","time":143,"edits":1,"cost":"5.54"},{"name":"tests/cases/conformance/types/rest/genericRestParameters2.ts","time":286,"edits":2,"cost":"5.54"},{"name":"tests/cases/compiler/incompatibleTypes.ts","time":143,"edits":1,"cost":"5.54"},{"name":"tests/cases/fourslash/memberListInsideObjectLiterals.ts","time":143,"edits":1,"cost":"5.54"},{"name":"tests/cases/fourslash/memberListOnContextualThis.ts","time":143,"edits":1,"cost":"5.54"},{"name":"tests/cases/conformance/jsx/tsxAttributeResolution6.tsx","time":143,"edits":1,"cost":"5.54"},{"name":"tests/cases/fourslash/doubleUnderscoreCompletions.ts","time":143,"edits":1,"cost":"5.54"},{"name":"tests/cases/compiler/redeclarationOfVarWithGenericType.ts","time":143,"edits":1,"cost":"5.54"},{"name":"tests/cases/compiler/overloadingOnConstants2.ts","time":143,"edits":1,"cost":"5.54"},{"name":"tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithAnyOtherType.ts","time":143,"edits":1,"cost":"5.54"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment27.ts","time":286,"edits":2,"cost":"5.54"},{"name":"tests/cases/compiler/declarationMaps.ts","time":143,"edits":1,"cost":"5.54"},{"name":"tests/cases/fourslash/getJavaScriptCompletions12.ts","time":285,"edits":2,"cost":"5.54"},{"name":"tests/cases/compiler/capturedLetConstInLoop4.ts","time":142,"edits":1,"cost":"5.54"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance2.ts","time":142,"edits":1,"cost":"5.54"},{"name":"tests/cases/compiler/classdecl.ts","time":142,"edits":1,"cost":"5.54"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithStringIndexers.ts","time":142,"edits":1,"cost":"5.54"},{"name":"tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts","time":142,"edits":1,"cost":"5.54"},{"name":"tests/cases/fourslash/referencesForLabel.ts","time":142,"edits":1,"cost":"5.54"},{"name":"tests/cases/compiler/externalModuleImmutableBindings.ts","time":142,"edits":1,"cost":"5.54"},{"name":"tests/cases/fourslash/javaScriptModules13.ts","time":142,"edits":1,"cost":"5.54"},{"name":"tests/cases/compiler/declFileTypeAnnotationTypeLiteral.ts","time":142,"edits":1,"cost":"5.54"},{"name":"tests/cases/fourslash/unusedClassInNamespace4.ts","time":142,"edits":1,"cost":"5.54"},{"name":"tests/cases/fourslash/server/format01.ts","time":142,"edits":1,"cost":"5.54"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceIndexType.ts","time":142,"edits":1,"cost":"5.54"},{"name":"tests/cases/fourslash/referencesForIndexProperty3.ts","time":142,"edits":1,"cost":"5.54"},{"name":"tests/cases/fourslash/completionListErrorRecovery.ts","time":142,"edits":1,"cost":"5.54"},{"name":"tests/cases/fourslash/shims-pp/getTodoComments.ts","time":142,"edits":1,"cost":"5.54"},{"name":"tests/cases/fourslash/completionListForShorthandPropertyAssignment2.ts","time":142,"edits":1,"cost":"5.54"},{"name":"tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts","time":142,"edits":1,"cost":"5.54"},{"name":"tests/cases/conformance/types/spread/spreadUnion.ts","time":142,"edits":1,"cost":"5.54"},{"name":"tests/cases/compiler/literalsInComputedProperties1.ts","time":142,"edits":1,"cost":"5.54"},{"name":"tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts","time":142,"edits":1,"cost":"5.54"},{"name":"tests/cases/compiler/typeReferenceDirectives13.ts","time":142,"edits":1,"cost":"5.54"},{"name":"tests/cases/compiler/moduleVariableArrayIndexer.ts","time":142,"edits":1,"cost":"5.54"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts","time":142,"edits":1,"cost":"5.54"},{"name":"tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts","time":283,"edits":2,"cost":"5.53"},{"name":"unittests:: tsserver:: project telemetry","time":141,"edits":1,"cost":"5.53"},{"name":"tests/cases/compiler/capturedLetConstInLoop7_ES6.ts","time":141,"edits":1,"cost":"5.53"},{"name":"tests/cases/fourslash/goToDefinitionImportedNames6.ts","time":141,"edits":1,"cost":"5.53"},{"name":"tests/cases/fourslash/getOccurrencesPropertyInAliasedInterface.ts","time":141,"edits":1,"cost":"5.53"},{"name":"tests/cases/fourslash/renameContextuallyTypedProperties.ts","time":141,"edits":1,"cost":"5.53"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionInAMD4.ts","time":141,"edits":1,"cost":"5.53"},{"name":"tests/cases/fourslash/quickInfoOnConstructorWithGenericParameter.ts","time":141,"edits":1,"cost":"5.53"},{"name":"tests/cases/fourslash/javaScriptPrototype1.ts","time":282,"edits":2,"cost":"5.53"},{"name":"tests/cases/fourslash/findAllRefsInsideTemplates2.ts","time":141,"edits":1,"cost":"5.53"},{"name":"tests/cases/fourslash/findReferencesJSXTagName2.ts","time":141,"edits":1,"cost":"5.53"},{"name":"tests/cases/compiler/assign1.ts","time":141,"edits":1,"cost":"5.53"},{"name":"tests/cases/fourslash/codeFixCalledES2015Import6.ts","time":141,"edits":1,"cost":"5.53"},{"name":"tests/cases/fourslash/getOccurrencesIsDefinitionOfArrowFunction.ts","time":141,"edits":1,"cost":"5.53"},{"name":"tests/cases/fourslash/completionListInObjectBindingPattern04.ts","time":141,"edits":1,"cost":"5.53"},{"name":"tests/cases/conformance/controlFlow/controlFlowIterationErrors.ts","time":141,"edits":1,"cost":"5.53"},{"name":"tests/cases/fourslash/contextualTypingOfArrayLiterals1.ts","time":141,"edits":1,"cost":"5.53"},{"name":"tests/cases/conformance/decorators/class/method/decoratorOnClassMethodOverload2.ts","time":141,"edits":1,"cost":"5.53"},{"name":"tests/cases/fourslash/codeFixExtendsInterfaceBecomesImplements_all.ts","time":141,"edits":1,"cost":"5.53"},{"name":"tests/cases/fourslash/goToDefinitionSameFile.ts","time":141,"edits":1,"cost":"5.53"},{"name":"tests/cases/compiler/collisionExportsRequireAndModule.ts","time":141,"edits":1,"cost":"5.53"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplatesWithOverloadedTags7.ts","time":141,"edits":1,"cost":"5.53"},{"name":"tests/cases/fourslash/findAllRefsForDefaultExport03.ts","time":282,"edits":2,"cost":"5.53"},{"name":"tests/cases/fourslash/completionListOnSuper.ts","time":141,"edits":1,"cost":"5.53"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesNoFix.ts","time":141,"edits":1,"cost":"5.53"},{"name":"tests/cases/fourslash/completionListInObjectBindingPattern12.ts","time":141,"edits":1,"cost":"5.53"},{"name":"tests/cases/compiler/commentOnDecoratedClassDeclaration.ts","time":141,"edits":1,"cost":"5.53"},{"name":"tests/cases/fourslash/completionAfterGlobalThis.ts","time":422,"edits":3,"cost":"5.53"},{"name":"tests/cases/fourslash/codeFixInferFromUsageRestParam.ts","time":281,"edits":2,"cost":"5.53"},{"name":"unittests:: tsbuild:: with rootDir of project reference in parentDirectory","time":140,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/findAllRefsInsideTemplates1.ts","time":140,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_exportEqualsClass.ts","time":140,"edits":1,"cost":"5.52"},{"name":"tests/cases/compiler/declarationEmitInferredTypeAlias4.ts","time":140,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/server/jsdocTypedefTagNavigateTo.ts","time":140,"edits":1,"cost":"5.52"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionES6UMD.ts","time":140,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/documentHighlightAtParameterPropertyDeclaration1.ts","time":140,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/completionInAugmentedClassModule.ts","time":140,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/memberListOfEnumInModule.ts","time":140,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsInterfaceMembers.ts","time":140,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess8.ts","time":140,"edits":1,"cost":"5.52"},{"name":"tests/cases/compiler/recursiveClassReferenceTest.ts","time":140,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/tsxCompletionInFunctionExpressionOfChildrenCallback.ts","time":140,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/completionListForShorthandPropertyAssignment.ts","time":140,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/semanticClassificationUninstantiatedModuleWithVariableOfSameName2.ts","time":140,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/getEmitOutputWithEarlySemanticErrors.ts","time":140,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/squiggleIllegalInterfaceExtension.ts","time":140,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/completionListOutsideOfClosedFunctionDeclaration01.ts","time":140,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/memberListOfClass.ts","time":140,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/server/rename01.ts","time":140,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/renameForDefaultExport07.ts","time":140,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/genericCombinators3.ts","time":140,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceCallSignature.ts","time":140,"edits":1,"cost":"5.52"},{"name":"tests/cases/conformance/externalModules/multipleExportDefault1.ts","time":140,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_varArrowFunction.ts","time":139,"edits":1,"cost":"5.52"},{"name":"tests/cases/compiler/objectFromEntries.ts","time":278,"edits":2,"cost":"5.52"},{"name":"tests/cases/fourslash/javaScriptClass4.ts","time":139,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsVar.ts","time":139,"edits":1,"cost":"5.52"},{"name":"tests/cases/compiler/capturedLetConstInLoop7.ts","time":139,"edits":1,"cost":"5.52"},{"name":"tests/cases/compiler/variableDeclaratorResolvedDuringContextualTyping.ts","time":139,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/importJsNodeModule2.ts","time":139,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/codeFixInferFromUsageExistingJSDoc.ts","time":278,"edits":2,"cost":"5.52"},{"name":"tests/cases/fourslash/server/occurrences02.ts","time":139,"edits":1,"cost":"5.52"},{"name":"tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexingResults.ts","time":139,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/importNameCodeFixExistingImport5.ts","time":139,"edits":1,"cost":"5.52"},{"name":"tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts","time":139,"edits":1,"cost":"5.52"},{"name":"tests/cases/conformance/es6/destructuring/destructuringVariableDeclaration1ES6.ts","time":139,"edits":1,"cost":"5.52"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts","time":139,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/todoComments8.ts","time":139,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess12.ts","time":278,"edits":2,"cost":"5.52"},{"name":"tests/cases/fourslash/getOccurrencesDeclare2.ts","time":139,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/quickInfoInObjectLiteral.ts","time":139,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/completionListAndMemberListOnCommentedWhiteSpace.ts","time":139,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/todoComments3.ts","time":139,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/completionInsideFunctionContainsArguments.ts","time":139,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/goToDefinitionUnionTypeProperty2.ts","time":139,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/codeFixClassImplementClassMemberAnonymousClass.ts","time":139,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/shims-pp/getQuickInfoAtPosition.ts","time":139,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/getJavaScriptGlobalCompletions1.ts","time":139,"edits":1,"cost":"5.52"},{"name":"tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode13.ts","time":139,"edits":1,"cost":"5.52"},{"name":"tests/cases/conformance/types/thisType/thisTypeInInterfaces.ts","time":139,"edits":1,"cost":"5.52"},{"name":"tests/cases/compiler/collisionSuperAndLocalFunctionInConstructor.ts","time":139,"edits":1,"cost":"5.52"},{"name":"tests/cases/fourslash/codeFixInferFromFunctionUsage.ts","time":277,"edits":2,"cost":"5.51"},{"name":"tests/cases/conformance/types/rest/genericRestParameters1.ts","time":414,"edits":3,"cost":"5.51"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionInSystem4.ts","time":138,"edits":1,"cost":"5.51"},{"name":"tests/cases/fourslash/jsdocNullableUnion.ts","time":138,"edits":1,"cost":"5.51"},{"name":"tests/cases/conformance/es6/modules/exportsAndImports3-es6.ts","time":138,"edits":1,"cost":"5.51"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers.ts","time":138,"edits":1,"cost":"5.51"},{"name":"tests/cases/compiler/capturedLetConstInLoop6.ts","time":138,"edits":1,"cost":"5.51"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionES6AMD.ts","time":138,"edits":1,"cost":"5.51"},{"name":"tests/cases/fourslash/quickInfoForUMDModuleAlias.ts","time":138,"edits":1,"cost":"5.51"},{"name":"tests/cases/fourslash/javaScriptModules17.ts","time":138,"edits":1,"cost":"5.51"},{"name":"tests/cases/fourslash/getOccurrencesStatic1.ts","time":138,"edits":1,"cost":"5.51"},{"name":"tests/cases/fourslash/tsxCompletion11.ts","time":138,"edits":1,"cost":"5.51"},{"name":"tests/cases/fourslash/tsxCompletion2.ts","time":138,"edits":1,"cost":"5.51"},{"name":"tests/cases/fourslash/goToDefinitionSimple.ts","time":138,"edits":1,"cost":"5.51"},{"name":"tests/cases/fourslash/documentHighlightAtInheritedProperties5.ts","time":138,"edits":1,"cost":"5.51"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments3.ts","time":138,"edits":1,"cost":"5.51"},{"name":"tests/cases/fourslash/renameJsThisProperty06.ts","time":138,"edits":1,"cost":"5.51"},{"name":"tests/cases/fourslash/codeFixDisableJsDiagnosticsInFile5.ts","time":138,"edits":1,"cost":"5.51"},{"name":"tests/cases/compiler/importDeclWithDeclareModifier.ts","time":138,"edits":1,"cost":"5.51"},{"name":"tests/cases/fourslash/completionListAfterFunction3.ts","time":138,"edits":1,"cost":"5.51"},{"name":"tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts","time":138,"edits":1,"cost":"5.51"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceQualifiedName.ts","time":138,"edits":1,"cost":"5.51"},{"name":"tests/cases/compiler/commentEmitWithCommentOnLastLine.ts","time":138,"edits":1,"cost":"5.51"},{"name":"tests/cases/compiler/transitiveTypeArgumentInference1.ts","time":138,"edits":1,"cost":"5.51"},{"name":"tests/cases/fourslash/completionForStringLiteralNonrelativeImport1.ts","time":275,"edits":2,"cost":"5.50"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_functionJSDoc.ts","time":274,"edits":2,"cost":"5.50"},{"name":"tests/cases/fourslash/codeFixAddMissingNew.ts","time":274,"edits":2,"cost":"5.50"},{"name":"tests/cases/fourslash/completionListForDerivedType1.ts","time":137,"edits":1,"cost":"5.50"},{"name":"tests/cases/fourslash/nameOrDottedNameClasses.ts","time":137,"edits":1,"cost":"5.50"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference2.ts","time":137,"edits":1,"cost":"5.50"},{"name":"tests/cases/conformance/salsa/inferringClassMembersFromAssignments.ts","time":274,"edits":2,"cost":"5.50"},{"name":"tests/cases/fourslash/shims-pp/getDefinitionAtPosition.ts","time":137,"edits":1,"cost":"5.50"},{"name":"tests/cases/fourslash/quickInfoOfGenericTypeAssertions1.ts","time":137,"edits":1,"cost":"5.50"},{"name":"tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts","time":137,"edits":1,"cost":"5.50"},{"name":"tests/cases/fourslash/renameJsThisProperty05.ts","time":137,"edits":1,"cost":"5.50"},{"name":"tests/cases/fourslash/completionListInTypeParameterOfTypeAlias3.ts","time":137,"edits":1,"cost":"5.50"},{"name":"tests/cases/fourslash/quickInfoOnProtectedConstructorCall.ts","time":137,"edits":1,"cost":"5.50"},{"name":"tests/cases/fourslash/goToDefinitionBuiltInValues.ts","time":137,"edits":1,"cost":"5.50"},{"name":"tests/cases/fourslash/renameStringPropertyNames.ts","time":137,"edits":1,"cost":"5.50"},{"name":"tests/cases/compiler/declarationEmitNameConflicts.ts","time":137,"edits":1,"cost":"5.50"},{"name":"tests/cases/compiler/conditionalExpressionNewLine2.ts","time":137,"edits":1,"cost":"5.50"},{"name":"tests/cases/compiler/misspelledJsDocTypedefTags.ts","time":137,"edits":1,"cost":"5.50"},{"name":"tests/cases/compiler/es6ClassTest4.ts","time":137,"edits":1,"cost":"5.50"},{"name":"tests/cases/compiler/narrowTypeByInstanceof.ts","time":137,"edits":1,"cost":"5.50"},{"name":"tests/cases/compiler/addMoreOverloadsToBaseSignature.ts","time":137,"edits":1,"cost":"5.50"},{"name":"tests/cases/fourslash/signatureHelp_contextual.ts","time":273,"edits":2,"cost":"5.50"},{"name":"tests/cases/conformance/types/spread/objectSpreadSetonlyAccessor.ts","time":273,"edits":2,"cost":"5.50"},{"name":"tests/cases/compiler/normalizedIntersectionTooComplex.ts","time":272,"edits":2,"cost":"5.49"},{"name":"tests/cases/fourslash/automaticConstructorToggling.ts","time":408,"edits":3,"cost":"5.49"},{"name":"tests/cases/conformance/es6/destructuring/destructuringVariableDeclaration1ES5.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/codeFixDisableJsDiagnosticsInFile7.ts","time":272,"edits":2,"cost":"5.49"},{"name":"tests/cases/fourslash/findAllRefsEnumMember.ts","time":272,"edits":2,"cost":"5.49"},{"name":"tests/cases/compiler/declFileTypeofInAnonymousType.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/unclosedStringLiteralErrorRecovery3.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/quickInfoOnThis3.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithNumericIndexers1.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/getEmitOutputWithSyntaxErrors.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/quickInfoOfLablledForStatementIterator.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/parameterWithNestedDestructuring.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/compiler/genericTypeArgumentInference1.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/compiler/arrayAssignmentTest1.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/compiler/asyncImportNestedYield.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration3ES6.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/quickInfoOnObjectLiteralWithAccessors.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceMethodThisAndSelfReference.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/quickInfoForShorthandProperty.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/unusedVariableInNamespace1.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/compiler/generics4NoError.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/shims/getSignatureHelpItems.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/jsDocGenerics1.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/contextualTypingFromTypeAssertion1.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/compiler/interMixingModulesInterfaces5.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserForStatement6.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/completionListInObjectBindingPattern05.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates16_ES6.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/compiler/exportDefaultVariable.ts","time":136,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_importedFunction2.ts","time":271,"edits":2,"cost":"5.49"},{"name":"tests/cases/fourslash/codeFixAddMissingNew2.ts","time":270,"edits":2,"cost":"5.49"},{"name":"tests/cases/fourslash/renameParameterPropertyDeclaration5.ts","time":135,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/completionListAtIdentifierDefinitionLocations_enumMembers.ts","time":135,"edits":1,"cost":"5.49"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.ts","time":135,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/genericInterfacesWithConstraints1.ts","time":135,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/getEmitOutputExternalModule2.ts","time":135,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/quickInfoForOverloadOnConst1.ts","time":135,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/returnTypeOfGenericFunction1.ts","time":135,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/getOccurrencesClassExpressionStatic.ts","time":135,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/codeFixCalledES2015Import9.ts","time":135,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/squiggleUnclosedStringLiteral.ts","time":135,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/overloadQuickInfo.ts","time":135,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/quickinfoForUnionProperty.ts","time":135,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/moveToNewFile_rangeInvalid.ts","time":135,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/completionEntryForShorthandPropertyAssignment.ts","time":135,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/shims/getImplementationAtPosition.ts","time":135,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/codeFixDisableJsDiagnosticsInFile4.ts","time":135,"edits":1,"cost":"5.49"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithCallSignatures2.ts","time":135,"edits":1,"cost":"5.49"},{"name":"tests/cases/compiler/defaultArgsInFunctionExpressions.ts","time":135,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/shims/getSemanticClassifications.ts","time":135,"edits":1,"cost":"5.49"},{"name":"tests/cases/conformance/types/literal/booleanLiteralTypes2.ts","time":135,"edits":1,"cost":"5.49"},{"name":"tests/cases/compiler/ParameterList4.ts","time":135,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/quickInfoExportAssignmentOfGenericInterface.ts","time":135,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/javascriptModules25.ts","time":135,"edits":1,"cost":"5.49"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution2.ts","time":135,"edits":1,"cost":"5.49"},{"name":"tests/cases/conformance/async/es5/awaitUnion_es5.ts","time":135,"edits":1,"cost":"5.49"},{"name":"tests/cases/fourslash/noImportCompletionsInOtherJavaScriptFile.ts","time":404,"edits":3,"cost":"5.48"},{"name":"tests/cases/compiler/dynamicNames.ts","time":269,"edits":2,"cost":"5.48"},{"name":"tests/cases/fourslash/jsDocAugmentsAndExtends.ts","time":538,"edits":4,"cost":"5.48"},{"name":"tests/cases/fourslash/refactorExtractType4.ts","time":268,"edits":2,"cost":"5.48"},{"name":"tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts","time":134,"edits":1,"cost":"5.48"},{"name":"tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration3ES5.ts","time":134,"edits":1,"cost":"5.48"},{"name":"tests/cases/conformance/types/rest/objectRestAssignment.ts","time":134,"edits":1,"cost":"5.48"},{"name":"tests/cases/compiler/controlFlowPropertyDeclarations.ts","time":134,"edits":1,"cost":"5.48"},{"name":"tests/cases/fourslash/quickInfoForTypeofParameter.ts","time":134,"edits":1,"cost":"5.48"},{"name":"tests/cases/fourslash/completionListFunctionExpression.ts","time":134,"edits":1,"cost":"5.48"},{"name":"tests/cases/compiler/es3-oldStyleOctalLiteralInEnums.ts","time":134,"edits":1,"cost":"5.48"},{"name":"tests/cases/fourslash/referencesForLabel4.ts","time":134,"edits":1,"cost":"5.48"},{"name":"tests/cases/fourslash/genericFunctionWithGenericParams1.ts","time":134,"edits":1,"cost":"5.48"},{"name":"tests/cases/fourslash/getJavaScriptCompletions1.ts","time":134,"edits":1,"cost":"5.48"},{"name":"tests/cases/fourslash/completionEntryForUnionMethod.ts","time":134,"edits":1,"cost":"5.48"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplates4.ts","time":134,"edits":1,"cost":"5.48"},{"name":"tests/cases/fourslash/getOccurrencesSuperNegatives.ts","time":134,"edits":1,"cost":"5.48"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsVarWithStringTypes01.ts","time":134,"edits":1,"cost":"5.48"},{"name":"tests/cases/fourslash/signatureHelpSimpleFunctionCall.ts","time":134,"edits":1,"cost":"5.48"},{"name":"tests/cases/fourslash/getJavaScriptQuickInfo6.ts","time":134,"edits":1,"cost":"5.48"},{"name":"tests/cases/conformance/types/literal/stringLiteralsWithSwitchStatements01.ts","time":134,"edits":1,"cost":"5.48"},{"name":"tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithTheSameNameButDifferentArity.ts","time":134,"edits":1,"cost":"5.48"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck59.ts","time":134,"edits":1,"cost":"5.48"},{"name":"tests/cases/compiler/missingReturnStatement1.ts","time":134,"edits":1,"cost":"5.48"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty54.ts","time":134,"edits":1,"cost":"5.48"},{"name":"tests/cases/compiler/nestedBlockScopedBindings14.ts","time":134,"edits":1,"cost":"5.48"},{"name":"tests/cases/fourslash/findAllRefsObjectBindingElementPropertyName07.ts","time":401,"edits":3,"cost":"5.48"},{"name":"tests/cases/fourslash/completionListGenericConstraints.ts","time":133,"edits":1,"cost":"5.47"},{"name":"tests/cases/compiler/declarationEmitNameConflicts3.ts","time":133,"edits":1,"cost":"5.47"},{"name":"tests/cases/compiler/arrayLiteralTypeInference.ts","time":133,"edits":1,"cost":"5.47"},{"name":"tests/cases/fourslash/referencesForInheritedProperties4.ts","time":266,"edits":2,"cost":"5.47"},{"name":"tests/cases/fourslash/unusedFunctionInNamespace3.ts","time":133,"edits":1,"cost":"5.47"},{"name":"tests/cases/fourslash/javaScriptModules12.ts","time":133,"edits":1,"cost":"5.47"},{"name":"tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts","time":133,"edits":1,"cost":"5.47"},{"name":"tests/cases/fourslash/moduleMembersOfGenericType.ts","time":133,"edits":1,"cost":"5.47"},{"name":"tests/cases/fourslash/javaScriptModules18.ts","time":133,"edits":1,"cost":"5.47"},{"name":"tests/cases/compiler/declarationEmitInferredTypeAlias8.ts","time":133,"edits":1,"cost":"5.47"},{"name":"tests/cases/fourslash/completionListInNamedFunctionExpression.ts","time":133,"edits":1,"cost":"5.47"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty27.ts","time":133,"edits":1,"cost":"5.47"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration15.ts","time":133,"edits":1,"cost":"5.47"},{"name":"tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration6.ts","time":133,"edits":1,"cost":"5.47"},{"name":"tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction8_es6.ts","time":133,"edits":1,"cost":"5.47"},{"name":"tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision2.ts","time":133,"edits":1,"cost":"5.47"},{"name":"tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts","time":398,"edits":3,"cost":"5.47"},{"name":"tests/cases/fourslash/codeFixAddMissingNew5.ts","time":265,"edits":2,"cost":"5.47"},{"name":"tests/cases/fourslash/refactorExtractType3.ts","time":264,"edits":2,"cost":"5.46"},{"name":"tests/cases/fourslash/refactorExtractType34.ts","time":264,"edits":2,"cost":"5.46"},{"name":"tests/cases/fourslash/completionTypeofExpressions.ts","time":264,"edits":2,"cost":"5.46"},{"name":"tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionExpressions.es2018.ts","time":132,"edits":1,"cost":"5.46"},{"name":"tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithAnyAndNumber.ts","time":132,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/referencesForFunctionParameter.ts","time":132,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/codeFixConstructorForDerivedNeedSuperCall.ts","time":132,"edits":1,"cost":"5.46"},{"name":"tests/cases/compiler/es5-asyncFunctionForOfStatements.ts","time":132,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/server/goToImplementation_inDifferentFiles.ts","time":132,"edits":1,"cost":"5.46"},{"name":"tests/cases/compiler/genericClassPropertyInheritanceSpecialization.ts","time":132,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/getOccurrencesThrow8.ts","time":132,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/quickInfoInFunctionTypeReference2.ts","time":132,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/completionBeforeSemanticDiagnosticsInArrowFunction1.ts","time":264,"edits":2,"cost":"5.46"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplatesIncomplete4.ts","time":132,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/qualifiedName_import-declaration-with-variable-entity-names.ts","time":132,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/completionListInTypeParameterOfTypeAlias1.ts","time":132,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/renameInheritedProperties4.ts","time":132,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/quickInfoInFunctionTypeReference.ts","time":132,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/unusedImports8FS.ts","time":132,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/unusedTypeParametersInLambda2.ts","time":132,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/completionListAtIdentifierDefinitionLocations_destructuring.ts","time":132,"edits":1,"cost":"5.46"},{"name":"tests/cases/compiler/recursiveLetConst.ts","time":132,"edits":1,"cost":"5.46"},{"name":"tests/cases/compiler/mappedTypeWithCombinedTypeMappers.ts","time":132,"edits":1,"cost":"5.46"},{"name":"tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.ts","time":132,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/genericObjectBaseType.ts","time":132,"edits":1,"cost":"5.46"},{"name":"tests/cases/compiler/optionalArgsWithDefaultValues.ts","time":132,"edits":1,"cost":"5.46"},{"name":"tests/cases/compiler/fallFromLastCase1.ts","time":132,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/goToImplementationLocal_00.ts","time":263,"edits":2,"cost":"5.46"},{"name":"tests/cases/fourslash/codefixEnableExperimentalDecorators_noTsconfig.ts","time":262,"edits":2,"cost":"5.46"},{"name":"tests/cases/fourslash/completionListForExportEquals.ts","time":131,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/unusedFunctionInNamespace1.ts","time":131,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/semanticClassification2.ts","time":131,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/javaScriptModules19.ts","time":131,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/server/signatureHelp01.ts","time":131,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/completionListAfterPropertyName.ts","time":262,"edits":2,"cost":"5.46"},{"name":"tests/cases/fourslash/restArgSignatureHelp.ts","time":131,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/breakpointValidationModule.ts","time":131,"edits":1,"cost":"5.46"},{"name":"tests/cases/conformance/types/localTypes/localTypes1.ts","time":131,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/completionForStringLiteralNonrelativeImportTypings2.ts","time":131,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/quickInfoForContextuallyTypedIife.ts","time":131,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/unusedParameterInFunction1AddUnderscore.ts","time":262,"edits":2,"cost":"5.46"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts","time":131,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/codeFixAwaitInSyncFunction2.ts","time":262,"edits":2,"cost":"5.46"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of27.ts","time":131,"edits":1,"cost":"5.46"},{"name":"tests/cases/compiler/recursiveTypeParameterReferenceError1.ts","time":131,"edits":1,"cost":"5.46"},{"name":"tests/cases/conformance/async/es6/await_unaryExpression_es6_2.ts","time":131,"edits":1,"cost":"5.46"},{"name":"tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInInstanceMember2.ts","time":131,"edits":1,"cost":"5.46"},{"name":"tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts","time":131,"edits":1,"cost":"5.46"},{"name":"tests/cases/compiler/primitiveTypeAssignment.ts","time":131,"edits":1,"cost":"5.46"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates10_ES6.ts","time":131,"edits":1,"cost":"5.46"},{"name":"tests/cases/conformance/decorators/class/decoratorOnClass2.ts","time":131,"edits":1,"cost":"5.46"},{"name":"tests/cases/conformance/jsx/tsxElementResolution5.tsx","time":131,"edits":1,"cost":"5.46"},{"name":"tests/cases/fourslash/convertFunctionToEs6Class_exportModifier1.ts","time":392,"edits":3,"cost":"5.45"},{"name":"tests/cases/fourslash/findAllRefsImportNamed.ts","time":261,"edits":2,"cost":"5.45"},{"name":"tests/cases/fourslash/refactorConvertExport_exportNodeKinds.ts","time":261,"edits":2,"cost":"5.45"},{"name":"tests/cases/compiler/genericClassesRedeclaration.ts","time":261,"edits":2,"cost":"5.45"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPattern.ts","time":130,"edits":1,"cost":"5.45"},{"name":"tests/cases/fourslash/breakpointValidationParenCallOrNewExpressions.ts","time":130,"edits":1,"cost":"5.45"},{"name":"tests/cases/fourslash/codeFixSpelling2.ts","time":130,"edits":1,"cost":"5.45"},{"name":"tests/cases/compiler/tupleTypes.ts","time":130,"edits":1,"cost":"5.45"},{"name":"tests/cases/conformance/es6/templates/templateStringBinaryOperationsES6.ts","time":130,"edits":1,"cost":"5.45"},{"name":"tests/cases/fourslash/completionListAfterFunction.ts","time":130,"edits":1,"cost":"5.45"},{"name":"tests/cases/fourslash/quickInfoOnVarInArrowExpression.ts","time":130,"edits":1,"cost":"5.45"},{"name":"tests/cases/fourslash/quickInfoForObjectBindingElementPropertyName02.ts","time":130,"edits":1,"cost":"5.45"},{"name":"tests/cases/compiler/collisionArgumentsClassConstructor.ts","time":130,"edits":1,"cost":"5.45"},{"name":"tests/cases/conformance/es6/Symbols/symbolDeclarationEmit14.ts","time":130,"edits":1,"cost":"5.45"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsClass.ts","time":130,"edits":1,"cost":"5.45"},{"name":"tests/cases/fourslash/todoComments17.ts","time":130,"edits":1,"cost":"5.45"},{"name":"tests/cases/fourslash/completionListOnPrivateVariableInModule.ts","time":130,"edits":1,"cost":"5.45"},{"name":"tests/cases/fourslash/getOccurrencesIfElse2.ts","time":130,"edits":1,"cost":"5.45"},{"name":"tests/cases/fourslash/completionListAtEndOfWordInArrowFunction01.ts","time":130,"edits":1,"cost":"5.45"},{"name":"tests/cases/fourslash/completionForStringLiteral8.ts","time":130,"edits":1,"cost":"5.45"},{"name":"tests/cases/conformance/es6/templates/templateStringInIndexExpressionES6.ts","time":130,"edits":1,"cost":"5.45"},{"name":"tests/cases/fourslash/completionListInstanceProtectedMembers2.ts","time":130,"edits":1,"cost":"5.45"},{"name":"tests/cases/conformance/classes/members/accessibility/privateClassPropertyAccessibleWithinClass.ts","time":130,"edits":1,"cost":"5.45"},{"name":"tests/cases/fourslash/unusedImports7FS.ts","time":130,"edits":1,"cost":"5.45"},{"name":"tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction.ts","time":130,"edits":1,"cost":"5.45"},{"name":"tests/cases/conformance/jsx/tsxSpreadChildrenInvalidType.tsx","time":130,"edits":1,"cost":"5.45"},{"name":"tests/cases/fourslash/goToImplementationThis_01.ts","time":130,"edits":1,"cost":"5.45"},{"name":"tests/cases/fourslash/completionListEnumValues.ts","time":130,"edits":1,"cost":"5.45"},{"name":"tests/cases/compiler/thisInSuperCall3.ts","time":130,"edits":1,"cost":"5.45"},{"name":"tests/cases/fourslash/completionsWritingSpreadArgument.ts","time":259,"edits":2,"cost":"5.44"},{"name":"tests/cases/fourslash/codeFixClassExtendAbstractMethodWithLongName.ts","time":259,"edits":2,"cost":"5.44"},{"name":"tests/cases/fourslash/calledUnionsOfDissimilarTyeshaveGoodDisplay.ts","time":259,"edits":2,"cost":"5.44"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts","time":259,"edits":2,"cost":"5.44"},{"name":"tests/cases/fourslash/jsxWithTypeParametershasInstantiatedSignatureHelp.tsx","time":259,"edits":2,"cost":"5.44"},{"name":"tests/cases/compiler/declarationEmitAliasExportStar.ts","time":259,"edits":2,"cost":"5.44"},{"name":"tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts","time":388,"edits":3,"cost":"5.44"},{"name":"tests/cases/fourslash/refactorExtractType38.ts","time":258,"edits":2,"cost":"5.44"},{"name":"tests/cases/fourslash/lambdaThisMembers.ts","time":129,"edits":1,"cost":"5.44"},{"name":"tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts","time":129,"edits":1,"cost":"5.44"},{"name":"tests/cases/compiler/commentsOverloads.ts","time":129,"edits":1,"cost":"5.44"},{"name":"tests/cases/fourslash/referencesForMergedDeclarations6.ts","time":129,"edits":1,"cost":"5.44"},{"name":"tests/cases/fourslash/signatureHelpSuperConstructorOverload.ts","time":129,"edits":1,"cost":"5.44"},{"name":"tests/cases/fourslash/completionListInClosedFunction01.ts","time":129,"edits":1,"cost":"5.44"},{"name":"tests/cases/fourslash/completionListInObjectLiteral4.ts","time":129,"edits":1,"cost":"5.44"},{"name":"tests/cases/fourslash/completionListAtEOF2.ts","time":129,"edits":1,"cost":"5.44"},{"name":"tests/cases/fourslash/getJavaScriptCompletions9.ts","time":129,"edits":1,"cost":"5.44"},{"name":"tests/cases/fourslash/getOccurrencesDeclare1.ts","time":129,"edits":1,"cost":"5.44"},{"name":"tests/cases/fourslash/duplicateTypeParameters.ts","time":129,"edits":1,"cost":"5.44"},{"name":"tests/cases/compiler/taggedTemplatesWithIncompleteTemplateExpressions6.ts","time":129,"edits":1,"cost":"5.44"},{"name":"tests/cases/fourslash/completionListAtIdentifierDefinitionLocations_classes.ts","time":129,"edits":1,"cost":"5.44"},{"name":"tests/cases/fourslash/goToDefinitionDifferentFile.ts","time":129,"edits":1,"cost":"5.44"},{"name":"tests/cases/fourslash/findAllRefsOnPrivateParameterProperty1.ts","time":129,"edits":1,"cost":"5.44"},{"name":"tests/cases/conformance/es6/spread/iteratorSpreadInCall4.ts","time":129,"edits":1,"cost":"5.44"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportDefault0.ts","time":129,"edits":1,"cost":"5.44"},{"name":"tests/cases/compiler/discriminatedUnionErrorMessage.ts","time":129,"edits":1,"cost":"5.44"},{"name":"tests/cases/conformance/es6/templates/templateStringUnterminated2_ES6.ts","time":129,"edits":1,"cost":"5.44"},{"name":"tests/cases/fourslash/quickInfoTypeArgumentInferenceWithMethodWithoutBody.ts","time":256,"edits":2,"cost":"5.43"},{"name":"tests/cases/compiler/forwardDeclaredCommonTypes01.ts","time":256,"edits":2,"cost":"5.43"},{"name":"tests/cases/compiler/declFileConstructors.ts","time":128,"edits":1,"cost":"5.43"},{"name":"tests/cases/conformance/types/thisType/looseThisTypeInFunctions.ts","time":128,"edits":1,"cost":"5.43"},{"name":"tests/cases/conformance/jsx/tsxAttributeResolution1.tsx","time":128,"edits":1,"cost":"5.43"},{"name":"tests/cases/fourslash/completionListInExtendsClause.ts","time":128,"edits":1,"cost":"5.43"},{"name":"tests/cases/fourslash/completionListOnMethodParameterName.ts","time":128,"edits":1,"cost":"5.43"},{"name":"tests/cases/fourslash/quickInfoWithNestedDestructuredParameterInLambda.ts","time":128,"edits":1,"cost":"5.43"},{"name":"tests/cases/fourslash/getOccurrencesAfterEdit.ts","time":128,"edits":1,"cost":"5.43"},{"name":"tests/cases/fourslash/getEmitOutputDeclarationSingleFile.ts","time":128,"edits":1,"cost":"5.43"},{"name":"tests/cases/fourslash/goToDefinitionObjectSpread.ts","time":128,"edits":1,"cost":"5.43"},{"name":"tests/cases/compiler/typeParameterExtendingUnion2.ts","time":128,"edits":1,"cost":"5.43"},{"name":"tests/cases/fourslash/unusedImports2FS.ts","time":128,"edits":1,"cost":"5.43"},{"name":"tests/cases/fourslash/getOccurrencesModifiersNegatives1.ts","time":256,"edits":2,"cost":"5.43"},{"name":"tests/cases/fourslash/quickInfoForContextuallyTypedFunctionInTaggedTemplateExpression1.ts","time":128,"edits":1,"cost":"5.43"},{"name":"tests/cases/fourslash/getOccurrencesProtected2.ts","time":128,"edits":1,"cost":"5.43"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplates5.ts","time":128,"edits":1,"cost":"5.43"},{"name":"tests/cases/fourslash/signatureHelpInFunctionCall.ts","time":128,"edits":1,"cost":"5.43"},{"name":"tests/cases/fourslash/getOccurrencesExport3.ts","time":128,"edits":1,"cost":"5.43"},{"name":"tests/cases/fourslash/completionListAfterFunction2.ts","time":128,"edits":1,"cost":"5.43"},{"name":"tests/cases/conformance/async/es6/asyncModule_es6.ts","time":128,"edits":1,"cost":"5.43"},{"name":"tests/cases/fourslash/refactorExtractType40.ts","time":255,"edits":2,"cost":"5.43"},{"name":"tests/cases/fourslash/refactorExtractType22.ts","time":255,"edits":2,"cost":"5.43"},{"name":"tests/cases/fourslash/findAllRefsImportEqualsJsonFile.ts","time":255,"edits":2,"cost":"5.43"},{"name":"tests/cases/conformance/jsdoc/jsdocParamTag2.ts","time":255,"edits":2,"cost":"5.43"},{"name":"tests/cases/fourslash/memberListOfModuleAfterInvalidCharater.ts","time":127,"edits":1,"cost":"5.43"},{"name":"tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpressionDivideAmbiguity6.ts","time":254,"edits":2,"cost":"5.43"},{"name":"tests/cases/fourslash/getOccurrencesSwitchCaseDefaultBroken.ts","time":127,"edits":1,"cost":"5.43"},{"name":"tests/cases/compiler/privacyClassImplementsClauseDeclFile.ts","time":127,"edits":1,"cost":"5.43"},{"name":"tests/cases/fourslash/codeFixUndeclaredAcrossFiles2.ts","time":254,"edits":2,"cost":"5.43"},{"name":"tests/cases/compiler/es6ImportNameSpaceImportInEs5.ts","time":127,"edits":1,"cost":"5.43"},{"name":"tests/cases/fourslash/codeFixInferFromUsageVariable3.ts","time":254,"edits":2,"cost":"5.43"},{"name":"tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts","time":127,"edits":1,"cost":"5.43"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedFunctionTypedArguments.ts","time":127,"edits":1,"cost":"5.43"},{"name":"tests/cases/conformance/jsx/tsxReactEmit2.tsx","time":127,"edits":1,"cost":"5.43"},{"name":"tests/cases/fourslash/goToDefinitionImportedNames.ts","time":127,"edits":1,"cost":"5.43"},{"name":"tests/cases/conformance/es6/Symbols/symbolDeclarationEmit3.ts","time":127,"edits":1,"cost":"5.43"},{"name":"tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx","time":127,"edits":1,"cost":"5.43"},{"name":"tests/cases/compiler/constDeclarations-access2.ts","time":127,"edits":1,"cost":"5.43"},{"name":"tests/cases/fourslash/quickInfoForDecorators.ts","time":127,"edits":1,"cost":"5.43"},{"name":"tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters2.ts","time":127,"edits":1,"cost":"5.43"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts","time":127,"edits":1,"cost":"5.43"},{"name":"tests/cases/fourslash/shims/goToDefinitionTypeReferenceDirective.ts","time":127,"edits":1,"cost":"5.43"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInTypeAlias.ts","time":127,"edits":1,"cost":"5.43"},{"name":"tests/cases/fourslash/shims-pp/getRenameInfo.ts","time":127,"edits":1,"cost":"5.43"},{"name":"tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts","time":127,"edits":1,"cost":"5.43"},{"name":"tests/cases/fourslash/completionListInUnclosedSpreadExpression01.ts","time":127,"edits":1,"cost":"5.43"},{"name":"tests/cases/fourslash/quickInfoOnGenericWithConstraints1.ts","time":127,"edits":1,"cost":"5.43"},{"name":"tests/cases/compiler/recursiveIdenticalAssignment.ts","time":127,"edits":1,"cost":"5.43"},{"name":"tests/cases/conformance/salsa/exportNestedNamespaces2.ts","time":127,"edits":1,"cost":"5.43"},{"name":"tests/cases/conformance/salsa/jsContainerMergeTsDeclaration3.ts","time":127,"edits":1,"cost":"5.43"},{"name":"tests/cases/fourslash/getOccurrencesLoopBreakContinue.ts","time":253,"edits":2,"cost":"5.42"},{"name":"tests/cases/fourslash/completionListInScope.ts","time":253,"edits":2,"cost":"5.42"},{"name":"tests/cases/fourslash/definitionNameOnEnumMember.ts","time":253,"edits":2,"cost":"5.42"},{"name":"tests/cases/compiler/vararg.ts","time":126,"edits":1,"cost":"5.42"},{"name":"tests/cases/fourslash/getOccurrencesReturn4.ts","time":126,"edits":1,"cost":"5.42"},{"name":"tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts","time":126,"edits":1,"cost":"5.42"},{"name":"tests/cases/compiler/ambientConstLiterals.ts","time":126,"edits":1,"cost":"5.42"},{"name":"tests/cases/fourslash/goToDefinitionUnionTypeProperty1.ts","time":126,"edits":1,"cost":"5.42"},{"name":"tests/cases/compiler/es6ExportEqualsInterop.ts","time":126,"edits":1,"cost":"5.42"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsArrowFunctionExpression.ts","time":126,"edits":1,"cost":"5.42"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts","time":126,"edits":1,"cost":"5.42"},{"name":"tests/cases/fourslash/unusedEnumInFunction1.ts","time":126,"edits":1,"cost":"5.42"},{"name":"tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts","time":126,"edits":1,"cost":"5.42"},{"name":"tests/cases/fourslash/getEmitOutputSingleFile2.ts","time":126,"edits":1,"cost":"5.42"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsClassProperty.ts","time":126,"edits":1,"cost":"5.42"},{"name":"tests/cases/fourslash/tsxCompletionNonTagLessThan.ts","time":126,"edits":1,"cost":"5.42"},{"name":"tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts","time":126,"edits":1,"cost":"5.42"},{"name":"tests/cases/compiler/defaultParameterAddsUndefinedWithStrictNullChecks.ts","time":126,"edits":1,"cost":"5.42"},{"name":"tests/cases/compiler/functionExpressionWithResolutionOfTypeOfSameName01.ts","time":126,"edits":1,"cost":"5.42"},{"name":"tests/cases/compiler/noCollisionThisExpressionAndLocalVarInAccessors.ts","time":126,"edits":1,"cost":"5.42"},{"name":"tests/cases/compiler/stringLiteralObjectLiteralDeclaration1.ts","time":126,"edits":1,"cost":"5.42"},{"name":"tests/cases/fourslash/getJavaScriptCompletions5.ts","time":126,"edits":1,"cost":"5.42"},{"name":"tests/cases/compiler/genericInterfaceImplementation.ts","time":126,"edits":1,"cost":"5.42"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithOptionalParameters.ts","time":126,"edits":1,"cost":"5.42"},{"name":"tests/cases/compiler/functionArgShadowing.ts","time":126,"edits":1,"cost":"5.42"},{"name":"tests/cases/compiler/arrowFunctionWithObjectLiteralBody3.ts","time":126,"edits":1,"cost":"5.42"},{"name":"tests/cases/fourslash/commentsInterface.ts","time":629,"edits":5,"cost":"5.42"},{"name":"tests/cases/compiler/subclassThisTypeAssignable.ts","time":251,"edits":2,"cost":"5.41"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/conformance/expressions/functions/contextuallyTypedIife.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/fourslash/completionListInstanceProtectedMembers3.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/compiler/privacyFunc.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/fourslash/codeFixUndeclaredPropertyFunctionEmptyClass.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/fourslash/getOccurrencesIfElse5.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/fourslash/importNameCodeFixExistingImport9.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/compiler/asyncFunctionReturnType.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/fourslash/completionListOnAliases.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/compiler/declFileExportImportChain2.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess_js_2.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/compiler/exportDefaultAsyncFunction2.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterUsedAsConstraint.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTags03.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceMethodTypePredicate.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/fourslash/emptyArrayInference.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess_js_8.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/compiler/es6ModuleEnumDeclaration.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/compiler/constructorStaticParamName.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeEnumAndNumber.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/fourslash/defaultParamsAndContextualTypes.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeAlias.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/fourslash/memberListErrorRecovery.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/compiler/declFileWithErrorsInInputDeclarationFileWithOut.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/compiler/aliasesInSystemModule1.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/conformance/es6/destructuring/optionalBindingParametersInOverloads2.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/compiler/es5-asyncFunctionNestedLoops.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/compiler/genericTypeUsedWithoutTypeArguments1.ts","time":125,"edits":1,"cost":"5.41"},{"name":"tests/cases/fourslash/findAllRefsDefaultImport.ts","time":373,"edits":3,"cost":"5.40"},{"name":"tests/cases/fourslash/completionListInUnclosedTemplate01.ts","time":124,"edits":1,"cost":"5.40"},{"name":"tests/cases/conformance/expressions/functions/arrowFunctionExpressions.ts","time":124,"edits":1,"cost":"5.40"},{"name":"tests/cases/compiler/exportImportNonInstantiatedModule2.ts","time":124,"edits":1,"cost":"5.40"},{"name":"tests/cases/fourslash/codeFixCalledES2015Import5.ts","time":124,"edits":1,"cost":"5.40"},{"name":"tests/cases/compiler/commentsExternalModules.ts","time":124,"edits":1,"cost":"5.40"},{"name":"tests/cases/compiler/moduleAugmentationImportsAndExports4.ts","time":124,"edits":1,"cost":"5.40"},{"name":"tests/cases/compiler/declFileAliasUseBeforeDeclaration2.ts","time":124,"edits":1,"cost":"5.40"},{"name":"tests/cases/fourslash/findAllRefsForVariableInExtendsClause02.ts","time":124,"edits":1,"cost":"5.40"},{"name":"tests/cases/compiler/declFileCallSignatures.ts","time":124,"edits":1,"cost":"5.40"},{"name":"tests/cases/fourslash/quickInfoForConstDeclaration.ts","time":124,"edits":1,"cost":"5.40"},{"name":"tests/cases/fourslash/signatureHelpOnOverloadOnConst.ts","time":124,"edits":1,"cost":"5.40"},{"name":"tests/cases/fourslash/completionListEnumMembers.ts","time":124,"edits":1,"cost":"5.40"},{"name":"tests/cases/fourslash/completionListInFunctionExpression.ts","time":124,"edits":1,"cost":"5.40"},{"name":"tests/cases/fourslash/renameForDefaultExport09.ts","time":124,"edits":1,"cost":"5.40"},{"name":"tests/cases/fourslash/goToDefinitionInTypeArgument.ts","time":124,"edits":1,"cost":"5.40"},{"name":"tests/cases/fourslash/javaScriptClass2.ts","time":124,"edits":1,"cost":"5.40"},{"name":"tests/cases/fourslash/server/jsdocTypedefTag2.ts","time":124,"edits":1,"cost":"5.40"},{"name":"tests/cases/fourslash/completionListStaticProtectedMembers4.ts","time":124,"edits":1,"cost":"5.40"},{"name":"tests/cases/conformance/declarationEmit/typePredicates/declarationEmitThisPredicates01.ts","time":124,"edits":1,"cost":"5.40"},{"name":"tests/cases/compiler/commentsVariableStatement1.ts","time":124,"edits":1,"cost":"5.40"},{"name":"tests/cases/fourslash/codeFixCannotFindModule_suggestion_falsePositive.ts","time":247,"edits":2,"cost":"5.40"},{"name":"tests/cases/fourslash/refactorExtractType41.ts","time":246,"edits":2,"cost":"5.39"},{"name":"tests/cases/conformance/types/unknown/unknownType2.ts","time":369,"edits":3,"cost":"5.39"},{"name":"tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload5.tsx","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/unusedTypeParametersInLambda3.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/conformance/jsx/checkJsxChildrenProperty10.tsx","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/compiler/assignmentCompatBug2.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/completionListAtIdentifierDefinitionLocations_interfaces.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/completionListForTransitivelyExportedMembers01.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/renameJsThisProperty03.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/codeFixCalledES2015Import8.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/overloadOnConstCallSignature.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/conformance/es6/Symbols/symbolDeclarationEmit6.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/conformance/classes/members/classTypes/indexersInClassType.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/codeFixClassImplementClassMethodViaHeritage.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/completionListForRest.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/server/formatonkey01.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/quickInfoShowsGenericSpecialization.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/unusedVariableInForLoop4FS.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamMethod.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/compiler/typeReferenceDirectives12.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads01.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/completionInNamedImportLocation.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/unusedLocalsinConstructorFS2.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceComputedPropertyLiterals.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/getEmitOutputMapRoot.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/quickInfoForIndexerResultWithConstraint.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceNamespaceConflict.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/getOccurrencesThisNegatives2.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/compiler/fromAsIdentifier1.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/compiler/destructuringInVariableDeclarations1.ts","time":123,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/referencesForMergedDeclarations3.ts","time":245,"edits":2,"cost":"5.39"},{"name":"tests/cases/conformance/types/rest/genericRestParameters3.ts","time":245,"edits":2,"cost":"5.39"},{"name":"tests/cases/fourslash/tripleSlashRefPathCompletionHiddenFile.ts","time":245,"edits":2,"cost":"5.39"},{"name":"tests/cases/conformance/es2019/importMeta/importMetaES5.ts","time":245,"edits":2,"cost":"5.39"},{"name":"tests/cases/conformance/salsa/inferringClassMembersFromAssignments3.ts","time":245,"edits":2,"cost":"5.39"},{"name":"tests/cases/conformance/internalModules/moduleDeclarations/instantiatedModule.ts","time":122,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/breakpointValidationSwitch.ts","time":122,"edits":1,"cost":"5.39"},{"name":"tests/cases/conformance/types/literal/numericLiteralTypes1.ts","time":122,"edits":1,"cost":"5.39"},{"name":"tests/cases/conformance/emitter/es2015/asyncGenerators/emitter.asyncGenerators.functionExpressions.es2015.ts","time":122,"edits":1,"cost":"5.39"},{"name":"tests/cases/compiler/typeMatch2.ts","time":122,"edits":1,"cost":"5.39"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts","time":122,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/getJavaScriptCompletions4.ts","time":122,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/javascriptModules24.ts","time":244,"edits":2,"cost":"5.39"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.ts","time":122,"edits":1,"cost":"5.39"},{"name":"tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints2.ts","time":122,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/unusedVariableInModule3.ts","time":122,"edits":1,"cost":"5.39"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.ts","time":122,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/goToDefinitionTypeReferenceDirective.ts","time":122,"edits":1,"cost":"5.39"},{"name":"tests/cases/compiler/capturedLetConstInLoop9.ts","time":122,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/unusedImports12FS.ts","time":122,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/completionListInExtendsClauseAtEOF.ts","time":122,"edits":1,"cost":"5.39"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringVariableStatement1.ts","time":122,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/completionForStringLiteral10.ts","time":122,"edits":1,"cost":"5.39"},{"name":"tests/cases/compiler/returnTypeTypeArguments.ts","time":122,"edits":1,"cost":"5.39"},{"name":"tests/cases/fourslash/goToDefinitionInterfaceAfterImplement.ts","time":122,"edits":1,"cost":"5.39"},{"name":"tests/cases/compiler/arrowFunctionWithObjectLiteralBody2.ts","time":122,"edits":1,"cost":"5.39"},{"name":"tests/cases/compiler/overloadGenericFunctionWithRestArgs.ts","time":122,"edits":1,"cost":"5.39"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/fourslash/findAllRefsReExportRightNameWrongSymbol.ts","time":242,"edits":2,"cost":"5.38"},{"name":"tests/cases/fourslash/completionAfterBackslashFollowingString.ts","time":242,"edits":2,"cost":"5.38"},{"name":"tests/cases/fourslash/completionListAtEOF.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/compiler/readonlyMembers.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/fourslash/completionListAfterRegularExpressionLiteral02.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/fourslash/completionListBeforeNewScope02.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/fourslash/typeCheckAfterResolve.ts","time":242,"edits":2,"cost":"5.38"},{"name":"tests/cases/fourslash/codeFixCorrectQualifiedNameToIndexedAccessType01.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/compiler/recursiveTypeComparison2.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/fourslash/goToTypeDefinitionUnionType.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/fourslash/completionListInUnclosedElementAccessExpression01.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/fourslash/renameJsSpecialAssignmentRhs2.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/compiler/baseCheck.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/fourslash/renameForDefaultExport02.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/fourslash/goToDefinitionShadowVariable.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithNumberType.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess_js_9.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/fourslash/completionListOutsideOfClosedArrowFunction02.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/fourslash/tsxCompletion7.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/fourslash/completionListInObjectBindingPattern03.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/fourslash/completionListForTransitivelyExportedMembers02.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/conformance/emitter/es5/asyncGenerators/emitter.asyncGenerators.functionExpressions.es5.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType9_ES6.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/compiler/dottedSymbolResolution1.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/compiler/moduleAugmentationsImports2.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedBindingInitializer.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/compiler/inferentialTypingWithFunctionTypeSyntacticScenarios.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/conformance/types/nonPrimitive/nonPrimitiveNarrow.ts","time":121,"edits":1,"cost":"5.38"},{"name":"tests/cases/fourslash/findAllRefsForMappedType.ts","time":362,"edits":3,"cost":"5.37"},{"name":"tests/cases/fourslash/refactorExtractType39.ts","time":241,"edits":2,"cost":"5.37"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallTypeArgumentInference.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/fourslash/goToTypeDefinitionModule.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/fourslash/getEditsForFileRename_renameToIndex.ts","time":240,"edits":2,"cost":"5.37"},{"name":"tests/cases/compiler/targetTypeArgs.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/fourslash/completionListOutsideOfClosedArrowFunction01.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/fourslash/getJavaScriptQuickInfo4.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplatesWithOverloadedTags6.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/fourslash/completionListInTypedObjectLiteralsWithPartialPropertyNames2.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/conformance/jsx/tsxUnionElementType6.tsx","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/fourslash/completionListInClosedObjectTypeLiteralInSignature03.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess29.ts","time":240,"edits":2,"cost":"5.37"},{"name":"tests/cases/conformance/expressions/contextualTyping/parenthesizedContexualTyping3.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/fourslash/externalModuleIntellisense.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/fourslash/importNameCodeFixExistingImport1.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/conformance/jsx/checkJsxChildrenProperty11.tsx","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/fourslash/tsxRename5.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/fourslash/getQuickInfoForIntersectionTypes.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/fourslash/getJavaScriptCompletions15.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/fourslash/server/quickinfo01.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/fourslash/codeFixCorrectQualifiedNameToIndexedAccessType_all.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/fourslash/genericAssignmentCompat.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/fourslash/constructorQuickInfo.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesWithTheSameNameAndSameCommonRoot.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/fourslash/importNameCodeFixExistingImport8.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/fourslash/incrementalResolveAccessor.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/fourslash/getEmitOutputWithSemanticErrors.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/fourslash/completionListInTypedObjectLiterals3.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/conformance/parser/ecmascript5/MethodSignatures/parserMethodSignature10.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/fourslash/getJavaScriptQuickInfo2.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/compiler/assignmentCompatability32.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/conformance/parser/ecmascript5/Types/parserTypeQuery2.ts","time":120,"edits":1,"cost":"5.37"},{"name":"tests/cases/fourslash/refactorExtractType31.ts","time":239,"edits":2,"cost":"5.36"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_inheritedConstructor.ts","time":239,"edits":2,"cost":"5.36"},{"name":"tests/cases/conformance/jsx/tsxTypeArgumentResolution.tsx","time":239,"edits":2,"cost":"5.36"},{"name":"unittests:: tsserver:: events:: LargeFileReferencedEvent with large file","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/fourslash/completionListAfterSlash.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/fourslash/getJavaScriptCompletions8.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsInternalModuleAlias.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/fourslash/tsxRename1.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/fourslash/completionListInComments.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/fourslash/completionListInUnclosedTypeOfExpression01.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/fourslash/noSignatureHelpOnNewKeyword.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/fourslash/restArgType.ts","time":238,"edits":2,"cost":"5.36"},{"name":"tests/cases/fourslash/getJavaScriptCompletions19.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/fourslash/codeFixDisableJsDiagnosticsInFile6.ts","time":238,"edits":2,"cost":"5.36"},{"name":"tests/cases/fourslash/server/typedefinition01.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/fourslash/getOccurrencesIsDefinitionOfParameter.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/fourslash/signatureHelpOnOverloadsDifferentArity3.ts","time":238,"edits":2,"cost":"5.36"},{"name":"tests/cases/compiler/staticMemberExportAccess.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/fourslash/getEmitOutputSingleFile.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/fourslash/getEmitOutputWithSemanticErrors2.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/fourslash/getJavaScriptQuickInfo5.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/fourslash/jsFileJsdocTypedefTagTypeExpressionCompletion2.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/fourslash/completionListInExportClause03.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/compiler/typeMatch1.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/fourslash/completionListOnVarBetweenModules.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/compiler/assignmentCompatability29.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/fourslash/renameInheritedProperties3.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/fourslash/addFunctionInDuplicatedConstructorClassBody.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration3ES5iterable.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding1.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/fourslash/todoComments2.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/fourslash/completionListInNamespaceImportName01.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/fourslash/completionListAndMemberListOnCommentedLine.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/compiler/callOverloadViaElementAccessExpression.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration24.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of34.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/compiler/promiseChaining1.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck1.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/conformance/types/primitives/undefined/validUndefinedAssignments.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/compiler/sourceMap-Comments2.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes1.ts","time":119,"edits":1,"cost":"5.36"},{"name":"tests/cases/conformance/types/tuple/readonlyArraysAndTuples2.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/conformance/jsx/correctlyMarkAliasAsReferences2.tsx","time":472,"edits":4,"cost":"5.35"},{"name":"tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/compiler/es6-declaration-amd.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/compiler/modularizeLibrary_TargetES5UsingES6Lib.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/fourslash/unusedImports1FS.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/fourslash/findAllRefsInheritedProperties4.ts","time":236,"edits":2,"cost":"5.35"},{"name":"tests/cases/fourslash/thisPredicateFunctionQuickInfo.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/fourslash/codeFixAddMissingEnumMember4.ts","time":236,"edits":2,"cost":"5.35"},{"name":"tests/cases/fourslash/extract-method23.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/fourslash/completionListImplementingInterfaceFunctions.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/fourslash/completionListAtBeginningOfFile01.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/conformance/jsx/inline/inlineJsxFactoryDeclarations.tsx","time":236,"edits":2,"cost":"5.35"},{"name":"tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction11.ts","time":236,"edits":2,"cost":"5.35"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplatesWithOverloadedTags1.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/compiler/declFileTypeAnnotationTypeAlias.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/fourslash/renamePropertyAccessExpressionHeritageClause.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/fourslash/fixingTypeParametersQuickInfo.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/fourslash/unusedTypeParametersInInterface1.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/fourslash/promiseTyping1.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplatesIncomplete3.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/fourslash/bestCommonTypeObjectLiterals1.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/fourslash/signatureHelpOnOverloadsDifferentArity.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/compiler/selfReferencesInFunctionParameters.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/compiler/moduleAugmentationImportsAndExports5.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesNumber.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/fourslash/renameJsPrototypeProperty02.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/fourslash/tsxRename2.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/compiler/classExtendsMultipleBaseClasses.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/compiler/umdDependencyCommentName1.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/compiler/esModuleInteropImportNamespace.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of42.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/conformance/externalModules/exportAssignmentTopLevelIdentifier.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/compiler/letAsIdentifier2.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName.ts","time":118,"edits":1,"cost":"5.35"},{"name":"tests/cases/fourslash/completionEntryInJsFile.ts","time":353,"edits":3,"cost":"5.35"},{"name":"tests/cases/fourslash/refactorExtractType1.ts","time":235,"edits":2,"cost":"5.35"},{"name":"tests/cases/fourslash/codeFixAddMissingNew_all_arguments.ts","time":235,"edits":2,"cost":"5.35"},{"name":"tests/cases/fourslash/completionListWithModulesFromModule.ts","time":235,"edits":2,"cost":"5.35"},{"name":"tests/cases/fourslash/cloduleAsBaseClass.ts","time":235,"edits":2,"cost":"5.35"},{"name":"tests/cases/fourslash/completionEntryForClassMembers2.ts","time":586,"edits":5,"cost":"5.35"},{"name":"tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts","time":234,"edits":2,"cost":"5.34"},{"name":"tests/cases/fourslash/completionForStringLiteralRelativeImportAllowJSTrue.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithAnyOtherType.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceMultipleMembersAndPunctuation.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/fourslash/completionListOfSplitInterface.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/fourslash/getOccurrencesIsDefinitionOfEnum.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/compiler/moduleAugmentationDeclarationEmit2.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/fourslash/codeFixClassPropertyInitialization_all_1.ts","time":234,"edits":2,"cost":"5.34"},{"name":"tests/cases/compiler/es6ClassTest2.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/fourslash/completionListInUnclosedObjectTypeLiteralInSignature03.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsInterface.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/conformance/types/literal/booleanLiteralTypes1.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/fourslash/completionListWithAmbientDeclaration.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/fourslash/quickInfoOnObjectLiteralWithOnlySetter.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/fourslash/completionListOnParam.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/fourslash/thisPredicateFunctionCompletions03.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/fourslash/completionListInUnclosedCommaExpression02.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/compiler/tooFewArgumentsInGenericFunctionTypedArgument.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/compiler/commentsClass.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/fourslash/completionListAfterInvalidCharacter.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/fourslash/cloduleWithRecursiveReference.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/compiler/declFileTypeAnnotationArrayType.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/fourslash/paramHelpOnCommaInString.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/fourslash/goToDefinitionInMemberDeclaration.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/fourslash/signatureHelpAnonymousFunction.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportNodeModules1.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/fourslash/noTypeParameterInLHS.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/conformance/types/mapped/mappedTypes3.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/fourslash/codeFixUnusedIdentifier_infer.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/fourslash/unusedNamespaceInNamespace.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings17_ES5.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/fourslash/getOccurrencesAbstract02.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/fourslash/unusedVariableInForLoop2FS.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration9.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/fourslash/restParamsContextuallyTyped.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/compiler/genericConstraint2.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnumDeclaration2.ts","time":117,"edits":1,"cost":"5.34"},{"name":"tests/cases/fourslash/codeFixInferFromUsage_all.ts","time":233,"edits":2,"cost":"5.34"},{"name":"tests/cases/fourslash/goToImplementationInterfaceMethod_08.ts","time":233,"edits":2,"cost":"5.34"},{"name":"tests/cases/fourslash/contextualTypingOfGenericCallSignatures2.ts","time":233,"edits":2,"cost":"5.34"},{"name":"tests/cases/fourslash/unusedParameterInLambda3.ts","time":233,"edits":2,"cost":"5.34"},{"name":"tests/cases/fourslash/completionListPrivateMembers3.ts","time":116,"edits":1,"cost":"5.33"},{"name":"tests/cases/conformance/types/typeRelationships/comparable/equalityWithIntersectionTypes01.ts","time":116,"edits":1,"cost":"5.33"},{"name":"tests/cases/conformance/types/literal/numericLiteralTypes3.ts","time":116,"edits":1,"cost":"5.33"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplatesNegatives1.ts","time":116,"edits":1,"cost":"5.33"},{"name":"tests/cases/fourslash/server/jsdocTypedefTagRename02.ts","time":116,"edits":1,"cost":"5.33"},{"name":"tests/cases/fourslash/getJavaScriptCompletions3.ts","time":116,"edits":1,"cost":"5.33"},{"name":"tests/cases/fourslash/tsxQuickInfo1.ts","time":116,"edits":1,"cost":"5.33"},{"name":"tests/cases/fourslash/referencesForInheritedProperties8.ts","time":116,"edits":1,"cost":"5.33"},{"name":"tests/cases/conformance/jsx/checkJsxChildrenProperty13.tsx","time":232,"edits":2,"cost":"5.33"},{"name":"tests/cases/fourslash/signatureHelpFunctionParameter.ts","time":116,"edits":1,"cost":"5.33"},{"name":"tests/cases/fourslash/getPropertySymbolsFromBaseTypesDoesntCrash.ts","time":116,"edits":1,"cost":"5.33"},{"name":"tests/cases/fourslash/signatureHelpConstructorOverload.ts","time":116,"edits":1,"cost":"5.33"},{"name":"tests/cases/fourslash/unusedClassInNamespace3.ts","time":116,"edits":1,"cost":"5.33"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportRootDirs0.ts","time":116,"edits":1,"cost":"5.33"},{"name":"tests/cases/compiler/overEagerReturnTypeSpecialization.ts","time":116,"edits":1,"cost":"5.33"},{"name":"tests/cases/fourslash/quickInfoOnMergedModule.ts","time":116,"edits":1,"cost":"5.33"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardNarrowsPrimitiveIntersection.ts","time":116,"edits":1,"cost":"5.33"},{"name":"tests/cases/compiler/undeclaredMethod.ts","time":116,"edits":1,"cost":"5.33"},{"name":"tests/cases/conformance/jsx/tsxPreserveEmit3.tsx","time":116,"edits":1,"cost":"5.33"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ExtendsOrImplementsClauses/parserErrorRecovery_ExtendsOrImplementsClause5.ts","time":116,"edits":1,"cost":"5.33"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts","time":231,"edits":2,"cost":"5.33"},{"name":"tests/cases/fourslash/goToDefinitionFunctionOverloads.ts","time":231,"edits":2,"cost":"5.33"},{"name":"tests/cases/fourslash/classExtendsInterfaceSigHelp1.ts","time":231,"edits":2,"cost":"5.33"},{"name":"tests/cases/fourslash/completionsWithOptionalProperties.ts","time":230,"edits":2,"cost":"5.33"},{"name":"tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.classMethods.es2018.ts","time":115,"edits":1,"cost":"5.33"},{"name":"unittests:: builder","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/compiler/isDeclarationVisibleNodeKinds.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithNumericIndexers2.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/fourslash/unclosedStringLiteralErrorRecovery2.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/compiler/internalAliasClassInsideLocalModuleWithExport.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/compiler/intersectionTypeNormalization.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/fourslash/scopeOfUnionProperties.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/fourslash/referencesForExportedValues.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/compiler/importHelpersInIsolatedModules.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/compiler/noImplicitAnyDestructuringInPrivateMethod.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/fourslash/findAllRefsForRest.ts","time":230,"edits":2,"cost":"5.33"},{"name":"tests/cases/fourslash/referencesForContextuallyTypedUnionProperties2.ts","time":230,"edits":2,"cost":"5.33"},{"name":"tests/cases/fourslash/completionListInObjectLiteral.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/fourslash/codeFixDisableJsDiagnosticsInFile.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/fourslash/shims-pp/goToDefinitionTypeReferenceDirective.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/compiler/outModuleTripleSlashRefs.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/compiler/augmentedTypesModules.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/compiler/strictModeUseContextualKeyword.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/fourslash/getEditsForFileRename_preferences.ts","time":230,"edits":2,"cost":"5.33"},{"name":"tests/cases/fourslash/getOccurrencesOfAnonymousFunction2.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/conformance/types/import/importTypeAmdBundleRewrite.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/fourslash/completionListAfterClassExtends.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/compiler/sourceMapValidationClasses.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/conformance/enums/enumMergingErrors.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/compiler/es5-commonjs6.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/compiler/anyInferenceAnonymousFunctions.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherType.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck4.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/compiler/functionOverloads13.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/conformance/externalModules/exportDeclaredModule.ts","time":115,"edits":1,"cost":"5.33"},{"name":"tests/cases/fourslash/getOccurrencesIsDefinitionOfInterfaceClassMerge.ts","time":229,"edits":2,"cost":"5.32"},{"name":"tests/cases/conformance/decorators/1.0lib-noErrors.ts","time":229,"edits":2,"cost":"5.32"},{"name":"tests/cases/fourslash/refactorExtractType23.ts","time":228,"edits":2,"cost":"5.32"},{"name":"tests/cases/fourslash/completionListsThroughTransitiveBaseClasses2.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/compiler/sourceMapValidationStatements.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/compiler/moduleAugmentationExtendAmbientModule2.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/compiler/commentsemitComments.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/fourslash/noCompletionListOnCommentsInsideObjectLiterals.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/compiler/typeReferenceDirectives3.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/fourslash/navigateToSingleFileResults.ts","time":228,"edits":2,"cost":"5.32"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportAmbient0.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/fourslash/addInterfaceMemberAboveClass.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/fourslash/getRenameInfoTests2.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/fourslash/verifySingleFileEmitOutput1.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/fourslash/renameObjectBindingElementPropertyName01.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/fourslash/signatureHelpWithInterfaceAsIdentifier.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/fourslash/todoComments15.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/fourslash/protoVarVisibleWithOuterScopeUnderscoreProto.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/fourslash/completionListInObjectLiteral2.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/fourslash/getEmitOutputOnlyOneFile.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/fourslash/completionListInObjectBindingPattern13.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/fourslash/quickInfoForTypeParameterInTypeAlias1.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/fourslash/errorsAfterResolvingVariableDeclOfMergedVariableAndClassDecl.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/fourslash/completionListInUnclosedVoidExpression01.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/fourslash/quickInfoForContextuallyTypedArrowFunctionInSuperCall.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/fourslash/documentHighlightAtInheritedProperties1.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/compiler/keyofIsLiteralContexualType.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/compiler/modulePrologueSystem.ts","time":114,"edits":1,"cost":"5.32"},{"name":"tests/cases/fourslash/refactorExtractType24.ts","time":227,"edits":2,"cost":"5.31"},{"name":"tests/cases/fourslash/codeFixAddMissingNew_all.ts","time":227,"edits":2,"cost":"5.31"},{"name":"tests/cases/fourslash/cancellationWhenfindingAllRefsOnDefinition.ts","time":454,"edits":4,"cost":"5.31"},{"name":"tests/cases/fourslash/addMemberInDeclarationFile.ts","time":226,"edits":2,"cost":"5.31"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance2.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/fourslash/getOccurrencesReturn2.ts","time":226,"edits":2,"cost":"5.31"},{"name":"tests/cases/fourslash/editLambdaArgToTypeParameter1.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportAmbient3.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/fourslash/eval.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/compiler/declFileGenericType2.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditionIsBooleanType.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/compiler/superInObjectLiterals_ES5.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/compiler/typeArgInference.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/fourslash/forIn.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/compiler/genericInference2.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceOptionalProperty.ts","time":226,"edits":2,"cost":"5.31"},{"name":"tests/cases/fourslash/thisBindingInLambda.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/fourslash/server/jsdocTypedefTagNamespace.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/fourslash/goToImplementationInterface_02.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/fourslash/renameInfoForFunctionExpression01.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/fourslash/unusedVariableInBlocks.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/fourslash/referencesForMergedDeclarations2.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/fourslash/getOccurrencesTryCatchFinally3.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesInUnionTypes04.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/compiler/moduleCodeGenTest3.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/fourslash/genericCallSignaturesInNonGenericTypes1.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/compiler/moduleAugmentationGlobal5.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/compiler/aliasUsageInArray.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/compiler/exportStarForValues8.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/compiler/collisionCodeGenModuleWithPrivateMember.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/compiler/unusedParametersinConstructor3.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/compiler/jsFileCompilationHeritageClauseSyntaxOfClass.ts","time":113,"edits":1,"cost":"5.31"},{"name":"tests/cases/fourslash/getEditsForFileRename_unaffectedNonRelativePath.ts","time":225,"edits":2,"cost":"5.30"},{"name":"tests/cases/fourslash/goToImplementationShorthandPropertyAssignment_01.ts","time":225,"edits":2,"cost":"5.30"},{"name":"tests/cases/conformance/types/rest/objectRest.ts","time":112,"edits":1,"cost":"5.30"},{"name":"tests/cases/compiler/exportImport.ts","time":112,"edits":1,"cost":"5.30"},{"name":"tests/cases/compiler/super1.ts","time":112,"edits":1,"cost":"5.30"},{"name":"tests/cases/fourslash/codeFixInferFromUsage_allJS.ts","time":224,"edits":2,"cost":"5.30"},{"name":"tests/cases/fourslash/completionListInTypeParameterOfTypeAlias2.ts","time":112,"edits":1,"cost":"5.30"},{"name":"tests/cases/fourslash/globalCompletionListInsideObjectLiterals.ts","time":224,"edits":2,"cost":"5.30"},{"name":"tests/cases/compiler/jsxEmitWithAttributes.ts","time":112,"edits":1,"cost":"5.30"},{"name":"tests/cases/fourslash/getJavaScriptCompletions20.ts","time":112,"edits":1,"cost":"5.30"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardOfFormInstanceOf.ts","time":112,"edits":1,"cost":"5.30"},{"name":"tests/cases/compiler/declarationMapsWithSourceMap.ts","time":112,"edits":1,"cost":"5.30"},{"name":"tests/cases/fourslash/funduleWithRecursiveReference.ts","time":112,"edits":1,"cost":"5.30"},{"name":"tests/cases/compiler/interfaceAssignmentCompat.ts","time":112,"edits":1,"cost":"5.30"},{"name":"tests/cases/fourslash/getEmitOutputOutFile.ts","time":112,"edits":1,"cost":"5.30"},{"name":"tests/cases/compiler/es6ImportNamedImportMergeErrors.ts","time":112,"edits":1,"cost":"5.30"},{"name":"tests/cases/fourslash/completionListObjectMembers.ts","time":112,"edits":1,"cost":"5.30"},{"name":"tests/cases/compiler/unknownSymbols1.ts","time":112,"edits":1,"cost":"5.30"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnProperty.ts","time":112,"edits":1,"cost":"5.30"},{"name":"tests/cases/compiler/es6MemberScoping.ts","time":112,"edits":1,"cost":"5.30"},{"name":"tests/cases/fourslash/goToDefinitionOverloadsInMultiplePropertyAccesses.ts","time":112,"edits":1,"cost":"5.30"},{"name":"tests/cases/fourslash/importNameCodeFixDefaultExport2.ts","time":224,"edits":2,"cost":"5.30"},{"name":"tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPrivates.ts","time":112,"edits":1,"cost":"5.30"},{"name":"tests/cases/conformance/salsa/inferingFromAny.ts","time":112,"edits":1,"cost":"5.30"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakNotInIterationOrSwitchStatement2.ts","time":112,"edits":1,"cost":"5.30"},{"name":"tests/cases/compiler/letDeclarations-es5-1.ts","time":112,"edits":1,"cost":"5.30"},{"name":"tests/cases/fourslash/signatureHelpWithTriggers01.ts","time":223,"edits":2,"cost":"5.30"},{"name":"tests/cases/fourslash/jsDocTypeTagQuickInfo2.ts","time":223,"edits":2,"cost":"5.30"},{"name":"tests/cases/fourslash/refactorExtractType27.ts","time":222,"edits":2,"cost":"5.29"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardTypeOfUndefined.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithStringType.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/fourslash/findAllRefsForVariableInExtendsClause01.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/fourslash/mergedDeclarations2.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/fourslash/findAllRefsForDefaultExport01.ts","time":222,"edits":2,"cost":"5.29"},{"name":"tests/cases/fourslash/completionsImport_keywords.ts","time":222,"edits":2,"cost":"5.29"},{"name":"tests/cases/fourslash/getOccurrencesStringLiterals.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/compiler/constEnumToStringNoComments.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/conformance/types/typeRelationships/comparable/equalityWithUnionTypes01.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/fourslash/completionListInExportClause02.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/fourslash/completionInIncompleteCallExpression.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/fourslash/unclosedStringLiteralErrorRecovery.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/fourslash/shims-pp/getEmitOutput.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/fourslash/completionListInContextuallyTypedArgument.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/fourslash/getEmitOutputWithEmitterErrors.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/fourslash/getJavaScriptSyntacticDiagnostics24.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/compiler/controlFlowLoopAnalysis.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/fourslash/qualifyModuleTypeNames.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/fourslash/memberListInReopenedEnum.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/fourslash/completionListInTypedObjectLiterals2.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames21_ES6.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/compiler/cyclicModuleImport.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/compiler/typeArgInference2.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES6.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration1.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/conformance/types/spread/objectSpreadNoTransform.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/compiler/commentOnArrayElement3.ts","time":111,"edits":1,"cost":"5.29"},{"name":"tests/cases/fourslash/completionImportMeta.ts","time":221,"edits":2,"cost":"5.29"},{"name":"tests/cases/fourslash/getJavaScriptCompletions16.ts","time":221,"edits":2,"cost":"5.29"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportFromAtTypes.ts","time":221,"edits":2,"cost":"5.29"},{"name":"tests/cases/fourslash/getJavaScriptCompletions_tsCheck.ts","time":221,"edits":2,"cost":"5.29"},{"name":"tests/cases/fourslash/codeFixExtendsInterfaceBecomesImplements.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload1.tsx","time":220,"edits":2,"cost":"5.28"},{"name":"tests/cases/compiler/jsxFactoryAndReactNamespace.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/fourslash/goToImplementationClassMethod_01.ts","time":220,"edits":2,"cost":"5.28"},{"name":"tests/cases/compiler/ensureNoCrashExportAssignmentDefineProperrtyPotentialMerge.ts","time":220,"edits":2,"cost":"5.28"},{"name":"tests/cases/fourslash/completionListPrivateMembers2.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportFile3.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/fourslash/tripleSlashRefPathCompletionExtensionsAllowJSTrue.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/conformance/types/contextualTypes/partiallyAnnotatedFunction/partiallyAnnotatedFunctionInferenceWithTypeParameter.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/conformance/types/contextualTypes/jsxAttributes/contextuallyTypedStringLiteralsInJsxAttributes01.tsx","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/conformance/types/mapped/mappedTypesAndObjects.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/fourslash/unusedLocalsInFunction1.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/fourslash/completionListInUnclosedIndexSignature03.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/compiler/narrowingByDiscriminantInLoop.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/fourslash/classRenamingErrorRecovery.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/fourslash/codeFixClassImplementDefaultClass.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/conformance/controlFlow/controlFlowDestructuringDeclaration.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/compiler/mappedTypeInferenceCircularity.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/conformance/salsa/moduleExportNestedNamespaces.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/compiler/declFileTypeAnnotationParenType.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/compiler/genericArray1.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardsInIfStatement.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/fourslash/extendArray.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint3.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/compiler/bases.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/compiler/amdModuleName2.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement14.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/compiler/emitPostComments.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck14.ts","time":110,"edits":1,"cost":"5.28"},{"name":"tests/cases/fourslash/refactorExtractType21.ts","time":218,"edits":2,"cost":"5.27"},{"name":"tests/cases/fourslash/findAllRefsImportDefault.ts","time":218,"edits":2,"cost":"5.27"},{"name":"tests/cases/compiler/overloadingOnConstants1.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance4.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/fourslash/hoverOverComment.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/fourslash/completionListOnParamInClass.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/compiler/sourceMapValidationDecorators.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/fourslash/completionListInvalidMemberNames_startWithSpace.ts","time":218,"edits":2,"cost":"5.27"},{"name":"tests/cases/fourslash/completionListInUnclosedElementAccessExpression02.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/fourslash/quickInfoJSDocFunctionNew.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/fourslash/signatureHelpImplicitConstructor.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/compiler/declFileAmbientExternalModuleWithSingleExportedModule.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/compiler/declFileForClassWithMultipleBaseClasses.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/fourslash/renameAliasExternalModule.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/fourslash/unclosedStringLiteralErrorRecovery4.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/fourslash/nonExistingImport.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/fourslash/deleteExtensionInReopenedInterface.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/compiler/requireOfJsonFileWithDeclaration.ts","time":218,"edits":2,"cost":"5.27"},{"name":"tests/cases/fourslash/todoComments12.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/fourslash/completionListInObjectLiteral3.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionInSystem1.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/fourslash/renameInheritedProperties6.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/fourslash/renameAlias3.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplatesIncomplete5.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5iterable.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithoutExport.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/compiler/genericConstructInvocationWithNoTypeArg.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/fourslash/semanticClassificatonTypeAlias.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/compiler/tsxSpreadDoesNotReportExcessProps.tsx","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/compiler/augmentedTypesClass.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/compiler/implicitAnyAnyReturningFunction.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/compiler/checkSuperCallBeforeThisAccessing7.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/compiler/abstractClassInLocalScopeIsAbstract.ts","time":109,"edits":1,"cost":"5.27"},{"name":"tests/cases/fourslash/codefixEnableExperimentalDecorators_blankCompilerOptionsInJsconfig.ts","time":217,"edits":2,"cost":"5.27"},{"name":"tests/cases/fourslash/renameDestructuringDeclarationInFor.ts","time":217,"edits":2,"cost":"5.27"},{"name":"tests/cases/fourslash/codeFixAwaitInSyncFunction11.ts","time":217,"edits":2,"cost":"5.27"},{"name":"tests/cases/fourslash/completionForComputedStringProperties.ts","time":216,"edits":2,"cost":"5.26"},{"name":"tests/cases/fourslash/formattingOptionsChange.ts","time":216,"edits":2,"cost":"5.26"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/compiler/arrayAssignmentTest5.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/conformance/es6/destructuring/destructuringVariableDeclaration2.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersWithArrayTypeAnnotations.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/conformance/internalModules/importDeclarations/exportImportAlias.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentWithInvalidOperands.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/fourslash/renameModuleToVar.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/fourslash/semanticClassificationInstantiatedModuleWithVariableOfSameName2.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentity.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/fourslash/completionListForTransitivelyExportedMembers04.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/compiler/unusedLocalsAndParametersDeferred.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess_js_3.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/fourslash/goToImplementationLocal_03.ts","time":216,"edits":2,"cost":"5.26"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceObjectLiteral.ts","time":216,"edits":2,"cost":"5.26"},{"name":"tests/cases/compiler/interMixingModulesInterfaces1.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/conformance/es6/destructuring/destructuringParameterProperties4.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/compiler/declFileObjectLiteralWithAccessors.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/fourslash/completionListInObjectBindingPattern02.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of34.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/fourslash/superInsideInnerClass.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/fourslash/quickInfoFromEmptyBlockComment.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess_js_1.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/compiler/promiseIdentityWithAny2.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardOfFormIsType.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/fourslash/javascriptModules20.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/compiler/nestedBlockScopedBindings5.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/compiler/wrappedIncovations1.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/compiler/genericConstructExpressionWithoutArgs.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithMultipleBases3.ts","time":108,"edits":1,"cost":"5.26"},{"name":"tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.decmialNegative.ts","time":215,"edits":2,"cost":"5.26"},{"name":"tests/cases/fourslash/codeFixClassImplementInterface_optionQuote.ts","time":215,"edits":2,"cost":"5.26"},{"name":"tests/cases/fourslash/crossFileQuickInfoExportedTypeDoesNotUseImportType.ts","time":215,"edits":2,"cost":"5.26"},{"name":"tests/cases/fourslash/codeFixSpellingVsMissingMember.ts","time":214,"edits":2,"cost":"5.25"},{"name":"tests/cases/fourslash/proto.ts","time":107,"edits":1,"cost":"5.25"},{"name":"tests/cases/fourslash/referencesForFunctionOverloads.ts","time":107,"edits":1,"cost":"5.25"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts","time":107,"edits":1,"cost":"5.25"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution5_classic.ts","time":107,"edits":1,"cost":"5.25"},{"name":"tests/cases/compiler/blockScopedBindingsReassignedInLoop3.ts","time":107,"edits":1,"cost":"5.25"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplatesIncomplete2.ts","time":107,"edits":1,"cost":"5.25"},{"name":"tests/cases/conformance/parser/ecmascript5/parserUsingConstructorAsIdentifier.ts","time":107,"edits":1,"cost":"5.25"},{"name":"tests/cases/conformance/classes/classDeclarations/classExtendingBuiltinType.ts","time":107,"edits":1,"cost":"5.25"},{"name":"tests/cases/compiler/fatarrowfunctions.ts","time":107,"edits":1,"cost":"5.25"},{"name":"tests/cases/fourslash/stringLiteralCompletionsForStringEnumContextualType.ts","time":214,"edits":2,"cost":"5.25"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplatesWithOverloadedTags8.ts","time":107,"edits":1,"cost":"5.25"},{"name":"tests/cases/fourslash/documentHighlightAtInheritedProperties4.ts","time":107,"edits":1,"cost":"5.25"},{"name":"tests/cases/fourslash/contextualTypingGenericFunction1.ts","time":107,"edits":1,"cost":"5.25"},{"name":"tests/cases/compiler/modularizeLibrary_NoErrorDuplicateLibOptions1.ts","time":107,"edits":1,"cost":"5.25"},{"name":"tests/cases/fourslash/renameJsPropertyAssignment3.ts","time":107,"edits":1,"cost":"5.25"},{"name":"tests/cases/compiler/privateVisibility.ts","time":107,"edits":1,"cost":"5.25"},{"name":"tests/cases/fourslash/quickInfoOnGenericClass.ts","time":107,"edits":1,"cost":"5.25"},{"name":"tests/cases/fourslash/completionListInstanceProtectedMembers4.ts","time":107,"edits":1,"cost":"5.25"},{"name":"tests/cases/compiler/contextualTypingTwoInstancesOfSameTypeParameter.ts","time":107,"edits":1,"cost":"5.25"},{"name":"tests/cases/compiler/internalAliasVar.ts","time":107,"edits":1,"cost":"5.25"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of24.ts","time":107,"edits":1,"cost":"5.25"},{"name":"tests/cases/compiler/es5ExportDefaultFunctionDeclaration.ts","time":107,"edits":1,"cost":"5.25"},{"name":"tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess6.ts","time":107,"edits":1,"cost":"5.25"},{"name":"tests/cases/compiler/aliasWithInterfaceExportAssignmentUsedInVarInitializer.ts","time":107,"edits":1,"cost":"5.25"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateStringsWithTagsTypedAsAny.ts","time":107,"edits":1,"cost":"5.25"},{"name":"tests/cases/compiler/superWithGenerics.ts","time":107,"edits":1,"cost":"5.25"},{"name":"tests/cases/fourslash/refactorExtractType30.ts","time":213,"edits":2,"cost":"5.25"},{"name":"tests/cases/compiler/reverseMappedPartiallyInferableTypes.ts","time":213,"edits":2,"cost":"5.25"},{"name":"tests/cases/compiler/numberVsBigIntOperations.ts","time":213,"edits":2,"cost":"5.25"},{"name":"tests/cases/fourslash/referenceToClass.ts","time":213,"edits":2,"cost":"5.25"},{"name":"tests/cases/fourslash/navigationItemsOverloads2.ts","time":213,"edits":2,"cost":"5.25"},{"name":"tests/cases/fourslash/findAllRefsReExports.ts","time":531,"edits":5,"cost":"5.25"},{"name":"tests/cases/fourslash/refactorExtractType33.ts","time":212,"edits":2,"cost":"5.24"},{"name":"tests/cases/conformance/expressions/functionCalls/newWithSpread.ts","time":106,"edits":1,"cost":"5.24"},{"name":"tests/cases/compiler/privacyTypeParameterOfFunction.ts","time":106,"edits":1,"cost":"5.24"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithCallSignatures.ts","time":106,"edits":1,"cost":"5.24"},{"name":"tests/cases/fourslash/importJsNodeModule4.ts","time":106,"edits":1,"cost":"5.24"},{"name":"tests/cases/fourslash/interfaceExtendsPrimitive.ts","time":106,"edits":1,"cost":"5.24"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithNumericIndexers3.ts","time":106,"edits":1,"cost":"5.24"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionCheckReturntype1.ts","time":106,"edits":1,"cost":"5.24"},{"name":"tests/cases/fourslash/getOccurrencesReturn3.ts","time":106,"edits":1,"cost":"5.24"},{"name":"tests/cases/fourslash/goToDefinitionTypePredicate.ts","time":106,"edits":1,"cost":"5.24"},{"name":"tests/cases/fourslash/goToDefinitionAcrossMultipleProjects.ts","time":212,"edits":2,"cost":"5.24"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionReturnPromiseOfAny.ts","time":106,"edits":1,"cost":"5.24"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment17.ts","time":106,"edits":1,"cost":"5.24"},{"name":"tests/cases/conformance/types/import/importTypeGenericTypes.ts","time":106,"edits":1,"cost":"5.24"},{"name":"tests/cases/fourslash/renameRest.ts","time":106,"edits":1,"cost":"5.24"},{"name":"tests/cases/conformance/externalModules/circularReference.ts","time":106,"edits":1,"cost":"5.24"},{"name":"tests/cases/fourslash/tsxGoToDefinitionIntrinsics.ts","time":106,"edits":1,"cost":"5.24"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments2.ts","time":106,"edits":1,"cost":"5.24"},{"name":"tests/cases/compiler/extendingClassFromAliasAndUsageInIndexer.ts","time":106,"edits":1,"cost":"5.24"},{"name":"tests/cases/fourslash/refactorExtractType37.ts","time":211,"edits":2,"cost":"5.24"},{"name":"tests/cases/fourslash/commentsLinePreservation.ts","time":211,"edits":2,"cost":"5.24"},{"name":"tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments3.tsx","time":211,"edits":2,"cost":"5.24"},{"name":"tests/cases/fourslash/augmentedTypesModule4.ts","time":211,"edits":2,"cost":"5.24"},{"name":"tests/cases/fourslash/goToImplementationTypeAlias_00.ts","time":210,"edits":2,"cost":"5.24"},{"name":"unittests:: tsserver:: with skipLibCheck","time":105,"edits":1,"cost":"5.24"},{"name":"tests/cases/conformance/expressions/typeAssertions/constAssertions.ts","time":210,"edits":2,"cost":"5.24"},{"name":"unittests:: tsserver:: compileOnSave:: CompileOnSaveAffectedFileListRequest with and without projectFileName in request","time":105,"edits":1,"cost":"5.24"},{"name":"tests/cases/conformance/statements/for-inStatements/for-inStatements.ts","time":105,"edits":1,"cost":"5.24"},{"name":"tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts","time":105,"edits":1,"cost":"5.24"},{"name":"tests/cases/compiler/declFileAccessors.ts","time":105,"edits":1,"cost":"5.24"},{"name":"tests/cases/conformance/types/intersection/intersectionThisTypes.ts","time":105,"edits":1,"cost":"5.24"},{"name":"tests/cases/compiler/constEnumMergingWithValues4.ts","time":105,"edits":1,"cost":"5.24"},{"name":"tests/cases/compiler/generics2NoError.ts","time":105,"edits":1,"cost":"5.24"},{"name":"tests/cases/fourslash/completionListBeforeNewScope01.ts","time":105,"edits":1,"cost":"5.24"},{"name":"tests/cases/compiler/es6ExportClauseWithoutModuleSpecifierInEs5.ts","time":105,"edits":1,"cost":"5.24"},{"name":"tests/cases/conformance/jsx/tsxReactEmit7.tsx","time":105,"edits":1,"cost":"5.24"},{"name":"tests/cases/compiler/callbacksDontShareTypes.ts","time":105,"edits":1,"cost":"5.24"},{"name":"tests/cases/fourslash/completionListOnFunctionCallWithOptionalArgument.ts","time":105,"edits":1,"cost":"5.24"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardsInClassMethods.ts","time":105,"edits":1,"cost":"5.24"},{"name":"tests/cases/conformance/types/rest/objectRestNegative.ts","time":105,"edits":1,"cost":"5.24"},{"name":"tests/cases/fourslash/todoComments6.ts","time":105,"edits":1,"cost":"5.24"},{"name":"tests/cases/fourslash/genericCloduleCompletionList.ts","time":105,"edits":1,"cost":"5.24"},{"name":"tests/cases/fourslash/shims/goToTypeDefinition.ts","time":105,"edits":1,"cost":"5.24"},{"name":"tests/cases/fourslash/goToImplementationInterfaceMethod_04.ts","time":210,"edits":2,"cost":"5.24"},{"name":"tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditoinIsStringType.ts","time":105,"edits":1,"cost":"5.24"},{"name":"tests/cases/compiler/es6ImportNamedImportInIndirectExportAssignment.ts","time":105,"edits":1,"cost":"5.24"},{"name":"tests/cases/fourslash/goToDefinitionPrimitives.ts","time":105,"edits":1,"cost":"5.24"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck62.ts","time":105,"edits":1,"cost":"5.24"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of17.ts","time":105,"edits":1,"cost":"5.24"},{"name":"tests/cases/compiler/shorthand-property-es6-amd.ts","time":105,"edits":1,"cost":"5.24"},{"name":"tests/cases/compiler/genericCloneReturnTypes.ts","time":105,"edits":1,"cost":"5.24"},{"name":"tests/cases/fourslash/codeFixAddParameterNames.ts","time":209,"edits":2,"cost":"5.23"},{"name":"tests/cases/fourslash/getEditsForFileRename_directory_noUpdateNodeModulesImport.ts","time":209,"edits":2,"cost":"5.23"},{"name":"tests/cases/fourslash/findAllRefsOnDefinition.ts","time":313,"edits":3,"cost":"5.23"},{"name":"tests/cases/fourslash/server/declarationMapGoToDefinition.ts","time":104,"edits":1,"cost":"5.23"},{"name":"tests/cases/compiler/fixingTypeParametersRepeatedly2.ts","time":104,"edits":1,"cost":"5.23"},{"name":"tests/cases/fourslash/unusedLocalsInFunction2.ts","time":208,"edits":2,"cost":"5.23"},{"name":"tests/cases/fourslash/goToDefinitionObjectBindingElementPropertyName01.ts","time":104,"edits":1,"cost":"5.23"},{"name":"tests/cases/fourslash/signatureHelpConstructExpression.ts","time":104,"edits":1,"cost":"5.23"},{"name":"tests/cases/fourslash/completionListForExportEquals2.ts","time":104,"edits":1,"cost":"5.23"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardsInFunctionAndModuleBlock.ts","time":104,"edits":1,"cost":"5.23"},{"name":"tests/cases/fourslash/completionListOnAliasedModule.ts","time":104,"edits":1,"cost":"5.23"},{"name":"tests/cases/fourslash/completionListInClosedFunction03.ts","time":104,"edits":1,"cost":"5.23"},{"name":"tests/cases/fourslash/shims/getSemanticDiagnostics.ts","time":104,"edits":1,"cost":"5.23"},{"name":"tests/cases/fourslash/quickInfoForDerivedGenericTypeWithConstructor.ts","time":104,"edits":1,"cost":"5.23"},{"name":"tests/cases/fourslash/referencesForGlobals5.ts","time":104,"edits":1,"cost":"5.23"},{"name":"tests/cases/fourslash/getEmitOutputOut.ts","time":104,"edits":1,"cost":"5.23"},{"name":"tests/cases/compiler/requireOfJsonFileTypes.ts","time":104,"edits":1,"cost":"5.23"},{"name":"tests/cases/fourslash/renameAlias.ts","time":104,"edits":1,"cost":"5.23"},{"name":"tests/cases/fourslash/signatureHelpSimpleSuperCall.ts","time":104,"edits":1,"cost":"5.23"},{"name":"tests/cases/fourslash/completionListAfterObjectLiteral1.ts","time":104,"edits":1,"cost":"5.23"},{"name":"tests/cases/compiler/es6ExportClauseInEs5.ts","time":104,"edits":1,"cost":"5.23"},{"name":"tests/cases/conformance/es6/spread/iteratorSpreadInCall9.ts","time":104,"edits":1,"cost":"5.23"},{"name":"tests/cases/fourslash/shims/getQuickInfoAtPosition.ts","time":104,"edits":1,"cost":"5.23"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts","time":104,"edits":1,"cost":"5.23"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration16.ts","time":104,"edits":1,"cost":"5.23"},{"name":"tests/cases/compiler/ambiguousCallsWhereReturnTypesAgree.ts","time":104,"edits":1,"cost":"5.23"},{"name":"tests/cases/compiler/contextualTyping13.ts","time":104,"edits":1,"cost":"5.23"},{"name":"tests/cases/conformance/expressions/asOperator/asOperator3.ts","time":104,"edits":1,"cost":"5.23"},{"name":"tests/cases/compiler/collisionThisExpressionAndLocalVarInProperty.ts","time":104,"edits":1,"cost":"5.23"},{"name":"tests/cases/fourslash/completionsDiscriminatedUnion.ts","time":207,"edits":2,"cost":"5.22"},{"name":"tests/cases/fourslash/codeFixAwaitShouldNotCrashIfNotInFunction.ts","time":207,"edits":2,"cost":"5.22"},{"name":"tests/cases/conformance/async/es5/asyncMethodWithSuper_es5.ts","time":207,"edits":2,"cost":"5.22"},{"name":"tests/cases/fourslash/refactorExtractType29.ts","time":206,"edits":2,"cost":"5.22"},{"name":"tests/cases/fourslash/getJavaScriptQuickInfo3.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/fourslash/getOccurrencesThis2.ts","time":206,"edits":2,"cost":"5.22"},{"name":"tests/cases/fourslash/completionListForTransitivelyExportedMembers03.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/fourslash/getOccurrencesTryCatchFinally4.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/fourslash/completionInTypeOf2.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/fourslash/completionListOnAliases3.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/fourslash/getOccurrencesAsyncAwait.ts","time":206,"edits":2,"cost":"5.22"},{"name":"tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/conformance/decorators/class/decoratorInstantiateModulesInFunctionBodies.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/fourslash/completionListInClosedFunction06.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/compiler/dynamicNamesErrors.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/fourslash/completionListAfterRegularExpressionLiteral03.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/fourslash/quickInfoForObjectBindingElementName02.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/fourslash/getEmitOutputWithSyntacticErrorsForMultipleFiles2.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/fourslash/quickInfoOnThis2.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/compiler/internalAliasEnumInsideLocalModuleWithExport.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/fourslash/goToDefinitionShadowVariableInsideModule.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/fourslash/codeFixUnusedLabel_noSuggestionIfDisabled.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/fourslash/codeFixCalledES2015Import10.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCanBeAssigned.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTags02.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/fourslash/genericTypeAliasIntersectionCompletions.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment18.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/fourslash/goToDefinitionUndefinedSymbols.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/fourslash/assignToExistingClass.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/compiler/circularInferredTypeOfVariable.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/fourslash/genericArityEnforcementAfterEdit.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace02.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/fourslash/quickInfoOfStringPropertyNames1.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/fourslash/getOccurrencesOfDecorators.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration4.d.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/compiler/modularizeLibrary_ErrorFromUsingWellknownSymbolWithOutES6WellknownSymbolLib.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/compiler/classIndexer2.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/compiler/i3.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/compiler/checkInterfaceBases.ts","time":103,"edits":1,"cost":"5.22"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportAllowSyntheticDefaultImports5.ts","time":205,"edits":2,"cost":"5.21"},{"name":"tests/cases/fourslash/codeFixCalledES2015Import7.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/conformance/types/any/assignEveryTypeToAny.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/compiler/constDeclarations-scopes.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/fourslash/completionListInUnclosedObjectTypeLiteralInSignature01.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/fourslash/referencesForImports.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/fourslash/renameStringLiteralTypes.ts","time":204,"edits":2,"cost":"5.21"},{"name":"tests/cases/fourslash/exportEqualCallableInterface.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/fourslash/commentsUnion.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/compiler/controlFlowArrayErrors.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/compiler/declFileModuleWithPropertyOfTypeModule.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/fourslash/memberCompletionOnTypeParameters2.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/fourslash/goToTypeDefinition.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/compiler/moduleMemberWithoutTypeAnnotation1.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/conformance/es6/destructuring/emptyAssignmentPatterns02_ES5.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/fourslash/jsRequireQuickInfo.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplatesWithOverloadedTags2.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/fourslash/incompatibleOverride.ts","time":204,"edits":2,"cost":"5.21"},{"name":"tests/cases/conformance/jsx/tsxReactEmitNesting.tsx","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/fourslash/refactorConvertImport_useDefault.ts","time":204,"edits":2,"cost":"5.21"},{"name":"tests/cases/fourslash/unusedConstantInFunction1.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression4_es2017.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/fourslash/completionForStringLiteral5.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess_js_7.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/fourslash/quickInfoForFunctionDeclaration.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/fourslash/noQuickInfoForLabel.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType4_ES5.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/conformance/types/typeParameters/typeArgumentLists/typeParameterAsTypeParameterConstraintTransitively.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/compiler/moduleAugmentationCollidingNamesInAugmentation1.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/fourslash/widenedTypes.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/fourslash/signatureHelpObjectLiteral.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/conformance/types/typeRelationships/bestCommonType/arrayLiteralWithMultipleBestCommonTypes.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/fourslash/staticPrototypePropertyOnClass.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/fourslash/server/jsdocTypedefTagGoToDefinition.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/compiler/moduleExports1.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/compiler/unusedTypeParameterInLambda3.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/conformance/functions/parameterInitializersForwardReferencing.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/compiler/compoundVarDecl1.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/compiler/importedModuleClassNameClash.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/fourslash/breakpointValidationImports.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/compiler/emptyExpr.ts","time":102,"edits":1,"cost":"5.21"},{"name":"tests/cases/fourslash/codeFixAddConvertToUnknownForNonOverlappingTypes7.ts","time":203,"edits":2,"cost":"5.20"},{"name":"tests/cases/fourslash/refactorConvertExport_namedToDefault_alreadyHasDefault.ts","time":203,"edits":2,"cost":"5.20"},{"name":"tests/cases/fourslash/goToImplementationEnum_01.ts","time":202,"edits":2,"cost":"5.20"},{"name":"tests/cases/fourslash/renameForDefaultExport01.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/fourslash/completionForStringLiteralInIndexedAccess01.ts","time":202,"edits":2,"cost":"5.20"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardsObjectMethods.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/conformance/es2019/importMeta/importMeta.ts","time":202,"edits":2,"cost":"5.20"},{"name":"tests/cases/fourslash/signatureHelpEmptyList.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/fourslash/server/definition01.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/fourslash/getOccurrencesThis.ts","time":202,"edits":2,"cost":"5.20"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess_js_5.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/compiler/unionPropertyExistence.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/fourslash/renameJsExports03.ts","time":202,"edits":2,"cost":"5.20"},{"name":"tests/cases/compiler/declarationEmitFirstTypeArgumentGenericFunctionType.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/fourslash/stringPropertyNames2.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes2.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/fourslash/overloadObjectLiteralCrash.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/compiler/destructureOptionalParameter.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/conformance/emitter/es2015/asyncGenerators/emitter.asyncGenerators.functionDeclarations.es2015.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/compiler/instanceofWithStructurallyIdenticalTypes.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/compiler/staticPropSuper.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/fourslash/completionListInUnclosedTaggedTemplate02.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/compiler/readonlyInDeclarationFile.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/fourslash/commentsMultiModuleSingleFile.ts","time":202,"edits":2,"cost":"5.20"},{"name":"tests/cases/compiler/typeParameterExtendingUnion1.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/compiler/collisionCodeGenModuleWithModuleChildren.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/fourslash/contextuallyTypedObjectLiteralMethodDeclarationParam01.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance5.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/fourslash/signatureHelpInParenthetical.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/compiler/overloadOnGenericClassAndNonGenericClass.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/compiler/bestCommonTypeWithOptionalProperties.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/compiler/exhaustiveSwitchWithWideningLiteralTypes.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/conformance/types/primitives/void/validVoidAssignments.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/compiler/binaryArithmatic2.ts","time":101,"edits":1,"cost":"5.20"},{"name":"tests/cases/fourslash/findAllRefsForObjectSpread.ts","time":402,"edits":4,"cost":"5.19"},{"name":"tests/cases/fourslash/genericFunctionReturnType.ts","time":201,"edits":2,"cost":"5.19"},{"name":"tests/cases/compiler/transformParenthesizesConditionalSubexpression.ts","time":201,"edits":2,"cost":"5.19"},{"name":"tests/cases/fourslash/codeFixConvertToMappedObjectType12.ts","time":301,"edits":3,"cost":"5.19"},{"name":"tests/cases/fourslash/refactorExtractType32.ts","time":200,"edits":2,"cost":"5.19"},{"name":"tests/cases/fourslash/shims-pp/getReferencesAtPosition.ts","time":300,"edits":3,"cost":"5.19"},{"name":"tests/cases/conformance/expressions/functionCalls/overloadResolution.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/fourslash/shims/getEmitOutput.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/fourslash/recursiveWrappedTypeParameters1.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/fourslash/completionListStaticProtectedMembers3.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/conformance/jsdoc/checkObjectDefineProperty.ts","time":200,"edits":2,"cost":"5.19"},{"name":"tests/cases/fourslash/goToImplementationInterface_05.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/fourslash/findAllReferencesJSDocFunctionNew.ts","time":200,"edits":2,"cost":"5.19"},{"name":"tests/cases/fourslash/referencesForInheritedProperties5.ts","time":200,"edits":2,"cost":"5.19"},{"name":"tests/cases/compiler/moduleAugmentationImportsAndExports1.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherType.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/fourslash/findAllRefsForDefaultExport_reExport_allowSyntheticDefaultImports.ts","time":300,"edits":3,"cost":"5.19"},{"name":"tests/cases/fourslash/server/occurrences01.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES6.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/nullIsSubtypeOfEverythingButUndefined.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/fourslash/completionListAtIdentifierDefinitionLocations_enums.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/fourslash/selfReferencedExternalModule2.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/compiler/controlFlowJavascript.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/compiler/shorthandOfExportedEntity01_targetES2015_CommonJS.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/compiler/noConstraintInReturnType1.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesWithModuleES6.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/compiler/declFileFunctions.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/compiler/declarationEmitExpressionInExtends3.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/compiler/noImplicitAnyParametersInClass.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/fourslash/quickInfoForObjectBindingElementPropertyName01.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/fourslash/jsDocFunctionSignatures7.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/compiler/typeParameterOrderReversal.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression7_es6.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/compiler/moduleResolutionWithSymlinks_notInNodeModules.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/compiler/es6ImportNamedImportAmd.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/compiler/systemModule9.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/conformance/expressions/typeGuards/typePredicateOnVariableDeclaration01.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardNarrowsToLiteralType.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/compiler/protoAsIndexInIndexExpression.ts","time":100,"edits":1,"cost":"5.19"},{"name":"tests/cases/fourslash/referencesForUnionProperties.ts","time":399,"edits":4,"cost":"5.18"},{"name":"tests/cases/fourslash/cloduleAsBaseClass2.ts","time":299,"edits":3,"cost":"5.18"},{"name":"tests/cases/fourslash/classInterfaceInsert.ts","time":199,"edits":2,"cost":"5.18"},{"name":"tests/cases/fourslash/codeFixUnusedIdentifier_all_prefix.ts","time":199,"edits":2,"cost":"5.18"},{"name":"tests/cases/fourslash/referencesForContextuallyTypedObjectLiteralProperties.ts","time":199,"edits":2,"cost":"5.18"},{"name":"tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction12.ts","time":199,"edits":2,"cost":"5.18"},{"name":"unittests:: config:: tsconfigParsing:: parseConfigFileTextToJson","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/compiler/moduleAugmentationImportsAndExports2.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/fourslash/codeFixUnusedIdentifier_jsdocTypeParameter.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersOptionality.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/fourslash/server/jsdocTypedefTagRename03.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/fourslash/server/jsdocCallbackTagNavigateTo.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnProperty.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/fourslash/renameCommentsAndStrings1.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/fourslash/tripleSlashRefPathCompletionRootdirs.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/compiler/thisBinding.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/fourslash/signatureHelpAtEOF.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/compiler/classCannotExtendVar.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty39.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/fourslash/unusedMethodInClass5.ts","time":198,"edits":2,"cost":"5.18"},{"name":"tests/cases/compiler/unusedLocalsOnFunctionExpressionWithinFunctionExpression1.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/conformance/es6/Symbols/symbolDeclarationEmit4.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of46.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/compiler/anyIdenticalToItself.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/fourslash/getRenameInfoTests1.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration11.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures3.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/compiler/classUpdateTests.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/compiler/overloadRet.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName2.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/compiler/duplicateVarAndImport.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/compiler/noEmitHelpers.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/compiler/classExpressionWithStaticPropertiesES63.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts","time":99,"edits":1,"cost":"5.18"},{"name":"tests/cases/fourslash/refactorExtractType28.ts","time":197,"edits":2,"cost":"5.17"},{"name":"tests/cases/fourslash/augmentedTypesModule1.ts","time":197,"edits":2,"cost":"5.17"},{"name":"tests/cases/conformance/controlFlow/typeGuardsAsAssertions.ts","time":196,"edits":2,"cost":"5.17"},{"name":"tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditoinIsAnyType.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/compiler/structuralTypeInDeclareFileForModule.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/fourslash/codeFixInferFromUsageEmptyTypePriority.ts","time":196,"edits":2,"cost":"5.17"},{"name":"tests/cases/fourslash/jsDocServices.ts","time":196,"edits":2,"cost":"5.17"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern6.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/fourslash/completionForStringLiteralNonrelativeImport12.ts","time":294,"edits":3,"cost":"5.17"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/fourslash/completionsAfterAsyncInObjectLiteral.ts","time":196,"edits":2,"cost":"5.17"},{"name":"tests/cases/conformance/jsx/tsxUnionElementType5.tsx","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/fourslash/unusedClassInNamespace1.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/compiler/argumentsObjectIterator03_ES5.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpressionDivideAmbiguity2.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck27.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/compiler/declFileAliasUseBeforeDeclaration.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/compiler/optionalPropertiesTest.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/fourslash/completionListInClosedFunction02.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/conformance/classes/members/accessibility/protectedClassPropertyAccessibleWithinSubclass.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings16_ES6.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/conformance/expressions/arrayLiterals/arrayLiterals2ES5.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/compiler/castExpressionParentheses.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/compiler/capturedLetConstInLoop9_ES6.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/fourslash/codeFixDisableJsDiagnosticsInFile3.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardsInConditionalExpression.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/compiler/recursiveBaseConstructorCreation3.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/compiler/enumLiteralAssignableToEnumInsideUnion.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/conformance/types/thisType/typeRelationships.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/compiler/declarationMapsMultifile.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/conformance/es6/Symbols/symbolType12.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/conformance/classes/constructorDeclarations/superCalls/superCallInConstructorWithNoBaseType.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/compiler/downlevelLetConst13.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/compiler/commentsArgumentsOfCallExpression1.ts","time":98,"edits":1,"cost":"5.17"},{"name":"tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction6.ts","time":195,"edits":2,"cost":"5.16"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts","time":97,"edits":1,"cost":"5.16"},{"name":"tests/cases/compiler/es6ImportNamedImport.ts","time":97,"edits":1,"cost":"5.16"},{"name":"tests/cases/compiler/knockout.ts","time":97,"edits":1,"cost":"5.16"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts","time":97,"edits":1,"cost":"5.16"},{"name":"tests/cases/compiler/interfaceDeclaration3.ts","time":97,"edits":1,"cost":"5.16"},{"name":"tests/cases/conformance/async/es5/asyncAwaitIsolatedModules_es5.ts","time":97,"edits":1,"cost":"5.16"},{"name":"tests/cases/fourslash/errorInIncompleteMethodInObjectLiteral.ts","time":97,"edits":1,"cost":"5.16"},{"name":"tests/cases/fourslash/completionListInClosedObjectTypeLiteralInSignature01.ts","time":97,"edits":1,"cost":"5.16"},{"name":"tests/cases/fourslash/shims/getDefinitionAtPosition.ts","time":97,"edits":1,"cost":"5.16"},{"name":"tests/cases/fourslash/goToImplementationLocal_07.ts","time":194,"edits":2,"cost":"5.16"},{"name":"tests/cases/fourslash/completionListInUnclosedSpreadExpression02.ts","time":97,"edits":1,"cost":"5.16"},{"name":"tests/cases/conformance/statements/throwStatements/throwStatements.ts","time":97,"edits":1,"cost":"5.16"},{"name":"tests/cases/fourslash/contextualTypingOfGenericCallSignatures1.ts","time":97,"edits":1,"cost":"5.16"},{"name":"tests/cases/compiler/es6ImportWithoutFromClause.ts","time":97,"edits":1,"cost":"5.16"},{"name":"tests/cases/compiler/requireOfJsonFileWithoutOutDir.ts","time":97,"edits":1,"cost":"5.16"},{"name":"tests/cases/fourslash/getJavaScriptQuickInfo7.ts","time":97,"edits":1,"cost":"5.16"},{"name":"tests/cases/conformance/salsa/multipleDeclarations.ts","time":97,"edits":1,"cost":"5.16"},{"name":"tests/cases/conformance/jsx/tsxUnionElementType2.tsx","time":97,"edits":1,"cost":"5.16"},{"name":"tests/cases/compiler/declarationEmitDestructuring2.ts","time":97,"edits":1,"cost":"5.16"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName24.ts","time":97,"edits":1,"cost":"5.16"},{"name":"tests/cases/fourslash/codeFixInferFromUsageStringIndexSignatureJS.ts","time":290,"edits":3,"cost":"5.15"},{"name":"tests/cases/fourslash/refactorExtractType11.ts","time":193,"edits":2,"cost":"5.15"},{"name":"tests/cases/fourslash/findAllRefsExportNotAtTopLevel.ts","time":193,"edits":2,"cost":"5.15"},{"name":"tests/cases/fourslash/codeFixConvertToMappedObjectType11.ts","time":193,"edits":2,"cost":"5.15"},{"name":"tests/cases/fourslash/refactorExtractType14.ts","time":192,"edits":2,"cost":"5.15"},{"name":"tests/cases/fourslash/codeFixInferFromUsageMultipleParameters.ts","time":192,"edits":2,"cost":"5.15"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithOptionalParameters2.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/fourslash/javascriptModules23.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/compiler/jsxFactoryNotIdentifierOrQualifiedName2.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/fourslash/getJavaScriptQuickInfo1.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/fourslash/completionWithDotFollowedByNamespaceKeyword.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/fourslash/goToImplementationInvalid.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/fourslash/completionListAtDeclarationOfParameterType.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/fourslash/completionForStringLiteralNonrelativeImportTypings3.ts","time":192,"edits":2,"cost":"5.15"},{"name":"tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression1_es6.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/compiler/declFileTypeAnnotationTupleType.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/compiler/privacyInterfaceExtendsClauseDeclFile.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/conformance/constEnums/constEnumPropertyAccess1.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/fourslash/completionListInStringLiterals1.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/fourslash/javaScriptModulesWithBackticks.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/compiler/objectCreate.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/fourslash/goToTypeDefinitionAliases.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/fourslash/jsDocFunctionSignatures4.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/conformance/types/localTypes/localTypes3.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/conformance/jsx/tsxEmit3.tsx","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/fourslash/signatureHelpForSuperCalls1.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/conformance/jsx/tsxReactEmitWhitespace.tsx","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersection.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/fourslash/unusedVariableInClass3.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/fourslash/codeFixInferFromUsageMember2.ts","time":192,"edits":2,"cost":"5.15"},{"name":"tests/cases/compiler/assignmentCompatBug5.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability05.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/compiler/moduleAugmentationGlobal1.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedInOperatorES6.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/compiler/augmentedTypesVar.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/conformance/scanner/ecmascript5/scannerS7.8.4_A7.1_T4.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment3.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/compiler/chainedAssignment3.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ParameterLists/parserErrorRecovery_ParameterList5.ts","time":96,"edits":1,"cost":"5.15"},{"name":"tests/cases/fourslash/codeFixAddConvertToUnknownForNonOverlappingTypes8.ts","time":191,"edits":2,"cost":"5.14"},{"name":"tests/cases/fourslash/codeFixCalledES2015Import12.ts","time":191,"edits":2,"cost":"5.14"},{"name":"tests/cases/fourslash/codeFixConvertToMappedObjectType3.ts","time":191,"edits":2,"cost":"5.14"},{"name":"tests/cases/fourslash/codeFixDisableJsDiagnosticsInFile_tsIgnore_indent.ts","time":191,"edits":2,"cost":"5.14"},{"name":"tests/cases/fourslash/refactorExtractType35.ts","time":190,"edits":2,"cost":"5.14"},{"name":"tests/cases/compiler/protectedMembers.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/fourslash/quickInfoDisplayPartsTypeAlias.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/fourslash/breakpointValidationFor.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/fourslash/signatureHelpInRecursiveType.ts","time":190,"edits":2,"cost":"5.14"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit2.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/conformance/externalModules/umd-augmentation-4.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceMultipleImplements2.ts","time":190,"edits":2,"cost":"5.14"},{"name":"tests/cases/fourslash/findAllRefsJsDocTypeDef.ts","time":190,"edits":2,"cost":"5.14"},{"name":"tests/cases/conformance/async/es5/asyncImportedPromise_es5.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardOfFormInstanceOfOnInterface.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/fourslash/completionListForNonExportedMemberInAmbientModuleWithExportAssignment1.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/fourslash/memberListInFunctionCall.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/fourslash/memberListOnConstructorType.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/compiler/es5-asyncFunctionArrayLiterals.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads03.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/conformance/classes/classDeclarations/mergedClassInterface.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardsWithAny.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/conformance/salsa/typeFromPrototypeAssignment2.ts","time":190,"edits":2,"cost":"5.14"},{"name":"tests/cases/conformance/jsx/checkJsxChildrenProperty2.tsx","time":190,"edits":2,"cost":"5.14"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads02.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/fourslash/goToTypeDefinitionEnumMembers.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/compiler/augmentedClassWithPrototypePropertyOnModule.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/conformance/statements/forStatements/forStatements.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/compiler/aliasInaccessibleModule.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/compiler/funcdecl.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithStringType.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/fourslash/genericWithSpecializedProperties3.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target7.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/fourslash/breakpointValidationConst.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/fourslash/unusedVariableInForLoop1FS.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserForStatement7.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/compiler/downlevelLetConst19.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames42_ES5.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/compiler/typecheckCommaExpression.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/compiler/unusedVariablesinNamespaces2.ts","time":95,"edits":1,"cost":"5.14"},{"name":"tests/cases/conformance/types/literal/literalTypeWidening.ts","time":285,"edits":3,"cost":"5.14"},{"name":"tests/cases/fourslash/renameImportOfExportEquals2.ts","time":284,"edits":3,"cost":"5.13"},{"name":"tests/cases/fourslash/refactorExtractType19.ts","time":189,"edits":2,"cost":"5.13"},{"name":"tests/cases/compiler/noCrashOnParameterNamedRequire.ts","time":189,"edits":2,"cost":"5.13"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceMemberTypeAlias.ts","time":189,"edits":2,"cost":"5.13"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_badRestParam.ts","time":283,"edits":3,"cost":"5.13"},{"name":"tests/cases/fourslash/renameDestructuringAssignmentNestedInFor.ts","time":188,"edits":2,"cost":"5.12"},{"name":"tests/cases/fourslash/renameDestructuringDeclarationInForOf.ts","time":188,"edits":2,"cost":"5.12"},{"name":"tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts","time":94,"edits":1,"cost":"5.12"},{"name":"tests/cases/conformance/controlFlow/typeGuardsNestedAssignments.ts","time":94,"edits":1,"cost":"5.12"},{"name":"tests/cases/fourslash/findAllRefs_jsEnum.ts","time":188,"edits":2,"cost":"5.12"},{"name":"tests/cases/fourslash/codeFixAwaitInSyncFunction7.ts","time":188,"edits":2,"cost":"5.12"},{"name":"tests/cases/fourslash/renameImportRequire.ts","time":188,"edits":2,"cost":"5.12"},{"name":"tests/cases/compiler/privacyTopLevelAmbientExternalModuleImportWithoutExport.ts","time":94,"edits":1,"cost":"5.12"},{"name":"tests/cases/compiler/requireOfJsonFile.ts","time":94,"edits":1,"cost":"5.12"},{"name":"tests/cases/compiler/thisInPropertyBoundDeclarations.ts","time":94,"edits":1,"cost":"5.12"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceMultipleImplementsIntersection2.ts","time":188,"edits":2,"cost":"5.12"},{"name":"tests/cases/fourslash/refactorConvertImport_namespaceToNamed.ts","time":188,"edits":2,"cost":"5.12"},{"name":"tests/cases/fourslash/unusedParameterInFunction1.ts","time":188,"edits":2,"cost":"5.12"},{"name":"tests/cases/compiler/capturedLetConstInLoop8_ES6.ts","time":94,"edits":1,"cost":"5.12"},{"name":"tests/cases/fourslash/noQuickInfoInWhitespace.ts","time":94,"edits":1,"cost":"5.12"},{"name":"tests/cases/fourslash/completionListFunctionMembers.ts","time":94,"edits":1,"cost":"5.12"},{"name":"tests/cases/fourslash/renameDestructuringAssignment.ts","time":94,"edits":1,"cost":"5.12"},{"name":"tests/cases/fourslash/completionListAtIdentifierDefinitionLocations_catch.ts","time":94,"edits":1,"cost":"5.12"},{"name":"tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDeclarations.ts","time":94,"edits":1,"cost":"5.12"},{"name":"tests/cases/fourslash/shims-pp/getSignatureHelpItems.ts","time":94,"edits":1,"cost":"5.12"},{"name":"tests/cases/fourslash/codeFixClassImplementInterface_typeInOtherFile.ts","time":282,"edits":3,"cost":"5.12"},{"name":"tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedImportAlias.ts","time":94,"edits":1,"cost":"5.12"},{"name":"tests/cases/compiler/genericMergedDeclarationUsingTypeParameter2.ts","time":94,"edits":1,"cost":"5.12"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint01.ts","time":94,"edits":1,"cost":"5.12"},{"name":"tests/cases/compiler/reactImportDropped.ts","time":94,"edits":1,"cost":"5.12"},{"name":"tests/cases/compiler/declarationEmitDefaultExport6.ts","time":94,"edits":1,"cost":"5.12"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of38.ts","time":94,"edits":1,"cost":"5.12"},{"name":"tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts","time":94,"edits":1,"cost":"5.12"},{"name":"tests/cases/conformance/jsx/tsxDynamicTagName2.tsx","time":94,"edits":1,"cost":"5.12"},{"name":"tests/cases/compiler/overloadReturnTypes.ts","time":94,"edits":1,"cost":"5.12"},{"name":"tests/cases/compiler/typePredicateInLoop.ts","time":94,"edits":1,"cost":"5.12"},{"name":"tests/cases/compiler/cloduleTest1.ts","time":94,"edits":1,"cost":"5.12"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts","time":94,"edits":1,"cost":"5.12"},{"name":"tests/cases/conformance/es6/Symbols/symbolType14.ts","time":94,"edits":1,"cost":"5.12"},{"name":"tests/cases/fourslash/getEditsForFileRename_directory.ts","time":281,"edits":3,"cost":"5.12"},{"name":"tests/cases/fourslash/quickInfoJsDocTags.ts","time":281,"edits":3,"cost":"5.12"},{"name":"tests/cases/fourslash/importNameCodeFix_avoidRelativeNodeModules.ts","time":187,"edits":2,"cost":"5.12"},{"name":"tests/cases/fourslash/codeFixUnusedIdentifier_all_delete_paramInFunction.ts","time":187,"edits":2,"cost":"5.12"},{"name":"tests/cases/fourslash/codeFixClassExtendAbstractPrivateProperty.ts","time":187,"edits":2,"cost":"5.12"},{"name":"tests/cases/fourslash/completionWithConditionalOperatorMissingColon.ts","time":187,"edits":2,"cost":"5.12"},{"name":"tests/cases/fourslash/importNameCodeFixDefaultExport.ts","time":187,"edits":2,"cost":"5.12"},{"name":"tests/cases/fourslash/completionAfterAtChar.ts","time":187,"edits":2,"cost":"5.12"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringParameterObjectBindingPattern.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/fourslash/codeFixClassPropertyInitialization_all_2.ts","time":186,"edits":2,"cost":"5.11"},{"name":"tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload6.tsx","time":186,"edits":2,"cost":"5.11"},{"name":"tests/cases/conformance/types/intersection/intersectionTypeInference.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/compiler/genericDefaultsJs.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/fourslash/signatureHelpConstructorInheritance.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithAnyOtherType.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/fourslash/goToDefinition_untypedModule.ts","time":186,"edits":2,"cost":"5.11"},{"name":"tests/cases/compiler/propertyOrdering.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/compiler/typePredicateStructuralMatch.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/fourslash/completionListInstanceProtectedMembers.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/fourslash/completionListBeforeKeyword.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of47.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/fourslash/returnRecursiveType.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/fourslash/unclosedMultilineStringLiteralErrorRecovery.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/fourslash/getEditsForFileRename_caseInsensitive.ts","time":186,"edits":2,"cost":"5.11"},{"name":"tests/cases/compiler/jsxFactoryNotIdentifierOrQualifiedName.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/compiler/objectLiteralParameterResolution.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/compiler/blockScopedBindingsReassignedInLoop2.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature7.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/fourslash/getOccurrencesIfElse3.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/fourslash/stringPropertyNames1.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/compiler/declFileEnums.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/compiler/privacyTopLevelAmbientExternalModuleImportWithExport.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionInUMD1.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/compiler/detachedCommentAtStartOfLambdaFunction1.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/conformance/jsx/tsxParseTests1.tsx","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision7.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/compiler/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/parserX_ArrowFunction3.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions14_ES5.ts","time":93,"edits":1,"cost":"5.11"},{"name":"tests/cases/fourslash/importTypeMemberCompletions.ts","time":185,"edits":2,"cost":"5.11"},{"name":"tests/cases/fourslash/augmentedTypesClass2.ts","time":185,"edits":2,"cost":"5.11"},{"name":"tests/cases/fourslash/completionsKeyof.ts","time":185,"edits":2,"cost":"5.11"},{"name":"tests/cases/conformance/salsa/typeFromPrototypeAssignment.ts","time":185,"edits":2,"cost":"5.11"},{"name":"tests/cases/fourslash/goToImplementationShorthandPropertyAssignment_00.ts","time":185,"edits":2,"cost":"5.11"},{"name":"tests/cases/fourslash/findAllRefsObjectBindingElementPropertyName03.ts","time":185,"edits":2,"cost":"5.11"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportAllowSyntheticDefaultImports1.ts","time":185,"edits":2,"cost":"5.11"},{"name":"tests/cases/conformance/emitter/es2018/asyncGenerators/emitter.asyncGenerators.functionExpressions.es2018.ts","time":92,"edits":1,"cost":"5.10"},{"name":"unittests:: tsbuild - empty files option in tsconfig","time":92,"edits":1,"cost":"5.10"},{"name":"tests/cases/conformance/dynamicImport/importCallExpression2ESNext.ts","time":92,"edits":1,"cost":"5.10"},{"name":"tests/cases/fourslash/findAllRefsInheritedProperties5.ts","time":184,"edits":2,"cost":"5.10"},{"name":"tests/cases/fourslash/referencesForMergedDeclarations4.ts","time":184,"edits":2,"cost":"5.10"},{"name":"tests/cases/fourslash/getSemanticDiagnosticForNoDeclaration.ts","time":92,"edits":1,"cost":"5.10"},{"name":"tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTempalteString4.ts","time":92,"edits":1,"cost":"5.10"},{"name":"tests/cases/fourslash/completionsIsPossiblyTypeArgumentPosition.ts","time":184,"edits":2,"cost":"5.10"},{"name":"tests/cases/compiler/complicatedPrivacy.ts","time":92,"edits":1,"cost":"5.10"},{"name":"tests/cases/conformance/jsx/checkJsxChildrenProperty6.tsx","time":184,"edits":2,"cost":"5.10"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts","time":92,"edits":1,"cost":"5.10"},{"name":"tests/cases/fourslash/memberCompletionFromFunctionCall.ts","time":92,"edits":1,"cost":"5.10"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportFile1.ts","time":184,"edits":2,"cost":"5.10"},{"name":"tests/cases/fourslash/tsxParsing.ts","time":92,"edits":1,"cost":"5.10"},{"name":"tests/cases/compiler/enumDecl1.ts","time":92,"edits":1,"cost":"5.10"},{"name":"tests/cases/compiler/commentOnClassAccessor1.ts","time":92,"edits":1,"cost":"5.10"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames42_ES6.ts","time":92,"edits":1,"cost":"5.10"},{"name":"tests/cases/conformance/es6/destructuring/destructuringObjectBindingPatternAndAssignment1ES5.ts","time":92,"edits":1,"cost":"5.10"},{"name":"tests/cases/conformance/types/tuple/indexerWithTuple.ts","time":92,"edits":1,"cost":"5.10"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedInOperator.ts","time":92,"edits":1,"cost":"5.10"},{"name":"tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5.ts","time":92,"edits":1,"cost":"5.10"},{"name":"tests/cases/fourslash/quickInfoOnCatchVariable.ts","time":92,"edits":1,"cost":"5.10"},{"name":"tests/cases/compiler/partiallyDiscriminantedUnions.ts","time":92,"edits":1,"cost":"5.10"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration21.ts","time":92,"edits":1,"cost":"5.10"},{"name":"tests/cases/compiler/jsFileCompilationRestParameter.ts","time":92,"edits":1,"cost":"5.10"},{"name":"tests/cases/fourslash/renameDestructuringAssignmentNestedInFor2.ts","time":275,"edits":3,"cost":"5.10"},{"name":"tests/cases/fourslash/addMemberNotInNodeModulesDeclarationFile.ts","time":183,"edits":2,"cost":"5.10"},{"name":"tests/cases/fourslash/completionForStringLiteralNonrelativeImport13.ts","time":183,"edits":2,"cost":"5.10"},{"name":"tests/cases/fourslash/codeFixClassPropertyInitialization11.ts","time":183,"edits":2,"cost":"5.10"},{"name":"tests/cases/fourslash/signatureHelpTypeArguments2.ts","time":183,"edits":2,"cost":"5.10"},{"name":"tests/cases/fourslash/unusedTypeAliasInNamespace1.ts","time":91,"edits":1,"cost":"5.09"},{"name":"tests/cases/fourslash/goToImplementationSuper_00.ts","time":91,"edits":1,"cost":"5.09"},{"name":"tests/cases/fourslash/codeFixAddMissingEnumMember6.ts","time":182,"edits":2,"cost":"5.09"},{"name":"tests/cases/compiler/assignmentCompatability26.ts","time":91,"edits":1,"cost":"5.09"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardOfFormNotExpr.ts","time":91,"edits":1,"cost":"5.09"},{"name":"tests/cases/fourslash/getEmitOutputExternalModule.ts","time":91,"edits":1,"cost":"5.09"},{"name":"tests/cases/conformance/async/es6/asyncWithVarShadowing_es6.ts","time":182,"edits":2,"cost":"5.09"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit2_ES5.ts","time":91,"edits":1,"cost":"5.09"},{"name":"tests/cases/conformance/es6/destructuring/emptyAssignmentPatterns04_ES6.ts","time":91,"edits":1,"cost":"5.09"},{"name":"tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx","time":91,"edits":1,"cost":"5.09"},{"name":"tests/cases/compiler/es5-asyncFunctionCallExpressions.ts","time":91,"edits":1,"cost":"5.09"},{"name":"tests/cases/fourslash/shims/getTodoComments.ts","time":91,"edits":1,"cost":"5.09"},{"name":"tests/cases/conformance/interfaces/declarationMerging/mergeTwoInterfaces2.ts","time":91,"edits":1,"cost":"5.09"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.ts","time":91,"edits":1,"cost":"5.09"},{"name":"tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3.ts","time":91,"edits":1,"cost":"5.09"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceMappedType.ts","time":182,"edits":2,"cost":"5.09"},{"name":"tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts","time":91,"edits":1,"cost":"5.09"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardsInModule.ts","time":91,"edits":1,"cost":"5.09"},{"name":"tests/cases/conformance/expressions/commaOperator/commaOperatorWithSecondOperandObjectType.ts","time":91,"edits":1,"cost":"5.09"},{"name":"tests/cases/fourslash/getEditsForFileRename_jsExtension.ts","time":182,"edits":2,"cost":"5.09"},{"name":"tests/cases/fourslash/codeFixForgottenThisPropertyAccess02.ts","time":182,"edits":2,"cost":"5.09"},{"name":"tests/cases/compiler/defaultIndexProps1.ts","time":91,"edits":1,"cost":"5.09"},{"name":"tests/cases/compiler/moduleVisibilityTest2.ts","time":91,"edits":1,"cost":"5.09"},{"name":"tests/cases/fourslash/getOccurrencesExport2.ts","time":91,"edits":1,"cost":"5.09"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of41.ts","time":91,"edits":1,"cost":"5.09"},{"name":"tests/cases/compiler/unusedTypeParameters6.ts","time":91,"edits":1,"cost":"5.09"},{"name":"tests/cases/fourslash/renameForDefaultExport05.ts","time":91,"edits":1,"cost":"5.09"},{"name":"tests/cases/conformance/salsa/methodsReturningThis.ts","time":91,"edits":1,"cost":"5.09"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorOverloads2.ts","time":91,"edits":1,"cost":"5.09"},{"name":"tests/cases/fourslash/completionEntryForDeferredMappedTypeMembers.ts","time":273,"edits":3,"cost":"5.09"},{"name":"tests/cases/fourslash/navigateToIIFE.ts","time":181,"edits":2,"cost":"5.09"},{"name":"tests/cases/fourslash/codeFixUnusedIdentifier_removeVariableStatement.ts","time":181,"edits":2,"cost":"5.09"},{"name":"tests/cases/fourslash/renameDefaultImportDifferentName.ts","time":181,"edits":2,"cost":"5.09"},{"name":"tests/cases/fourslash/codeFixAddConvertToUnknownForNonOverlappingTypes3.ts","time":181,"edits":2,"cost":"5.09"},{"name":"tests/cases/fourslash/completionListWithModulesOutsideModuleScope.ts","time":180,"edits":2,"cost":"5.08"},{"name":"tests/cases/fourslash/unusedTypeParametersInFunction2.ts","time":180,"edits":2,"cost":"5.08"},{"name":"tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/conformance/statements/for-inStatements/for-inStatementsArray.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/fourslash/completionsPaths_importType.ts","time":270,"edits":3,"cost":"5.08"},{"name":"tests/cases/conformance/es6/spread/iteratorSpreadInCall12.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/fourslash/indirectClassInstantiation.ts","time":180,"edits":2,"cost":"5.08"},{"name":"tests/cases/fourslash/completionsDotInObjectLiteral.ts","time":180,"edits":2,"cost":"5.08"},{"name":"tests/cases/fourslash/recursiveInternalModuleImport.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of36.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/fourslash/signatureHelpNegativeTests.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithoutConstraints.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/fourslash/completionListAtInvalidLocations.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/compiler/privacyGetter.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/fourslash/getEmitOutputWithSemanticErrorsForMultipleFiles2.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPrivates.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/compiler/genericSpecializationToTypeLiteral1.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/compiler/commentsFunction.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/fourslash/codeFixInferFromUsageGetter.ts","time":180,"edits":2,"cost":"5.08"},{"name":"tests/cases/conformance/types/union/unionTypePropertyAccessibility.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/compiler/declarationEmitEnumReadonlyProperty.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/compiler/augmentExportEquals6.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportFileQuoteStyle3.ts","time":180,"edits":2,"cost":"5.08"},{"name":"tests/cases/compiler/collisionExportsRequireAndEnum.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/compiler/es6ExportClauseWithoutModuleSpecifier.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/compiler/duplicateIdentifierBindingElementInParameterDeclaration2.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/conformance/types/members/objectTypeWithCallSignatureHidingMembersOfFunction.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern25.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of8.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/compiler/logicalNotExpression1.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/conformance/jsx/tsxAttributeResolution3.tsx","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES6.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/compiler/addMoreCallSignaturesToBaseSignature.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/compiler/classMemberInitializerScoping.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration4.ts","time":90,"edits":1,"cost":"5.08"},{"name":"tests/cases/compiler/bigintWithoutLib.ts","time":179,"edits":2,"cost":"5.08"},{"name":"tests/cases/compiler/inferFromGenericFunctionReturnTypes1.ts","time":179,"edits":2,"cost":"5.08"},{"name":"tests/cases/fourslash/codeFixInferFromUsageMember3.ts","time":179,"edits":2,"cost":"5.08"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames51_ES5.ts","time":179,"edits":2,"cost":"5.08"},{"name":"tests/cases/compiler/APISample_transform.ts","time":268,"edits":3,"cost":"5.07"},{"name":"tests/cases/conformance/es2019/globalThisUnknown.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/conformance/types/specifyingTypes/typeQueries/typeofClassWithPrivates.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/fourslash/jsDocTypeTagQuickInfo1.ts","time":178,"edits":2,"cost":"5.07"},{"name":"tests/cases/compiler/es5-asyncFunctionBinaryExpressions.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/fourslash/tsxCompletion14.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/fourslash/memberListOfEnumFromExternalModule.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/undefinedIsSubtypeOfEverything.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/compiler/declarationEmitDefaultExport1.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/fourslash/extract-method-formatting-objectliteral.ts","time":178,"edits":2,"cost":"5.07"},{"name":"tests/cases/fourslash/tsxCompletionOnClosingTagWithoutJSX1.ts","time":178,"edits":2,"cost":"5.07"},{"name":"tests/cases/conformance/types/import/importTypeInJSDoc.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/fourslash/semanticClassificationsCancellation1.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/fourslash/memberListInWithBlock.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/compiler/numericIndexerConstraint.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/compiler/letDeclarations-validContexts.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/compiler/mergedDeclarations3.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/conformance/types/typeParameters/typeArgumentLists/typeParameterAsTypeParameterConstraintTransitively2.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/fourslash/doubleUnderscoreRenames.ts","time":178,"edits":2,"cost":"5.07"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/everyTypeAssignableToAny.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/compiler/withImportDecl.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/compiler/super.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration8.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/fourslash/completionListInObjectBindingPattern06.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfBoolean.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/compiler/negativeZero.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/compiler/declFileTypeofClass.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/compiler/paramterDestrcuturingDeclaration.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/compiler/newLineFlagWithLF.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/compiler/redeclareParameterInCatchBlock.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/compiler/metadataOfStringLiteral.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/compiler/unusedLocalsAndParametersTypeAliases2.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/compiler/indexSignatureWithoutTypeAnnotation1.ts","time":89,"edits":1,"cost":"5.07"},{"name":"tests/cases/fourslash/quickInfoForJSDocUnknownTag.ts","time":177,"edits":2,"cost":"5.06"},{"name":"tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction21.ts","time":177,"edits":2,"cost":"5.06"},{"name":"tests/cases/fourslash/referencesForStaticsAndMembersWithSameNames.ts","time":177,"edits":2,"cost":"5.06"},{"name":"tests/cases/fourslash/findAllRefsWithLeadingUnderscoreNames1.ts","time":177,"edits":2,"cost":"5.06"},{"name":"tests/cases/fourslash/findAllRefs_importType_typeofImport.ts","time":177,"edits":2,"cost":"5.06"},{"name":"tests/cases/fourslash/goToImplementationInterfaceMethod_03.ts","time":177,"edits":2,"cost":"5.06"},{"name":"tests/cases/compiler/esModuleInteropNamedDefaultImports.ts","time":177,"edits":2,"cost":"5.06"},{"name":"unittests:: tsc-watch:: console clearing","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/fourslash/goToImplementationClassMethod_00.ts","time":176,"edits":2,"cost":"5.06"},{"name":"tests/cases/fourslash/javaScriptModules14.ts","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/fourslash/externalModuleWithExportAssignment.ts","time":264,"edits":3,"cost":"5.06"},{"name":"tests/cases/compiler/targetTypeTest1.ts","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/compiler/mismatchedExplicitTypeParameterAndArgumentType.ts","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/fourslash/findAllRefsWithLeadingUnderscoreNames2.ts","time":176,"edits":2,"cost":"5.06"},{"name":"tests/cases/conformance/types/rest/objectRestParameterES5.ts","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/compiler/taggedTemplateStringsWithMultilineTemplateES6.ts","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/fourslash/completionListAtBeginningOfIdentifierInArrowFunction01.ts","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/fourslash/quickInfoOnErrorTypes1.ts","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/fourslash/goToImplementationInterfaceMethod_06.ts","time":176,"edits":2,"cost":"5.06"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithSpecializedSignatures.ts","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/compiler/asyncAwaitWithCapturedBlockScopeVar.ts","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/compiler/declarationMapsOutFile2.ts","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/fourslash/moduleVariables.ts","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/compiler/gettersAndSetters.ts","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportExportEqualsPrimitive.ts","time":176,"edits":2,"cost":"5.06"},{"name":"tests/cases/fourslash/goToDefinitionShorthandProperty03.ts","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/conformance/jsx/tsxInArrowFunction.tsx","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/fourslash/typedGenericPrototypeMember.ts","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardsInRightOperandOfAndAndOperator.ts","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/compiler/constDeclarations-access4.ts","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithAnyOtherType.ts","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/compiler/typeReferenceDirectives9.ts","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/conformance/functions/functionOverloadErrorsSyntax.ts","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/compiler/genericRecursiveImplicitConstructorErrors3.ts","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/compiler/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.ts","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/compiler/collisionCodeGenModuleWithMemberInterfaceConflict.ts","time":88,"edits":1,"cost":"5.06"},{"name":"tests/cases/compiler/jsxChildrenGenericContextualTypes.tsx","time":175,"edits":2,"cost":"5.05"},{"name":"tests/cases/fourslash/unusedLocalsInFunction3.ts","time":175,"edits":2,"cost":"5.05"},{"name":"tests/cases/fourslash/navigationItemsOverloads1.ts","time":175,"edits":2,"cost":"5.05"},{"name":"tests/cases/fourslash/goToDefinitionAlias.ts","time":175,"edits":2,"cost":"5.05"},{"name":"tests/cases/fourslash/getOccurrencesThrow2.ts","time":175,"edits":2,"cost":"5.05"},{"name":"tests/cases/fourslash/annotateWithTypeFromJSDoc2.ts","time":262,"edits":3,"cost":"5.05"},{"name":"tests/cases/compiler/thisConditionalOnMethodReturnOfGenericInstance.ts","time":174,"edits":2,"cost":"5.05"},{"name":"tests/cases/fourslash/codeFixInferFromUsageVariable.ts","time":174,"edits":2,"cost":"5.05"},{"name":"tests/cases/fourslash/server/documentHighlights02.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers3.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPublics.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplatesNegatives5.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/conformance/dynamicImport/importCallExpression3ESNext.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment3.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/fourslash/signatureHelpTaggedTemplates7.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/compiler/requireOfJsonFileNonRelative.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/compiler/declarationEmitDestructuringArrayPattern4.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/fourslash/completionForStringLiteralImport2.ts","time":174,"edits":2,"cost":"5.05"},{"name":"tests/cases/compiler/duplicateIdentifierRelatedSpans2.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/fourslash/unusedParameterInFunction2.ts","time":174,"edits":2,"cost":"5.05"},{"name":"tests/cases/compiler/unusedTypeParameters9.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfPrimitiveSubtype.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/compiler/isolatedModulesPlainFile-AMD.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/conformance/types/members/typesWithSpecializedCallSignatures.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/compiler/inheritance.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/compiler/genericFunctionsWithOptionalParameters2.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/compiler/moduleAugmentationInAmbientModule1.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/compiler/internalAliasClassInsideTopLevelModuleWithExport.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/compiler/unusedClassesinNamespace4.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/compiler/scopeCheckInsideStaticMethod1.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgs.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/compiler/infinitelyExpandingTypes1.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/conformance/es6/destructuring/emptyAssignmentPatterns04_ES5.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/compiler/exportEqualCallable.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/compiler/varAsID.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/compiler/evalAfter0.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/conformance/es6/templates/templateStringTermination5_ES6.ts","time":87,"edits":1,"cost":"5.05"},{"name":"tests/cases/fourslash/quickInfoUnion_discriminated.ts","time":260,"edits":3,"cost":"5.04"},{"name":"tests/cases/fourslash/renameForAliasingExport02.ts","time":173,"edits":2,"cost":"5.04"},{"name":"tests/cases/fourslash/todoComments18.ts","time":173,"edits":2,"cost":"5.04"},{"name":"tests/cases/fourslash/findAllRefsWithLeadingUnderscoreNames6.ts","time":173,"edits":2,"cost":"5.04"},{"name":"tests/cases/fourslash/referencesForClassParameter.ts","time":173,"edits":2,"cost":"5.04"},{"name":"tests/cases/fourslash/quickInforForSucessiveInferencesIsNotAny.ts","time":172,"edits":2,"cost":"5.04"},{"name":"unittests:: tsserver:: Project Errors for Configure file diagnostics events","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/fourslash/incompleteFunctionCallCodefix3.ts","time":258,"edits":3,"cost":"5.04"},{"name":"tests/cases/fourslash/salsaMethodsOnAssignedFunctionExpressions.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/compiler/typeReferenceDirectives4.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/compiler/reservedWords2.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/fourslash/completionForStringLiteralNonrelativeImport14.ts","time":172,"edits":2,"cost":"5.04"},{"name":"tests/cases/fourslash/completionListInObjectBindingPattern01.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/compiler/es6ImportNamedImportInEs5.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithOptionalParameters.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/conformance/es6/destructuring/emptyArrayBindingPatternParameter03.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/fourslash/getSemanticDiagnosticForDeclaration.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/compiler/unusedMultipleParameter2InContructor.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/conformance/parser/ecmascript5/parserRealSource3.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/compiler/superCallInStaticMethod.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/compiler/accessorWithoutBody1.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/fourslash/renameForDefaultExport06.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/compiler/noCollisionThisExpressionAndLocalVarInFunction.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty41.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/fourslash/editClearsJsDocCache.ts","time":172,"edits":2,"cost":"5.04"},{"name":"tests/cases/compiler/unusedParameterProperty1.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/compiler/letDeclarations-scopes.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType7_ES6.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/fourslash/goToDefinitionExternalModuleName4.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/compiler/implicitAnyGenerics.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/compiler/interfacedecl.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/compiler/commonSourceDirectory_dts.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/fourslash/completionListInObjectLiteralThatIsParameterOfFunctionCall.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/compiler/ambientExternalModuleWithoutInternalImportDeclaration.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames18_ES6.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/compiler/moduleIdentifiers.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/compiler/internalAliasUninitializedModuleInsideTopLevelModuleWithExport.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/compiler/contextualTyping21.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/compiler/mergedDeclarations2.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/compiler/propertyAccessExpressionInnerComments.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/conformance/Symbols/ES5SymbolProperty1.ts","time":86,"edits":1,"cost":"5.04"},{"name":"tests/cases/fourslash/completionListOfGenericSymbol.ts","time":171,"edits":2,"cost":"5.03"},{"name":"tests/cases/fourslash/signatureHelpOnTypePredicates.ts","time":171,"edits":2,"cost":"5.03"},{"name":"tests/cases/fourslash/memberCompletionOnRightSideOfImport.ts","time":171,"edits":2,"cost":"5.03"},{"name":"tests/cases/fourslash/codeFixCalledES2015Import4.ts","time":171,"edits":2,"cost":"5.03"},{"name":"tests/cases/fourslash/completionsTuple.ts","time":171,"edits":2,"cost":"5.03"},{"name":"tests/cases/fourslash/findAllRefsMappedType.ts","time":341,"edits":4,"cost":"5.03"},{"name":"tests/cases/fourslash/codeFixAddMissingNew3.ts","time":170,"edits":2,"cost":"5.02"},{"name":"tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/fourslash/quickInfoOnThis4.ts","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/fourslash/breakpointValidationDestructuringVariableStatementArrayBindingPattern.ts","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/compiler/null.ts","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentity2.ts","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/conformance/parser/ecmascript6/ShorthandPropertyAssignment/parserShorthandPropertyAssignment5.ts","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/fourslash/codeFixClassPropertyInitialization5.ts","time":170,"edits":2,"cost":"5.02"},{"name":"tests/cases/compiler/declFileTypeofFunction.ts","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/fourslash/referencesForLabel3.ts","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/conformance/types/primitives/null/validNullAssignments.ts","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/conformance/salsa/inferringClassStaticMembersFromAssignments.ts","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/compiler/arrowFunctionWithObjectLiteralBody6.ts","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/conformance/jsx/tsxErrorRecovery2.tsx","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/conformance/declarationEmit/typePredicates/declarationEmitIdentifierPredicatesWithPrivateName01.ts","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/fourslash/todoComments19.ts","time":170,"edits":2,"cost":"5.02"},{"name":"tests/cases/conformance/es6/modules/exportStar-amd.ts","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/compiler/instantiatedTypeAliasDisplay.ts","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/conformance/es6/destructuring/emptyArrayBindingPatternParameter01.ts","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/conformance/types/objectTypeLiteral/constructSignatures/constructSignaturesWithIdenticalOverloads.ts","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/compiler/typeCheckObjectCreationExpressionWithUndefinedCallResolutionData.ts","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/compiler/unusedMultipleParameters1InFunctionDeclaration.ts","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext1.ts","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/conformance/decorators/class/decoratorOnClass5.ts","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/compiler/callOverloads1.ts","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/compiler/inheritSameNamePrivatePropertiesFromSameOrigin.ts","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/conformance/es6/modules/exportsAndImports4-es6.ts","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/conformance/jsdoc/jsdocLiteral.ts","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/fourslash/tsxQuickInfo5.ts","time":85,"edits":1,"cost":"5.02"},{"name":"tests/cases/compiler/infiniteConstraints.ts","time":169,"edits":2,"cost":"5.02"},{"name":"tests/cases/compiler/reactTransitiveImportHasValidDeclaration.ts","time":169,"edits":2,"cost":"5.02"},{"name":"tests/cases/conformance/jsx/jsxInvalidEsprimaTestSuite.tsx","time":169,"edits":2,"cost":"5.02"},{"name":"tests/cases/fourslash/referencesForObjectLiteralProperties.ts","time":169,"edits":2,"cost":"5.02"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportFileQuoteStyle1.ts","time":169,"edits":2,"cost":"5.02"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess2.ts","time":169,"edits":2,"cost":"5.02"},{"name":"tests/cases/fourslash/refactorExtractType15.ts","time":168,"edits":2,"cost":"5.01"},{"name":"tests/cases/fourslash/refactorExtractType13.ts","time":168,"edits":2,"cost":"5.01"},{"name":"tests/cases/fourslash/quickInfoForJSDocCodefence.ts","time":168,"edits":2,"cost":"5.01"},{"name":"unittests:: tsbuild:: with resolveJsonModule option on project importJsonFromProjectReference","time":84,"edits":1,"cost":"5.01"},{"name":"unittests:: tsserver:: document registry in project service","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionAsyncES3System.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/conformance/types/tuple/castingTuple.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/fourslash/jsDocFunctionSignatures2.ts","time":168,"edits":2,"cost":"5.01"},{"name":"tests/cases/compiler/moduleAugmentationExtendFileModule2.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2ES6.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/fourslash/indentationInAssignment.ts","time":168,"edits":2,"cost":"5.01"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralCheckedInIf01.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/fourslash/getOccurrencesSuper2.ts","time":168,"edits":2,"cost":"5.01"},{"name":"tests/cases/conformance/es6/destructuring/emptyAssignmentPatterns02_ES5iterable.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/fourslash/renameNameOnEnumMember.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/fourslash/breakpointValidationTryCatchFinally.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/fourslash/getOccurrencesLoopBreakContinue2.ts","time":168,"edits":2,"cost":"5.01"},{"name":"tests/cases/fourslash/quickInfoTemplateTag.ts","time":168,"edits":2,"cost":"5.01"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess35.ts","time":168,"edits":2,"cost":"5.01"},{"name":"tests/cases/fourslash/codeFixInferFromUsageCallJS.ts","time":168,"edits":2,"cost":"5.01"},{"name":"tests/cases/compiler/letDeclarations.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/conformance/jsx/checkJsxGenericTagHasCorrectInferences.tsx","time":168,"edits":2,"cost":"5.01"},{"name":"tests/cases/compiler/uncaughtCompilerError1.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/compiler/contextualTypingArrayOfLambdas.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/fourslash/completionListInObjectBindingPattern14.ts","time":168,"edits":2,"cost":"5.01"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionInCJS1.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/fourslash/goToDefinitionExternalModuleName3.ts","time":168,"edits":2,"cost":"5.01"},{"name":"tests/cases/fourslash/exportEqualsInterfaceA.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/conformance/types/specifyingTypes/typeQueries/invalidTypeOfTarget.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/compiler/transformNestedGeneratorsWithTry.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithZeroTypeArguments.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/fourslash/findAllRefsForDefaultExport08.ts","time":168,"edits":2,"cost":"5.01"},{"name":"tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly2.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/conformance/decorators/invalid/decoratorOnImportEquals1.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/compiler/declarationEmitDefaultExport7.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/fourslash/quickInfoJsdocTypedefMissingType.ts","time":168,"edits":2,"cost":"5.01"},{"name":"tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/fourslash/callSignatureHelp.ts","time":168,"edits":2,"cost":"5.01"},{"name":"tests/cases/compiler/es5-asyncFunctionNewExpressions.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/compiler/typeParamExtendsOtherTypeParam.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings06_ES6.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/fourslash/completionListInObjectBindingPattern09.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern29.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/conformance/classes/members/accessibility/protectedClassPropertyAccessibleWithinClass.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/conformance/es6/destructuring/emptyAssignmentPatterns02_ES6.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/conformance/es6/Symbols/symbolType15.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit5_ES6.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsSubtypeOfNonSpecializedSignature.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementationFileOrderReversed.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/compiler/ClassDeclaration25.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/compiler/typeParameterConstraintInstantiation.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction5_es5.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/compiler/staticsNotInScopeInClodule.ts","time":84,"edits":1,"cost":"5.01"},{"name":"tests/cases/fourslash/completionListInUnclosedFunction01.ts","time":252,"edits":3,"cost":"5.01"},{"name":"tests/cases/compiler/APISample_Watch.ts","time":251,"edits":3,"cost":"5.01"},{"name":"tests/cases/fourslash/signatureHelpOnDeclaration.ts","time":167,"edits":2,"cost":"5.01"},{"name":"tests/cases/fourslash/findAllRefsForObjectLiteralProperties.ts","time":167,"edits":2,"cost":"5.01"},{"name":"tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts","time":167,"edits":2,"cost":"5.01"},{"name":"tests/cases/compiler/contextualTypingOfOptionalMembers.tsx","time":167,"edits":2,"cost":"5.01"},{"name":"tests/cases/fourslash/importNameCodeFix_order.ts","time":167,"edits":2,"cost":"5.01"},{"name":"tests/cases/fourslash/documentHighlightInExport1.ts","time":167,"edits":2,"cost":"5.01"},{"name":"tests/cases/fourslash/importNameCodeFixExistingImport2.ts","time":250,"edits":3,"cost":"5.00"},{"name":"tests/cases/conformance/es2019/globalThisUnknownNoImplicitAny.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/fourslash/commentsCommentParsing.ts","time":664,"edits":8,"cost":"5.00"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNumber.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/compiler/implicitConstParameters.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/compiler/destructuredDeclarationEmit.ts","time":166,"edits":2,"cost":"5.00"},{"name":"tests/cases/fourslash/jsObjectDefinePropertyRenameLocations.ts","time":166,"edits":2,"cost":"5.00"},{"name":"tests/cases/fourslash/goToImplementationLocal_05.ts","time":166,"edits":2,"cost":"5.00"},{"name":"tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks01.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/conformance/declarationEmit/typePredicates/declarationEmitThisPredicatesWithPrivateName01.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionExpression.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/compiler/operatorAddNullUndefined.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/fourslash/tsxFindAllReferences2.ts","time":166,"edits":2,"cost":"5.00"},{"name":"tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/fourslash/codeFixInferFromUsage_noCrashOnMissingParens.ts","time":166,"edits":2,"cost":"5.00"},{"name":"tests/cases/conformance/es6/Symbols/symbolDeclarationEmit8.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/compiler/privacyCheckOnTypeParameterReferenceInConstructorParameter.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/compiler/typePredicatesInUnion.ts","time":166,"edits":2,"cost":"5.00"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/compiler/implicitAnyCastedValue.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/compiler/interfaceExtendsClassWithPrivate1.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/fourslash/signatureHelpCallExpression.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments5.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/conformance/expressions/contextualTyping/argumentExpressionContextualTyping.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/compiler/unusedTypeParameterInMethod3.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/compiler/declarationEmitForTypesWhichNeedImportTypes.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/compiler/es6ImportWithoutFromClauseInEs5.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/compiler/recursiveGenericUnionType1.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/fourslash/getEmitOutputWithSemanticErrorsForMultipleFiles.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/fourslash/goToDefinitionMultipleDefinitions.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/compiler/moduleAugmentationDeclarationEmit1.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/compiler/duplicateIdentifierBindingElementInParameterDeclaration1.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/compiler/indexSignatureTypeCheck2.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/compiler/blockScopedBindingUsedBeforeDef.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/conformance/es6/modules/exportsAndImports3.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/conformance/functions/functionImplementationErrors.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/compiler/InterfaceDeclaration8.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction10_es5.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/compiler/importUsedInExtendsList1.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/compiler/reachabilityCheckWithEmptyDefault.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/compiler/unusedLocalProperty.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/fourslash/intellisenseInObjectLiteral.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/conformance/jsx/tsxNoJsx.tsx","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/compiler/extendFromAny.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of6.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/conformance/es6/modules/multipleDefaultExports01.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/conformance/externalModules/topLevelFileModuleMissing.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/fourslash/shims-pp/getSyntacticClassifications.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/compiler/exportAssignmentInterface.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/compiler/filesEmittingIntoSameOutput.ts","time":83,"edits":1,"cost":"5.00"},{"name":"tests/cases/compiler/APISample_WatchWithOwnWatchHost.ts","time":248,"edits":3,"cost":"5.00"},{"name":"tests/cases/fourslash/codeFixAwaitInSyncFunction3.ts","time":165,"edits":2,"cost":"4.99"},{"name":"tests/cases/fourslash/extract-method20.ts","time":165,"edits":2,"cost":"4.99"},{"name":"tests/cases/fourslash/codeFixInferFromUsageCallBodyPriority.ts","time":165,"edits":2,"cost":"4.99"},{"name":"tests/cases/fourslash/goToTypeDefinition_returnType.ts","time":165,"edits":2,"cost":"4.99"},{"name":"tests/cases/fourslash/getOccurrencesIfElse.ts","time":165,"edits":2,"cost":"4.99"},{"name":"tests/cases/fourslash/refactorExtractType12.ts","time":164,"edits":2,"cost":"4.99"},{"name":"unittests:: tsserver:: Open-file","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/compiler/dynamicImportTrailingComma.ts","time":164,"edits":2,"cost":"4.99"},{"name":"tests/cases/conformance/jsdoc/checkExportsObjectAssignProperty.ts","time":164,"edits":2,"cost":"4.99"},{"name":"tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/fourslash/referencesForInheritedProperties7.ts","time":246,"edits":3,"cost":"4.99"},{"name":"tests/cases/fourslash/findAllRefsForDefaultExportAnonymous.ts","time":164,"edits":2,"cost":"4.99"},{"name":"tests/cases/fourslash/functionProperty.ts","time":164,"edits":2,"cost":"4.99"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/fourslash/codeFixCalledES2015Import2.ts","time":164,"edits":2,"cost":"4.99"},{"name":"tests/cases/compiler/underscoreMapFirst.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/compiler/constEnumToStringWithComments.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty24.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/fourslash/goToImplementationInterfaceMethod_10.ts","time":164,"edits":2,"cost":"4.99"},{"name":"tests/cases/fourslash/codeFixUnreachableCode_noSuggestionIfDisabled.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/compiler/es5-declaration-amd.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/fourslash/importNameCodeFix_importType.ts","time":164,"edits":2,"cost":"4.99"},{"name":"tests/cases/fourslash/codeFixAddMissingMember11.ts","time":164,"edits":2,"cost":"4.99"},{"name":"tests/cases/fourslash/signatureHelpImportStarFromExportEquals.ts","time":164,"edits":2,"cost":"4.99"},{"name":"tests/cases/compiler/varianceCallbacksAndIndexedAccesses.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern4.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportTypeRoots0.ts","time":164,"edits":2,"cost":"4.99"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/compiler/moduleAugmentationGlobal4.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithOptionalParameters.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/compiler/aliasUsageInOrExpression.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/compiler/functionCall16.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/compiler/es6ImportDefaultBinding.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/compiler/exportEqualsProperty.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/compiler/genericConstraintOnExtendedBuiltinTypes.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/compiler/sourceMapWithNonCaseSensitiveFileNames.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/compiler/genericsWithDuplicateTypeParameters1.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/EnumAndModuleWithSameNameAndCommonRoot.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/compiler/reachabilityChecks6.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/conformance/classes/constructorDeclarations/constructorParameters/declarationEmitReadonly.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/compiler/multiLineErrors.ts","time":82,"edits":1,"cost":"4.99"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceWithNegativeNumber.ts","time":163,"edits":2,"cost":"4.98"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax18.ts","time":326,"edits":4,"cost":"4.98"},{"name":"tests/cases/fourslash/renameJsExports01.ts","time":163,"edits":2,"cost":"4.98"},{"name":"tests/cases/compiler/bigintWithLib.ts","time":163,"edits":2,"cost":"4.98"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateNumber.ts","time":163,"edits":2,"cost":"4.98"},{"name":"tests/cases/fourslash/goToDefinitionExternalModuleName6.ts","time":163,"edits":2,"cost":"4.98"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiation.ts","time":163,"edits":2,"cost":"4.98"},{"name":"tests/cases/fourslash/untypedModuleImport.ts","time":163,"edits":2,"cost":"4.98"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax10.ts","time":326,"edits":4,"cost":"4.98"},{"name":"tests/cases/fourslash/getJavaScriptSyntacticDiagnostics22.ts","time":163,"edits":2,"cost":"4.98"},{"name":"tests/cases/fourslash/codeFixAddMissingNew4.ts","time":162,"edits":2,"cost":"4.98"},{"name":"tests/cases/compiler/declarationEmitProtectedMembers.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/compiler/internalAliasEnumInsideTopLevelModuleWithoutExport.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/fourslash/augmentedTypesClass3.ts","time":162,"edits":2,"cost":"4.98"},{"name":"tests/cases/fourslash/codeFixInPropertyAccess_js.ts","time":162,"edits":2,"cost":"4.98"},{"name":"tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction1.ts","time":162,"edits":2,"cost":"4.98"},{"name":"tests/cases/fourslash/unusedLocalsInMethodFS2.ts","time":162,"edits":2,"cost":"4.98"},{"name":"tests/cases/fourslash/quickInfo_errorSignatureFillsInTypeParameter.ts","time":162,"edits":2,"cost":"4.98"},{"name":"tests/cases/fourslash/gotoDefinitionInObjectBindingPattern2.ts","time":162,"edits":2,"cost":"4.98"},{"name":"tests/cases/fourslash/completionListAtEOF1.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/compiler/moduleVisibilityTest1.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/fourslash/goToImplementationEnum_00.ts","time":162,"edits":2,"cost":"4.98"},{"name":"tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/compiler/es6ExportClause.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern16.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/fourslash/getOccurrencesConst04.ts","time":162,"edits":2,"cost":"4.98"},{"name":"tests/cases/compiler/staticMethodWithTypeParameterExtendsClauseDeclFile.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/fourslash/genericFunctionReturnType2.ts","time":162,"edits":2,"cost":"4.98"},{"name":"tests/cases/conformance/es6/Symbols/symbolType1.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/compiler/amdDependencyComment2.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/conformance/dynamicImport/importCallExpression1ESNext.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/conformance/types/keyof/keyofAndForIn.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrOperatorWithTypeParameters.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/compiler/superAccess2.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/compiler/declFilePrivateMethodOverloads.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/fourslash/todoComments16.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/compiler/es5-asyncFunctionDoStatements.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/fourslash/goToDefinitionTaggedTemplateOverloads.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/compiler/declFileForInterfaceWithOptionalFunction.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1ES6.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/fourslash/tsxCompletion1.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/compiler/assignmentCompatability28.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/compiler/es6ExportDefaultFunctionDeclaration2.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/conformance/types/never/neverType.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/conformance/statements/VariableStatements/everyTypeWithInitializer.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/fourslash/completionListInTypedObjectLiterals4.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/conformance/jsx/tsxElementResolution4.tsx","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/conformance/statements/forStatements/forStatementsMultipleValidDecl.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/compiler/recursiveFunctionTypes.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/compiler/visibilityOfCrossModuleTypeUsage.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/compiler/jsFileCompilationDuplicateFunctionImplementation.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/conformance/types/contextualTypes/logicalAnd/contextuallyTypeLogicalAnd03.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/conformance/async/es5/asyncGetter_es5.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/fourslash/tsxCompletionOnClosingTag1.ts","time":162,"edits":2,"cost":"4.98"},{"name":"tests/cases/compiler/declarationEmitDestructuringArrayPattern3.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithNumberType.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/compiler/importHelpersNoModule.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/compiler/extendGenericArray.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/compiler/covariance1.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/compiler/compositeGenericFunction.ts","time":81,"edits":1,"cost":"4.98"},{"name":"tests/cases/fourslash/typeToStringCrashInCodeFix.ts","time":323,"edits":4,"cost":"4.97"},{"name":"tests/cases/fourslash/importNameCodeFix_all.ts","time":242,"edits":3,"cost":"4.97"},{"name":"tests/cases/fourslash/referencesForInheritedProperties.ts","time":242,"edits":3,"cost":"4.97"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardOfFromPropNameInUnionType.ts","time":242,"edits":3,"cost":"4.97"},{"name":"tests/cases/fourslash/refactorExtractType18.ts","time":161,"edits":2,"cost":"4.97"},{"name":"tests/cases/fourslash/refactorConvertParamsToDestructuredObject_importedFunction3.ts","time":161,"edits":2,"cost":"4.97"},{"name":"tests/cases/fourslash/codeFixAwaitInSyncFunction8.ts","time":161,"edits":2,"cost":"4.97"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportAllowSyntheticDefaultImports0.ts","time":161,"edits":2,"cost":"4.97"},{"name":"tests/cases/fourslash/tsxCompletionOnClosingTagWithoutJSX2.ts","time":161,"edits":2,"cost":"4.97"},{"name":"tests/cases/fourslash/signatureHelpIncompleteCalls.ts","time":161,"edits":2,"cost":"4.97"},{"name":"tests/cases/fourslash/getEditsForFileRename_symlink.ts","time":161,"edits":2,"cost":"4.97"},{"name":"tests/cases/fourslash/goToDefinitionDecoratorOverloads.ts","time":161,"edits":2,"cost":"4.97"},{"name":"tests/cases/fourslash/completionListWithModulesInsideModuleScope.ts","time":482,"edits":6,"cost":"4.97"},{"name":"tests/cases/fourslash/findAllRefs_importType_js.ts","time":241,"edits":3,"cost":"4.97"},{"name":"tests/cases/fourslash/codeFixInferFromUsageJS.ts","time":241,"edits":3,"cost":"4.97"},{"name":"tests/cases/fourslash/importNameCodeFixExistingImport4.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/unionSubtypeIfEveryConstituentTypeIsSubtype.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/conformance/ambient/ambientDeclarations.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/conformance/es6/Symbols/symbolDeclarationEmit7.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/compiler/commentsdoNotEmitComments.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/compiler/commaOperatorLeftSideUnused.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/fourslash/importNameCodeFix_all_js.ts","time":160,"edits":2,"cost":"4.96"},{"name":"tests/cases/conformance/types/intersection/recursiveIntersectionTypes.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/conformance/parser/ecmascript6/ShorthandPropertyAssignment/parserShorthandPropertyAssignment1.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/conformance/jsdoc/checkOtherObjectAssignProperty.ts","time":160,"edits":2,"cost":"4.96"},{"name":"tests/cases/fourslash/semanticClassification1.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/fourslash/findAllRefsWithLeadingUnderscoreNames5.ts","time":160,"edits":2,"cost":"4.96"},{"name":"tests/cases/fourslash/breakpointValidationFunctionExpressions.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/fourslash/signatureHelpFunctionOverload.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of7.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/conformance/es6/newTarget/invalidNewTarget.es5.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardNesting.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/fourslash/codeFixConvertToMappedObjectType1.ts","time":160,"edits":2,"cost":"4.96"},{"name":"tests/cases/compiler/simpleArrowFunctionParameterReferencedInObjectLiteral1.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/conformance/interfaces/declarationMerging/mergeThreeInterfaces2.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/conformance/jsdoc/jsdocTypeFromChainedAssignment.ts","time":160,"edits":2,"cost":"4.96"},{"name":"tests/cases/compiler/primitiveMembers.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/compiler/overloadOnConstConstraintChecks4.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/conformance/emitter/es2015/forAwait/emitter.forAwait.es2015.ts","time":160,"edits":2,"cost":"4.96"},{"name":"tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments4.tsx","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/conformance/types/nonPrimitive/nonPrimitiveInGeneric.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/fourslash/signatureHelpWithInvalidArgumentList1.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/compiler/unusedParametersWithUnderscore.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/compiler/declarationEmitDefaultExport8.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/conformance/es6/Symbols/symbolDeclarationEmit1.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/compiler/overloadsWithConstraints.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/compiler/nonexistentPropertyOnUnion.ts","time":160,"edits":2,"cost":"4.96"},{"name":"tests/cases/compiler/genericClasses2.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionAsyncES3CJS.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments2.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/compiler/restUnion.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/conformance/types/namedTypes/genericInstantiationEquivalentToObjectLiteral.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/compiler/declFileGenericClassWithGenericExtendedClass.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/conformance/es6/templates/templateStringInParenthesesES6.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/compiler/typeofInObjectLiteralType.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/compiler/downlevelLetConst15.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/compiler/nodeResolution4.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/compiler/genericCallsWithoutParens.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/conformance/externalModules/exportAssignmentConstrainedGenericType.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/compiler/errorSupression1.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/compiler/moduleResolutionNoTs.ts","time":80,"edits":1,"cost":"4.96"},{"name":"tests/cases/fourslash/refactorExtractType2.ts","time":159,"edits":2,"cost":"4.96"},{"name":"tests/cases/compiler/contextuallyTypedParametersWithInitializers.ts","time":159,"edits":2,"cost":"4.96"},{"name":"tests/cases/conformance/types/mapped/mappedTypeConstraints.ts","time":159,"edits":2,"cost":"4.96"},{"name":"tests/cases/fourslash/javaScriptClass3.ts","time":159,"edits":2,"cost":"4.96"},{"name":"tests/cases/fourslash/importNameCodeFix_defaultExport.ts","time":159,"edits":2,"cost":"4.96"},{"name":"tests/cases/fourslash/completionsCombineOverloads_restParameter.ts","time":159,"edits":2,"cost":"4.96"},{"name":"tests/cases/fourslash/goToImplementationLocal_01.ts","time":159,"edits":2,"cost":"4.96"},{"name":"tests/cases/fourslash/completionsNamespaceMergedWithClass.ts","time":159,"edits":2,"cost":"4.96"},{"name":"tests/cases/fourslash/completionsRecommended_union.ts","time":159,"edits":2,"cost":"4.96"},{"name":"tests/cases/fourslash/findAllRefsMappedType_nonHomomorphic.ts","time":159,"edits":2,"cost":"4.96"},{"name":"tests/cases/compiler/prefixedNumberLiteralAssignToNumberLiteralType.ts","time":159,"edits":2,"cost":"4.96"},{"name":"unittests:: tsserver:: Untitled files","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/conformance/jsx/tsxStatelessFunctionComponents1.tsx","time":158,"edits":2,"cost":"4.95"},{"name":"tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction_formatBug.ts","time":158,"edits":2,"cost":"4.95"},{"name":"tests/cases/conformance/classes/members/constructorFunctionTypes/classWithBaseClassButNoConstructor.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/compiler/importHelpers.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/fourslash/quickInfoOnArgumentsInsideFunction.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/fourslash/findReferencesJSXTagName3.ts","time":237,"edits":3,"cost":"4.95"},{"name":"tests/cases/fourslash/server/referencesInConfiguredProject.ts","time":158,"edits":2,"cost":"4.95"},{"name":"tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/compiler/requireOfJsonFileWithNoContent.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/conformance/emitter/es2015/asyncGenerators/emitter.asyncGenerators.classMethods.es2015.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/compiler/cyclicGenericTypeInstantiation.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringParameterObjectBindingPattern.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/conformance/types/typeParameters/typeArgumentLists/typeParameterAsTypeParameterConstraint.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/fourslash/completionsImport_defaultFalsePositive.ts","time":316,"edits":4,"cost":"4.95"},{"name":"tests/cases/fourslash/signatureHelpCallExpressionJs.ts","time":158,"edits":2,"cost":"4.95"},{"name":"tests/cases/fourslash/completionsKeywordsExtends.ts","time":237,"edits":3,"cost":"4.95"},{"name":"tests/cases/compiler/gettersAndSettersTypesAgree.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/fourslash/importNameCodeFix_typeUsedAsValue.ts","time":158,"edits":2,"cost":"4.95"},{"name":"tests/cases/fourslash/breakpointValidationBinaryExpressions.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/fourslash/codeFixUnusedIdentifier_parameter_modifier.ts","time":158,"edits":2,"cost":"4.95"},{"name":"tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments4.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty13.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/compiler/augmentExportEquals5.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/compiler/arrayAssignmentTest2.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/fourslash/quickInfoForGenericPrototypeMember.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/compiler/declarationEmitDestructuring1.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/compiler/modularizeLibrary_TargetES6UsingES6Lib.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/compiler/recursiveTypeRelations.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/compiler/declarationEmitNameConflicts2.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/conformance/jsx/tsxAttributeResolution5.tsx","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern30.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/compiler/classExtendingQualifiedName2.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/compiler/typeParameterArgumentEquivalence2.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/conformance/types/specifyingTypes/typeLiterals/parenthesizedTypes.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/conformance/es6/spread/iteratorSpreadInArray5.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/compiler/classMemberInitializerWithLamdaScoping3.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/compiler/globalIsContextualKeyword.ts","time":79,"edits":1,"cost":"4.95"},{"name":"tests/cases/fourslash/server/configurePlugin.ts","time":236,"edits":3,"cost":"4.95"},{"name":"tests/cases/fourslash/findAllRefsDestructureGeneric.ts","time":236,"edits":3,"cost":"4.95"},{"name":"tests/cases/fourslash/refactorExtractType20.ts","time":157,"edits":2,"cost":"4.94"},{"name":"tests/cases/compiler/typeGuardNarrowsIndexedAccessOfKnownProperty.ts","time":157,"edits":2,"cost":"4.94"},{"name":"tests/cases/fourslash/importNameCodeFix_reExport.ts","time":157,"edits":2,"cost":"4.94"},{"name":"tests/cases/fourslash/renameParameterPropertyDeclaration4.ts","time":157,"edits":2,"cost":"4.94"},{"name":"tests/cases/fourslash/renameDefaultImport.ts","time":157,"edits":2,"cost":"4.94"},{"name":"tests/cases/fourslash/referencesForStringLiteralPropertyNames7.ts","time":157,"edits":2,"cost":"4.94"},{"name":"tests/cases/compiler/duplicatePackage.ts","time":157,"edits":2,"cost":"4.94"},{"name":"tests/cases/compiler/controlFlowNoImplicitAny.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of45.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/fourslash/completionListInNamedClassExpressionWithShadowing.ts","time":156,"edits":2,"cost":"4.94"},{"name":"tests/cases/conformance/types/primitives/string/extendStringInterface.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithEnumType.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/compiler/sourceMap-FileWithComments.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/compiler/modularizeLibrary_NoErrorDuplicateLibOptions2.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/fourslash/codeFixAwaitInSyncFunction5.ts","time":156,"edits":2,"cost":"4.94"},{"name":"tests/cases/conformance/declarationEmit/typePredicates/declarationEmitThisPredicates02.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/compiler/nestedBlockScopedBindings2.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/compiler/unusedParametersinConstructor1.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations2.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/compiler/es5-asyncFunctionWhileStatements.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/conformance/types/uniqueSymbol/uniqueSymbolsDeclarationsErrors.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/compiler/noImplicitAnyParametersInAmbientModule.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/compiler/letDeclarations2.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/compiler/typeInferenceConflictingCandidates.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/compiler/optionalFunctionArgAssignability.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/conformance/es6/templates/templateStringControlCharacterEscapes03_ES6.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/conformance/salsa/moduleExportAlias5.ts","time":156,"edits":2,"cost":"4.94"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithVariousOperators02.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/compiler/requireOfJsonFileWithErrors.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/compiler/privacyGloInterface.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty8.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/compiler/declFileEmitDeclarationOnlyError2.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/conformance/es6/decorators/class/decoratorOnClass6.es6.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItself.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/compiler/taggedTemplateStringsWithUnicodeEscapes.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/compiler/nestedIfStatement.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames34_ES6.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/conformance/es6/destructuring/emptyAssignmentPatterns04_ES5iterable.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/compiler/moduleWithTryStatement1.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression2_es6.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/compiler/jsFileCompilationLetDeclarationOrder2.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature11.ts","time":78,"edits":1,"cost":"4.94"},{"name":"tests/cases/fourslash/renameImportOfReExport2.ts","time":233,"edits":3,"cost":"4.93"},{"name":"tests/cases/fourslash/completionsGeneratorFunctions.ts","time":233,"edits":3,"cost":"4.93"},{"name":"tests/cases/fourslash/codeFixInferFromUsageJSXElement.ts","time":155,"edits":2,"cost":"4.93"},{"name":"tests/cases/fourslash/goToDefinitionExternalModuleName5.ts","time":155,"edits":2,"cost":"4.93"},{"name":"tests/cases/fourslash/codeFixDisableJsDiagnosticsInFile8.ts","time":155,"edits":2,"cost":"4.93"},{"name":"tests/cases/fourslash/importNameCodeFix_reExportDefault.ts","time":155,"edits":2,"cost":"4.93"},{"name":"tests/cases/fourslash/getOccurrencesThrow3.ts","time":155,"edits":2,"cost":"4.93"},{"name":"tests/cases/fourslash/codeFixSpelling_all.ts","time":155,"edits":2,"cost":"4.93"},{"name":"tests/cases/fourslash/unusedVariableInForLoop6FSAddUnderscore.ts","time":155,"edits":2,"cost":"4.93"},{"name":"tests/cases/conformance/moduleResolution/typesVersions.justIndex.ts","time":155,"edits":2,"cost":"4.93"},{"name":"tests/cases/fourslash/completionForStringLiteralNonrelativeImport10.ts","time":232,"edits":3,"cost":"4.93"},{"name":"tests/cases/fourslash/codeFixClassExprClassImplementClassFunctionVoidInferred.ts","time":309,"edits":4,"cost":"4.93"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance4.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/fourslash/goToDefinitionSourceUnit.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/fourslash/referencesForStringLiteralPropertyNames5.ts","time":154,"edits":2,"cost":"4.92"},{"name":"tests/cases/conformance/types/typeRelationships/widenedTypes/objectLiteralWidened.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/types/typeParameters/recurringTypeParamForContainerOfBase01.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/jsx/tsxUnionElementType3.tsx","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractSuperCalls.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/fourslash/extract-method-not-for-import.ts","time":154,"edits":2,"cost":"4.92"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceArrayTuple.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/controlFlow/controlFlowWhileStatement.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/fourslash/getPreProcessedFile.ts","time":154,"edits":2,"cost":"4.92"},{"name":"tests/cases/conformance/expressions/unaryOperators/voidOperator/voidOperatorWithBooleanType.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/fourslash/server/formatBracketInSwitchCase.ts","time":154,"edits":2,"cost":"4.92"},{"name":"tests/cases/compiler/outModuleConcatAmd.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/es6/spread/iteratorSpreadInCall10.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/compiler/declarationEmitInferredTypeAlias6.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/jsx/jsxParsingError2.tsx","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/fourslash/goToDefinitionFunctionType.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/declarationEmit/libReferenceDeclarationEmitBundle.ts","time":154,"edits":2,"cost":"4.92"},{"name":"tests/cases/compiler/errorsInGenericTypeReference.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/compiler/es6ModuleLet.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName39.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/compiler/constDeclarations-ambient-errors.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/fourslash/codeFixClassImplementInterface_all.ts","time":154,"edits":2,"cost":"4.92"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment13.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit2_ES6.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/compiler/sourceMapValidationExportAssignmentCommonjs.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionES6.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/fourslash/breakpointValidationForIn.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/compiler/forInStatement5.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/compiler/arrowFunctionInConstructorArgument1.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/types/any/anyAsGenericFunctionCall.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames28_ES6.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardFunction.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/compiler/shadowingViaLocalValueOrBindingElement.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability02.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/fourslash/codeFixAwaitInSyncFunction15.ts","time":154,"edits":2,"cost":"4.92"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/compiler/overloadResolutionOverNonCTObjectLit.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/compiler/systemModule12.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/decorators/class/decoratedClassExportsSystem2.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/compiler/indexTypeCheck.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/fourslash/completionListInUnclosedTypeOfExpression02.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates20_ES6.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalTypeParameter.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardsOnClassProperty.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/expressions/unaryOperators/voidOperator/voidOperatorWithAnyOtherType.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/compiler/declFileTypeAnnotationTypeReference.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/classes/members/accessibility/classPropertyAsProtected.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/compiler/importAnImport.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/compiler/collisionArgumentsFunction.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment14.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionInCJS3.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/es6/modules/defaultExportInAwaitExpression01.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration8_es2017.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt2.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/compiler/fillInMissingTypeArgsOnConstructCalls.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration5_es2017.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/compiler/exportDeclarationsInAmbientNamespaces2.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/compiler/noEmitOnError.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/compiler/es5-asyncFunctionWithStatements.ts","time":77,"edits":1,"cost":"4.92"},{"name":"tests/cases/compiler/specedNoStackBlown.ts","time":153,"edits":2,"cost":"4.92"},{"name":"tests/cases/fourslash/goToDefinitionSignatureAlias_require.ts","time":153,"edits":2,"cost":"4.92"},{"name":"tests/cases/compiler/deeplyDependentLargeArrayMutation.ts","time":153,"edits":2,"cost":"4.92"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_notInCommonjsProject.ts","time":153,"edits":2,"cost":"4.92"},{"name":"tests/cases/fourslash/codeFixAddMissingMember_non_generator_function.ts","time":229,"edits":3,"cost":"4.92"},{"name":"tests/cases/fourslash/referencesBloomFilters.ts","time":305,"edits":4,"cost":"4.92"},{"name":"tests/cases/conformance/emitter/es2018/forAwait/emitter.forAwait.es2018.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/conformance/es6/Symbols/symbolDeclarationEmit11.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteral.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/compiler/implementArrayInterface.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/fourslash/quickInfoOnThis.ts","time":152,"edits":2,"cost":"4.91"},{"name":"tests/cases/fourslash/findAllRefsOfConstructor_withModifier.ts","time":152,"edits":2,"cost":"4.91"},{"name":"tests/cases/fourslash/completionListInTemplateLiteralPartsNegatives1.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesInUnionTypes03.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/fourslash/getOccurrencesYield.ts","time":228,"edits":3,"cost":"4.91"},{"name":"tests/cases/compiler/returnTypeParameterWithModules.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/compiler/multiImportExport.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/compiler/optionalParameterInDestructuringWithInitializer.ts","time":152,"edits":2,"cost":"4.91"},{"name":"tests/cases/compiler/genericArgumentCallSigAssignmentCompat.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/compiler/typeInferenceFBoundedTypeParams.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/compiler/externModule.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/fourslash/importFixWithMultipleModuleExportAssignment.ts","time":152,"edits":2,"cost":"4.91"},{"name":"tests/cases/compiler/augmentedTypesModules3b.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/conformance/types/specifyingTypes/typeQueries/typeofClass2.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/conformance/expressions/contextualTyping/functionExpressionContextualTyping1.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess27.ts","time":152,"edits":2,"cost":"4.91"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings14_ES6.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleWithSameNameAndCommonRoot.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/fourslash/extract-method22.ts","time":152,"edits":2,"cost":"4.91"},{"name":"tests/cases/conformance/expressions/thisKeyword/typeOfThisInConstructorParamList.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern7.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/conformance/es6/yieldExpressions/YieldExpression10_es6.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/fourslash/todoComments5.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/compiler/inheritance1.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/compiler/identityForSignaturesWithTypeParametersAndAny.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/compiler/moduleAugmentationNoNewNames.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/compiler/requireOfJsonFileWithModuleNodeResolutionEmitUmd.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/compiler/genericTypeAssertions4.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/compiler/constructorWithCapturedSuper.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/compiler/recursiveCloduleReference.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty58.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/conformance/constEnums/constEnum1.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/conformance/types/localTypes/localTypes2.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/compiler/overloadWithCallbacksWithDifferingOptionalityOnArgs.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/compiler/externalModuleResolution2.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/compiler/implicitAnyNewExprLackConstructorSignature.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/conformance/es6/spread/arrayLiteralSpreadES5iterable.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/compiler/importHelpersDeclarations.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/fourslash/addMethodToInterface1.ts","time":76,"edits":1,"cost":"4.91"},{"name":"tests/cases/fourslash/getOccurrencesLoopBreakContinue5.ts","time":151,"edits":2,"cost":"4.91"},{"name":"tests/cases/fourslash/quickInfoOnInternalAliases.ts","time":151,"edits":2,"cost":"4.91"},{"name":"tests/cases/fourslash/contextuallyTypedParameters.ts","time":151,"edits":2,"cost":"4.91"},{"name":"tests/cases/fourslash/signatureHelpFilteredTriggers03.ts","time":151,"edits":2,"cost":"4.91"},{"name":"tests/cases/fourslash/referencesForEnums.ts","time":151,"edits":2,"cost":"4.91"},{"name":"tests/cases/fourslash/importNameCodeFixOptionalImport1.ts","time":151,"edits":2,"cost":"4.91"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportFileQuoteStyleMixed0.ts","time":151,"edits":2,"cost":"4.91"},{"name":"tests/cases/fourslash/findAllRefsForFunctionExpression01.ts","time":151,"edits":2,"cost":"4.91"},{"name":"tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction2.ts","time":151,"edits":2,"cost":"4.91"},{"name":"tests/cases/fourslash/goToImplementationNamespace_03.ts","time":151,"edits":2,"cost":"4.91"},{"name":"tests/cases/fourslash/completionListInUnclosedFunction18.ts","time":226,"edits":3,"cost":"4.90"},{"name":"tests/cases/conformance/parser/ecmascript2018/forAwait/parser.forAwait.es2018.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/fourslash/tsxFindAllReferences3.ts","time":150,"edits":2,"cost":"4.90"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit1_ES6.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/fourslash/renameImportAndShorthand.ts","time":150,"edits":2,"cost":"4.90"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty31.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/fourslash/server/brace01.ts","time":150,"edits":2,"cost":"4.90"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionInAMD1.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/conformance/jsdoc/jsdocTemplateTag5.ts","time":150,"edits":2,"cost":"4.90"},{"name":"tests/cases/conformance/classes/members/constructorFunctionTypes/classWithConstructors.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/fourslash/completionsJsdocTag.ts","time":150,"edits":2,"cost":"4.90"},{"name":"tests/cases/compiler/es5-asyncFunctionTryStatements.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/conformance/classes/members/accessibility/privateClassPropertyAccessibleWithinNestedClass.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/fourslash/completionsImport_reExport_wrongName.ts","time":225,"edits":3,"cost":"4.90"},{"name":"tests/cases/fourslash/findAllRefsJsDocTemplateTag_function.ts","time":150,"edits":2,"cost":"4.90"},{"name":"tests/cases/fourslash/jsDocForTypeAlias.ts","time":150,"edits":2,"cost":"4.90"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/compiler/constDeclarations-access5.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit1.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserCommaInTypeMemberList2.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/compiler/tsxDeepAttributeAssignabilityError.tsx","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesSourceMap1_ES5.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/fourslash/codeFixUnusedIdentifier_set.ts","time":150,"edits":2,"cost":"4.90"},{"name":"tests/cases/compiler/overloadAssignmentCompat.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/compiler/declarationEmitDestructuringArrayPattern2.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/fourslash/codeFixAddMissingEnumMember8.ts","time":150,"edits":2,"cost":"4.90"},{"name":"tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInitializer.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/compiler/generativeRecursionWithTypeOf.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/compiler/requireOfJsonFileWithEmptyObjectWithErrors.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/compiler/multipleInheritance.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/compiler/internalAliasEnumInsideLocalModuleWithoutExport.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithExport.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/conformance/types/thisType/thisTypeInAccessorsNegative.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/compiler/genericTypeWithCallableMembers2.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/compiler/assignmentCompatability19.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/compiler/nestedBlockScopedBindings3.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/conformance/externalModules/typesOnlyExternalModuleStillHasInstance.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/compiler/infinitelyExpandingTypes5.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/conformance/jsx/tsxElementResolution14.tsx","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509534.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/compiler/nativeToBoxedTypes.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/compiler/parseTypes.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/compiler/cyclicGenericTypeInstantiationInference.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/compiler/underscoreThisInDerivedClass01.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/compiler/es5ModuleWithModuleGenCommonjs.ts","time":75,"edits":1,"cost":"4.90"},{"name":"tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts","time":896,"edits":12,"cost":"4.89"},{"name":"tests/cases/fourslash/codeFixAwaitInSyncFunction6.ts","time":224,"edits":3,"cost":"4.89"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_unexported_uninitialized_var.ts","time":149,"edits":2,"cost":"4.89"},{"name":"tests/cases/fourslash/getEditsForFileRename_notAffectedByJsFile.ts","time":149,"edits":2,"cost":"4.89"},{"name":"tests/cases/fourslash/completionOfInterfaceAndVar.ts","time":149,"edits":2,"cost":"4.89"},{"name":"tests/cases/fourslash/codeFixUnusedIdentifier_destructure_allUnused_nested.ts","time":149,"edits":2,"cost":"4.89"},{"name":"tests/cases/fourslash/jsDocInheritDoc.ts","time":149,"edits":2,"cost":"4.89"},{"name":"tests/cases/fourslash/typeOperatorNodeBuilding.ts","time":149,"edits":2,"cost":"4.89"},{"name":"tests/cases/fourslash/unusedVariableInNamespace2.ts","time":149,"edits":2,"cost":"4.89"},{"name":"tests/cases/fourslash/tsxCompletion10.ts","time":149,"edits":2,"cost":"4.89"},{"name":"tests/cases/fourslash/codeFixConvertToMappedObjectType6.ts","time":149,"edits":2,"cost":"4.89"},{"name":"tests/cases/fourslash/refactorExtractType17.ts","time":148,"edits":2,"cost":"4.89"},{"name":"tests/cases/conformance/types/intersection/intersectionReductionStrict.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/fourslash/renameJsPrototypeProperty01.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/types/nonPrimitive/nonPrimitiveStrictNull.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardOfFormExpr1AndExpr2.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints5.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/compiler/objectFreeze.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/fourslash/renameDestructuringFunctionParameter.ts","time":148,"edits":2,"cost":"4.89"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames29_ES6.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/fourslash/importNameCodeFix_fileWithNoTrailingNewline.ts","time":148,"edits":2,"cost":"4.89"},{"name":"tests/cases/compiler/declareFileExportAssignmentWithVarFromVariableStatement.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/fourslash/quickInfoFunctionKeyword.ts","time":148,"edits":2,"cost":"4.89"},{"name":"tests/cases/fourslash/findAllRefsEnumAsNamespace.ts","time":148,"edits":2,"cost":"4.89"},{"name":"tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidOperands.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/interfaces/declarationMerging/twoMergedInterfacesWithDifferingOverloads.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/fourslash/codeFixAddMissingEnumMember9.ts","time":148,"edits":2,"cost":"4.89"},{"name":"tests/cases/fourslash/codeFixClassPropertyInitialization6.ts","time":148,"edits":2,"cost":"4.89"},{"name":"tests/cases/compiler/privacyCheckExportAssignmentOnExportedGenericInterface2.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/es6/modules/exportsAndImports1-amd.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/compiler/genericReduce.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/compiler/objectCreate-errors.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck31.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/compiler/declareFileExportAssignment.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/fourslash/completionListProtectedMembers.ts","time":222,"edits":3,"cost":"4.89"},{"name":"tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/compiler/cachedModuleResolution8.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/compiler/genericMemberFunction.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionInCJS2.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/compiler/unusedTypeParameterInMethod4.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/compiler/superCallsInConstructor.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/fourslash/todoComments9.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration12.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/es6/destructuring/destructuringParameterProperties2.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithMethodInES6.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPrivateOverloads.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/expressions/superCalls/errorSuperCalls.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/es6/Symbols/symbolDeclarationEmit9.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/compiler/indexSignaturesInferentialTyping.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/compiler/arrayFilter.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/compiler/arraySigChecking.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty21.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/compiler/staticMemberWithStringAndNumberNames.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/compiler/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/expressions/unaryOperators/voidOperator/voidOperatorWithNumberType.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/compiler/es5ExportDefaultClassDeclaration2.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment4.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/controlFlow/controlFlowDeleteOperator.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithConstructSignaturesThatHidesBaseSignature.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/es6/newTarget/invalidNewTarget.es6.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES6.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/types/primitives/void/invalidVoidValues.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/compiler/declFileIndexSignatures.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/compiler/genericFunctions2.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/compiler/instanceAndStaticDeclarations1.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/es6/templates/templateStringInInstanceOf.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/compiler/es6ImportNamedImportNoExportMember.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/compiler/functionOverloads16.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/conformance/es6/templates/templateStringInUnaryPlusES6.ts","time":74,"edits":1,"cost":"4.89"},{"name":"tests/cases/compiler/narrowingByTypeofInSwitch.ts","time":221,"edits":3,"cost":"4.88"},{"name":"tests/cases/fourslash/getOccurrencesIsDefinitionOfBindingPattern.ts","time":221,"edits":3,"cost":"4.88"},{"name":"tests/cases/fourslash/codeFixInferFromUsageAlwaysInfer.ts","time":147,"edits":2,"cost":"4.88"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess32.ts","time":147,"edits":2,"cost":"4.88"},{"name":"tests/cases/fourslash/goToImplementationInterfaceMethod_02.ts","time":147,"edits":2,"cost":"4.88"},{"name":"tests/cases/fourslash/goToImplementationShorthandPropertyAssignment_02.ts","time":147,"edits":2,"cost":"4.88"},{"name":"tests/cases/fourslash/moveToNewFile_tsconfig.ts","time":147,"edits":2,"cost":"4.88"},{"name":"tests/cases/fourslash/goToDefinitionExternalModuleName.ts","time":147,"edits":2,"cost":"4.88"},{"name":"tests/cases/fourslash/jsDocFunctionSignatures12.ts","time":147,"edits":2,"cost":"4.88"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportAllowSyntheticDefaultImports4.ts","time":147,"edits":2,"cost":"4.88"},{"name":"tests/cases/fourslash/getEditsForFileRename_resolveJsonModule.ts","time":147,"edits":2,"cost":"4.88"},{"name":"tests/cases/fourslash/formattingOnClasses.ts","time":147,"edits":2,"cost":"4.88"},{"name":"tests/cases/fourslash/codeFixClassExtendAbstractMethod_comment.ts","time":147,"edits":2,"cost":"4.88"},{"name":"tests/cases/fourslash/codeFixAddAllParameterNames.ts","time":146,"edits":2,"cost":"4.87"},{"name":"tests/cases/conformance/es6/Symbols/symbolDeclarationEmit13.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/moduleAndInterfaceWithSameName.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/capturedLetConstInLoop10.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/overloadResolutionTest1.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/fourslash/signatureHelpInference.ts","time":146,"edits":2,"cost":"4.87"},{"name":"tests/cases/fourslash/findAllRefsRenameImportWithSameName.ts","time":146,"edits":2,"cost":"4.87"},{"name":"tests/cases/fourslash/refactorConvertExport_defaultToNamed.ts","time":219,"edits":3,"cost":"4.87"},{"name":"tests/cases/conformance/es6/spread/iteratorSpreadInCall7.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/sourceMap-LineBreaks.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/conformance/scanner/ecmascript5/scannerNumericLiteral6.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/unusedIdentifiersConsolidated1.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess13.ts","time":146,"edits":2,"cost":"4.87"},{"name":"tests/cases/compiler/genericCombinators2.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/conformance/jsdoc/jsdocParamTagTypeLiteral.ts","time":146,"edits":2,"cost":"4.87"},{"name":"tests/cases/compiler/functionOverloads44.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly3.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/allowSyntheticDefaultImports3.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/typeReferenceDirectives2.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgs2.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/conformance/es6/Symbols/symbolDeclarationEmit10.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/typeUsedAsValueError.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/import_var-referencing-an-imported-module-alias.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportFileDetachedComments.ts","time":146,"edits":2,"cost":"4.87"},{"name":"tests/cases/compiler/undeclaredModuleError.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/exportAssignClassAndModule.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/conformance/classes/classDeclarations/classExtendingClassLikeType.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypedTagsES6.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/selfReferencingFile2.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/genericSpecializations2.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/downlevelLetConst14.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/declFileOptionalInterfaceMethod.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/unknownTypeArgOnCall.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstructorTypedArguments5.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/moduleAugmentationGlobal3.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors4.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames44_ES6.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/es6ModuleClassDeclaration.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty26.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/conformance/classes/members/accessibility/privateStaticNotAccessibleInClodule.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/declarationEmitInferredTypeAlias2.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/stradac.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/errorRecoveryInClassDeclaration.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/conformance/es6/templates/templateStringInArrowFunction.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/cachedModuleResolution9.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/compiler/emptyEnum.ts","time":73,"edits":1,"cost":"4.87"},{"name":"tests/cases/fourslash/findAllRefsTypedef_importType.ts","time":218,"edits":3,"cost":"4.87"},{"name":"tests/cases/fourslash/completionListForStringUnion.ts","time":218,"edits":3,"cost":"4.87"},{"name":"tests/cases/fourslash/codeFixClassPropertyInitialization1.ts","time":145,"edits":2,"cost":"4.86"},{"name":"tests/cases/fourslash/findReferencesAfterEdit.ts","time":145,"edits":2,"cost":"4.86"},{"name":"tests/cases/fourslash/navigationItemsPrefixMatch2.ts","time":145,"edits":2,"cost":"4.86"},{"name":"tests/cases/fourslash/completionListStaticProtectedMembers.ts","time":145,"edits":2,"cost":"4.86"},{"name":"tests/cases/compiler/strictFunctionTypes1.ts","time":290,"edits":4,"cost":"4.86"},{"name":"tests/cases/fourslash/closedCommentsInConstructor.ts","time":145,"edits":2,"cost":"4.86"},{"name":"tests/cases/fourslash/navigationItemsSubStringMatch.ts","time":145,"edits":2,"cost":"4.86"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess20.ts","time":145,"edits":2,"cost":"4.86"},{"name":"tests/cases/fourslash/codeFixRequireInTs_all.ts","time":145,"edits":2,"cost":"4.86"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportNodeModules7.ts","time":217,"edits":3,"cost":"4.86"},{"name":"tests/cases/fourslash/jsxTsIgnoreOnJSXExpressionsAndChildren.ts","time":144,"edits":2,"cost":"4.86"},{"name":"tests/cases/fourslash/goToImplementationInterface_07.ts","time":144,"edits":2,"cost":"4.86"},{"name":"tests/cases/fourslash/referencesForExternalModuleNames.ts","time":216,"edits":3,"cost":"4.86"},{"name":"tests/cases/compiler/strictFunctionTypesErrors.ts","time":216,"edits":3,"cost":"4.86"},{"name":"tests/cases/conformance/types/keyof/circularIndexedAccessErrors.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/compiler/cloduleStaticMembers.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/fourslash/codeFixNegativeReplaceQualifiedNameWithIndexedAccessType01.ts","time":144,"edits":2,"cost":"4.86"},{"name":"tests/cases/conformance/types/keyof/keyofIntersection.ts","time":144,"edits":2,"cost":"4.86"},{"name":"tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/compiler/declarationEmitDestructuring3.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/conformance/parser/ecmascript5/parserNotRegex2.ts","time":144,"edits":2,"cost":"4.86"},{"name":"tests/cases/conformance/expressions/operators/incrementAndDecrement.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/compiler/commentsMultiModuleMultiFile.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/compiler/es6ExportDefaultIdentifier.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/conformance/constEnums/constEnum2.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/compiler/constDeclarations-access3.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/fourslash/unusedTypeParametersInClass2.ts","time":144,"edits":2,"cost":"4.86"},{"name":"tests/cases/fourslash/completionForStringLiteralNonrelativeImport2.ts","time":144,"edits":2,"cost":"4.86"},{"name":"tests/cases/fourslash/augmentedTypesModule2.ts","time":216,"edits":3,"cost":"4.86"},{"name":"tests/cases/compiler/requireOfJsonFileWithoutExtension.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/compiler/es6ExportAll.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueInIterationStatement3.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/compiler/es2017basicAsync.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/compiler/aliasErrors.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/conformance/references/library-reference-1.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithCallSignatures3.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/fourslash/definition.ts","time":144,"edits":2,"cost":"4.86"},{"name":"tests/cases/conformance/salsa/constructorFunctions3.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/compiler/collisionSuperAndLocalVarInProperty.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/compiler/memberAccessOnConstructorType.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/compiler/enumNegativeLiteral1.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionInSystem3.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/compiler/exportDeclarationInInternalModule.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/conformance/externalModules/exportAssignTypes.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/compiler/innerBoundLambdaEmit.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/compiler/es6ExportAllInEs5.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/compiler/superInObjectLiterals_ES6.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedClassExpressionMethodDeclaration02.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/conformance/scanner/ecmascript3/scannerES3NumericLiteral5.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/compiler/superCallFromClassThatDerivesFromGenericType2.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of40.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty52.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/compiler/superAccess.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions01_ES6.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/compiler/collisionExportsRequireAndFunction.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/compiler/checkForObjectTooStrict.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/compiler/importInsideModule.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of10.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractSingleLineDecl.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration11_es5.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of2.ts","time":72,"edits":1,"cost":"4.86"},{"name":"tests/cases/conformance/types/union/unionTypeCallSignatures.ts","time":143,"edits":2,"cost":"4.85"},{"name":"tests/cases/fourslash/codeFixAddMissingEnumMember2.ts","time":143,"edits":2,"cost":"4.85"},{"name":"tests/cases/fourslash/codeFixInferFromUsageVariable3JS.ts","time":143,"edits":2,"cost":"4.85"},{"name":"tests/cases/fourslash/codeFixClassImplementClassFunctionVoidInferred.ts","time":143,"edits":2,"cost":"4.85"},{"name":"tests/cases/fourslash/codeFixConvertToMappedObjectType10.ts","time":143,"edits":2,"cost":"4.85"},{"name":"tests/cases/fourslash/codeFixUndeclaredMethodObjectLiteralArgs.ts","time":214,"edits":3,"cost":"4.85"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_import_nameFromModuleSpecifier.ts","time":214,"edits":3,"cost":"4.85"},{"name":"tests/cases/fourslash/refactorExtractType25.ts","time":142,"edits":2,"cost":"4.84"},{"name":"tests/cases/compiler/noImplicitThisBigThis.ts","time":142,"edits":2,"cost":"4.84"},{"name":"unittests:: services:: extract:: Symbol Walker","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/compiler/invalidReferenceSyntax1.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateU.ts","time":213,"edits":3,"cost":"4.84"},{"name":"tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction5.ts","time":142,"edits":2,"cost":"4.84"},{"name":"tests/cases/fourslash/codeFixClassPropertyInitialization12.ts","time":142,"edits":2,"cost":"4.84"},{"name":"tests/cases/fourslash/completionListClassMembersWithSuperClassFromUnknownNamespace.ts","time":142,"edits":2,"cost":"4.84"},{"name":"tests/cases/fourslash/extractMethod_forAwait.ts","time":142,"edits":2,"cost":"4.84"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardOfFormExpr1OrExpr2.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/compiler/constEnumDeclarations.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/compiler/declFileEnumUsedAsValue.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/conformance/types/union/contextualTypeWithUnionTypeCallSignatures.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/conformance/classes/members/accessibility/protectedInstanceMemberAccessibility.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/compiler/typeRootsFromMultipleNodeModulesDirectories.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/fourslash/goToImplementationInterface_01.ts","time":142,"edits":2,"cost":"4.84"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck29.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/compiler/privacyGloClass.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/compiler/moduleResolutionWithExtensions_withAmbientPresent.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/compiler/collisionCodeGenModuleWithMethodChildren.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/compiler/infinitelyExpandingTypesNonGenericBase.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceErrors.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/conformance/scanner/ecmascript5/scannerClass2.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/compiler/es6ImportNamedImportWithTypesAndValues.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration6.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/conformance/es6/modules/exportsAndImports3-amd.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/compiler/tupleTypeInference.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/compiler/declFileForInterfaceWithRestParams.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements2.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/conformance/es6/Symbols/symbolType9.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/compiler/fatArrowSelf.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/compiler/es5ModuleInternalNamedImports.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithBooleanType.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty3.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction6_es5.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames29_ES5.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern18.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/conformance/expressions/contextualTyping/superCallParameterContextualTyping1.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/compiler/commentOnClassMethod1.ts","time":71,"edits":1,"cost":"4.84"},{"name":"tests/cases/fourslash/cloduleTypeOf1.ts","time":212,"edits":3,"cost":"4.84"},{"name":"tests/cases/fourslash/quickinfoForNamespaceMergeWithClassConstrainedToSelf.ts","time":141,"edits":2,"cost":"4.84"},{"name":"tests/cases/fourslash/codeFixInferFromUsageGetter2.ts","time":141,"edits":2,"cost":"4.84"},{"name":"tests/cases/fourslash/findAllRefsObjectBindingElementPropertyName02.ts","time":141,"edits":2,"cost":"4.84"},{"name":"tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction19.ts","time":141,"edits":2,"cost":"4.84"},{"name":"tests/cases/fourslash/augmentedTypesModule5.ts","time":141,"edits":2,"cost":"4.84"},{"name":"tests/cases/fourslash/argumentsAreAvailableAfterEditsAtEndOfFunction.ts","time":141,"edits":2,"cost":"4.84"},{"name":"tests/cases/fourslash/findAllRefsReExport_broken2.ts","time":211,"edits":3,"cost":"4.83"},{"name":"unittests:: tsserver:: watchEnvironment:: tsserverProjectSystem Watched recursive directories with windows style file system","time":70,"edits":1,"cost":"4.83"},{"name":"unittests:: tsserver:: resolutionCache:: tsserverProjectSystem add the missing module file for inferred project","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/conformance/scanner/ecmascript5/scannertest1.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/compiler/unknownSymbolOffContextualType1.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/fourslash/codeFixCalledES2015Import3.ts","time":140,"edits":2,"cost":"4.83"},{"name":"tests/cases/fourslash/unclosedFunctionErrorRecovery.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints5.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/compiler/genericTypeAssertions6.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/fourslash/tsxCompletionInFunctionExpressionOfChildrenCallback1.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/fourslash/codeFixAwaitInSyncFunction12.ts","time":140,"edits":2,"cost":"4.83"},{"name":"tests/cases/conformance/classes/members/accessibility/protectedStaticClassPropertyAccessibleWithinSubclass.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/compiler/sourceMap-Comments.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/fourslash/completionForStringLiteralImport1.ts","time":140,"edits":2,"cost":"4.83"},{"name":"tests/cases/fourslash/navigationItemsOverloadsBroken2.ts","time":140,"edits":2,"cost":"4.83"},{"name":"tests/cases/conformance/decorators/class/property/decoratorOnClassProperty7.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/fourslash/suggestionOfUnusedVariableWithExternalModule.ts","time":140,"edits":2,"cost":"4.83"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of17.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/compiler/implicitAnyFunctionReturnNullOrUndefined.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/fourslash/completionForStringLiteralNonrelativeImport3.ts","time":140,"edits":2,"cost":"4.83"},{"name":"tests/cases/conformance/internalModules/moduleBody/moduleWithStatementsOfEveryKind.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/compiler/derivedClassConstructorWithExplicitReturns01.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/compiler/moduleAugmentationImportsAndExports3.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/compiler/commentsVarDecl.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/compiler/unusedTypeParameterInFunction2.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction9_es2017.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/compiler/arrowFunctionsMissingTokens.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/fourslash/completionsCombineOverloads_returnType.ts","time":140,"edits":2,"cost":"4.83"},{"name":"tests/cases/compiler/visibilityOfTypeParameters.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleWithSameNameAndCommonRootES6.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/conformance/types/typeRelationships/comparable/equalityStrictNulls.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks04.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/compiler/aliasUsageInGenericFunction.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/compiler/systemModule13.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/compiler/recursivelySpecializedConstructorDeclaration.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/compiler/declareAlreadySeen.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/compiler/overloadOnConstNoAnyImplementation.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/conformance/async/es6/await_unaryExpression_es6_3.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/conformance/types/members/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/compiler/noImplicitAnyIndexing.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/conformance/types/thisType/thisTypeInObjectLiterals.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/compiler/es5-importHelpersAsyncFunctions.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/conformance/es6/templates/templateStringBinaryOperations.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/compiler/strictModeInConstructor.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression2_es6.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/compiler/primitiveTypeAsInterfaceNameGeneric.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/compiler/varArgsOnConstructorTypes.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/compiler/specializationsShouldNotAffectEachOther.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/compiler/genericArrayExtenstions.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision6.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/conformance/internalModules/codeGeneration/nameCollision.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType2.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/octalIntegerLiteralError.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/compiler/protoInIndexer.ts","time":70,"edits":1,"cost":"4.83"},{"name":"tests/cases/fourslash/goToDefinitionDynamicImport4.ts","time":209,"edits":3,"cost":"4.82"},{"name":"tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts","time":139,"edits":2,"cost":"4.82"},{"name":"tests/cases/fourslash/goToImplementationNamespace_01.ts","time":139,"edits":2,"cost":"4.82"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceMultipleImplementsIntersection1.ts","time":139,"edits":2,"cost":"4.82"},{"name":"tests/cases/fourslash/getOccurrencesAbstract03.ts","time":139,"edits":2,"cost":"4.82"},{"name":"tests/cases/fourslash/completionsDestructuring.ts","time":139,"edits":2,"cost":"4.82"},{"name":"tests/cases/fourslash/getOccurrencesThrow4.ts","time":139,"edits":2,"cost":"4.82"},{"name":"tests/cases/fourslash/findAllRefsReExports2.ts","time":139,"edits":2,"cost":"4.82"},{"name":"tests/cases/fourslash/codeFixClassPropertyInitialization2.ts","time":139,"edits":2,"cost":"4.82"},{"name":"tests/cases/fourslash/completionsForRecursiveGenericTypesMember.ts","time":139,"edits":2,"cost":"4.82"},{"name":"tests/cases/fourslash/jsconfig.ts","time":139,"edits":2,"cost":"4.82"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.ts","time":138,"edits":2,"cost":"4.82"},{"name":"tests/cases/fourslash/commentsClass.ts","time":276,"edits":4,"cost":"4.82"},{"name":"tests/cases/compiler/emitClassExpressionInDeclarationFile.ts","time":138,"edits":2,"cost":"4.82"},{"name":"tests/cases/fourslash/completionListInUnclosedFunction07.ts","time":207,"edits":3,"cost":"4.82"},{"name":"tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters1.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/fourslash/findAllReferencesOfJsonModule.ts","time":207,"edits":3,"cost":"4.82"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of13.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/compiler/defaultValueInFunctionTypes.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/compiler/unusedLocalsAndObjectSpread.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/compiler/transformsElideNullUndefinedType.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/fourslash/codeFixUnusedIdentifier_all_infer.ts","time":138,"edits":2,"cost":"4.82"},{"name":"tests/cases/fourslash/moveToNewFile_updateUses_js.ts","time":138,"edits":2,"cost":"4.82"},{"name":"tests/cases/fourslash/codeFixCalledES2015Import1.ts","time":138,"edits":2,"cost":"4.82"},{"name":"tests/cases/fourslash/completionListWithLabel.ts","time":138,"edits":2,"cost":"4.82"},{"name":"tests/cases/fourslash/codeFixRequireInTs.ts","time":138,"edits":2,"cost":"4.82"},{"name":"tests/cases/compiler/es5ExportDefaultFunctionDeclaration3.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/compiler/jsxFactoryIdentifier.ts","time":138,"edits":2,"cost":"4.82"},{"name":"tests/cases/compiler/superInLambdas.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/compiler/jsFileClassPropertyInitalizationInObjectLiteral.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/fourslash/getOccurrencesConst02.ts","time":138,"edits":2,"cost":"4.82"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern15.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/conformance/dynamicImport/importCallExpression6ESNext.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/conformance/externalModules/umd-augmentation-2.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/compiler/es6ExportDefaultFunctionDeclaration.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/fourslash/completionEntryForUnionProperty2.ts","time":138,"edits":2,"cost":"4.82"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment11.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/fourslash/referencesForStringLiteralPropertyNames3.ts","time":207,"edits":3,"cost":"4.82"},{"name":"tests/cases/compiler/declarationEmitInvalidExport.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/fourslash/codeFixGenerateDefinitions.ts","time":138,"edits":2,"cost":"4.82"},{"name":"tests/cases/conformance/types/rest/objectRestForOf.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/conformance/types/thisType/declarationFiles.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/compiler/nodeResolution8.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/conformance/statements/VariableStatements/validMultipleVariableDeclarations.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints4.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/compiler/asiAmbientFunctionDeclaration.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/compiler/moduleAugmentationInAmbientModule4.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/fourslash/getOccurrencesThrow5.ts","time":138,"edits":2,"cost":"4.82"},{"name":"tests/cases/compiler/noUsedBeforeDefinedErrorInAmbientContext1.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/compiler/unusedInterfaceinNamespace4.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/compiler/promiseVoidErrorCallback.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/fourslash/breakpointValidationEnums.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/compiler/collisionThisExpressionAndLocalVarInMethod.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/conformance/types/typeParameters/typeParameterAsBaseType.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/compiler/crashInresolveReturnStatement.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/compiler/constEnumErrors.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/conformance/async/es5/asyncQualifiedReturnType_es5.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/compiler/doNotEmitPinnedCommentOnNotEmittedNode.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/compiler/recursiveProperties.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/compiler/bestCommonTypeWithContextualTyping.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode4.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/compiler/asiArith.ts","time":69,"edits":1,"cost":"4.82"},{"name":"tests/cases/fourslash/referencesForClassMembers.ts","time":275,"edits":4,"cost":"4.81"},{"name":"tests/cases/fourslash/codeFixAddConvertToUnknownForNonOverlappingTypes1.ts","time":137,"edits":2,"cost":"4.81"},{"name":"tests/cases/fourslash/codeFixDisableJsDiagnosticsInFile_all.ts","time":137,"edits":2,"cost":"4.81"},{"name":"tests/cases/compiler/inferenceShouldFailOnEvolvingArrays.ts","time":137,"edits":2,"cost":"4.81"},{"name":"tests/cases/fourslash/goToImplementationInterfaceMethod_00.ts","time":137,"edits":2,"cost":"4.81"},{"name":"tests/cases/fourslash/documentHighlightsInvalidModifierLocations.ts","time":137,"edits":2,"cost":"4.81"},{"name":"tests/cases/fourslash/goToImplementationLocal_06.ts","time":137,"edits":2,"cost":"4.81"},{"name":"tests/cases/fourslash/completionsPathsJsonModuleWithAmd.ts","time":137,"edits":2,"cost":"4.81"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_import_onlyNamedImports.ts","time":205,"edits":3,"cost":"4.81"},{"name":"tests/cases/fourslash/codeFixInferFromUsageInaccessibleTypes.ts","time":205,"edits":3,"cost":"4.81"},{"name":"tests/cases/fourslash/completionListInUnclosedFunction04.ts","time":205,"edits":3,"cost":"4.81"},{"name":"tests/cases/conformance/expressions/functionCalls/callWithSpread3.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/inferenceAndSelfReferentialConstraint.ts","time":136,"edits":2,"cost":"4.80"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of22.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/fourslash/referencesForInheritedProperties2.ts","time":204,"edits":3,"cost":"4.80"},{"name":"tests/cases/compiler/numericIndexerTyping1.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/declFileClassWithIndexSignature.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/fourslash/goToDefinitionImportedNames2.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/fourslash/importNameCodeFixDefaultExport1.ts","time":136,"edits":2,"cost":"4.80"},{"name":"tests/cases/fourslash/augmentedTypesClass1.ts","time":204,"edits":3,"cost":"4.80"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/ReturnStatements/parserReturnStatement2.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/arityErrorRelatedSpanBindingPattern.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/fourslash/findAllRefsConstructorFunctions.ts","time":136,"edits":2,"cost":"4.80"},{"name":"tests/cases/fourslash/renameDestructuringAssignmentInFor.ts","time":136,"edits":2,"cost":"4.80"},{"name":"tests/cases/fourslash/unusedTypeParametersInClass3.ts","time":136,"edits":2,"cost":"4.80"},{"name":"tests/cases/compiler/ambiguousOverloadResolution.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/genericCallWithObjectLiteralArguments1.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess21.ts","time":136,"edits":2,"cost":"4.80"},{"name":"tests/cases/fourslash/tsxCompletionUnionElementType.ts","time":136,"edits":2,"cost":"4.80"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardOfFormIsTypeOnInterfaces.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceMemberNestedTypeAlias.ts","time":136,"edits":2,"cost":"4.80"},{"name":"tests/cases/compiler/nonIdenticalTypeConstraints.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfString.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/qualify.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates12_ES6.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/conformance/es6/destructuring/destructuringParameterProperties1.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/switchCasesExpressionTypeMismatch.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/fourslash/completionList_getExportsOfModule.ts","time":136,"edits":2,"cost":"4.80"},{"name":"tests/cases/conformance/classes/members/accessibility/protectedClassPropertyAccessibleWithinNestedClass.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithNonSymmetricSubtypes.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorInAmbientContext6.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/fourslash/renameImportNamespaceAndShorthand.ts","time":136,"edits":2,"cost":"4.80"},{"name":"tests/cases/conformance/es6/spread/iteratorSpreadInArray6.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern12.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/cloduleTest2.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/conformance/es6/Symbols/symbolType8.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/sourceMap-Comment1.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersOptionality3.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/out-flag3.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/declFileForExportedImport.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/noImplicitAnyParametersInModule.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/constraintReferencingTypeParameterFromSameTypeParameterList.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/declFileModuleAssignmentInObjectLiteralProperty.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/duplicateStringNamedProperty1.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/declarationEmitInvalidReference.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionAsyncES6UMD.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/conformance/dynamicImport/importCallExpression4ESNext.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/conformance/statements/for-inStatements/for-inStatementsDestructuring3.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/anonymousClassExpression2.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/genericWithCallSignatures1.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/templateStringsArrayTypeRedefinedInES6Mode.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/functionsInClassExpressions.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/decoratorMetadataRestParameterWithImportedType.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/overrideBaseIntersectionMethod.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/breakTarget6.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/inferentialTypingObjectLiteralMethod1.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/conformance/es6/variableDeclarations/VariableDeclaration3_es6.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/overloadBindingAcrossDeclarationBoundaries2.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/es6ModuleFunctionDeclaration.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/aliasAssignments.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/copyrightWithoutNewLine1.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractConstructorAssignability.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/letDeclarations-scopes-duplicates7.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/typeParameterWithInvalidConstraintType.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesSourceMap2_ES6.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfClass.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/conformance/types/nonPrimitive/nonPrimitiveAccessProperty.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/modulePrologueCommonjs.ts","time":68,"edits":1,"cost":"4.80"},{"name":"tests/cases/compiler/substitutionTypesCompareCorrectlyInRestrictiveInstances.ts","time":135,"edits":2,"cost":"4.79"},{"name":"tests/cases/fourslash/codeFixInferFromUsageSetter.ts","time":135,"edits":2,"cost":"4.79"},{"name":"tests/cases/fourslash/extract-method27.ts","time":135,"edits":2,"cost":"4.79"},{"name":"tests/cases/fourslash/getOccurrencesIsDefinitionOfClass.ts","time":135,"edits":2,"cost":"4.79"},{"name":"tests/cases/fourslash/codeFixAddMissingMember12.ts","time":135,"edits":2,"cost":"4.79"},{"name":"tests/cases/fourslash/codeFixAddMissingEnumMember10.ts","time":135,"edits":2,"cost":"4.79"},{"name":"tests/cases/fourslash/completionForStringLiteralFromSignature2.ts","time":135,"edits":2,"cost":"4.79"},{"name":"tests/cases/fourslash/indentationInObject.ts","time":135,"edits":2,"cost":"4.79"},{"name":"tests/cases/compiler/mappedTypeUnionConstraintInferences.ts","time":135,"edits":2,"cost":"4.79"},{"name":"tests/cases/fourslash/completionsLiterals.ts","time":135,"edits":2,"cost":"4.79"},{"name":"tests/cases/fourslash/unusedLocalsInFunction4.ts","time":135,"edits":2,"cost":"4.79"},{"name":"tests/cases/compiler/paramsOnlyHaveLiteralTypesWhenAppropriatelyContextualized.ts","time":134,"edits":2,"cost":"4.79"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint2.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/fourslash/navigationItemsOverloadsBroken1.ts","time":134,"edits":2,"cost":"4.79"},{"name":"tests/cases/compiler/contextualSignatureInstatiationContravariance.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/conformance/jsx/tsxSpreadAttributesResolution4.tsx","time":134,"edits":2,"cost":"4.79"},{"name":"tests/cases/compiler/genericFunduleInModule.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/compiler/FunctionDeclaration4.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/compiler/super_inside-object-literal-getters-and-setters.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/fourslash/getEmitOutputWithSyntacticErrorsForMultipleFiles.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/fourslash/renameDestructuringClassProperty.ts","time":134,"edits":2,"cost":"4.79"},{"name":"tests/cases/conformance/jsx/tsxSpreadAttributesResolution5.tsx","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/compiler/declarationEmitInferredTypeAlias1.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/compiler/multivar.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/compiler/unusedVariablesinForLoop.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/fourslash/jsFileCompilationDuplicateFunctionImplementation.ts","time":201,"edits":3,"cost":"4.79"},{"name":"tests/cases/compiler/genericsWithoutTypeParameters1.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/compiler/unusedMultipleParameters2InMethodDeclaration.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/fourslash/quickInfoImportedTypes.ts","time":134,"edits":2,"cost":"4.79"},{"name":"tests/cases/compiler/contextualTyping25.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/compiler/lift.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/compiler/initializePropertiesWithRenamedLet.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess19.ts","time":134,"edits":2,"cost":"4.79"},{"name":"tests/cases/compiler/es6ImportNameSpaceImport.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints2.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/compiler/contextuallyTypingOrOperator.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/conformance/es6/moduleExportsUmd/decoratedDefaultExportsGetExportedUmd.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/compiler/constructorArgWithGenericCallSignature.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/compiler/topLevel.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/fourslash/renameCommentsAndStrings4.ts","time":134,"edits":2,"cost":"4.79"},{"name":"tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression2_es5.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/compiler/contextualSignatureInstantiation3.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/conformance/controlFlow/controlFlowForStatement.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/conformance/es6/destructuring/emptyVariableDeclarationBindingPatterns01_ES5iterable.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/conformance/jsx/tsxElementResolution19.tsx","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/compiler/contextualTyping12.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/conformance/es6/moduleExportsUmd/anonymousDefaultExportsUmd.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/compiler/functionOverloads36.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/compiler/collisionSuperAndParameter.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/conformance/jsx/tsxReactEmit6.tsx","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/compiler/classOrderBug.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration4.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/conformance/types/thisType/thisTypeErrors.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames49_ES6.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression3_es6.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement10.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/compiler/constructorParametersInVariableDeclarations.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck52.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/compiler/signaturesUseJSDocForOptionalParameters.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/compiler/breakTarget5.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/fourslash/multipleExportAssignmentsErrorList0.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/compiler/breakTarget1.ts","time":67,"edits":1,"cost":"4.79"},{"name":"tests/cases/fourslash/syntheticImportFromBabelGeneratedFile2.ts","time":133,"edits":2,"cost":"4.78"},{"name":"tests/cases/fourslash/codeFixInferFromUsagePropertyAccess.ts","time":133,"edits":2,"cost":"4.78"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesString.ts","time":133,"edits":2,"cost":"4.78"},{"name":"tests/cases/fourslash/completionsDotInArrayLiteralInObjectLiteral.ts","time":133,"edits":2,"cost":"4.78"},{"name":"tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction4.ts","time":133,"edits":2,"cost":"4.78"},{"name":"tests/cases/fourslash/tripleSlashRefPathCompletionNarrowing.ts","time":133,"edits":2,"cost":"4.78"},{"name":"tests/cases/fourslash/codeFixAwaitInSyncFunction9.ts","time":133,"edits":2,"cost":"4.78"},{"name":"tests/cases/fourslash/incrementalEditInvocationExpressionAboveInterfaceDeclaration.ts","time":133,"edits":2,"cost":"4.78"},{"name":"tests/cases/fourslash/completionListWithModulesOutsideModuleScope2.ts","time":133,"edits":2,"cost":"4.78"},{"name":"tests/cases/fourslash/ambientShorthandFindAllRefs.ts","time":133,"edits":2,"cost":"4.78"},{"name":"tests/cases/fourslash/goToImplementationInterfaceMethod_05.ts","time":133,"edits":2,"cost":"4.78"},{"name":"tests/cases/fourslash/goToImplementationInterfaceMethod_09.ts","time":133,"edits":2,"cost":"4.78"},{"name":"tests/cases/fourslash/codeFixAddMissingEnumMember5.ts","time":133,"edits":2,"cost":"4.78"},{"name":"tests/cases/fourslash/codeFixCannotFindModule_nodeCoreModules.ts","time":133,"edits":2,"cost":"4.78"},{"name":"tests/cases/fourslash/findAllReferencesOfConstructor_badOverload.ts","time":199,"edits":3,"cost":"4.78"},{"name":"tests/cases/fourslash/quickInfoFromContextualType.ts","time":199,"edits":3,"cost":"4.78"},{"name":"tests/cases/fourslash/completionListIsGlobalCompletion.ts","time":331,"edits":5,"cost":"4.77"},{"name":"tests/cases/fourslash/duplicatePackageServices.ts","time":331,"edits":5,"cost":"4.77"},{"name":"tests/cases/fourslash/syntheticImportFromBabelGeneratedFile1.ts","time":132,"edits":2,"cost":"4.77"},{"name":"tests/cases/fourslash/codeFixAddMissingMember_typeParameter.ts","time":198,"edits":3,"cost":"4.77"},{"name":"tests/cases/fourslash/refactorConvertExport_namedToDefault.ts","time":132,"edits":2,"cost":"4.77"},{"name":"tests/cases/compiler/enumAssignmentCompat2.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/es6/destructuring/emptyObjectBindingPatternParameter04.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction23.ts","time":132,"edits":2,"cost":"4.77"},{"name":"tests/cases/fourslash/goToImplementationLocal_02.ts","time":132,"edits":2,"cost":"4.77"},{"name":"tests/cases/conformance/es6/Symbols/symbolDeclarationEmit12.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/fourslash/completionsJsxAttributeInitializer.ts","time":198,"edits":3,"cost":"4.77"},{"name":"tests/cases/fourslash/findAllRefs_importType_named.ts","time":132,"edits":2,"cost":"4.77"},{"name":"tests/cases/fourslash/codeFixClassExtendAbstractProtectedProperty.ts","time":132,"edits":2,"cost":"4.77"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithConstructSignatures2.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/genericFunctionsWithOptionalParameters3.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/derivedClassWithoutExplicitConstructor2.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/fourslash/referencesForStringLiteralPropertyNames6.ts","time":132,"edits":2,"cost":"4.77"},{"name":"tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/externalModules/exportNonInitializedVariablesES6.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionAsyncES5System.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/nestedBlockScopedBindings6.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/types/members/objectTypeWithStringNamedPropertyOfIllegalCharacters.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/declarationFilesWithTypeReferences2.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/parser/ecmascript5/Protected/Protected3.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target5.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/fourslash/unusedVariableInModule4.ts","time":132,"edits":2,"cost":"4.77"},{"name":"tests/cases/conformance/salsa/typeFromJSConstructor.ts","time":132,"edits":2,"cost":"4.77"},{"name":"tests/cases/compiler/optionalParameterProperty.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithStringType.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of23.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/parser/ecmascript5/VariableDeclarations/parserVariableDeclaration1.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/genericChainedCalls.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/strictModeReservedWord2.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionAsyncES6System.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithNumberType.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/subtypeRelationForNever.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/assignToFn.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/unqualifiedCallToClassStatic1.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/types/union/unionTypeReadonly.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/castNewObjectBug.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/discriminantsAndPrimitives.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/declFileRestParametersOfFunctionAndFunctionType.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/fourslash/codeFixAddMissingMember10.ts","time":132,"edits":2,"cost":"4.77"},{"name":"tests/cases/compiler/reachabilityChecks5.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/expressions/commaOperator/commaOperatorWithSecondOperandBooleanType.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/es6/newTarget/newTarget.es5.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments1_es6.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/extendAndImplementTheSameBaseType2.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility2.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/hidingCallSignatures.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsReference.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/chainedAssignment1.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/declarationEmitInferredDefaultExportType.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints3.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/genericClassesInModule.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/thisInAccessors.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/collisionArgumentsClassMethod.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/es6/spread/iteratorSpreadInCall11.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/moduleAugmentationDisallowedExtensions.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/moduleAugmentationGlobal2.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportWithExport.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/aliasOnMergedModuleInterface.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/es6/destructuring/destructuringObjectBindingPatternAndAssignment3.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/dottedModuleName.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/types/typeRelationships/widenedTypes/strictNullChecksNoWidening.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/jsxPreserveWithJsInput.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck54.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of10.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedObjectLiteralES6.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/compiler/fromAsIdentifier2.ts","time":66,"edits":1,"cost":"4.77"},{"name":"tests/cases/fourslash/genericFunctionSignatureHelp3.ts","time":395,"edits":6,"cost":"4.77"},{"name":"tests/cases/fourslash/findAllRefsExportEquals.ts","time":197,"edits":3,"cost":"4.77"},{"name":"tests/cases/fourslash/completionListOnAliases2.ts","time":131,"edits":2,"cost":"4.76"},{"name":"tests/cases/fourslash/codeFixAddMissingEnumMember11.ts","time":131,"edits":2,"cost":"4.76"},{"name":"tests/cases/fourslash/completionListBuilderLocations_Modules.ts","time":131,"edits":2,"cost":"4.76"},{"name":"tests/cases/fourslash/codeFixConvertToMappedObjectType8.ts","time":131,"edits":2,"cost":"4.76"},{"name":"tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesRootDir.ts","time":131,"edits":2,"cost":"4.76"},{"name":"tests/cases/compiler/moduleResolution_packageJson_notAtPackageRoot_fakeScopedPackage.ts","time":131,"edits":2,"cost":"4.76"},{"name":"tests/cases/fourslash/server/declarationMapsGoToDefinitionRelativeSourceRoot.ts","time":131,"edits":2,"cost":"4.76"},{"name":"tests/cases/fourslash/shims/getReferencesAtPosition.ts","time":196,"edits":3,"cost":"4.76"},{"name":"tests/cases/fourslash/findAllRefsOnImportAliases.ts","time":196,"edits":3,"cost":"4.76"},{"name":"unittests:: tsserver:: syntax operations","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/compiler/assignmentIndexedToPrimitives.ts","time":130,"edits":2,"cost":"4.76"},{"name":"tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts","time":130,"edits":2,"cost":"4.76"},{"name":"tests/cases/fourslash/completionsCombineOverloads.ts","time":130,"edits":2,"cost":"4.76"},{"name":"tests/cases/conformance/es6/Symbols/symbolType18.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/fourslash/moveToNewFile_selectionOnImports.ts","time":130,"edits":2,"cost":"4.76"},{"name":"tests/cases/compiler/es6ModuleConst.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/conformance/salsa/chainedPrototypeAssignment.ts","time":130,"edits":2,"cost":"4.76"},{"name":"tests/cases/conformance/classes/members/accessibility/protectedStaticNotAccessibleInClodule.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/compiler/jsxHash.tsx","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/fourslash/completionEntryForImportName.ts","time":130,"edits":2,"cost":"4.76"},{"name":"tests/cases/fourslash/jsdocTypedefTagTypeExpressionCompletion.ts","time":130,"edits":2,"cost":"4.76"},{"name":"tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/fourslash/renameDestructuringAssignmentNestedInForOf.ts","time":130,"edits":2,"cost":"4.76"},{"name":"tests/cases/compiler/unusedImports16.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/compiler/classExpressionWithStaticPropertiesES64.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/fourslash/findAllRefsWithLeadingUnderscoreNames3.ts","time":130,"edits":2,"cost":"4.76"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedFunctionTypedArguments2.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/compiler/sourceMapValidationFor.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/conformance/references/library-reference-8.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/conformance/es6/modules/exportsAndImports2.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions09_ES6.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/compiler/asyncFunctionsAndStrictNullChecks.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/compiler/assignmentCompatability7.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/compiler/reachabilityChecks7.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/compiler/declarationEmitDetachedComment1.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/fourslash/codeFixRequireInTs_allowSyntheticDefaultImports.ts","time":130,"edits":2,"cost":"4.76"},{"name":"tests/cases/conformance/es6/destructuring/optionalBindingParametersInOverloads1.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess28.ts","time":130,"edits":2,"cost":"4.76"},{"name":"tests/cases/compiler/duplicateSymbolsExportMatching.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/conformance/jsx/tsxElementResolution1.tsx","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/compiler/undeclaredBase.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/fourslash/quickInfoForObjectBindingElementPropertyName03.ts","time":130,"edits":2,"cost":"4.76"},{"name":"tests/cases/compiler/overload2.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/conformance/emitter/es2015/asyncGenerators/emitter.asyncGenerators.objectLiteralMethods.es2015.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/compiler/complexClassRelationships.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/fourslash/findAllRefsImportEquals.ts","time":130,"edits":2,"cost":"4.76"},{"name":"tests/cases/compiler/letInLetDeclarations_ES6.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/compiler/typeCheckingInsideFunctionExpressionInArray.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/compiler/overloadOnConstInheritance2.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/compiler/emitCapturingThisInTupleDestructuring1.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/compiler/capturedLetConstInLoop13.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsValidConstructorFunction.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/compiler/crashOnMethodSignatures.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/compiler/duplicateVarsAcrossFileBoundaries.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/compiler/newArrays.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/compiler/instanceOfAssignability.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing6.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames45_ES6.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/compiler/inferentialTypingWithFunctionTypeZip.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/compiler/declFileForTypeParameters.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/conformance/functions/functionOverloadErrors.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMixedWithModifiers.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithTemplateStrings01.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of43.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/compiler/collisionThisExpressionAndNameResolution.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/compiler/requireOfJsonFileWithoutAllowJs.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/conformance/externalModules/importNonStringLiteral.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/conformance/async/es2017/await_unaryExpression_es2017_3.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithMismatchedAccessibilityModifiers.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement4.ts","time":65,"edits":1,"cost":"4.76"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportPaths2.ts","time":195,"edits":3,"cost":"4.76"},{"name":"tests/cases/fourslash/server/getOutliningSpansForRegions.ts","time":195,"edits":3,"cost":"4.76"},{"name":"tests/cases/fourslash/findAllReferPropertyAccessExpressionHeritageClause.ts","time":195,"edits":3,"cost":"4.76"},{"name":"tests/cases/fourslash/referencesBloomFilters2.ts","time":258,"edits":4,"cost":"4.75"},{"name":"tests/cases/fourslash/codeFixInferFromUsageOptionalParam2.ts","time":129,"edits":2,"cost":"4.75"},{"name":"tests/cases/fourslash/codeFixClassExtendAbstractPublicProperty.ts","time":129,"edits":2,"cost":"4.75"},{"name":"tests/cases/fourslash/goToDefinitionUnionTypeProperty_discriminated.ts","time":129,"edits":2,"cost":"4.75"},{"name":"tests/cases/fourslash/quickInfoUnionOfNamespaces.ts","time":129,"edits":2,"cost":"4.75"},{"name":"tests/cases/compiler/destructuringAssignmentWithDefault.ts","time":129,"edits":2,"cost":"4.75"},{"name":"tests/cases/compiler/importTypeGenericArrowTypeParenthesized.ts","time":128,"edits":2,"cost":"4.74"},{"name":"tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts","time":128,"edits":2,"cost":"4.74"},{"name":"tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts","time":128,"edits":2,"cost":"4.74"},{"name":"tests/cases/compiler/constantEnumAssert.ts","time":128,"edits":2,"cost":"4.74"},{"name":"tests/cases/conformance/types/specifyingTypes/typeQueries/typeofANonExportedType.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/fourslash/importNameCodeFixUMDGlobalReact2.ts","time":192,"edits":3,"cost":"4.74"},{"name":"tests/cases/fourslash/referencesForAmbients.ts","time":192,"edits":3,"cost":"4.74"},{"name":"tests/cases/compiler/unusedImportDeclaration.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/fourslash/renameDefaultLibDontWork.ts","time":128,"edits":2,"cost":"4.74"},{"name":"tests/cases/fourslash/renameDestructuringAssignmentInForOf.ts","time":128,"edits":2,"cost":"4.74"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportBaseUrl0.ts","time":256,"edits":4,"cost":"4.74"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/systemModule8.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/fourslash/findAllRefsImportType.ts","time":128,"edits":2,"cost":"4.74"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceUndeclaredSymbol.ts","time":128,"edits":2,"cost":"4.74"},{"name":"tests/cases/fourslash/refactorConvertImport_namedToNamespace.ts","time":128,"edits":2,"cost":"4.74"},{"name":"tests/cases/compiler/mergedDeclarations1.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithMultipleBases.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/importWithTrailingSlash.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/conformance/jsx/tsxSpreadAttributesResolution2.tsx","time":128,"edits":2,"cost":"4.74"},{"name":"tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction14.ts","time":128,"edits":2,"cost":"4.74"},{"name":"tests/cases/compiler/thisExpressionInCallExpressionWithTypeArguments.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/declFileEmitDeclarationOnly.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/conformance/es6/modules/exportsAndImportsWithUnderscores2.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/exportEqualsUmd.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/sourceMapWithMultipleFilesWithCopyright.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/fourslash/goToDefinition_mappedType.ts","time":128,"edits":2,"cost":"4.74"},{"name":"tests/cases/conformance/types/objectTypeLiteral/methodSignatures/methodSignaturesWithOverloads2.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/privacyCheckTypeOfFunction.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/es5-umd4.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/restParamModifier2.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/recursiveUnionTypeInference.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/conformance/types/typeRelationships/comparable/optionalProperties01.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/typeUsedAsValueError2.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/sourceMapForFunctionWithCommentPrecedingStatement01.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/aliasesInSystemModule2.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/declInput-2.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/duplicateIdentifierRelatedSpans1.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/genericTypeConstraints.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGreaterThanTokenAmbiguity17.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/unionTypeInference.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/typeAliasExport.ts","time":128,"edits":2,"cost":"4.74"},{"name":"tests/cases/conformance/types/literal/stringLiteralsAssertionsInEqualityComparisons02.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess31.ts","time":128,"edits":2,"cost":"4.74"},{"name":"tests/cases/compiler/declarationEmitFBoundedTypeParams.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/unusedImports6.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/outModuleConcatSystem.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndNumericIndexer.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/contextualTypingOfGenericFunctionTypedArguments1.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithoutReturnTypeAnnotationInference.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates14_ES6.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/missingTypeArguments3.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/conformance/es6/restParameters/emitRestParametersMethodES6.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/typeArgInference2WithError.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/derivedClassWithoutExplicitConstructor3.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/nonExportedElementsOfMergedModules.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/declFileConstructSignatures.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/conformance/expressions/contextualTyping/objectLiteralContextualTyping.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/conformance/jsx/tsxReactEmitEntities.tsx","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames27_ES6.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/controlFlowWithIncompleteTypes.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/inferentialTypingUsingApparentType3.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/conformance/parser/ecmascript5/Accessors/parserAccessors10.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/mergedDeclarations4.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/mixedStaticAndInstanceClassMembers.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration10.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity4.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/moduleAliasAsFunctionArgument.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/detachedCommentAtStartOfLambdaFunction2.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/crashRegressionTest.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck41.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/privacyCheckCallbackOfInterfaceMethodWithTypeParameter.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/blockScopedBindingsReassignedInLoop4.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/recursiveGenericSignatureInstantiation2.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode10.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/es5-souremap-amd.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/compiler/useStrictLikePrologueString01.ts","time":64,"edits":1,"cost":"4.74"},{"name":"tests/cases/fourslash/importNameCodeFix_types_classic.ts","time":191,"edits":3,"cost":"4.73"},{"name":"tests/cases/fourslash/completionsImport_exportEquals.ts","time":191,"edits":3,"cost":"4.73"},{"name":"tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts","time":127,"edits":2,"cost":"4.73"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportFromAtTypesScopedPackage.ts","time":127,"edits":2,"cost":"4.73"},{"name":"tests/cases/fourslash/extract-method26.ts","time":127,"edits":2,"cost":"4.73"},{"name":"tests/cases/compiler/defaultDeclarationEmitShadowedNamedCorrectly.ts","time":127,"edits":2,"cost":"4.73"},{"name":"tests/cases/fourslash/completionForStringLiteralFromSignature.ts","time":127,"edits":2,"cost":"4.73"},{"name":"tests/cases/fourslash/completionForStringLiteral12.ts","time":127,"edits":2,"cost":"4.73"},{"name":"tests/cases/fourslash/codeFixForgottenThisPropertyAccess_all.ts","time":127,"edits":2,"cost":"4.73"},{"name":"tests/cases/fourslash/getJavaScriptSyntacticDiagnostics21.ts","time":127,"edits":2,"cost":"4.73"},{"name":"tests/cases/compiler/generatorReturnExpressionIsChecked.ts","time":127,"edits":2,"cost":"4.73"},{"name":"tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts","time":126,"edits":2,"cost":"4.72"},{"name":"unittests:: tsserver:: maxNodeModuleJsDepth for inferred projects","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/conformance/controlFlow/controlFlowIIFE.ts","time":126,"edits":2,"cost":"4.72"},{"name":"tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator2.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern3.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts","time":126,"edits":2,"cost":"4.72"},{"name":"tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/moduleAugmentationInAmbientModule3.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/fourslash/navigateToImport.ts","time":126,"edits":2,"cost":"4.72"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess24.ts","time":126,"edits":2,"cost":"4.72"},{"name":"tests/cases/conformance/ambient/ambientDeclarationsPatterns.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/declInput3.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/fourslash/findAllRefsWithLeadingUnderscoreNames4.ts","time":126,"edits":2,"cost":"4.72"},{"name":"tests/cases/compiler/invalidUnicodeEscapeSequance2.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/fourslash/tsxFindAllReferences4.ts","time":126,"edits":2,"cost":"4.72"},{"name":"tests/cases/fourslash/goToDefinitionExternalModuleName7.ts","time":126,"edits":2,"cost":"4.72"},{"name":"tests/cases/compiler/declInput.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression5_es6.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/collisionExportsRequireAndAmbientEnum.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/internalAliasInterfaceInsideLocalModuleWithoutExport.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/assignmentCompatForEnums.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/propertyIdentityWithPrivacyMismatch.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedProperty2.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/conformance/classes/classDeclarations/classExtendingNonConstructor.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/es6ModuleInternalImport.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/internalAliasClassInsideLocalModuleWithoutExport.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/typeArgumentInferenceWithConstraintAsCommonRoot.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/missingTypeArguments1.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/arrayBindingPatternOmittedExpressions.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/typeReferenceDirectives7.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedClassExpressionMethodDeclaration01.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/switchAssignmentCompat.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode1.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedBindingInitializerNegative.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/es6ImportNamedImportInExportAssignment.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionInAMD2.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/maxConstraints.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/conformance/es6/templates/templateStringInDeleteExpressionES6.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/m7Bugs.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty36.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/commentsOnObjectLiteral2.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/didYouMeanSuggestionErrors.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/assignmentCompatability20.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArgumentLists/parserErrorRecovery_ArgumentList6.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/conformance/classes/classDeclarations/classAndInterfaceMergeConflictingMembers.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/letDeclarations-access.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/declFileForVarList.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/jsFileCompilationInterfaceSyntax.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndAmbientWithSameNameAndCommonRoot.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/assignToPrototype1.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/anyIsAssignableToObject.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardsInDoStatement.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/import_reference-to-type-alias.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/genericTypeUsedWithoutTypeArguments3.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakTarget1.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/conformance/decorators/class/decoratedClassExportsCommonJS1.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/compiler/functionWithNoBestCommonType1.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/conformance/jsx/tsxDynamicTagName5.tsx","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/conformance/expressions/literals/literals.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakInIterationOrSwitchStatement3.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression1_es6.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/conformance/es6/destructuring/emptyObjectBindingPatternParameter01.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of50.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/fourslash/smartIndentModule.ts","time":63,"edits":1,"cost":"4.72"},{"name":"tests/cases/fourslash/completionsRecommended_equals.ts","time":189,"edits":3,"cost":"4.72"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax_all.ts","time":189,"edits":3,"cost":"4.72"},{"name":"tests/cases/fourslash/convertFunctionToEs6Class_commentOnVariableDeclaration.ts","time":188,"edits":3,"cost":"4.72"},{"name":"tests/cases/fourslash/server/projectInfo01.ts","time":125,"edits":2,"cost":"4.72"},{"name":"tests/cases/fourslash/formattingOnInvalidCodes.ts","time":125,"edits":2,"cost":"4.72"},{"name":"tests/cases/fourslash/codeFixAddMissingEnumMember7.ts","time":125,"edits":2,"cost":"4.72"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportFileQuoteStyle0.ts","time":125,"edits":2,"cost":"4.72"},{"name":"tests/cases/fourslash/codeFixAwaitInSyncFunction10.ts","time":125,"edits":2,"cost":"4.72"},{"name":"tests/cases/fourslash/quickInfoCallProperty.ts","time":125,"edits":2,"cost":"4.72"},{"name":"tests/cases/compiler/indirectTypeParameterReferences.ts","time":125,"edits":2,"cost":"4.72"},{"name":"tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments1.ts","time":125,"edits":2,"cost":"4.72"},{"name":"tests/cases/fourslash/findAllRefsObjectBindingElementPropertyName01.ts","time":125,"edits":2,"cost":"4.72"},{"name":"tests/cases/fourslash/codeFixInferFromUsageRestParam3.ts","time":125,"edits":2,"cost":"4.72"},{"name":"tests/cases/fourslash/transitiveExportImports3.ts","time":187,"edits":3,"cost":"4.71"},{"name":"tests/cases/fourslash/codeFixInferFromUsageMember2JS.ts","time":187,"edits":3,"cost":"4.71"},{"name":"tests/cases/fourslash/getJavaScriptSyntacticDiagnostics13.ts","time":187,"edits":3,"cost":"4.71"},{"name":"tests/cases/fourslash/codeFixInferFromUsageVariableJS.ts","time":187,"edits":3,"cost":"4.71"},{"name":"tests/cases/fourslash/findAllRefsWithShorthandPropertyAssignment.ts","time":187,"edits":3,"cost":"4.71"},{"name":"tests/cases/fourslash/moveToNewFile_global.ts","time":187,"edits":3,"cost":"4.71"},{"name":"tests/cases/compiler/unionOfFunctionAndSignatureIsCallable.ts","time":124,"edits":2,"cost":"4.71"},{"name":"unittests:: tsserver:: refactors","time":62,"edits":1,"cost":"4.71"},{"name":"unittests:: services:: cancellableLanguageServiceOperations","time":62,"edits":1,"cost":"4.71"},{"name":"unittests:: tsserver:: compileOnSave:: EmitFile test","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload3.tsx","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/fourslash/goToDefinitionConstructorOverloads.ts","time":124,"edits":2,"cost":"4.71"},{"name":"tests/cases/fourslash/navigationItemsExactMatch2.ts","time":124,"edits":2,"cost":"4.71"},{"name":"tests/cases/fourslash/codeFixInferFromUsageCall.ts","time":124,"edits":2,"cost":"4.71"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments01_ES6.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/importDeclarationUsedAsTypeQuery.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern28.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/fourslash/getEditsForFileRename_casing.ts","time":124,"edits":2,"cost":"4.71"},{"name":"tests/cases/fourslash/quickInfoMappedSpreadTypes.ts","time":124,"edits":2,"cost":"4.71"},{"name":"tests/cases/fourslash/importNameCodeFixUMDGlobal1.ts","time":124,"edits":2,"cost":"4.71"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType2.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/functionExpressionShadowedByParams.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionAsyncESNext.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/promiseTypeInference.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicOverloads.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/collisionThisExpressionAndParameter.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringVariableStatement.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/inheritedOverloadedSpecializedSignatures.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty59.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/genericBaseClassLiteralProperty2.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/expressions/contextualTyping/taggedTemplateContextualTyping2.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/externalModules/commonJSImportNotAsPrimaryExpression.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/expressions/commaOperator/commaOperatorWithSecondOperandAnyType.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of19.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/controlFlow/controlFlowDoWhileStatement.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType3_ES5.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/breakInIterationOrSwitchStatement2.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/errorWithTruncatedType.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringVariableStatementDefaultValues.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/fourslash/completionListAfterStringLiteral1.ts","time":124,"edits":2,"cost":"4.71"},{"name":"tests/cases/compiler/autolift4.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/overloadConsecutiveness.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/declarationEmitDestructuringArrayPattern1.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/systemModule10_ES5.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/fourslash/documentHighlights_moduleImport_filesToSearch.ts","time":124,"edits":2,"cost":"4.71"},{"name":"tests/cases/conformance/types/import/importTypeAmbient.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/moduleResolutionWithSymlinks.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/checkInfiniteExpansionTermination2.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/classOrder2.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/fourslash/unusedVariableInClass2.ts","time":124,"edits":2,"cost":"4.71"},{"name":"tests/cases/compiler/typeReferenceDirectives6.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames21_ES5.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IfStatements/parserErrorRecoveryIfStatement1.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/declarationEmitClassMemberNameConflict2.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionES6CJS.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/collisionRestParameterFunction.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution4_node.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/declarationEmitDefaultExportWithTempVarName.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/unknownTypeErrors.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/types/typeAliases/circularTypeAliasForUnionWithInterface.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/moduleDuplicateIdentifiers.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks02.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/ambientExternalModuleWithInternalImportDeclaration.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments5.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/noImplicitAnyParametersInAmbientFunctions.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/functionCall7.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern17.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/classDeclarationCheckUsedBeforeDefinitionInFunctionDeclaration.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes2_ES6.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/thisInSuperCall.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/es6/destructuring/restElementWithBindingPattern2.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/externalModules/exportAssignNonIdentifier.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty56.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/moduleAliasInterface.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/nestedSelf.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/expressions/functions/typeOfThisInFunctionExpression.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/es6ImportNameSpaceImportDts.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/controlFlow/typeGuardsTypeParameters.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/types/intersection/intersectionTypeEquivalence.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/sourceMap-SkippedNode.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/externalModules/initializersInDeclarations.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/genericReversingTypeParameters.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration5_es6.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/strictModeWordInImportDeclaration.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/externalModules/exportAssignImportedIdentifier.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericStringNamedPropertyEquivalence.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/noImplicitReturnInConstructors.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/contextualTyping3.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/compiler/ambientEnumElementInitializer1.ts","time":62,"edits":1,"cost":"4.71"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment29.ts","time":185,"edits":3,"cost":"4.70"},{"name":"tests/cases/fourslash/codeFixUseDefaultImport.ts","time":185,"edits":3,"cost":"4.70"},{"name":"tests/cases/fourslash/completionForStringLiteralRelativeImport3.ts","time":185,"edits":3,"cost":"4.70"},{"name":"tests/cases/compiler/implicitIndexSignatures.ts","time":123,"edits":2,"cost":"4.70"},{"name":"tests/cases/fourslash/indentationInClassExpression.ts","time":123,"edits":2,"cost":"4.70"},{"name":"tests/cases/fourslash/basicClassMembers.ts","time":123,"edits":2,"cost":"4.70"},{"name":"tests/cases/fourslash/extract-method-in-anonymous-function-declaration.ts","time":123,"edits":2,"cost":"4.70"},{"name":"tests/cases/fourslash/asOperatorCompletion.ts","time":123,"edits":2,"cost":"4.70"},{"name":"tests/cases/conformance/jsx/checkJsxChildrenProperty3.tsx","time":123,"edits":2,"cost":"4.70"},{"name":"tests/cases/fourslash/codeFixInferFromUsageOptionalParam.ts","time":123,"edits":2,"cost":"4.70"},{"name":"tests/cases/fourslash/completionForStringLiteral2.ts","time":123,"edits":2,"cost":"4.70"},{"name":"tests/cases/fourslash/codeFixUnusedIdentifier_destructure_allUnused_for.ts","time":123,"edits":2,"cost":"4.70"},{"name":"tests/cases/fourslash/signatureHelpInCompleteGenericsCall.ts","time":123,"edits":2,"cost":"4.70"},{"name":"tests/cases/fourslash/moveToNewFile_multiple.ts","time":184,"edits":3,"cost":"4.70"},{"name":"unittests:: tsserver:: Project Errors","time":61,"edits":1,"cost":"4.69"},{"name":"unittests:: tsc-watch:: emit with when module emit is specified as node","time":61,"edits":1,"cost":"4.69"},{"name":"unittests:: tsc-watch:: watchAPI:: tsc-watch with custom module resolution","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/propertyNamesWithStringLiteral.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess4.ts","time":244,"edits":4,"cost":"4.69"},{"name":"tests/cases/fourslash/codeFixSpelling3.ts","time":122,"edits":2,"cost":"4.69"},{"name":"tests/cases/compiler/assignmentCompatBug3.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/moduleSameValueDuplicateExportedBindings2.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments2.tsx","time":122,"edits":2,"cost":"4.69"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/internalAliasInterfaceInsideTopLevelModuleWithoutExport.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/fourslash/unusedImports13FS.ts","time":122,"edits":2,"cost":"4.69"},{"name":"tests/cases/compiler/inKeywordTypeguard.ts","time":122,"edits":2,"cost":"4.69"},{"name":"tests/cases/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/instantiateContextuallyTypedGenericThis.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/conformance/types/members/objectTypeWithNumericProperty.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/fourslash/codeFixAwaitInSyncFunction4.ts","time":122,"edits":2,"cost":"4.69"},{"name":"tests/cases/fourslash/completionsPaths_pathMapping_notInNestedDirectory.ts","time":122,"edits":2,"cost":"4.69"},{"name":"tests/cases/compiler/promiseChaining.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/importHelpersInTsx.tsx","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/declarationFilesWithTypeReferences3.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/interfaceDeclaration4.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/es6ImportNameSpaceImportAmd.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/conformance/types/import/importTypeLocalMissing.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/declarationEmitDetachedComment2.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern19.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/conformance/salsa/moduleExportPropertyAssignmentDefault.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalidES6.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/fourslash/quickInfo_notInsideComment.ts","time":122,"edits":2,"cost":"4.69"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess3.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/declarationsForInferredTypeFromOtherFile.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/incompleteObjectLiteral1.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/conformance/expressions/unaryOperators/voidOperator/voidOperatorWithStringType.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/fourslash/contextuallyTypedFunctionExpressionGeneric1.ts","time":122,"edits":2,"cost":"4.69"},{"name":"tests/cases/compiler/listFailure.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck55.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/metadataOfUnion.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/conformance/parser/ecmascript5/Expressions/parserUnaryExpression5.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution3_classic.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/conformance/types/thisType/thisTypeInBasePropertyAndDerivedContainerOfBase01.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesInUnionTypes01.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleNumericIndexers.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/conformance/types/any/narrowFromAnyWithInstanceof.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts2.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/conformance/types/literal/stringLiteralsWithEqualityChecks03.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/conformance/ambient/ambientEnumDeclaration1.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/privacyCheckTypeOfInvisibleModuleNoError.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/genericStaticAnyTypeFunction.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/conformance/declarationEmit/classDoesNotDependOnPrivateMember.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithExport.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/declarationEmitExpressionInExtends4.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/letInVarDeclOfForIn_ES6.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/declarationEmitDestructuringArrayPattern5.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/importedModuleAddToGlobal.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/conformance/es6/spread/iteratorSpreadInArray8.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/restArgAssignmentCompat.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/genericConstraintOnExtendedBuiltinTypes2.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/recursiveExportAssignmentAndFindAliasedType1.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/conformance/es6/Symbols/symbolType20.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/conformance/types/rest/restElementMustBeLast.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/commentOnClassAccessor2.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/conformance/decorators/class/method/decoratorOnClassMethod8.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/ExportAssignment7.ts","time":61,"edits":1,"cost":"4.69"},{"name":"tests/cases/compiler/extendGlobalThis.ts","time":121,"edits":2,"cost":"4.68"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess10.ts","time":121,"edits":2,"cost":"4.68"},{"name":"tests/cases/fourslash/unusedVariableInForLoop6FS.ts","time":121,"edits":2,"cost":"4.68"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess34.ts","time":121,"edits":2,"cost":"4.68"},{"name":"tests/cases/fourslash/completionEntryForPropertyFromUnionOfModuleType.ts","time":121,"edits":2,"cost":"4.68"},{"name":"tests/cases/fourslash/codeFixConvertToMappedObjectType5.ts","time":121,"edits":2,"cost":"4.68"},{"name":"tests/cases/compiler/exportDefaultQualifiedNameNoError.ts","time":121,"edits":2,"cost":"4.68"},{"name":"tests/cases/compiler/indexingTypesWithNever.ts","time":181,"edits":3,"cost":"4.68"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionAsyncES5AMD.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts","time":120,"edits":2,"cost":"4.68"},{"name":"tests/cases/compiler/typeValueConflict1.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/fourslash/codeFixConvertToMappedObjectType7.ts","time":120,"edits":2,"cost":"4.68"},{"name":"tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/octalIntegerLiteral.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments2.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/declarationEmit/typePredicates/declarationEmitThisPredicatesWithPrivateName02.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/fourslash/server/getOutliningSpansForComments.ts","time":120,"edits":2,"cost":"4.68"},{"name":"tests/cases/conformance/jsx/checkJsxChildrenProperty14.tsx","time":120,"edits":2,"cost":"4.68"},{"name":"tests/cases/fourslash/codeFixInferFromUsageMember.ts","time":120,"edits":2,"cost":"4.68"},{"name":"tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionPropertyES6.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithInaccessibleTypeInTypeAnnotation.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/compiler/superPropertyAccess2.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/fourslash/completionsNamespaceName.ts","time":120,"edits":2,"cost":"4.68"},{"name":"tests/cases/fourslash/goToImplementationNamespace_04.ts","time":120,"edits":2,"cost":"4.68"},{"name":"tests/cases/conformance/Symbols/ES5SymbolProperty2.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/compiler/inheritedConstructorWithRestParams2.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportNodeModules4.ts","time":120,"edits":2,"cost":"4.68"},{"name":"tests/cases/compiler/jsFileCompilationExportAssignmentSyntax.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/compiler/keywordExpressionInternalComments.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/compiler/unusedLocalsInMethod3.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTagsES6.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames43_ES6.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/compiler/functionOverloads38.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/compiler/strictModeReservedWord.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/types/namedTypes/classWithOnlyPublicMembersEquivalentToInterface.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/compiler/multiExtendsSplitInterfaces1.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments2_es6.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment4.ts","time":120,"edits":2,"cost":"4.68"},{"name":"tests/cases/compiler/elaboratedErrors.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/compiler/generics1NoError.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/classes/members/accessibility/protectedClassPropertyAccessibleWithinNestedSubclass.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/externalModules/duplicateExportAssignments.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/compiler/mergedDeclarations6.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/es6/destructuring/destructuringObjectBindingPatternAndAssignment1ES6.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/fourslash/breakpointValidationIfElse.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/compiler/es5ExportDefaultFunctionDeclaration4.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/compiler/errorMessagesIntersectionTypes01.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/compiler/functionExpressionReturningItself.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/undefinedAssignableToEveryType.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/types/contextualTypes/partiallyAnnotatedFunction/partiallyAnnotatedFunctionInferenceError.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/compiler/declInput4.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/compiler/enumPropertyAccess.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/externalModules/exportAssignmentMergedModule.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/compiler/privacyCheckAnonymousFunctionParameter.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/compiler/privacyCheckAnonymousFunctionParameter2.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty16.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/compiler/classOrder1.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/compiler/keepImportsInDts2.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/compiler/letDeclarations-useBeforeDefinition2.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments12_ES6.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/statements/for-inStatements/for-inStatementsDestructuring2.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/es6/destructuring/arrayAssignmentPatternWithAny.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/propertyNamedPrototype.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/compiler/sourcemapValidationDuplicateNames.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/compiler/typeParametersShouldNotBeEqual3.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/conformance/classes/constructorDeclarations/classConstructorParametersAccessibility.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/compiler/classExtendsInterfaceThatExtendsClassWithPrivates1.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/fourslash/deleteReopenedModule.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/fourslash/chainedFunctionFunctionArgIndent.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/fourslash/formattingOfModuleExport.ts","time":60,"edits":1,"cost":"4.68"},{"name":"tests/cases/fourslash/findAllRefsInClassExpression.ts","time":180,"edits":3,"cost":"4.68"},{"name":"tests/cases/fourslash/moveToNewFile_js.ts","time":180,"edits":3,"cost":"4.68"},{"name":"tests/cases/fourslash/commentsExternalModules.ts","time":299,"edits":5,"cost":"4.67"},{"name":"tests/cases/conformance/types/mapped/mappedTypesArraysTuples.ts","time":239,"edits":4,"cost":"4.67"},{"name":"tests/cases/fourslash/completionListInvalidMemberNames.ts","time":418,"edits":7,"cost":"4.67"},{"name":"tests/cases/fourslash/codeFixInferFromUsageVariable2JS.ts","time":179,"edits":3,"cost":"4.67"},{"name":"tests/cases/compiler/returnTypeInferenceNotTooBroad.ts","time":119,"edits":2,"cost":"4.67"},{"name":"tests/cases/fourslash/commentsMultiModuleMultiFile.ts","time":119,"edits":2,"cost":"4.67"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess1.ts","time":119,"edits":2,"cost":"4.67"},{"name":"tests/cases/fourslash/codeFixInferFromUsageStringIndexSignature.ts","time":119,"edits":2,"cost":"4.67"},{"name":"tests/cases/fourslash/completionForStringLiteral13.ts","time":119,"edits":2,"cost":"4.67"},{"name":"tests/cases/fourslash/goToImplementationNamespace_02.ts","time":119,"edits":2,"cost":"4.67"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess26.ts","time":119,"edits":2,"cost":"4.67"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess3.ts","time":119,"edits":2,"cost":"4.67"},{"name":"tests/cases/fourslash/codeFixUnusedLabel_all.ts","time":119,"edits":2,"cost":"4.67"},{"name":"tests/cases/compiler/nonNullParameterExtendingStringAssignableToString.ts","time":119,"edits":2,"cost":"4.67"},{"name":"tests/cases/fourslash/referencesForStringLiteralPropertyNames.ts","time":178,"edits":3,"cost":"4.66"},{"name":"tests/cases/conformance/jsdoc/callbackTagNamespace.ts","time":178,"edits":3,"cost":"4.66"},{"name":"tests/cases/fourslash/moveToNewFile_moveJsxImport2.ts","time":118,"edits":2,"cost":"4.66"},{"name":"tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts","time":118,"edits":2,"cost":"4.66"},{"name":"unittests:: config:: project-references nice-behavior","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/internalModules/moduleDeclarations/nestedModules.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/declarationEmitQualifiedAliasTypeArgument.ts","time":118,"edits":2,"cost":"4.66"},{"name":"tests/cases/fourslash/importNameCodeFix_symlink_own_package.ts","time":118,"edits":2,"cost":"4.66"},{"name":"tests/cases/fourslash/exportDefaultFunction.ts","time":118,"edits":2,"cost":"4.66"},{"name":"tests/cases/compiler/functionAndImportNameConflict.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/expressions/contextualTyping/taggedTemplateContextualTyping1.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/fourslash/referencesForStringLiteralPropertyNames4.ts","time":177,"edits":3,"cost":"4.66"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfacePropertyFromParentConstructorFunction.ts","time":118,"edits":2,"cost":"4.66"},{"name":"tests/cases/compiler/thisBinding2.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess22.ts","time":295,"edits":5,"cost":"4.66"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserCommaInTypeMemberList1.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/declarationMapsOutFile.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/commonjsSafeImport.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/types/intersection/intersectionTypeMembers.ts","time":118,"edits":2,"cost":"4.66"},{"name":"tests/cases/fourslash/renameDestructuringAssignmentNestedInArrayLiteral.ts","time":118,"edits":2,"cost":"4.66"},{"name":"tests/cases/compiler/aliasInaccessibleModule2.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/fourslash/findAllRefsInExport1.ts","time":118,"edits":2,"cost":"4.66"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportFileQuoteStyleMixed1.ts","time":118,"edits":2,"cost":"4.66"},{"name":"tests/cases/fourslash/codeFixClassExtendAbstractPropertyThis.ts","time":118,"edits":2,"cost":"4.66"},{"name":"tests/cases/fourslash/importTypesDeclarationDiagnosticsNoServerError.ts","time":118,"edits":2,"cost":"4.66"},{"name":"tests/cases/compiler/outModuleConcatUmd.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/controlFlow/constLocalsInFunctionExpressions.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/moduleAugmentationExtendAmbientModule1.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/fourslash/completionsUniqueSymbol.ts","time":118,"edits":2,"cost":"4.66"},{"name":"tests/cases/conformance/types/literal/literalTypes3.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/es6/Symbols/symbolType11.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/interfaceClassMerging2.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement16.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/ReturnStatements/parserReturnStatement4.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern27.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithAccessibleTypeInTypeAnnotation.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/recursiveBaseCheck3.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/types/members/classWithPrivateProperty.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings18_ES5.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/constEnumOnlyModuleMerging.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/parser/ecmascript5/Accessors/parserGetAccessorWithTypeParameters1.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/es6ImportWithoutFromClauseNonInstantiatedModule.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/instanceofOperator.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/fourslash/codeFixClassPropertyInitialization10.ts","time":118,"edits":2,"cost":"4.66"},{"name":"tests/cases/compiler/chainedSpecializationToObjectTypeLiteral.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndStringIndexer.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/es5-commonjs3.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/tryStatementInternalComments.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/references/library-reference-13.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/fourslash/signatureHelpForNonlocalTypeDoesNotUseImportType.ts","time":118,"edits":2,"cost":"4.66"},{"name":"tests/cases/compiler/assignmentCompatability12.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportDts.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/augmentedTypesEnum.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of30.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/deeplyNestedCheck.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/moduleAugmentationInAmbientModule2.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/declFileTypeAnnotationBuiltInType.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/es2017/useSharedArrayBuffer5.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersNumericNames.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/objectCreationOfElementAccessExpression.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/jsx/tsxSpreadAttributesResolution7.tsx","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/strictModeReservedWordInDestructuring.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty32.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/typeAliasDeclarationEmit2.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters4.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings25_ES6.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardEnums.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of28.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/superWithTypeArgument.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/derivedClasses.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/usingModuleWithExportImportInValuePosition.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/types/typeAliases/interfaceDoesNotDependOnBaseTypes.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/decorators/class/method/decoratorOnClassMethod4.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/primaryExpressionMods.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/es6/Symbols/symbolType16.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/es6/decorators/class/decoratorOnClass5.es6.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/declarationEmitParameterProperty.ts","time":118,"edits":2,"cost":"4.66"},{"name":"tests/cases/compiler/moduleScopingBug.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/noImplicitUseStrict_umd.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserConstructorAmbiguity1.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/compiler/commentOnBlock1.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/conformance/parser/ecmascript5/parserEmptyFile1.ts","time":59,"edits":1,"cost":"4.66"},{"name":"tests/cases/fourslash/codeFixInferFromUsageNumberIndexSignatureJS.ts","time":235,"edits":4,"cost":"4.65"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess15.ts","time":176,"edits":3,"cost":"4.65"},{"name":"tests/cases/fourslash/findAllRefsDefinition.ts","time":176,"edits":3,"cost":"4.65"},{"name":"tests/cases/fourslash/outliningHintSpansForFunction.ts","time":117,"edits":2,"cost":"4.65"},{"name":"tests/cases/fourslash/codeFixSpelling5.ts","time":117,"edits":2,"cost":"4.65"},{"name":"tests/cases/fourslash/refactorConvertImport_namespaceToNamed_namespaceUsed.ts","time":117,"edits":2,"cost":"4.65"},{"name":"tests/cases/compiler/emitClassExpressionInDeclarationFile2.ts","time":117,"edits":2,"cost":"4.65"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportIndex.ts","time":117,"edits":2,"cost":"4.65"},{"name":"tests/cases/fourslash/unusedTypeParametersInMethod1.ts","time":117,"edits":2,"cost":"4.65"},{"name":"tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithDifferentConstraints.ts","time":117,"edits":2,"cost":"4.65"},{"name":"tests/cases/fourslash/moveToNewFile_updateUses.ts","time":175,"edits":3,"cost":"4.65"},{"name":"tests/cases/fourslash/server/projectWithNonExistentFiles.ts","time":175,"edits":3,"cost":"4.65"},{"name":"tests/cases/fourslash/smartSelection_simple1.ts","time":58,"edits":1,"cost":"4.64"},{"name":"unittests:: tsserver:: resolutionCache:: tsserverProjectSystem rename a module file and rename back","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/conformance/emitter/es2018/asyncGenerators/emitter.asyncGenerators.classMethods.es2018.ts","time":58,"edits":1,"cost":"4.64"},{"name":"unittests:: tsserver:: prefer typings to js","time":58,"edits":1,"cost":"4.64"},{"name":"unittests:: tsserver:: duplicate packages","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/fourslash/findAllRefsClassExpression2.ts","time":232,"edits":4,"cost":"4.64"},{"name":"tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction3.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportPaths_withLeadingDotSlash.ts","time":232,"edits":4,"cost":"4.64"},{"name":"tests/cases/fourslash/findAllRefsModuleDotExports.ts","time":116,"edits":2,"cost":"4.64"},{"name":"tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/fourslash/codeFixAddMissingMember13.ts","time":116,"edits":2,"cost":"4.64"},{"name":"tests/cases/fourslash/referencesForMergedDeclarations8.ts","time":116,"edits":2,"cost":"4.64"},{"name":"tests/cases/fourslash/completionForStringLiteralRelativeImport4.ts","time":232,"edits":4,"cost":"4.64"},{"name":"tests/cases/fourslash/getJavaScriptSyntacticDiagnostics23.ts","time":116,"edits":2,"cost":"4.64"},{"name":"tests/cases/fourslash/getOccurrencesThis3.ts","time":116,"edits":2,"cost":"4.64"},{"name":"tests/cases/compiler/out-flag.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/declFileExportAssignmentOfGenericInterface.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/conformance/es6/destructuring/emptyAssignmentPatterns03_ES5iterable.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/fourslash/getEditsForFileRename_ambientModule.ts","time":116,"edits":2,"cost":"4.64"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportNodeModules6.ts","time":116,"edits":2,"cost":"4.64"},{"name":"tests/cases/fourslash/codeFixAddConvertToUnknownForNonOverlappingTypes2.ts","time":116,"edits":2,"cost":"4.64"},{"name":"tests/cases/compiler/declFileImportedTypeUseInTypeArgPosition.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/fourslash/goToDefinitionLabels.ts","time":116,"edits":2,"cost":"4.64"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/fourslash/completionListAtIdentifierDefinitionLocations_parameters.ts","time":116,"edits":2,"cost":"4.64"},{"name":"tests/cases/fourslash/findReferencesJSXTagName.ts","time":116,"edits":2,"cost":"4.64"},{"name":"tests/cases/compiler/moduleResolutionWithExtensions_preferTs.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/conformance/types/union/unionTypeConstructSignatures.ts","time":116,"edits":2,"cost":"4.64"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionAsyncES5UMD.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/fourslash/codeFixForgottenThisPropertyAccess01.ts","time":116,"edits":2,"cost":"4.64"},{"name":"tests/cases/compiler/recursiveBaseCheck.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/superPropertyAccess_ES5.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/fourslash/completionListBuilderLocations_properties.ts","time":116,"edits":2,"cost":"4.64"},{"name":"tests/cases/conformance/types/localTypes/localTypes5.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/stripInternal1.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty10.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/conformance/jsx/tsxStatelessFunctionComponents3.tsx","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/conformance/jsx/tsxEmit2.tsx","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/es6ImportWithoutFromClauseAmd.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/argumentsObjectIterator02_ES6.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck10.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/conformance/classes/classExpressions/genericClassExpressionInFunction.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/commentsFormatting.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/declarationEmitExportDeclaration.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/importExportInternalComments.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/fixingTypeParametersRepeatedly3.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/conformance/es6/Symbols/symbolDeclarationEmit2.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/singleLineCommentInConciseArrowFunctionES3.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/classTypeParametersInStatics.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/inheritedConstructorWithRestParams.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/es6ImportNamedImportParsingError.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/conformance/externalModules/umd-augmentation-3.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/constructorFunctionTypeIsAssignableToBaseType2.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/emitMemberAccessExpression.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/exportStarForValues9.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern26.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType7_ES5.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/commentOnAmbientModule.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/shorthandOfExportedEntity02_targetES5_CommonJS.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInInstanceMember.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/genericMethodOverspecialization.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/privacyCheckExternalModuleExportAssignmentOfGenericClass.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/conformance/es6/classExpressions/typeArgumentInferenceWithClassExpression2.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/incorrectClassOverloadChain.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/sourceMapValidationExportAssignment.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/constructorInvocationWithTooFewTypeArgs.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement15.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/interfacePropertiesWithSameName2.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunction.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/conformance/types/typeRelationships/recursiveTypes/arrayLiteralsWithRecursiveGenerics.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/es6ModuleVariableStatement.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/conformance/jsx/tsxDynamicTagName7.tsx","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/reachabilityChecks2.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/declFileForClassWithPrivateOverloadedFunction.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/emitSkipsThisWithRestParameter.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing3.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/indexWithoutParamType2.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/fourslash/breakpointValidationClassAmbient.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/jsxEmitAttributeWithPreserve.tsx","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck47.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty9.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/conformance/types/typeAliases/asiPreventsParsingAsTypeAlias02.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/inlineSources.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/unusedLocalsinConstructor1.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/continueInLoopsWithCapturedBlockScopedBindings1.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/assignmentToFunction.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/compiler/doNotEmitTripleSlashCommentsInEmptyFile.ts","time":58,"edits":1,"cost":"4.64"},{"name":"tests/cases/fourslash/codeFixInferFromUsageRestParam2.ts","time":174,"edits":3,"cost":"4.64"},{"name":"tests/cases/fourslash/codeFixAddMissingMember9.ts","time":231,"edits":4,"cost":"4.64"},{"name":"tests/cases/fourslash/moveToNewFile_getter.ts","time":173,"edits":3,"cost":"4.64"},{"name":"tests/cases/fourslash/completionsRecommended_switch.ts","time":173,"edits":3,"cost":"4.64"},{"name":"tests/cases/fourslash/completionsJsxAttributeInitializer2.ts","time":173,"edits":3,"cost":"4.64"},{"name":"tests/cases/fourslash/moveToNewFile_declarationKinds.ts","time":173,"edits":3,"cost":"4.64"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference1.ts","time":173,"edits":3,"cost":"4.64"},{"name":"tests/cases/fourslash/getOccurrencesConst03.ts","time":115,"edits":2,"cost":"4.63"},{"name":"tests/cases/fourslash/codeFixAwaitInSyncFunction14.ts","time":115,"edits":2,"cost":"4.63"},{"name":"tests/cases/fourslash/goToDefinitionExternalModuleName2.ts","time":115,"edits":2,"cost":"4.63"},{"name":"tests/cases/fourslash/completionsRecommended_local.ts","time":230,"edits":4,"cost":"4.63"},{"name":"tests/cases/fourslash/goToDefinitionRest.ts","time":115,"edits":2,"cost":"4.63"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportNodeModules8.ts","time":115,"edits":2,"cost":"4.63"},{"name":"tests/cases/fourslash/documentHighlights_windowsPath.ts","time":115,"edits":2,"cost":"4.63"},{"name":"tests/cases/fourslash/completionListForUnicodeEscapeName.ts","time":115,"edits":2,"cost":"4.63"},{"name":"tests/cases/fourslash/unusedTypeParametersInMethods1.ts","time":115,"edits":2,"cost":"4.63"},{"name":"tests/cases/fourslash/codeFixAwaitInSyncFunction13.ts","time":115,"edits":2,"cost":"4.63"},{"name":"tests/cases/fourslash/goToDefinitionApparentTypeProperties.ts","time":115,"edits":2,"cost":"4.63"},{"name":"tests/cases/compiler/destructuredLateBoundNameHasCorrectTypes.ts","time":115,"edits":2,"cost":"4.63"},{"name":"tests/cases/fourslash/docCommentTemplateConstructor01.ts","time":115,"edits":2,"cost":"4.63"},{"name":"tests/cases/fourslash/signatureHelpWithTriggers02.ts","time":172,"edits":3,"cost":"4.63"},{"name":"tests/cases/fourslash/referencesForNumericLiteralPropertyNames.ts","time":172,"edits":3,"cost":"4.63"},{"name":"tests/cases/conformance/es2019/globalThisPropertyAssignment.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/fourslash/completionsImport_quoteStyle.ts","time":171,"edits":3,"cost":"4.62"},{"name":"tests/cases/fourslash/codeFixInferFromUsageCallBodyBoth.ts","time":114,"edits":2,"cost":"4.62"},{"name":"tests/cases/fourslash/completionListInUnclosedFunction13.ts","time":171,"edits":3,"cost":"4.62"},{"name":"tests/cases/compiler/potentiallyUncalledDecorators.ts","time":114,"edits":2,"cost":"4.62"},{"name":"tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassConstructorWithoutSuperCall.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/innerModExport1.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess30.ts","time":114,"edits":2,"cost":"4.62"},{"name":"tests/cases/fourslash/codeFixUnusedIdentifier_parameter_callback.ts","time":114,"edits":2,"cost":"4.62"},{"name":"tests/cases/conformance/jsx/tsxSpreadAttributesResolution9.tsx","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/types/primitives/number/numberPropertyAccess.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/fourslash/completionListInTypeParameterOfClassExpression1.ts","time":114,"edits":2,"cost":"4.62"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyOfEveryType.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction3.ts","time":114,"edits":2,"cost":"4.62"},{"name":"tests/cases/conformance/jsx/inline/inlineJsxFactoryLocalTypeGlobalFallback.tsx","time":114,"edits":2,"cost":"4.62"},{"name":"tests/cases/compiler/differentTypesWithSameName.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/types/typeParameters/typeArgumentLists/constraintSatisfactionWithEmptyObject.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/fourslash/codeFixAddMissingEnumMember3.ts","time":114,"edits":2,"cost":"4.62"},{"name":"tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction8.ts","time":114,"edits":2,"cost":"4.62"},{"name":"tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/fourslash/codeFixChangeExtendsToImplementsWithDecorator.ts","time":228,"edits":4,"cost":"4.62"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot_realRootFile.ts","time":114,"edits":2,"cost":"4.62"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/parametersWithNoAnnotationAreAny.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/fourslash/getJavaScriptSyntacticDiagnostics1.ts","time":171,"edits":3,"cost":"4.62"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractOverloads.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/externalModules/exportAmbientClassNameWithObject.ts","time":114,"edits":2,"cost":"4.62"},{"name":"tests/cases/conformance/internalModules/importDeclarations/importAliasIdentifiers.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/cf.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName34.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/fourslash/completionsImport_details_withMisspelledName.ts","time":114,"edits":2,"cost":"4.62"},{"name":"tests/cases/compiler/super2.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/jsx/tsxElementResolution9.tsx","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames33_ES6.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/nestedInfinitelyExpandedRecursiveTypes.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/destructuringWithNewExpression.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment12.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/declarationEmitDefaultExport2.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/es6ImportParseErrors.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/mergedModuleDeclarationCodeGen5.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList2.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateUntypedTagCall01.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/es3-jsx-react.tsx","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers2.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/decorators/class/constructor/decoratorOnClassConstructor1.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/functionOverloads40.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/declFileTypeAnnotationStringLiteral.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/es6ExportDefaultExpression.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/doubleUnderStringLiteralAssignability.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/es6/destructuring/restElementWithBindingPattern.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorOverloads4.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesAndLogicalOrExpressions01.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of39.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression6_es6.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration2.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens13.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint02.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/es6/templates/templateStringInModuleName.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/arrayLiteralAndArrayConstructorEquivalence1.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/genericOverloadSignatures.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/sourceMapWithNonCaseSensitiveFileNamesAndOutDir.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/typeofInternalModules.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/emitDecoratorMetadata_object.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/functionOverloads22.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/functionReturningItself.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/es6/destructuring/restElementWithAssignmentPattern1.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/classExpressionWithStaticPropertiesES61.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/implementGenericWithMismatchedTypes.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/types/typeParameters/typeArgumentLists/constraintSatisfactionWithAny.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/es6/destructuring/emptyVariableDeclarationBindingPatterns02_ES6.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/SwitchStatements/parserErrorRecovery_SwitchStatement1.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads05.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/decorators/class/method/decoratorOnClassMethod13.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/assignmentCompatability22.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/derivedTypeIncompatibleSignatures.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/contextualTypingOfConditionalExpression2.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/conformance/externalModules/topLevelAmbientModule.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts","time":57,"edits":1,"cost":"4.62"},{"name":"tests/cases/fourslash/augmentedTypesModule3.ts","time":170,"edits":3,"cost":"4.62"},{"name":"tests/cases/fourslash/getEditsForFileRename_directory_down.ts","time":170,"edits":3,"cost":"4.62"},{"name":"tests/cases/fourslash/completionListInUnclosedFunction03.ts","time":170,"edits":3,"cost":"4.62"},{"name":"tests/cases/compiler/APISample_watcher.ts","time":226,"edits":4,"cost":"4.62"},{"name":"tests/cases/fourslash/unusedParameterInLambda1AddUnderscore.ts","time":113,"edits":2,"cost":"4.62"},{"name":"tests/cases/conformance/jsx/checkJsxSubtleSkipContextSensitiveBug.tsx","time":113,"edits":2,"cost":"4.62"},{"name":"tests/cases/conformance/jsx/checkJsxChildrenProperty7.tsx","time":113,"edits":2,"cost":"4.62"},{"name":"tests/cases/fourslash/unusedImports14FS.ts","time":113,"edits":2,"cost":"4.62"},{"name":"tests/cases/compiler/exportImportCanSubstituteConstEnumForValue.ts","time":113,"edits":2,"cost":"4.62"},{"name":"tests/cases/fourslash/jsDocExtends.ts","time":113,"edits":2,"cost":"4.62"},{"name":"tests/cases/fourslash/unusedVariableInNamespace3.ts","time":113,"edits":2,"cost":"4.62"},{"name":"tests/cases/fourslash/getOccurrencesConstructor.ts","time":113,"edits":2,"cost":"4.62"},{"name":"tests/cases/fourslash/codeFixClassPropertyInitialization13.ts","time":113,"edits":2,"cost":"4.62"},{"name":"tests/cases/fourslash/server/getOutliningSpansForRegionsNoSingleLineFolds.ts","time":113,"edits":2,"cost":"4.62"},{"name":"tests/cases/fourslash/codeFixInferFromUsageFunctionExpression.ts","time":113,"edits":2,"cost":"4.62"},{"name":"tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction18.ts","time":113,"edits":2,"cost":"4.62"},{"name":"tests/cases/fourslash/referencesBloomFilters3.ts","time":113,"edits":2,"cost":"4.62"},{"name":"tests/cases/compiler/importHelpersInAmbientContext.ts","time":113,"edits":2,"cost":"4.62"},{"name":"tests/cases/conformance/salsa/exportPropertyAssignmentNameResolution.ts","time":113,"edits":2,"cost":"4.62"},{"name":"tests/cases/conformance/async/es5/asyncAwaitNestedClasses_es5.ts","time":113,"edits":2,"cost":"4.62"},{"name":"tests/cases/compiler/genericFunctionInference2.ts","time":169,"edits":3,"cost":"4.61"},{"name":"tests/cases/fourslash/tsxGoToDefinitionClassInDifferentFile.ts","time":169,"edits":3,"cost":"4.61"},{"name":"unittests:: customTransforms","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/fourslash/codeFixAwaitInSyncFunction_all.ts","time":168,"edits":3,"cost":"4.61"},{"name":"tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractGeneric.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/fourslash/goToDefinitionIndexSignature2.ts","time":112,"edits":2,"cost":"4.61"},{"name":"tests/cases/fourslash/getEditsForFileRename_tsconfig_include_add.ts","time":168,"edits":3,"cost":"4.61"},{"name":"tests/cases/conformance/types/uniqueSymbol/uniqueSymbolsErrors.ts","time":112,"edits":2,"cost":"4.61"},{"name":"tests/cases/conformance/es6/yieldExpressions/YieldExpression9_es6.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractWithInterface.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/declFileExportAssignmentImportInternalModule.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/jsx/tsxAttributeErrors.tsx","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/fourslash/goToImplementationInterfaceProperty_00.ts","time":112,"edits":2,"cost":"4.61"},{"name":"tests/cases/fourslash/goToImplementationLocal_04.ts","time":112,"edits":2,"cost":"4.61"},{"name":"tests/cases/compiler/genericCallWithNonGenericArgs1.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction7.ts","time":112,"edits":2,"cost":"4.61"},{"name":"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/fourslash/jsDocTypedefQuickInfo1.ts","time":112,"edits":2,"cost":"4.61"},{"name":"tests/cases/compiler/typeReferenceDirectives10.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/es6/destructuring/emptyAssignmentPatterns01_ES6.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/typeArgumentsShouldDisallowNonGenericOverloads.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/generics0.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArgumentLists/parserErrorRecovery_ArgumentList2.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/importAndVariableDeclarationConflict4.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/references/library-reference-15.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/ambiguousOverload.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/parser/ecmascript5/Protected/Protected7.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/fourslash/codeFixUnusedIdentifier_destructure_allUnused.ts","time":112,"edits":2,"cost":"4.61"},{"name":"tests/cases/fourslash/completionListAtEndOfWordInArrowFunction03.ts","time":112,"edits":2,"cost":"4.61"},{"name":"tests/cases/compiler/noImplicitAnyForIn.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/classes/classDeclarations/mergedInheritedClassInterface.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06_ES6.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess25.ts","time":112,"edits":2,"cost":"4.61"},{"name":"tests/cases/compiler/qualifiedModuleLocals.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/newAbstractInstance.ts","time":112,"edits":2,"cost":"4.61"},{"name":"tests/cases/conformance/ambient/ambientShorthand_declarationEmit.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/requireOfJsonFileWithTraillingComma.ts","time":112,"edits":2,"cost":"4.61"},{"name":"tests/cases/compiler/privacyCheckTypeOfInvisibleModuleError.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithEnum.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern1.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeAssertionOnAddition.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInstantiations2.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/functionOverloads45.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES5.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsInNonConstructorMembers.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectLiteralArgs.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of13.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/types/specifyingTypes/typeQueries/typeQueryOnClass.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/es6ImportNamedImportWithExport.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/nestedLoops.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/types/typeRelationships/recursiveTypes/recursiveTypesUsedAsFunctionParameters.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/privacyGloVar.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/augmentExportEquals1.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/types/nonPrimitive/assignObjectToNonPrimitive.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/parameterPropertyInConstructor2.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/optionalParameterRetainsNull.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/es6/newTarget/newTarget.es6.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/externalModules/moduleScoping.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/salsa/exportNestedNamespaces.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/expressions/unaryOperators/voidOperator/voidOperatorWithEnumType.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardsInProperties.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/declFileInternalAliases.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractUsingAbstractMethod1.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility4.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndValidOperator.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/types/thisType/thisTypeErrors2.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/capturedLetConstInLoop10_ES6.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberType.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/internalModules/codeGeneration/importStatements.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/assignmentCompatability17.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/collisionCodeGenModuleWithConstructorChildren.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/contextuallyTypedByDiscriminableUnion.ts","time":112,"edits":2,"cost":"4.61"},{"name":"tests/cases/compiler/letDeclarations-scopes-duplicates3.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings11_ES6.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/objectLiteralMemberWithModifiers1.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/inferringAnyFunctionType4.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment5.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames40_ES6.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/checkSuperCallBeforeThisAccessing4.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/duplicateOverloadInTypeAugmentation1.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/arrayAssignmentTest6.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/moduleResolution/packageJsonMain.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/unusedImports15.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/es6/moduleExportsSystem/outFilerootDirModuleNamesSystem.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/compiler/checkSuperCallBeforeThisAccessing6.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments6_es6.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/types/primitives/boolean/extendBooleanInterface.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts","time":56,"edits":1,"cost":"4.61"},{"name":"tests/cases/fourslash/findAllRefsInheritedProperties3.ts","time":223,"edits":4,"cost":"4.60"},{"name":"tests/cases/fourslash/completionsImport_notFromIndex.ts","time":167,"edits":3,"cost":"4.60"},{"name":"tests/cases/compiler/conditionalTypesSimplifyWhenTrivial.ts","time":111,"edits":2,"cost":"4.60"},{"name":"tests/cases/fourslash/codeFixInferFromUsageSetterJS.ts","time":222,"edits":4,"cost":"4.60"},{"name":"tests/cases/fourslash/codeFixForgottenThisPropertyAccess03.ts","time":111,"edits":2,"cost":"4.60"},{"name":"tests/cases/fourslash/quickInfoJsDocTags1.ts","time":111,"edits":2,"cost":"4.60"},{"name":"tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction9.ts","time":111,"edits":2,"cost":"4.60"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax6.ts","time":222,"edits":4,"cost":"4.60"},{"name":"tests/cases/fourslash/findAllRefsExportConstEqualToClass.ts","time":111,"edits":2,"cost":"4.60"},{"name":"tests/cases/compiler/conditionalTypeContextualTypeSimplificationsSuceeds.ts","time":111,"edits":2,"cost":"4.60"},{"name":"tests/cases/compiler/declarationNoDanglingGenerics.ts","time":111,"edits":2,"cost":"4.60"},{"name":"tests/cases/fourslash/completionsRecommended_nonAccessibleSymbol.ts","time":111,"edits":2,"cost":"4.60"},{"name":"tests/cases/fourslash/codeFixUndeclaredPropertyFunctionNonEmptyClass.ts","time":111,"edits":2,"cost":"4.60"},{"name":"tests/cases/fourslash/codeFixUnusedIdentifier_all_delete_js.ts","time":166,"edits":3,"cost":"4.59"},{"name":"tests/cases/fourslash/codeFixUndeclaredAcrossFiles1.ts","time":386,"edits":7,"cost":"4.59"},{"name":"unittests:: tsserver:: with metadata in response","time":55,"edits":1,"cost":"4.59"},{"name":"unittests:: tsserver:: applyChangesToOpenFiles","time":55,"edits":1,"cost":"4.59"},{"name":"unittests:: config:: convertCompilerOptionsFromJson","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/fourslash/findAllRefsObjectBindingElementPropertyName06.ts","time":165,"edits":3,"cost":"4.59"},{"name":"tests/cases/compiler/functionOverloads1.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/fourslash/quickInfoClassKeyword.ts","time":110,"edits":2,"cost":"4.59"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithArrayLiteralArgs.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration19.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/fourslash/javaScriptClass1.ts","time":165,"edits":3,"cost":"4.59"},{"name":"tests/cases/compiler/aliasUsageInIndexerOfClass.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/ipromise3.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/fourslash/codeFixAddMissingEnumMember1.ts","time":110,"edits":2,"cost":"4.59"},{"name":"tests/cases/compiler/contextualTypeShouldBeLiteral.ts","time":165,"edits":3,"cost":"4.59"},{"name":"tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration9_es6.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/reactNamespaceImportPresevation.tsx","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/fourslash/codeFixAddMissingMember4.ts","time":330,"edits":6,"cost":"4.59"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of26.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/fourslash/completionForStringLiteralNonrelativeImport4.ts","time":165,"edits":3,"cost":"4.59"},{"name":"tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction22.ts","time":110,"edits":2,"cost":"4.59"},{"name":"tests/cases/compiler/contextualSignatureInstantiation2.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames32_ES6.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/declarationEmitNameConflictsWithAlias.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/recursiveTypeParameterConstraintReferenceLacksTypeArgs.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/fourslash/codeFixAddConvertToUnknownForNonOverlappingTypes5.ts","time":110,"edits":2,"cost":"4.59"},{"name":"tests/cases/fourslash/completionsPaths_kinds.ts","time":165,"edits":3,"cost":"4.59"},{"name":"tests/cases/compiler/overloadOnConstNoStringImplementation2.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/fourslash/referencesForMergedDeclarations5.ts","time":165,"edits":3,"cost":"4.59"},{"name":"tests/cases/conformance/expressions/newOperator/newOperatorConformance.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/fourslash/goToImplementationNamespace_05.ts","time":110,"edits":2,"cost":"4.59"},{"name":"tests/cases/conformance/es6/templates/templateStringInPropertyName1.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceDuplicateMember2.ts","time":110,"edits":2,"cost":"4.59"},{"name":"tests/cases/compiler/arrayconcat.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionAsyncES6CJS.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations2.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/promisesWithConstraints.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/recursiveExportAssignmentAndFindAliasedType6.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/exportStarFromEmptyModule.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/fourslash/completionListAtEndOfWordInArrowFunction02.ts","time":110,"edits":2,"cost":"4.59"},{"name":"tests/cases/compiler/overloadOnConstInheritance4.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/assignmentCompatability15.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3ES6.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/primtiveTypesAreIdentical.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions08_ES6.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/constructorTypeWithTypeParameters.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/inferTypeArgumentsInSignatureWithRestParameters.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/duplicateIdentifierComputedName.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/internalAliasInterfaceInsideLocalModuleWithExport.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/decoratorReferenceOnOtherProperty.ts","time":110,"edits":2,"cost":"4.59"},{"name":"tests/cases/compiler/objectLitIndexerContextualType.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithStringType.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/salsa/moduleExportAssignment4.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/declarationEmitInferredTypeAlias9.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/commaOperatorInConditionalExpression.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/noSymbolForMergeCrash.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/unusedTypeParameterInMethod1.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/mapOnTupleTypes02.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/getAndSetNotIdenticalType.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/parser/ecmascript5/Fuzz/parser768531.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/es6/destructuring/emptyArrayBindingPatternParameter02.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/types/thisType/fluentClasses.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/promiseIdentity.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/fourslash/breakpointValidationTypeAlias.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/es5ExportDefaultClassDeclaration4.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithOptionality.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/jsx/tsxAttributeResolution14.tsx","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/propertiesAndIndexers2.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/enumIndexer.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfAny.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/indexWithUndefinedAndNullStrictNullChecks.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/fourslash/breakpointValidationVariables.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/jsx/tsxSpreadChildren.tsx","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/declFileModuleContinuation.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/accessOverriddenBaseClassMember1.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration10_es2017.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/collisionRestParameterClassConstructor.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/abstractPropertyNegative.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/sourceMapValidationLambdaSpanningMultipleLines.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/es6/templates/templateStringInArray.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/funClodule.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractAssignabilityConstructorFunction.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/spyComparisonChecking.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/thisInInstanceMemberInitializer.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction3.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/constEnums/constEnumPropertyAccess2.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/cachedModuleResolution3.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/inheritanceOfGenericConstructorMethod2.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/assignmentRestElementWithErrorSourceType.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/scanner/ecmascript5/scannerUnexpectedNullCharacter1.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/types/primitives/undefined/invalidUndefinedValues.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames48_ES5.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/moduleImport.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/types/union/unionTypeCallSignatures3.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/slightlyIndirectedDeepObjectLiteralElaborations.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/moduleWithNoValuesAsType.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration12_es5.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/parser/ecmascript5/VariableDeclarations/parserVariableDeclaration4.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/generics5.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/parser/ecmascript5/parserObjectCreationArrayLiteral2.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/conditionalExpressionNewLine8.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/functionReturn.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/emptyTypeArgumentList.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target5.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/contextualTypingOfLambdaWithMultipleSignatures2.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/compiler/computedPropertiesInDestructuring2.ts","time":55,"edits":1,"cost":"4.59"},{"name":"tests/cases/conformance/salsa/classCanExtendConstructorFunction.ts","time":219,"edits":4,"cost":"4.58"},{"name":"tests/cases/fourslash/referencesForStringLiteralPropertyNames2.ts","time":164,"edits":3,"cost":"4.58"},{"name":"tests/cases/fourslash/commentsFunctionDeclaration.ts","time":164,"edits":3,"cost":"4.58"},{"name":"tests/cases/fourslash/refactorExtractType10.ts","time":109,"edits":2,"cost":"4.58"},{"name":"tests/cases/compiler/readonlyTupleAndArrayElaboration.ts","time":109,"edits":2,"cost":"4.58"},{"name":"tests/cases/compiler/numericEnumMappedType.ts","time":109,"edits":2,"cost":"4.58"},{"name":"tests/cases/fourslash/codeFixInferFromUsageMultipleParametersJS.ts","time":218,"edits":4,"cost":"4.58"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax13.ts","time":218,"edits":4,"cost":"4.58"},{"name":"tests/cases/fourslash/goToDefinitionExternalModuleName9.ts","time":109,"edits":2,"cost":"4.58"},{"name":"tests/cases/fourslash/codeFixClassPropertyInitialization7.ts","time":109,"edits":2,"cost":"4.58"},{"name":"tests/cases/fourslash/goToDefinitionDecorator.ts","time":109,"edits":2,"cost":"4.58"},{"name":"tests/cases/fourslash/codeFixUnusedIdentifier_parameterInCallback.ts","time":109,"edits":2,"cost":"4.58"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess_notOnWhitespace.ts","time":109,"edits":2,"cost":"4.58"},{"name":"tests/cases/fourslash/findAllRefsTypeofImport.ts","time":109,"edits":2,"cost":"4.58"},{"name":"tests/cases/fourslash/codeFixAddConvertToUnknownForNonOverlappingTypes6.ts","time":109,"edits":2,"cost":"4.58"},{"name":"tests/cases/fourslash/goToTypeDefinition_typedef.ts","time":109,"edits":2,"cost":"4.58"},{"name":"tests/cases/compiler/javascriptCommonjsModule.ts","time":109,"edits":2,"cost":"4.58"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_import_propertyAccess.ts","time":163,"edits":3,"cost":"4.58"},{"name":"tests/cases/fourslash/completionInFunctionLikeBody.ts","time":271,"edits":5,"cost":"4.57"},{"name":"tests/cases/compiler/narrowByEquality.ts","time":108,"edits":2,"cost":"4.57"},{"name":"unittests:: tsserver:: Language service","time":54,"edits":1,"cost":"4.57"},{"name":"unittests:: config:: project-references constraint checking for settings","time":54,"edits":1,"cost":"4.57"},{"name":"unittests:: moduleResolution:: Files with different casing with forceConsistentCasingInFileNames","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/es5ExportDefaultClassDeclaration3.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/fourslash/completionListInUnclosedFunction16.ts","time":162,"edits":3,"cost":"4.57"},{"name":"tests/cases/compiler/declarationEmitDestructuringPrivacyError.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/capturedLetConstInLoop11_ES6.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithTypeArgumentAndOverloadInES6.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/fourslash/findAllRefsInheritedProperties1.ts","time":162,"edits":3,"cost":"4.57"},{"name":"tests/cases/compiler/json.stringify.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/fourslash/goToDefinitionIndexSignature.ts","time":108,"edits":2,"cost":"4.57"},{"name":"tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpressionDivideAmbiguity3.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesTypePredicates01.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/widenedTypes1.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty12.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/recursiveSpecializationOfExtendedTypeWithError.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/jsx/tsxSpreadAttributesResolution11.tsx","time":108,"edits":2,"cost":"4.57"},{"name":"tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt6.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/collisionThisExpressionAndEnumInGlobal.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/fourslash/goToDefinitionImports.ts","time":108,"edits":2,"cost":"4.57"},{"name":"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding1WithExport.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/jsFileClassPropertyType2.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/exportDefaultProperty.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/indexer2A.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/typeReferenceDirectives1.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames8_ES6.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/parser/ecmascript5/Accessors/parserAccessors1.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/genericRecursiveImplicitConstructorErrors2.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IfStatements/parserErrorRecoveryIfStatement5.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionErrorInES2015.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceDoesNotHideBaseSignatures.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/types/mapped/mappedTypes5.ts","time":108,"edits":2,"cost":"4.57"},{"name":"tests/cases/conformance/jsx/tsxSpreadAttributesResolution8.tsx","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithThisKeywordInES6.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments3.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames23_ES6.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/unusedMultipleParameters2InFunctionDeclaration.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/reboundIdentifierOnImportAlias.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndAmbientFunctionWithTheSameNameAndCommonRoot.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/externalModuleAssignToVar.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames38_ES5.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/typeReferenceDirectives5.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/declarationEmitClassMemberNameConflict.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithEnumType.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/sourceMapValidationClass.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/lateBoundConstraintTypeChecksCorrectly.ts","time":108,"edits":2,"cost":"4.57"},{"name":"tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/callOnClass.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/es6/destructuring/emptyArrayBindingPatternParameter04.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/typeArgInferenceWithNull.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/collisionExportsRequireAndClass.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of3.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/ParameterList13.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/genericOfACloduleType1.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/genericWithIndexerOfTypeParameterType2.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/es6/destructuring/emptyAssignmentPatterns01_ES5iterable.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/promiseChaining2.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/jsx/tsxReactEmit5.tsx","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/inheritedMembersAndIndexSignaturesFromDifferentBases.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/umdGlobalConflict.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/properties.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/expressions/commaOperator/commaOperatorsMultipleOperators.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/aliasUsageInObjectLiteral.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/functionType.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction7_es2017.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/constructorOverloads3.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/requireOfJsonFileWithAmd.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/statements/for-inStatements/for-inStatementsDestructuring.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/fourslash/addDeclareToFunction.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/arrayTypeInSignatureOfInterfaceAndClass.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedUnaryPlusES6.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/types/thisType/thisTypeInClasses.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/es6/decorators/class/decoratorOnClass3.es6.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/interfaceImplementation3.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/propertyAssignment.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/exportAssignmentWithExports.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingProtectedInstance.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/enumWithComputedMember.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing1.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/alwaysStrictNoImplicitUseStrict.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/arithmeticOnInvalidTypes2.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/fourslash/formattingOnVariety.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/compiler/breakInIterationOrSwitchStatement3.ts","time":54,"edits":1,"cost":"4.57"},{"name":"tests/cases/fourslash/referencesForContextuallyTypedUnionProperties.ts","time":215,"edits":4,"cost":"4.57"},{"name":"tests/cases/fourslash/findAllRefsDestructureGetter.ts","time":161,"edits":3,"cost":"4.56"},{"name":"tests/cases/fourslash/moveToNewFile_jsx.ts","time":161,"edits":3,"cost":"4.56"},{"name":"tests/cases/compiler/deepKeysIndexing.ts","time":107,"edits":2,"cost":"4.56"},{"name":"tests/cases/compiler/booleanFilterAnyArray.ts","time":107,"edits":2,"cost":"4.56"},{"name":"tests/cases/fourslash/codeFixCalledES2015Import11.ts","time":107,"edits":2,"cost":"4.56"},{"name":"tests/cases/compiler/tsxInferenceShouldNotYieldAnyOnUnions.tsx","time":107,"edits":2,"cost":"4.56"},{"name":"tests/cases/compiler/defaultDeclarationEmitNamedCorrectly.ts","time":107,"edits":2,"cost":"4.56"},{"name":"tests/cases/conformance/jsdoc/jsdocTypeTagCast.ts","time":107,"edits":2,"cost":"4.56"},{"name":"tests/cases/compiler/deferredLookupTypeResolution2.ts","time":107,"edits":2,"cost":"4.56"},{"name":"tests/cases/fourslash/findAllRefsDefaultImportThroughNamespace.ts","time":213,"edits":4,"cost":"4.56"},{"name":"unittests:: tsserver:: typingsInstaller:: discover typings","time":53,"edits":1,"cost":"4.55"},{"name":"unittests:: tsserver:: resolutionCache:: tsserverProjectSystem watching @types","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/fourslash/importNameCodeFix_getCanonicalFileName.ts","time":106,"edits":2,"cost":"4.55"},{"name":"tests/cases/fourslash/codeFixUseDefaultImport_all.ts","time":159,"edits":3,"cost":"4.55"},{"name":"tests/cases/fourslash/unusedClassInNamespace2.ts","time":106,"edits":2,"cost":"4.55"},{"name":"tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/types/union/unionTypeFromArrayLiteral.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/fourslash/completionForStringLiteralNonrelativeImport9.ts","time":159,"edits":3,"cost":"4.55"},{"name":"tests/cases/conformance/expressions/commaOperator/commaOperatorInvalidAssignmentType.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES5.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/fourslash/importNameCodeFixUMDGlobal0.ts","time":106,"edits":2,"cost":"4.55"},{"name":"tests/cases/conformance/jsx/tsxGenericArrowFunctionParsing.tsx","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction1.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/fourslash/completionsPathsJsonModuleWithoutResolveJsonModule.ts","time":106,"edits":2,"cost":"4.55"},{"name":"tests/cases/fourslash/getEditsForFileRename_tsconfig_include_noChange.ts","time":159,"edits":3,"cost":"4.55"},{"name":"tests/cases/compiler/exportAssignmentWithImportStatementPrivacyError.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingClass.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/bestChoiceType.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/fourslash/staticGenericOverloads1.ts","time":159,"edits":3,"cost":"4.55"},{"name":"tests/cases/conformance/types/members/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/argumentsAsPropertyName.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration3.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/mergedModuleDeclarationWithSharedExportedVar.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpression4.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/scopeTests.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment16.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/externalModules/invalidSyntaxNamespaceImportWithCommonjs.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/jsxAttributeMissingInitializer.tsx","time":106,"edits":2,"cost":"4.55"},{"name":"tests/cases/compiler/privacyCheckExportAssignmentOnExportedGenericInterface1.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/genericConstraintSatisfaction1.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/jsx/tsxAttributeResolution4.tsx","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/unusedPrivateMembers.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/typeofExternalModules.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/interfaceImplementation6.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/enums/enumErrors.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/fourslash/renameForAliasingExport01.ts","time":106,"edits":2,"cost":"4.55"},{"name":"tests/cases/compiler/interfaceImplementation5.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/jsx/tsxElementResolution16.tsx","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/types/union/unionTypeReduction.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionInUMD3.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration2_es6.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassIncludesInheritedMembers.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/es6ImportDefaultBindingDts.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/fourslash/jsDocFunctionSignatures5.ts","time":106,"edits":2,"cost":"4.55"},{"name":"tests/cases/compiler/classExtendsAcrossFiles.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/fallFromLastCase2.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/parameterNamesInTypeParameterList.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/functionDeclarationWithArgumentOfTypeFunctionTypeArray.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509668.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/types/nonPrimitive/nonPrimitiveInFunction.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/superPropertyAccess.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/assignmentCompatability37.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/statements/withStatements/withStatements.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/inferParameterWithMethodCallInitializer.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/returnInConstructor1.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/declarationEmitDefaultExport5.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/augmentExportEquals4.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates02_ES6.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction5_es2017.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/declarationEmitDestructuring5.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithAnyAndEveryType.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/es6/templates/templateStringWithBackslashEscapes01.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/interfaceWithOptionalProperty.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/types/primitives/string/assignFromStringInterface.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/baseTypeAfterDerivedType.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/requiredInitializedParameter3.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/noImplicitAnyParametersInAmbientClass.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/augmentedTypeBracketNamedPropertyAccess.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/internalAliasFunctionInsideTopLevelModuleWithExport.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/classWithMultipleBaseClasses.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/letInNonStrictMode.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/parse2.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames50_ES5.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/commentOnArrayElement1.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/ambientWithStatements.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/controlFlow/controlFlowSuperPropertyAccess.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/classes/constructorDeclarations/classConstructorParametersAccessibility3.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpressionDivideAmbiguity5.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/thisInOuterClassBody.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/es6/classDeclaration/parseClassDeclarationInStrictModeByDefaultInES6.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression7_es2017.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/parser/ecmascript5/FunctionDeclarations/parserFunctionDeclaration4.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/types/typeParameters/typeParameterLists/innerTypeParameterShadowingOuterOne2.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/moduleOuterQualification.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/collisionThisExpressionAndLocalVarInConstructor.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/systemModule5.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/dependencyViaImportAlias.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES5.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayLiteral.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters3.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNumericLiteral.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/moduleAssignmentCompat4.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/instantiateTypeParameter.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/2dArrays.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/compiler/resolveModuleNameWithSameLetDeclarationName1.ts","time":53,"edits":1,"cost":"4.55"},{"name":"tests/cases/fourslash/tsxRename4.ts","time":158,"edits":3,"cost":"4.55"},{"name":"tests/cases/fourslash/trailingCommaSignatureHelp.ts","time":158,"edits":3,"cost":"4.55"},{"name":"tests/cases/conformance/types/intersection/intersectionTypeInference3.ts","time":105,"edits":2,"cost":"4.54"},{"name":"tests/cases/compiler/objectLiteralExcessProperties.ts","time":105,"edits":2,"cost":"4.54"},{"name":"tests/cases/fourslash/codeFixAddMissingMember8.ts","time":105,"edits":2,"cost":"4.54"},{"name":"tests/cases/fourslash/codeFixClassSuperMustPrecedeThisAccess_callWithThisInside.ts","time":105,"edits":2,"cost":"4.54"},{"name":"tests/cases/fourslash/codeFixAwaitInSyncFunction1.ts","time":105,"edits":2,"cost":"4.54"},{"name":"tests/cases/fourslash/goToDefinitionFunctionOverloadsInClass.ts","time":105,"edits":2,"cost":"4.54"},{"name":"tests/cases/fourslash/findAllRefsJsDocTemplateTag_class.ts","time":105,"edits":2,"cost":"4.54"},{"name":"tests/cases/fourslash/unusedTypeParametersInMethod2.ts","time":105,"edits":2,"cost":"4.54"},{"name":"tests/cases/conformance/jsdoc/jsdocFunctionType.ts","time":105,"edits":2,"cost":"4.54"},{"name":"tests/cases/compiler/awaitUnionPromise.ts","time":105,"edits":2,"cost":"4.54"},{"name":"tests/cases/fourslash/annotateWithTypeFromJSDoc_all.ts","time":157,"edits":3,"cost":"4.54"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportNodeModules5.ts","time":157,"edits":3,"cost":"4.54"},{"name":"tests/cases/fourslash/getEditsForFileRename_amd.ts","time":157,"edits":3,"cost":"4.54"},{"name":"tests/cases/fourslash/completionsInterfaceElement.ts","time":157,"edits":3,"cost":"4.54"},{"name":"tests/cases/fourslash/convertFunctionToEs6Class_emptySwitchCase.ts","time":157,"edits":3,"cost":"4.54"},{"name":"tests/cases/fourslash/codeFixInferFromUsageRestParam2JS.ts","time":261,"edits":5,"cost":"4.54"},{"name":"tests/cases/compiler/declarationEmitExpandoPropertyPrivateName.ts","time":104,"edits":2,"cost":"4.53"},{"name":"tests/cases/conformance/emitter/es2018/asyncGenerators/emitter.asyncGenerators.objectLiteralMethods.es2018.ts","time":52,"edits":1,"cost":"4.53"},{"name":"unittests:: tsserver:: typingsInstaller:: progress notifications","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/fourslash/completionsRecursiveNamespace.ts","time":104,"edits":2,"cost":"4.53"},{"name":"tests/cases/fourslash/completionsDefaultExport.ts","time":104,"edits":2,"cost":"4.53"},{"name":"tests/cases/conformance/es6/destructuring/emptyAssignmentPatterns03_ES6.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames31_ES6.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/salsa/typeFromJSInitializer.ts","time":104,"edits":2,"cost":"4.53"},{"name":"tests/cases/compiler/genericClasses3.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/selfInCallback.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck46.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/fourslash/tsxCompletionOnOpeningTagWithoutJSX1.ts","time":104,"edits":2,"cost":"4.53"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess11.ts","time":104,"edits":2,"cost":"4.53"},{"name":"tests/cases/compiler/functionOverloads35.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/multipleClassPropertyModifiersErrors.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/statements/switchStatements/switchStatements.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/interfaces/declarationMerging/mergeTwoInterfaces.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/es6/functionExpressions/FunctionExpression2_es6.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/es6ExportDefaultClassDeclaration2.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/indexedAccessRelation.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/references/library-reference-10.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/crashIntypeCheckInvocationExpression.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES6.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/es6/spread/iteratorSpreadInCall6.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern11.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates2.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/augmentedTypesInterface.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/declarationEmitInferredTypeAlias3.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/expressions/thisKeyword/thisInObjectLiterals.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/commaOperator1.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorInAmbientContext5.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/prototypes.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/es6/yieldExpressions/YieldStarExpression2_es6.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/fourslash/getOccurrencesReturn.ts","time":104,"edits":2,"cost":"4.53"},{"name":"tests/cases/compiler/es6ImportDefaultBindingAmd.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/recursiveTypeComparison.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/typeofProperty.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrExpressionIsNotContextuallyTyped.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/duplicateLocalVariable2.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/library_ArraySlice.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/staticInstanceResolution2.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/augmentExportEquals3.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/jsx/tsxAttributeResolution2.tsx","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/numericClassMembers1.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/jsx/tsxCorrectlyParseLessThanComparison1.tsx","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/classes/classExpressions/modifierOnClassExpressionMemberInFunction.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/decorators/decoratorMetadata.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/alwaysStrictModule.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithEnumType.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/allowSyntheticDefaultImports8.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates13_ES6.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/es6/yieldExpressions/YieldExpression2_es6.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/autoLift2.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/declarationEmitExportAssignment.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/thisIndexOnExistingReadonlyFieldIsNotNever.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/accessors_spec_section-4.5_inference.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/types/typeAliases/typeAliases.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/jsxInExtendsClause.tsx","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/staticOffOfInstance1.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity3.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings05_ES6.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionInUMD2.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/fourslash/breakpointValidationArrayLiteralExpressions.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/types/members/typesWithOptionalProperty.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesInUnionTypes02.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings09_ES6.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty30.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesES6.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/commentsTypeParameters.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/nonGenericClassExtendingGenericClassWithAny.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/taggedTemplatesWithIncompleteTemplateExpressions5.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens3.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/superCallArgsMustMatch.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration9_es2017.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/es6/templates/TemplateExpression1.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/interfaceSubtyping.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/classImplementsClass6.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes2.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionProperty.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/types/literal/literalTypesWidenInParameterPosition.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedNewOperator.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList16.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/emitBOM.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/fourslash/breakpointValidationTypeAssertionExpressions.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/extendArray.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/commentsEnums.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/declFileForFunctionTypeAsTypeParameter.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/assignmentCompatability33.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType8_ES6.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/genericInterfaceTypeCall.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/genericFunctions1.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/aliasUsageInAccessorsOfClass.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedProperty.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/sourceMapValidationTryCatchFinally.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/types/members/objectTypePropertyAccess.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement12.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/wrappedRecursiveGenericType.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/circularObjectLiteralAccessors.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/jsx/tsxAttributeResolution12.tsx","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/unusedVariablesinBlocks1.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/types/specifyingTypes/typeLiterals/functionLiteral.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractManyKeywords.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/types/literal/literalTypesAndTypeAssertions.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/constructorOverloads1.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/moduleResolutionWithSymlinks_withOutDir.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction8_es2017.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric2.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/types/nonPrimitive/nonPrimitiveIndexingWithForInNoImplicitAny.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/importAndVariableDeclarationConflict1.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IfStatements/parserErrorRecoveryIfStatement4.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/es6/modules/exportAndImport-es5.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings04_ES6.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction8_es5.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/fourslash/removeExportFromInterfaceError1.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/noErrorTruncation.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/compiler/classDeclaredBeforeClassFactory.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings08_ES5.ts","time":52,"edits":1,"cost":"4.53"},{"name":"tests/cases/fourslash/extract-method24.ts","time":155,"edits":3,"cost":"4.53"},{"name":"tests/cases/fourslash/unusedParameterInLambda2.ts","time":155,"edits":3,"cost":"4.53"},{"name":"tests/cases/fourslash/completionListAfterStringLiteralTypeWithNoSubstitutionTemplateLiteral.ts","time":155,"edits":3,"cost":"4.53"},{"name":"tests/cases/fourslash/renameDestructuringNestedBindingElement.ts","time":103,"edits":2,"cost":"4.52"},{"name":"tests/cases/fourslash/codeFixUnusedIdentifier_parameter_modifier_and_arg.ts","time":103,"edits":2,"cost":"4.52"},{"name":"tests/cases/fourslash/completionsPaths_pathMapping_topLevel.ts","time":206,"edits":4,"cost":"4.52"},{"name":"tests/cases/fourslash/jsDocFunctionSignatures6.ts","time":103,"edits":2,"cost":"4.52"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportFile0.ts","time":103,"edits":2,"cost":"4.52"},{"name":"tests/cases/compiler/incrementOnNullAssertion.ts","time":103,"edits":2,"cost":"4.52"},{"name":"tests/cases/compiler/isolatedModules_resolveJsonModule.ts","time":103,"edits":2,"cost":"4.52"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax_all_nullable.ts","time":154,"edits":3,"cost":"4.52"},{"name":"tests/cases/fourslash/quickInfoInvalidLocations.ts","time":154,"edits":3,"cost":"4.52"},{"name":"tests/cases/compiler/betterErrorForAccidentalCall.ts","time":51,"edits":1,"cost":"4.51"},{"name":"unittests:: tsserver:: events:: ProjectLanguageServiceStateEvent","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/declarationEmitLocalClassHasRequiredDeclare.ts","time":102,"edits":2,"cost":"4.51"},{"name":"tests/cases/fourslash/importNameCodeFix_quoteStyle.ts","time":102,"edits":2,"cost":"4.51"},{"name":"tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/restInvalidArgumentType.ts","time":102,"edits":2,"cost":"4.51"},{"name":"tests/cases/fourslash/codeFixClassPropertyInitialization9.ts","time":102,"edits":2,"cost":"4.51"},{"name":"tests/cases/compiler/noReachabilityErrorsOnEmptyStatement.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/fourslash/completionListWithUnresolvedModule.ts","time":102,"edits":2,"cost":"4.51"},{"name":"tests/cases/fourslash/breakpointValidationConditionalExpressions.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/systemModule17.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/fourslash/moveToNewFile_variableDeclarationWithNoInitializer.ts","time":153,"edits":3,"cost":"4.51"},{"name":"tests/cases/compiler/typeofAmbientExternalModules.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/exportEqualMemberMissing.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt3.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/nestedBlockScopedBindings11.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumTypeInvalidOperations.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/fourslash/completionListInScope_doesNotIncludeAugmentations.ts","time":102,"edits":2,"cost":"4.51"},{"name":"tests/cases/compiler/arithAssignTyping.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/types/members/duplicatePropertyNames.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/typeParameterHasSelfAsConstraint.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/duplicatePackage_referenceTypes.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/es6/spread/iteratorSpreadInArray10.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor6.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/es6/destructuring/objectBindingPatternKeywordIdentifiers03.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/types/members/duplicateStringIndexers.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/reservedNameOnInterfaceImport.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/tsxDefaultImports.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/arithmeticOnInvalidTypes.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/referenceTypesPreferedToPathIfPossible.ts","time":102,"edits":2,"cost":"4.51"},{"name":"tests/cases/compiler/augmentedTypesExternalModule1.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/numericIndexerConstraint2.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/contextualTypeAppliedToVarArgs.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/fourslash/formattingOnStatementsWithNoSemicolon.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/declFileTypeofEnum.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/continueTarget5.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/decoratorMetadataPromise.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/assignmentCompatability40.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/decoratorMetadataWithConstructorType.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/internalAliasInitializedModule.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/fourslash/unusedTypeParametersInLambda4.ts","time":102,"edits":2,"cost":"4.51"},{"name":"tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion02.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType2_ES6.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/constDeclarations-validContexts.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/unusedVariablesinNamespaces3.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/contextualTypingOfConditionalExpression.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/es6/variableDeclarations/VariableDeclaration5_es6.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1InEs5.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of35.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/assignmentCompatability39.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/declarationEmit/typePredicates/declarationEmitIdentifierPredicates01.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/targetTypeObjectLiteralToAny.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/getAndSetAsMemberNames.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/es6/templates/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/genericFunctionCallSignatureReturnTypeMismatch.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedClasses.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/unusedImports5.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/fixingTypeParametersRepeatedly1.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/isolatedModulesPlainFile-System.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/forOfTransformsExpression.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParameterWithoutAnnotationIsAnyArray.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariables/parserErrorRecovery_IncompleteMemberVariable2.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/es6/yieldExpressions/YieldStarExpression4_es6.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/types/rest/objectRest2.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/jsx/tsxDynamicTagName8.tsx","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/async/es6/awaitUnion_es6.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/es5ExportEquals.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/parser/ecmascript5/parserObjectCreationArrayLiteral1.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/inferentialTypingWithObjectLiteralProperties.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/jsx/tsxOpeningClosingNames.tsx","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/letDeclarations-scopes-duplicates4.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/types/thisType/thisTypeInTuples.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames48_ES6.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/collisionCodeGenModuleWithModuleReopening.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionNestedUMD2.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/interfacePropertiesWithSameName1.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/typeLiteralCallback.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/interfaces/declarationMerging/twoInterfacesDifferentRootModule.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/noImplicitAnyIndexingSuppressed.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/typePredicateWithThisParameter.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/declFileTypeofModule.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit1_ES5.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/constructorOverloads6.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNumberAndEnum.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/es5-asyncFunctionObjectLiterals.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/keepImportsInDts3.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/types/typeRelationships/comparable/switchCaseWithUnionTypes01.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/taggedTemplateStringsWithUnicodeEscapesES6.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/letInLetConstDeclOfForOfAndForIn_ES6.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/ClassDeclaration15.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/es6/destructuring/restElementWithAssignmentPattern2.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/inheritanceStaticMembersIncompatible.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/recursiveExportAssignmentAndFindAliasedType3.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/noImplicitReturnsInAsync1.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/enumAssignmentCompat4.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/unusedTypeParameters5.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/letAsIdentifier.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES6.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolProperty1.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/taggedTemplatesInModuleAndGlobal.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/downlevelLetConst17.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/overloadResolutionOverNonCTLambdas.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/interfaces/declarationMerging/twoInterfacesDifferentRootModule2.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer1.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/noImplicitAnyParametersInInterface.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserErrantSemicolonInClass1.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsReference.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/externalModules/exportAssignmentTopLevelClodule.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/sourceMapValidationSwitch.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/noImplicitAnyFunctions.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/getsetReturnTypes.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/errorsOnImportedSymbol.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/isolatedModulesUnspecifiedModule.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGreaterThanTokenAmbiguity1.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/identicalCallSignatures.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/references/library-reference-3.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern24.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression3_es2017.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/functionOverloads17.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/declarationMapsWithoutDeclaration.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/compiler/narrowingConstrainedTypeParameter.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/parser/ecmascript5/MethodSignatures/parserMethodSignature9.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/fourslash/formattingSpaceBeforeCloseParen.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions11_ES5.ts","time":51,"edits":1,"cost":"4.51"},{"name":"tests/cases/fourslash/codeFixInferFromUsageRestParam3JS.ts","time":254,"edits":5,"cost":"4.51"},{"name":"tests/cases/compiler/discriminantPropertyCheck.ts","time":203,"edits":4,"cost":"4.51"},{"name":"tests/cases/fourslash/getEditsForFileRename_subDir.ts","time":152,"edits":3,"cost":"4.51"},{"name":"tests/cases/fourslash/getEditsForFileRename_shortenRelativePaths.ts","time":152,"edits":3,"cost":"4.51"},{"name":"tests/cases/compiler/substitutionTypeNoMergeOfAssignableType.ts","time":101,"edits":2,"cost":"4.50"},{"name":"tests/cases/compiler/deepExcessPropertyCheckingWhenTargetIsIntersection.ts","time":101,"edits":2,"cost":"4.50"},{"name":"tests/cases/fourslash/findReferencesAcrossMultipleProjects.ts","time":101,"edits":2,"cost":"4.50"},{"name":"tests/cases/fourslash/completionsOptionalMethod.ts","time":101,"edits":2,"cost":"4.50"},{"name":"tests/cases/fourslash/semanticClassificationAlias.ts","time":101,"edits":2,"cost":"4.50"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericFunctionParameters.ts","time":101,"edits":2,"cost":"4.50"},{"name":"tests/cases/fourslash/completionsRecommended_contextualTypes.ts","time":202,"edits":4,"cost":"4.50"},{"name":"tests/cases/fourslash/goToImplementationLocal_08.ts","time":101,"edits":2,"cost":"4.50"},{"name":"tests/cases/compiler/typeInferenceTypePredicate.ts","time":101,"edits":2,"cost":"4.50"},{"name":"tests/cases/conformance/jsx/tsxSpreadAttributesResolution10.tsx","time":101,"edits":2,"cost":"4.50"},{"name":"tests/cases/fourslash/extract-method15.ts","time":151,"edits":3,"cost":"4.50"},{"name":"tests/cases/fourslash/refactorExtractType16.ts","time":100,"edits":2,"cost":"4.49"},{"name":"unittests:: tsserver:: Session:: exceptions","time":50,"edits":1,"cost":"4.49"},{"name":"unittests:: FactoryAPI","time":50,"edits":1,"cost":"4.49"},{"name":"unittests:: tsserver:: typeReferenceDirectives","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/fourslash/quickInfoOnMethodOfImportEquals.ts","time":100,"edits":2,"cost":"4.49"},{"name":"tests/cases/fourslash/findAllRefsOnImportAliases2.ts","time":200,"edits":4,"cost":"4.49"},{"name":"tests/cases/compiler/deeplyNestedAssignabilityIssue.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/fourslash/codeFixChangeExtendsToImplementsWithTrivia.ts","time":100,"edits":2,"cost":"4.49"},{"name":"tests/cases/fourslash/jsQuickInfoGenerallyAcceptableSize.ts","time":100,"edits":2,"cost":"4.49"},{"name":"tests/cases/compiler/noImplicitAnyDestructuringParameterDeclaration.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/declarationEmitInterfaceWithNonEntityNameExpressionHeritage.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/fourslash/getOccurrencesConstructor2.ts","time":100,"edits":2,"cost":"4.49"},{"name":"tests/cases/fourslash/codeFixClassExtendAbstractMethod_all.ts","time":150,"edits":3,"cost":"4.49"},{"name":"tests/cases/fourslash/completionsNewTarget.ts","time":100,"edits":2,"cost":"4.49"},{"name":"tests/cases/compiler/declFileClassWithStaticMethodReturningConstructor.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentWithInvalidOperands.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/fourslash/quickInfoSignatureWithTrailingComma.ts","time":100,"edits":2,"cost":"4.49"},{"name":"tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction15.ts","time":100,"edits":2,"cost":"4.49"},{"name":"tests/cases/conformance/types/thisType/thisTypeAccessibility.ts","time":100,"edits":2,"cost":"4.49"},{"name":"tests/cases/compiler/classImplementsClass5.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/declarationEmitDefaultExport3.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/keywordInJsxIdentifier.tsx","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/staticMemberAccessOffDerivedType1.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/fourslash/quickInfoForRequire.ts","time":100,"edits":2,"cost":"4.49"},{"name":"tests/cases/compiler/genericClassImplementingGenericInterfaceFromAnotherModule.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/superCallWithMissingBaseClass.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakTarget5.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/internalAliasClass.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned1.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/classIndexer.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/jsx/tsxElementResolution2.tsx","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/duplicateTypeParameters2.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/classDeclarationMergedInModuleWithContinuation.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/copyrightWithNewLine1.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/types/tuple/typeInferenceWithTupleType.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/fourslash/unusedLocalsInMethodFS1.ts","time":100,"edits":2,"cost":"4.49"},{"name":"tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/derivedClassWithoutExplicitConstructor.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck36.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/typeInfer1.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/types/members/typesWithSpecializedConstructSignatures.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/internalModules/moduleDeclarations/nonInstantiatedModule.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/requireOfJsonFileWithModuleNodeResolutionEmitSystem.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/async/es6/asyncImportedPromise_es6.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/es5ExportDefaultIdentifier.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/es6/spread/iteratorSpreadInCall5.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/unusedPrivateMethodInClass1.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/generics3.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedArrowFunction.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/inferringAnyFunctionType5.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/es5-asyncFunctionForInStatements.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/thisInInnerFunctions.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/types/typeParameters/typeParameterLists/typeParametersAvailableInNestedScope.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/genericCallbacksAndClassHierarchy.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithStringIndexerHidingBaseTypeIndexer3.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayOfFunctionTypes3.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/assignmentCompatability16.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/scanner/ecmascript5/scannerNumericLiteral8.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/expressions/valuesAndReferences/assignments.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt4.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/interMixingModulesInterfaces0.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/fourslash/breakpointValidationDo.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithStringType.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_notAtTopLevel.ts","time":100,"edits":2,"cost":"4.49"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserForInStatement4.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/types/literal/stringLiteralsWithSwitchStatements03.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/genericIndexedAccessMethodIntersectionCanBeAccessed.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration3.d.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/jsx/tsxReactEmit4.tsx","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/assignmentCompatability43.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/syntheticDefaultExportsWithDynamicImports.ts","time":100,"edits":2,"cost":"4.49"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmptyLiteralPortionsES6.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/declarationEmitDefaultExportWithTempVarNameWithBundling.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/types/typeRelationships/comparable/switchCaseWithIntersectionTypes01.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/externalModules/umd1.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/excessPropertyCheckWithEmptyObject.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/typeParametersShouldNotBeEqual2.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithSubtypeObjectOnOptionalProperty.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/functionOverloads24.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/objectLiteralIndexerErrors.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/moduleSameValueDuplicateExportedBindings1.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/es6/spread/iteratorSpreadInArray7.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/getterControlFlowStrictNull.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/restParamsWithNonRestParams.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/internalAliasEnum.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision8.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/declareDottedExtend.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/superWithTypeArgument3.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/es6ClassTest.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportDts1.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/moduleResolution/untypedModuleImport_vsAmbient.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/declarationEmitExpressionInExtends2.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/arrowFunctionErrorSpan.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/lambdaPropSelf.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesIndexersWithAssignmentCompatibility.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/derivedTypeDoesNotRequireExtendsClause.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/externalModules/exportNonInitializedVariablesUMD.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/es2017/useObjectValuesAndEntries4.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/instanceMemberAssignsToClassPrototype.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserStatementIsNotAMemberVariableDeclaration1.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/expressions/contextualTyping/superCallParameterContextualTyping3.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/privacyTypeParametersOfClass.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral2.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesAndParenthesizedExpressions01.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/collisionThisExpressionAndLocalVarWithSuperExperssion.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck21.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/types/objectTypeLiteral/propertySignatures/propertyNameWithoutTypeAnnotation.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/interfaceClassMerging.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/multiModuleFundule1.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/es6/Symbols/symbolType17.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration7.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/es6ExportClauseWithAssignmentInEs5.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/jsx/tsxElementResolution6.tsx","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/inheritanceMemberAccessorOverridingProperty.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/exportImportMultipleFiles.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/types/tuple/wideningTuples4.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/augmentedTypesClass2a.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/scopeCheckStaticInitializer.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/declFileWithErrorsInInputDeclarationFile.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/parser/ecmascript5/parserObjectCreationArrayLiteral3.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/unusedPrivateVariableInClass2.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/exportEqualsOfModule.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/statements/returnStatements/returnStatements.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/compiler/conditionalExpressionNewLine5.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/fourslash/indentationNone.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/conformance/es6/templates/templateStringMultiline2.ts","time":50,"edits":1,"cost":"4.49"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportBaseUrl1.ts","time":199,"edits":4,"cost":"4.49"},{"name":"tests/cases/fourslash/findAllRefsParameterPropertyDeclaration_inheritance.ts","time":149,"edits":3,"cost":"4.49"},{"name":"tests/cases/fourslash/genericParameterHelpConstructorCalls.ts","time":149,"edits":3,"cost":"4.49"},{"name":"tests/cases/fourslash/getJavaScriptSyntacticDiagnostics5.ts","time":149,"edits":3,"cost":"4.49"},{"name":"tests/cases/conformance/types/spread/spreadMethods.ts","time":99,"edits":2,"cost":"4.48"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceDuplicateMember1.ts","time":99,"edits":2,"cost":"4.48"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateError.ts","time":99,"edits":2,"cost":"4.48"},{"name":"tests/cases/compiler/destructuringTypeGuardFlow.ts","time":99,"edits":2,"cost":"4.48"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax1.ts","time":198,"edits":4,"cost":"4.48"},{"name":"tests/cases/fourslash/todoComments20.ts","time":99,"edits":2,"cost":"4.48"},{"name":"tests/cases/compiler/literalFreshnessPropagationOnNarrowing.ts","time":99,"edits":2,"cost":"4.48"},{"name":"tests/cases/fourslash/importNameCodeFix_symlink_own_package_2.ts","time":99,"edits":2,"cost":"4.48"},{"name":"tests/cases/compiler/reexportWrittenCorrectlyInDeclaration.ts","time":99,"edits":2,"cost":"4.48"},{"name":"tests/cases/conformance/types/union/discriminatedUnionTypes2.ts","time":148,"edits":3,"cost":"4.48"},{"name":"tests/cases/fourslash/annotateWithTypeFromJSDoc6.ts","time":197,"edits":4,"cost":"4.48"},{"name":"tests/cases/fourslash/annotateWithTypeFromJSDoc9.5.ts","time":197,"edits":4,"cost":"4.48"},{"name":"tests/cases/fourslash/codeFixUndeclaredAcrossFiles3.ts","time":246,"edits":5,"cost":"4.48"},{"name":"tests/cases/conformance/generators/restParameterInDownlevelGenerator.ts","time":98,"edits":2,"cost":"4.47"},{"name":"tests/cases/fourslash/codeFixInferFromUsageRestParamJS.ts","time":245,"edits":5,"cost":"4.47"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/FunctionAndModuleWithSameNameAndDifferentCommonRoot.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/fourslash/codeFixUnusedIdentifier_all_delete.ts","time":392,"edits":8,"cost":"4.47"},{"name":"tests/cases/compiler/unaryOperatorsInStrictMode.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/bigintIndex.ts","time":98,"edits":2,"cost":"4.47"},{"name":"tests/cases/conformance/moduleResolution/typesVersions.multiFile.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/fourslash/jsDocTags.ts","time":196,"edits":4,"cost":"4.47"},{"name":"tests/cases/fourslash/getOccurrencesConst01.ts","time":98,"edits":2,"cost":"4.47"},{"name":"tests/cases/fourslash/findAllRefsReExport_broken.ts","time":147,"edits":3,"cost":"4.47"},{"name":"tests/cases/conformance/es6/spread/iteratorSpreadInArray2.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/commonSourceDirectory.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/es6/templates/templateStringInTypeAssertionES6.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of31.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArgumentLists/parserErrorRecovery_ArgumentList4.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/fourslash/completionInfoWithExplicitTypeArguments.ts","time":98,"edits":2,"cost":"4.47"},{"name":"tests/cases/compiler/classExpressionExtendingAbstractClass.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/invalidSplice.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax7.ts","time":196,"edits":4,"cost":"4.47"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName17.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/declarationEmitDefaultExport4.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/superErrors.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/getAndSetNotIdenticalType2.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/internalAliasEnumInsideTopLevelModuleWithExport.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/statements/continueStatements/forInContinueStatements.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/inferSetterParamType.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES6.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/optionalParamAssignmentCompat.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/noCollisionThisExpressionAndLocalVarInProperty.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/arrayAssignmentTest3.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/intrinsics.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/collisionCodeGenModuleWithFunctionChildren.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/decorators/class/constructor/decoratorOnClassConstructor4.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of31.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/anyDeclare.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/es6-umd.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithExtensionInES6.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES5.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/ambientClassDeclarationWithExtends.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/assignmentCompatability18.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/types/specifyingTypes/typeQueries/typeQueryWithReservedWords.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakTarget6.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/defaultValueInConstructorOverload1.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/genericSpecializations3.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/externalModules/topLevelModuleDeclarationAndFile.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/privacyGloGetter.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndFunctionWithSameNameAndCommonRoot.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/genericDerivedTypeWithSpecializedBase.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/constructorOverloads7.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern8.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/jsxViaImport.tsx","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/objectLiteralArraySpecialization.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/salsa/jsObjectsMarkedAsOpenEnded.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions04_ES5.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/fourslash/completionAfterDotDotDot.ts","time":98,"edits":2,"cost":"4.47"},{"name":"tests/cases/compiler/declarationEmitInferredTypeAlias7.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/declarationEmitDestructuringOptionalBindingParametersInOverloads.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/es6/modules/defaultExportsCannotMerge02.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty25.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/interfaceImplementation1.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithBooleanType.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/typeAssertionToGenericFunctionType.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/blockScopedBindingsReassignedInLoop1.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/typeParameterDiamond3.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/contextuallyTypingRestParameters.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/expressions/objectLiterals/objectLiteralErrorsES3.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/targetTypeBaseCalls.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression8_es2017.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/letDeclarations-scopes-duplicates6.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/moduleAugmentationGlobal6_1.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiateGenericClassWithWrongNumberOfTypeArguments.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability04.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/inferentialTypingWithFunctionTypeNested.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/commentInEmptyParameterList1.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithNumberType.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/es6/spread/iteratorSpreadInArray4.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/assignmentCompatability14.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithSpecializedSignatures.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/types/union/unionTypeIndexSignature.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTypeParameter.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/unusedVariablesinForLoop2.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithRHSIsSubtypeOfFunction.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/bestCommonTypeReturnStatement.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/parseErrorInHeritageClause1.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings24_ES6.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/references/library-reference-scoped-packages.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/externalModules/importsImplicitlyReadonly.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/deduplicateImportsInSystem.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/assignmentCompatability2.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedArrowFunctionES6.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/methodContainingLocalFunction.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution7_classic.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/systemModule15.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/overloadBindingAcrossDeclarationBoundaries.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionWithTypeArgument.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern10.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck24.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/targetTypeCastTest.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction6_es2017.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceTransitiveConstraints.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/keepImportsInDts1.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignment.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES6.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor8.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/duplicateObjectLiteralProperty.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/numericIndexerConstraint4.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/typeInferenceReturnTypeCallback.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/es6/destructuring/restElementWithNullInitializer.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/unusedMultipleParameters1InMethodDeclaration.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/ambientEnumElementInitializer3.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/spreadIntersectionJsx.tsx","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions14_ES6.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/types/members/objectTypeWithCallSignatureAppearsToBeFunctionType.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceIncompatibleWithBaseIndexer.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/forIn.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty44.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/types/literal/stringLiteralsWithSwitchStatements02.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/trailingCommaInHeterogenousArrayLiteral1.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/ArrowFunctionExpression1.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes01.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/types/spread/spreadExcessProperty.ts","time":98,"edits":2,"cost":"4.47"},{"name":"tests/cases/conformance/types/primitives/number/extendNumberInterface.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/library_StringSlice.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/types/contextualTypes/commaOperator/contextuallyTypeCommaOperator03.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/inOperatorWithGeneric.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/inheritSameNamePropertiesWithDifferentOptionality.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/compiler/commentInMethodCall.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/conformance/async/es5/asyncModule_es5.ts","time":49,"edits":1,"cost":"4.47"},{"name":"tests/cases/fourslash/completionsPathsJsonModule.ts","time":146,"edits":3,"cost":"4.47"},{"name":"tests/cases/fourslash/getOccurrencesIsDefinitionOfStringNamedProperty.ts","time":146,"edits":3,"cost":"4.47"},{"name":"tests/cases/compiler/restParameterWithBindingPattern3.ts","time":97,"edits":2,"cost":"4.46"},{"name":"tests/cases/compiler/amdModuleBundleNoDuplicateDeclarationEmitComments.ts","time":97,"edits":2,"cost":"4.46"},{"name":"tests/cases/conformance/types/union/unionTypeWithIndexSignature.ts","time":97,"edits":2,"cost":"4.46"},{"name":"tests/cases/fourslash/goToImplementationNamespace_00.ts","time":97,"edits":2,"cost":"4.46"},{"name":"tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction17.ts","time":97,"edits":2,"cost":"4.46"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceHeritageClauseAlreadyHaveMember.ts","time":97,"edits":2,"cost":"4.46"},{"name":"tests/cases/fourslash/goToDefinition_super.ts","time":97,"edits":2,"cost":"4.46"},{"name":"tests/cases/fourslash/completionsExportImport.ts","time":97,"edits":2,"cost":"4.46"},{"name":"tests/cases/fourslash/tsxFindAllReferences1.ts","time":97,"edits":2,"cost":"4.46"},{"name":"tests/cases/fourslash/findAllRefsJsDocTemplateTag_function_js.ts","time":97,"edits":2,"cost":"4.46"},{"name":"tests/cases/conformance/jsdoc/jsdocTemplateTag3.ts","time":97,"edits":2,"cost":"4.46"},{"name":"tests/cases/compiler/tsxNoTypeAnnotatedSFC.tsx","time":97,"edits":2,"cost":"4.46"},{"name":"tests/cases/compiler/arrayIndexWithArrayFails.ts","time":97,"edits":2,"cost":"4.46"},{"name":"tests/cases/fourslash/gotoDefinitionInObjectBindingPattern1.ts","time":97,"edits":2,"cost":"4.46"},{"name":"tests/cases/conformance/types/intersection/intersectionsAndEmptyObjects.ts","time":97,"edits":2,"cost":"4.46"},{"name":"tests/cases/fourslash/codeFixClassImplementClassMultipleSignatures1.ts","time":145,"edits":3,"cost":"4.46"},{"name":"tests/cases/fourslash/getEditsForFileRename_directory_up.ts","time":145,"edits":3,"cost":"4.46"},{"name":"tests/cases/fourslash/findAllRefsObjectBindingElementPropertyName04.ts","time":145,"edits":3,"cost":"4.46"},{"name":"tests/cases/fourslash/codeFixClassImplementClassMultipleSignatures2.ts","time":193,"edits":4,"cost":"4.46"},{"name":"tests/cases/fourslash/commentsFunctionExpression.ts","time":241,"edits":5,"cost":"4.46"},{"name":"tests/cases/compiler/unionExcessPropsWithPartialMember.ts","time":96,"edits":2,"cost":"4.45"},{"name":"tests/cases/compiler/typePartameterConstraintInstantiatedWithDefaultWhenCheckingDefault.ts","time":96,"edits":2,"cost":"4.45"},{"name":"tests/cases/compiler/checkSuperCallBeforeThisAccessing9.ts","time":96,"edits":2,"cost":"4.45"},{"name":"tests/cases/conformance/emitter/es2018/asyncGenerators/emitter.asyncGenerators.functionDeclarations.es2018.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/jsx/tsxAttributeResolution15.tsx","time":96,"edits":2,"cost":"4.45"},{"name":"tests/cases/compiler/invalidLetInForOfAndForIn_ES6.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumTypeInvalidOperations.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/infinitelyExpandingTypes4.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/fourslash/goToDefinitionConstructorOfClassWhenClassIsPrecededByNamespace01.ts","time":96,"edits":2,"cost":"4.45"},{"name":"tests/cases/fourslash/signatureHelpInAdjacentBlockBody.ts","time":96,"edits":2,"cost":"4.45"},{"name":"tests/cases/conformance/jsx/tsxElementResolution.tsx","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/typeOfEnumAndVarRedeclarations.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction20.ts","time":96,"edits":2,"cost":"4.45"},{"name":"tests/cases/fourslash/importNameCodeFix_exportEquals.ts","time":96,"edits":2,"cost":"4.45"},{"name":"tests/cases/compiler/importHelpersOutFile.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithOnlyNullValueOrUndefinedValue.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/typedGenericPrototypeMember.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/types/specifyingTypes/typeQueries/typeofAnExportedType.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/fourslash/quickInfoOnClassMergedWithFunction.ts","time":96,"edits":2,"cost":"4.45"},{"name":"tests/cases/conformance/externalModules/multipleExportDefault3.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty18.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/recursiveExportAssignmentAndFindAliasedType7.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/classIndexer3.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/deepElaborationsIntoArrowExpressions.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/functionOverloads34.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/importDeclWithExportModifierAndExportAssignment.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration8_es6.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/indexer.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/functionTypeArgumentArrayAssignment.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/mergedModuleDeclarationCodeGen4.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/namedFunctionExpressionInModule.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern23.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/dynamicImport/importCallExpression5ESNext.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPrivates2.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/declarationEmitAliasFromIndirectFile.ts","time":96,"edits":2,"cost":"4.45"},{"name":"tests/cases/fourslash/convertFunctionToEs6ClassNoSemicolon.ts","time":96,"edits":2,"cost":"4.45"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution5_node.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/interfaces/declarationMerging/mergeThreeInterfaces.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames44_ES5.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/propertyAccess2.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName37.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty50.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser519458.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/declFileObjectLiteralWithOnlySetter.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/varArgParamTypeCheck.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/declFileTypeAnnotationVisibilityErrorAccessors.ts","time":96,"edits":2,"cost":"4.45"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of16.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/shorthand-property-es6-es6.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/declareIdentifierAsBeginningOfStatementExpression01.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/mappedTypeNestedGenericInstantiation.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/fourslash/toggleDuplicateFunctionDeclaration.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNotEqualHasNoEffect.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/declarationEmitDestructuringParameterProperties.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/es6/restParameters/emitRestParametersFunctionExpression.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment19.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/expressions/typeGuards/TypeGuardWithEnumUnion.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionES6.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/es6/destructuring/emptyObjectBindingPatternParameter03.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/sourceMapValidationWhile.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/collisionCodeGenModuleWithAccessorChildren.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/indexer2.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName1.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/tsxAttributeQuickinfoTypesSameAsObjectLiteral.tsx","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings05_ES5.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/internalAliasInterface.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/es6/destructuring/emptyVariableDeclarationBindingPatterns01_ES5.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/inheritanceStaticPropertyOverridingAccessor.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/jsx/tsxPreserveEmit1.tsx","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/systemModuleWithSuperClass.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndIndexersErrors.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/classExtendsNull.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/jsx/tsxElementResolution7.tsx","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/exportAssignmentWithPrivacyError.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/nullAssignableToEveryType.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndValidOperator.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/privacyTypeParametersOfInterface.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters5.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/es6ExportAssignment2.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/chainedAssignmentChecking.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/jsdoc/typedefCrossModule5.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/cloduleAndTypeParameters.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingDts1.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/jsx/tsxElementResolution11.tsx","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser536727.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/collisionRestParameterFunctionExpressions.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames49_ES5.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/invalidLetInForOfAndForIn_ES5.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/Symbols/ES5SymbolProperty4.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorWithModule.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/genericClassesInModule2.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/expressions/superPropertyAccess/superPropertyAccessNoError.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/typeIdentityConsidersBrands.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration7ES5iterable.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/externalModules/exportAssignmentMergedInterface.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/parser/ecmascript5/ObjectTypes/parserObjectType6.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/numericIndexExpressions.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/types/union/unionTypeEquivalence.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/parser/ecmascript5/parserS7.2_A1.5_T2.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/arrayConcat2.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings10_ES5.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/privateInterfaceProperties.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/fourslash/navigationBarVariables.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement18.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSubtyping.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/fourslash/formatWithBaseIndent.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/optionalParamInOverride.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/es6/templates/templateStringInParentheses.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/es6/classExpressions/classExpressionES63.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/inferringAnyFunctionType3.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/contextualTyping4.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/superCallFromClassThatHasNoBaseType1.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/es6/modules/exportStar.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithBooleanType.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/accessorWithRestParam.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/keywordField.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/implicitAnyInCatch.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/jsFileCompilationPublicMethodSyntaxOfClass.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression5_es5.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/unusedPrivateVariableInClass4.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/generics1.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/numericIndexerConstraint3.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/getterThatThrowsShouldNotNeedReturn.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/objectLitGetterSetter.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration8.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/compiler/contextualTyping1.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/fourslash/breakpointValidationExportAssignment.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/conformance/es6/templates/templateStringTermination2.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/fourslash/removeDeclareParamTypeAnnotation.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/fourslash/smartIndentInterface.ts","time":48,"edits":1,"cost":"4.45"},{"name":"tests/cases/fourslash/importJsNodeModule3.ts","time":144,"edits":3,"cost":"4.45"},{"name":"tests/cases/compiler/weakType.ts","time":144,"edits":3,"cost":"4.45"},{"name":"tests/cases/fourslash/referencesForMergedDeclarations.ts","time":143,"edits":3,"cost":"4.45"},{"name":"tests/cases/fourslash/completionEntryForClassMembers3.ts","time":143,"edits":3,"cost":"4.45"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportAmbient2.ts","time":143,"edits":3,"cost":"4.45"},{"name":"tests/cases/fourslash/findAllRefsObjectBindingElementPropertyName10.ts","time":143,"edits":3,"cost":"4.45"},{"name":"tests/cases/compiler/excessPropertyCheckWithUnions.ts","time":238,"edits":5,"cost":"4.44"},{"name":"tests/cases/fourslash/formatAfterWhitespace.ts","time":95,"edits":2,"cost":"4.44"},{"name":"tests/cases/compiler/identifierStartAfterNumericLiteral.ts","time":95,"edits":2,"cost":"4.44"},{"name":"tests/cases/conformance/jsdoc/checkExportsObjectAssignPrototypeProperty.ts","time":95,"edits":2,"cost":"4.44"},{"name":"tests/cases/fourslash/formattingOnChainedCallbacks.ts","time":95,"edits":2,"cost":"4.44"},{"name":"tests/cases/fourslash/codeFixUndeclaredPropertyAccesses.ts","time":237,"edits":5,"cost":"4.44"},{"name":"tests/cases/conformance/types/spread/objectSpreadStrictNull.ts","time":142,"edits":3,"cost":"4.44"},{"name":"tests/cases/fourslash/completionListInUnclosedFunction02.ts","time":142,"edits":3,"cost":"4.44"},{"name":"tests/cases/fourslash/renameDestructuringAssignmentNestedInForOf2.ts","time":142,"edits":3,"cost":"4.44"},{"name":"tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts","time":189,"edits":4,"cost":"4.44"},{"name":"tests/cases/compiler/omitTypeHelperModifiers01.ts","time":94,"edits":2,"cost":"4.43"},{"name":"unittests:: PrinterAPI","time":47,"edits":1,"cost":"4.43"},{"name":"unittests:: services:: extract:: extractRanges","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/fourslash/genericParameterHelpTypeReferences.ts","time":188,"edits":4,"cost":"4.43"},{"name":"tests/cases/compiler/assignmentCompatability41.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/sourceMapValidationFunctionExpressions.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_notInCommonjsProject_yesIfSomeEs6Module.ts","time":94,"edits":2,"cost":"4.43"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportPaths_withParentRelativePath.ts","time":188,"edits":4,"cost":"4.43"},{"name":"tests/cases/compiler/generatorES6_3.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/fourslash/completionListNewIdentifierVariableDeclaration.ts","time":94,"edits":2,"cost":"4.43"},{"name":"tests/cases/conformance/es6/yieldExpressions/YieldExpression14_es6.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/functionCall17.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/es2017/useSharedArrayBuffer3.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/classes/classDeclarations/classAndVariableWithSameName.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/fourslash/completionEntryForConst.ts","time":94,"edits":2,"cost":"4.43"},{"name":"tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/es6/yieldExpressions/YieldStarExpression3_es6.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/invalidSymbolInTypeParameter1.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionAsyncES6AMD.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/fourslash/unusedTypeParametersInClass1.ts","time":94,"edits":2,"cost":"4.43"},{"name":"tests/cases/fourslash/completionsSymbolMembers.ts","time":94,"edits":2,"cost":"4.43"},{"name":"tests/cases/compiler/lateBoundDestructuringImplicitAnyError.ts","time":94,"edits":2,"cost":"4.43"},{"name":"tests/cases/compiler/ambientEnumElementInitializer2.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/moduleAndInterfaceSharingName.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/constDeclarations.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/propertyOrdering2.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/expressions/commaOperator/commaOperatorWithSecondOperandNumberType.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern13.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/tupleTypeInference2.ts","time":94,"edits":2,"cost":"4.43"},{"name":"tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/interfaceInReopenedModule.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/extendGenericArray2.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionAsyncES5CJS.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution_withExtension.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/duplicateIdentifierEnum.ts","time":94,"edits":2,"cost":"4.43"},{"name":"tests/cases/compiler/esModuleInteropImportCall.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName12.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment8.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/class2.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/es6/Symbols/symbolType4.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/topLevelExports.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/fourslash/tsxGoToDefinitionStatelessFunction1.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IfStatements/parserErrorRecoveryIfStatement2.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/overloadedStaticMethodSpecialization.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/es5-oldStyleOctalLiteralInEnums.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/importTypeResolutionJSDocEOF.ts","time":94,"edits":2,"cost":"4.43"},{"name":"tests/cases/compiler/shorthand-property-es5-es6.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/unclosedExportClause01.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes02.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/fourslash/findAllRefsForDefaultExport_anonymous.ts","time":94,"edits":2,"cost":"4.43"},{"name":"tests/cases/fourslash/completionsNamespaceMergedWithObject.ts","time":94,"edits":2,"cost":"4.43"},{"name":"tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/functionOverloads42.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/objectLitTargetTypeCallSite.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/internalAliasInterfaceInsideTopLevelModuleWithExport.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/moduleSymbolMerging.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts","time":94,"edits":2,"cost":"4.43"},{"name":"tests/cases/conformance/types/primitives/enum/validEnumAssignments.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/baseTypeWrappingInstantiationChain.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/genericArrayAssignmentCompatErrors.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/contextualTyping2.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/constantOverloadFunctionNoSubtypeError.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/declarationEmitToDeclarationDirWithDeclarationOption.ts","time":94,"edits":2,"cost":"4.43"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08_ES6.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/defaultBestCommonTypesHaveDecls.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionES5CJS.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace03.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/asyncFunctionsAcrossFiles.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/functionSubtypingOfVarArgs.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/superPropertyAccessInComputedPropertiesOfNestedType_ES6.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/varArgWithNoParamName.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck60.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/errorMessagesIntersectionTypes02.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/genericsAndHigherOrderFunctions.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/exportImportAndClodule.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty19.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/controlFlow/controlFlowBinaryOrExpression.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/unaryPlus.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/clodulesDerivedClasses.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/genericCloneReturnTypes2.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES5.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/typeParameterCompatibilityAccrossDeclarations.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/internalAliasWithDottedNameEmit.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/enumLiteralUnionNotWidened.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty55.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression5_es6.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/newOperator.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/moduleResolution_relativeImportJsFile.ts","time":94,"edits":2,"cost":"4.43"},{"name":"tests/cases/compiler/genericConstraintDeclaration.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/genericTypeAssertions2.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments4_es6.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/externalModules/exportAssignmentGenericType.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/expressions/superCalls/superCalls.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/es6/yieldExpressions/YieldExpression19_es6.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/taggedTemplatesWithIncompleteTemplateExpressions3.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/types/typeRelationships/comparable/optionalProperties02.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/types/typeRelationships/widenedTypes/arrayLiteralWidened.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression8_es5.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/typeInferenceLiteralUnion.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/exportPrivateType.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression4.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty15.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/es6/modules/exportsAndImportsWithContextualKeywordNames01.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/moduleAugmentationExtendFileModule1.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/inferentialTypingObjectLiteralMethod2.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/indexWithUndefinedAndNull.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability01.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName27.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/augmentExportEquals1_1.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of33.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/inferentialTypingWithFunctionType.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/async/es2017/await_unaryExpression_es2017_1.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration9_es5.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/typeOfSuperCall.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/privatePropertyUsingObjectType.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserAmbiguityWithBinaryOperator4.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/randomSemicolons1.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/defaultOfAnyInStrictNullChecks.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/objectLiteralWithSemicolons5.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/jsx/tsxReactEmit3.tsx","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/jsx/tsxAttributeResolution9.tsx","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/inheritedStringIndexersFromDifferentBaseTypes.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/mutuallyRecursiveGenericBaseTypes1.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/doNotEmitPinnedCommentNotOnTopOfFile.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/typeCheckTypeArgument.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentES6.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit3_ES6.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/forInStatement7.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/cloduleSplitAcrossFiles.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/sourceMapForFunctionInInternalModuleWithCommentPrecedingStatement01.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface03.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment2.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/importAndVariableDeclarationConflict3.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES5.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/jsxImportInAttribute.tsx","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/conformance/types/namedTypes/classWithOnlyPublicMembersEquivalentToInterface2.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/compiler/modulePrologueES6.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/fourslash/formattingOnEnterInComments.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/fourslash/navigationBarItemsItems.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/fourslash/navigationBarImports.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/fourslash/breakpointValidationWith.ts","time":47,"edits":1,"cost":"4.43"},{"name":"tests/cases/fourslash/codeFixAddMissingInvocationForDecorator_all.ts","time":141,"edits":3,"cost":"4.43"},{"name":"tests/cases/fourslash/codeFixInferFromUsageCommentAfterParameter.ts","time":141,"edits":3,"cost":"4.43"},{"name":"tests/cases/fourslash/server/getJavaScriptSyntacticDiagnostics01.ts","time":141,"edits":3,"cost":"4.43"},{"name":"tests/cases/fourslash/moveToNewFile_importEquals.ts","time":141,"edits":3,"cost":"4.43"},{"name":"tests/cases/fourslash/findAllRefsUnionProperty.ts","time":234,"edits":5,"cost":"4.43"},{"name":"tests/cases/fourslash/codeFixClassImplementClassPropertyModifiers.ts","time":140,"edits":3,"cost":"4.42"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportFileAllComments.ts","time":140,"edits":3,"cost":"4.42"},{"name":"tests/cases/fourslash/codeFixAddMissingTypeof1.ts","time":140,"edits":3,"cost":"4.42"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_import_shadowing.ts","time":140,"edits":3,"cost":"4.42"},{"name":"tests/cases/fourslash/findAllRefsNoImportClause.ts","time":140,"edits":3,"cost":"4.42"},{"name":"tests/cases/fourslash/moveToNewFile_moveJsxImport1.ts","time":93,"edits":2,"cost":"4.42"},{"name":"tests/cases/compiler/omitTypeTests01.ts","time":93,"edits":2,"cost":"4.42"},{"name":"tests/cases/conformance/es6/destructuring/restPropertyWithBindingPattern.ts","time":93,"edits":2,"cost":"4.42"},{"name":"tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload2.tsx","time":93,"edits":2,"cost":"4.42"},{"name":"tests/cases/compiler/namespaceMergedWithImportAliasNoCrash.ts","time":93,"edits":2,"cost":"4.42"},{"name":"tests/cases/conformance/functions/functionWithUseStrictAndSimpleParameterList.ts","time":93,"edits":2,"cost":"4.42"},{"name":"tests/cases/fourslash/unusedClassInNamespaceWithTrivia.ts","time":93,"edits":2,"cost":"4.42"},{"name":"tests/cases/fourslash/quickInfoParameter_skipThisParameter.ts","time":93,"edits":2,"cost":"4.42"},{"name":"tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction13.ts","time":93,"edits":2,"cost":"4.42"},{"name":"tests/cases/fourslash/goToImplementationNamespace_06.ts","time":93,"edits":2,"cost":"4.42"},{"name":"tests/cases/compiler/declarationEmitLocalClassDeclarationMixin.ts","time":93,"edits":2,"cost":"4.42"},{"name":"tests/cases/compiler/moduleDeclarationExportStarShadowingGlobalIsNameable.ts","time":93,"edits":2,"cost":"4.42"},{"name":"tests/cases/fourslash/unusedTypeParametersInFunction3.ts","time":93,"edits":2,"cost":"4.42"},{"name":"tests/cases/compiler/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.tsx","time":92,"edits":2,"cost":"4.41"},{"name":"tests/cases/compiler/declarationEmitForDefaultExportClassExtendingExpression01.ts","time":92,"edits":2,"cost":"4.41"},{"name":"tests/cases/conformance/externalModules/importTsBeforeDTs.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/types/thisType/thisTypeInFunctions2.ts","time":92,"edits":2,"cost":"4.41"},{"name":"tests/cases/compiler/collisionCodeGenEnumWithEnumMemberConflict.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/functionExpressionNames.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/es6/destructuring/destructuringTypeAssertionsES5_6.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/systemModule3.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/symbolLinkDeclarationEmitModuleNames.ts","time":138,"edits":3,"cost":"4.41"},{"name":"tests/cases/conformance/es6/Symbols/symbolType6.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/jsx/checkJsxChildrenProperty9.tsx","time":92,"edits":2,"cost":"4.41"},{"name":"tests/cases/compiler/taggedTemplatesWithIncompleteNoSubstitutionTemplate2.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/fourslash/jsDocFunctionSignatures10.ts","time":92,"edits":2,"cost":"4.41"},{"name":"tests/cases/compiler/augmentedTypesClass2.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/fourslash/codeFixUnusedLabel.ts","time":92,"edits":2,"cost":"4.41"},{"name":"tests/cases/compiler/spreadBooleanRespectsFreshness.ts","time":92,"edits":2,"cost":"4.41"},{"name":"tests/cases/fourslash/extract-method19.ts","time":138,"edits":3,"cost":"4.41"},{"name":"tests/cases/compiler/caseInsensitiveFileSystemWithCapsImportTypeDeclarations.ts","time":92,"edits":2,"cost":"4.41"},{"name":"tests/cases/compiler/exportDefaultForNonInstantiatedModule.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/statements/breakStatements/invalidDoWhileBreakStatements.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings19_ES6.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/addMoreCallSignaturesToBaseSignature2.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/parser/ecmascript5/Expressions/parserUnaryExpression2.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/sourceMapWithCaseSensitiveFileNamesAndOutDir.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/fourslash/codeFixClassExtendAbstractMethodThis.ts","time":184,"edits":4,"cost":"4.41"},{"name":"tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/internalAliasUninitializedModule.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/fourslash/completionsThisType.ts","time":184,"edits":4,"cost":"4.41"},{"name":"tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens14.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/jsdoc/callbackCrossModule.ts","time":92,"edits":2,"cost":"4.41"},{"name":"tests/cases/compiler/destructuringAssignmentWithExportedName.ts","time":92,"edits":2,"cost":"4.41"},{"name":"tests/cases/conformance/classes/members/accessibility/privateStaticNotAccessibleInClodule2.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters6.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression2_es5.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck7.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/exportRedeclarationTypeAliases.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/callSignaturesShouldBeResolvedBeforeSpecialization.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames26_ES5.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/classes/members/accessibility/classPropertyIsPublicByDefault.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/implicitAnyWidenToAny.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads04.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/unusedImports7.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndValidOperands.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/mutrec.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/narrowingOfDottedNames.ts","time":138,"edits":3,"cost":"4.41"},{"name":"tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesWithoutSubtype.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGreaterThanTokenAmbiguity9.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision4.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/declarationEmitBindingPatterns.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/parser/ecmascript5/MissingTokens/parserMissingToken2.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature9.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/expressions/contextualTyping/arrayLiteralExpressionContextualTyping.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression8_es6.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/internalAliasFunction.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/jsxNestedWithinTernaryParsesCorrectly.tsx","time":92,"edits":2,"cost":"4.41"},{"name":"tests/cases/compiler/declarationFilesWithTypeReferences4.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClass.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/functionOverloads25.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/jsxViaImport.2.tsx","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity2.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing8.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/overloadOnConstDuplicateOverloads1.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/exportEqualErrorType.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/duplicateIdentifierRelatedSpans5.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/es6/modules/exportsAndImportsWithContextualKeywordNames02.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/async/es6/await_unaryExpression_es6.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/derivedInterfaceCallSignature.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/conditionalExpressionNewLine10.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/strictNullLogicalAndOr.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/types/specifyingTypes/typeReferences/nonGenericTypeReferenceWithTypeArguments.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/interfaceImplementation7.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/classMemberInitializerWithLamdaScoping.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/genericParameterAssignability1.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings01_ES6.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/getterSetterNonAccessor.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/contextualTyping9.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/statements/breakStatements/switchBreakStatements.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty47.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/overloadsInDifferentContainersDisagreeOnAmbient.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/functionVariableInReturnTypeAnnotation.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/declFileClassExtendsNull.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration7ES5.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit4_ES5.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/localClassesInLoop.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck23.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass2.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/interfaceImplementation8.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/types/intersection/operatorsAndIntersectionTypes.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/sourceMapValidationFunctions.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/declFilePrivateStatic.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/classes/classDeclarations/declaredClassMergedwithSelf.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/duplicateIdentifierRelatedSpans4.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers4.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/duplicateClassElements.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/noImplicitAnyParametersInBareFunctions.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/destructuringPropertyAssignmentNameIsNotAssignmentTarget.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/contextualTyping22.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/types/any/assignAnyToEveryType.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/indexerA.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/types/objectTypeLiteral/methodSignatures/methodSignaturesWithOverloads.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty6.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/functionOverloads32.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser512084.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName8.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/inheritanceStaticFuncOverridingMethod.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/indexIntoEnum.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/noErrorUsingImportExportModuleAugmentationInDeclarationFile2.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/interfaceInheritance2.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/fourslash/breakpointValidationDebugger.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/lambdaArgCrash.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/types/typeRelationships/comparable/typeAssertionsWithIntersectionTypes01.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/typeParameterConstrainedToOuterTypeParameter2.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/functionOverloads21.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/restIntersection.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/commentsOnStaticMembers.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement1.d.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/functionOverloads27.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/declarationEmitDestructuringWithOptionalBindingParameters.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorInAmbientContext1.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/enumsWithMultipleDeclarations2.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/quotedFunctionName2.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/commentOnBinaryOperator1.ts","time":92,"edits":2,"cost":"4.41"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration5.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/flowAfterFinally1.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/genericWithCallSignatureReturningSpecialization.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/compiler/styleOptions.ts","time":46,"edits":1,"cost":"4.41"},{"name":"tests/cases/fourslash/augmentedTypesModule6.ts","time":183,"edits":4,"cost":"4.40"},{"name":"tests/cases/fourslash/completionInJsDocQualifiedNames.ts","time":183,"edits":4,"cost":"4.40"},{"name":"tests/cases/fourslash/referencesForPropertiesOfGenericType.ts","time":137,"edits":3,"cost":"4.40"},{"name":"tests/cases/fourslash/codeFixCannotFindModule_suggestion.ts","time":137,"edits":3,"cost":"4.40"},{"name":"tests/cases/fourslash/codeFixClassImplementClassAbstractGettersAndSetters.ts","time":137,"edits":3,"cost":"4.40"},{"name":"tests/cases/fourslash/getJavaScriptSyntacticDiagnostics9.ts","time":137,"edits":3,"cost":"4.40"},{"name":"tests/cases/compiler/conditionalTypeRelaxingConstraintAssignability.ts","time":91,"edits":2,"cost":"4.40"},{"name":"tests/cases/fourslash/findAllReferencesDynamicImport2.ts","time":182,"edits":4,"cost":"4.40"},{"name":"tests/cases/compiler/expressionTypeNodeShouldError.ts","time":91,"edits":2,"cost":"4.40"},{"name":"tests/cases/fourslash/unusedTypeParametersInFunction1.ts","time":91,"edits":2,"cost":"4.40"},{"name":"tests/cases/fourslash/jsDocFunctionSignatures8.ts","time":91,"edits":2,"cost":"4.40"},{"name":"tests/cases/fourslash/goToDefinitionExternalModuleName8.ts","time":91,"edits":2,"cost":"4.40"},{"name":"tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction16.ts","time":91,"edits":2,"cost":"4.40"},{"name":"tests/cases/compiler/objectLiteralEnumPropertyNames.ts","time":91,"edits":2,"cost":"4.40"},{"name":"tests/cases/fourslash/completionListAndMemberListOnCommentedDot.ts","time":91,"edits":2,"cost":"4.40"},{"name":"tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts","time":91,"edits":2,"cost":"4.40"},{"name":"tests/cases/fourslash/completionListInUnclosedFunction17.ts","time":136,"edits":3,"cost":"4.40"},{"name":"tests/cases/fourslash/quickInfoTypeError.ts","time":136,"edits":3,"cost":"4.40"},{"name":"tests/cases/fourslash/completionListInUnclosedFunction09.ts","time":136,"edits":3,"cost":"4.40"},{"name":"tests/cases/fourslash/getJavaScriptSyntacticDiagnostics15.ts","time":136,"edits":3,"cost":"4.40"},{"name":"tests/cases/fourslash/convertFunctionToEs6Class_asyncMethods.ts","time":136,"edits":3,"cost":"4.40"},{"name":"tests/cases/fourslash/completionForQuotedPropertyInPropertyAssignment1.ts","time":136,"edits":3,"cost":"4.40"},{"name":"tests/cases/fourslash/navigateToSymbolIterator.ts","time":136,"edits":3,"cost":"4.40"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess14.ts","time":136,"edits":3,"cost":"4.40"},{"name":"tests/cases/fourslash/incompleteFunctionCallCodefix.ts","time":181,"edits":4,"cost":"4.39"},{"name":"tests/cases/fourslash/annotateWithTypeFromJSDoc10.ts","time":226,"edits":5,"cost":"4.39"},{"name":"tests/cases/conformance/es6/destructuring/destructuringControlFlow.ts","time":90,"edits":2,"cost":"4.39"},{"name":"tests/cases/conformance/declarationEmit/declarationEmitWorkWithInlineComments.ts","time":90,"edits":2,"cost":"4.39"},{"name":"tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteralError.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/fourslash/codeFixSpellingVsImport.ts","time":90,"edits":2,"cost":"4.39"},{"name":"tests/cases/conformance/controlFlow/controlFlowAssignmentExpression.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/es6/modules/defaultExportsCannotMerge01.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/staticPrototypePropertyOnClass.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/es6/templates/templateStringInWhile.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17_ES6.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/fourslash/codeFixAddConvertToUnknownForNonOverlappingTypes4.ts","time":90,"edits":2,"cost":"4.39"},{"name":"tests/cases/compiler/jsxFactoryIdentifierWithAbsentParameter.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/emitter/es5/forAwait/emitter.forAwait.es5.ts","time":90,"edits":2,"cost":"4.39"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionInCJS4.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES5.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/parser/ecmascript5/VariableDeclarations/parserVariableDeclaration5.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution3_node.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/fourslash/codeFixInferFromUsageVariable2.ts","time":135,"edits":3,"cost":"4.39"},{"name":"tests/cases/conformance/types/members/classWithProtectedProperty.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/fourslash/quickInfoAlias.ts","time":90,"edits":2,"cost":"4.39"},{"name":"tests/cases/fourslash/jsxGenericQuickInfo.tsx","time":135,"edits":3,"cost":"4.39"},{"name":"tests/cases/compiler/parseCommaSeparatedNewlineString.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/es6/destructuring/emptyAssignmentPatterns03_ES5.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/callExpressionWithMissingTypeArgument1.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/fourslash/formattingJsxElements.ts","time":90,"edits":2,"cost":"4.39"},{"name":"tests/cases/compiler/commonSourceDir5.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/fourslash/goToDefinitionConstructorOfClassExpression01.ts","time":90,"edits":2,"cost":"4.39"},{"name":"tests/cases/compiler/conditionalExpressionNewLine3.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/varBlock.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/declarationEmit/libReferenceDeclarationEmit.ts","time":90,"edits":2,"cost":"4.39"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel2.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty14.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/statements/throwStatements/throwInEnclosingStatements.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/es6ImportNameSpaceImportMergeErrors.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/parameterReferenceInInitializer2.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/contextualTyping18.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/recursiveResolveTypeMembers.ts","time":90,"edits":2,"cost":"4.39"},{"name":"tests/cases/compiler/assignmentCompatability13.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/commentsBeforeVariableStatement1.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings09_ES5.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/fuzzy.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/es6/destructuring/restElementWithInitializer1.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/mismatchedGenericArguments1.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/enumWithoutInitializerAfterComputedMember.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/fourslash/completionListInvalidMemberNames2.ts","time":135,"edits":3,"cost":"4.39"},{"name":"tests/cases/compiler/sourceMapValidationEnums.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/commentOnAmbientEnum.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/functionOverloads11.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/importHelpersES6.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of29.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/declarationEmitExpressionInExtends.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/internalModules/importDeclarations/circularImportAlias.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/staticMethodReferencingTypeArgument1.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit5_ES5.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardOfFormThisMemberErrors.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/assignmentCompatability21.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression1_es5.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/sourceMapValidationIfElse.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty28.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionInAMD3.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/externalModules/exportNonVisibleType.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/types/typeParameters/typeArgumentLists/wrappedAndRecursiveConstraints3.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnumDeclaration6.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck58.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/assertInWrapSomeTypeParameter.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/generatorES6_6.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/duplicateIdentifierRelatedSpans6.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/es6/modules/exportsAndImportsWithUnderscores4.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorWithTypeParameters.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/trailingCommasES5.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/mismatchedClassConstructorVariable.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/interfaceExtendsClass1.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/propertyWrappedInTry.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/es5ExportEqualsDts.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/genericNewInterface.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/noErrorsInCallback.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/typeParameterFixingWithConstraints.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/innerAliases.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/widenToAny2.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/superPropertyAccess1.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/es6/templates/templateStringTermination1.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/commonSourceDir6.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty48.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/jsx/tsxTypeErrors.tsx","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/internalAliasInitializedModuleInsideLocalModuleWithExport.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/arrayOfExportedClass.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/reachabilityChecks1.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/es6/modules/reExportDefaultExport.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions03_ES6.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression7_es5.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of15.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/parser/ecmascript5/FunctionDeclarations/parserFunctionDeclaration8.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberVariableDeclarations/parserMemberVariableDeclaration3.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/functionCall1.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration6.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList10.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/dottedModuleName2.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/types/nonPrimitive/nonPrimitiveAssignError.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPrivates3.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/constDeclarations-errors.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorDefaultValuesReferencingThis.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/classExtendsInterface.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution2_ES6.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/newOnInstanceSymbol.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/es6/spread/iteratorSpreadInCall.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/superNewCall1.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/internalModules/codeGeneration/exportCodeGen.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/references/library-reference-12.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement16.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/assignmentCompatability10.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/types/objectTypeLiteral/constructSignatures/constructSignaturesWithOverloads.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/decrementAndIncrementOperators.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsReference.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/functionTypeArgumentAssignmentCompat.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/moduleResolution/untypedModuleImport_allowJs.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/collisionExportsRequireAndAmbientModule.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck8.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardsInWhileStatement.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/optionsSourcemapInlineSources.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/types/members/typesWithPrivateConstructor.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/unusedTypeParameterInInterface1.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/commentsDottedModuleName.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorInvalidOperations.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/types/typeRelationships/recursiveTypes/recursiveTypeInGenericConstraint.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractDeclarations.d.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/declarationMerging1.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/parser/ecmascript5/ArrayLiteralExpressions/parserArrayLiteralExpression14.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/maxNodeModuleJsDepthDefaultsToZero.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/es6/spread/iteratorSpreadInCall8.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/global.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/es6/templates/templateStringInCallExpressionES6.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserForStatement1.d.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/parser/ecmascript5/parserInExpression1.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/compiler/privateInstanceVisibility.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of16.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/fourslash/formattingSpacesAfterConstructor.ts","time":45,"edits":1,"cost":"4.39"},{"name":"tests/cases/fourslash/importNameCodeFix_jsx.ts","time":179,"edits":4,"cost":"4.38"},{"name":"tests/cases/fourslash/annotateWithTypeFromJSDoc3.ts","time":313,"edits":7,"cost":"4.38"},{"name":"tests/cases/conformance/types/unknown/unknownType1.ts","time":134,"edits":3,"cost":"4.38"},{"name":"tests/cases/fourslash/codeFixAwaitInSyncFunction6.5.ts","time":134,"edits":3,"cost":"4.38"},{"name":"tests/cases/fourslash/importNameCodeFixOptionalImport0.ts","time":134,"edits":3,"cost":"4.38"},{"name":"tests/cases/conformance/types/conditional/inferTypes2.ts","time":134,"edits":3,"cost":"4.38"},{"name":"tests/cases/fourslash/completionEntryForClassMembers.ts","time":223,"edits":5,"cost":"4.38"},{"name":"tests/cases/compiler/inferenceDoesntCompareAgainstUninstantiatedTypeParameter.ts","time":89,"edits":2,"cost":"4.38"},{"name":"tests/cases/conformance/controlFlow/controlFlowTruthiness.ts","time":89,"edits":2,"cost":"4.38"},{"name":"tests/cases/fourslash/extract-method3.ts","time":89,"edits":2,"cost":"4.38"},{"name":"tests/cases/fourslash/extract-method_jsxIntrinsicTagSymbol.ts","time":89,"edits":2,"cost":"4.38"},{"name":"tests/cases/fourslash/codeFixUnreachableCode_if.ts","time":133,"edits":3,"cost":"4.37"},{"name":"tests/cases/fourslash/codeFixInferFromUsageNumberIndexSignature.ts","time":133,"edits":3,"cost":"4.37"},{"name":"tests/cases/fourslash/getJavaScriptSyntacticDiagnostics17.ts","time":133,"edits":3,"cost":"4.37"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportIndex_notForClassicResolution.ts","time":133,"edits":3,"cost":"4.37"},{"name":"tests/cases/fourslash/codeFixClassPropertyInitialization.ts","time":177,"edits":4,"cost":"4.37"},{"name":"tests/cases/fourslash/smartSelection_simple2.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/parseBigInt.ts","time":88,"edits":2,"cost":"4.37"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser512325.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/fourslash/goToImplementationInterfaceProperty_01.ts","time":88,"edits":2,"cost":"4.37"},{"name":"tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction10.ts","time":88,"edits":2,"cost":"4.37"},{"name":"tests/cases/compiler/genericClasses1.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess17.ts","time":220,"edits":5,"cost":"4.37"},{"name":"tests/cases/compiler/typeofUndefined.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedObjectLiteralMethodDeclaration01.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures2.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/fourslash/goToImplementationInterfaceMethod_11.ts","time":88,"edits":2,"cost":"4.37"},{"name":"tests/cases/fourslash/importNameCodeFix_preferBaseUrl.ts","time":132,"edits":3,"cost":"4.37"},{"name":"tests/cases/compiler/inheritanceStaticFuncOverridingProperty.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/types/typeParameters/typeArgumentLists/typeParameterAsTypeParameterConstraint2.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments4.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/fourslash/quickInfoForDestructuringShorthandInitializer.ts","time":88,"edits":2,"cost":"4.37"},{"name":"tests/cases/compiler/augmentedTypesModules3.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty29.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/optionalPropertiesInClasses.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment32.ts","time":88,"edits":2,"cost":"4.37"},{"name":"tests/cases/compiler/es5-asyncFunctionPropertyAccess.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of26.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/decorators/class/method/decoratorOnClassMethod6.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/nestedBlockScopedBindings7.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes02_ES6.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/noCollisionThisExpressionAndVarInGlobal.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/es6/destructuring/optionalBindingParameters2.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/types/specifyingTypes/typeLiterals/functionLiteralForOverloads.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardFunctionGenerics.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/jsx/tsxAttributeResolution10.tsx","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionES5AMD.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/inlineSourceMap2.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithStringIndexerHidingBaseTypeIndexer.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/staticVisibility.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/typeValueConflict2.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/letDeclarations-scopes-duplicates.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/this_inside-object-literal-getters-and-setters.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/overloadOnConstNoStringImplementation.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/continueNotInIterationStatement2.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/functionOnlyHasThrow.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target8.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/controlFlow/controlFlowCommaOperator.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/types/members/objectTypeWithConstructSignatureHidingMembersOfFunction.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/classes/members/constructorFunctionTypes/classWithStaticMembers.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/typeParameterListWithTrailingComma1.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/types/intersection/intersectionTypeReadonly.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/externalModuleRefernceResolutionOrderInImportDeclaration.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/commentsAfterFunctionExpression1.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/recursiveMods.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression4_es2017.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOut.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserForStatement8.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/assignmentCompatability23.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum4.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/internalAliasVarInsideTopLevelModuleWithExport.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/unusedParametersInLambda2.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck45.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions17_ES5.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/arrowFunctionWithObjectLiteralBody5.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/typeOfThisInMemberFunctions.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates09_ES6.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding1InEs5.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/jsx/tsxUnionTypeComponent1.tsx","time":88,"edits":2,"cost":"4.37"},{"name":"tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates3.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty4.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/references/library-reference-14.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty23.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserForStatement3.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction7_es5.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/crashIntypeCheckObjectCreationExpression.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration11_es6.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution6_classic.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/unusedImports8.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/es6/Symbols/symbolType13.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/interfaceContextualType.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/parser/ecmascript5/ArrayLiteralExpressions/parserArrayLiteralExpression12.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/jsx/tsxElementResolution12.tsx","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/unknownSymbols2.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/objectLiteralWithSemicolons2.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/letDeclarations-scopes-duplicates2.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/memberVariableDeclarations1.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/genericClasses4.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName30.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/mixingStaticAndInstanceOverloads.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/unusedLocalsOnFunctionDeclarationWithinFunctionDeclaration2.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens16.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration3.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/es6/templates/templateStringControlCharacterEscapes04_ES6.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/errorForwardReferenceForwadingConstructor.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/externalModules/umd8.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/moduleMemberWithoutTypeAnnotation2.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/externalModules/umd5.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic3.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/es5-commonjs.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing4.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames28_ES5.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/unusedParameterInCatchClause.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/jsFileCompilationEmitTrippleSlashReference.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule01.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/crashInResolveInterface.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/classHeritageWithTrailingSeparator.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/moduleMerge.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck28.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser645086_3.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/propertiesAndIndexersForNumericNames.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames30_ES6.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/noCollisionThisExpressionAndLocalVarInMethod.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/enumAssignmentCompat5.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/types/members/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/illegalGenericWrapping1.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/decorators/class/property/decoratorOnClassProperty2.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings21_ES5.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments19.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/arrayConcatMap.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/compiler/contextualTyping33.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression3_es5.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/conformance/parser/ecmascript5/FunctionDeclarations/parserFunctionDeclaration1.ts","time":44,"edits":1,"cost":"4.37"},{"name":"tests/cases/fourslash/completionForStringLiteral_details.ts","time":219,"edits":5,"cost":"4.36"},{"name":"tests/cases/fourslash/completionsImport_importType.ts","time":175,"edits":4,"cost":"4.36"},{"name":"tests/cases/fourslash/codeFixAddMissingMember_generator_function.ts","time":131,"edits":3,"cost":"4.36"},{"name":"tests/cases/fourslash/findAllReferencesOfConstructor.ts","time":131,"edits":3,"cost":"4.36"},{"name":"tests/cases/fourslash/importNameCodeFixDefaultExport3.ts","time":131,"edits":3,"cost":"4.36"},{"name":"tests/cases/fourslash/completionForStringLiteralNonrelativeImport5.ts","time":131,"edits":3,"cost":"4.36"},{"name":"tests/cases/fourslash/referencesForInheritedProperties6.ts","time":131,"edits":3,"cost":"4.36"},{"name":"tests/cases/conformance/expressions/propertyAccess/propertyAccessWidening.ts","time":87,"edits":2,"cost":"4.35"},{"name":"tests/cases/fourslash/findAllRefs_importType_meaningAtLocation.ts","time":174,"edits":4,"cost":"4.35"},{"name":"tests/cases/conformance/enums/enumBasics.ts","time":87,"edits":2,"cost":"4.35"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportAllowSyntheticDefaultImports3.ts","time":87,"edits":2,"cost":"4.35"},{"name":"tests/cases/compiler/tsxTypeArgumentPartialDefinitionStillErrors.ts","time":87,"edits":2,"cost":"4.35"},{"name":"tests/cases/fourslash/documentHighlights_filesToSearch.ts","time":87,"edits":2,"cost":"4.35"},{"name":"tests/cases/conformance/jsdoc/typedefCrossModule.ts","time":87,"edits":2,"cost":"4.35"},{"name":"tests/cases/compiler/moduleResolution_packageJson_yesAtPackageRoot_mainFieldInSubDirectory.ts","time":87,"edits":2,"cost":"4.35"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_export_namedClassExpression.ts","time":217,"edits":5,"cost":"4.35"},{"name":"tests/cases/fourslash/moveToNewFile_namespaceImport.ts","time":130,"edits":3,"cost":"4.35"},{"name":"tests/cases/fourslash/completionForStringLiteralNonrelativeImport7.ts","time":130,"edits":3,"cost":"4.35"},{"name":"tests/cases/fourslash/importNameCodeFixReExport.ts","time":130,"edits":3,"cost":"4.35"},{"name":"tests/cases/fourslash/completionListInUnclosedFunction15.ts","time":130,"edits":3,"cost":"4.35"},{"name":"tests/cases/fourslash/moveToNewFile_onlyStatements.ts","time":130,"edits":3,"cost":"4.35"},{"name":"tests/cases/conformance/types/rest/restTuplesFromContextualTypes.ts","time":173,"edits":4,"cost":"4.35"},{"name":"tests/cases/conformance/es6/restParameters/readonlyRestParameters.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/fourslash/codeFixUnusedIdentifier_destructure_partlyUnused.ts","time":129,"edits":3,"cost":"4.34"},{"name":"tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration8.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/declarationEmitExportAliasVisibiilityMarking.ts","time":86,"edits":2,"cost":"4.34"},{"name":"tests/cases/compiler/commentsMultiModuleSingleFile.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/externalModules/relativePathMustResolve.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/fourslash/codeFixUnusedIdentifier_destructure_allUnused_all.ts","time":129,"edits":3,"cost":"4.34"},{"name":"tests/cases/compiler/thisInArrowFunctionInStaticInitializer1.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/es5ExportDefaultClassDeclaration.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserBreakStatement1.d.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportBaseUrl2.ts","time":172,"edits":4,"cost":"4.34"},{"name":"tests/cases/compiler/sourceMapWithMultipleFilesWithFileEndingWithInterface.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/assignmentCompatWithOverloads.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/isolatedModulesOut.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_import_objectBindingPattern_plain.ts","time":129,"edits":3,"cost":"4.34"},{"name":"tests/cases/compiler/es5-asyncFunctionReturnStatements.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/implicitAnyDeclareFunctionExprWithoutFormalType.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/jsx/tsxSpreadAttributesResolution12.tsx","time":86,"edits":2,"cost":"4.34"},{"name":"tests/cases/compiler/destructuringInVariableDeclarations8.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/classes/constructorDeclarations/constructorParameters/readonlyConstructorAssignment.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/fourslash/unusedImportsFS_entireImportDeclaration.ts","time":129,"edits":3,"cost":"4.34"},{"name":"tests/cases/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/fourslash/extract-const1.ts","time":86,"edits":2,"cost":"4.34"},{"name":"tests/cases/fourslash/findAllRefsForDefaultExport.ts","time":129,"edits":3,"cost":"4.34"},{"name":"tests/cases/compiler/overloadOnConstInObjectLiteralImplementingAnInterface.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/unusedLocalsinConstructor2.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions02_ES6.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/illegalSuperCallsInConstructor.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/es6/Symbols/symbolType3.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/fourslash/completionListInUnclosedFunction08.ts","time":129,"edits":3,"cost":"4.34"},{"name":"tests/cases/compiler/emitBundleWithShebang1.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/functionCall10.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/fourslash/functionOverloadCount.ts","time":86,"edits":2,"cost":"4.34"},{"name":"tests/cases/conformance/async/es2017/asyncArrowFunction/asyncUnParenthesizedArrowFunction_es2017.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionNestedAMD2.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/implicitAnyDeclareFunctionWithoutFormalType2.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/jsxAttributeWithoutExpressionReact.tsx","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/amdDependencyCommentName3.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty17.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/genericFunctions0.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/contextualSignatureInstantiation1.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/es6/modules/exportsAndImports2-amd.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/nestedModulePrivateAccess.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/fourslash/findAllRefsDeclareClass.ts","time":129,"edits":3,"cost":"4.34"},{"name":"tests/cases/compiler/assignmentCompatability5.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserForStatement2.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/types/members/objectTypeHidingMembersOfObject.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer4.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment7.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/classes/members/constructorFunctionTypes/constructorHasPrototypeProperty.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/collisionCodeGenModuleWithMemberClassConflict.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/emitThisInSuperMethodCall.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/generics2.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/taggedTemplateStringsHexadecimalEscapesES6.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution7_node.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/thisInModule.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInVariableDeclaration1.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration5.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/constIndexedAccess.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/interfaceImplementation4.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/taggedTemplateWithoutDeclaredHelper.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/types/typeRelationships/comparable/typeAssertionsWithUnionTypes01.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/es3defaultAliasIsQuoted.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclaration1.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithStringIndexerHidingBaseTypeIndexer2.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/castTest.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature10.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/genericClassWithStaticsUsingTypeArguments.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/functionSubtypingOfVarArgs2.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/allowSyntheticDefaultImports5.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/exportAssignmentVariable.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/typeOfOperator1.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/types/literal/literalTypes1.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/tooManyTypeParameters1.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/assignmentCompatability34.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/contextualTypingWithGenericAndNonGenericSignature.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/types/typeParameters/typeArgumentLists/wrappedAndRecursiveConstraints4.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern5.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/declarationEmitInferredTypeAlias5.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardsInForStatement.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/commentOnSignature1.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/es6/destructuring/emptyVariableDeclarationBindingPatterns01_ES6.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/decorators/class/method/decoratorOnClassMethod3.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/superAccessInFatArrow1.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/salsa/moduleExportAssignment.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/typeAliasDoesntMakeModuleInstantiated.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern20.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedArray.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit3_ES5.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberType.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/assignmentCompatability11.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithAnyAndNumber.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/collisionRestParameterClassMethod.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/classes/constructorDeclarations/classConstructorParametersAccessibility2.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/duplicateIdentifierRelatedSpans3.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES6.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/voidAsNonAmbiguousReturnType.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/typeComparisonCaching.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/staticAndMemberFunctions.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/genericGetter.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/typeParameterDiamond4.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/specializationOfExportedClass.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility5.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/types/typeRelationships/recursiveTypes/nominalSubtypeCheckOfTypeParameter2.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/externalModules/exportAssignmentTopLevelFundule.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/jsx/tsxExternalModuleEmit2.tsx","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/assignmentCompatability4.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/baseIndexSignatureResolution.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/es5-asyncFunctionSwitchStatements.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/alwaysStrictModule2.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/propertySignatures.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/implicitAnyDeclareTypePropertyWithoutType.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/withStatementErrors.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/contextualTyping24.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classIsSubtypeOfBaseType.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/contextualTyping32.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserForInStatement3.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithLiteralPropertyNameInES6.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/es6ModuleWithModuleGenTargetAmd.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9_es6.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/forwardRefInEnum.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/restParameterAssignmentCompatibility.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/types/any/narrowExceptionVariableInCatchClause.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeOfOperatorES6.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserErrantEqualsGreaterThanAfterFunction2.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/assignmentCompatability8.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck30.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES5.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/optionalParamReferencingOtherParams1.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/parser/ecmascript5/SuperExpressions/parserSuperExpression1.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/es5-commonjs2.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/es6ClassSuperCodegenBug.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode15-negative.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/argumentsObjectIterator01_ES5.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/declarationEmitPrivateAsync.ts","time":86,"edits":2,"cost":"4.34"},{"name":"tests/cases/compiler/collisionThisExpressionAndAmbientVarInGlobal.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/argumentsObjectCreatesRestForJs.ts","time":86,"edits":2,"cost":"4.34"},{"name":"tests/cases/conformance/decorators/class/constructor/decoratorOnClassConstructor2.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/exportSpecifierAndExportedMemberDeclaration.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/detachedCommentAtStartOfConstructor2.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/nodeResolution7.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/importsInAmbientModules1.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/classExtendingQualifiedName.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/implicitAnyDeclareFunctionWithoutFormalType.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/types/spread/objectSpreadComputedProperty.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/classWithOverloadImplementationOfWrongName2.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/parser/ecmascript5/parserUnicode1.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/es6ImportDefaultBindingWithExport.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType10_ES6.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/parser/ecmascript5/Protected/Protected9.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/contextualTyping16.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/switchCaseInternalComments.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/types/namedTypes/interfaceWithPrivateMember.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserSwitchStatement1.d.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/compiler/recursiveNamedLambdaCall.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/fourslash/consistenceOnIndentionsOfChainedFunctionCalls.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/fourslash/alignmentAfterFormattingOnMultilineExpressionAndParametersList.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions09_ES5.ts","time":43,"edits":1,"cost":"4.34"},{"name":"tests/cases/fourslash/commentsVariables.ts","time":214,"edits":5,"cost":"4.34"},{"name":"tests/cases/fourslash/findAllRefsTypedef.ts","time":171,"edits":4,"cost":"4.34"},{"name":"tests/cases/fourslash/getJavaScriptSyntacticDiagnostics18.ts","time":128,"edits":3,"cost":"4.33"},{"name":"tests/cases/fourslash/extract-method2.ts","time":128,"edits":3,"cost":"4.33"},{"name":"tests/cases/fourslash/server/projectInfo02.ts","time":128,"edits":3,"cost":"4.33"},{"name":"tests/cases/conformance/jsdoc/returnTagTypeGuard.ts","time":128,"edits":3,"cost":"4.33"},{"name":"tests/cases/fourslash/getJavaScriptSyntacticDiagnostics6.ts","time":128,"edits":3,"cost":"4.33"},{"name":"tests/cases/fourslash/annotateWithTypeFromJSDoc11.ts","time":213,"edits":5,"cost":"4.33"},{"name":"tests/cases/conformance/types/spread/objectSpreadNegative.ts","time":213,"edits":5,"cost":"4.33"},{"name":"tests/cases/fourslash/convertFunctionToEs6Class2.ts","time":170,"edits":4,"cost":"4.33"},{"name":"tests/cases/fourslash/squiggleIllegalSubclassOverride.ts","time":85,"edits":2,"cost":"4.33"},{"name":"tests/cases/fourslash/findAllRefsClassExpression0.ts","time":170,"edits":4,"cost":"4.33"},{"name":"tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration8.ts","time":85,"edits":2,"cost":"4.33"},{"name":"tests/cases/fourslash/findAllReferencesDynamicImport1.ts","time":170,"edits":4,"cost":"4.33"},{"name":"tests/cases/fourslash/completionsJsdocTypeTagCast.ts","time":170,"edits":4,"cost":"4.33"},{"name":"tests/cases/fourslash/completionForQuotedPropertyInPropertyAssignment3.ts","time":127,"edits":3,"cost":"4.33"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportPaths1.ts","time":127,"edits":3,"cost":"4.33"},{"name":"tests/cases/fourslash/importNameCodeFix_rootDirs.ts","time":127,"edits":3,"cost":"4.33"},{"name":"tests/cases/compiler/contravariantInferenceAndTypeGuard.ts","time":84,"edits":2,"cost":"4.32"},{"name":"tests/cases/conformance/jsx/tsxSpreadAttributesResolution6.tsx","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/augmentExportEquals2.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/declFileRegressionTests.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05_ES6.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/genericCallWithoutArgs.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/sourceMapValidationForIn.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/statements/returnStatements/invalidReturnStatements.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment15.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/declareDottedModuleName.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/fourslash/codeFixUnusedIdentifier_parameterInOverride.ts","time":84,"edits":2,"cost":"4.32"},{"name":"tests/cases/compiler/conditionalExpressionNewLine6.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/widenedTypes.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/internalAliasVarInsideLocalModuleWithoutExport.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/matchReturnTypeInAllBranches.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/functionOverloads23.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/es6/destructuring/destructuringTypeAssertionsES5_5.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/duplicateLabel2.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/doubleUnderscoreEnumEmit.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/restUnion3.ts","time":84,"edits":2,"cost":"4.32"},{"name":"tests/cases/compiler/selfInLambdas.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/unclosedExportClause02.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/parser/ecmascript5/MethodSignatures/parserMethodSignature5.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/internalModules/moduleDeclarations/InvalidNonInstantiatedModule.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/ambient/ambientShorthand_reExport.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/declarationEmitWithDefaultAsComputedName2.ts","time":84,"edits":2,"cost":"4.32"},{"name":"tests/cases/compiler/es6ModuleInternalNamedImports2.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/unusedNamespaceInModule.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionThisCapturing.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/assignmentCompatability42.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/quotedModuleNameMustBeAmbient.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/emitBundleWithShebang2.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/es6/templates/templateStringWithOpenCommentInStringPortionES6.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression6_es5.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration12_es6.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/parser/ecmascript5/parserKeywordsAsIdentifierName2.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/contextualTyping20.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/externalModules/amdImportAsPrimaryExpression.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionAsIsES6.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/externalModules/moduleResolutionWithExtensions.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/DeclarationErrorsNoEmitOnError.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.hex.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/noImplicitUseStrict_system.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit4_ES6.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/emptyGenericParamList.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/parameterInitializerBeforeDestructuringEmit.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/doubleUnderscoreExportStarConflict.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/es6-sourcemap-amd.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/scanner/ecmascript5/scannerNumericLiteral3.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/collisionArgumentsFunctionExpressions.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/controlFlow/controlFlowIfStatement.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties2.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/nameCollisions.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/moduleResolution/typesVersions.ambientModules.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of32.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/doNotEmitPinnedCommentOnNotEmittedNodets.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty6.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments01.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/contextualTyping41.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/types/nonPrimitive/nonPrimitiveIndexingWithForInSupressError.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode16.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/couldNotSelectGenericOverload.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInheritance.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/systemModule6.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature6.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/unusedParametersThis.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypeAssertion01.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.hexNegative.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/tryCatchFinally.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/noImplicitUseStrict_es6.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/continueNotInIterationStatement4.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/objectLitStructuralTypeMismatch.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings03_ES5.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/assignmentCompatability36.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/expressions/commaOperator/commaOperatorWithSecondOperandStringType.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/aliasUsageInVarAssignment.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/errorMessagesIntersectionTypes03.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/expressions/assignmentOperator/assignmentTypeNarrowing.ts","time":84,"edits":2,"cost":"4.32"},{"name":"tests/cases/conformance/es6/classExpressions/typeArgumentInferenceWithClassExpression3.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/augmentExportEquals4_1.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/es6/restParameters/emitRestParametersFunctionProperty.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractCrashedOnce.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/declarationEmitInferredDefaultExportType2.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/moduleAugmentationGlobal7_1.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/overloadResolutionWithAny.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/excessPropertyErrorForFunctionTypes.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/asiPublicPrivateProtected.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/recursiveInheritance.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/es6/decorators/class/decoratorOnClass4.es6.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/genericPrototypeProperty3.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/expressions/newOperator/newOperatorErrorCases.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of12.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/unusedTypeParameters4.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/exportEqualsAmd.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1WithExport.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/assignmentCompatability9.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/types/objectTypeLiteral/constructSignatures/constructSignaturesWithOverloads2.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames9_ES5.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/types/nonPrimitive/nonPrimitiveIndexingWithForIn.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/indexerAsOptional.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/emitSuperCallBeforeEmitPropertyDeclaration1ES6.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/moduleResolution/packageJsonMain_isNonRecursive.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/decorators/invalid/decoratorOnInterface.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/contextuallyTypingOrOperator3.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/assignmentCompatability30.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/es6/destructuring/declarationInAmbientContext.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509693.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction4.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/overloadsWithProvisionalErrors.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/sourceMapWithCaseSensitiveFileNames.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/exportDefaultProperty2.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/Symbols/ES5SymbolProperty6.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression4_es5.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/umdDependencyCommentName2.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/indexSignatureWithInitializer1.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/mergeWithImportedNamespace.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName4.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/Symbols/ES5SymbolType1.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/forStatementInnerComments.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration7.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/aliasUsageInTypeArgumentOfExtendsClause.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/expressions/typeGuards/nullOrUndefinedTypeGuardIsOrderIndependent.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/constantOverloadFunction.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersOptionality4.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/typeArgumentInferenceOrdering.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1ES6.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/parser/ecmascript5/ArrayLiteralExpressions/parserArrayLiteralExpression4.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/parser/ecmascript5/VariableDeclarations/parserVariableDeclaration2.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/parser/ecmascript5/Expressions/parserInvocationOfMemberAccessOffOfObjectCreationExpression1.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/enumWithParenthesizedInitializer1.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/duplicateIdentifierDifferentSpelling.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/typeConstraintsWithConstructSignatures.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithTypeArgumentInES6.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/constructorsWithSpecializedSignatures.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/contextualSignatureInstatiationCovariance.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserForStatement4.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/duplicateVariablesByScope.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/typeInferenceWithTypeAnnotation.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty2.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/Blocks/parserErrorRecovery_Block2.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/fourslash/formattingOnClosingBracket.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/types/primitives/boolean/booleanPropertyAccess.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/compiler/overloadOnGenericArity.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration12.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList14.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/es6/templates/templateStringInModulo.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser643728.ts","time":42,"edits":1,"cost":"4.32"},{"name":"tests/cases/fourslash/completionListInNamedClassExpression.ts","time":126,"edits":3,"cost":"4.32"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax9.ts","time":126,"edits":3,"cost":"4.32"},{"name":"tests/cases/fourslash/convertToEs6Class_emptyCatchClause.ts","time":126,"edits":3,"cost":"4.32"},{"name":"tests/cases/fourslash/getJavaScriptSyntacticDiagnostics4.ts","time":126,"edits":3,"cost":"4.32"},{"name":"tests/cases/fourslash/goToDefinitionDynamicImport3.ts","time":126,"edits":3,"cost":"4.32"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportTypeRoots1.ts","time":125,"edits":3,"cost":"4.31"},{"name":"tests/cases/fourslash/moveToNewFile_newModuleNameUnique.ts","time":125,"edits":3,"cost":"4.31"},{"name":"tests/cases/fourslash/codeFixInferFromUsageUnifyAnonymousType.ts","time":166,"edits":4,"cost":"4.31"},{"name":"tests/cases/compiler/declarationsForIndirectTypeAliasReference.ts","time":83,"edits":2,"cost":"4.31"},{"name":"tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling.ts","time":83,"edits":2,"cost":"4.31"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment33.ts","time":83,"edits":2,"cost":"4.31"},{"name":"tests/cases/compiler/jsFileCompilationRestParamJsDocFunction.ts","time":83,"edits":2,"cost":"4.31"},{"name":"tests/cases/fourslash/completionsJsxAttribute.ts","time":207,"edits":5,"cost":"4.30"},{"name":"tests/cases/fourslash/codeFixInferFromUsageSetterWithInaccessibleTypeJS.ts","time":124,"edits":3,"cost":"4.30"},{"name":"tests/cases/fourslash/findAllRefsRootSymbols.ts","time":248,"edits":6,"cost":"4.30"},{"name":"tests/cases/fourslash/jsDocAugments.ts","time":124,"edits":3,"cost":"4.30"},{"name":"tests/cases/fourslash/extract-method-empty-namespace.ts","time":124,"edits":3,"cost":"4.30"},{"name":"tests/cases/fourslash/getJavaScriptSyntacticDiagnostics12.ts","time":124,"edits":3,"cost":"4.30"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportAllowSyntheticDefaultImports2.ts","time":124,"edits":3,"cost":"4.30"},{"name":"tests/cases/fourslash/moveToNewFile_rangeSemiValid.ts","time":124,"edits":3,"cost":"4.30"},{"name":"tests/cases/fourslash/codeFixClassPropertyInitialization3.ts","time":124,"edits":3,"cost":"4.30"},{"name":"tests/cases/fourslash/ambientShorthandGotoDefinition.ts","time":124,"edits":3,"cost":"4.30"},{"name":"tests/cases/conformance/types/spread/spreadUnion3.ts","time":124,"edits":3,"cost":"4.30"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax20.ts","time":165,"edits":4,"cost":"4.30"},{"name":"tests/cases/fourslash/completionListOfUnion.ts","time":165,"edits":4,"cost":"4.30"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess5.ts","time":165,"edits":4,"cost":"4.30"},{"name":"tests/cases/fourslash/moveToNewFile_moveImport.ts","time":206,"edits":5,"cost":"4.30"},{"name":"unittests:: tsc-watch:: resolutionCache:: tsc-watch with modules linked to sibling folder","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty46.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithBooleanType.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionThisCapturingES6.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/fourslash/codeFixUnreachableCode.ts","time":164,"edits":4,"cost":"4.29"},{"name":"tests/cases/fourslash/indentationInAmdIife.ts","time":123,"edits":3,"cost":"4.29"},{"name":"tests/cases/conformance/jsdoc/jsdocTemplateTag4.ts","time":82,"edits":2,"cost":"4.29"},{"name":"tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/isolatedModulesPlainFile-UMD.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/fourslash/findAllRefsForDefaultExport04.ts","time":164,"edits":4,"cost":"4.29"},{"name":"tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithBooleanType.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/booleanAssignment.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/statements/breakStatements/invalidWhileBreakStatements.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/fourslash/codeFixClassPropertyInitialization8.ts","time":123,"edits":3,"cost":"4.29"},{"name":"tests/cases/conformance/jsx/tsxDefaultAttributesResolution1.tsx","time":82,"edits":2,"cost":"4.29"},{"name":"tests/cases/fourslash/jsDocFunctionSignatures9.ts","time":123,"edits":3,"cost":"4.29"},{"name":"tests/cases/compiler/arrayLiteral1.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/augmentExportEquals2_1.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/fourslash/completionForStringLiteralWithDynamicImport.ts","time":123,"edits":3,"cost":"4.29"},{"name":"tests/cases/compiler/nestedBlockScopedBindings9.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors3.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithProtecteds.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment26.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndClassWithSameNameAndCommonRoot.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration5.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/augmentExportEquals6_1.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/unusedImports4.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/declarationEmitWithDefaultAsComputedName.ts","time":82,"edits":2,"cost":"4.29"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty40.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/es6/spread/iteratorSpreadInArray3.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/bitwiseCompoundAssignmentOperators.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedFunctionExpressionES6.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/recursiveComplicatedClasses.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/decoratorMetadataOnInferredType.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/useBeforeDeclaration.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/untypedModuleImport_withAugmentation2.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/commentsOnObjectLiteral3.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/externalModules/importNonExternalModule.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/types/members/classWithPublicProperty.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/types/any/anyPropertyAccess.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/nestedRecursiveLambda.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction1.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/es6/decorators/class/decoratorOnClass7.es6.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/async/es6/await_unaryExpression_es6_1.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/interfaceInheritance.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/jsx/tsxElementResolution10.tsx","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/innerModExport2.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern21.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/jsx/jsxParsingError1.tsx","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/es6/propertyAccess/propertyAccessNumericLiterals.es6.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/staticClassProps.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedFunctions.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/continueStatementInternalComments.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/classMemberWithMissingIdentifier.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/requireOfJsonFileWithModuleNodeResolutionEmitEsNext.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/functionAssignment.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/typeParameterAssignmentCompat1.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/assignmentCompatability24.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/scopeCheckClassProperty.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/genericFunduleInModule2.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterAsTypeArgument.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES6.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/requiredInitializedParameter2.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/exportDeclareClass1.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/es6/decorators/class/method/decoratorOnClassMethod1.es6.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/exportAlreadySeen.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/es6/templates/templateStringInMultiplicationES6.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames50_ES6.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/unusedImports12.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/decorators/class/method/decoratorOnClassMethod7.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/classExpressionTest1.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/complicatedGenericRecursiveBaseClassReference.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/es6/destructuring/emptyObjectBindingPatternParameter02.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens17.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/typeAliasDeclarationEmit.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/declarationFilesWithTypeReferences1.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/moduleAugmentationInDependency2.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/exportAssignmentOfDeclaredExternalModule.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/conditionalTypesASI.ts","time":82,"edits":2,"cost":"4.29"},{"name":"tests/cases/compiler/assignmentCompatability27.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/recursiveBaseCheck2.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/superInConstructorParam1.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of3.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/typings/typingsLookupAmd.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/newNamesInGlobalAugmentations1.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/newExpressionWithCast.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateStringsWithManyCallAndMemberExpressions.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/subtypingTransitivity.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/classes/constructorDeclarations/constructorWithExpressionLessReturn.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/taggedTemplatesWithIncompleteTemplateExpressions1.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/checkInfiniteExpansionTermination.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/quotedAccessorName1.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/contextualTyping10.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/namespacesDeclaration1.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/unusedMultipleParameter1InContructor.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/internalAliasVarInsideLocalModuleWithExport.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/unresolvedTypeAssertionSymbol.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/objectLiteralDeclarationGeneration1.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/collisionThisExpressionAndLocalVarInLambda.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/es6/moduleExportsCommonjs/anonymousDefaultExportsCommonjs.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/parser/ecmascript5/parserSbp_7.9_A9_T3.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/collisionSuperAndLocalFunctionInMethod.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/es6/templates/templateStringUnterminated4.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateWithConstructableTag02.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/classes/classDeclarations/classBody/classWithEmptyBody.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/thisTypeAsConstraint.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/cloduleWithDuplicateMember2.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/unusedSingleParameterInFunctionDeclaration.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/enums/enumExportMergingES6.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/es6/spread/iteratorSpreadInArray9.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of54.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/argumentsObjectIterator01_ES6.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck16.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/sourceMapValidationDebugger.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/ambientGetters.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/parser/ecmascript5/Protected/Protected2.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractProperties.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/inheritanceStaticAccessorOverridingAccessor.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/decorators/class/method/decoratorOnClassMethod2.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/exportVisibility.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/hidingIndexSignatures.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/externalModules/amdImportNotAsPrimaryExpression.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/systemModuleTargetES6.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement21.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/enumGenericTypeClash.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInAModule.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/indexWithoutParamType.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum5.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/genericSpecializations1.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName41.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrExpressionIsContextuallyTyped.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/types/thisType/fluentInterfaces.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithIndexers2.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/contextualTypingOfObjectLiterals.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/expressions/assignmentOperator/compoundArithmeticAssignmentLHSCanBeAssigned.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck57.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/noCatchBlock.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/for.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/blockScopedSameNameFunctionDeclarationES6.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction10_es2017.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/es5-commonjs4.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/moduleMemberMissingErrorIsRelative.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature5.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/compiler/unusedVariablesinNamespaces1.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/parser/ecmascript5/Accessors/parserAccessors5.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/fourslash/syntacticClassificationsTemplates1.ts","time":41,"edits":1,"cost":"4.29"},{"name":"tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts","time":286,"edits":7,"cost":"4.29"},{"name":"tests/cases/fourslash/codeFixInferFromUsageOptionalParamJS.ts","time":163,"edits":4,"cost":"4.29"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax26.ts","time":163,"edits":4,"cost":"4.29"},{"name":"tests/cases/fourslash/moveToNewFile_bindingPatterns.ts","time":122,"edits":3,"cost":"4.29"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax8.ts","time":122,"edits":3,"cost":"4.29"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess7.ts","time":122,"edits":3,"cost":"4.29"},{"name":"tests/cases/compiler/spreadInvalidArgumentType.ts","time":122,"edits":3,"cost":"4.29"},{"name":"tests/cases/fourslash/moveToNewFile_defaultExport.ts","time":122,"edits":3,"cost":"4.29"},{"name":"tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts","time":81,"edits":2,"cost":"4.28"},{"name":"tests/cases/compiler/compositeWithNodeModulesSourceFile.ts","time":81,"edits":2,"cost":"4.28"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts","time":81,"edits":2,"cost":"4.28"},{"name":"tests/cases/fourslash/completionListInUnclosedObjectTypeLiteralInSignature04.ts","time":162,"edits":4,"cost":"4.28"},{"name":"tests/cases/compiler/objectLiteralComputedNameNoDeclarationError.ts","time":81,"edits":2,"cost":"4.28"},{"name":"tests/cases/compiler/moduleAugmentationDuringSyntheticDefaultCheck.ts","time":81,"edits":2,"cost":"4.28"},{"name":"tests/cases/compiler/capturedVarInLoop.ts","time":81,"edits":2,"cost":"4.28"},{"name":"tests/cases/fourslash/referencesForMergedDeclarations7.ts","time":121,"edits":3,"cost":"4.28"},{"name":"tests/cases/fourslash/getJavaScriptSyntacticDiagnostics14.ts","time":121,"edits":3,"cost":"4.28"},{"name":"tests/cases/fourslash/getOccurrencesIsDefinitionOfNumberNamedProperty.ts","time":121,"edits":3,"cost":"4.28"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_missingInitializer.ts","time":121,"edits":3,"cost":"4.28"},{"name":"tests/cases/fourslash/renameImport.ts","time":201,"edits":5,"cost":"4.28"},{"name":"tests/cases/fourslash/findAllReferencesJsDocTypeLiteral.ts","time":201,"edits":5,"cost":"4.28"},{"name":"tests/cases/fourslash/annotateWithTypeFromJSDoc4.ts","time":241,"edits":6,"cost":"4.27"},{"name":"tests/cases/fourslash/importNameCodeFixShebang.ts","time":120,"edits":3,"cost":"4.27"},{"name":"tests/cases/compiler/localAliasExportAssignment.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/numericLiteralsWithTrailingDecimalPoints01.ts","time":80,"edits":2,"cost":"4.27"},{"name":"tests/cases/compiler/blockScopedBindingCaptureThisInFunction.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/allowJscheckJsTypeParameterNoCrash.ts","time":80,"edits":2,"cost":"4.27"},{"name":"tests/cases/conformance/salsa/moduleExportWithExportPropertyAssignment4.ts","time":80,"edits":2,"cost":"4.27"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck26.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/thisKeyword.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty3.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/interMixingModulesInterfaces2.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/controlFlow/controlFlowInstanceOfGuardPrimitives.ts","time":80,"edits":2,"cost":"4.27"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/staticMemberAssignsToConstructorFunctionMembers.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/optionalSetterParam.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/async/es6/asyncEnum_es6.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/es6/templates/templateStringUnterminated5_ES6.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/requiredInitializedParameter4.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/fourslash/breakpointValidationImport.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/templateStringsArrayTypeDefinedInES5Mode.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/duplicateInterfaceMembers1.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/statements/VariableStatements/recursiveInitializer.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/moduleCrashBug1.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/decorators/class/decoratorOnClass4.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration6_es5.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement6.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/optionalConstructorArgInSuper.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck15.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/unusedFunctionsinNamespaces4.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/withStatement.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/parserX_ArrowFunction1.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/arrayFlatMap.ts","time":80,"edits":2,"cost":"4.27"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionIncorrect2.ts","time":80,"edits":2,"cost":"4.27"},{"name":"tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/externalModules/umd-augmentation-1.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/moduleWithValuesAsType.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of48.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithoutAnnotationsOrBody.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/es6/yieldExpressions/YieldExpression5_es6.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/extension.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/optionalParamterAndVariableDeclaration2.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/declarationEmitImportInExportAssignmentModule.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/jsxFactoryMissingErrorInsideAClass.ts","time":80,"edits":2,"cost":"4.27"},{"name":"tests/cases/conformance/statements/for-inStatements/for-inStatementsArrayErrors.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/restParameterNotLast.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/externalModules/exportNonInitializedVariablesCommonJS.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/typeOfThisInAccessor.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers2.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/inheritedModuleMembersForClodule.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/commentOnImportStatement3.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/localClassesInLoop_ES6.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of44.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/genericClasses0.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithMultipleBases2.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/scopeCheckExtendedClassInsidePublicMethod2.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/selfReference.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/jsFileCompilationDuplicateVariableErrorReported.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/functions/functionNameConflicts.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/jsFileCompilationImportEqualsSyntax.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/downlevelLetConst18.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/commonSourceDir2.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/declarationEmitArrayTypesFromGenericArrayUsage.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/invokingNonGenericMethodWithTypeArguments1.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/functionWithThrowButNoReturn1.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/functionOverloads5.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15_ES6.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/jsx/tsxElementResolution17.tsx","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/duplicateIdentifiersAcrossFileBoundaries.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint6.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/unusedImports3.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt5.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/doubleUnderscoreLabels.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/libMembers.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/invalidUnicodeEscapeSequance3.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/es5-commonjs5.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/genericObjectCreationWithoutTypeArgs.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates06_ES5.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/parser/ecmascript5/parser10.1.1-8gs.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/commentOnAmbientVariable1.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/enumNumbering1.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType2.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/functionOverloads7.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/assigningFromObjectToAnythingElse.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/assignmentCompatability25.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/es2017/useSharedArrayBuffer4.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck4.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/requireEmitSemicolon.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor3.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/recursiveTupleTypes2.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/assignmentCompatability31.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/circularTypeofWithFunctionModule.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/noImplicitReturnsWithProtectedBlocks3.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/innerFunc.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorOverloads1.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/augmentExportEquals3_1.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/arrayAugment.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/detachedCommentAtStartOfFunctionBody1.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement5.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression4_es6.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/ambientModuleExports.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/es6/destructuring/restElementWithAssignmentPattern3.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGreaterThanTokenAmbiguity18.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/indexSignatureTypeInference.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterDirectlyConstrainedToItself.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/jsx/tsxElementResolution13.tsx","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/letDeclarations-useBeforeDefinition.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/unusedClassesinNamespace5.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision5.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/types/specifyingTypes/typeLiterals/functionLiteralForOverloads2.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/parser/ecmascript5/ObjectTypes/parserObjectType5.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck20.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/chainedImportAlias.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/es6/templates/templateStringInIndexExpression.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext2.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/typeParametersInStaticMethods.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/moduleAndInterfaceSharingName4.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing7.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/sourceMapValidationImport.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyAccess.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/expressions/asOperator/asOpEmitParens.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck51.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/objectLiteralReferencingInternalProperties.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithStaticPropertyAssignmentInES6.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/targetTypeVoidFunc.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/Symbols/ES5SymbolProperty7.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/moduleMergeConstructor.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IfStatements/parserErrorRecoveryIfStatement6.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/interfaceImplementation2.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression1_es2017.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/inheritanceStaticAccessorOverridingMethod.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/constructorParameterShadowsOuterScopes.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/emitSuperCallBeforeEmitPropertyDeclaration1.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of11.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/collisionArgumentsArrowFunctions.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/async/es2017/awaitInheritedPromise_es2017.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/fourslash/shims/getBreakpointStatementAtPosition.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/assignToInvalidLHS.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType1_ES5.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames36_ES6.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/ternaryExpressionSourceMap.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/es6/functionExpressions/FunctionExpression1_es6.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/semicolonsInModuleDeclarations.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/parameterReferenceInInitializer1.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/scopeCheckExtendedClassInsideStaticMethod1.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/expressions/commaOperator/commaOperatorOtherInvalidOperation.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/genericClassInheritsConstructorFromNonGenericClass.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames22_ES6.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck53.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/conformance/scanner/ecmascript5/scannerAdditiveExpression1.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/instantiatedBaseTypeConstraints2.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/unaryOperators1.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/declareModifierOnImport1.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/compiler/acceptableAlias1.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/fourslash/yieldKeywordFormatting.ts","time":40,"edits":1,"cost":"4.27"},{"name":"tests/cases/fourslash/quickInfoCanBeTruncated.ts","time":159,"edits":4,"cost":"4.26"},{"name":"tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts","time":119,"edits":3,"cost":"4.26"},{"name":"tests/cases/fourslash/completionListInClosedObjectTypeLiteralInSignature04.ts","time":119,"edits":3,"cost":"4.26"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess16.ts","time":198,"edits":5,"cost":"4.26"},{"name":"tests/cases/fourslash/importNameCodeFixUMDGlobalReact1.ts","time":158,"edits":4,"cost":"4.26"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment31.ts","time":79,"edits":2,"cost":"4.26"},{"name":"tests/cases/fourslash/jsdocReturnsTag.ts","time":158,"edits":4,"cost":"4.26"},{"name":"tests/cases/conformance/es6/destructuring/emptyAssignmentPatterns01_ES5.ts","time":79,"edits":2,"cost":"4.26"},{"name":"tests/cases/compiler/parameterDestructuringObjectLiteral.ts","time":79,"edits":2,"cost":"4.26"},{"name":"tests/cases/conformance/jsx/checkJsxChildrenProperty5.tsx","time":79,"edits":2,"cost":"4.26"},{"name":"tests/cases/compiler/declarationEmitBundleWithAmbientReferences.ts","time":79,"edits":2,"cost":"4.26"},{"name":"tests/cases/compiler/controlFlowNullTypeAndLiteral.ts","time":79,"edits":2,"cost":"4.26"},{"name":"tests/cases/fourslash/codeFixChangeExtendsToImplementsTypeParams.ts","time":158,"edits":4,"cost":"4.26"},{"name":"tests/cases/conformance/async/es5/asyncAwait_es5.ts","time":79,"edits":2,"cost":"4.26"},{"name":"tests/cases/conformance/types/intersection/intersectionReduction.ts","time":79,"edits":2,"cost":"4.26"},{"name":"tests/cases/compiler/controlFlowInstanceof.ts","time":118,"edits":3,"cost":"4.25"},{"name":"tests/cases/fourslash/completionListInUnclosedFunction14.ts","time":118,"edits":3,"cost":"4.25"},{"name":"tests/cases/fourslash/genericFunctionSignatureHelp2.ts","time":118,"edits":3,"cost":"4.25"},{"name":"tests/cases/fourslash/completionForStringLiteralNonrelativeImport11.ts","time":118,"edits":3,"cost":"4.25"},{"name":"tests/cases/fourslash/codeFixAddMissingTypeof2.ts","time":118,"edits":3,"cost":"4.25"},{"name":"tests/cases/fourslash/completionListInUnclosedFunction10.ts","time":118,"edits":3,"cost":"4.25"},{"name":"tests/cases/fourslash/server/getJavaScriptSyntacticDiagnostics02.ts","time":118,"edits":3,"cost":"4.25"},{"name":"tests/cases/conformance/jsx/tsxGenericAttributesType6.tsx","time":118,"edits":3,"cost":"4.25"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax4.ts","time":157,"edits":4,"cost":"4.25"},{"name":"tests/cases/fourslash/extract-method10.ts","time":157,"edits":4,"cost":"4.25"},{"name":"tests/cases/fourslash/moveToNewFile_exportImport.ts","time":157,"edits":4,"cost":"4.25"},{"name":"tests/cases/compiler/errorWithSameNameType.ts","time":78,"edits":2,"cost":"4.24"},{"name":"tests/cases/compiler/emptyObjectNotSubtypeOfIndexSignatureContainingObject2.ts","time":78,"edits":2,"cost":"4.24"},{"name":"tests/cases/conformance/es2019/globalThisBlockscopedProperties.ts","time":78,"edits":2,"cost":"4.24"},{"name":"tests/cases/conformance/parser/ecmascript5/ObjectLiterals/parserObjectLiterals1.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/undefinedArgumentInference.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/async/es2017/asyncMethodWithSuperConflict_es6.ts","time":78,"edits":2,"cost":"4.24"},{"name":"tests/cases/compiler/extendAndImplementTheSameBaseType.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/parserX_TypeArgumentList1.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/primitiveConstraints2.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/declarationEmitNestedGenerics.ts","time":78,"edits":2,"cost":"4.24"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames30_ES5.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode7.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/collisionCodeGenModuleWithEnumMemberConflict.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/genericContextualTypingSpecialization.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/es6/modules/exportsAndImports2-es6.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/thisCapture1.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/recursiveGenericUnionType2.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/types/import/importTypeNested.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty1.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames8_ES5.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IfStatements/parserErrorRecoveryIfStatement3.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/es6/templates/templateStringUnterminated3_ES6.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/systemModuleNonTopLevelModuleMembers.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES6.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration4_es2017.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/contextualTypingOfTooShortOverloads.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES6.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames22_ES5.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/async/es6/asyncGetter_es6.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/objectLiteralIndexers.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/autonumberingInEnums.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/types/literal/stringLiteralsWithSwitchStatements04.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/interfaces/declarationMerging/genericAndNonGenericInterfaceWithTheSameName.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/inferringAnyFunctionType1.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement20.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/circularlySimplifyingConditionalTypesNoCrash.ts","time":78,"edits":2,"cost":"4.24"},{"name":"tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/multipleExportAssignments.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/noCollisionThisExpressionAndLocalVarInLambda.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/unusedImports13.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/es6/restParameters/emitRestParametersFunction.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/unusedDestructuringParameters.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression6_es2017.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/functionCall11.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/classExtendsInterfaceInModule.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/shorthandPropertyAssignmentInES6Module.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithAny.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/decorators/class/decoratorOnClass3.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/constDeclarations-invalidContexts.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/jsFileCompilationWithoutOut.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralMatchedInSwitch01.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/es6/decorators/class/method/parameter/decoratorOnClassMethodParameter1.es6.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractExtends.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/types/literal/stringLiteralsWithTypeAssertions01.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/externalModules/esnext/esnextmodulekind.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/literals-negative.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/genericOfACloduleType2.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/internalModules/importDeclarations/invalidImportAliasIdentifiers.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/recursiveInferenceBug.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/functionOverloadsRecursiveGenericReturnType.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/derivedClassOverridesPrivateFunction1.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of1.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/letAndVarRedeclaration.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/functionLikeInParameterInitializer.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/blockScopedFunctionDeclarationES6.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/augmentedTypesModules2.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/importWithTrailingSlash_noResolve.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/importShouldNotBeElidedInDeclarationEmit.ts","time":78,"edits":2,"cost":"4.24"},{"name":"tests/cases/compiler/unusedPrivateMethodInClass4.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/systemExportAssignment2.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorOverloadsWithDefaultValues.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/augmentedTypesEnum3.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration3.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/protoAssignment.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/parser/ecmascript6/ShorthandPropertyAssignment/parserShorthandPropertyAssignment4.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/superPropertyAccess_ES6.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/overloadOnConstConstraintChecks1.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target12.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/fourslash/navigationBarItemsMultilineStringIdentifiers.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/typeArgumentConstraintResolution1.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/mergedInterfaceFromMultipleFiles1.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/continueTarget3.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexingResults.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserObjectCreation1.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/createArray.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/thisInGenericStaticMembers.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/resolveModuleNameWithSameLetDeclarationName2.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/intersectionTypeInference1.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/es6/modules/exportsAndImports4-amd.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/iteratorsAndStrictNullChecks.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of5.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/reExportGlobalDeclaration4.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/undefinedInferentialTyping.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression5_es2017.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/decorators/invalid/decoratorOnVar.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/decorators/class/property/decoratorOnClassProperty1.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/invokingNonGenericMethodWithTypeArguments2.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/assignmentCompat1.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/internalModules/codeGeneration/importStatementsInterfaces.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement8.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/debuggerEmit.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of14.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/overloadEquivalenceWithStatics.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/unusedImports11.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/typeAnnotationBestCommonTypeInArrayLiteral.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/emptyArgumentsListComment.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArgumentLists/parserErrorRecovery_ArgumentList1.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression2_es2017.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/es6/classExpressions/classExpressionES61.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck4.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts","time":78,"edits":2,"cost":"4.24"},{"name":"tests/cases/conformance/internalModules/moduleDeclarations/invalidInstantiatedModule.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/overloadsWithinClasses.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of1.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesInVariableDeclarations01.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/blockScopedBindingsReassignedInLoop5.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/es6/restParameters/emitRestParametersFunctionExpressionES6.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/checkSuperCallBeforeThisAccessing3.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/this_inside-enum-should-not-be-allowed.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/classMemberInitializerWithLamdaScoping4.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/prototypeOnConstructorFunctions.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/externModuleClobber.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/jsx/tsxExternalModuleEmit1.tsx","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/numericIndexerConstraint1.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/importedAliasesInTypePositions.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/typeArgumentsInFunctionExpressions.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/functionOverloads43.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNew.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/expressions/functions/contextuallyTypedFunctionExpressionsAndReturnAnnotations.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/mergedDeclarations5.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/abstractProperty.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/keepImportsInDts4.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyDuplicates.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolProperty9.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/contextualTyping8.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/es6/decorators/class/decoratorOnClass8.es6.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/argumentsObjectIterator02_ES5.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/assignmentToObjectAndFunction.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES6.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/declarationEmitDestructuring4.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/fourslash/tsxRename9.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/typeInferenceFixEarly.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/exportAssignmentFunction.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor2.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/conflictMarkerTrivia2.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/inheritanceMemberFuncOverridingAccessor.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberVariableDeclarations/parserMemberVariableDeclaration4.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/allowSyntheticDefaultImports4.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/async/es6/asyncUseStrict_es6.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration14_es5.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/optionsOutAndNoModuleGen.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/functionWithSameNameAsField.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/optionalPropertiesSyntax.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/functionOverloads2.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/incompleteDottedExpressionAtEOF.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/commentOnElidedModule1.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/interfaceNaming1.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess5.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/es6/templates/templateStringInObjectLiteralES6.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/es6ImportDefaultBindingInEs5.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/emitDecoratorMetadata_restArgs.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/requireOfAnEmptyFile1.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/accessorsEmit.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/mergedModuleDeclarationCodeGen2.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/continueTarget6.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName26.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithConstructorInES6.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/decorators/class/property/decoratorOnClassProperty6.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/jsFileFunctionParametersAsOptional.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric1.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/decorators/class/method/parameter/decoratorOnClassMethodParameter1.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/classExpressionWithStaticProperties1.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/typeReferenceDirectives11.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5for-of32.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution2_node.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/breakTarget2.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInstantiations1.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/ambient/ambientDeclarationsExternal.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES6.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/functionOverloads9.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/types/specifyingTypes/typeQueries/typeofTypeParameter.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/es5-asyncFunction.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/es6/templates/templateStringInModuloES6.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings17_ES6.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/conformance/parser/ecmascript5/parservoidInQualifiedName1.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/genericSignatureInheritance.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/compiler/unusedImports10.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/fourslash/breakpointValidationInBlankLine.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/fourslash/navigationBarItemsSymbols3.ts","time":39,"edits":1,"cost":"4.24"},{"name":"tests/cases/fourslash/findAllRefsForDefaultExport02.ts","time":117,"edits":3,"cost":"4.24"},{"name":"tests/cases/fourslash/getOccurrencesAsyncAwait2.ts","time":117,"edits":3,"cost":"4.24"},{"name":"tests/cases/fourslash/completionListInUnclosedFunction06.ts","time":117,"edits":3,"cost":"4.24"},{"name":"tests/cases/fourslash/completionsPaths_pathMapping_relativePath.ts","time":155,"edits":4,"cost":"4.24"},{"name":"tests/cases/fourslash/codeFixUnusedIdentifier_suggestion.ts","time":116,"edits":3,"cost":"4.24"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax5.ts","time":154,"edits":4,"cost":"4.23"},{"name":"tests/cases/fourslash/quickInfoMappedTypeRecursiveInference.ts","time":154,"edits":4,"cost":"4.23"},{"name":"tests/cases/fourslash/codeFixInferFromUsagePropertyAccessJS.ts","time":154,"edits":4,"cost":"4.23"},{"name":"tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithValidOperands.ts","time":77,"edits":2,"cost":"4.23"},{"name":"tests/cases/compiler/exportDefaultParenthesize.ts","time":77,"edits":2,"cost":"4.23"},{"name":"tests/cases/compiler/metadataOfClassFromAlias2.ts","time":77,"edits":2,"cost":"4.23"},{"name":"tests/cases/conformance/types/union/contextualTypeWithUnionTypeIndexSignatures.ts","time":77,"edits":2,"cost":"4.23"},{"name":"tests/cases/conformance/jsdoc/checkJsdocTypeTagOnObjectProperty2.ts","time":77,"edits":2,"cost":"4.23"},{"name":"tests/cases/fourslash/codeFixInferFromUsageSingleLineClassJS.ts","time":192,"edits":5,"cost":"4.23"},{"name":"tests/cases/fourslash/getJavaScriptSyntacticDiagnostics10.ts","time":115,"edits":3,"cost":"4.23"},{"name":"tests/cases/fourslash/convertFunctionToEs6ClassJsDoc.ts","time":115,"edits":3,"cost":"4.23"},{"name":"tests/cases/fourslash/completionForStringLiteral3.ts","time":115,"edits":3,"cost":"4.23"},{"name":"tests/cases/fourslash/completionListInvalidMemberNames_withExistingIdentifier.ts","time":115,"edits":3,"cost":"4.23"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess33.ts","time":115,"edits":3,"cost":"4.23"},{"name":"tests/cases/fourslash/findAllRefsForModule.ts","time":153,"edits":4,"cost":"4.23"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax22.ts","time":153,"edits":4,"cost":"4.23"},{"name":"tests/cases/fourslash/unusedParameterInLambda1.ts","time":153,"edits":4,"cost":"4.23"},{"name":"unittests:: tsserver:: typingsInstaller:: tsserver:: with inferred Project","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/isolatedModulesPlainFile-ES6.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportPaths_withExtension.ts","time":152,"edits":4,"cost":"4.22"},{"name":"tests/cases/compiler/staticClassMemberError.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/templates/templateStringMultiline3_ES6.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/fourslash/esModuleInteropFindAllReferences2.ts","time":152,"edits":4,"cost":"4.22"},{"name":"tests/cases/fourslash/completionsPaths_fromTypings.ts","time":114,"edits":3,"cost":"4.22"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames38_ES6.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/types/import/importTypeNonString.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpression2.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor7.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/noCollisionThisExpressionAndClassInGlobal.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/unknownSymbolInGenericReturnType.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/implicitAnyFromCircularInference.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/recursiveInheritance2.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/mergedDeclarations7.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty53.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/indexerConstraints.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/nestedBlockScopedBindings4.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/exportArrayBindingPattern.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/fourslash/completionListInUnclosedObjectTypeLiteralInSignature02.ts","time":114,"edits":3,"cost":"4.22"},{"name":"tests/cases/fourslash/findAllRefsJsDocTemplateTag_class_js.ts","time":114,"edits":3,"cost":"4.22"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of9.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames39_ES6.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/contextualTyping14.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/fourslash/breakpointValidationInComments.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression1.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/exportSpecifierReferencingOuterDeclaration2.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/yieldExpressions/YieldExpression13_es6.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGreaterThanTokenAmbiguity7.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/parser/ecmascript5/MethodSignatures/parserMethodSignature4.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/yieldExpressions/YieldExpression17_es6.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern14.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrayLiteralExpressions/parserErrorRecoveryArrayLiteralExpression1.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/inheritFromGenericTypeParameter.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/classes/classExpressions/classExpression3.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/extendsClauseAlreadySeen.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMethodInNonAbstractClass.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/assignmentCompatOnNew.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList4.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/thisInStatics.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/contextualTyping36.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/modules/exportBinding.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/commentsOnRequireStatement.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/es6ImportWithoutFromClauseWithExport.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/genericConstraint1.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/checkSuperCallBeforeThisAccessing2.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty2.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ExtendsOrImplementsClauses/parserErrorRecovery_ExtendsOrImplementsClause6.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/classes/classDeclarations/classImplementsMergedClassInterface.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/modules/defaultExportInAwaitExpression02.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/scopingInCatchBlocks.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/spread/arrayLiteralSpread.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/typeParameterArgumentEquivalence3.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/optionsSourcemapInlineSourcesMapRoot.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/module_augmentUninstantiatedModule2.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/dottedNamesInSystem.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty34.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/methodSignatureDeclarationEmit1.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/inheritanceMemberPropertyOverridingMethod.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/defaultArgsInOverloads.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/externalModuleQualification.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/types/union/unionTypeCallSignatures2.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of33.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/callOverloads5.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/isLiteral1.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/defaultDeclarationEmitDefaultImport.ts","time":76,"edits":2,"cost":"4.22"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractUsingAbstractMethods2.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/assignLambdaToNominalSubtypeOfFunction.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature4.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/unusedTypeParameterInMethod5.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/noImplicitReturnsWithProtectedBlocks2.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/jsx/tsxErrorRecovery1.tsx","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/types/specifyingTypes/predefinedTypes/objectTypesWithPredefinedTypesAsName.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/es6ImportNamedImportNoNamedExports.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/abstractClassInLocalScope.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/es6ClassTest3.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModule1.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/varNameConflictsWithImportInDifferentPartOfModule.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/breakNotInIterationOrSwitchStatement1.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/types/objectTypeLiteral/constructSignatures/constructSignaturesWithOverloadsThatDifferOnlyByReturnType.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions15_ES5.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates01_ES6.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/es6UseOfTopLevelRequire.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/templates/templateStringInConditional.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser642331.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/types/typeParameters/typeParameterLists/innerTypeParameterShadowingOuterOne.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens11.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/enumOperations.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/jsFileCompilationLetDeclarationOrder.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/templates/templateStringUnterminated3.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/types/intersection/contextualIntersectionType.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/expressions/typeGuards/TypeGuardWithArrayUnion.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/types/literal/stringLiteralsAssertionsInEqualityComparisons01.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/parser/ecmascript5/Expressions/parserUnaryExpression6.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/augmentedTypesFunction.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithEnumType.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/spread/iteratorSpreadInCall3.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/ClassDeclaration8.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithGetterSetterInES6.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/commentOnSimpleArrowFunctionBody1.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/checkJsFiles_skipDiagnostics.ts","time":76,"edits":2,"cost":"4.22"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserAmbiguityWithBinaryOperator3.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision3.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic14.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck2.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration1.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/constDeclarations-access.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/contextualTypingOfLambdaWithMultipleSignatures.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/externalModules/umd2.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/checkSwitchStatementIfCaseTypeIsString.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionExpressionES6.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/classes/classDeclarations/modifierOnClassDeclarationMemberInFunction.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/moduleElementsInWrongContext3.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/sigantureIsSubTypeIfTheyAreIdentical.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/inheritSameNamePrivatePropertiesFromDifferentOrigins.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/systemModuleDeclarationMerging.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/salsa/malformedTags.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/staticGetterAndSetter.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/decorators/class/method/decoratorOnClassMethod5.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType5_ES6.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName7.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ModuleElements/parserErrorRecovery_ModuleElement1.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/requireOfJsonFileWithModuleNodeResolutionEmitUndefined.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/stringIndexerAssignments1.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic6.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/decoratorInJsFile1.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/es3-jsx-react-native.tsx","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/templates/templateStringInInstanceOfES6.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/thisInStaticMethod1.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/restParameters/emitRestParametersFunctionPropertyES6.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/fourslash/addInterfaceToNotSatisfyConstraint.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/interfaceDeclaration2.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/ambientEnum1.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/sourceMap-StringLiteralWithNewLine.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/types/typeParameters/typeArgumentLists/wrappedAndRecursiveConstraints.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/classes/members/accessibility/protectedClassPropertyAccessibleWithinSubclass3.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/unusedTypeParameters1.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments3_es6.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType8_ES5.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/commentsArgumentsOfCallExpression2.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/ambiguousGenericAssertion1.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock2.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/moduleExportsCommonjs/defaultExportsGetExportedCommonjs.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration3_es6.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/conformance/es6/templates/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/compiler/commonSourceDir3.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/fourslash/formattingNestedScopes.ts","time":38,"edits":1,"cost":"4.22"},{"name":"tests/cases/fourslash/completionsTriggerCharacter.ts","time":303,"edits":8,"cost":"4.22"},{"name":"tests/cases/fourslash/findAllRefsClassExpression1.ts","time":151,"edits":4,"cost":"4.21"},{"name":"tests/cases/fourslash/findAllRefs_importType_exportEquals.ts","time":264,"edits":7,"cost":"4.21"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax12.ts","time":150,"edits":4,"cost":"4.21"},{"name":"tests/cases/conformance/jsx/tsxSpreadAttributesResolution13.tsx","time":75,"edits":2,"cost":"4.21"},{"name":"tests/cases/conformance/jsx/checkJsxChildrenProperty12.tsx","time":75,"edits":2,"cost":"4.21"},{"name":"tests/cases/compiler/noCrashOnImportShadowing.ts","time":75,"edits":2,"cost":"4.21"},{"name":"tests/cases/compiler/typeParameterExtendsPrimitive.ts","time":75,"edits":2,"cost":"4.21"},{"name":"tests/cases/fourslash/codeFixUndeclaredMethodFunctionArgs.ts","time":187,"edits":5,"cost":"4.20"},{"name":"tests/cases/conformance/types/conditional/inferTypes1.ts","time":411,"edits":11,"cost":"4.20"},{"name":"tests/cases/fourslash/completionListInUnclosedFunction12.ts","time":112,"edits":3,"cost":"4.20"},{"name":"tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts","time":111,"edits":3,"cost":"4.19"},{"name":"unittests:: tsserver:: completions","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/errorMessageOnIntersectionsWithDiscriminants01.ts","time":74,"edits":2,"cost":"4.19"},{"name":"tests/cases/conformance/types/rest/genericObjectRest.ts","time":74,"edits":2,"cost":"4.19"},{"name":"tests/cases/compiler/jsxFactoryQualifiedNameResolutionError.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/expressions/identifiers/scopeResolutionIdentifiers.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/fourslash/getJavaScriptSyntacticDiagnostics8.ts","time":111,"edits":3,"cost":"4.19"},{"name":"tests/cases/fourslash/findAllRefsForModuleGlobal.ts","time":185,"edits":5,"cost":"4.19"},{"name":"tests/cases/fourslash/codeFixForgottenThisPropertyAccess_static.ts","time":111,"edits":3,"cost":"4.19"},{"name":"tests/cases/compiler/propertyOverridingPrototype.ts","time":74,"edits":2,"cost":"4.19"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution4_classic.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/nestedRedeclarationInES6AMD.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/inheritanceStaticFuncOverridingAccessor.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames9_ES6.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/aliasUsageInFunctionExpression.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/functionOverloads37.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/callOverloads2.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/fourslash/convertFunctionToEs6Class_exportModifier2.ts","time":111,"edits":3,"cost":"4.19"},{"name":"tests/cases/compiler/letShadowedByNameInNestedScope.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/reExportUndefined2.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArgumentLists/parserErrorRecovery_ArgumentList7.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/unusedVariablesinForLoop4.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES5.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/fourslash/completionsImport_reExportDefault.ts","time":148,"edits":4,"cost":"4.19"},{"name":"tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/parser/ecmascript5/FunctionDeclarations/parserFunctionDeclaration2.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/optionalParamTypeComparison.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/types/tuple/strictTupleLength.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserMemberAccessOffOfGenericType1.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/unusedParameterUsedInTypeOf.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration10.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern9.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/selfRef.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/externalModules/nameWithRelativePaths.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates17_ES6.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/targetTypeTest2.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/unusedParameterProperty2.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/noCollisionThisExpressionAndLocalVarInConstructor.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/classes/classExpressions/classExpression2.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/systemModule16.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/recursiveTypes1.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/typeOfOnTypeArg.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType6_ES6.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames37_ES5.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/taggedTemplatesWithIncompleteTemplateExpressions2.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/discriminantsAndTypePredicates.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/types/contextualTypes/logicalAnd/contextuallyTypeLogicalAnd01.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/collisionArgumentsInType.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/classes/classExpressions/classExpression1.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/errorMessageOnObjectLiteralType.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/excessPropertyCheckWithSpread.ts","time":74,"edits":2,"cost":"4.19"},{"name":"tests/cases/compiler/optionalParamterAndVariableDeclaration.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/interfacedeclWithIndexerErrors.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfFunctionTypes2.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/interfaceOnly.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/promiseIdentityWithAny.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers4.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/functionOverloads.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/controlFlow/controlFlowInstanceofExtendsFunction.ts","time":74,"edits":2,"cost":"4.19"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck18.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/superWithGenericSpecialization.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/errorHandlingInInstanceOf.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/assignToModule.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode2.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens2.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/references/library-reference-5.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES5.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/autoAsiForStaticsInClassDeclaration.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/superCallAssignResult.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/externalModules/exportNonInitializedVariablesAMD.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/missingTypeArguments2.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression3_es6.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/typeofSimple.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithSpecializedCallAndConstructSignatures.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/metadataOfUnionWithNull.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/destructuringWithGenericParameter.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/jsx/tsxErrorRecovery3.tsx","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/moduleAndInterfaceSharingName3.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractClinterfaceAssignability.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/recursiveTupleTypes1.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/genericAndNonGenericOverload1.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/constructorOverloads2.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/awaitExpressionInnerCommentEmit.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/spreadIntersection.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/staticGetter1.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/exportAssignedNamespaceIsVisibleInDeclarationEmit.ts","time":74,"edits":2,"cost":"4.19"},{"name":"tests/cases/compiler/genericTypeAssertions5.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/objectLiteralIndexerNoImplicitAny.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/moduleResolution/untypedModuleImport_withAugmentation.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/duplicatePackage_subModule.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/promiseTest.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions07_ES6.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/parser/ecmascript5/SuperExpressions/parserSuperExpression4.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/superCallOutsideConstructor.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/variableDeclarator1.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/requireOfJsonFileWithEmptyObject.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/prefixUnaryOperatorsOnExportedVariables.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/modFunctionCrash.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/unusedImports1.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/augmentedTypesModules4.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/decorators/class/decoratorOnClass8.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/nestedLoopTypeGuards.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/genericArray0.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/duplicateLocalVariable3.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression4_es5.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/genericTypeWithMultipleBases2.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/requireAsFunctionInExternalModule.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/fourslash/smartIndentTemplateLiterals.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceComputedPropertyNameWellKnownSymbols.ts","time":74,"edits":2,"cost":"4.19"},{"name":"tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration4_es6.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/rectype.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution1_classic.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty9.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/enums/enumConstantMembers.ts","time":74,"edits":2,"cost":"4.19"},{"name":"tests/cases/compiler/checkJsFiles_noErrorLocation.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/expressions/commaOperator/commaOperatorWithoutOperand.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES6.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/mutuallyRecursiveGenericBaseTypes2.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution1_node.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/collisionSuperAndLocalFunctionInProperty.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/castOfYield.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/es6/destructuring/iterableArrayPattern2.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/es6/modules/exportsAndImports4.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/fourslash/navigationBarItemsBindingPatterns.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration2.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/classes/members/accessibility/protectedStaticClassPropertyAccessibleWithinSubclass2.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor5.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/parser/ecmascript5/parserOverloadOnConstants1.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/callOnInstance.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/switchFallThroughs.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target11.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/typeCheckReturnExpression.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/exportStarForValues2.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/scanner/ecmascript5/scannerUnicodeEscapeInKeyword1.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/parser/ecmascript5/parserNoASIOnCallAfterFunctionExpression1.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration4.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/genericPrototypeProperty2.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck44.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/numberAssignableToEnum.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/exportStarForValues.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/arrayAssignmentTest4.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/interfaceDeclaration6.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/parseShortform.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/parser/ecmascript5/parserS7.9_A5.7_T1.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/es6/decorators/class/decoratorOnClass1.es6.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/emitSuperCallBeforeEmitParameterPropertyDeclaration1ES6.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/parser/ecmascript5/MethodSignatures/parserMethodSignature12.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorOverloads5.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/callConstructAssignment.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/ambientStatement1.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/recursiveTypeParameterReferenceError2.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/es6ModuleInternalNamedImports.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess1.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/nonMergedDeclarationsAndOverloads.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/blockScopedFunctionDeclarationStrictES6.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/reorderProperties.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorOverloadsWithOptionalParameters.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES5.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck5.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/compiler/conditionalExpressionNewLine9.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration26.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeAssertionOnAdditionES6.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGreaterThanTokenAmbiguity4.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings16_ES5.ts","time":37,"edits":1,"cost":"4.19"},{"name":"tests/cases/fourslash/annotateWithTypeFromJSDoc20.ts","time":184,"edits":5,"cost":"4.19"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_import_multipleUniqueIdentifiers.ts","time":147,"edits":4,"cost":"4.19"},{"name":"tests/cases/fourslash/completionsPaths_pathMapping_parentDirectory.ts","time":147,"edits":4,"cost":"4.19"},{"name":"tests/cases/fourslash/codeFixClassExtendAbstractProperty.ts","time":110,"edits":3,"cost":"4.18"},{"name":"tests/cases/fourslash/importNameCodeFixNewImportFile5.ts","time":110,"edits":3,"cost":"4.18"},{"name":"tests/cases/fourslash/codeFixForgottenThisPropertyAccess04.ts","time":110,"edits":3,"cost":"4.18"},{"name":"tests/cases/fourslash/moveToNewFile_defaultImport.ts","time":110,"edits":3,"cost":"4.18"},{"name":"tests/cases/fourslash/codeFixAddMissingMember3.ts","time":220,"edits":6,"cost":"4.18"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of37.ts","time":73,"edits":2,"cost":"4.18"},{"name":"tests/cases/fourslash/annotateWithTypeFromJSDoc5.ts","time":146,"edits":4,"cost":"4.18"},{"name":"tests/cases/fourslash/completionInJsDoc.ts","time":146,"edits":4,"cost":"4.18"},{"name":"tests/cases/fourslash/commentsEnums.ts","time":146,"edits":4,"cost":"4.18"},{"name":"tests/cases/conformance/jsdoc/callbackTag2.ts","time":73,"edits":2,"cost":"4.18"},{"name":"tests/cases/compiler/jsExpandoObjectDefineProperty.ts","time":73,"edits":2,"cost":"4.18"},{"name":"tests/cases/conformance/jsx/checkJsxChildrenProperty1.tsx","time":73,"edits":2,"cost":"4.18"},{"name":"tests/cases/fourslash/annotateWithTypeFromJSDoc16.ts","time":219,"edits":6,"cost":"4.18"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_export_object.ts","time":182,"edits":5,"cost":"4.18"},{"name":"tests/cases/fourslash/unusedVariableInForLoop5FSAddUnderscore.ts","time":109,"edits":3,"cost":"4.17"},{"name":"tests/cases/fourslash/completionAfterBrace.ts","time":109,"edits":3,"cost":"4.17"},{"name":"tests/cases/fourslash/getJavaScriptSyntacticDiagnostics19.ts","time":109,"edits":3,"cost":"4.17"},{"name":"tests/cases/fourslash/getJavaScriptSyntacticDiagnostics7.ts","time":109,"edits":3,"cost":"4.17"},{"name":"tests/cases/fourslash/codeCompletionEscaping.ts","time":109,"edits":3,"cost":"4.17"},{"name":"tests/cases/fourslash/codeFixCannotFindModule_all.ts","time":145,"edits":4,"cost":"4.17"},{"name":"tests/cases/fourslash/getOccurrencesIsDefinitionOfComputedProperty.ts","time":181,"edits":5,"cost":"4.17"},{"name":"tests/cases/compiler/optionsTsBuildInfoFileWithoutIncrementalAndComposite.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/outModuleConcatCommonjsDeclarationOnly.ts","time":72,"edits":2,"cost":"4.16"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatIndirectlyInheritsFromItself.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/parser/ecmascript5/Types/parserTypeQuery5.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty42.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/exportAssignedTypeAsTypeAnnotation.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments3.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/fourslash/completionForStringLiteralExport.ts","time":108,"edits":3,"cost":"4.16"},{"name":"tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList8.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es6/moduleExportsAmd/decoratedDefaultExportsGetExportedAmd.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/salsa/varRequireFromTypescript.ts","time":72,"edits":2,"cost":"4.16"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/conditionalExpressions2.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es6/decorators/class/accessor/decoratorOnClassAccessor1.es6.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of29.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/parser/ecmascript5/PropertyAssignments/parserFunctionPropertyAssignment1.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/fourslash/getOccurrencesAsyncAwait3.ts","time":72,"edits":2,"cost":"4.16"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPattern.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithEnumUnion.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/cyclicTypeInstantiation.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions2.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement5.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/isolatedModulesNonAmbientConstEnum.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es6/yieldExpressions/YieldStarExpression1_es6.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of51.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/functionOverloads31.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of4.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es6/yieldExpressions/YieldExpression4_es6.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/fourslash/jsdocParameterNameCompletion.ts","time":72,"edits":2,"cost":"4.16"},{"name":"tests/cases/compiler/unusedImports2.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/collisionSuperAndPropertyNameAsConstuctorParameter.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/functionWithNoBestCommonType2.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/propertyAccess7.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es6/templates/templateStringInFunctionExpressionES6.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionES5System.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/genericInheritedDefaultConstructors.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty22.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/staticInstanceResolution5.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/moduleUnassignedVariable.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardInClass.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/incompatibleGenericTypes.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/switchStatementsWithMultipleDefaults.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/classImplementsClass3.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/es5ExportDefaultExpression.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/declarationEmitClassPrivateConstructor.ts","time":72,"edits":2,"cost":"4.16"},{"name":"tests/cases/compiler/nodeResolution5.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/noImplicitAnyMissingGetAccessor.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/genericDerivedTypeWithSpecializedBase2.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/cachedModuleResolution1.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/checkJsFiles.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserEqualsGreaterThanAfterFunction1.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/redefineArray.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/infinitelyExpandingOverloads.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction4_es6.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/VariableLists/parserVariableStatement3.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType1_ES6.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/exportToString.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/es5ExportDefaultFunctionDeclaration2.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/implicitAnyDeclareMemberWithoutType2.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArgumentLists/parserErrorRecovery_ArgumentList3.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/missingPropertiesOfClassExpression.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/undefinedTypeAssignment3.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/argsInScope.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/prototypeInstantiatedWithBaseConstraint.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/implicitAnyAmbients.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/assignmentCompatability38.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/jsx/tsxDynamicTagName9.tsx","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/jsdoc/jsdocAugments_noExtends.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments02.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/numericMethodName1.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithPropertyAssignmentInES6.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es6/modules/exportsAndImportsWithUnderscores1.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunctionCapturesThis_es2017.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/slashBeforeVariableDeclaration1.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ClassElements/parserErrorRecovery_ClassElement2.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/typeParameterExplicitlyExtendsAny.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/undeclaredVarEmit.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/typeParameterArgumentEquivalence5.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/superCallFromFunction1.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of21.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/unusedTypeParameterInMethod2.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/quotedPropertyName2.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/sourceMapValidationDo.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/genericCallSpecializedToTypeArg.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/recursiveExportAssignmentAndFindAliasedType5.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/enumBasics1.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/unusedParametersInLambda1.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/optionsSourcemapInlineSourcesSourceRoot.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/parser/ecmascript5/Types/parserTypeQuery3.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint4.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/superCallInsideClassExpression.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction3_es2017.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/commentOnInterface1.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/cloduleWithDuplicateMember1.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck50.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/moduleElementsInWrongContext.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/detachedCommentAtStartOfConstructor1.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/externalModules/relativePathToDeclarationFile.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/ambientRequireFunction.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/assignToEnum.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/forIn2.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/internalModules/exportDeclarations/ExportModuleWithAccessibleTypesOnItsExportedMembers.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/es6ImportDefaultBindingMergeErrors.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es2017/useObjectValuesAndEntries3.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/types/tuple/tupleElementTypes1.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/mergedModuleDeclarationCodeGen3.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/genericRecursiveImplicitConstructorErrors1.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/jsxFactoryIdentifierAsParameter.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/jsx/tsxElementResolution3.tsx","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedInstanceOfES6.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/contextuallyTypingOrOperator2.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/augmentedTypesEnum2.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es6/classDeclaration/classWithSemicolonClassElementES62.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/typeParametersShouldNotBeEqual.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor4.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/interfaceDeclaration1.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/async/es2017/await_unaryExpression_es2017_2.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/excessPropertyErrorsSuppressed.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList7.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/specializedInheritedConstructors1.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration3_es2017.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/doNotWidenAtObjectLiteralPropertyAssignment.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/duplicateIdentifierRelatedSpans7.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/controlFlowDestructuringParameters.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution2_classic.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum7.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/LeftShifts/parserErrorRecovery_LeftShift1.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/implementPublicPropertyAsPrivate.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrayLiteralExpressions/parserErrorRecoveryArrayLiteralExpression3.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/parser/ecmascript5/Accessors/parserAccessors6.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/emitCapturingThisInTupleDestructuring2.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/types/any/anyAsConstructor.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclarationIndexSignature1.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames1_ES6.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessor1.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck39.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/switchStatementsWithMultipleDefaults1.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList1.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithPropertyAccessInHeritageClause1.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames2.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/genericMergedDeclarationUsingTypeParameter.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/jsx/tsxElementResolution18.tsx","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/contextualSignatureInstantiationWithTypeParameterConstrainedToOuterTypeParameter.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclaration4.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesSourceMap2_ES5.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/types/specifyingTypes/typeQueries/typeofModuleWithoutExports.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/specializedOverloadWithRestParameters.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/letDeclarations-invalidContexts.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/jsxFactoryQualifiedNameWithEs5.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/constructorStaticParamNameErrors.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/invalidStaticField.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions10_ES6.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES2015Target.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/noImplicitAnyForMethodParameters.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/sourceMapValidationVariables.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration13.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/breakNotInIterationOrSwitchStatement2.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es6/templates/templateStringInInOperator.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolIndexer2.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES5.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration13_es5.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/anyPlusAny1.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/ambientClassOverloadForFunction.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/compiler/unusedNamespaceInNamespace.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/fourslash/formattingNonNullAssertionOperator.ts","time":36,"edits":1,"cost":"4.16"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_export_moduleDotExportsEqualsRequire.ts","time":143,"edits":4,"cost":"4.16"},{"name":"tests/cases/fourslash/extract-method21.ts","time":107,"edits":3,"cost":"4.16"},{"name":"tests/cases/fourslash/completionForStringLiteralNonrelativeImport8.ts","time":214,"edits":6,"cost":"4.16"},{"name":"tests/cases/conformance/jsx/tsxFragmentReactEmit.tsx","time":107,"edits":3,"cost":"4.16"},{"name":"tests/cases/fourslash/jsxQualifiedTagCompletion.ts","time":107,"edits":3,"cost":"4.16"},{"name":"tests/cases/fourslash/completionListInvalidMemberNames_escapeQuote.ts","time":107,"edits":3,"cost":"4.16"},{"name":"tests/cases/fourslash/codeFixCannotFindModule_suggestion_js.ts","time":107,"edits":3,"cost":"4.16"},{"name":"tests/cases/compiler/noUnusedLocals_writeOnly.ts","time":107,"edits":3,"cost":"4.16"},{"name":"tests/cases/compiler/nearbyIdenticalGenericLambdasAssignable.ts","time":71,"edits":2,"cost":"4.15"},{"name":"tests/cases/conformance/constEnums/constEnum4.ts","time":71,"edits":2,"cost":"4.15"},{"name":"tests/cases/conformance/async/es6/asyncAwait_es6.ts","time":71,"edits":2,"cost":"4.15"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot_differentRootTypes.ts","time":71,"edits":2,"cost":"4.15"},{"name":"tests/cases/conformance/enums/enumConstantMemberWithStringEmitDeclaration.ts","time":71,"edits":2,"cost":"4.15"},{"name":"tests/cases/compiler/noUnusedLocals_typeParameterMergedWithParameter.ts","time":71,"edits":2,"cost":"4.15"},{"name":"tests/cases/compiler/fillInMissingTypeArgsOnJSConstructCalls.ts","time":71,"edits":2,"cost":"4.15"},{"name":"tests/cases/fourslash/importNameCodeFixUMDGlobalReact0.ts","time":177,"edits":5,"cost":"4.15"},{"name":"tests/cases/fourslash/convertFunctionToEs6Class_objectLiteralInArrowFunction.ts","time":106,"edits":3,"cost":"4.15"},{"name":"tests/cases/fourslash/completionsOptionalKindModifier.ts","time":106,"edits":3,"cost":"4.15"},{"name":"tests/cases/fourslash/codeFixClassPropertyInitialization_all_3.ts","time":141,"edits":4,"cost":"4.14"},{"name":"tests/cases/fourslash/completionsImport_compilerOptionsModule.ts","time":176,"edits":5,"cost":"4.14"},{"name":"tests/cases/fourslash/outliningSpansForFunction.ts","time":70,"edits":2,"cost":"4.14"},{"name":"tests/cases/compiler/mappedTypePartialNonHomomorphicBaseConstraint.ts","time":70,"edits":2,"cost":"4.14"},{"name":"tests/cases/compiler/indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts","time":35,"edits":1,"cost":"4.14"},{"name":"unittests:: tsserver:: cancellationToken","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/typings/typingsSuggestion1.ts","time":70,"edits":2,"cost":"4.14"},{"name":"tests/cases/compiler/extractInferenceImprovement.ts","time":70,"edits":2,"cost":"4.14"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/es3-declaration-amd.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/fourslash/completionForQuotedPropertyInPropertyAssignment4.ts","time":70,"edits":2,"cost":"4.14"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/strictPropertyInitialization.ts","time":105,"edits":3,"cost":"4.14"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16_ES6.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression4_es6.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/Symbols/symbolType5.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames33_ES5.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/newMissingIdentifier.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/propertyParameterWithQuestionMark.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/references/library-reference-7.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/nestedBlockScopedBindings8.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/objectLiteralWithSemicolons1.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/ambientExternalModuleReopen.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/genericImplements.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_import_multipleVariableDeclarations.ts","time":140,"edits":4,"cost":"4.14"},{"name":"tests/cases/compiler/invalidThisEmitInContextualObjectLiteral.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentError.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/inheritanceMemberPropertyOverridingProperty.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/asiReturn.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames47_ES6.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings13_ES6.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/references/library-reference-11.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/amdDependencyCommentName4.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target10.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/importAliasFromNamespace.ts","time":70,"edits":2,"cost":"4.14"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser630933.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/enumWithNegativeInfinityProperty.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax15.ts","time":140,"edits":4,"cost":"4.14"},{"name":"tests/cases/conformance/decorators/class/decoratorChecksFunctionBodies.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/classes/constructorDeclarations/classConstructorOverloadsAccessibility.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/contextualTypingOfLambdaReturnExpression.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/expressions/asOperator/asOperatorASI.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/noImplicitReturnsWithoutReturnExpression.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/functionOverloads19.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedObjectLiteral.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/parser/ecmascript5/SuperExpressions/parserSuperExpression3.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/ParameterList8.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck8.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/defaultParameters/emitDefaultParametersMethodES6.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty49.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/constDeclarations-ambient.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleStringIndexers.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/visSyntax.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration5_es6.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/templates/templateStringInPropertyAssignmentES6.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/accessStaticMemberFromInstanceMethod01.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/blockScopedSameNameFunctionDeclarationES5.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/decorators/invalid/decoratorOnArrowFunction.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/unusedClassesinNamespace1.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/collisionThisExpressionAndVarInGlobal.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/bind1.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/superWithTypeArgument2.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/externalModules/reexportClassDefinition.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty20.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/parser/ecmascript6/ShorthandPropertyAssignment/parserShorthandPropertyAssignment3.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/genericTypeWithCallableMembers.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/missingReturnStatement.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/relationalOperatorComparable.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration13_es6.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/parser/ecmascript5/VariableDeclarations/parserVariableDeclaration10.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/compilerOptionsOutDirAndNoEmit.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/accessorParameterAccessibilityModifier.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/classes/constructorDeclarations/constructorParameters/readonlyInAmbientClass.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/systemModule10.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/constDeclarations-useBeforeDefinition2.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/types/tuple/wideningTuples5.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/unusedPrivateMethodInClass2.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/typeParametersInStaticAccessors.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parserNotHexLiteral1.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/nestedFreshLiteral.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/jsx/tsxElementResolution8.tsx","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES5.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/classDeclaration/exportDefaultClassWithStaticPropertyAssignmentsInES6.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/switchComparableCompatForBrands.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueLabel.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression2.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer3.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/baseTypePrivateMemberClash.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/emptyFile-declaration.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/isolatedModulesDeclaration.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/unusedTypeParameterInLambda2.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/moduleCodeGenTest5.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/import_reference-exported-alias.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution6_node.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions16_ES6.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing5.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/restParameters.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/exportAssignmentOfGenericType1.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates19_ES6.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfFunctionTypes.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/switchCaseCircularRefeference.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/prespecializedGenericMembers1.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/conflictingTypeAnnotatedVar.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/typeofUsedBeforeBlockScoped.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/emitBundleWithShebangAndPrologueDirectives2.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/inheritanceMemberPropertyOverridingAccessor.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/es6ExportAssignment4.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/infinitelyExpandingBaseTypes2.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/classExtendsClauseClassNotReferringConstructor.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/exportStarForValues6.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/es3-jsx-preserve.tsx","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/Symbols/ES5SymbolProperty5.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames34_ES5.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/functionCall12.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/internalModules/exportDeclarations/ExportClassWhichExtendsInterfaceWithInaccessibleType.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement17.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName35.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/ambientClassDeclaredBeforeBase.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/initializersInAmbientEnums.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/exportAssignmentInternalModule.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeOfOperator.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/indexClassByNumber.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/augmentedTypesClass3.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/genericCallWithFixedArguments.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/decorators/class/property/decoratorOnClassProperty3.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/innerAliases2.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/parser/ecmascript5/Expressions/parserConditionalExpression1.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration1.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/out-flag2.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/templates/templateStringInDivision.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/classes/classDeclarations/classWithSemicolonClassElement1.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/fatarrowfunctionsInFunctions.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames37_ES6.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/unusedVariablesinForLoop3.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/instantiatedBaseTypeConstraints.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/decorators/class/constructor/decoratorOnClassConstructor3.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement11.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames24_ES5.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/classSideInheritance2.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/classes/constructorDeclarations/classWithTwoConstructorDefinitions.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/types/typeAliases/typeAliasesForObjectTypes.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration9.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/typeOfThisInStatics.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/unusedLocalsAndParametersTypeAliases.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty51.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/ambient/ambientErrors.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/fileWithNextLine3.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/thisExpressionInIndexExpression.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/privateAccessInSubclass1.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/importInTypePosition.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates18_ES6.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClass2.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/assignmentToObject.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/expressions/asOperator/asOperator2.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target7.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/internalModules/exportDeclarations/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/externalModules/umd6.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/trailingCommasES3.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/indexerReturningTypeParameter1.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/assignmentCompatability6.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/continueNotInIterationStatement3.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/classExpressions/classExpressionES62.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/fourslash/duplicateClassModuleError0.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration8.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/fourslash/indentationWithBaseIndent.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/allowSyntheticDefaultImports10.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/asyncFunctionNoReturnType.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionNestedCJS2.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/constructorOverloads5.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/numericIndexerTyping2.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement6.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/parseCommaSeparatedNewlineNew.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/decorators/class/decoratorOnClass9.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesA.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration6_es2017.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/derivedTypeCallingBaseImplWithOptionalParams.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/superCallInsideClassDeclaration.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/functionOverloadImplementationOfWrongName2.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/variableDeclarations/VariableDeclaration12_es6.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/recursiveBaseConstructorCreation1.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName16.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserErrantAccessibilityModifierInModule1.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames46_ES5.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/conditionalExpressionNewLine7.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/dontShowCompilerGeneratedMembers.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/namedFunctionExpressionCallErrors.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/unusedMultipleParameter2InFunctionExpression.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/jsFileCompilationShortHandProperty.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/ambientModules.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/jsdoc/jsdocAugments_qualifiedName.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/generatorES6_1.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/collisionSuperAndParameter1.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/decorators/class/constructableDecoratorOnClass01.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/Symbols/ES5SymbolProperty3.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/fourslash/formattingTemplatesWithNewline.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/decoratorInJsFile.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/parser/ecmascript5/parserVoidExpression1.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/doWhileUnreachableCode.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/compiler/indexSignatureWithoutTypeAnnotation1..ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target4.ts","time":35,"edits":1,"cost":"4.14"},{"name":"tests/cases/fourslash/quickInfoImportedTypesWithMergedMeanings.ts","time":139,"edits":4,"cost":"4.13"},{"name":"tests/cases/fourslash/completionForStringLiteral7.ts","time":104,"edits":3,"cost":"4.13"},{"name":"tests/cases/fourslash/completionListInUnclosedFunction11.ts","time":104,"edits":3,"cost":"4.13"},{"name":"tests/cases/fourslash/codeFixInferFromUsageMemberJS.ts","time":173,"edits":5,"cost":"4.13"},{"name":"tests/cases/fourslash/extract-method13.ts","time":242,"edits":7,"cost":"4.12"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_import_arrayBindingPattern.ts","time":138,"edits":4,"cost":"4.12"},{"name":"tests/cases/fourslash/completionsImport_named_exportEqualsNamespace_merged.ts","time":138,"edits":4,"cost":"4.12"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_import_includeDefaultUses.ts","time":138,"edits":4,"cost":"4.12"},{"name":"tests/cases/fourslash/codeFixChangeExtendsToImplementsAbstractModifier.ts","time":138,"edits":4,"cost":"4.12"},{"name":"tests/cases/compiler/keyofDoesntContainSymbols.ts","time":69,"edits":2,"cost":"4.12"},{"name":"tests/cases/fourslash/codeFixClassExtendAbstractGetterSetter.ts","time":172,"edits":5,"cost":"4.12"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceInheritsAbstractMethod.ts","time":103,"edits":3,"cost":"4.12"},{"name":"tests/cases/fourslash/getJavaScriptSyntacticDiagnostics11.ts","time":103,"edits":3,"cost":"4.12"},{"name":"tests/cases/fourslash/completionForQuotedPropertyInPropertyAssignment2.ts","time":103,"edits":3,"cost":"4.12"},{"name":"tests/cases/conformance/emitter/es2017/forAwait/emitter.forAwait.es2017.ts","time":103,"edits":3,"cost":"4.12"},{"name":"tests/cases/fourslash/completionListInUnclosedFunction05.ts","time":103,"edits":3,"cost":"4.12"},{"name":"tests/cases/compiler/exportDefaultWithJSDoc1.ts","time":68,"edits":2,"cost":"4.11"},{"name":"tests/cases/compiler/es6ImportEqualsExportModuleEs2015Error.ts","time":68,"edits":2,"cost":"4.11"},{"name":"tests/cases/conformance/types/contextualTypes/asyncFunctions/contextuallyTypeAsyncFunctionReturnType.ts","time":68,"edits":2,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript5/MethodSignatures/parserMethodSignature7.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/amdDeclarationEmitNoExtraDeclare.ts","time":68,"edits":2,"cost":"4.11"},{"name":"tests/cases/compiler/reactNamespaceJSXEmit.tsx","time":68,"edits":2,"cost":"4.11"},{"name":"tests/cases/compiler/declarationEmitRetainsJsdocyComments.ts","time":68,"edits":2,"cost":"4.11"},{"name":"tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration2_es6.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType3_ES6.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/requireOfJsonFileWithoutExtensionResolvesToTs.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/templates/templateStringInTypeOfES6.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/es6ImportNameSpaceImportWithExport.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/sourceMapValidationClassWithDefaultConstructor.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/withStatementNestedScope.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of52.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax23.ts","time":136,"edits":4,"cost":"4.11"},{"name":"tests/cases/compiler/selfReferencingSpreadInLoop.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES6.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck5.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames40_ES5.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/systemModuleTrailingComments.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/contextualTyping26.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference2.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/declarationFileOverwriteErrorWithOut.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/contextualTypingWithGenericSignature.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/scanner/ecmascript5/scannerNumericLiteral4.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/variableDeclarations/VariableDeclaration10_es6.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/innerTypeCheckOfLambdaArgument.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/mergedModuleDeclarationCodeGen.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/expressions/elementAccess/letIdentifierInElementAccess01.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/inheritanceStaticAccessorOverridingProperty.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement18.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck1.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithLHSIsObject.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript5/Types/parserTypeQuery9.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType6_ES5.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/noImplicitAnyAndPrivateMembersWithoutTypeAnnotations.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueNotInIterationStatement4.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/modules/defaultExportsCannotMerge03.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/instanceMemberInitialization.ts","time":68,"edits":2,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement3.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression1_es2017.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/assignToExistingClass.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/modules/exportsAndImportsWithUnderscores3.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration10.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/library_ObjectPrototypeProperties.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/declarationEmitUnnessesaryTypeReferenceNotAdded.ts","time":68,"edits":2,"cost":"4.11"},{"name":"tests/cases/compiler/functionCall13.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/types/members/typesWithPublicConstructor.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName33.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/ReturnStatements/parserReturnStatement1.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/errorMessagesIntersectionTypes04.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration7.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/moduleAssignmentCompat3.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/types/nonPrimitive/nonPrimitiveAsProperty.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/systemDefaultImportCallable.ts","time":68,"edits":2,"cost":"4.11"},{"name":"tests/cases/compiler/arraySlice.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/staticAndNonStaticPropertiesSameName.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/genericConstructorFunction1.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/baseTypeOrderChecking.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/project/noDefaultLib.json","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/noImplicitReturnsWithProtectedBlocks1.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/expandoFunctionContextualTypesJs.ts","time":68,"edits":2,"cost":"4.11"},{"name":"tests/cases/conformance/types/import/importTypeGeneric.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess2.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/fallbackToBindingPatternForTypeInference.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/letDeclarations-scopes2.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic4.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/doNotInferUnrelatedTypes.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/classImplementsClass2.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode6.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/classes/classExpressions/extendClassExpressionFromModule.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/undefinedSymbolReferencedInArrayLiteral1.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/thisInLambda.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/templates/templateStringInPropertyName2.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/templates/templateStringInInOperatorES6.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/declareExternalModuleWithExportAssignedFundule.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserWhileStatement1.d.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/types/typeParameters/typeParameterLists/typeParametersAvailableInNestedScope2.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/noImplicitReturnsInAsync2.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/functionOverloadAmbiguity1.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of12.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/classDeclarationBlockScoping2.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration1_es6.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment5.ts","time":68,"edits":2,"cost":"4.11"},{"name":"tests/cases/conformance/types/thisType/contextualThisType.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/functionCall3.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/functionOverloads29.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of35.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.octalNegative.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions19_ES6.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/templateStringsArrayTypeNotDefinedES5Mode.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings15_ES5.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/functionWithDefaultParameterWithNoStatements4.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/async/es2017/asyncUseStrict_es2017.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/gettersAndSettersAccessibility.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/decorators/class/decoratedClassExportsCommonJS2.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/exportStarForValues7.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/elementAccessExpressionInternalComments.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/assignmentCompatability1.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/genericFunctions3.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/alwaysStrictES6.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/expressions/contextualTyping/iterableContextualTyping1.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedAdditionES6.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/exportSpecifierReferencingOuterDeclaration4.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings18_ES6.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclaration3.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/genericFunctionTypedArgumentsAreFixed.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/elidingImportNames.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/types/typeParameters/typeArgumentLists/constraintSatisfactionWithAny2.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/noImplicitAnyInCastExpression.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/fourslash/functionIndentation.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/Blocks/parserErrorRecovery_Block3.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/noImplicitAnyInContextuallyTypesFunctionParamter.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of36.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/genericGetter3.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/templates/templateStringInObjectLiteral.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/moduleResolution/untypedModuleImport.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/systemModuleExportDefault.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/classExpressionTest2.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/checkJsFiles6.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/isolatedModulesImportExportElision.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/specializeVarArgs1.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/ambient/ambientDeclarationsPatterns_tooManyAsterisks.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions02.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInTypeContexts1.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/invalidBinaryIntegerLiteralAndOctalIntegerLiteral.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/unusedPrivateMethodInClass3.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/interfaceWithCommaSeparators.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/constEnumBadPropertyNames.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/FunctionDeclaration7.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/exportedBlockScopedDeclarations.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/templates/templateStringUnterminated4_ES6.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/bangInModuleName.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/duplicateConstructSignature2.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/constructorFunctionTypeIsAssignableToBaseType.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates06_ES6.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/pathsValidation2.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames24_ES6.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/commentsOnPropertyOfObjectLiteral1.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/arrowFunctionWithObjectLiteralBody4.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/systemModule2.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/assignmentToReferenceTypes.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/multiLinePropertyAccessAndArrowFunctionIndent1.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/fixTypeParameterInSignatureWithRestParameters.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/globalThisCapture.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/reverseInferenceInContextualInstantiation.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/objectLiteralMemberWithoutBlock1.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target6.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedDivisionES6.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/exportingContainingVisibleType.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/ClassDeclaration26.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/externalModules/exportAssignmentCircularModules.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode3-negative.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/templates/templateStringWithPropertyAccessES6.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/enumUsedBeforeDeclaration.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList3.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/interfaceWithMultipleDeclarations.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/funduleExportedClassIsUsedBeforeDeclaration.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of24.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName3.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/collisionExportsRequireAndAmbientFunction.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/callOverloads3.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/requireOfJsonFileNonRelativeWithoutExtension.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty11.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser618973.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/modulePrologueAMD.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/VariableLists/parserInvalidIdentifiersInVariableStatements1.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/destructuring/restElementWithAssignmentPattern5.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/types/contextualTypes/logicalAnd/contextuallyTypeLogicalAnd02.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/constructorParametersThatShadowExternalNamesInVariableDeclarations.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/thisWhenTypeCheckFails.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript5/AutomaticSemicolonInsertion/parserAutomaticSemicolonInsertion1.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/constraintPropagationThroughReturnTypes.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of15.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/unusedLocalsOnFunctionDeclarationWithinFunctionExpression2.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/enumFromExternalModule.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings15_ES6.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/async/es6/asyncAliasReturnType_es6.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript5/VariableDeclarations/parserVariableDeclaration9.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature3.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of56.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/controlFlow/controlFlowIteration.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/functionCall9.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/salsa/inferringClassMembersFromAssignments2.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/isolatedModulesES6.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/infinitelyExpandingTypes3.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedVariables.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/duplicateIdentifierDifferentModifiers.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/concatError.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/checkJsFiles5.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/reactNamespaceMissingDeclaration.tsx","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/noImplicitUseStrict_amd.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/genericArrayWithoutTypeAnnotation.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509669.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpression3.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/unusedModuleInModule.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/compiler/transformArrowInBlockScopedLoopVarInitializer.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration1_es5.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript5/Types/parserTypeQuery7.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/async/es5/asyncClass_es5.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/conformance/parser/ecmascript5/VariableDeclarations/parserVariableDeclaration11.ts","time":34,"edits":1,"cost":"4.11"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax11.ts","time":135,"edits":4,"cost":"4.10"},{"name":"tests/cases/fourslash/getEditsForFileRename_tsconfig.ts","time":135,"edits":4,"cost":"4.10"},{"name":"tests/cases/fourslash/regexDetection.ts","time":101,"edits":3,"cost":"4.10"},{"name":"tests/cases/fourslash/getJavaScriptSyntacticDiagnostics16.ts","time":101,"edits":3,"cost":"4.10"},{"name":"tests/cases/fourslash/codeFixCannotFindModule_notIfMissing.ts","time":101,"edits":3,"cost":"4.10"},{"name":"tests/cases/fourslash/quickInfoSpecialPropertyAssignment.ts","time":101,"edits":3,"cost":"4.10"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_import_objectBindingPattern_complex.ts","time":101,"edits":3,"cost":"4.10"},{"name":"tests/cases/conformance/es6/destructuring/destructuringAssignabilityCheck.ts","time":67,"edits":2,"cost":"4.09"},{"name":"tests/cases/compiler/commonJsIsolatedModules.ts","time":67,"edits":2,"cost":"4.09"},{"name":"tests/cases/compiler/declarationEmitNoNonRequiredParens.ts","time":67,"edits":2,"cost":"4.09"},{"name":"tests/cases/fourslash/findAllRefsForDefaultExport_reExport.ts","time":134,"edits":4,"cost":"4.09"},{"name":"tests/cases/compiler/deferredLookupTypeResolution.ts","time":67,"edits":2,"cost":"4.09"},{"name":"tests/cases/compiler/declarationEmitAmdModuleNameDirective.ts","time":67,"edits":2,"cost":"4.09"},{"name":"tests/cases/compiler/requireOfJsonFileWithModuleNodeResolutionEmitEs2015.ts","time":67,"edits":2,"cost":"4.09"},{"name":"tests/cases/conformance/types/contextualTypes/asyncFunctions/contextuallyTypeAsyncFunctionAwaitOperand.ts","time":67,"edits":2,"cost":"4.09"},{"name":"tests/cases/conformance/jsx/checkJsxIntersectionElementPropsType.tsx","time":67,"edits":2,"cost":"4.09"},{"name":"tests/cases/conformance/expressions/elementAccess/stringEnumInElementAccess01.ts","time":67,"edits":2,"cost":"4.09"},{"name":"tests/cases/conformance/types/contextualTypes/jsdoc/contextualTypeFromJSDoc.ts","time":67,"edits":2,"cost":"4.09"},{"name":"tests/cases/conformance/classes/members/accessibility/privateProtectedMembersAreNotAccessibleDestructuring.ts","time":67,"edits":2,"cost":"4.09"},{"name":"tests/cases/conformance/es6/yieldExpressions/yieldExpressionInControlFlow.ts","time":67,"edits":2,"cost":"4.09"},{"name":"tests/cases/fourslash/findAllRefsForComputedProperties2.ts","time":167,"edits":5,"cost":"4.09"},{"name":"tests/cases/fourslash/annotateWithTypeFromJSDoc9.ts","time":167,"edits":5,"cost":"4.09"},{"name":"tests/cases/fourslash/goToDefinitionDynamicImport2.ts","time":100,"edits":3,"cost":"4.09"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess6.ts","time":133,"edits":4,"cost":"4.09"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess18.ts","time":166,"edits":5,"cost":"4.08"},{"name":"tests/cases/compiler/identicalTypesNoDifferByCheckOrder.ts","time":66,"edits":2,"cost":"4.08"},{"name":"tests/cases/conformance/declarationEmit/exportDefaultNamespace.ts","time":66,"edits":2,"cost":"4.08"},{"name":"unittests:: semver","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/outModuleConcatUnspecifiedModuleKindDeclarationOnly.ts","time":66,"edits":2,"cost":"4.08"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedDivision.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/namedFunctionExpressionAssignedToClassProperty.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/higherOrderMappedIndexLookupInference.ts","time":66,"edits":2,"cost":"4.08"},{"name":"tests/cases/conformance/parser/ecmascript5/VariableDeclarations/parserVariableDeclaration3.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/widenToAny1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/sourceMapValidationWithComments.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList15.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/inlineSourceMap.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/reservedWords.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression3_es5.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment35.ts","time":66,"edits":2,"cost":"4.08"},{"name":"tests/cases/fourslash/quickInfoMappedType.ts","time":99,"edits":3,"cost":"4.08"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck61.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/exportDefaultStripsFreshness.ts","time":66,"edits":2,"cost":"4.08"},{"name":"tests/cases/compiler/collisionExportsRequireAndFunctionInGlobalFile.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/fourslash/completionListInUnclosedFunction19.ts","time":99,"edits":3,"cost":"4.08"},{"name":"tests/cases/conformance/parser/ecmascript5/MethodSignatures/parserMethodSignature3.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/enumWithQuotedElementName1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/objectSpreadWithinMethodWithinObjectWithSpread.ts","time":66,"edits":2,"cost":"4.08"},{"name":"tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature12.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/systemModule1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/fourslash/getJavaScriptSyntacticDiagnostics2.ts","time":99,"edits":3,"cost":"4.08"},{"name":"tests/cases/conformance/es6/destructuring/objectBindingPatternKeywordIdentifiers02.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/types/namedTypes/classWithOptionalParameter.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement2.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/parameterPropertyInConstructor1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates04_ES5.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty57.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/classes/constructorDeclarations/superCalls/superPropertyInConstructorBeforeSuperCall.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target2.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression2_es2017.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/collisionExportsRequireAndAmbientVar.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/anonterface.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/callOverloads4.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/autolift3.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of18.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/exportEqualsProperty2.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction4_es2017.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames39_ES5.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/classExpressionWithStaticProperties2.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/unusedClassesinNamespace2.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmptyLiteralPortions.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/templates/templateStringInTypeAssertion.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/noImplicitAnyMissingSetAccessor.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck56.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates07_ES5.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/externalModules/umd-errors.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/controlFlowOuterVariable.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/interfaceDeclaration5.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/templates/templateStringMultiline1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/classExpressions/typeArgumentInferenceWithClassExpression1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/references/library-reference-4.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGreaterThanTokenAmbiguity14.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck48.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/paramPropertiesInSignatures.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/exportedInterfaceInaccessibleInCallbackInModule.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/arrayConstructors1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/moduleExportsAmd/defaultExportsGetExportedAmd.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/requireOfJsonFileWithSourceMap.ts","time":66,"edits":2,"cost":"4.08"},{"name":"tests/cases/compiler/multiExtendsSplitInterfaces2.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/constructorArgsErrors2.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/exportsInAmbientModules1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/unusedSingleParameterInContructor.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/noTypeArgumentOnReturnType1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/taggedTemplatesWithIncompleteTemplateExpressions4.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/modifiersInObjectLiterals.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration12_es2017.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/literals1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/objectLiteralWithSemicolons3.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/recursiveTypeIdentity.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/destructuring/nonIterableRestElement1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/objectLiteralMemberWithModifiers2.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/infinitelyGenerativeInheritance1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/overloadCallTest.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/genericInterfaceFunctionTypeParameter.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/yieldExpressionInnerCommentEmit.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/memberAccessMustUseModuleInstances.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/badInferenceLowerPriorityThanGoodInference.ts","time":99,"edits":3,"cost":"4.08"},{"name":"tests/cases/compiler/typeArgumentInferenceApparentType1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/exportStarForValues3.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/duplicateVarAndImport2.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/statements/breakStatements/doWhileBreakStatements.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/objectCreationExpressionInFunctionParameter.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithCallSignaturesThatHidesBaseSignature2.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesWithModule.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of9.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings19_ES5.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/indexIntoArraySubclass.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/externalModules/multipleExportDefault6.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty8.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/errorOnContextuallyTypedReturnType.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/parser/ecmascript5/parserS7.6.1.1_A1.10.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser553699.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/voidFunctionAssignmentCompat.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractImportInstantiation.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/indexSignatureWithInitializer.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/missingSelf.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/expressions/contextualTyping/superCallParameterContextualTyping2.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionShouldNotGetParen.ts","time":66,"edits":2,"cost":"4.08"},{"name":"tests/cases/compiler/commentOnArrayElement2.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration11_es2017.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingWithExport.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/anonymousModules.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/declarationFilesGeneratingTypeReferences.ts","time":66,"edits":2,"cost":"4.08"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings20_ES6.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es5.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/types/specifyingTypes/typeLiterals/unionTypeLiterals.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/catch.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/jsFileCompilationExternalPackageError.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithOptionalProperties.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/constructorOverloads4.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/classExtensionNameOutput.ts","time":66,"edits":2,"cost":"4.08"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithCallSignaturesThatHidesBaseSignature.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/emitPinnedCommentsOnTopOfFile.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/commentLeadingCloseBrace.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/functionCall5.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/contextualTypeArrayReturnType.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/references/library-reference-2.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/exportDeclarationWithModuleSpecifierNameOnNextLine1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/arrowFunctionInExpressionStatement1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/extendsUntypedModule.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings22_ES5.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty45.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/importDeclWithClassModifiers.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/externalModuleReferenceDoubleUnderscore1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/parser/ecmascript5/Expressions/parserPostfixPostfixExpression1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/moduleClassArrayCodeGenTest.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/fourslash/breakpointValidationBreakOrContinue.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/typeArgumentInferenceApparentType2.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/templates/templateStringMultiline2_ES6.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/moduleExportsUmd/defaultExportsGetExportedUmd.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of53.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty7.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/requireOfJsonFileWithModuleNodeResolutionEmitNone.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionsAsIsES6.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/reuseInnerModuleMember.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/namespaces2.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserMissingLambdaOpenBrace1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration18.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature4.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/es3-sourcemap-amd.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/fourslash/shims-pp/getBreakpointStatementAtPosition.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/inferenceFromParameterlessLambda.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/conditionallyDuplicateOverloadsCausedByOverloadResolution.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserErrantEqualsGreaterThanAfterFunction1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/restParameters/emitRestParametersFunctionES6.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithMultipleBases4.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/undefinedTypeArgument2.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/exportAssignValueAndType.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorsAreNotContextuallyTyped.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/callSignatureFunctionOverload.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/exportAssignmentWithExportModifier.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/expressions/functionCalls/functionCalls.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/typeParameterConstraints1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserMemberAccessExpression1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/argumentsUsedInObjectLiteralProperty.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/fourslash/arrayConcatTypeCheck1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/instantiateCrossFileMerge.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/generatorES6_5.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/templates/templateStringInPropertyNameES6_1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/jsdoc/jsdocAugments_notAClass.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/requiredInitializedParameter1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/unusedLocalsOnFunctionDeclarationWithinFunctionDeclaration1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/inheritanceOfGenericConstructorMethod1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/parenthesizedAsyncArrowFunction.ts","time":66,"edits":2,"cost":"4.08"},{"name":"tests/cases/conformance/decorators/class/property/decoratorOnClassProperty11.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersOptionality2.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/declarationEmitInvalidReference2.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509630.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration11.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction1_es2017.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/inheritanceStaticFuncOverridingAccessorOfFuncType.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/contextualTyping17.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames25_ES6.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/constDeclarationShadowedByVarDeclaration.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/parser/ecmascript5/Protected/Protected6.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/types/members/augmentedTypeBracketAccessIndexSignature.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/numericIndexerConstraint5.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/moduleAugmentationInDependency.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/modKeyword.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/statements/continueStatements/invalidDoWhileContinueStatements.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement7.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/async/es6/asyncArrowFunction/arrowFunctionWithParameterNameAsync_es6.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/setterBeforeGetter.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/fourslash/getNavigationBarItems.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/doubleUnderscoreMappedTypes.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/scanner/ecmascript3/scannerES3NumericLiteral6.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/downlevelLetConst11.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/scanner/ecmascript5/scannerS7.3_A1.1_T2.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/implicitAnyGenericTypeInference.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES5.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions04_ES6.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedCommentsES6.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/functionOverloads30.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/generics4.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/contextualTyping6.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions01.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/doNotEmitDetachedComments.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/internalImportInstantiatedModuleNotReferencingInstance.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration2_es2017.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/memberScope.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser585151.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/parameterPropertyReferencingOtherParameter.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/undefinedTypeAssignment4.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/accessorWithInitializer.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression1_es5.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/parser/ecmascript5/ArrayLiteralExpressions/parserArrayLiteralExpression13.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/restParamAsOptional.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of6.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/importDeclWithDeclareModifierInAmbientContext.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/explicitAnyAfterSpreadNoImplicitAnyError.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target8.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/compiler/sourceMap-SemiColon1.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/fourslash/formattingOfChainedLambda.ts","time":33,"edits":1,"cost":"4.08"},{"name":"tests/cases/fourslash/findAllRefsWithShorthandPropertyAssignment2.ts","time":131,"edits":4,"cost":"4.07"},{"name":"tests/cases/fourslash/codeFixAddMissingMember7.ts","time":262,"edits":8,"cost":"4.07"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_preserveQuotes.ts","time":98,"edits":3,"cost":"4.07"},{"name":"tests/cases/fourslash/completionsUnion.ts","time":163,"edits":5,"cost":"4.07"},{"name":"tests/cases/conformance/jsdoc/extendsTagEmit.ts","time":65,"edits":2,"cost":"4.06"},{"name":"tests/cases/conformance/externalModules/umd9.ts","time":65,"edits":2,"cost":"4.06"},{"name":"tests/cases/conformance/jsdoc/enumTagImported.ts","time":65,"edits":2,"cost":"4.06"},{"name":"tests/cases/conformance/es6/modules/exportSpellingSuggestion.ts","time":65,"edits":2,"cost":"4.06"},{"name":"tests/cases/compiler/classDeclarationShouldBeOutOfScopeInComputedNames.ts","time":65,"edits":2,"cost":"4.06"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment25.ts","time":65,"edits":2,"cost":"4.06"},{"name":"tests/cases/compiler/genericDefaultsErrors.ts","time":65,"edits":2,"cost":"4.06"},{"name":"tests/cases/fourslash/genericFunctionSignatureHelp3MultiFile.ts","time":162,"edits":5,"cost":"4.06"},{"name":"tests/cases/fourslash/codeFixInferFromUsageSetterWithInaccessibleType.ts","time":162,"edits":5,"cost":"4.06"},{"name":"tests/cases/fourslash/completionsImport_notFromUnrelatedNodeModules.ts","time":97,"edits":3,"cost":"4.06"},{"name":"tests/cases/fourslash/moveToNewFile_selectionOnName.ts","time":97,"edits":3,"cost":"4.06"},{"name":"tests/cases/fourslash/annotateWithTypeFromJSDoc15.ts","time":194,"edits":6,"cost":"4.06"},{"name":"tests/cases/fourslash/getJavaScriptCompletions2.ts","time":97,"edits":3,"cost":"4.06"},{"name":"tests/cases/compiler/unusedLocalsAndParameters.ts","time":97,"edits":3,"cost":"4.06"},{"name":"tests/cases/compiler/optionsCompositeWithIncrementalFalse.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/decoratorMetadataConditionalType.ts","time":64,"edits":2,"cost":"4.05"},{"name":"tests/cases/conformance/types/conditional/conditionalTypes1.ts","time":480,"edits":15,"cost":"4.05"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/superElementAccess.ts","time":64,"edits":2,"cost":"4.05"},{"name":"tests/cases/compiler/undefinedTypeAssignment1.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty33.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_export_dotDefault.ts","time":128,"edits":4,"cost":"4.05"},{"name":"tests/cases/compiler/declarationEmitOfTypeofAliasedExport.ts","time":64,"edits":2,"cost":"4.05"},{"name":"tests/cases/compiler/undefinedTypeAssignment2.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/salsa/contextualTypedSpecialAssignment.ts","time":160,"edits":5,"cost":"4.05"},{"name":"tests/cases/compiler/duplicatePackage_relativeImportWithinPackage.ts","time":64,"edits":2,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserForInStatement2.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess4.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression5_es2017.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/constructorReturnsInvalidType.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/statements/continueStatements/whileContinueStatements.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/identicalCallSignatures2.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration1_es6.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/asiAbstract.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames41_ES5.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/es6ModuleWithModuleGenTargetCommonjs.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/objectLitArrayDeclNoNew.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/classMergedWithInterfaceMultipleBasesNoError.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGenericsInInterfaceDeclaration1.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/importDeclarationInModuleDeclaration1.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/async/es6/awaitClassExpression_es6.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/jsxSpreadFirstUnionNoErrors.tsx","time":64,"edits":2,"cost":"4.05"},{"name":"tests/cases/compiler/breakInIterationOrSwitchStatement4.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/staticMethodsReferencingClassTypeParameters.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/multipleExports.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment20.ts","time":64,"edits":2,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript5/Protected/Protected5.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueTarget6.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/es6/templates/templateStringInTaggedTemplateES6.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList6.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/functionOverloads20.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/emptyTypeArgumentListWithNew.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/declarationEmitComputedNameCausesImportToBePainted.ts","time":64,"edits":2,"cost":"4.05"},{"name":"tests/cases/compiler/grammarAmbiguities1.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/collisionThisExpressionAndPropertyNameAsConstuctorParameter.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/localImportNameVsGlobalName.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/es6/templates/templateStringControlCharacterEscapes01.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/quotedFunctionName1.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/overloadOnConstInCallback1.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript5/ArrayLiteralExpressions/parserArrayLiteralExpression2.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/genericReversingTypeParameters2.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/importDeclWithExportModifierAndExportAssignmentInAmbientContext.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/reExportGlobalDeclaration3.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty43.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorInvalidOperations.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/isolatedModulesPlainFile-CommonJS.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration20.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/exportDeclarationsInAmbientNamespaces.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/typeofInterface.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/innerExtern.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/es6/variableDeclarations/VariableDeclaration6_es6.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalid.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/async/es5/awaitClassExpression_es5.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint2.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/commentOnAmbientfunction.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/avoid.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/es6/templates/templateStringInPropertyNameES6_2.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/circularConstraintYieldsAppropriateError.ts","time":64,"edits":2,"cost":"4.05"},{"name":"tests/cases/conformance/types/primitives/number/assignFromNumberInterface.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/salsa/moduleExportWithExportPropertyAssignment.ts","time":64,"edits":2,"cost":"4.05"},{"name":"tests/cases/compiler/overloadingOnConstantsInImplementation.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/types/intersection/intersectionOfUnionOfUnitTypes.ts","time":64,"edits":2,"cost":"4.05"},{"name":"tests/cases/conformance/types/thisType/unionThisTypeInFunctions.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/readonlyInNonPropertyParameters.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments18_ES6.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithEnumType.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames23_ES5.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/requireOfJsonFileInJsFile.ts","time":64,"edits":2,"cost":"4.05"},{"name":"tests/cases/compiler/systemModuleConstEnumsSeparateCompilation.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/decorators/class/method/decoratorOnClassMethod10.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/types/members/typesWithProtectedConstructor.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/functionOverloads39.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration1.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/unusedLocalsOnFunctionDeclarationWithinFunctionExpression1.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/scanner/ecmascript5/scannerNumericLiteral2.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature1.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/letDeclarations-es5.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/inlineSources2.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/genericClassStaticMethod.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/moduleResolutionWithSymlinks_referenceTypes.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/cachedModuleResolution2.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/awaitLiteralValues.ts","time":64,"edits":2,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName5.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/moduleResolutionWithExtensions_unexpected.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/functionWithDefaultParameterWithNoStatements3.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/decorators/decoratorCallGeneric.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of18.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/recursiveClassInstantiationsWithDefaultConstructors.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/jsFileCompilationPublicParameterModifier.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments19_ES6.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates07_ES6.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/extBaseClass2.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/concatTuples.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors1.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/extendBaseClassBeforeItsDeclared.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/infinitelyExpandingBaseTypes1.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/qualifiedName_ImportDeclarations-entity-names-referencing-a-var.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/es6/yieldExpressions/YieldExpression12_es6.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames43_ES5.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/salsa/exportDefaultInJsFile02.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/resolveTypeAliasWithSameLetDeclarationName1.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/es6/yieldExpressions/YieldExpression6_es6.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionOverloadMixingStaticAndInstance.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/untypedArgumentInLambdaExpression.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/inheritanceGrandParentPrivateMemberCollision.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/es6/templates/templateStringControlCharacterEscapes03.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/recursiveInheritanceGeneric.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/outModuleConcatCommonjs.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/asyncFunctionWithForStatementNoInitializer.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/genericObjectLitReturnType.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript6/ShorthandPropertyAssignment/parserShorthandPropertyAssignment2.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName4.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/functionOverloadsOutOfOrder.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/castParentheses.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/async/es2017/await_unaryExpression_es2017.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/functionSignatureAssignmentCompat1.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/es6/moduleExportsCommonjs/decoratedDefaultExportsGetExportedCommonjs.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/typeofEnum.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/moduleNewExportBug.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/downlevelLetConst12.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser579071.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/isolatedModulesSourceMap.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/staticInheritance.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/es2015modulekindWithES6Target.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/assignmentNonObjectTypeConstraints.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/heterogeneousArrayAndOverloads.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/es6ImportEqualsDeclaration2.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/overloadCrash.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/expressions/functionCalls/forgottenNew.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/statements/continueStatements/invalidSwitchContinueStatement.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndIndexers.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/declarationEmitUnknownImport2.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/localRequireFunction.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/exportStarForValues4.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/exportSameNameFuncVar.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/blockScopedFunctionDeclarationInStrictClass.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/doNotEmitDetachedCommentsAtStartOfConstructor.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionAsyncES3AMD.ts","time":64,"edits":2,"cost":"4.05"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/exportDefaultAsyncFunction.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript5/FunctionDeclarations/parserFunctionDeclaration7.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/es6/yieldExpressions/YieldExpression15_es6.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/collisionCodeGenModuleWithUnicodeNames.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/staticInstanceResolution3.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/es2015modulekind.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/propagationOfPromiseInitialization.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/fourslash/syntacticClassificationsDocComment1.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/ClassDeclaration24.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor1.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration8.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript5/MethodSignatures/parserMethodSignature6.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/downlevelLetConst4.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGreaterThanTokenAmbiguity2.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/constDeclarations-scopes2.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/recursiveInference1.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/duplicatePropertiesInStrictMode.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/letInLetConstDeclOfForOfAndForIn_ES5.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/cachedModuleResolution5.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/stringPropCodeGen.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/compilerOptionsOutAndNoEmit.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/decorators/class/method/decoratorOnClassMethod11.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/expressions/asOperator/asOperator1.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/genericSignatureIdentity.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/decorators/class/method/decoratorOnClassMethod1.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode15.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/fatarrowfunctionsInFunctionParameterDefaults.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration15.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfIsOrderIndependent.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/expressions/functionCalls/grammarAmbiguities.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/badExternalModuleReference.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/contextualTypingOfAccessors.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/constEnumExternalModule.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/fourslash/indentationInComments.ts","time":64,"edits":2,"cost":"4.05"},{"name":"tests/cases/compiler/localVariablesReturnedFromCatchBlocks.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript5/parserSyntaxWalker.generated.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/recursiveBaseConstructorCreation2.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/es6DeclOrdering.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck22.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates10_ES5.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/recursiveSpecializationOfSignatures.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens6.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/invalidUnicodeEscapeSequance4.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserEqualsGreaterThanAfterFunction2.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserInterfaceKeywordInEnum1.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/es5-asyncFunctionForStatements.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesFunctionArgument2.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/es6/moduleExportsSystem/decoratedDefaultExportsGetExportedSystem.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/functionInIfStatementInModule.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/declarationEmitUnknownImport.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/strictModeReservedWordInImportEqualDeclaration.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/requireOfJsonFileNonRelativeWithoutExtensionResolvesToTs.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript5/ObjectTypes/parserObjectType1.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/jsFileCompilationEmitBlockedCorrectly.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/contextualTyping39.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolProperty8.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/unusedTypeParameters2.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/enumWithQuotedElementName2.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/duplicateVariableDeclaration1.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/compiler/contextualTyping15.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserExpressionStatement1.d.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/fourslash/formattingOnNestedStatements.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/fourslash/formattingObjectLiteral.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/fourslash/formattingConditionals.ts","time":32,"edits":1,"cost":"4.05"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax16.ts","time":127,"edits":4,"cost":"4.04"},{"name":"tests/cases/fourslash/signatureHelpExplicitTypeArguments.ts","time":127,"edits":4,"cost":"4.04"},{"name":"tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts","time":127,"edits":4,"cost":"4.04"},{"name":"tests/cases/fourslash/extract-method18.ts","time":95,"edits":3,"cost":"4.04"},{"name":"tests/cases/compiler/numericLiteralsWithTrailingDecimalPoints02.ts","time":63,"edits":2,"cost":"4.03"},{"name":"tests/cases/fourslash/annotateWithTypeFromJSDoc14.ts","time":126,"edits":4,"cost":"4.03"},{"name":"tests/cases/conformance/jsx/jsxCheckJsxNoTypeArgumentsAllowed.tsx","time":63,"edits":2,"cost":"4.03"},{"name":"tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts","time":63,"edits":2,"cost":"4.03"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfFunction.ts","time":63,"edits":2,"cost":"4.03"},{"name":"tests/cases/compiler/classExpressionInClassStaticDeclarations.ts","time":63,"edits":2,"cost":"4.03"},{"name":"tests/cases/fourslash/annotateWithTypeFromJSDoc21.ts","time":126,"edits":4,"cost":"4.03"},{"name":"tests/cases/conformance/jsdoc/typedefCrossModule2.ts","time":63,"edits":2,"cost":"4.03"},{"name":"tests/cases/fourslash/codeFixAddMissingMember.ts","time":189,"edits":6,"cost":"4.03"},{"name":"tests/cases/conformance/es7/trailingCommasInBindingPatterns.ts","time":94,"edits":3,"cost":"4.03"},{"name":"tests/cases/fourslash/extract-method1.ts","time":125,"edits":4,"cost":"4.02"},{"name":"tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess23.ts","time":125,"edits":4,"cost":"4.02"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax14.ts","time":125,"edits":4,"cost":"4.02"},{"name":"tests/cases/fourslash/codeFixInferFromUsagePartialParameterListJS.ts","time":156,"edits":5,"cost":"4.02"},{"name":"tests/cases/fourslash/codeFixClassExtendAbstractExpressionWithTypeArgs.ts","time":156,"edits":5,"cost":"4.02"},{"name":"tests/cases/compiler/noImplicitAnyLoopCrash.ts","time":62,"edits":2,"cost":"4.02"},{"name":"tests/cases/compiler/inlinedAliasAssignableToConstraintSameAsAlias.ts","time":62,"edits":2,"cost":"4.02"},{"name":"tests/cases/compiler/declarationEmitComputedNameConstEnumAlias.ts","time":62,"edits":2,"cost":"4.02"},{"name":"tests/cases/conformance/types/union/unionTypeCallSignatures5.ts","time":62,"edits":2,"cost":"4.02"},{"name":"tests/cases/compiler/checkMergedGlobalUMDSymbol.ts","time":62,"edits":2,"cost":"4.02"},{"name":"tests/cases/conformance/declarationEmit/libReferenceNoLibBundle.ts","time":62,"edits":2,"cost":"4.02"},{"name":"tests/cases/compiler/extendsJavaScript.ts","time":62,"edits":2,"cost":"4.02"},{"name":"tests/cases/conformance/es2019/globalThisReadonlyProperties.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/exportedVariable1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/jsFileCompilationDuplicateVariable.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/fourslash/findAllReferencesDynamicImport3.ts","time":155,"edits":5,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint7.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/typeParameterDiamond2.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/types/thisType/thisTypeSyntacticContext.ts","time":62,"edits":2,"cost":"4.02"},{"name":"tests/cases/compiler/functionOverloads3.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/optionalParamReferencingOtherParams3.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/moduleAugmentationGlobal8_1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax19.ts","time":124,"edits":4,"cost":"4.02"},{"name":"tests/cases/compiler/implementClausePrecedingExtends.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/lastPropertyInLiteralWins.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/externalModules/exportAssignDottedName.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint5.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration13.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/genericInterfacesWithoutTypeArguments.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/nameCollisionWithBlockScopedVariable1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/async/es2017/awaitClassExpression_es2017.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/pathsValidation1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/instanceofWithPrimitiveUnion.ts","time":62,"edits":2,"cost":"4.02"},{"name":"tests/cases/compiler/inheritanceMemberAccessorOverridingAccessor.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/expressions/contextualTyping/getSetAccessorContextualTyping.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolProperty4.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript5/Accessors/parserSetAccessorWithTypeAnnotation1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction3.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/inOperator.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/importAsBaseClass.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/moduleExportsAmd/outFilerootDirModuleNamesAmd.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/esModuleInterop.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions03_ES5.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/forOfStringConstituents.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/jsdoc/jsdocAugments_withTypeParameter.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/async/es6/asyncClass_es6.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel4.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration2.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/callWithWrongNumberOfTypeArguments.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of20.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates15_ES6.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/expressions/propertyAccess/propertyAccessStringIndexSignature.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/destructuring/destructuringTypeAssertionsES5_7.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueNotInIterationStatement2.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/classes/classExpression.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGenericConstraint1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/typeParameterDiamond1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/circularContextualReturnType.ts","time":62,"edits":2,"cost":"4.02"},{"name":"tests/cases/compiler/es6ClassTest5.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/inOperatorWithFunction.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/spread/iteratorSpreadInArray.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/genericAndNonGenericInheritedSignature2.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript5/ArrayLiteralExpressions/parserArrayLiteralExpression8.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/classDeclaration/emitClassDeclarationOverloadInES6.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/promises.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionInExportEqualsCJS.ts","time":62,"edits":2,"cost":"4.02"},{"name":"tests/cases/conformance/classes/constructorDeclarations/constructorParameters/readonlyReadonly.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserConstructorAmbiguity2.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/systemModuleConstEnums.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature6.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/types/members/objectTypeWithConstructSignatureAppearsToBeFunctionType.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/assignmentCompatability3.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of21.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/externalModules/es6/es6modulekindWithES2015Target.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/mergedEnumDeclarationCodeGen.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/arrayLiteralContextualType.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/commonSourceDir4.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling2.ts","time":62,"edits":2,"cost":"4.02"},{"name":"tests/cases/compiler/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/arrayLiteral2.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnumDeclaration4.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/async/es6/asyncArrowFunction/asyncUnParenthesizedArrowFunction_es6.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target6.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/classPropertyErrorOnNameOnly.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/inferentialTypingUsingApparentType2.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/methodInAmbientClass1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/unusedLocalsOnFunctionExpressionWithinFunctionDeclaration2.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/generatorES6InAMDModule.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/es5-asyncFunctionIfStatements.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings24_ES5.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/classes/members/accessibility/privateStaticMemberAccessibility.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/sourceMap-InterfacePrecedingVariableDeclaration1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/reversedRecusiveTypeInstantiation.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractAsIdentifier.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/es6ExportAssignment3.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesSourceMap1_ES6.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/cloduleWithPriorInstantiatedModule.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/classSideInheritance1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/classImplementsImportedInterface.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes1_ES6.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/decorators/class/decoratorOnClass2.es6.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing2.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/fourslash/formatNamedExportImport.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/destructuring/nonIterableRestElement2.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/externalModules/exportAssignmentTopLevelEnumdule.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/genericTypeAssertions1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of25.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/typeofClass.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/overloadOnConstConstraintChecks3.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/voidArrayLit.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/narrowedConstInMethod.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/doNotemitTripleSlashComments.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/assignmentCompatibilityForConstrainedTypeParameters.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/indexSignatureAndMappedType.ts","time":62,"edits":2,"cost":"4.02"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames26_ES6.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/jsFileCompilationLetBeingRenamed.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/importShadowsGlobalName.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/externalModules/topLevelFileModule.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/destructuring/destructuringTypeAssertionsES5_2.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames45_ES5.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberVariableDeclarations/parserMemberVariableDeclaration1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserConstructorAmbiguity4.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/genericBaseClassLiteralProperty.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/asiContinue.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/overloadModifiersMustAgree.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/scanner/ecmascript5/scannerS7.8.3_A6.1_T1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/systemModule14.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/assignmentNestedInLiterals.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/bindingPatternInParameter01.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName23.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/newLexicalEnvironmentForConvertedLoop.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty5.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/invalidTypeNames.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/es6-umd2.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/destructuring/objectBindingPatternKeywordIdentifiers01.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement3.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/superPropertyAccessInComputedPropertiesOfNestedType_ES5.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/externalModules/nameWithFileExtension.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/destructuringInVariableDeclarations6.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/decorators/class/decoratedClassFromExternalModule.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/conflictMarkerTrivia1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/classImplementingInterfaceIndexer.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/recursiveBaseCheck4.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/objectMembersOnTypes.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/functionExpressionAndLambdaMatchesFunction.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/collisionThisExpressionAndClassInGlobal.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/objectLiteralWithNumericPropertyName.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/unusedMultipleParameter1InFunctionExpression.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/recursiveBaseCheck5.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolProperty3.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/accessorsNotAllowedInES3.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/emitBundleWithPrologueDirectives1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/staticInstanceResolution4.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames18_ES5.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames36_ES5.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/unusedPrivateVariableInClass5.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/contextualTypingOfObjectLiterals2.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/mixingFunctionAndAmbientModule1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAccessibility.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/unusedFunctionsinNamespaces3.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/es5-asyncFunctionConditionals.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck43.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList5.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/statements/continueStatements/forContinueStatements.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/letConstInCaseClauses.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardOfFormFunctionEquality.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/classExpressionWithDecorator1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/declaredExternalModule.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/superCallInsideObjectLiteralExpression.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserIfStatement1.d.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/arrayLiteralComments.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractFactoryFunction.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration11.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/discriminantsAndNullOrUndefined.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/emptyThenWithoutWarning.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction1_es6.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES5.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/types/objectTypeLiteral/objectTypeLiteralSyntax2.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/jsdoc/noDuplicateJsdoc1.ts","time":62,"edits":2,"cost":"4.02"},{"name":"tests/cases/conformance/externalModules/umd4.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames20_ES5.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/blockScopedFunctionDeclarationES5.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/yieldExpressions/YieldExpression7_es6.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/typeParameterArgumentEquivalence4.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/generatorES6_2.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/types/objectTypeLiteral/objectTypeLiteralSyntax.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck11.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/moduleProperty2.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/unusedMethodsInInterface.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/cloduleAcrossModuleDefinitions.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/arrayCast.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/libdtsFix.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/nonArrayRestArgs.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/es5-system2.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/castOfAwait.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/scanner/ecmascript5/scannerS7.2_A1.5_T2.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/reExportUndefined1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target10.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/exportEqualsDefaultProperty.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/privateVisibles.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13_ES6.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/inheritanceStaticFunctionOverridingInstanceProperty.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/decorators/class/property/decoratorOnClassProperty1.es6.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/types/typeParameters/typeParameterLists/typesWithDuplicateTypeParameters.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/scanner/ecmascript5/scannerEnum1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorInAmbientContext4.d.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/types/tuple/tupleElementTypes4.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/genericTypeWithMultipleBases1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509667.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/duplicateAnonymousInners1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithExtensionAndTypeArgumentInES6.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/alwaysStrict.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserAmbiguity1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateStringsWithTagsTypedAsAnyES6.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/topLevelLambda4.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/inferSecondaryParameter.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript5/Expressions/parserPostfixUnaryExpression1.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration25.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration7_es6.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/interfaceNameAsIdentifier.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface04.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/ExportAssignment8.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/parser/ecmascript5/Accessors/parserAccessors2.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/typeAliasDeclareKeyword01.d.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/compiler/FunctionDeclaration6.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates03_ES6.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/jsx/tsxDynamicTagName1.tsx","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions01_ES5.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/fourslash/syntacticClassificationsDocComment2.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/fourslash/syntacticClassificationsDocComment4.ts","time":31,"edits":1,"cost":"4.02"},{"name":"tests/cases/fourslash/codeFixUndeclaredMethod.ts","time":276,"edits":9,"cost":"4.00"},{"name":"tests/cases/compiler/substitutionTypesInIndexedAccessTypes.ts","time":61,"edits":2,"cost":"4.00"},{"name":"tests/cases/fourslash/codeFixCannotFindModule.ts","time":183,"edits":6,"cost":"4.00"},{"name":"tests/cases/compiler/typeInferenceWithExcessProperties.ts","time":61,"edits":2,"cost":"4.00"},{"name":"tests/cases/compiler/parameterListAsTupleType.ts","time":61,"edits":2,"cost":"4.00"},{"name":"tests/cases/conformance/jsdoc/checkJsdocTypeTag2.ts","time":61,"edits":2,"cost":"4.00"},{"name":"tests/cases/conformance/salsa/constructorFunctionsStrict.ts","time":61,"edits":2,"cost":"4.00"},{"name":"tests/cases/conformance/salsa/checkSpecialPropertyAssignments.ts","time":61,"edits":2,"cost":"4.00"},{"name":"tests/cases/compiler/contextualTypeObjectSpreadExpression.ts","time":61,"edits":2,"cost":"4.00"},{"name":"tests/cases/fourslash/genericFunctionSignatureHelp1.ts","time":91,"edits":3,"cost":"3.99"},{"name":"tests/cases/compiler/classUsedBeforeInitializedVariables.ts","time":60,"edits":2,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType6.ts","time":60,"edits":2,"cost":"3.98"},{"name":"tests/cases/compiler/functionOverloads41.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/constraintOfRecursivelyMappedTypeWithConditionalIsResolvable.ts","time":60,"edits":2,"cost":"3.98"},{"name":"tests/cases/compiler/interMixingModulesInterfaces4.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/systemModule7.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/tsxFragmentChildrenCheck.ts","time":60,"edits":2,"cost":"3.98"},{"name":"tests/cases/conformance/es6/templates/templateStringPlainCharactersThatArePartsOfEscapes01.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateWithConstructableTag01.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGreaterThanTokenAmbiguity6.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/classes/classExpressions/classExpression4.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/unusedLocalsInMethod1.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/jsx/tsxPreserveEmit2.tsx","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/genericGetter2.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of23.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/customEventDetail.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/variableDeclarations/VariableDeclaration1_es6.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/fourslash/findAllRefsClassWithStaticThisAccess.ts","time":150,"edits":5,"cost":"3.98"},{"name":"tests/cases/compiler/exportSpecifierForAGlobal.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/jsx/tsxAttributeResolution8.tsx","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty35.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/nullAssignedToUndefined.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/noImplicitThisFunctions.ts","time":60,"edits":2,"cost":"3.98"},{"name":"tests/cases/compiler/parenthesizedExpressionInternalComments.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardsInGlobal.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ExtendsOrImplementsClauses/parserErrorRecovery_ExtendsOrImplementsClause3.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames1_ES5.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax17.ts","time":120,"edits":4,"cost":"3.98"},{"name":"tests/cases/compiler/propertyAccessibility2.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/useBeforeDeclaration_superClass.ts","time":60,"edits":2,"cost":"3.98"},{"name":"tests/cases/conformance/expressions/propertyAccess/propertyAccessStringIndexSignatureNoImplicitAny.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/destructuring/optionalBindingParameters1.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/jsx/tsxElementResolution15.tsx","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiateGenericClassWithZeroTypeArguments.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/templates/templateStringInNewExpression.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/noImplicitAnyWithOverloads.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/classWithoutExplicitConstructor.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/functionOverloads15.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/recursiveGenericMethodCall.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolProperty5.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/enumMemberResolution.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/unusedImports9.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/doubleMixinConditionalTypeBaseClassWorks.ts","time":60,"edits":2,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/SuperExpressions/parserSuperExpression2.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/badArraySyntax.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/types/contextualTypes/commaOperator/contextuallyTypeCommaOperator01.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/controlFlow/controlFlowConditionalExpression.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/typeParametersInStaticProperties.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/exportAssignmentError.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/assignmentStricterConstraints.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/unusedPrivateVariableInClass1.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/stringIndexerAndConstructor.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/incompatibleAssignmentOfIdenticallyNamedTypes.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/extendNonClassSymbol1.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/exportStarForValues5.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/quotedPropertyName3.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/fourslash/getJavaScriptSyntacticDiagnostics3.ts","time":90,"edits":3,"cost":"3.98"},{"name":"tests/cases/compiler/allowSyntheticDefaultImports1.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings10_ES6.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/funduleSplitAcrossFiles.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/functionOverloads18.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/genericFunctionsWithOptionalParameters1.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/typeCheckObjectLiteralMethodBody.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/functionWithDefaultParameterWithNoStatements7.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates13_ES5.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames2.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/typeofStrictNull.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/cachedModuleResolution6.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/jsx/inline/inlineJsxFactoryWithFragmentIsError.tsx","time":60,"edits":2,"cost":"3.98"},{"name":"tests/cases/compiler/intersectionTypeWithLeadingOperator.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/templates/templateStringInArrowFunctionES6.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens7.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/typeParametersAndParametersInComputedNames.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/scanner/ecmascript5/scannerStringLiteralWithContainingNullCharacter1.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/staticOffOfInstance2.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/contextualTypingWithFixedTypeParameters1.ts","time":60,"edits":2,"cost":"3.98"},{"name":"tests/cases/conformance/jsx/tsxParseTests2.tsx","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/deprecatedBool.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/salsa/moduleExportAssignment5.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/typeParameterArgumentEquivalence.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/commentEmitAtEndOfFile1.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/classes/members/constructorFunctionTypes/classWithNoConstructorOrBaseClass.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck19.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/moduleProperty1.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/externalModules/exportAssignmentAndDeclaration.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/arrayReferenceWithoutTypeArgs.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/types/primitives/undefined/validUndefinedValues.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/funduleUsedAcrossFileBoundary.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/structural1.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/innerOverloads.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/objectLiteralWithGetAccessorInsideFunction.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/constructorAsType.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/variableDeclarations/VariableDeclaration8_es6.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/deleteOperator1.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/Symbols/symbolType10.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/unionTypeParameterInference.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/typeParameterEquality.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/constDeclarations-useBeforeDefinition.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueNotInIterationStatement3.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/ambient/ambientShorthand.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/optionsInlineSourceMapSourceRoot.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/templates/templateStringTermination2_ES6.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/unusedLocalsOnFunctionExpressionWithinFunctionExpression2.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates04_ES6.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/genericLambaArgWithoutTypeArguments.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/declarationEmitHasTypesRefOnNamespaceUse.ts","time":60,"edits":2,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/CatchClauses/parserCatchClauseWithTypeAnnotation1.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/constructorArgsErrors5.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/classes/classDeclarations/classWithSemicolonClassElement2.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/publicMemberImplementedAsPrivateInDerivedClass.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/noImplicitAnyModule.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGreaterThanTokenAmbiguity13.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/objectLiteralWithSemicolons4.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates11_ES6.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/decorators/class/constructor/parameter/decoratorOnClassConstructorParameter4.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/es6ModuleModuleDeclaration.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES6.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/functionOverloads8.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature9.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum2.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04_ES6.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/externalModuleResolution.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/objectLitPropertyScoping.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/jsFileClassPropertyType3.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/downlevelLetConst1.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/indexerSignatureWithRestParam.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclaration2.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/implicitAnyDeclareMemberWithoutType.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/unexportedInstanceClassVariables.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/templates/templateStringControlCharacterEscapes01_ES6.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/Accessors/parserAccessors7.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/destructuring/restElementWithInitializer2.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames31_ES5.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/VariableDeclarations/parserVariableDeclaration8.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/functionWithDefaultParameterWithNoStatements9.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/defaultParameters/emitDefaultParametersMethod.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/functionCall4.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration7_es2017.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/types/contextualTypes/commaOperator/contextuallyTypeCommaOperator02.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/contextualTypeAny.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/classImplementsClass4.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/templates/templateStringTermination1_ES6.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserAmbiguityWithBinaryOperator1.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration14_es2017.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/instanceOfInExternalModules.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509618.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/nestedBlockScopedBindings16.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/unusedFunctionsinNamespaces6.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/targetTypeObjectLiteral.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/exportSpecifierReferencingOuterDeclaration3.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/es5-system.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/Symbols/symbolType7.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/unusedLocalsAndParametersOverloadSignatures.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck34.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/es6ClassTest7.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/genericWithIndexerOfTypeParameterType1.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/forInStatement4.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings21_ES6.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement9.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings02_ES6.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/typeRootsFromNodeModulesInParentDirectory.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/interMixingModulesInterfaces3.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/overloadsAndTypeArgumentArity.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/templates/templateStringInNewOperatorES6.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/inheritanceStaticMembersCompatible.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/importAliasWithDottedName.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/MethodSignatures/parserMethodSignature11.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/downlevelLetConst5.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum6.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/recursiveBaseCheck6.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/aliasUsedAsNameValue.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/conditionalExpressionNewLine4.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/types/primitives/string/validStringAssignments.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration14.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/infinitelyExpandingTypeAssignability.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/idInProp.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/implementsClauseAlreadySeen.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/separate1-2.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/typings/typingsLookup3.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck37.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSupertype.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment9.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/ClassDeclaration21.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic2.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/statements/breakStatements/forInBreakStatements.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty5.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/staticFactory1.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/types/typeAliases/circularTypeAliasForUnionWithClass.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments10_ES6.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral4.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement4.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/ObjectTypes/parserObjectType3.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/topLevelLambda2.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/captureThisInSuperCall.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/commentsOnObjectLiteral4.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions15_ES6.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedUnaryPlus.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of22.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution_withExtension_failedLookup.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/recursiveExportAssignmentAndFindAliasedType4.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock1.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/expressions/asOperator/asOperatorContextualType.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionNestedESNext.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/recursiveIdenticalOverloadResolution.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration14.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface01.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/modules/defaultExportsCannotMerge04.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/destructuringInVariableDeclarations3.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/import_unneeded-require-when-referenecing-aliased-type-throug-array.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/checkJsFiles2.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/expressions/asOperator/asOperatorAmbiguity.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration10.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardsInExternalModule.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/fourslash/navigationBarItemsFunctions.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/collisionArgumentsInterfaceMembers.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/constructorArgsErrors3.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/parserObjectCreationArrayLiteral4.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/functionCall6.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions07_ES5.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedMultiplication.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/unusedLocalsAndObjectSpread2.ts","time":60,"edits":2,"cost":"3.98"},{"name":"tests/cases/conformance/functions/functionOverloadCompatibilityWithVoid01.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/thisInConstructorParameter1.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/expressions/unaryOperators/voidOperator/voidOperatorInvalidOperations.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/newExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/fileReferencesWithNoExtensions.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/enumInitializersWithExponents.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/constDeclarations-es5.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/collisionRestParameterInType.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/decorators/invalid/decoratorOnTypeAlias.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors2.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/globalThis.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/numberOnLeftSideOfInExpression.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserDoStatement2.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/fourslash/formattingOnCommaOperator.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/compiler/breakTarget4.ts","time":30,"edits":1,"cost":"3.98"},{"name":"tests/cases/fourslash/codeFixClassExtendAbstractMethod.ts","time":119,"edits":4,"cost":"3.97"},{"name":"tests/cases/fourslash/completionsPathsRelativeJsonModule.ts","time":89,"edits":3,"cost":"3.97"},{"name":"tests/cases/conformance/jsx/tsxGenericAttributesType1.tsx","time":89,"edits":3,"cost":"3.97"},{"name":"tests/cases/compiler/controlFlowFinallyNoCatchAssignments.ts","time":59,"edits":2,"cost":"3.97"},{"name":"tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateNumber.ts","time":118,"edits":4,"cost":"3.97"},{"name":"tests/cases/compiler/esModuleInteropDefaultMemberMustBeSyntacticallyDefaultExport.ts","time":59,"edits":2,"cost":"3.97"},{"name":"tests/cases/compiler/allowSyntheticDefaultImportsCanPaintCrossModuleDeclaration.ts","time":59,"edits":2,"cost":"3.97"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution_rootImport_noAliasWithRoot_realRootFile.ts","time":59,"edits":2,"cost":"3.97"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty60.ts","time":59,"edits":2,"cost":"3.97"},{"name":"tests/cases/compiler/defaultParameterTrailingComments.ts","time":59,"edits":2,"cost":"3.97"},{"name":"tests/cases/compiler/noCrashOnThisTypeUsage.ts","time":59,"edits":2,"cost":"3.97"},{"name":"tests/cases/conformance/jsdoc/jsdocImportType.ts","time":59,"edits":2,"cost":"3.97"},{"name":"tests/cases/compiler/functionCallOnConstrainedTypeVariable.ts","time":59,"edits":2,"cost":"3.97"},{"name":"tests/cases/conformance/controlFlow/switchWithConstrainedTypeVariable.ts","time":59,"edits":2,"cost":"3.97"},{"name":"tests/cases/fourslash/findAllRefsIndexedAccessTypes.ts","time":147,"edits":5,"cost":"3.96"},{"name":"tests/cases/fourslash/annotateWithTypeFromJSDoc22.ts","time":147,"edits":5,"cost":"3.96"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax25.ts","time":117,"edits":4,"cost":"3.96"},{"name":"tests/cases/fourslash/goToDefinitionNewExpressionTargetNotClass.ts","time":117,"edits":4,"cost":"3.96"},{"name":"tests/cases/conformance/jsx/tsxGenericAttributesType9.tsx","time":117,"edits":4,"cost":"3.96"},{"name":"tests/cases/fourslash/incompleteFunctionCallCodefix2.ts","time":175,"edits":6,"cost":"3.95"},{"name":"tests/cases/fourslash/moveToNewFile_moveJsxImport3.ts","time":58,"edits":2,"cost":"3.95"},{"name":"tests/cases/compiler/overloadedConstructorFixesInferencesAppropriately.ts","time":58,"edits":2,"cost":"3.95"},{"name":"tests/cases/compiler/nonObjectUnionNestedExcessPropertyCheck.ts","time":58,"edits":2,"cost":"3.95"},{"name":"unittests:: tsserver:: rename","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/jsxNamespaceReexports.tsx","time":58,"edits":2,"cost":"3.95"},{"name":"unittests:: services:: PatternMatcher","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/salsa/typeFromPrototypeAssignment3.ts","time":58,"edits":2,"cost":"3.95"},{"name":"tests/cases/conformance/es6/destructuring/destructuringVoidStrictNullChecks.ts","time":58,"edits":2,"cost":"3.95"},{"name":"tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration7_es5.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/unusedVariablesinBlocks2.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration1.d.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of14.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/externalModules/umd3.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/templates/templateStringInMultiplication.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement7.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum1.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/initializedDestructuringAssignmentTypes.ts","time":58,"edits":2,"cost":"3.95"},{"name":"tests/cases/conformance/salsa/prototypePropertyAssignmentMergeWithInterfaceMethod.ts","time":58,"edits":2,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment7.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/parserConstructorDeclaration12.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/recursiveExportAssignmentAndFindAliasedType2.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/collisionCodeGenModuleWithMemberVariable.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/classes/classDeclarations/mergeClassInterfaceAndModule.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/declarationEmitClassPrivateConstructor2.ts","time":58,"edits":2,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration16.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserAmbiguity3.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/types/contextualTypes/partiallyAnnotatedFunction/partiallyAnnotatedFunctionWitoutTypeParameter.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateStringsWithTagNamedDeclareES6.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/PropertyAssignments/parserFunctionPropertyAssignment4.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/expressions/commaOperator/commaOperatorOtherValidOperation.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck13.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts","time":58,"edits":2,"cost":"3.95"},{"name":"tests/cases/compiler/overloadOnConstNoNonSpecializedSignature.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralCheckedInIf02.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions17_ES6.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/allowSyntheticDefaultImports7.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/targetTypeCalls.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/deleteReadonly.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames46_ES6.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/detachedCommentAtStartOfFunctionBody2.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/declarationEmitTypeofDefaultExport.ts","time":58,"edits":2,"cost":"3.95"},{"name":"tests/cases/fourslash/breakpointValidationWhile.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList11.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionsAsIs.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/letAsIdentifierInStrictMode.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/unusedClassesinNamespace3.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedInstanceOf.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/primitiveConstraints1.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionNestedSystem2.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/decorators/class/decoratorOnClass1.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/genericCloduleInModule.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/augmentExportEquals7.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/collisionThisExpressionAndAmbientClassInGlobal.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/unusedClassesinModule1.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/thisInSuperCall1.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ModuleElements/parserErrorRecovery_ModuleElement2.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/specializedSignatureOverloadReturnTypeWithIndexers.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/amdDependencyCommentName1.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/emptyFile-souremap.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorFromNoneExistingIdentifier.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/emptyIndexer.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/commonSourceDir1.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/genericCloduleInModule2.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/moduleAssignmentCompat1.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName2.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/indirectSelfReferenceGeneric.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/allowSyntheticDefaultImports6.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/exportAssignmentEnum.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/interfaceMayNotBeExtendedWitACall.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName3.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/instanceSubtypeCheck1.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11_ES6.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/moduleVisibilityTest3.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/classExpressionNames.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/jsx/tsxDynamicTagName3.tsx","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/moduleVariables.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints3.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/optionsInlineSourceMapSourcemap.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/moduleExportsSystem/defaultExportsGetExportedSystem.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/staticsInConstructorBodies.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck6.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/jsx/tsxSpreadAttributesResolution16.tsx","time":58,"edits":2,"cost":"3.95"},{"name":"tests/cases/compiler/collisionRestParameterInterfaceMembers.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueTarget4.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/Expressions/parserMemberAccessAfterPostfixExpression1.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/yieldExpressions/YieldExpression3_es6.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/overloadResolutionOnDefaultConstructor1.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/constraints0.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/optionsInlineSourceMapMapRoot.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/nestedBlockScopedBindings12.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/contextualTyping11.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement11.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType9_ES5.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorInvalidOperations.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/esModuleInteropImportTSLibHasImport.ts","time":58,"edits":2,"cost":"3.95"},{"name":"tests/cases/compiler/typeVal.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/constraintsUsedInPrototypeProperty.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/duplicateAnonymousModuleClasses.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/ambientErrors1.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName6.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/namespacesDeclaration2.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/isolatedModulesWithDeclarationFile.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/functionMergedWithModule.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode14.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/generatorES6_4.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/commentOnParenthesizedExpressionOpenParen1.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/functionOverloadImplementationOfWrongName.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/allowSyntheticDefaultImports2.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/decorators/class/decoratedClassExportsSystem1.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/undefinedTypeArgument1.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/regExpWithSlashInCharClass.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/promiseIdentityWithConstraints.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/isArray.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/genericSignatureInheritance2.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ExtendsOrImplementsClauses/parserErrorRecovery_ExtendsOrImplementsClause4.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/collisionRestParameterArrowFunctions.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsShadowedConstructorFunction.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/unusedFunctionsinNamespaces1.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/ParameterList6.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/objectBindingPattern_restElementWithPropertyName.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/alwaysStrictAlreadyUseStrict.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/exportAssignmentWithoutIdentifier1.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07_ES6.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/nestedBlockScopedBindings13.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorOverloads3.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_2.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/sourceMapValidationLabeled.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/types/tuple/wideningTuples7.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/jsFileCompilationTypeParameterSyntaxOfFunction.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList9.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/variableDeclarations/VariableDeclaration9_es6.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardsWithInstanceOf.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/hidingConstructSignatures.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes01_ES6.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/noErrorUsingImportExportModuleAugmentationInDeclarationFile1.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesThis_es6.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/modules/exportAndImport-es3.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/constDeclarationShadowedByVarDeclaration2.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/functions/functionOverloadCompatibilityWithVoid02.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions16_ES5.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/umdDependencyComment2.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnPropertySignature2.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/salsa/exportDefaultInJsFile01.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiateNonGenericTypeWithTypeArguments.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/typeArgumentsOnFunctionsWithNoTypeParameters.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakInIterationOrSwitchStatement4.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/fourslash/indentationInAsyncExpressions.ts","time":58,"edits":2,"cost":"3.95"},{"name":"tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/matchingOfObjectLiteralConstraints.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/fourslash/formattingTemplates.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserContinueStatement1.d.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/jsdoc/typedefCrossModule4.ts","time":58,"edits":2,"cost":"3.95"},{"name":"tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target3.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/gettersAndSettersErrors.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14_ES6.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/commentOnExportEnumDeclaration.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/commentInNamespaceDeclarationWithIdentifierPathName.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/moduleResolution/scopedPackages.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/inheritedStringIndexersFromDifferentBaseTypes2.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/controlFlowPropertyInitializer.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/constructorArgsErrors4.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration3.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/quotedAccessorName2.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/types/typeAliases/asiPreventsParsingAsTypeAlias01.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/Types/parserTypeQuery1.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/constEnumMergingWithValues1.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/externalModules/commonJSImportAsPrimaryExpression.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES5.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/unicodeIdentifierName2.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList13.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/asyncIIFE.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatHidesBaseProperty.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/enumWithInfinityProperty.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames35_ES6.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/argumentsObjectIterator03_ES6.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/modulePrologueUmd.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/accessorsInAmbientContext.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parserTernaryAndCommaOperators1.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/importDeclWithExportModifier.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/restParameters/emitRestParametersMethod.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/functionCall15.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode5.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/limitDeepInstantiations.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/implicitAnyDeclareVariablesWithoutTypeAndInit.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/jsdoc/jsdocTemplateTag2.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/es5-umd2.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/contextualTyping5.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/decorators/invalid/decoratorOnFunctionDeclaration.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/collisionThisExpressionAndFunctionInGlobal.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/interfaces/declarationMerging/genericAndNonGenericInterfaceWithTheSameName2.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/voidOperator1.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/fourslash/spaceAfterConstructor.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/FunctionDeclaration3.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/parserEmptyStatement1.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/missingFunctionImplementation2.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck2.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/duplicateVariablesWithAny.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedMultiplicationES6.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/contextualTyping38.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/parser/ecmascript5/Expressions/parserUnaryExpression1.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/contextualTyping27.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/templates/templateStringControlCharacterEscapes02.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/typeofUnknownSymbol.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/shebang.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/numberAssignableToEnumInsideUnion.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/alwaysStrictModule5.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings20_ES5.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/compiler/overloadOnConstInheritance3.ts","time":29,"edits":1,"cost":"3.95"},{"name":"tests/cases/fourslash/quickInfoPropertyTag.ts","time":87,"edits":3,"cost":"3.95"},{"name":"tests/cases/fourslash/completionListInImportClause06.ts","time":115,"edits":4,"cost":"3.94"},{"name":"tests/cases/fourslash/getEditsForFileRename.ts","time":201,"edits":7,"cost":"3.94"},{"name":"tests/cases/compiler/contextuallyTypeArgumentsKeyword.ts","time":86,"edits":3,"cost":"3.94"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_export_moduleDotExports_changesImports.ts","time":143,"edits":5,"cost":"3.93"},{"name":"tests/cases/conformance/salsa/varRequireFromJavascript.ts","time":57,"edits":2,"cost":"3.93"},{"name":"tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction11_es5.ts","time":57,"edits":2,"cost":"3.93"},{"name":"tests/cases/compiler/duplicatePackage_globalMerge.ts","time":57,"edits":2,"cost":"3.93"},{"name":"tests/cases/compiler/unusedTypeParameters10.ts","time":57,"edits":2,"cost":"3.93"},{"name":"tests/cases/compiler/jsxElementClassTooManyParams.tsx","time":57,"edits":2,"cost":"3.93"},{"name":"tests/cases/compiler/emptyDeclarationEmitIsModule.ts","time":57,"edits":2,"cost":"3.93"},{"name":"tests/cases/compiler/tsxUnionSpread.tsx","time":57,"edits":2,"cost":"3.93"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment37.ts","time":57,"edits":2,"cost":"3.93"},{"name":"tests/cases/compiler/invalidContinueInDownlevelAsync.ts","time":57,"edits":2,"cost":"3.93"},{"name":"tests/cases/compiler/strictNullNotNullIndexTypeNoLib.ts","time":57,"edits":2,"cost":"3.93"},{"name":"tests/cases/conformance/jsdoc/checkJsdocTypeTag1.ts","time":57,"edits":2,"cost":"3.93"},{"name":"tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments5.tsx","time":85,"edits":3,"cost":"3.93"},{"name":"tests/cases/fourslash/extract-method25.ts","time":85,"edits":3,"cost":"3.93"},{"name":"tests/cases/conformance/types/spread/objectSpreadIndexSignature.ts","time":85,"edits":3,"cost":"3.93"},{"name":"tests/cases/conformance/types/conditional/conditionalTypes2.ts","time":309,"edits":11,"cost":"3.92"},{"name":"tests/cases/compiler/spreadOfParamsFromGeneratorMakesRequiredParams.ts","time":56,"edits":2,"cost":"3.91"},{"name":"tests/cases/compiler/contravariantTypeAliasInference.ts","time":56,"edits":2,"cost":"3.91"},{"name":"tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunction.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/genericRestArgs.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/classInheritence.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/multiLineContextDiagnosticWithPretty.ts","time":56,"edits":2,"cost":"3.91"},{"name":"tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/specializationError.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassFunctionOverridesBaseClassAccessor.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/parseErrorIncorrectReturnToken.ts","time":56,"edits":2,"cost":"3.91"},{"name":"tests/cases/compiler/complicatedIndexesOfIntersectionsAreInferencable.ts","time":56,"edits":2,"cost":"3.91"},{"name":"tests/cases/compiler/unusedLocalsInMethod2.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/types/primitives/string/stringPropertyAccess.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/sourceMap-NewLine1.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/types/primitives/number/validNumberAssignments.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/sourceMapValidationFunctionPropertyAssignment.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName7.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/async/es6/asyncDeclare_es6.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/es3-oldStyleOctalLiteralTypes.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/assignmentCompatInterfaceWithStringIndexSignature.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/unusedInterfaceinNamespace1.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/fourslash/goToDefinitionDynamicImport1.ts","time":84,"edits":3,"cost":"3.91"},{"name":"tests/cases/compiler/inferredNonidentifierTypesGetQuotes.ts","time":56,"edits":2,"cost":"3.91"},{"name":"tests/cases/fourslash/completionsImport_exportEqualsNamespace_noDuplicate.ts","time":112,"edits":4,"cost":"3.91"},{"name":"tests/cases/compiler/genericInstanceOf.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/jsdoc/jsdocTemplateTag.ts","time":84,"edits":3,"cost":"3.91"},{"name":"tests/cases/conformance/es6/templates/templateStringInNewExpressionES6.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/statements/continueStatements/invalidForContinueStatements.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/nestedGenerics.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/circularModuleImports.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/es6/destructuring/emptyVariableDeclarationBindingPatterns02_ES5iterable.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/badOverloadError.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions02_ES5.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/alwaysStrictModule4.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndFunctionWithSameName.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/pathsValidation3.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/exportStarForValues10.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target12.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/es6/modules/multipleDefaultExports03.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/ClassDeclaration14.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGreaterThanTokenAmbiguity16.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/reExportGlobalDeclaration2.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/functionWithDefaultParameterWithNoStatements5.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/genericInference1.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/fourslash/moveToNewFile_inferQuoteStyle.ts","time":112,"edits":4,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration4.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/genericTypeWithMultipleBases3.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/fourslash/completionListInImportClause05.ts","time":140,"edits":5,"cost":"3.91"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType10_ES5.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings04_ES5.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/declaredExternalModuleWithExportAssignment.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/functionsWithModifiersInBlocks1.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/salsa/moduleExportAssignment3.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/conditionalExpressionNewLine1.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclaration5.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/commonJsImportClassExpression.ts","time":56,"edits":2,"cost":"3.91"},{"name":"tests/cases/compiler/noEmitHelpers2.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/salsa/typeFromContextualThisType.ts","time":56,"edits":2,"cost":"3.91"},{"name":"tests/cases/compiler/functionExpressionWithResolutionOfTypeNamedArguments01.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/constraintCheckInGenericBaseTypeReference.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration12.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/es6/templates/templateStringInFunctionExpression.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock3.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates14_ES5.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/commentOnImportStatement2.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration4_es6.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/controlFlow/controlFlowElementAccess.ts","time":56,"edits":2,"cost":"3.91"},{"name":"tests/cases/compiler/computedPropertiesInDestructuring2_ES6.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/returnTypeParameter.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/functionWithDefaultParameterWithNoStatements14.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/lambdaASIEmit.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/filesEmittingIntoSameOutputWithOutOption.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript5/FunctionDeclarations/parserFunctionDeclaration3.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/nestedBlockScopedBindings10.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/constructorArgs.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck7.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/enumsWithMultipleDeclarations3.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/mergeWithImportedType.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/interfaces/declarationMerging/twoMergedInterfacesWithDifferingOverloads2.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames41_ES6.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/wrappedIncovations2.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/invalidTripleSlashReference.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck35.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/functionAndPropertyNameConflict.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/statements/tryStatements/invalidTryStatements.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/anonymousClassExpression1.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/expressions/contextualTyping/functionExpressionContextualTyping2.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/staticAsIdentifier.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakInIterationOrSwitchStatement2.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/cachedModuleResolution4.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/jsxMultilineAttributeValuesReact.tsx","time":56,"edits":2,"cost":"3.91"},{"name":"tests/cases/compiler/modularizeLibrary_UsingES5LibAndES6ArrayLib.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/forInStatement2.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/inferentialTypingUsingApparentType1.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/collisionExportsRequireAndAmbientFunctionInGlobalFile.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/externalModules/importImportOnlyModule.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/SwitchStatements/parserErrorRecovery_SwitchStatement2.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/async/es5/asyncArrowFunction/asyncUnParenthesizedArrowFunction_es5.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/amdDependencyComment1.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/letKeepNamesOfTopLevelItems.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedModuloES6.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/reachabilityChecks4.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript5/Types/parserTypeQuery8.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/es6/Symbols/symbolType2.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/separate1-1.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/unusedPrivateVariableInClass3.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck6.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/misspelledNewMetaProperty.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classAppearsToHaveMembersOfObject.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/module_augmentUninstantiatedModule.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/jsx/tsxAttributeResolution.tsx","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/invalidConstraint1.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/namedFunctionExpressionCall.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript5/MethodSignatures/parserMethodSignature1.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/jsFileCompilationWithMapFileAsJs.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/jsFileCompilationEnumSyntax.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingProtectedStatic.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserForInStatement1.d.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/es5-asyncFunctionElementAccess.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/es6/destructuring/destructuringObjectBindingPatternAndAssignment4.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/unreachableFlowAfterFinally.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/expressions/propertyAccess/propertyAccessNumericLiterals.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/unusedImports14.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/jsx/tsxDynamicTagName6.tsx","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/types/primitives/boolean/validBooleanAssignments.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/unusedSingleParameterInMethodDeclaration.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/functionOverloads14.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType3.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserAmbiguityWithBinaryOperator2.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/contextualTyping40.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/ifElseWithStatements1.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/parameterReferencesOtherParameter1.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript5/parserOptionalTypeMembers1.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/es6/destructuring/restElementWithAssignmentPattern4.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/classWithDuplicateIdentifier.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/expressions/typeGuards/typePredicateOnVariableDeclaration02.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/superPropertyAccessInSuperCall01.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractAccessor.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration1_es2017.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/ambient/ambientExternalModuleMerging.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/moduleImportedForTypeArgumentPosition.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/spaceBeforeQuestionMarkInPropertyAssignment.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/extendedInterfaceGenericType.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target11.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments18.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/unusedTypeParameters7.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/jsFileCompilationTypeAliasSyntax.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/externalModules/invalidSyntaxNamespaceImportWithSystem.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/types/tuple/wideningTuples6.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/es6/templates/templateStringPlainCharactersThatArePartsOfEscapes02_ES6.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/es6/destructuring/destructuringTypeAssertionsES5_3.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/mixingApparentTypeOverrides.ts","time":56,"edits":2,"cost":"3.91"},{"name":"tests/cases/compiler/promiseIdentity2.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/classes/classDeclarations/classAndInterfaceMerge.d.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/errorOnInitializerInInterfaceProperty.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/optionalParamReferencingOtherParams2.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/classIndexer4.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithCallAndConstructSignature.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/statements/for-inStatements/for-inStatementsDestructuring4.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserForInStatement5.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/functionOverloads10.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration5.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of27.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/jsFileCompilationConstModifier.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/stringIndexerAndConstructor1.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/classExtendsInterfaceInExpression.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/statements/breakStatements/invalidForBreakStatements.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/functionExpressionWithResolutionOfTypeOfSameName02.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser645086_2.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/types/tuple/tupleElementTypes2.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/recursiveGenericTypeHierarchy.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/types/import/importTypeNestedNoRef.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolProperty7.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/memberOverride.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction2_es2017.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/fourslash/smartIndentIfStatement.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/varArgConstructorMemberParameter.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/es6/templates/templateStringInNewOperator.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/unionTypeIdentity.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings23_ES6.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/unusedLocalsOnFunctionExpressionWithinFunctionDeclaration1.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/blockScopedFunctionDeclarationStrictES5.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/genericTypeReferencesRequireTypeArgs.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/moduleAssignmentCompat2.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/moduleResolutionWithExtensions_notSupported2.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatInheritsFromItself.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/forInStatement1.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/moduleInTypePosition1.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/amdModuleName1.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/salsa/nestedPrototypeAssignment.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509677.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorInAmbientContext3.d.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/duplicateIdentifierInCatchBlock.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/es2017/useSharedArrayBuffer6.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration3.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/conflictingMemberTypesInBases.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/types/any/anyAsFunctionCall.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/importOnAliasedIdentifiers.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/incompatibleExports1.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/es6/templates/templateStringPlainCharactersThatArePartsOfEscapes02.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck11.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/externalModules/umd7.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/parseObjectLiteralsWithoutTypes.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ExtendsOrImplementsClauses/parserErrorRecovery_ExtendsOrImplementsClause2.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/constructorReturningAPrimitive.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/contextualTyping35.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/fourslash/navbar_contains-no-duplicates.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/externalModules/invalidSyntaxNamespaceImportWithAMD.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/fourslash/smartIndentOnUnclosedFunctionDeclaration01.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel3.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserEmptyParenthesizedExpression1.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserWithStatement2.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/implicitAnyInAmbientDeclaration2.d.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/es6Module.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/es6ClassTest9.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/ambientNameRestrictions.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/contextualTyping23.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/ambient/ambientInsideNonAmbientExternalModule.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/fourslash/typeCheckAfterAddingGenericParameter.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGreaterThanTokenAmbiguity3.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates17_ES5.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/fourslash/jsxBraceCompletionPosition.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/fourslash/navigationBarItemsPropertiesDefinedInConstructors.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/compiler/tripleSlashInCommentNotParsed.ts","time":56,"edits":2,"cost":"3.91"},{"name":"tests/cases/fourslash/smartIndentNamedImport.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/fourslash/paste.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/fourslash/tryCatchFinallyFormating.ts","time":28,"edits":1,"cost":"3.91"},{"name":"tests/cases/fourslash/convertFunctionToEs6Class3.ts","time":139,"edits":5,"cost":"3.91"},{"name":"tests/cases/fourslash/findAllRefsBadImport.ts","time":111,"edits":4,"cost":"3.90"},{"name":"tests/cases/fourslash/findAllRefsExportDefaultClassConstructor.ts","time":83,"edits":3,"cost":"3.90"},{"name":"tests/cases/compiler/typeVariableTypeGuards.ts","time":83,"edits":3,"cost":"3.90"},{"name":"tests/cases/compiler/destructuringAssignment_private.ts","time":83,"edits":3,"cost":"3.90"},{"name":"tests/cases/fourslash/extract-method5.ts","time":138,"edits":5,"cost":"3.90"},{"name":"tests/cases/compiler/controlFlowDestructuringLoop.ts","time":55,"edits":2,"cost":"3.90"},{"name":"tests/cases/compiler/asyncFunctionReturnExpressionErrorSpans.ts","time":55,"edits":2,"cost":"3.90"},{"name":"tests/cases/conformance/moduleResolution/typesVersions.emptyTypes.ts","time":55,"edits":2,"cost":"3.90"},{"name":"tests/cases/fourslash/genericParameterHelp.ts","time":110,"edits":4,"cost":"3.90"},{"name":"tests/cases/compiler/mappedTypeIndexedAccess.ts","time":55,"edits":2,"cost":"3.90"},{"name":"tests/cases/compiler/voidReturnIndexUnionInference.ts","time":55,"edits":2,"cost":"3.90"},{"name":"tests/cases/compiler/modularizeLibrary_Dom.iterable.ts","time":55,"edits":2,"cost":"3.90"},{"name":"tests/cases/compiler/mappedTypeParameterConstraint.ts","time":55,"edits":2,"cost":"3.90"},{"name":"tests/cases/compiler/jsNoImplicitAnyNoCascadingReferenceErrors.ts","time":55,"edits":2,"cost":"3.90"},{"name":"tests/cases/compiler/checkJsObjectLiteralIndexSignatures.ts","time":55,"edits":2,"cost":"3.90"},{"name":"tests/cases/compiler/noImplicitSymbolToString.ts","time":55,"edits":2,"cost":"3.90"},{"name":"tests/cases/compiler/ambientExportDefaultErrors.ts","time":55,"edits":2,"cost":"3.90"},{"name":"tests/cases/compiler/spellingSuggestionLeadingUnderscores01.ts","time":55,"edits":2,"cost":"3.90"},{"name":"tests/cases/compiler/optionsStrictPropertyInitializationStrict.ts","time":55,"edits":2,"cost":"3.90"},{"name":"tests/cases/compiler/promiseDefinitionTest.ts","time":55,"edits":2,"cost":"3.90"},{"name":"tests/cases/fourslash/esModuleInteropFindAllReferences.ts","time":137,"edits":5,"cost":"3.89"},{"name":"tests/cases/fourslash/codeFixAddMissingMember5.ts","time":219,"edits":8,"cost":"3.89"},{"name":"tests/cases/conformance/jsdoc/jsdocTypeTag.ts","time":82,"edits":3,"cost":"3.89"},{"name":"tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts","time":82,"edits":3,"cost":"3.89"},{"name":"tests/cases/compiler/destructuringTempOccursAfterPrologue.ts","time":82,"edits":3,"cost":"3.89"},{"name":"tests/cases/compiler/arrayConcat3.ts","time":82,"edits":3,"cost":"3.89"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax2.ts","time":109,"edits":4,"cost":"3.89"},{"name":"tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts","time":109,"edits":4,"cost":"3.89"},{"name":"tests/cases/compiler/unionExcessPropertyCheckNoApparentPropTypeMismatchErrors.ts","time":54,"edits":2,"cost":"3.88"},{"name":"tests/cases/compiler/declarationEmitLambdaWithMissingTypeParameterNoCrash.ts","time":54,"edits":2,"cost":"3.88"},{"name":"tests/cases/fourslash/moveToNewFile_format.ts","time":81,"edits":3,"cost":"3.88"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates05_ES6.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax24.ts","time":108,"edits":4,"cost":"3.88"},{"name":"tests/cases/compiler/objectLiteral1.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/jsdoc/jsdocParseDotDotDotInJSDocFunction.ts","time":54,"edits":2,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserTryStatement1.d.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/moduleKeywordRepeatError.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/nameCollisionsInPropertyAssignments.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/continueTarget2.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings07_ES5.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/indexerConstraints2.ts","time":81,"edits":3,"cost":"3.88"},{"name":"tests/cases/conformance/es6/destructuring/objectBindingPatternKeywordIdentifiers04.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/callbackArgsDifferByOptionality.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/es6ImportEqualsDeclaration.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction3_es5.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser566700.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/module_augmentExistingVariable.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace05.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts","time":54,"edits":2,"cost":"3.88"},{"name":"tests/cases/compiler/destructuringInVariableDeclarations5.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedModulo.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/jsdoc/jsdocNeverUndefinedNull.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/letDeclarations-scopes-duplicates5.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/requireOfJsonFileWithAlwaysStrictWithoutErrors.ts","time":54,"edits":2,"cost":"3.88"},{"name":"tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/salsa/constructorFunctions2.ts","time":54,"edits":2,"cost":"3.88"},{"name":"tests/cases/conformance/jsdoc/checkJsdocTypeTagOnObjectProperty1.ts","time":54,"edits":2,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/ArrayLiteralExpressions/parserArrayLiteralExpression15.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/emptyModuleName.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/relativeNamesInClassicResolution.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/statements/labeledStatements/labeledStatementWithLabel_strict.ts","time":54,"edits":2,"cost":"3.88"},{"name":"tests/cases/compiler/classMemberWithMissingIdentifier2.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/invariantGenericErrorElaboration.ts","time":54,"edits":2,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType5.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement10.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/cannotInvokeNewOnErrorExpression.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/strictNullEmptyDestructuring.ts","time":54,"edits":2,"cost":"3.88"},{"name":"tests/cases/compiler/duplicateTypeParameters1.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/es6/templates/templateStringPlainCharactersThatArePartsOfEscapes01_ES6.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/moduleAugmentationGlobal8.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionNestedAMD.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/salsa/moduleExportWithExportPropertyAssignment3.ts","time":54,"edits":2,"cost":"3.88"},{"name":"tests/cases/compiler/overloadOnConstConstraintChecks2.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/flowInFinally1.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/declarationEmitExpressionInExtends5.ts","time":54,"edits":2,"cost":"3.88"},{"name":"tests/cases/compiler/illegalModifiersOnClassElements.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/jsdoc/paramTagOnFunctionUsingArguments.ts","time":54,"edits":2,"cost":"3.88"},{"name":"tests/cases/conformance/salsa/moduleExportAssignment2.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/types/typeAliases/classDoesNotDependOnBaseTypes.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/MemberAccessorDeclaration15.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/constEnumMergingWithValues3.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression3.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/expressions/typeGuards/typePredicateASI.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/forInModule.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/collisionSuperAndLocalVarInMethod.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/staticMemberInitialization.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/collisionSuperAndLocalVarInConstructor.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/checkJsObjectLiteralHasCheckedKeyof.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/spreadTypeRemovesReadonly.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/nestedBlockScopedBindings15.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/emitPreComments.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of11.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorInAmbientContext2.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/unusedFunctionsinNamespaces2.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/scopeCheckInsidePublicMethod1.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/interfaceMemberValidation.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement19.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/propertyAccess6.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/moduleNoneErrors.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/badThisBinding.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/standaloneBreak.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser521128.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/isolatedModulesSpecifiedModule.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/types/tuple/wideningTuples3.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/blockScopedBindingsInDownlevelGenerator.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/types/stringLiteral/stringLiteralTypesWithTemplateStrings02.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/propertyAccess5.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/constructorArgsErrors1.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck42.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/functionCall14.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/jsFileCompilationWithoutJsExtensions.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings22_ES6.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/constructorOverloads8.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/staticPrototypeProperty.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/letInConstDeclarations_ES5.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/implicitAnyFunctionOverloadWithImplicitAnyReturnType.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/unusedSingleParameterInFunctionExpression.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/collisionThisExpressionAndAliasInGlobal.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/implementInterfaceAnyMemberWithVoid.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/accessInstanceMemberFromStaticMethod01.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/nestedIndexer.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/missingArgument1.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/Types/parserTypeQuery6.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames47_ES5.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/targetTypingOnFunctions.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/fourslash/breakpointValidationUnaryExpressions.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/constraintErrors1.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/ambientEnumElementInitializer6.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/classMethodWithKeywordName1.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/recursiveObjectLiteral.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/topLevelLambda.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck12.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/extendsClauseAlreadySeen2.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/unusedTypeParameters3.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/es6/templates/templateStringControlCharacterEscapes02_ES6.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames35_ES5.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/extendedInterfacesWithDuplicateTypeParameters.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureWithOptional.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserForStatement5.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/decorators/invalid/decoratorOnEnum.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/externalModules/multipleExportDefault5.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName40.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/missingRequiredDeclare.d.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/collisionExportsRequireAndUninstantiatedModule.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression5_es5.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/typings/typingsLookup1.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/VariableLists/parserVariableStatement2.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardTautologicalConsistiency.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidStaticToString.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/classes/indexMemberDeclarations/publicIndexer.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/downlevelLetConst6.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/references/library-reference-6.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck49.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/classes/indexMemberDeclarations/staticIndexers.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/infinitelyExpandingTypes2.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/voidReturnLambdaValue.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/classes/classDeclarations/classBody/classBodyWithStatements.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/varAndFunctionShareName.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens20.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/Accessors/parserAccessors9.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/superInCatchBlock1.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/async/es6/asyncMultiFile_es6.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughTypeInference.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement13.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature2.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName6.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/noImplicitAnyInBareInterface.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/errorRecoveryWithDotFollowedByNamespaceKeyword.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/duplicateLocalVariable4.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/Expressions/parserTypeAssertionInObjectCreationExpression1.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/inferentialTypingWithFunctionType2.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/types/typeParameters/typeParameterLists/staticMembersUsingClassTypeParameter.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/commentOnExpressionStatement1.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration17.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/isolatedModulesNoExternalModule.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGreaterThanTokenAmbiguity15.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic7.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/enumCodeGenNewLines1.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ClassElements/parserErrorRecovery_ClassElement3.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration6.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType5_ES5.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/inheritanceMemberFuncOverridingProperty.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ParameterLists/parserErrorRecovery_ParameterList2.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/functionOverloads26.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/decoratorMetadataForMethodWithNoReturnTypeAnnotation01.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of55.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/metadataOfClassFromModule.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/exportSpecifierAndLocalMemberDeclaration.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/raiseErrorOnParameterProperty.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/exportStarForValuesInSystem.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/enumWithUnicodeEscape1.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/declarationEmitIndexTypeNotFound.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/augmentArray.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/exportAssignmentWithDeclareModifier.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/enumMapBackIntoItself.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/ParameterList5.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/ClassDeclaration13.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/instanceSubtypeCheck2.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/stringHasStringValuedNumericIndexer.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/externalModules/multipleExportDefault4.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/Expressions/parserAssignmentExpression1.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/dynamicRequire.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/inheritedMembersAndIndexSignaturesFromDifferentBases2.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/contextualTyping29.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/topLevelLambda3.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/parserDebuggerStatement1.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueTarget3.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/functionWithDefaultParameterWithNoStatements12.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement15.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck38.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionAsIs.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/contextualTyping31.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/classStaticPropertyTypeGuard.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/superHasMethodsFromMergedInterface.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/stringIncludes.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration7.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target2.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/parameterPropertyInitializerInInitializers.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/es6/spread/iteratorSpreadInArray11.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/jsFileCompilationAbstractModifier.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractConstructor.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/noBundledEmitFromNodeModules.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/VariableLists/parserErrorRecovery_VariableList1.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/async/es6/asyncSetter_es6.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/es6/templates/templateStringInCallExpression.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/clinterfaces.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/underscoreThisInDerivedClass02.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/recursiveInheritance3.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/types/nonPrimitive/nonPrimitiveRhsSideOfInExpression.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/nodeResolution6.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/types/specifyingTypes/predefinedTypes/objectTypesWithPredefinedTypesAsName2.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates02_ES5.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/reservedNameOnModuleImportWithInterface.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/async/es5/asyncUseStrict_es5.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/compiler/constEnumMergingWithValues5.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/fourslash/indentation.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock4.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/fourslash/incrementalParsing1.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/fourslash/removeDeclareFunctionExports.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/fourslash/formatComments.ts","time":27,"edits":1,"cost":"3.88"},{"name":"tests/cases/conformance/jsdoc/jsdocTypeFromChainedAssignment2.ts","time":80,"edits":3,"cost":"3.86"},{"name":"tests/cases/compiler/crashInGetTextOfComputedPropertyName.ts","time":53,"edits":2,"cost":"3.86"},{"name":"tests/cases/compiler/contextualTypeOfIndexedAccessParameter.ts","time":53,"edits":2,"cost":"3.86"},{"name":"tests/cases/compiler/declarationEmitPrivateNameCausesError.ts","time":53,"edits":2,"cost":"3.86"},{"name":"tests/cases/fourslash/completionsStringLiteral_fromTypeConstraint.ts","time":106,"edits":4,"cost":"3.86"},{"name":"tests/cases/compiler/exportDefaultAbstractClass.ts","time":53,"edits":2,"cost":"3.86"},{"name":"tests/cases/conformance/statements/labeledStatements/labeledStatementWithLabel_es2015.ts","time":53,"edits":2,"cost":"3.86"},{"name":"tests/cases/compiler/indexedAccessTypeConstraints.ts","time":53,"edits":2,"cost":"3.86"},{"name":"tests/cases/compiler/classExtendsInterface_not.ts","time":53,"edits":2,"cost":"3.86"},{"name":"tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts","time":53,"edits":2,"cost":"3.86"},{"name":"tests/cases/compiler/strictNullNotNullIndexTypeShouldWork.ts","time":53,"edits":2,"cost":"3.86"},{"name":"tests/cases/compiler/jsdocCastCommentEmit.ts","time":53,"edits":2,"cost":"3.86"},{"name":"tests/cases/conformance/jsx/tsxSpreadAttributesResolution3.tsx","time":53,"edits":2,"cost":"3.86"},{"name":"tests/cases/conformance/jsdoc/jsdocReturnTag1.ts","time":53,"edits":2,"cost":"3.86"},{"name":"tests/cases/compiler/castFunctionExpressionShouldBeParenthesized.ts","time":53,"edits":2,"cost":"3.86"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_export_invalidName.ts","time":105,"edits":4,"cost":"3.85"},{"name":"tests/cases/fourslash/commentsImportDeclaration.ts","time":131,"edits":5,"cost":"3.85"},{"name":"tests/cases/compiler/emptyObjectNotSubtypeOfIndexSignatureContainingObject1.ts","time":52,"edits":2,"cost":"3.84"},{"name":"tests/cases/conformance/es2019/globalThisTypeIndexAccess.ts","time":26,"edits":1,"cost":"3.84"},{"name":"unittests:: tsbuild - graph-ordering","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/declarationMerging2.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/decorators/invalid/decoratorOnImportEquals2.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/Protected/Protected1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/outModuleConcatUnspecifiedModuleKind.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames25_ES5.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/mixedExports.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedAddition.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion01.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/fourslash/completionsInJsxTag.ts","time":104,"edits":4,"cost":"3.84"},{"name":"tests/cases/compiler/unusedSetterInClass2.ts","time":52,"edits":2,"cost":"3.84"},{"name":"tests/cases/compiler/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/decorators/class/method/decoratorOnClassMethodOverload1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of28.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/es7/trailingCommasInGetter.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/Expressions/parserUnaryExpression7.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/extendingSetWithCheckJs.ts","time":52,"edits":2,"cost":"3.84"},{"name":"tests/cases/compiler/lambdaExpression.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/parserNotRegex1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/commentOnIfStatement1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of57.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation2.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/es6/variableDeclarations/VariableDeclaration13_es6.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens15.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/ObjectTypes/parserObjectType4.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrayLiteralExpressions/parserErrorRecoveryArrayLiteralExpression2.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/multipleClassPropertyModifiers.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/unusedVariablesinModules1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/types/thisType/inferThisType.ts","time":52,"edits":2,"cost":"3.84"},{"name":"tests/cases/conformance/es6/templates/templateStringWithBackslashEscapes01_ES6.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/Types/parserTypeQuery4.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic10.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/Expressions/parserUnaryExpression3.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/implicitAnyInAmbientDeclaration.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments02_ES6.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedConditionalES6.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithConstructSignaturesThatHidesBaseSignature2.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/invocationExpressionInFunctionParameter.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/moduleResolution/scopedPackagesClassic.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/types/union/unionTypeCallSignatures4.ts","time":52,"edits":2,"cost":"3.84"},{"name":"tests/cases/compiler/objectTypeWithOptionalProperty1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/modifierOnParameter1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of5.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/reboundBaseClassSymbol.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/objectLiteral2.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames32_ES5.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration7.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/objectIndexer.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/extendNonClassSymbol2.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/stringIndexerAssignments2.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/classExpressionWithStaticProperties3.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/newLineFlagWithCRLF.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace04.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/commentsBeforeFunctionExpression1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/statements/continueStatements/invalidWhileContinueStatements.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/classExpressionWithResolutionOfNamespaceOfSameName01.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/functionOverloads4.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/ambient/ambientShorthand_merging.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/noStrictGenericChecks.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/jsFileCompilationWithJsEmitPathSameAsInput.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/inheritanceStaticPropertyOverridingProperty.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/badArrayIndex.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/inheritedGenericCallSignature.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/jsFileCompilationClassMethodContainingArrowFunction.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/enumsWithMultipleDeclarations1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer2.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/es6/templates/templateStringTermination4_ES6.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/es6/moduleExportsAmd/anonymousDefaultExportsAmd.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType4_ES6.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/taggedTemplateStringsWithWhitespaceEscapesES6.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/arrowFunctionWithObjectLiteralBody1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithOverloadedCallAndConstructSignatures.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpressionDivideAmbiguity1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/es6/destructuring/objectBindingPatternKeywordIdentifiers06.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/Expressions/parserErrorRecovery_Expression1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature2.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/es6/moduleExportsSystem/anonymousDefaultExportsSystem.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/typeOfPrototype.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/moduleAndInterfaceSharingName2.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/indexSignatureWithAccessibilityModifier.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/returnValueInSetter.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/dynamicModuleTypecheckError.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/staticInterfaceAssignmentCompat.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/es6/yieldExpressions/YieldExpression1_es6.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments12.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/interfacePropertiesWithSameName3.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/recur1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/arrayBufferIsViewNarrowsType.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target3.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions08_ES5.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/controlFlow/controlFlowForInStatement.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/generatorTransformFinalLabel.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/partiallyAmbientClodule.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/defaultValueInFunctionOverload1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/es6/modules/defaultExportWithOverloads01.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/contextualExpressionTypecheckingDoesntBlowStack.ts","time":52,"edits":2,"cost":"3.84"},{"name":"tests/cases/compiler/genericArrayAssignment1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/unterminatedRegexAtEndOfSource1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/typeParameterConstrainedToOuterTypeParameter.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/typeParameterAsBaseClass.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/parserAdditiveExpression1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnfinishedTypeNameBeforeKeyword1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/forInStatement3.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/implementsInClassExpression.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings12_ES6.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/enumIdentifierLiterals.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/extendConstructSignatureInInterface.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck9.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/nodeResolution3.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/destructuringInVariableDeclarations7.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/debugger.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/moduleReopenedTypeOtherBlock.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/ambientEnumElementInitializer5.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration10.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/fourslash/navigationBarItemsModules.ts","time":52,"edits":2,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/unknownPropertiesAreAssignableToObjectUnion.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/forInStatement6.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode9.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/es6ExportEquals.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/scanner/ecmascript5/scanner10.1.1-8gs.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck3.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/emitTopOfFileTripleSlashCommentOnNotEmittedNodeIfRemoveCommentsIsFalse.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/incompatibleExports2.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolIndexer1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/subSubClassCanAccessProtectedConstructor.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/types/typeRelationships/widenedTypes/initializersWidened.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/functionOverloadsOnGenericArity1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors3.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/unusedTypeParameters8.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/instantiateConstraintsToTypeArguments2.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface02.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/multiCallOverloads.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions10_ES5.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration9.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/keyofInferenceLowerPriorityThanReturn.ts","time":52,"edits":2,"cost":"3.84"},{"name":"tests/cases/compiler/exportAssignmentClass.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/emitSuperCallBeforeEmitParameterPropertyDeclaration1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/stringLiteralsErrors.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberVariableDeclarations/parserMemberVariableDeclaration5.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/innerTypeArgumentInference.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/setterWithReturn.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature8.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration23.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors4.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/allowSyntheticDefaultImports9.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/es6/templates/templateStringMultiline1_ES6.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/superCallWithCommentEmit01.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/decorators/invalid/decoratorOnInternalModule.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/functionWithDefaultParameterWithNoStatements8.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/moduleAsBaseType.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType3.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/exportImportNonInstantiatedModule.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral5.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/numberToString.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserWithStatement1.d.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/staticsInAFunction.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithAccessibilityModifiers.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/parserImportDeclaration1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/expressions/asOperator/asOperator4.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/controlFlow/controlFlowBinaryAndExpression.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/catchClauseWithInitializer1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration6.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/declarationEmitTypeAliasTypeParameterExtendingUnknownSymbol.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/ambientFundule.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/newNonReferenceType.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement2.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserFuzz1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/importAndVariableDeclarationConflict2.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/functionAndInterfaceWithSeparateErrors.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration3.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/classes/classDeclarations/classInsideBlock.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionNestedESNext2.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/exportsInAmbientModules2.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty7.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/reachabilityChecks3.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/constDeclarationShadowedByVarDeclaration3.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/duplicateConstructorOverloadSignature2.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/declarationFileOverwriteError.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/fourslash/formattingOnOpenBraceOfFunctions.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/testTypings.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/systemExportAssignment3.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnumDeclaration3.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/compiler/externalModuleWithoutCompilerFlag1.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/parser/ecmascript5/Accessors/parserAccessors3.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/fourslash/indentationBlock.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates16_ES5.ts","time":26,"edits":1,"cost":"3.84"},{"name":"tests/cases/fourslash/codeFixClassExprExtendsAbstractExpressionWithTypeArgs.ts","time":129,"edits":5,"cost":"3.83"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_export_moduleDotExports.ts","time":129,"edits":5,"cost":"3.83"},{"name":"tests/cases/fourslash/completionsImport_exportEquals_anonymous.ts","time":77,"edits":3,"cost":"3.83"},{"name":"tests/cases/fourslash/unusedParameterInConstructor1AddUnderscore.ts","time":128,"edits":5,"cost":"3.82"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_export_namedFunctionExpression.ts","time":128,"edits":5,"cost":"3.82"},{"name":"tests/cases/compiler/functionTypeArgumentArityErrors.ts","time":51,"edits":2,"cost":"3.82"},{"name":"tests/cases/conformance/typings/typingsSuggestion2.ts","time":51,"edits":2,"cost":"3.82"},{"name":"tests/cases/compiler/controlFlowForCompoundAssignmentToThisMember.ts","time":51,"edits":2,"cost":"3.82"},{"name":"tests/cases/compiler/mergedDeclarationExports.ts","time":51,"edits":2,"cost":"3.82"},{"name":"tests/cases/fourslash/indentationInArrays.ts","time":51,"edits":2,"cost":"3.82"},{"name":"tests/cases/conformance/jsdoc/jsdocParseParenthesizedJSDocParameter.ts","time":51,"edits":2,"cost":"3.82"},{"name":"tests/cases/compiler/asyncArrowInClassES5.ts","time":51,"edits":2,"cost":"3.82"},{"name":"tests/cases/fourslash/completionListWithMeanings.ts","time":51,"edits":2,"cost":"3.82"},{"name":"tests/cases/compiler/systemJsForInNoException.ts","time":51,"edits":2,"cost":"3.82"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment24.ts","time":51,"edits":2,"cost":"3.82"},{"name":"tests/cases/conformance/jsdoc/jsdocImportType2.ts","time":51,"edits":2,"cost":"3.82"},{"name":"tests/cases/compiler/exportAssignmentMembersVisibleInAugmentation.ts","time":51,"edits":2,"cost":"3.82"},{"name":"tests/cases/compiler/jsdocTypedefNoCrash.ts","time":51,"edits":2,"cost":"3.82"},{"name":"tests/cases/compiler/capturedParametersInInitializers1.ts","time":51,"edits":2,"cost":"3.82"},{"name":"tests/cases/compiler/moduleResolution_packageJson_yesAtPackageRoot_fakeScopedPackage.ts","time":51,"edits":2,"cost":"3.82"},{"name":"tests/cases/conformance/salsa/moduleExportAlias3.ts","time":51,"edits":2,"cost":"3.82"},{"name":"tests/cases/compiler/typeofStripsFreshness.ts","time":51,"edits":2,"cost":"3.82"},{"name":"tests/cases/fourslash/annotateWithTypeFromJSDoc1.ts","time":127,"edits":5,"cost":"3.82"},{"name":"tests/cases/compiler/destructuringInitializerContextualTypeFromContext.ts","time":76,"edits":3,"cost":"3.81"},{"name":"tests/cases/compiler/indexedAccessRetainsIndexSignature.ts","time":76,"edits":3,"cost":"3.81"},{"name":"tests/cases/fourslash/annotateWithTypeFromJSDoc13.ts","time":126,"edits":5,"cost":"3.81"},{"name":"tests/cases/fourslash/smartSelection_objectTypes.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/restTypeRetainsMappyness.ts","time":50,"edits":2,"cost":"3.80"},{"name":"unittests:: tsserver:: Project Errors dont include overwrite emit error","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/discriminatedUnionInference.ts","time":50,"edits":2,"cost":"3.80"},{"name":"tests/cases/conformance/types/rest/objectRestPropertyMustBeLast.ts","time":50,"edits":2,"cost":"3.80"},{"name":"tests/cases/conformance/expressions/functionCalls/callOverload.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserPublicBreak1.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionNoModuleKindSpecified.ts","time":50,"edits":2,"cost":"3.80"},{"name":"tests/cases/compiler/functionDeclarationWithResolutionOfTypeNamedArguments01.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGreaterThanTokenAmbiguity12.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_export_referenced.ts","time":125,"edits":5,"cost":"3.80"},{"name":"tests/cases/compiler/contextualTypingOfArrayLiterals1.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/types/primitives/null/directReferenceToNull.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/types/primitives/string/stringPropertyAccessWithError.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck32.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/exportSpecifierReferencingOuterDeclaration1.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/multipleExportAssignmentsInAmbientDeclaration.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/testContainerList.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/functionCall2.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/statements/throwStatements/invalidThrowStatement.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/doNotEmitPinnedDetachedComments.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/fourslash/importNameCodeFix_fromPathMapping.ts","time":100,"edits":4,"cost":"3.80"},{"name":"tests/cases/conformance/expressions/asOperator/asOperatorNames.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionNestedES2015.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings25_ES5.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/homomorphicMappedTypeIntersectionAssignability.ts","time":50,"edits":2,"cost":"3.80"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings01_ES5.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyAndFunctionWithSameName.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/concatClassAndString.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/allowImportClausesToMergeWithTypes.ts","time":50,"edits":2,"cost":"3.80"},{"name":"tests/cases/compiler/jsxHasLiteralType.tsx","time":50,"edits":2,"cost":"3.80"},{"name":"tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction1_es5.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/genericFunctionHasFreshTypeArgs.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionNestedES20152.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTwoOperandsAreAny.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration22.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/modularizeLibrary_UsingES5LibES6ArrayLibES6WellknownSymbolLib.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty37.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/Blocks/parserErrorRecovery_Block1.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/importsInAmbientModules2.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/emptyThenWarning.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/contextualTyping37.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/ifStatementInternalComments.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/es6/templates/templateStringInWhileES6.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/functionTypesLackingReturnTypes.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/varInFunctionInVarInitializer.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/statements/breakStatements/forBreakStatements.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/exportDefaultParenthesizeES6.ts","time":50,"edits":2,"cost":"3.80"},{"name":"tests/cases/fourslash/updateToClassStatics.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/controlFlow/controlFlowWithTemplateLiterals.ts","time":50,"edits":2,"cost":"3.80"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings08_ES6.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/inheritedFunctionAssignmentCompatibility.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/enumDeclarationEmitInitializerHasImport.ts","time":50,"edits":2,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/Protected/Protected4.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/functionAssignmentError.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/arrowFunctionMissingCurlyWithSemicolon.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/classWithOverloadImplementationOfWrongName.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/importHelpersNoHelpers.ts","time":50,"edits":2,"cost":"3.80"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatHidesBaseProperty2.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement20.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement9.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/es3-amd.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/fatArrowfunctionAsType.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/genericTypeAssertions3.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedTemplateStringES6.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement19.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/functionOverloads28.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/duplicateLabel4.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/classDeclarationBlockScoping1.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/decorators/class/property/decoratorOnClassProperty10.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserAmbiguity2.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration6_es6.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/declarationEmitOfFuncspace.ts","time":50,"edits":2,"cost":"3.80"},{"name":"tests/cases/compiler/classExpressions.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/voidAsOperator.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/exportEqualNamespaces.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/classImplementsClass1.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck40.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/typecheckIfCondition.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/invalidUseOfTypeAsNamespace.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/multipleBaseInterfaesWithIncompatibleProperties.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/classDeclarationCheckUsedBeforeDefinitionInItself.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/async/es6/asyncInterface_es6.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedNewOperatorES6.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/whileStatementInnerComments.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/isolatedModulesAmbientConstEnum.ts","time":50,"edits":2,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement17.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/es6/Symbols/symbolProperty38.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/unusedInterfaceinNamespace3.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/genericAndNonGenericInheritedSignature1.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/isolatedModulesNoEmitOnError.ts","time":50,"edits":2,"cost":"3.80"},{"name":"tests/cases/compiler/exportDefaultAlias_excludesEverything.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/funduleOfFunctionWithoutReturnTypeAnnotation.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions13_ES5.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/conflictMarkerTrivia3.tsx","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/checkSuperCallBeforeThisAccessing1.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/nestedBlockScopedBindings1.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/yieldExpression1.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/unusedInterfaceinNamespace5.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/taggedTemplateStringsHexadecimalEscapes.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/genericArrayPropertyAssignment.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ParameterLists/parserErrorRecovery_ParameterList4.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/metadataReferencedWithinFilteredUnion.ts","time":50,"edits":2,"cost":"3.80"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck17.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/strictModeReservedWordInModuleDeclaration.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/thisInModuleFunction1.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/letInLetDeclarations_ES5.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/exportEqualsCommonJs.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration18.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolProperty6.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/fourslash/removeDeclareKeyword.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/es6/modules/exportAndImport-es5-amd.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/functionCall8.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/es5-umd.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/types/intersection/intersectionTypeOverloading.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/missingSemicolonInModuleSpecifier.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of7.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment6.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/newFunctionImplicitAny.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck6.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/destructuringInVariableDeclarations4.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/overloadOnConstInheritance1.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/letInConstDeclarations_ES6.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/arrayLiteralInNonVarArgParameter.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/jsxCallbackWithDestructuring.tsx","time":50,"edits":2,"cost":"3.80"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03_ES6.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/decorators/invalid/decoratorOnFunctionExpression.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/destructuringInVariableDeclarations2.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/catchClauseWithTypeAnnotation.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/capturedParametersInInitializers2.ts","time":50,"edits":2,"cost":"3.80"},{"name":"tests/cases/conformance/es6/destructuring/emptyVariableDeclarationBindingPatterns02_ES5.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithLHSIsTypeParameter.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/overloadResolutionOverCTLambda.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/icomparable.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature7.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/functionWithDefaultParameterWithNoStatements13.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/fourslash/shims-pp/getIndentationAtPosition.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/contextualTyping28.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/statements/tryStatements/tryStatements.ts","time":50,"edits":2,"cost":"3.80"},{"name":"tests/cases/compiler/moduleNoneOutFile.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration9.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/es6/destructuring/nonIterableRestElement3.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/classOverloadForFunction.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/getterMissingReturnError.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/binaryArithmatic3.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/noImplicitAnyReferencingDeclaredInterface.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/typeParameterAndArgumentOfSameName1.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueTarget1.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/ClassDeclaration9.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/taggedTemplateStringsWithWhitespaceEscapes.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/expressions/typeGuards/typeGuardNarrowsToLiteralTypeUnion.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/commentsOnReturnStatement1.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive2.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/emptyMemberAccess.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/jsx/tsxAttributeResolution13.tsx","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration2_es6.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/contextualTyping7.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/contextualSigInstantiationRestParams.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration2.d.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/recursiveReturns.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserInterfaceKeywordInEnum.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/nonContextuallyTypedLogicalOr.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserDebuggerStatement1.d.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings13_ES5.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/jsFileCompilationModuleSyntax.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/inheritanceStaticFuncOverridingPropertyOfFuncType.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/infiniteExpandingTypeThroughInheritanceInstantiation.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates08_ES6.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/capturedLetConstInLoop11.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/jsFileCompilationTypeSyntaxOfVar.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/interfaceWithImplements1.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/jsdoc/jsdocAugmentsMissingType.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/modifiersOnInterfaceIndexSignature1.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/genericArrayMethods1.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorInvalidOperations.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens12.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/nestedLoopWithOnlyInnerLetCaptured.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/jsFileClassPropertyType.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/es6/templates/templateStringInEqualityChecks.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/noUnusedLocals_writeOnlyProperty.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/errorTypesAsTypeArguments.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/systemExportAssignment.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/ambient/ambientShorthand_duplicate.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType4.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueInIterationStatement2.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/parservoidInQualifiedName0.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration4.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/shebangBeforeReferences.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/scanner/ecmascript3/scannerES3NumericLiteral7.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/jsFileCompilationOptionalParameter.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck12.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/continueLabel.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/unusedTypeParameterInInterface2.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck3.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/salsa/jsContainerMergeTsDeclaration2.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/reactNamespaceInvalidInput.tsx","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/amdDependencyCommentName2.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/types/primitives/stringLiteral/stringLiteralType.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/importsInAmbientModules3.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/externSemantics.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/continueInIterationStatement1.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/es6/destructuring/destructuringTypeAssertionsES5_4.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/cloduleWithRecursiveReference.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens1.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/thisReferencedInFunctionInsideArrowFunction1.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/compiler/propertyAccess4.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/fourslash/indentationInBlockCommentAfterFormatting.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/fourslash/smartIndentInsideBlockInsideCase.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/fourslash/typeAboveNumberLiteralExpressionStatement.ts","time":25,"edits":1,"cost":"3.80"},{"name":"tests/cases/fourslash/codeFixAddMissingMember_all_js.ts","time":198,"edits":8,"cost":"3.79"},{"name":"tests/cases/fourslash/noSuggestionDiagnosticsOnParseError.ts","time":99,"edits":4,"cost":"3.79"},{"name":"tests/cases/fourslash/extract-method14.ts","time":148,"edits":6,"cost":"3.79"},{"name":"tests/cases/fourslash/annotateWithTypeFromJSDoc17.ts","time":148,"edits":6,"cost":"3.79"},{"name":"tests/cases/compiler/moduleResolutionPackageIdWithRelativeAndAbsolutePath.ts","time":49,"edits":2,"cost":"3.78"},{"name":"tests/cases/compiler/noImplicitAnyNamelessParameter.ts","time":49,"edits":2,"cost":"3.78"},{"name":"tests/cases/fourslash/extract-method-formatting.ts","time":98,"edits":4,"cost":"3.78"},{"name":"tests/cases/conformance/salsa/moduleExportAliasExports.ts","time":49,"edits":2,"cost":"3.78"},{"name":"tests/cases/conformance/types/mapped/mappedTypeInferenceErrors.ts","time":49,"edits":2,"cost":"3.78"},{"name":"tests/cases/compiler/unusedTypeParametersCheckedByNoUnusedParameters.ts","time":49,"edits":2,"cost":"3.78"},{"name":"tests/cases/conformance/jsdoc/jsdocTypeReferenceExports.ts","time":49,"edits":2,"cost":"3.78"},{"name":"tests/cases/conformance/salsa/enumMergeWithExpando.ts","time":49,"edits":2,"cost":"3.78"},{"name":"tests/cases/compiler/intersectionOfTypeVariableHasApparentSignatures.ts","time":49,"edits":2,"cost":"3.78"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionInExportEqualsAMD.ts","time":49,"edits":2,"cost":"3.78"},{"name":"tests/cases/conformance/types/mapped/mappedTypeWithAny.ts","time":49,"edits":2,"cost":"3.78"},{"name":"tests/cases/conformance/jsx/tsxSpreadAttributesResolution14.tsx","time":49,"edits":2,"cost":"3.78"},{"name":"tests/cases/compiler/declarationQuotedMembers.ts","time":49,"edits":2,"cost":"3.78"},{"name":"tests/cases/compiler/classStaticInitializersUsePropertiesBeforeDeclaration.ts","time":49,"edits":2,"cost":"3.78"},{"name":"tests/cases/fourslash/formattingTypeInfer.ts","time":49,"edits":2,"cost":"3.78"},{"name":"tests/cases/conformance/jsx/tsxGenericAttributesType3.tsx","time":73,"edits":3,"cost":"3.77"},{"name":"tests/cases/fourslash/incrementalParsingDynamicImport1.ts","time":73,"edits":3,"cost":"3.77"},{"name":"tests/cases/fourslash/completionsJsPropertyAssignment.ts","time":97,"edits":4,"cost":"3.77"},{"name":"tests/cases/compiler/omitTypeTestErrors01.ts","time":48,"edits":2,"cost":"3.76"},{"name":"unittests:: tsserver:: Project Errors reports Options Diagnostic locations correctly with changes in configFile contents","time":24,"edits":1,"cost":"3.76"},{"name":"unittests:: tsserver:: getEditsForFileRename","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/declarationEmit/typeReferenceRelatedFiles.ts","time":48,"edits":2,"cost":"3.76"},{"name":"tests/cases/compiler/inheritanceStaticPropertyOverridingMethod.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/parserUnicodeWhitespaceCharacter1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/unusedTypeParameterInFunction4.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/accessorWithoutBody2.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/classes/nestedClassDeclaration.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/letInVarDeclOfForOf_ES6.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/incrementOnTypeParameter.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral3.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/unusedTypeParameterInLambda1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/targetTypeTest3.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/declarationEmitPrivateSymbolCausesVarDeclarationEmit2.ts","time":48,"edits":2,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/ArrayLiteralExpressions/parserArrayLiteralExpression10.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/preserveConstEnums.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/asiBreak.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/bind2.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/parameterReferencesOtherParameter2.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/parserX_ArrowFunction4.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/es6/templates/templateStringUnterminated5.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration2.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/es6/templates/templateStringMultiline3.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/variableDeclarationInnerCommentEmit.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/es6/templates/templateStringWithOpenCommentInStringPortion.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/scanner/ecmascript5/scannerImportDeclaration1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/moduleCodegenTest4.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature8.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserEmptyStatement1.d.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/noErrorUsingImportExportModuleAugmentationInDeclarationFile3.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/commentOnStaticMember1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/parameterPropertyOutsideConstructor.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/assignToObjectTypeWithPrototypeProperty.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/ArrayLiteralExpressions/parserArrayLiteralExpression9.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/commentBeforeStaticMethod1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/nodeResolution2.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/parserKeywordsAsIdentifierName1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/moduleResolutionNoResolve.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement8.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens18.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/emitCommentsOnlyFile.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/fourslash/removeInterfaceUsedAsGenericTypeArgument.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/targetEs6DecoratorMetadataImportNotElided.ts","time":48,"edits":2,"cost":"3.76"},{"name":"tests/cases/conformance/decorators/class/constructor/parameter/decoratorOnClassConstructorParameter1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/scanner/ecmascript3/scannerES3NumericLiteral4.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/declFileEmitDeclarationOnlyError1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty4.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/Accessors/parserAccessors8.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/es6/templates/templateStringInSwitchAndCase.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement21.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionNestedUMD.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakNotInIterationOrSwitchStatement1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpressionDivideAmbiguity4.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment28.ts","time":48,"edits":2,"cost":"3.76"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/bivariantInferences.ts","time":48,"edits":2,"cost":"3.76"},{"name":"tests/cases/compiler/mappedTypeMultiInference.ts","time":48,"edits":2,"cost":"3.76"},{"name":"tests/cases/compiler/ambientClassMergesOverloadsWithInterface.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/es6/Symbols/symbolType19.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/sourceMap-SingleSpace1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/fieldAndGetterWithSameName.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/blockScopedFunctionDeclarationInStrictModule.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/async/es2017/asyncMethodWithSuper_es2017.ts","time":48,"edits":2,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/PropertyAssignments/parserFunctionPropertyAssignment2.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/MissingTokens/parserMissingToken1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/es5-umd3.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/jsdoc/typeTagCircularReferenceOnConstructorFunction.ts","time":48,"edits":2,"cost":"3.76"},{"name":"tests/cases/compiler/stringLiteralPropertyNameWithLineContinuation1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/genericConstraint3.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration5.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration7.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/es6/templates/templateStringInEqualityChecksES6.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/classWithEmptyTypeParameter.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/statements/breakStatements/whileBreakStatements.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ParameterLists/parserErrorRecovery_ParameterList6.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/reexportedMissingAlias.ts","time":48,"edits":2,"cost":"3.76"},{"name":"tests/cases/compiler/conditionalExpression1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/es5ModuleWithModuleGenAmd.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithComplexConstraints.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/noCrashOnMixin.ts","time":48,"edits":2,"cost":"3.76"},{"name":"tests/cases/conformance/es6/modules/exportAndImport-es3-amd.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueTarget2.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/jsFileFunctionParametersAsOptional2.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/collectionPatternNoError.ts","time":48,"edits":2,"cost":"3.76"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionIncorrect1.ts","time":48,"edits":2,"cost":"3.76"},{"name":"tests/cases/compiler/functionOverloadsOnGenericArity2.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/types/primitives/boolean/boolInsteadOfBoolean.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/commentsAtEndOfFile1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration9.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/es6-amd.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/moduleReopenedTypeSameBlock.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/statements/continueStatements/doWhileContinueStatements.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/ClassDeclaration22.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/es6/variableDeclarations/VariableDeclaration7_es6.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/es6/templates/templateStringUnterminated1_ES6.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/unusedTypeParameterInFunction1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/errorOnInitializerInObjectTypeLiteralProperty.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/enumWithNaNProperty.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/duplicateConstructorOverloadSignature.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ParameterLists/parserErrorRecovery_ParameterList1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/externalModules/nameDelimitedBySlashes.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments09.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement12.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/assignmentToParenthesizedExpression1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/unusedFunctionsinNamespaces5.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/defaultPropsEmptyCurlyBecomesAnyForJs.ts","time":48,"edits":2,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature10.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration6.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/es6/templates/taggedTemplateStringsWithTagNamedDeclare.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/jsdoc/typedefCrossModule3.ts","time":48,"edits":2,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode12.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/async/es5/asyncAliasReturnType_es5.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/primitiveTypeAsInterfaceName.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/throwWithoutNewLine1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/jsdoc/jsdocAugments_nameMismatch.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/convertKeywords.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/noImplicitAnyFunctionExpressionAssignment.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithOut.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/inheritanceMemberFuncOverridingMethod.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/parse1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserForInStatement6.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions06_ES6.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/ClassDeclaration11.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/continueNotInIterationStatement1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/recursiveGenericSignatureInstantiation.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithWithGenericConstructSignatures.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnPropertySignature1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnumDeclaration1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment3.ts","time":48,"edits":2,"cost":"3.76"},{"name":"tests/cases/compiler/indirectSelfReference.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target4.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/taggedTemplateStringsWithMultilineTemplate.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/systemModule4.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/downlevelLetConst10.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList12.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum3.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/async/es2017/asyncArrowFunction/arrowFunctionWithParameterNameAsync_es2017.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/tsconfigMapOptionsAreCaseInsensitive.ts","time":48,"edits":2,"cost":"3.76"},{"name":"tests/cases/compiler/esModuleInteropPrettyErrorRelatedInformation.ts","time":48,"edits":2,"cost":"3.76"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of4.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/scanner/ecmascript5/scannerStringLiterals.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser645484.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/enumWithPrimitiveName.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/doNotEmitDetachedCommentsAtStartOfLambdaFunction.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/fourslash/switchIndenting.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/FunctionDeclarations/parserFunctionDeclaration1.d.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration2.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/functionWithDefaultParameterWithNoStatements16.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/commentsOnObjectLiteral1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/fourslash/updateSourceFile_jsdocSignature.ts","time":48,"edits":2,"cost":"3.76"},{"name":"tests/cases/compiler/functionWithDefaultParameterWithNoStatements11.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/declareClassInterfaceImplementation.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/compilerOptionsOutFileAndNoEmit.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/salsa/jsContainerMergeTsDeclaration.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/specializedLambdaTypeArguments.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement14.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/jsx/tsxDynamicTagName4.tsx","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck33.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/jsFileCompilationWithOut.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/chainedAssignment2.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/scanner/ecmascript3/scannerES3NumericLiteral2.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/declareModifierOnTypeAlias.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolIndexer3.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/deleteOperatorInStrictMode.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/types/tuple/wideningTuples2.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/externFunc.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType1.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/abstractIdentifierNameStrict.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/strictModeWordInExportDeclaration.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/jsdocUnexpectedCharacter.ts","time":48,"edits":2,"cost":"3.76"},{"name":"tests/cases/compiler/noCollisionThisExpressionInFunctionAndVarInGlobal.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/ambientEnumElementInitializer4.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/collisionThisExpressionAndLocalVarInFunction.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/fourslash/commentsBlocks.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/fourslash/smartIndentNestedModule.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration2_es5.ts","time":24,"edits":1,"cost":"3.76"},{"name":"tests/cases/compiler/APISample_linter.ts","time":72,"edits":3,"cost":"3.76"},{"name":"tests/cases/fourslash/completionsImport_matching.ts","time":167,"edits":7,"cost":"3.75"},{"name":"tests/cases/conformance/types/mapped/recursiveMappedTypes.ts","time":95,"edits":4,"cost":"3.75"},{"name":"tests/cases/conformance/es2017/useObjectValuesAndEntries1.ts","time":71,"edits":3,"cost":"3.75"},{"name":"tests/cases/compiler/eventEmitterPatternWithRecordOfFunction.ts","time":47,"edits":2,"cost":"3.74"},{"name":"tests/cases/conformance/jsdoc/paramTagNestedWithoutTopLevelObject4.ts","time":47,"edits":2,"cost":"3.74"},{"name":"tests/cases/fourslash/completionsImport_ofAlias.ts","time":188,"edits":8,"cost":"3.74"},{"name":"tests/cases/compiler/requireOfJsonFileWithoutEsModuleInterop.ts","time":47,"edits":2,"cost":"3.74"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck13.ts","time":47,"edits":2,"cost":"3.74"},{"name":"tests/cases/compiler/typeGuardOnContainerTypeNoHang.ts","time":47,"edits":2,"cost":"3.74"},{"name":"tests/cases/compiler/nonNullMappedType.ts","time":47,"edits":2,"cost":"3.74"},{"name":"tests/cases/conformance/types/intersection/intersectionAsWeakTypeSource.ts","time":47,"edits":2,"cost":"3.74"},{"name":"tests/cases/compiler/duplicatePackage_withErrors.ts","time":47,"edits":2,"cost":"3.74"},{"name":"tests/cases/fourslash/formattingObjectLiteralOpenCurlySingleLine.ts","time":47,"edits":2,"cost":"3.74"},{"name":"tests/cases/compiler/nestedTypeVariableInfersLiteral.ts","time":47,"edits":2,"cost":"3.74"},{"name":"tests/cases/compiler/taggedTemplatesInDifferentScopes.ts","time":47,"edits":2,"cost":"3.74"},{"name":"tests/cases/compiler/declarationEmitModuleWithScopeMarker.ts","time":47,"edits":2,"cost":"3.74"},{"name":"tests/cases/compiler/declarationEmitAmdModuleDefault.ts","time":47,"edits":2,"cost":"3.74"},{"name":"tests/cases/compiler/baseConstraintOfDecorator.ts","time":47,"edits":2,"cost":"3.74"},{"name":"tests/cases/compiler/metadataOfClassFromAlias.ts","time":47,"edits":2,"cost":"3.74"},{"name":"tests/cases/compiler/baseClassImprovedMismatchErrors.ts","time":47,"edits":2,"cost":"3.74"},{"name":"tests/cases/fourslash/docCommentTemplateFunctionExpression.ts","time":47,"edits":2,"cost":"3.74"},{"name":"tests/cases/fourslash/completionsImport_previousTokenIsSemicolon.ts","time":141,"edits":6,"cost":"3.74"},{"name":"tests/cases/fourslash/annotateWithTypeFromJSDoc18.ts","time":164,"edits":7,"cost":"3.74"},{"name":"tests/cases/compiler/unusedInvalidTypeArguments.ts","time":70,"edits":3,"cost":"3.73"},{"name":"tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts","time":46,"edits":2,"cost":"3.72"},{"name":"tests/cases/conformance/decorators/invalid/decoratorOnEnum2.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement13.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/overloadOnConstInBaseWithBadImplementationInDerived.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/superCallFromClassThatDerivesFromGenericType1.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/types/tuple/wideningTuples1.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration13_es6.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/jsFileCompilationTypeAssertions.ts","time":46,"edits":2,"cost":"3.72"},{"name":"tests/cases/compiler/commentOnAmbientVariable2.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings07_ES6.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/reExportGlobalDeclaration1.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/recursiveResolveDeclaredMembers.ts","time":46,"edits":2,"cost":"3.72"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGreaterThanTokenAmbiguity11.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates20_ES5.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/downlevelLetConst2.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/moduleAugmentationOfAlias.ts","time":46,"edits":2,"cost":"3.72"},{"name":"tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMethodWithImplementation.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/unusedImports_entireImportDeclaration.ts","time":46,"edits":2,"cost":"3.72"},{"name":"tests/cases/compiler/module_augmentExistingAmbientVariable.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/emitBundleWithShebangAndPrologueDirectives1.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/es5-asyncFunctionHoisting.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/jsxFactoryAndFragment.tsx","time":46,"edits":2,"cost":"3.72"},{"name":"tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration8.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/jsdoc/jsdocAugments_errorInExtendsExpression.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/inferentiallyTypingAnEmptyArray.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/es2017/useSharedArrayBuffer1.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/parser/ecmascript5/Expressions/parserObjectCreation2.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/unterminatedStringLiteralWithBackslash1.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/parser/ecmascript5/ObjectTypes/parserObjectType2.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/duplicateLabel1.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionNestedSystem.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/duplicateTypeParameters3.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/declarationEmitConstantNoWidening.ts","time":46,"edits":2,"cost":"3.72"},{"name":"tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens4.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/async/es5/asyncConstructor_es5.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/importHelpersAmd.ts","time":46,"edits":2,"cost":"3.72"},{"name":"tests/cases/compiler/indexer3.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/functionOverloads6.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/functionWithDefaultParameterWithNoStatements1.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedArrayES6.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/continueTarget4.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/es6/templates/templateStringTermination3.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/fourslash/whiteSpaceTrimming2.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGreaterThanTokenAmbiguity20.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/es6/templates/templateStringControlCharacterEscapes04.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/letInVarDeclOfForOf_ES5.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/recursiveGetterAccess.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions05_ES6.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedFunctionExpression.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/scanner/ecmascript5/scannerNumericLiteral9.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/signatureInstantiationWithRecursiveConstraints.ts","time":46,"edits":2,"cost":"3.72"},{"name":"tests/cases/compiler/functionWithDefaultParameterWithNoStatements10.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/binaryArithmatic1.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck2.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/cloduleWithPriorUninstantiatedModule.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/collisionThisExpressionAndModuleInGlobal.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/ClassDeclaration10.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/es6/templates/templateStringInConditionalES6.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclarationCapturesArguments_es5.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserThrowStatement1.d.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/recursiveFunctionTypes1.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/es5andes6module.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/moduleAugmentationGlobal7.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/restParameterNoTypeAnnotation.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/interface0.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/bom-utf16le.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/downlevelLetConst9.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/propertyAccess3.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions12_ES6.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/es6/destructuring/declarationWithNoInitializer.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions06_ES5.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/withStatementInternalComments.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/ambient/ambientEnumDeclaration2.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/SourceUnits/parserErrorRecovery_SourceUnit1.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/declarationEmitPrivateReadonlyLiterals.ts","time":46,"edits":2,"cost":"3.72"},{"name":"tests/cases/compiler/staticGetter2.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/VariableLists/parserVariableStatement1.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration7.d.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/classStaticPropertyAccess.ts","time":46,"edits":2,"cost":"3.72"},{"name":"tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/commentOnAmbientClass1.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens5.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/es5ModuleWithoutModuleGenTarget.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/externSyntax.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsInAmbientContext.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/es5-amd.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/importDeclWithExportModifierInAmbientContext.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/staticIndexer.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/nonConflictingRecursiveBaseTypeMembers.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions11_ES6.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/fileWithNextLine2.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/jsdoc/jsdocParseErrorsInTypescript.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/unionTypeWithLeadingOperator.ts","time":46,"edits":2,"cost":"3.72"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueTarget5.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/conflictMarkerTrivia4.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/parser/ecmascript5/FunctionDeclarations/parserFunctionDeclaration2.d.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/moduleResolutionWithExtensions_unexpected2.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/switchCases.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/scanner/ecmascript5/scannerNumericLiteral5.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/exportInFunction.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/downlevelLetConst3.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/es6/modules/multipleDefaultExports04.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakTarget3.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGenericClass1.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/functions/functionOverloadCompatibilityWithVoid03.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings11_ES5.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/objectLiteralMemberWithQuestionMark1.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ExtendsOrImplementsClauses/parserErrorRecovery_ExtendsOrImplementsClause1.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace01.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserIfStatement2.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/quotedPropertyName1.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/parser/ecmascript5/parserDebuggerStatement2.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/commentsPropertySignature1.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/contextualTyping34.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/VariableLists/parserVariableStatement4.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/nonMergedOverloads.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/fourslash/navigationBarMerging.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/classMemberInitializerWithLamdaScoping2.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment1.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/staticMustPrecedePublic.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/staticModifierAlreadySeen.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/functionWithDefaultParameterWithNoStatements15.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/functionOverloads12.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/bom-utf8.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/binopAssignmentShouldHaveType.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/noImplicitAnyForwardReferencedInterface.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/ParameterList7.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/fourslash/formatInTsxFiles.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/compiler/jsFileCompilationDecoratorSyntax.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/parser/ecmascript5/ArrayLiteralExpressions/parserArrayLiteralExpression3.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/parser/ecmascript5/MethodSignatures/parserMethodSignature8.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/conformance/parser/ecmascript5/VariableDeclarations/parserVariableDeclaration6.ts","time":23,"edits":1,"cost":"3.72"},{"name":"tests/cases/fourslash/findAllReferencesUmdModuleAsGlobalConst.ts","time":69,"edits":3,"cost":"3.72"},{"name":"tests/cases/conformance/jsdoc/typedefTagWrapping.ts","time":68,"edits":3,"cost":"3.70"},{"name":"tests/cases/compiler/checkIndexConstraintOfJavascriptClassExpression.ts","time":68,"edits":3,"cost":"3.70"},{"name":"tests/cases/compiler/incrementalConfig.ts","time":45,"edits":2,"cost":"3.69"},{"name":"tests/cases/conformance/es2019/globalThisCollision.ts","time":45,"edits":2,"cost":"3.69"},{"name":"tests/cases/conformance/types/conditional/variance.ts","time":45,"edits":2,"cost":"3.69"},{"name":"tests/cases/compiler/variableDeclarationDeclarationEmitUniqueSymbolPartialStatement.ts","time":45,"edits":2,"cost":"3.69"},{"name":"tests/cases/conformance/jsx/tsxDefaultAttributesResolution2.tsx","time":45,"edits":2,"cost":"3.69"},{"name":"tests/cases/compiler/exportAsNamespace_augment.ts","time":45,"edits":2,"cost":"3.69"},{"name":"tests/cases/compiler/anonymousClassDeclarationDoesntPrintWithReadonly.ts","time":45,"edits":2,"cost":"3.69"},{"name":"tests/cases/compiler/forInStrictNullChecksNoError.ts","time":45,"edits":2,"cost":"3.69"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck14.ts","time":45,"edits":2,"cost":"3.69"},{"name":"tests/cases/compiler/bindingPatternOmittedExpressionNesting.ts","time":45,"edits":2,"cost":"3.69"},{"name":"tests/cases/fourslash/formattingDecorators.ts","time":45,"edits":2,"cost":"3.69"},{"name":"tests/cases/conformance/types/typeRelationships/comparable/independentPropertyVariance.ts","time":45,"edits":2,"cost":"3.69"},{"name":"tests/cases/compiler/jsdocResolveNameFailureInTypedef.ts","time":45,"edits":2,"cost":"3.69"},{"name":"tests/cases/conformance/types/rest/genericRestArityStrict.ts","time":45,"edits":2,"cost":"3.69"},{"name":"tests/cases/conformance/types/spread/spreadUnion2.ts","time":45,"edits":2,"cost":"3.69"},{"name":"tests/cases/compiler/indexedAccessCanBeHighOrder.ts","time":45,"edits":2,"cost":"3.69"},{"name":"tests/cases/fourslash/convertFunctionToEs6Class1.ts","time":112,"edits":5,"cost":"3.69"},{"name":"tests/cases/fourslash/codeFixAddMissingMember6.ts","time":134,"edits":6,"cost":"3.69"},{"name":"tests/cases/fourslash/completionsImport_default_exportDefaultIdentifier.ts","time":134,"edits":6,"cost":"3.69"},{"name":"tests/cases/fourslash/annotateWithTypeFromJSDoc12.ts","time":133,"edits":6,"cost":"3.68"},{"name":"tests/cases/conformance/es6/for-ofStatements/for-of8.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnumDeclaration2.d.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/esModuleInteropEnablesSyntheticDefaultImports.ts","time":44,"edits":2,"cost":"3.67"},{"name":"tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule02.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts","time":44,"edits":2,"cost":"3.67"},{"name":"tests/cases/compiler/unexpectedStatementBlockTerminator.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/fourslash/extract-method7.ts","time":110,"edits":5,"cost":"3.67"},{"name":"tests/cases/compiler/augmentedTypesClass4.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/es6/destructuring/destructuringTypeAssertionsES5_1.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/controlFlow/controlFlowForOfStatement.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueInIterationStatement4.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithSuperMethodCall01.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/externalModuleReferenceOfImportDeclarationWithExportModifier.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignmentWithExport.ts","time":44,"edits":2,"cost":"3.67"},{"name":"tests/cases/fourslash/codeFixChangeJSDocSyntax21.ts","time":110,"edits":5,"cost":"3.67"},{"name":"tests/cases/compiler/reverseMappedContravariantInference.ts","time":44,"edits":2,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.decimal.ts","time":44,"edits":2,"cost":"3.67"},{"name":"tests/cases/compiler/continueInIterationStatement2.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/fourslash/removeInterfaceExtendsClause.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates03_ES5.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/importUsedInGenericImportResolves.ts","time":44,"edits":2,"cost":"3.67"},{"name":"tests/cases/conformance/es6/templates/templateStringInTypeOf.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/continueTarget1.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens9.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/unusedInterfaceinNamespace2.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/declarationFunctionTypeNonlocalShouldNotBeAnError.ts","time":44,"edits":2,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascript5/ArrayLiteralExpressions/parserArrayLiteralExpression6.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.binaryNegative.ts","time":44,"edits":2,"cost":"3.67"},{"name":"tests/cases/conformance/es6/templates/templateStringUnterminated2.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/indirectUniqueSymbolDeclarationEmit.ts","time":44,"edits":2,"cost":"3.67"},{"name":"tests/cases/conformance/jsdoc/thisTag1.ts","time":44,"edits":2,"cost":"3.67"},{"name":"tests/cases/compiler/emptyFile.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/jsdocTypeNongenericInstantiationAttempt.ts","time":44,"edits":2,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode3.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/salsa/constructorFunctionMergeWithClass.ts","time":44,"edits":2,"cost":"3.67"},{"name":"tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration4_es5.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/jsx/tsxIntrinsicAttributeErrors.tsx","time":44,"edits":2,"cost":"3.67"},{"name":"tests/cases/conformance/async/es5/asyncDeclare_es5.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/expressions/assignmentOperator/assignmentGenericLookupTypeNarrowing.ts","time":44,"edits":2,"cost":"3.67"},{"name":"tests/cases/compiler/mutuallyRecursiveInterfaceDeclaration.ts","time":44,"edits":2,"cost":"3.67"},{"name":"tests/cases/compiler/importHelpersSystem.ts","time":44,"edits":2,"cost":"3.67"},{"name":"tests/cases/conformance/es6/templates/templateStringInPropertyAssignment.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascript5/VariableDeclarations/parserVariableDeclaration7.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/functionExpressionInWithBlock.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/checkJsFiles4.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGreaterThanTokenAmbiguity19.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascript5/ArrayLiteralExpressions/parserArrayLiteralExpression7.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/pinnedComments1.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/types/mapped/mappedTypeErrors2.ts","time":44,"edits":2,"cost":"3.67"},{"name":"tests/cases/compiler/flowControlTypeGuardThenSwitch.ts","time":44,"edits":2,"cost":"3.67"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedConditional.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGreaterThanTokenAmbiguity8.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpression1.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens19.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/es2018/useRegexpGroups.ts","time":44,"edits":2,"cost":"3.67"},{"name":"tests/cases/compiler/alwaysStrictModule6.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascript5/MethodSignatures/parserMethodSignature2.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/moduleAugmentationGlobal6.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterIndirectlyConstrainedToItself.ts","time":44,"edits":2,"cost":"3.67"},{"name":"tests/cases/conformance/es6/destructuring/destructuringReassignsRightHandSide.ts","time":44,"edits":2,"cost":"3.67"},{"name":"tests/cases/compiler/inferredFunctionReturnTypeIsEmptyType.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration2.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/switchCaseNarrowsMatchingClausesEvenWhenNonMatchingClausesExist.ts","time":44,"edits":2,"cost":"3.67"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings12_ES5.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/primitiveTypeAsClassName.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens10.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/jsFileClassSelfReferencedProperty.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings06_ES5.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/parsingClassRecoversWhenHittingUnexpectedSemicolon.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions13_ES6.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/functionWithAnyReturnTypeAndNoReturnExpression.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/jsFileCompilationReturnTypeSyntaxOfFunction.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates15_ES5.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/primitiveTypeAsmoduleName.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/functionOverloads33.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/nodeResolution1.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/selfReferencingFile.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/resolveInterfaceNameWithSameLetDeclarationName2.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/isLiteral2.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/fourslash/formattingWithMultilineComments.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/identityForSignaturesWithTypeParametersSwitched.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/functionWithDefaultParameterWithNoStatements6.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/es6/templates/templateStringTermination3_ES6.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/genericConstructSignatureInInterface.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode6-negative.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/decoratorWithUnderscoreMethod.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/breakInIterationOrSwitchStatement1.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserConstructorAmbiguity3.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/scanner/ecmascript5/scannerS7.4_A2_T2.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic11.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration17.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/tsxAttributesHasInferrableIndex.tsx","time":44,"edits":2,"cost":"3.67"},{"name":"tests/cases/compiler/fileWithNextLine1.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/es6/destructuring/objectBindingPatternKeywordIdentifiers05.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascript5/ArrayLiteralExpressions/parserArrayLiteralExpression5.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.octal.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/doNotEmitDetachedCommentsAtStartOfFunctionBody.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/destructuringWithNumberLiteral.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ClassElements/parserErrorRecovery_ClassElement1.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/exportAssignmentWithDeclareAndExportModifiers.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/partiallyAmbientFundule.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions12_ES5.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/commentOnParameter3.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/doWhileLoop.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates09_ES5.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/reservedNameOnModuleImport.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/letInVarDeclOfForIn_ES5.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/fourslash/shims/getSyntacticClassifications.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGenericClass2.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode11.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/collisionRestParameterUnderscoreIUsage.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/classMemberInitializerWithLamdaScoping5.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/uncaughtCompilerError2.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates19_ES5.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings23_ES5.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates05_ES5.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/es6/templates/templateStringInDeleteExpression.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/fourslash/deleteClassWithEnumPresent.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/fourslash/aliasToVarUsedAsType.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/compiler/returnStatement1.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature3.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueInIterationStatement1.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/fourslash/formatImplicitModule.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/fourslash/formatNestedClassWithOpenBraceOnNewLines.ts","time":22,"edits":1,"cost":"3.67"},{"name":"tests/cases/fourslash/goToDefinitionSignatureAlias.ts","time":152,"edits":7,"cost":"3.66"},{"name":"tests/cases/compiler/isolatedModulesReExportType.ts","time":65,"edits":3,"cost":"3.66"},{"name":"tests/cases/fourslash/completionsPaths_pathMapping.ts","time":172,"edits":8,"cost":"3.65"},{"name":"tests/cases/conformance/statements/labeledStatements/labeledStatementWithLabel.ts","time":43,"edits":2,"cost":"3.65"},{"name":"tests/cases/compiler/duplicatePackage_relativeImportWithinPackage_scoped.ts","time":43,"edits":2,"cost":"3.65"},{"name":"tests/cases/conformance/externalModules/exportClassNameWithObjectSystem.ts","time":43,"edits":2,"cost":"3.65"},{"name":"tests/cases/compiler/elaborationForPossiblyCallableTypeStillReferencesArgumentAtTopLevel.ts","time":43,"edits":2,"cost":"3.65"},{"name":"tests/cases/compiler/moduleResolutionWithExtensions_notSupported3.ts","time":43,"edits":2,"cost":"3.65"},{"name":"tests/cases/compiler/declarationEmitIndexTypeArray.ts","time":43,"edits":2,"cost":"3.65"},{"name":"tests/cases/compiler/errorsWithInvokablesInUnions01.ts","time":43,"edits":2,"cost":"3.65"},{"name":"tests/cases/compiler/narrowedImports_assumeInitialized.ts","time":43,"edits":2,"cost":"3.65"},{"name":"tests/cases/fourslash/tsxFindAllReferences8.ts","time":43,"edits":2,"cost":"3.65"},{"name":"tests/cases/compiler/exportAssignmentImportMergeNoCrash.ts","time":43,"edits":2,"cost":"3.65"},{"name":"tests/cases/compiler/parseEntityNameWithReservedWord.ts","time":43,"edits":2,"cost":"3.65"},{"name":"tests/cases/compiler/moduleResolutionWithSymlinks_preserveSymlinks.ts","time":43,"edits":2,"cost":"3.65"},{"name":"tests/cases/compiler/arrayFind.ts","time":43,"edits":2,"cost":"3.65"},{"name":"tests/cases/conformance/controlFlow/controlFlowStringIndex.ts","time":43,"edits":2,"cost":"3.65"},{"name":"tests/cases/conformance/salsa/inferringClassMembersFromAssignments4.ts","time":43,"edits":2,"cost":"3.65"},{"name":"tests/cases/fourslash/formattingAwait.ts","time":43,"edits":2,"cost":"3.65"},{"name":"tests/cases/conformance/jsdoc/jsdocIndexSignature.ts","time":64,"edits":3,"cost":"3.64"},{"name":"tests/cases/fourslash/completionsImportBaseUrl.ts","time":106,"edits":5,"cost":"3.64"},{"name":"tests/cases/fourslash/codeFixAddMissingMember2.ts","time":127,"edits":6,"cost":"3.63"},{"name":"tests/cases/fourslash/docCommentTemplatePrototypeMethod.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/discriminateObjectTypesOnly.ts","time":42,"edits":2,"cost":"3.63"},{"name":"unittests:: tsserver:: typingsInstaller:: Invalid package names","time":21,"edits":1,"cost":"3.63"},{"name":"unittests:: tsserver:: Text storage","time":21,"edits":1,"cost":"3.63"},{"name":"unittests:: services:: Colorization","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/es2018ObjectAssign.ts","time":42,"edits":2,"cost":"3.63"},{"name":"tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList17.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/errorLocationForInterfaceExtension.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/indexerAssignability.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/jsdoc/jsdocParseHigherOrderFunction.ts","time":42,"edits":2,"cost":"3.63"},{"name":"tests/cases/conformance/es6/modules/multipleDefaultExports02.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/es6/classDeclaration/classWithSemicolonClassElementES61.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/invalidUnicodeEscapeSequance.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/requireOfJsonFileWithoutResolveJsonModule.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature1.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/functionParameterArityMismatch.ts","time":42,"edits":2,"cost":"3.63"},{"name":"tests/cases/compiler/narrowUnknownByTypeofObject.ts","time":42,"edits":2,"cost":"3.63"},{"name":"tests/cases/compiler/esModuleInteropImportDefaultWhenAllNamedAreDefaultAlias.ts","time":42,"edits":2,"cost":"3.63"},{"name":"tests/cases/conformance/scanner/ecmascript5/scannerNumericLiteral1.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates01_ES5.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/commentOnImportStatement1.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/es2017/useObjectValuesAndEntries2.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/types/primitives/void/validVoidValues.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/typeAliasFunctionTypeSharedSymbol.ts","time":42,"edits":2,"cost":"3.63"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot_multipleAliases.ts","time":42,"edits":2,"cost":"3.63"},{"name":"tests/cases/conformance/parser/ecmascript5/Protected/Protected8.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/moduleRedifinitionErrors.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/parser/ecmascript5/parserUnicode2.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/parser/ecmascript5/Expressions/parserUnaryExpression4.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/typeParameterAssignmentWithConstraints.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/typings/typingsLookup2.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedTemplateString.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/externalModules/exportClassNameWithObjectAMD.ts","time":42,"edits":2,"cost":"3.63"},{"name":"tests/cases/compiler/jsFileCompilationAmbientVarDeclarationSyntax.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/parser/ecmascript5/Accessors/parserAccessors4.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/importHelpersNoHelpersForAsyncGenerators.ts","time":42,"edits":2,"cost":"3.63"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement1.d.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/thisInTupleTypeParameterConstraints.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser596700.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/typeParameterAsElementType.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGreaterThanTokenAmbiguity10.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/specializedSignatureInInterface.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic5.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates11_ES5.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/parser/ecmascript5/StrictMode/octalLiteralInStrictModeES3.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/jsFileCompilationSyntaxError.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/arrowFunctionInExpressionStatement2.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/es6/templates/templateStringWithEmbeddedComments.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/functionWithDefaultParameterWithNoStatements2.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes2.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType2.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserVariableStatement2.d.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/moduleNoEmit.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/downlevelLetConst7.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/exhaustiveSwitchImplicitReturn.ts","time":42,"edits":2,"cost":"3.63"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment34.ts","time":42,"edits":2,"cost":"3.63"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser645086_4.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/duplicateLabel3.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/nonexistentPropertyUnavailableOnPromisedType.ts","time":42,"edits":2,"cost":"3.63"},{"name":"tests/cases/compiler/typeParameterInConstraint1.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/prefixIncrementAsOperandOfPlusExpression.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions05_ES5.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/bom-utf16be.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/unicodeIdentifierNames.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/fourslash/formatTemplateLiteral.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueNotInIterationStatement1.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/parser/ecmascript5/parserUnicode3.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings02_ES5.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/modularizeLibrary_UsingES5LibAndES6FeatureLibs.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/scanner/ecmascript5/scannerNumericLiteral7.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/parser/ecmascript5/Generics/parserGreaterThanTokenAmbiguity5.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration11.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates08_ES5.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceProperty.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions19_ES5.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/noSelfOnVars.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/noImplicitUseStrict_commonjs.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/fourslash/indentationInJsx2.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/fourslash/chainedFunctionLambdaArgIndex.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/compiler/noDefaultLib.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/fourslash/indentationInAugmentations1.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/fourslash/navigationBarItemsTypeAlias.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/fourslash/semicolonFormattingNewline.ts","time":21,"edits":1,"cost":"3.63"},{"name":"tests/cases/fourslash/findAllRefsForComputedProperties.ts","time":105,"edits":5,"cost":"3.63"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_export_alias.ts","time":105,"edits":5,"cost":"3.63"},{"name":"tests/cases/compiler/typeArgumentDefaultUsesConstraintOnCircularDefault.ts","time":63,"edits":3,"cost":"3.63"},{"name":"tests/cases/fourslash/completionInJSDocFunctionThis.ts","time":146,"edits":7,"cost":"3.62"},{"name":"tests/cases/fourslash/extract-method-uniqueName.ts","time":125,"edits":6,"cost":"3.62"},{"name":"tests/cases/compiler/abstractPropertyInConstructor.ts","time":104,"edits":5,"cost":"3.62"},{"name":"tests/cases/fourslash/completionsImport_named_exportEqualsNamespace.ts","time":83,"edits":4,"cost":"3.61"},{"name":"tests/cases/fourslash/annotateWithTypeFromJSDoc19.ts","time":124,"edits":6,"cost":"3.61"},{"name":"tests/cases/conformance/jsdoc/jsdocTemplateClass.ts","time":62,"edits":3,"cost":"3.61"},{"name":"tests/cases/fourslash/completionsRecommended_namespace.ts","time":62,"edits":3,"cost":"3.61"},{"name":"tests/cases/conformance/es6/modules/multipleDefaultExports05.ts","time":41,"edits":2,"cost":"3.60"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/instanceMemberWithComputedPropertyName.ts","time":41,"edits":2,"cost":"3.60"},{"name":"tests/cases/conformance/parser/ecmascript5/parserParenthesizedVariableAndFunctionInTernary.ts","time":41,"edits":2,"cost":"3.60"},{"name":"tests/cases/compiler/typeParameterDoesntBlockParameterLookup.ts","time":41,"edits":2,"cost":"3.60"},{"name":"tests/cases/conformance/jsdoc/paramTagTypeResolution.ts","time":41,"edits":2,"cost":"3.60"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution_rootImport_noAliasWithRoot.ts","time":41,"edits":2,"cost":"3.60"},{"name":"tests/cases/conformance/jsx/tsxAttributeResolution16.tsx","time":41,"edits":2,"cost":"3.60"},{"name":"tests/cases/compiler/constEnumNamespaceReferenceCausesNoImport.ts","time":41,"edits":2,"cost":"3.60"},{"name":"tests/cases/compiler/mappedTypeNoTypeNoCrash.ts","time":41,"edits":2,"cost":"3.60"},{"name":"tests/cases/conformance/externalModules/esnext/exnextmodulekindExportClassNameWithObject.ts","time":41,"edits":2,"cost":"3.60"},{"name":"tests/cases/compiler/reexportDefaultIsCallable.ts","time":41,"edits":2,"cost":"3.60"},{"name":"tests/cases/conformance/salsa/moduleExportAlias4.ts","time":41,"edits":2,"cost":"3.60"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment6.ts","time":41,"edits":2,"cost":"3.60"},{"name":"tests/cases/compiler/computerPropertiesInES5ShouldBeTransformed.ts","time":41,"edits":2,"cost":"3.60"},{"name":"tests/cases/compiler/mappedTypePartialConstraints.ts","time":41,"edits":2,"cost":"3.60"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_expressionToDeclaration.ts","time":142,"edits":7,"cost":"3.59"},{"name":"tests/cases/fourslash/server/convertFunctionToEs6Class-server.ts","time":141,"edits":7,"cost":"3.58"},{"name":"tests/cases/fourslash/moveToNewFile_moveJsxImport4.ts","time":40,"edits":2,"cost":"3.58"},{"name":"tests/cases/compiler/incrementalOut.ts","time":40,"edits":2,"cost":"3.58"},{"name":"tests/cases/compiler/genericIsNeverEmptyObject.ts","time":40,"edits":2,"cost":"3.58"},{"name":"tests/cases/conformance/jsdoc/paramTagNestedWithoutTopLevelObject3.ts","time":40,"edits":2,"cost":"3.58"},{"name":"unittests:: tsserver:: typingsInstaller:: telemetry events","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/restArgMissingName.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/indexSignatureTypeCheck.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/cachedModuleResolution7.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/resolveInterfaceNameWithSameLetDeclarationName1.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/decoratorMetadataGenericTypeVariableInScope.ts","time":40,"edits":2,"cost":"3.58"},{"name":"tests/cases/compiler/classOverloadForFunction2.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/ambientModuleWithClassDeclarationWithExtends.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/constEnumMergingWithValues2.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments10.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/conformance/statements/for-ofStatements/ES5For-of2.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/esModuleInteropTslibHelpers.ts","time":40,"edits":2,"cost":"3.58"},{"name":"tests/cases/conformance/jsdoc/jsdocTemplateConstructorFunction.ts","time":60,"edits":3,"cost":"3.58"},{"name":"tests/cases/compiler/forwardRefInClassProperties.ts","time":40,"edits":2,"cost":"3.58"},{"name":"tests/cases/conformance/jsdoc/enumTag.ts","time":60,"edits":3,"cost":"3.58"},{"name":"tests/cases/conformance/scanner/ecmascript3/scannerES3NumericLiteral1.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/strictTypeofUnionNarrowing.ts","time":40,"edits":2,"cost":"3.58"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/ReturnStatements/parserReturnStatement3.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakInIterationOrSwitchStatement1.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/continueInIterationStatement3.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts","time":40,"edits":2,"cost":"3.58"},{"name":"tests/cases/conformance/parser/ecmascript5/ArrayLiteralExpressions/parserArrayLiteralExpression11.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/classExtendingAny.ts","time":40,"edits":2,"cost":"3.58"},{"name":"tests/cases/compiler/downlevelLetConst8.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/exportDefaultMarksIdentifierAsUsed.ts","time":40,"edits":2,"cost":"3.58"},{"name":"tests/cases/compiler/commentOnParameter2.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/abstractInterfaceIdentifierName.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/exportDefaultFunctionInNamespace.ts","time":40,"edits":2,"cost":"3.58"},{"name":"tests/cases/compiler/breakTarget3.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/conformance/salsa/moduleExportWithExportPropertyAssignment2.ts","time":40,"edits":2,"cost":"3.58"},{"name":"tests/cases/compiler/exportAsNamespace.d.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/alwaysStrictModule3.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution_rootImport_aliasWithRoot.ts","time":40,"edits":2,"cost":"3.58"},{"name":"tests/cases/conformance/externalModules/exportDefaultClassNameWithObject.ts","time":40,"edits":2,"cost":"3.58"},{"name":"tests/cases/compiler/experimentalDecoratorMetadataUnresolvedTypeObjectInEmit.ts","time":40,"edits":2,"cost":"3.58"},{"name":"tests/cases/conformance/scanner/ecmascript3/scannerES3NumericLiteral3.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/jsFileCompilationTypeOfParameter.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/expandoFunctionContextualTypes.ts","time":40,"edits":2,"cost":"3.58"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserVariableStatement1.d.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/conformance/jsdoc/checkJsdocTypeTag4.ts","time":40,"edits":2,"cost":"3.58"},{"name":"tests/cases/conformance/jsdoc/checkJsdocTypeTag5.ts","time":60,"edits":3,"cost":"3.58"},{"name":"tests/cases/compiler/jsdocReferenceGlobalTypeInCommonJs.ts","time":40,"edits":2,"cost":"3.58"},{"name":"tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration5.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/enumConflictsWithGlobalIdentifier.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/duplicateDefaultExport.ts","time":40,"edits":2,"cost":"3.58"},{"name":"tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnumDeclaration3.d.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/functionDeclarationWithResolutionOfTypeOfSameName01.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/conformance/jsdoc/jsdocTypeTagRequiredParameters.ts","time":40,"edits":2,"cost":"3.58"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserDoStatement1.d.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/functionReturnTypeQuery.ts","time":40,"edits":2,"cost":"3.58"},{"name":"tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration10_es5.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/exportClassWithoutName.ts","time":40,"edits":2,"cost":"3.58"},{"name":"tests/cases/compiler/numberAsInLHS.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/fourslash/recursiveGenerics2.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/duplicateConstructSignature.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/compiler/collisionSuperAndNameResolution.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakTarget4.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/conformance/async/es5/asyncSetter_es5.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/fourslash/smartIndentArrayBindingPattern01.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/fourslash/removeVarFromModuleWithReopenedEnums.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/fourslash/formatSelectionWithTrivia.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/fourslash/formatDocumentWithJSDoc.ts","time":40,"edits":2,"cost":"3.58"},{"name":"tests/cases/compiler/compilerOptionsDeclarationAndNoEmit.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/fourslash/formattingOnDoWhileNoSemicolon.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/fourslash/formattingComma.ts","time":20,"edits":1,"cost":"3.58"},{"name":"tests/cases/fourslash/smartSelection_functionParams2.ts","time":39,"edits":2,"cost":"3.55"},{"name":"tests/cases/compiler/decoratorReferences.ts","time":39,"edits":2,"cost":"3.55"},{"name":"tests/cases/compiler/objectLiteralPropertyImplicitlyAny.ts","time":39,"edits":2,"cost":"3.55"},{"name":"tests/cases/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarOrFunc.ts","time":39,"edits":2,"cost":"3.55"},{"name":"tests/cases/conformance/salsa/topLevelThisAssignment.ts","time":39,"edits":2,"cost":"3.55"},{"name":"tests/cases/compiler/strictModeEnumMemberNameReserved.ts","time":39,"edits":2,"cost":"3.55"},{"name":"tests/cases/conformance/salsa/conflictingCommonJSES2015Exports.ts","time":39,"edits":2,"cost":"3.55"},{"name":"tests/cases/compiler/moduleResolution_explicitNodeModulesImport.ts","time":39,"edits":2,"cost":"3.55"},{"name":"tests/cases/conformance/jsdoc/jsdocTypeTagParameterType.ts","time":39,"edits":2,"cost":"3.55"},{"name":"tests/cases/compiler/thisInConstructorParameter2.ts","time":39,"edits":2,"cost":"3.55"},{"name":"tests/cases/compiler/nonexistentPropertyAvailableOnPromisedType.ts","time":39,"edits":2,"cost":"3.55"},{"name":"tests/cases/compiler/typePredicatesInUnion_noMatch.ts","time":39,"edits":2,"cost":"3.55"},{"name":"tests/cases/compiler/forLoopEndingMultilineComments.ts","time":39,"edits":2,"cost":"3.55"},{"name":"tests/cases/compiler/errorElaboration.ts","time":39,"edits":2,"cost":"3.55"},{"name":"tests/cases/conformance/types/tuple/tupleLengthCheck.ts","time":39,"edits":2,"cost":"3.55"},{"name":"tests/cases/fourslash/tsxGoToDefinitionStatelessFunction2.ts","time":39,"edits":2,"cost":"3.55"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionInExportEqualsUMD.ts","time":39,"edits":2,"cost":"3.55"},{"name":"tests/cases/compiler/noUnusedLocals_destructuringAssignment.ts","time":39,"edits":2,"cost":"3.55"},{"name":"tests/cases/conformance/jsdoc/jsdocPostfixEqualsAddsOptionality.ts","time":39,"edits":2,"cost":"3.55"},{"name":"tests/cases/conformance/types/rest/genericRestArity.ts","time":39,"edits":2,"cost":"3.55"},{"name":"tests/cases/conformance/types/spread/spreadNonPrimitive.ts","time":39,"edits":2,"cost":"3.55"},{"name":"tests/cases/conformance/scanner/ecmascript5/scannerNonAsciiHorizontalWhitespace.ts","time":39,"edits":2,"cost":"3.55"},{"name":"tests/cases/compiler/noCrashOnNoLib.ts","time":39,"edits":2,"cost":"3.55"},{"name":"tests/cases/compiler/es5SetterparameterDestructuringNotElided.ts","time":39,"edits":2,"cost":"3.55"},{"name":"tests/cases/conformance/es6/modules/importEmptyFromModuleNotExisted.ts","time":39,"edits":2,"cost":"3.55"},{"name":"tests/cases/fourslash/completionsImport_default_fromMergedDeclarations.ts","time":97,"edits":5,"cost":"3.55"},{"name":"tests/cases/conformance/types/never/neverInference.ts","time":58,"edits":3,"cost":"3.54"},{"name":"tests/cases/conformance/jsx/tsxGenericAttributesType5.tsx","time":77,"edits":4,"cost":"3.54"},{"name":"tests/cases/compiler/selfReferentialDefaultNoStackOverflow.ts","time":38,"edits":2,"cost":"3.53"},{"name":"unittests:: tsserver:: forceConsistentCasingInFileNames","time":19,"edits":1,"cost":"3.53"},{"name":"unittests:: moduleResolution:: Node module resolution - relative paths","time":19,"edits":1,"cost":"3.53"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings14_ES5.ts","time":19,"edits":1,"cost":"3.53"},{"name":"tests/cases/compiler/validRegexp.ts","time":19,"edits":1,"cost":"3.53"},{"name":"tests/cases/compiler/es6ImportNameSpaceImportNoNamedExports.ts","time":19,"edits":1,"cost":"3.53"},{"name":"tests/cases/compiler/moduleResolution_relativeImportJsFile_noImplicitAny.ts","time":38,"edits":2,"cost":"3.53"},{"name":"tests/cases/compiler/continueInIterationStatement4.ts","time":19,"edits":1,"cost":"3.53"},{"name":"tests/cases/conformance/es6/templates/templateStringTermination5.ts","time":19,"edits":1,"cost":"3.53"},{"name":"tests/cases/conformance/salsa/globalMergeWithCommonJSAssignmentDeclaration.ts","time":38,"edits":2,"cost":"3.53"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser645086_1.ts","time":19,"edits":1,"cost":"3.53"},{"name":"tests/cases/compiler/jsFileCompilationEmitDeclarations.ts","time":19,"edits":1,"cost":"3.53"},{"name":"tests/cases/compiler/commentOnParameter1.ts","time":19,"edits":1,"cost":"3.53"},{"name":"tests/cases/conformance/parser/ecmascript5/parserS7.3_A1.1_T2.ts","time":19,"edits":1,"cost":"3.53"},{"name":"tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration2.ts","time":19,"edits":1,"cost":"3.53"},{"name":"tests/cases/compiler/unusedTypeParameterInFunction3.ts","time":19,"edits":1,"cost":"3.53"},{"name":"tests/cases/compiler/throwWithoutNewLine2.ts","time":19,"edits":1,"cost":"3.53"},{"name":"tests/cases/compiler/shouldNotPrintNullEscapesIntoOctalLiterals.ts","time":38,"edits":2,"cost":"3.53"},{"name":"tests/cases/compiler/errorElaborationDivesIntoApparentlyPresentPropsOnly.ts","time":38,"edits":2,"cost":"3.53"},{"name":"tests/cases/compiler/systemObjectShorthandRename.ts","time":38,"edits":2,"cost":"3.53"},{"name":"tests/cases/compiler/esModuleIntersectionCrash.ts","time":38,"edits":2,"cost":"3.53"},{"name":"tests/cases/compiler/blockScopedNamespaceDifferentFile.ts","time":38,"edits":2,"cost":"3.53"},{"name":"tests/cases/conformance/jsx/tsxSpreadAttributesResolution15.tsx","time":38,"edits":2,"cost":"3.53"},{"name":"tests/cases/conformance/salsa/moduleExportAlias2.ts","time":38,"edits":2,"cost":"3.53"},{"name":"tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts","time":38,"edits":2,"cost":"3.53"},{"name":"tests/cases/conformance/async/es5/asyncArrowFunction/arrowFunctionWithParameterNameAsync_es5.ts","time":19,"edits":1,"cost":"3.53"},{"name":"tests/cases/fourslash/smartIndentOnUnclosedFunctionDeclaration04.ts","time":38,"edits":2,"cost":"3.53"},{"name":"tests/cases/conformance/types/intersection/intersectionTypeInference2.ts","time":38,"edits":2,"cost":"3.53"},{"name":"tests/cases/compiler/es5-commonjs8.ts","time":19,"edits":1,"cost":"3.53"},{"name":"tests/cases/conformance/types/spread/objectSpreadNegativeParse.ts","time":19,"edits":1,"cost":"3.53"},{"name":"tests/cases/compiler/cloduleGenericOnSelfMember.ts","time":38,"edits":2,"cost":"3.53"},{"name":"tests/cases/fourslash/formattingVoid.ts","time":19,"edits":1,"cost":"3.53"},{"name":"tests/cases/compiler/initializedParameterBeforeNonoptionalNotOptional.ts","time":38,"edits":2,"cost":"3.53"},{"name":"tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression6.ts","time":38,"edits":2,"cost":"3.53"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/parserReturnStatement1.d.ts","time":19,"edits":1,"cost":"3.53"},{"name":"tests/cases/compiler/incorrectRecursiveMappedTypeConstraint.ts","time":38,"edits":2,"cost":"3.53"},{"name":"tests/cases/compiler/decoratorMetadataNoStrictNull.ts","time":38,"edits":2,"cost":"3.53"},{"name":"tests/cases/fourslash/smartIndentArrayBindingPattern02.ts","time":19,"edits":1,"cost":"3.53"},{"name":"tests/cases/fourslash/formatInTryCatchFinally.ts","time":19,"edits":1,"cost":"3.53"},{"name":"tests/cases/compiler/jsdocTypecastNoTypeNoCrash.ts","time":38,"edits":2,"cost":"3.53"},{"name":"tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6ArrayWithOnlyES6ArrayLib.ts","time":19,"edits":1,"cost":"3.53"},{"name":"tests/cases/conformance/dynamicImport/importCallExpressionNestedCJS.ts","time":19,"edits":1,"cost":"3.53"},{"name":"tests/cases/compiler/maximum10SpellingSuggestions.ts","time":19,"edits":1,"cost":"3.53"},{"name":"tests/cases/fourslash/formattingOnEnterInStrings.ts","time":19,"edits":1,"cost":"3.53"},{"name":"tests/cases/fourslash/completionsImport_fromAmbientModule.ts","time":94,"edits":5,"cost":"3.52"},{"name":"tests/cases/conformance/jsdoc/jsdocTemplateConstructorFunction2.ts","time":75,"edits":4,"cost":"3.51"},{"name":"tests/cases/conformance/jsx/tsxSpreadAttributesResolution1.tsx","time":56,"edits":3,"cost":"3.51"},{"name":"tests/cases/compiler/declarationEmitMappedPrivateTypeTypeParameter.ts","time":37,"edits":2,"cost":"3.50"},{"name":"tests/cases/compiler/conditionalTypeSimplification.ts","time":37,"edits":2,"cost":"3.50"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_import_sideEffect.ts","time":74,"edits":4,"cost":"3.50"},{"name":"tests/cases/conformance/types/nonPrimitive/nonPrimitiveAndTypeVariables.ts","time":37,"edits":2,"cost":"3.50"},{"name":"tests/cases/conformance/moduleResolution/untypedModuleImport_noImplicitAny_relativePath.ts","time":37,"edits":2,"cost":"3.50"},{"name":"tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithConstrainedTypeParameter.ts","time":74,"edits":4,"cost":"3.50"},{"name":"tests/cases/conformance/types/typeRelationships/typeInference/keyofInferenceIntersectsResults.ts","time":37,"edits":2,"cost":"3.50"},{"name":"tests/cases/compiler/freshLiteralTypesInIntersections.ts","time":37,"edits":2,"cost":"3.50"},{"name":"tests/cases/conformance/types/rest/objectRestReadonly.ts","time":37,"edits":2,"cost":"3.50"},{"name":"tests/cases/compiler/mutuallyRecursiveInference.ts","time":37,"edits":2,"cost":"3.50"},{"name":"tests/cases/conformance/jsdoc/paramTagBracketsAddOptionalUndefined.ts","time":37,"edits":2,"cost":"3.50"},{"name":"tests/cases/fourslash/tsxFindAllReferences9.ts","time":37,"edits":2,"cost":"3.50"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment21.ts","time":37,"edits":2,"cost":"3.50"},{"name":"tests/cases/compiler/objectLiteralFreshnessWithSpread.ts","time":37,"edits":2,"cost":"3.50"},{"name":"tests/cases/compiler/baseExpressionTypeParameters.ts","time":37,"edits":2,"cost":"3.50"},{"name":"tests/cases/conformance/salsa/propertyAssignmentOnImportedSymbol.ts","time":37,"edits":2,"cost":"3.50"},{"name":"tests/cases/conformance/es6/yieldExpressions/generatorNoImplicitReturns.ts","time":37,"edits":2,"cost":"3.50"},{"name":"tests/cases/conformance/expressions/newOperator/newOperatorErrorCases_noImplicitAny.ts","time":37,"edits":2,"cost":"3.50"},{"name":"tests/cases/compiler/blockScopedClassDeclarationAcrossFiles.ts","time":37,"edits":2,"cost":"3.50"},{"name":"tests/cases/compiler/useBeforeDeclaration_propertyAssignment.ts","time":55,"edits":3,"cost":"3.49"},{"name":"tests/cases/conformance/jsx/correctlyMarkAliasAsReferences1.tsx","time":73,"edits":4,"cost":"3.49"},{"name":"tests/cases/fourslash/smartSelection_behindCaret.ts","time":36,"edits":2,"cost":"3.47"},{"name":"unittests:: moduleResolution:: baseUrl augmented module resolution","time":18,"edits":1,"cost":"3.47"},{"name":"tests/cases/compiler/selfReferencingFile3.ts","time":18,"edits":1,"cost":"3.47"},{"name":"tests/cases/compiler/nullKeyword.ts","time":18,"edits":1,"cost":"3.47"},{"name":"tests/cases/compiler/reassignStaticProp.ts","time":18,"edits":1,"cost":"3.47"},{"name":"tests/cases/conformance/parser/ecmascript5/PropertyAssignments/parserFunctionPropertyAssignment3.ts","time":18,"edits":1,"cost":"3.47"},{"name":"tests/cases/compiler/binaryArithmatic4.ts","time":18,"edits":1,"cost":"3.47"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_export_object_shorthand.ts","time":72,"edits":4,"cost":"3.47"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser642331_1.ts","time":18,"edits":1,"cost":"3.47"},{"name":"tests/cases/conformance/parser/ecmascript5/ArrayLiteralExpressions/parserArrayLiteralExpression1.ts","time":18,"edits":1,"cost":"3.47"},{"name":"tests/cases/conformance/types/import/importTypeAmbientMissing.ts","time":18,"edits":1,"cost":"3.47"},{"name":"tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration4.ts","time":18,"edits":1,"cost":"3.47"},{"name":"tests/cases/compiler/shadowedReservedCompilerDeclarationsWithNoEmit.ts","time":36,"edits":2,"cost":"3.47"},{"name":"tests/cases/conformance/jsx/tsxReactComponentWithDefaultTypeParameter3.tsx","time":90,"edits":5,"cost":"3.47"},{"name":"tests/cases/compiler/parserIsClassMemberStart.ts","time":36,"edits":2,"cost":"3.47"},{"name":"tests/cases/compiler/destructuredMaappedTypeIsNotImplicitlyAny.ts","time":36,"edits":2,"cost":"3.47"},{"name":"tests/cases/compiler/staticMismatchBecauseOfPrototype.ts","time":36,"edits":2,"cost":"3.47"},{"name":"tests/cases/conformance/es6/computedProperties/computedPropertyNames51_ES6.ts","time":36,"edits":2,"cost":"3.47"},{"name":"tests/cases/compiler/aliasDoesNotDuplicateSignatures.ts","time":36,"edits":2,"cost":"3.47"},{"name":"tests/cases/conformance/jsx/tsxDefaultAttributesResolution3.tsx","time":36,"edits":2,"cost":"3.47"},{"name":"tests/cases/compiler/promiseEmptyTupleNoException.ts","time":36,"edits":2,"cost":"3.47"},{"name":"tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesFunctionArgument.ts","time":18,"edits":1,"cost":"3.47"},{"name":"tests/cases/compiler/unionSignaturesWithThisParameter.ts","time":36,"edits":2,"cost":"3.47"},{"name":"tests/cases/fourslash/formattingWithEnterAfterMultilineString.ts","time":18,"edits":1,"cost":"3.47"},{"name":"tests/cases/compiler/mutuallyRecursiveCallbacks.ts","time":36,"edits":2,"cost":"3.47"},{"name":"tests/cases/conformance/types/never/neverUnionIntersection.ts","time":36,"edits":2,"cost":"3.47"},{"name":"tests/cases/compiler/controlFlowAnalysisOnBareThisKeyword.ts","time":36,"edits":2,"cost":"3.47"},{"name":"tests/cases/compiler/prettyContextNotDebugAssertion.ts","time":36,"edits":2,"cost":"3.47"},{"name":"tests/cases/compiler/staticInstanceResolution.ts","time":18,"edits":1,"cost":"3.47"},{"name":"tests/cases/compiler/letConstMatchingParameterNames.ts","time":18,"edits":1,"cost":"3.47"},{"name":"tests/cases/conformance/jsx/tsxFragmentErrors.tsx","time":36,"edits":2,"cost":"3.47"},{"name":"tests/cases/compiler/declarationEmitWithComposite.ts","time":36,"edits":2,"cost":"3.47"},{"name":"tests/cases/compiler/moduleLocalImportNotIncorrectlyRedirected.ts","time":36,"edits":2,"cost":"3.47"},{"name":"tests/cases/fourslash/removeDuplicateIdentifier.ts","time":18,"edits":1,"cost":"3.47"},{"name":"tests/cases/conformance/types/thisType/thisTypeInFunctions3.ts","time":36,"edits":2,"cost":"3.47"},{"name":"tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction4_es5.ts","time":18,"edits":1,"cost":"3.47"},{"name":"tests/cases/compiler/checkJsFiles7.ts","time":36,"edits":2,"cost":"3.47"},{"name":"tests/cases/fourslash/navigationBarItemsItemsModuleVariables.ts","time":18,"edits":1,"cost":"3.47"},{"name":"tests/cases/fourslash/completionListNewIdentifierFunctionDeclaration.ts","time":18,"edits":1,"cost":"3.47"},{"name":"tests/cases/fourslash/formattingReplaceSpacesWithTabs.ts","time":18,"edits":1,"cost":"3.47"},{"name":"tests/cases/fourslash/formattingOnNestedDoWhileByEnter.ts","time":18,"edits":1,"cost":"3.47"},{"name":"tests/cases/fourslash/smartIndentStatementForOf.ts","time":18,"edits":1,"cost":"3.47"},{"name":"tests/cases/conformance/jsx/tsxFragmentPreserveEmit.tsx","time":53,"edits":3,"cost":"3.45"},{"name":"tests/cases/fourslash/completionInJSDocFunctionNew.ts","time":123,"edits":7,"cost":"3.45"},{"name":"tests/cases/compiler/intersectionOfMixinConstructorTypeAndNonConstructorType.ts","time":35,"edits":2,"cost":"3.44"},{"name":"tests/cases/conformance/decorators/class/method/parameter/decoratorOnClassMethodThisParameter.ts","time":35,"edits":2,"cost":"3.44"},{"name":"tests/cases/compiler/thisShadowingErrorSpans.ts","time":35,"edits":2,"cost":"3.44"},{"name":"tests/cases/compiler/uniqueSymbolAllowsIndexInObjectWithIndexSignature.ts","time":35,"edits":2,"cost":"3.44"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment.ts","time":35,"edits":2,"cost":"3.44"},{"name":"tests/cases/conformance/salsa/moduleExportAssignment6.ts","time":35,"edits":2,"cost":"3.44"},{"name":"tests/cases/compiler/definiteAssignmentOfDestructuredVariable.ts","time":35,"edits":2,"cost":"3.44"},{"name":"tests/cases/conformance/jsx/inline/inlineJsxFactoryOverridesCompilerOption.tsx","time":35,"edits":2,"cost":"3.44"},{"name":"tests/cases/compiler/incorrectNumberOfTypeArgumentsDuringErrorReporting.ts","time":35,"edits":2,"cost":"3.44"},{"name":"tests/cases/compiler/indexedAccessImplicitlyAny.ts","time":35,"edits":2,"cost":"3.44"},{"name":"tests/cases/conformance/es7/trailingCommasInFunctionParametersAndArguments.ts","time":35,"edits":2,"cost":"3.44"},{"name":"tests/cases/compiler/genericTemplateOverloadResolution.ts","time":35,"edits":2,"cost":"3.44"},{"name":"tests/cases/compiler/unusedTypeParametersNotCheckedByNoUnusedLocals.ts","time":35,"edits":2,"cost":"3.44"},{"name":"tests/cases/compiler/decoratorMetadataGenericTypeVariableDefault.ts","time":35,"edits":2,"cost":"3.44"},{"name":"tests/cases/compiler/metadataImportType.ts","time":35,"edits":2,"cost":"3.44"},{"name":"tests/cases/compiler/returnInfiniteIntersection.ts","time":35,"edits":2,"cost":"3.44"},{"name":"tests/cases/conformance/controlFlow/definiteAssignmentAssertionsWithObjectShortHand.ts","time":35,"edits":2,"cost":"3.44"},{"name":"tests/cases/conformance/jsdoc/jsdocParseBackquotedParamName.ts","time":35,"edits":2,"cost":"3.44"},{"name":"tests/cases/compiler/APISample_WatchWithDefaults.ts","time":52,"edits":3,"cost":"3.43"},{"name":"tests/cases/conformance/types/nonPrimitive/nonPrimitiveConstraintOfIndexAccessType.ts","time":69,"edits":4,"cost":"3.43"},{"name":"tests/cases/compiler/shorthandPropertyUndefined.ts","time":34,"edits":2,"cost":"3.41"},{"name":"tests/cases/conformance/types/rest/objectRestCatchES5.ts","time":34,"edits":2,"cost":"3.41"},{"name":"tests/cases/fourslash/completionsImport_default_alreadyExistedWithRename.ts","time":153,"edits":9,"cost":"3.41"},{"name":"tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakTarget2.ts","time":17,"edits":1,"cost":"3.41"},{"name":"tests/cases/conformance/parser/ecmascript5/FunctionDeclarations/parserFunctionDeclaration5.ts","time":17,"edits":1,"cost":"3.41"},{"name":"tests/cases/conformance/es6/templates/templateStringUnterminated1.ts","time":17,"edits":1,"cost":"3.41"},{"name":"tests/cases/conformance/jsx/tsxUnionTypeComponent2.tsx","time":17,"edits":1,"cost":"3.41"},{"name":"tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInTemplates18_ES5.ts","time":17,"edits":1,"cost":"3.41"},{"name":"tests/cases/compiler/APISample_parseConfig.ts","time":51,"edits":3,"cost":"3.41"},{"name":"tests/cases/compiler/objectLiteralsAgainstUnionsOfArrays01.ts","time":34,"edits":2,"cost":"3.41"},{"name":"tests/cases/conformance/jsdoc/checkJsdocParamOnVariableDeclaredFunctionExpression.ts","time":34,"edits":2,"cost":"3.41"},{"name":"tests/cases/conformance/salsa/moduleExportAliasImported.ts","time":34,"edits":2,"cost":"3.41"},{"name":"tests/cases/compiler/emptyArrayDestructuringExpressionVisitedByTransformer.ts","time":34,"edits":2,"cost":"3.41"},{"name":"tests/cases/compiler/overloadsAndTypeArgumentArityErrors.ts","time":34,"edits":2,"cost":"3.41"},{"name":"tests/cases/compiler/genericIndexTypeHasSensibleErrorMessage.ts","time":34,"edits":2,"cost":"3.41"},{"name":"tests/cases/compiler/esModuleInteropUsesExportStarWhenDefaultPlusNames.ts","time":34,"edits":2,"cost":"3.41"},{"name":"tests/cases/compiler/decoratorMetadataGenericTypeVariable.ts","time":34,"edits":2,"cost":"3.41"},{"name":"tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration3_es5.ts","time":17,"edits":1,"cost":"3.41"},{"name":"tests/cases/conformance/types/nonPrimitive/nonPrimitiveUnionIntersection.ts","time":34,"edits":2,"cost":"3.41"},{"name":"tests/cases/fourslash/exportClauseErrorReporting0.ts","time":17,"edits":1,"cost":"3.41"},{"name":"tests/cases/compiler/forLoopWithDestructuringDoesNotElideFollowingStatement.ts","time":34,"edits":2,"cost":"3.41"},{"name":"tests/cases/fourslash/tsxIncremental.ts","time":17,"edits":1,"cost":"3.41"},{"name":"tests/cases/compiler/declarationEmitToDeclarationDirWithoutCompositeAndDeclarationOptions.ts","time":34,"edits":2,"cost":"3.41"},{"name":"tests/cases/compiler/literalTypeNameAssertionNotTriggered.ts","time":34,"edits":2,"cost":"3.41"},{"name":"tests/cases/compiler/classImplementsClass7.ts","time":34,"edits":2,"cost":"3.41"},{"name":"tests/cases/conformance/externalModules/exportClassNameWithObjectUMD.ts","time":34,"edits":2,"cost":"3.41"},{"name":"tests/cases/conformance/parser/ecmascript5/VariableDeclarations/parserVariableDeclaration4.d.ts","time":17,"edits":1,"cost":"3.41"},{"name":"tests/cases/compiler/noUnusedLocals_selfReference_skipsBlockLocations.ts","time":34,"edits":2,"cost":"3.41"},{"name":"tests/cases/conformance/async/es5/asyncInterface_es5.ts","time":17,"edits":1,"cost":"3.41"},{"name":"tests/cases/fourslash/smartIndentDoStatement.ts","time":17,"edits":1,"cost":"3.41"},{"name":"tests/cases/fourslash/navigationBarItemsItems2.ts","time":17,"edits":1,"cost":"3.41"},{"name":"tests/cases/fourslash/isInMultiLineComment.ts","time":34,"edits":2,"cost":"3.41"},{"name":"tests/cases/fourslash/navbar_const.ts","time":17,"edits":1,"cost":"3.41"},{"name":"tests/cases/fourslash/syntacticClassificationsDocComment3.ts","time":17,"edits":1,"cost":"3.41"},{"name":"tests/cases/fourslash/semanticClassificationJs.ts","time":17,"edits":1,"cost":"3.41"},{"name":"tests/cases/conformance/jsdoc/typedefMultipleTypeParameters.ts","time":50,"edits":3,"cost":"3.39"},{"name":"tests/cases/compiler/importNotElidedWhenNotFound.ts","time":50,"edits":3,"cost":"3.39"},{"name":"tests/cases/fourslash/completionsImport_default_addToNamedImports.ts","time":133,"edits":8,"cost":"3.39"},{"name":"tests/cases/compiler/keyofModuleObjectHasCorrectKeys.ts","time":33,"edits":2,"cost":"3.38"},{"name":"tests/cases/conformance/ambient/ambientDeclarationsPatterns_merging2.ts","time":33,"edits":2,"cost":"3.38"},{"name":"tests/cases/fourslash/completionsImport_named_addToNamedImports.ts","time":99,"edits":6,"cost":"3.38"},{"name":"tests/cases/conformance/jsx/tsxSpreadAttributesResolution17.tsx","time":33,"edits":2,"cost":"3.38"},{"name":"tests/cases/compiler/errorForUsingPropertyOfTypeAsType02.ts","time":33,"edits":2,"cost":"3.38"},{"name":"tests/cases/compiler/restParameterWithBindingPattern2.ts","time":33,"edits":2,"cost":"3.38"},{"name":"tests/cases/compiler/superNoModifiersCrash.ts","time":33,"edits":2,"cost":"3.38"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment2.ts","time":33,"edits":2,"cost":"3.38"},{"name":"tests/cases/compiler/unionTypeWithIndexAndTuple.ts","time":33,"edits":2,"cost":"3.38"},{"name":"tests/cases/compiler/jsPropertyAssignedAfterMethodDeclaration_nonError.ts","time":33,"edits":2,"cost":"3.38"},{"name":"tests/cases/compiler/metadataOfEventAlias.ts","time":33,"edits":2,"cost":"3.38"},{"name":"tests/cases/compiler/umdNamedAmdMode.ts","time":33,"edits":2,"cost":"3.38"},{"name":"tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts","time":197,"edits":12,"cost":"3.38"},{"name":"tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts","time":49,"edits":3,"cost":"3.37"},{"name":"tests/cases/fourslash/completionsImport_require.ts","time":114,"edits":7,"cost":"3.37"},{"name":"tests/cases/compiler/APISample_jsdoc.ts","time":81,"edits":5,"cost":"3.37"},{"name":"tests/cases/fourslash/annotateWithTypeFromJSDoc7.ts","time":97,"edits":6,"cost":"3.36"},{"name":"tests/cases/compiler/importTypeWithUnparenthesizedGenericFunctionParsed.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/compiler/contextualPropertyOfGenericMappedType.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/conformance/ambient/ambientDeclarationsPatterns_merging3.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/fourslash/annotateWithTypeFromJSDoc8.ts","time":112,"edits":7,"cost":"3.35"},{"name":"tests/cases/fourslash/completionsImport_named_namespaceImportExists.ts","time":128,"edits":8,"cost":"3.35"},{"name":"tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration8_es5.ts","time":16,"edits":1,"cost":"3.35"},{"name":"tests/cases/conformance/jsdoc/enumTagCircularReference.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/compiler/anyIndexedAccessArrayNoException.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/compiler/globalFunctionAugmentationOverload.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/compiler/readonlyAssignmentInSubclassOfClassExpression.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/compiler/methodSignatureHandledDeclarationKindForSymbol.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution8_node.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/fourslash/findAllRefsDestructureGetter2.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/compiler/destructuringTuple.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/compiler/moduleResolution_packageJson_scopedPackage.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/conformance/salsa/moduleExportAliasUnknown.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/compiler/duplicatePackage_packageIdIncludesSubModule.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/fourslash/renameImportOfReExport.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/compiler/typeInferenceTypePredicate2.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/fourslash/tsxCompletion12.ts","time":16,"edits":1,"cost":"3.35"},{"name":"tests/cases/fourslash/navigationBarItemsInsideMethodsAndConstructors.ts","time":16,"edits":1,"cost":"3.35"},{"name":"tests/cases/compiler/blockScopedEnumVariablesUseBeforeDef_preserve.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/conformance/es2017/useSharedArrayBuffer2.ts","time":16,"edits":1,"cost":"3.35"},{"name":"tests/cases/fourslash/propertyDuplicateIdentifierError.ts","time":16,"edits":1,"cost":"3.35"},{"name":"tests/cases/compiler/checkDestructuringShorthandAssigment.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/compiler/narrowedImports.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/compiler/moduleResolutionWithExtensions_notSupported.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/fourslash/insertMethodCallAboveOthers.ts","time":16,"edits":1,"cost":"3.35"},{"name":"tests/cases/compiler/systemDefaultExportCommentValidity.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/compiler/expressionsForbiddenInParameterInitializers.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/compiler/tripleSlashReferenceAbsoluteWindowsPath.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/conformance/salsa/annotatedThisPropertyInitializerDoesntNarrow.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/fourslash/addSignaturePartial.ts","time":16,"edits":1,"cost":"3.35"},{"name":"tests/cases/compiler/shebangError.ts","time":16,"edits":1,"cost":"3.35"},{"name":"tests/cases/compiler/blockScopedEnumVariablesUseBeforeDef.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/fourslash/findAllRefsPrimitive.ts","time":16,"edits":1,"cost":"3.35"},{"name":"tests/cases/compiler/unusedSemicolonInClass.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/conformance/jsx/tsxSfcReturnNullStrictNullChecks.tsx","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/fourslash/smartIndentOnUnclosedTupleTypeLiteral01.ts","time":16,"edits":1,"cost":"3.35"},{"name":"tests/cases/fourslash/chainedFatArrowFormatting.ts","time":16,"edits":1,"cost":"3.35"},{"name":"tests/cases/fourslash/formatVariableDeclarationList.ts","time":16,"edits":1,"cost":"3.35"},{"name":"tests/cases/fourslash/breakpointValidationLabeled.ts","time":16,"edits":1,"cost":"3.35"},{"name":"tests/cases/fourslash/formatEmptyParamList.ts","time":32,"edits":2,"cost":"3.35"},{"name":"tests/cases/fourslash/navigationBarItemsFunctionProperties.ts","time":16,"edits":1,"cost":"3.35"},{"name":"tests/cases/fourslash/syntacticClassificationWithErrors.ts","time":16,"edits":1,"cost":"3.35"},{"name":"tests/cases/compiler/noCrashUMDMergedWithGlobalValue.ts","time":31,"edits":2,"cost":"3.32"},{"name":"tests/cases/compiler/getParameterNameAtPosition.ts","time":31,"edits":2,"cost":"3.32"},{"name":"tests/cases/compiler/exportAsNamespaceConflict.ts","time":31,"edits":2,"cost":"3.32"},{"name":"tests/cases/conformance/jsdoc/paramTagNestedWithoutTopLevelObject.ts","time":31,"edits":2,"cost":"3.32"},{"name":"tests/cases/compiler/moduleResolution_packageJson_yesAtPackageRoot.ts","time":31,"edits":2,"cost":"3.32"},{"name":"tests/cases/compiler/contextualSignature_objectLiteralMethodMayReturnNever.ts","time":31,"edits":2,"cost":"3.32"},{"name":"tests/cases/compiler/constWithNonNull.ts","time":31,"edits":2,"cost":"3.32"},{"name":"tests/cases/compiler/underscoreEscapedNameInEnum.ts","time":31,"edits":2,"cost":"3.32"},{"name":"tests/cases/compiler/mergedClassWithNamespacePrototype.ts","time":31,"edits":2,"cost":"3.32"},{"name":"tests/cases/compiler/unusedGetterInClass.ts","time":31,"edits":2,"cost":"3.32"},{"name":"tests/cases/conformance/jsdoc/noAssertForUnparseableTypedefs.ts","time":31,"edits":2,"cost":"3.32"},{"name":"tests/cases/compiler/isolatedModulesDontElideReExportStar.ts","time":31,"edits":2,"cost":"3.32"},{"name":"tests/cases/compiler/superAccessCastedCall.ts","time":31,"edits":2,"cost":"3.32"},{"name":"tests/cases/conformance/enums/enumConstantMemberWithString.ts","time":31,"edits":2,"cost":"3.32"},{"name":"tests/cases/compiler/declarationEmitPrivateSymbolCausesVarDeclarationToBeEmitted.ts","time":31,"edits":2,"cost":"3.32"},{"name":"tests/cases/compiler/symbolMergeValueAndImportedType.ts","time":46,"edits":3,"cost":"3.31"},{"name":"tests/cases/compiler/arguments.ts","time":46,"edits":3,"cost":"3.31"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignmentOutOfOrder.ts","time":46,"edits":3,"cost":"3.31"},{"name":"tests/cases/conformance/jsx/tsxStatelessFunctionComponentWithDefaultTypeParameter1.tsx","time":46,"edits":3,"cost":"3.31"},{"name":"tests/cases/fourslash/codeFixAddMissingMember_all.ts","time":153,"edits":10,"cost":"3.31"},{"name":"tests/cases/fourslash/findAllRefsReExportLocal.ts","time":61,"edits":4,"cost":"3.31"},{"name":"tests/cases/compiler/parseGenericArrowRatherThanLeftShift.ts","time":30,"edits":2,"cost":"3.29"},{"name":"tests/cases/conformance/classes/propertyMemberDeclarations/propertyNamedConstructor.ts","time":30,"edits":2,"cost":"3.29"},{"name":"tests/cases/compiler/partialTypeNarrowedToByTypeGuard.ts","time":30,"edits":2,"cost":"3.29"},{"name":"unittests:: tsserver:: typingsInstaller:: local module","time":15,"edits":1,"cost":"3.29"},{"name":"tests/cases/conformance/jsdoc/paramTagNestedWithoutTopLevelObject2.ts","time":30,"edits":2,"cost":"3.29"},{"name":"unittests:: tsserver:: reload","time":15,"edits":1,"cost":"3.29"},{"name":"tests/cases/compiler/spellingSuggestionModule.ts","time":30,"edits":2,"cost":"3.29"},{"name":"tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction9_es5.ts","time":15,"edits":1,"cost":"3.29"},{"name":"tests/cases/compiler/nonstrictTemplateWithNotOctalPrintsAsIs.ts","time":30,"edits":2,"cost":"3.29"},{"name":"tests/cases/compiler/asyncFunctionTempVariableScoping.ts","time":30,"edits":2,"cost":"3.29"},{"name":"tests/cases/compiler/unionTypeWithIndexAndMethodSignature.ts","time":30,"edits":2,"cost":"3.29"},{"name":"tests/cases/fourslash/incrementalParsingInsertIntoMethod1.ts","time":15,"edits":1,"cost":"3.29"},{"name":"tests/cases/fourslash/smartIndentOnAccessors.ts","time":15,"edits":1,"cost":"3.29"},{"name":"tests/cases/conformance/moduleResolution/untypedModuleImport_noImplicitAny.ts","time":30,"edits":2,"cost":"3.29"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution8_classic.ts","time":30,"edits":2,"cost":"3.29"},{"name":"tests/cases/conformance/jsdoc/typedefTagTypeResolution.ts","time":30,"edits":2,"cost":"3.29"},{"name":"tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression5.ts","time":30,"edits":2,"cost":"3.29"},{"name":"tests/cases/compiler/jsdocRestParameter.ts","time":30,"edits":2,"cost":"3.29"},{"name":"tests/cases/compiler/restParameterWithBindingPattern1.ts","time":30,"edits":2,"cost":"3.29"},{"name":"tests/cases/fourslash/formattingofSingleLineBlockConstructs.ts","time":15,"edits":1,"cost":"3.29"},{"name":"tests/cases/conformance/classes/classDeclarations/classExtendingNull.ts","time":30,"edits":2,"cost":"3.29"},{"name":"tests/cases/compiler/implementsIncorrectlyNoAssertion.ts","time":30,"edits":2,"cost":"3.29"},{"name":"tests/cases/compiler/jsdocRestParameter_es6.ts","time":30,"edits":2,"cost":"3.29"},{"name":"tests/cases/compiler/defaultIsNotVisibleInLocalScope.ts","time":30,"edits":2,"cost":"3.29"},{"name":"tests/cases/fourslash/interfaceIndent.ts","time":15,"edits":1,"cost":"3.29"},{"name":"tests/cases/fourslash/tsxFindAllReferences6.ts","time":30,"edits":2,"cost":"3.29"},{"name":"tests/cases/fourslash/tsxSignatureHelp2.ts","time":15,"edits":1,"cost":"3.29"},{"name":"tests/cases/fourslash/navigationBarJsDocCommentWithNoTags.ts","time":15,"edits":1,"cost":"3.29"},{"name":"tests/cases/compiler/unusedTypeParameters_templateTag.ts","time":30,"edits":2,"cost":"3.29"},{"name":"tests/cases/fourslash/breakpointValidationExports.ts","time":15,"edits":1,"cost":"3.29"},{"name":"tests/cases/fourslash/smartIndentInParenthesizedExpression01.ts","time":15,"edits":1,"cost":"3.29"},{"name":"tests/cases/fourslash/classifyThisParameter.ts","time":15,"edits":1,"cost":"3.29"},{"name":"tests/cases/fourslash/insertVarAfterEmptyTypeParamList.ts","time":15,"edits":1,"cost":"3.29"},{"name":"tests/cases/fourslash/formatTypeAlias.ts","time":15,"edits":1,"cost":"3.29"},{"name":"tests/cases/compiler/unreachableJavascriptUnchecked.ts","time":45,"edits":3,"cost":"3.29"},{"name":"tests/cases/fourslash/completionsPaths.ts","time":133,"edits":9,"cost":"3.27"},{"name":"tests/cases/compiler/mappedToToIndexSignatureInference.ts","time":44,"edits":3,"cost":"3.27"},{"name":"tests/cases/compiler/nongenericPartialInstantiationsRelatedInBothDirections.ts","time":29,"edits":2,"cost":"3.26"},{"name":"tests/cases/compiler/propertyAccessOnObjectLiteral.ts","time":29,"edits":2,"cost":"3.26"},{"name":"tests/cases/compiler/exportEqualsClassNoRedeclarationError.ts","time":29,"edits":2,"cost":"3.26"},{"name":"tests/cases/conformance/constEnums/constEnum3.ts","time":29,"edits":2,"cost":"3.26"},{"name":"tests/cases/compiler/parseArrowFunctionWithFunctionReturnType.ts","time":29,"edits":2,"cost":"3.26"},{"name":"tests/cases/compiler/importUsedAsTypeWithErrors.ts","time":29,"edits":2,"cost":"3.26"},{"name":"tests/cases/conformance/types/never/neverTypeErrors2.ts","time":58,"edits":4,"cost":"3.26"},{"name":"tests/cases/compiler/jsdocAccessEnumType.ts","time":29,"edits":2,"cost":"3.26"},{"name":"tests/cases/compiler/conflictMarkerDiff3Trivia1.ts","time":29,"edits":2,"cost":"3.26"},{"name":"tests/cases/compiler/jsdocTypedefNoCrash2.ts","time":29,"edits":2,"cost":"3.26"},{"name":"tests/cases/compiler/jsdocTypedefMissingType.ts","time":29,"edits":2,"cost":"3.26"},{"name":"tests/cases/compiler/checkJsTypeDefNoUnusedLocalMarked.ts","time":29,"edits":2,"cost":"3.26"},{"name":"tests/cases/compiler/sourceMapValidationVarInDownLevelGenerator.ts","time":29,"edits":2,"cost":"3.26"},{"name":"tests/cases/compiler/declarationEmitRelativeModuleError.ts","time":29,"edits":2,"cost":"3.26"},{"name":"tests/cases/compiler/jsxPropsAsIdentifierNames.tsx","time":29,"edits":2,"cost":"3.26"},{"name":"tests/cases/compiler/requireOfJsonFileWithoutResolveJsonModuleAndPathMapping.ts","time":29,"edits":2,"cost":"3.26"},{"name":"tests/cases/compiler/noUnusedLocals_writeOnlyProperty_dynamicNames.ts","time":29,"edits":2,"cost":"3.26"},{"name":"tests/cases/conformance/jsdoc/jsdocTypeReferenceUseBeforeDef.ts","time":29,"edits":2,"cost":"3.26"},{"name":"tests/cases/compiler/es5-commonjs7.ts","time":29,"edits":2,"cost":"3.26"},{"name":"tests/cases/conformance/jsdoc/paramTagWrapping.ts","time":29,"edits":2,"cost":"3.26"},{"name":"tests/cases/compiler/jsSelfReferencingArgumentsFunction.ts","time":29,"edits":2,"cost":"3.26"},{"name":"tests/cases/compiler/requireOfJsonFileWithModuleNodeResolutionEmitAmd.ts","time":29,"edits":2,"cost":"3.26"},{"name":"tests/cases/compiler/declarationEmitBundlePreservesHasNoDefaultLibDirective.ts","time":29,"edits":2,"cost":"3.26"},{"name":"tests/cases/fourslash/completionsAtIncompleteObjectLiteralProperty.ts","time":29,"edits":2,"cost":"3.26"},{"name":"tests/cases/conformance/types/typeRelationships/instanceOf/narrowingConstrainedTypeVariable.ts","time":43,"edits":3,"cost":"3.24"},{"name":"tests/cases/conformance/jsx/tsxStatelessFunctionComponentWithDefaultTypeParameter2.tsx","time":43,"edits":3,"cost":"3.24"},{"name":"tests/cases/conformance/moduleResolution/untypedModuleImport_noImplicitAny_typesForPackageExist.ts","time":43,"edits":3,"cost":"3.24"},{"name":"tests/cases/conformance/jsx/tsxGenericAttributesType8.tsx","time":43,"edits":3,"cost":"3.24"},{"name":"tests/cases/fourslash/refactorConvertToEs6Module_export_named.ts","time":157,"edits":11,"cost":"3.24"},{"name":"tests/cases/compiler/es6ImportEqualsExportModuleCommonJsError.ts","time":28,"edits":2,"cost":"3.22"},{"name":"unittests:: Program.getMissingFilePaths","time":14,"edits":1,"cost":"3.22"},{"name":"unittests:: convertToBase64","time":14,"edits":1,"cost":"3.22"},{"name":"tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunctionCapturesThis_es5.ts","time":14,"edits":1,"cost":"3.22"},{"name":"tests/cases/compiler/jsdocClassMissingTypeArguments.ts","time":28,"edits":2,"cost":"3.22"},{"name":"tests/cases/conformance/parser/ecmascriptnext/numericSeparators/parser.numericSeparators.binary.ts","time":28,"edits":2,"cost":"3.22"},{"name":"tests/cases/fourslash/navbar_exportDefault.ts","time":14,"edits":1,"cost":"3.22"},{"name":"tests/cases/fourslash/formattingOfMultilineBlockConstructs.ts","time":28,"edits":2,"cost":"3.22"},{"name":"tests/cases/fourslash/formatMultilineComment.ts","time":14,"edits":1,"cost":"3.22"},{"name":"tests/cases/compiler/destructuringWithConstraint.ts","time":28,"edits":2,"cost":"3.22"},{"name":"tests/cases/fourslash/indentationAfterModuleImport.ts","time":14,"edits":1,"cost":"3.22"},{"name":"tests/cases/conformance/types/thisType/thisTypeInTypePredicate.ts","time":28,"edits":2,"cost":"3.22"},{"name":"tests/cases/compiler/destructureComputedProperty.ts","time":42,"edits":3,"cost":"3.22"},{"name":"tests/cases/compiler/commonjsAccessExports.ts","time":28,"edits":2,"cost":"3.22"},{"name":"tests/cases/compiler/parseErrorDoubleCommaInCall.ts","time":28,"edits":2,"cost":"3.22"},{"name":"tests/cases/fourslash/formattingInComment.ts","time":14,"edits":1,"cost":"3.22"},{"name":"tests/cases/compiler/exportDefaultInterface.ts","time":28,"edits":2,"cost":"3.22"},{"name":"tests/cases/conformance/async/es5/asyncEnum_es5.ts","time":14,"edits":1,"cost":"3.22"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser512097.ts","time":28,"edits":2,"cost":"3.22"},{"name":"tests/cases/fourslash/tsxSignatureHelp1.ts","time":14,"edits":1,"cost":"3.22"},{"name":"tests/cases/fourslash/insertSecondTryCatchBlock.ts","time":14,"edits":1,"cost":"3.22"},{"name":"tests/cases/fourslash/formattingForLoopSemicolons.ts","time":14,"edits":1,"cost":"3.22"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution_withExtension_MapedToNodeModules.ts","time":28,"edits":2,"cost":"3.22"},{"name":"tests/cases/fourslash/smartIndentOnAccessors01.ts","time":14,"edits":1,"cost":"3.22"},{"name":"tests/cases/compiler/jsFileCompilationBindReachabilityErrors.ts","time":42,"edits":3,"cost":"3.22"},{"name":"tests/cases/fourslash/importValueUsedAsType.ts","time":14,"edits":1,"cost":"3.22"},{"name":"tests/cases/compiler/constInClassExpression.ts","time":28,"edits":2,"cost":"3.22"},{"name":"tests/cases/conformance/types/thisType/contextualThisTypeInJavascript.ts","time":28,"edits":2,"cost":"3.22"},{"name":"tests/cases/fourslash/navigationBarAnonymousClassAndFunctionExpressions2.ts","time":14,"edits":1,"cost":"3.22"},{"name":"tests/cases/compiler/yieldStringLiteral.ts","time":28,"edits":2,"cost":"3.22"},{"name":"tests/cases/compiler/nounusedTypeParameterConstraint.ts","time":28,"edits":2,"cost":"3.22"},{"name":"tests/cases/fourslash/addFunctionAboveMultiLineLambdaExpression.ts","time":14,"edits":1,"cost":"3.22"},{"name":"tests/cases/conformance/jsdoc/checkJsdocReturnTag2.ts","time":28,"edits":2,"cost":"3.22"},{"name":"tests/cases/fourslash/formattingOnObjectLiteral.ts","time":28,"edits":2,"cost":"3.22"},{"name":"tests/cases/compiler/commentsAfterCaseClauses1.ts","time":28,"edits":2,"cost":"3.22"},{"name":"tests/cases/fourslash/formatControlFlowConstructs.ts","time":14,"edits":1,"cost":"3.22"},{"name":"tests/cases/fourslash/formatAsyncAwait.ts","time":14,"edits":1,"cost":"3.22"},{"name":"tests/cases/fourslash/tsxRename6.ts","time":14,"edits":1,"cost":"3.22"},{"name":"tests/cases/fourslash/navigationBarItemsEmptyConstructors.ts","time":14,"edits":1,"cost":"3.22"},{"name":"tests/cases/fourslash/navigationBarItemsBindingPatternsInConstructor.ts","time":14,"edits":1,"cost":"3.22"},{"name":"tests/cases/fourslash/formattingMultilineCommentsWithTabs2.ts","time":14,"edits":1,"cost":"3.22"},{"name":"tests/cases/fourslash/navigationItemsComputedProperties.ts","time":28,"edits":2,"cost":"3.22"},{"name":"tests/cases/fourslash/fsEditMarkerPositions.ts","time":14,"edits":1,"cost":"3.22"},{"name":"tests/cases/fourslash/formatSignatures.ts","time":14,"edits":1,"cost":"3.22"},{"name":"tests/cases/fourslash/formattingInMultilineComments.ts","time":14,"edits":1,"cost":"3.22"},{"name":"tests/cases/compiler/literalIntersectionYieldsLiteral.ts","time":41,"edits":3,"cost":"3.20"},{"name":"tests/cases/compiler/emitClassMergedWithConstNamespaceNotElided.ts","time":27,"edits":2,"cost":"3.18"},{"name":"tests/cases/compiler/conflictMarkerDiff3Trivia2.ts","time":27,"edits":2,"cost":"3.18"},{"name":"tests/cases/compiler/moduleResolution_explicitNodeModulesImport_implicitAny.ts","time":27,"edits":2,"cost":"3.18"},{"name":"tests/cases/compiler/jsxMultilineAttributeStringValues.tsx","time":27,"edits":2,"cost":"3.18"},{"name":"tests/cases/conformance/jsdoc/constructorTagOnClassConstructor.ts","time":27,"edits":2,"cost":"3.18"},{"name":"tests/cases/compiler/requireOfJsonFileWithModuleEmitNone.ts","time":27,"edits":2,"cost":"3.18"},{"name":"tests/cases/conformance/jsdoc/typedefInnerNamepaths.ts","time":27,"edits":2,"cost":"3.18"},{"name":"tests/cases/conformance/jsx/tsxSfcReturnUndefinedStrictNullChecks.tsx","time":27,"edits":2,"cost":"3.18"},{"name":"tests/cases/conformance/jsdoc/checkJsdocReturnTag1.ts","time":27,"edits":2,"cost":"3.18"},{"name":"tests/cases/compiler/requireOfJsonFileWithModuleNodeResolutionEmitAmdOutFile.ts","time":27,"edits":2,"cost":"3.18"},{"name":"tests/cases/conformance/jsdoc/constructorTagOnObjectLiteralMethod.ts","time":27,"edits":2,"cost":"3.18"},{"name":"tests/cases/compiler/commentOnBinaryOperator2.ts","time":27,"edits":2,"cost":"3.18"},{"name":"tests/cases/conformance/jsdoc/checkJsdocParamTag1.ts","time":27,"edits":2,"cost":"3.18"},{"name":"tests/cases/conformance/salsa/inferringClassMembersFromAssignments5.ts","time":27,"edits":2,"cost":"3.18"},{"name":"tests/cases/compiler/subclassWithPolymorphicThisIsAssignable.ts","time":27,"edits":2,"cost":"3.18"},{"name":"tests/cases/compiler/unusedSetterInClass.ts","time":27,"edits":2,"cost":"3.18"},{"name":"tests/cases/compiler/pathMappingBasedModuleResolution_withExtensionInName.ts","time":27,"edits":2,"cost":"3.18"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment30.ts","time":27,"edits":2,"cost":"3.18"},{"name":"tests/cases/compiler/contextualTypingFunctionReturningFunction2.ts","time":27,"edits":2,"cost":"3.18"},{"name":"tests/cases/compiler/dynamicImportWithNestedThis_es5.ts","time":27,"edits":2,"cost":"3.18"},{"name":"tests/cases/conformance/jsdoc/paramTagOnCallExpression.ts","time":27,"edits":2,"cost":"3.18"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment22.ts","time":40,"edits":3,"cost":"3.17"},{"name":"tests/cases/conformance/types/forAwait/types.forAwait.es2018.3.ts","time":13,"edits":1,"cost":"3.15"},{"name":"tests/cases/conformance/ambient/ambientDeclarationsPatterns_merging1.ts","time":26,"edits":2,"cost":"3.15"},{"name":"tests/cases/conformance/jsdoc/typeTagModuleExports.ts","time":26,"edits":2,"cost":"3.15"},{"name":"unittests:: tsserver:: Session:: an example of using the Session API to create an in-process server","time":13,"edits":1,"cost":"3.15"},{"name":"unittests:: tsserver:: Project Errors with config file change","time":13,"edits":1,"cost":"3.15"},{"name":"unittests:: tsserver:: navigate-to for javascript project","time":13,"edits":1,"cost":"3.15"},{"name":"tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration5_es5.ts","time":13,"edits":1,"cost":"3.15"},{"name":"tests/cases/conformance/decorators/missingDecoratorType.ts","time":13,"edits":1,"cost":"3.15"},{"name":"tests/cases/compiler/nullableFunctionError.ts","time":26,"edits":2,"cost":"3.15"},{"name":"tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509698.ts","time":13,"edits":1,"cost":"3.15"},{"name":"tests/cases/compiler/inferredIndexerOnNamespaceImport.ts","time":26,"edits":2,"cost":"3.15"},{"name":"tests/cases/conformance/jsdoc/callbackTag1.ts","time":26,"edits":2,"cost":"3.15"},{"name":"tests/cases/compiler/decoratorMetadataNoLibIsolatedModulesTypes.ts","time":26,"edits":2,"cost":"3.15"},{"name":"tests/cases/compiler/circularConstrainedMappedTypeNoCrash.ts","time":26,"edits":2,"cost":"3.15"},{"name":"tests/cases/conformance/functions/parameterInitializersForwardReferencing1.ts","time":52,"edits":4,"cost":"3.15"},{"name":"tests/cases/compiler/checkTypePredicateForRedundantProperties.ts","time":26,"edits":2,"cost":"3.15"},{"name":"tests/cases/compiler/superPropertyElementNoUnusedLexicalThisCapture.ts","time":26,"edits":2,"cost":"3.15"},{"name":"tests/cases/fourslash/insertPublicBeforeSetter.ts","time":13,"edits":1,"cost":"3.15"},{"name":"tests/cases/fourslash/duplicateFunctionImplementation.ts","time":13,"edits":1,"cost":"3.15"},{"name":"tests/cases/compiler/requireOfJsonFileWithModuleEmitUndefined.ts","time":26,"edits":2,"cost":"3.15"},{"name":"tests/cases/conformance/types/spread/spreadContextualTypedBindingPattern.ts","time":26,"edits":2,"cost":"3.15"},{"name":"tests/cases/compiler/systemNamespaceAliasEmit.ts","time":26,"edits":2,"cost":"3.15"},{"name":"tests/cases/fourslash/formatWithStatement.ts","time":13,"edits":1,"cost":"3.15"},{"name":"tests/cases/compiler/exportDefaultClassInNamespace.ts","time":26,"edits":2,"cost":"3.15"},{"name":"tests/cases/fourslash/formattingReplaceTabsWithSpaces.ts","time":13,"edits":1,"cost":"3.15"},{"name":"tests/cases/fourslash/formattingIllegalImportClause.ts","time":13,"edits":1,"cost":"3.15"},{"name":"tests/cases/fourslash/formatSimulatingScriptBlocks.ts","time":26,"edits":2,"cost":"3.15"},{"name":"tests/cases/compiler/commentsAfterCaseClauses2.ts","time":26,"edits":2,"cost":"3.15"},{"name":"tests/cases/fourslash/unclosedStringLiteralAutoformating.ts","time":13,"edits":1,"cost":"3.15"},{"name":"tests/cases/fourslash/tsxFindAllReferences7.ts","time":26,"edits":2,"cost":"3.15"},{"name":"tests/cases/fourslash/syntacticClassifications1.ts","time":13,"edits":1,"cost":"3.15"},{"name":"tests/cases/fourslash/formattingInDestructuring1.ts","time":13,"edits":1,"cost":"3.15"},{"name":"tests/cases/fourslash/removeExportFromInterfaceError0.ts","time":13,"edits":1,"cost":"3.15"},{"name":"tests/cases/fourslash/syntacticClassificationsFunctionWithComments.ts","time":13,"edits":1,"cost":"3.15"},{"name":"tests/cases/fourslash/formattingForIn.ts","time":13,"edits":1,"cost":"3.15"},{"name":"tests/cases/compiler/jsdocIllegalTags.ts","time":26,"edits":2,"cost":"3.15"},{"name":"tests/cases/fourslash/formattingAfterMultiLineIfCondition.ts","time":26,"edits":2,"cost":"3.15"},{"name":"tests/cases/fourslash/syntacticClassificationsJsx2.ts","time":13,"edits":1,"cost":"3.15"},{"name":"tests/cases/fourslash/formattingReadonly.ts","time":13,"edits":1,"cost":"3.15"},{"name":"tests/cases/fourslash/breakpointValidationModuleAmbient.ts","time":13,"edits":1,"cost":"3.15"},{"name":"tests/cases/fourslash/whiteSpaceTrimming.ts","time":13,"edits":1,"cost":"3.15"},{"name":"tests/cases/compiler/genericRestTypes.ts","time":39,"edits":3,"cost":"3.15"},{"name":"tests/cases/fourslash/completionsImport_default_addToNamespaceImport.ts","time":115,"edits":9,"cost":"3.13"},{"name":"tests/cases/compiler/classBlockScoping.ts","time":38,"edits":3,"cost":"3.12"},{"name":"tests/cases/compiler/inferObjectTypeFromStringLiteralToKeyof.ts","time":38,"edits":3,"cost":"3.12"},{"name":"tests/cases/conformance/jsdoc/jsdocDisallowedInTypescript.ts","time":38,"edits":3,"cost":"3.12"},{"name":"tests/cases/conformance/es6/classDeclaration/superCallFromClassThatHasNoBaseTypeButWithSameSymbolInterface.ts","time":38,"edits":3,"cost":"3.12"},{"name":"tests/cases/compiler/jsFileCompilationBindStrictModeErrors.ts","time":38,"edits":3,"cost":"3.12"},{"name":"tests/cases/fourslash/docCommentTemplateClassDecl01.ts","time":38,"edits":3,"cost":"3.12"},{"name":"tests/cases/conformance/salsa/binderUninitializedModuleExportsAssignment.ts","time":25,"edits":2,"cost":"3.11"},{"name":"tests/cases/conformance/es6/destructuring/destructuringVoid.ts","time":25,"edits":2,"cost":"3.11"},{"name":"tests/cases/compiler/exportEqualsClassRedeclarationError.ts","time":25,"edits":2,"cost":"3.11"},{"name":"tests/cases/compiler/duplicateIdentifierRelatedSpans_moduleAugmentation.ts","time":25,"edits":2,"cost":"3.11"},{"name":"tests/cases/conformance/salsa/jsContainerMergeJsContainer.ts","time":25,"edits":2,"cost":"3.11"},{"name":"tests/cases/compiler/declarationEmitToDeclarationDirWithCompositeOption.ts","time":25,"edits":2,"cost":"3.11"},{"name":"tests/cases/conformance/salsa/typeLookupInIIFE.ts","time":25,"edits":2,"cost":"3.11"},{"name":"tests/cases/conformance/jsx/tsxGenericAttributesType4.tsx","time":50,"edits":4,"cost":"3.11"},{"name":"tests/cases/compiler/exactSpellingSuggestion.ts","time":25,"edits":2,"cost":"3.11"},{"name":"tests/cases/compiler/propertyAccessOfReadonlyIndexSignature.ts","time":25,"edits":2,"cost":"3.11"},{"name":"tests/cases/compiler/jsdocFunctionTypeFalsePositive.ts","time":25,"edits":2,"cost":"3.11"},{"name":"tests/cases/conformance/moduleResolution/untypedModuleImport_noImplicitAny_scoped.ts","time":25,"edits":2,"cost":"3.11"},{"name":"tests/cases/compiler/optionsStrictPropertyInitializationStrictNullChecks.ts","time":25,"edits":2,"cost":"3.11"},{"name":"tests/cases/conformance/jsdoc/jsdocTypeDefAtStartOfFile.ts","time":25,"edits":2,"cost":"3.11"},{"name":"tests/cases/fourslash/navigationBarNamespaceImportWithNoName.ts","time":25,"edits":2,"cost":"3.11"},{"name":"tests/cases/conformance/jsx/tsxReactComponentWithDefaultTypeParameter2.tsx","time":62,"edits":5,"cost":"3.10"},{"name":"tests/cases/conformance/jsx/commentEmittingInPreserveJsx1.tsx","time":37,"edits":3,"cost":"3.09"},{"name":"tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression7.ts","time":37,"edits":3,"cost":"3.09"},{"name":"tests/cases/compiler/jqueryInference.ts","time":37,"edits":3,"cost":"3.09"},{"name":"tests/cases/fourslash/completionsImport_ofAlias_preferShortPath.ts","time":49,"edits":4,"cost":"3.09"},{"name":"tests/cases/conformance/salsa/constructorFunctions.ts","time":73,"edits":6,"cost":"3.08"},{"name":"tests/cases/fourslash/moveToNewFile.ts","time":85,"edits":7,"cost":"3.08"},{"name":"tests/cases/compiler/jsdocImportTypeResolution.ts","time":24,"edits":2,"cost":"3.07"},{"name":"tests/cases/conformance/declarationEmit/libReferenceNoLib.ts","time":24,"edits":2,"cost":"3.07"},{"name":"unittests:: config:: initTSConfig","time":12,"edits":1,"cost":"3.07"},{"name":"unittests:: config:: project-references behavior changes under composite: true","time":12,"edits":1,"cost":"3.07"},{"name":"tests/cases/compiler/unionTypeWithIndexedLiteralType.ts","time":24,"edits":2,"cost":"3.07"},{"name":"tests/cases/compiler/declarationEmitPreservesHasNoDefaultLibDirective.ts","time":24,"edits":2,"cost":"3.07"},{"name":"tests/cases/conformance/jsdoc/extendsTag1.ts","time":24,"edits":2,"cost":"3.07"},{"name":"tests/cases/fourslash/smartIndentInCallExpressions.ts","time":12,"edits":1,"cost":"3.07"},{"name":"tests/cases/conformance/externalModules/exportClassNameWithObjectCommonJS.ts","time":24,"edits":2,"cost":"3.07"},{"name":"tests/cases/compiler/jsFileCompilationWithEnabledCompositeOption.ts","time":24,"edits":2,"cost":"3.07"},{"name":"tests/cases/fourslash/formatArrayLiteralExpression.ts","time":12,"edits":1,"cost":"3.07"},{"name":"tests/cases/fourslash/formatTryCatch.ts","time":12,"edits":1,"cost":"3.07"},{"name":"tests/cases/fourslash/smartIndentAfterNewExpression.ts","time":12,"edits":1,"cost":"3.07"},{"name":"tests/cases/fourslash/formattingOnEmptyInterfaceLiteral.ts","time":12,"edits":1,"cost":"3.07"},{"name":"tests/cases/compiler/jsdocTypedef_propertyWithNoType.ts","time":24,"edits":2,"cost":"3.07"},{"name":"tests/cases/conformance/jsx/tsxSfcReturnNull.tsx","time":24,"edits":2,"cost":"3.07"},{"name":"tests/cases/compiler/newAbstractInstance2.ts","time":24,"edits":2,"cost":"3.07"},{"name":"tests/cases/fourslash/addDuplicateSetter.ts","time":12,"edits":1,"cost":"3.07"},{"name":"tests/cases/compiler/moduleResolution_packageJson_notAtPackageRoot.ts","time":24,"edits":2,"cost":"3.07"},{"name":"tests/cases/fourslash/formatVariableAssignments.ts","time":12,"edits":1,"cost":"3.07"},{"name":"tests/cases/compiler/parenthesizedArrowExpressionASI.ts","time":24,"edits":2,"cost":"3.07"},{"name":"tests/cases/fourslash/removeParameterBetweenCommentAndParameter.ts","time":12,"edits":1,"cost":"3.07"},{"name":"tests/cases/compiler/jsdocParamTagOnPropertyInitializer.ts","time":24,"edits":2,"cost":"3.07"},{"name":"tests/cases/compiler/functionCall18.ts","time":24,"edits":2,"cost":"3.07"},{"name":"tests/cases/fourslash/formattingBlockInCaseClauses.ts","time":12,"edits":1,"cost":"3.07"},{"name":"tests/cases/compiler/genericNumberIndex.ts","time":24,"edits":2,"cost":"3.07"},{"name":"tests/cases/fourslash/deleteTypeParameter.ts","time":12,"edits":1,"cost":"3.07"},{"name":"tests/cases/fourslash/tsxRename7.ts","time":12,"edits":1,"cost":"3.07"},{"name":"tests/cases/fourslash/editJsdocType.ts","time":24,"edits":2,"cost":"3.07"},{"name":"tests/cases/fourslash/smartIndentOnUnclosedFunctionDeclaration03.ts","time":12,"edits":1,"cost":"3.07"},{"name":"tests/cases/fourslash/formattingInExpressionsInTsx.ts","time":12,"edits":1,"cost":"3.07"},{"name":"tests/cases/fourslash/interfaceRecursiveInheritanceErrors1.ts","time":12,"edits":1,"cost":"3.07"},{"name":"tests/cases/fourslash/formattingSpaceAfterCommaBeforeOpenParen.ts","time":12,"edits":1,"cost":"3.07"},{"name":"tests/cases/fourslash/functionTypeFormatting.ts","time":12,"edits":1,"cost":"3.07"},{"name":"tests/cases/fourslash/navigationBarJsDoc.ts","time":12,"edits":1,"cost":"3.07"},{"name":"tests/cases/fourslash/navigationBarItemsFunctionsBroken.ts","time":12,"edits":1,"cost":"3.07"},{"name":"tests/cases/fourslash/navigationBarFunctionIndirectlyInVariableDeclaration.ts","time":12,"edits":1,"cost":"3.07"},{"name":"tests/cases/fourslash/formatWithTabs2.ts","time":12,"edits":1,"cost":"3.07"},{"name":"tests/cases/conformance/jsdoc/typedefTagNested.ts","time":36,"edits":3,"cost":"3.07"},{"name":"tests/cases/conformance/jsx/correctlyMarkAliasAsReferences4.tsx","time":47,"edits":4,"cost":"3.05"},{"name":"tests/cases/compiler/compareTypeParameterConstrainedByLiteralToLiteral.ts","time":23,"edits":2,"cost":"3.02"},{"name":"tests/cases/compiler/strictBooleanMemberAssignability.ts","time":23,"edits":2,"cost":"3.02"},{"name":"tests/cases/conformance/jsdoc/jsdocParseStarEquals.ts","time":23,"edits":2,"cost":"3.02"},{"name":"tests/cases/compiler/unusedLocalsStartingWithUnderscore.ts","time":23,"edits":2,"cost":"3.02"},{"name":"tests/cases/compiler/commentsAfterCaseClauses3.ts","time":23,"edits":2,"cost":"3.02"},{"name":"tests/cases/compiler/declarationTypecheckNoUseBeforeReferenceCheck.ts","time":23,"edits":2,"cost":"3.02"},{"name":"tests/cases/compiler/jsdocParamTagInvalid.ts","time":23,"edits":2,"cost":"3.02"},{"name":"tests/cases/compiler/typePredicatesInUnion2.ts","time":23,"edits":2,"cost":"3.02"},{"name":"tests/cases/compiler/destructuringAssignmentWithStrictNullChecks.ts","time":23,"edits":2,"cost":"3.02"},{"name":"tests/cases/compiler/moduleResolution_automaticTypeDirectiveNames.ts","time":23,"edits":2,"cost":"3.02"},{"name":"tests/cases/compiler/jsdocParameterParsingInfiniteLoop.ts","time":23,"edits":2,"cost":"3.02"},{"name":"tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpressionDivideAmbiguity7.ts","time":23,"edits":2,"cost":"3.02"},{"name":"tests/cases/compiler/moduleResolution_noLeadingDot.ts","time":23,"edits":2,"cost":"3.02"},{"name":"tests/cases/compiler/taggedTemplateStringWithSymbolExpression01.ts","time":23,"edits":2,"cost":"3.02"},{"name":"tests/cases/compiler/accessorWithLineTerminator.ts","time":23,"edits":2,"cost":"3.02"},{"name":"tests/cases/conformance/jsdoc/typeTagWithGenericSignature.ts","time":23,"edits":2,"cost":"3.02"},{"name":"tests/cases/compiler/anyMappedTypesError.ts","time":23,"edits":2,"cost":"3.02"},{"name":"tests/cases/conformance/jsdoc/checkJsdocTypeTag3.ts","time":23,"edits":2,"cost":"3.02"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceMemberOrdering.ts","time":23,"edits":2,"cost":"3.02"},{"name":"tests/cases/compiler/unicodeStringLiteral.ts","time":23,"edits":2,"cost":"3.02"},{"name":"tests/cases/fourslash/commentBraceCompletionPosition.ts","time":23,"edits":2,"cost":"3.02"},{"name":"tests/cases/fourslash/getJSXOutliningSpans.tsx","time":23,"edits":2,"cost":"3.02"},{"name":"tests/cases/conformance/jsx/tsxGenericAttributesType7.tsx","time":34,"edits":3,"cost":"3.01"},{"name":"tests/cases/conformance/jsx/tsxGenericAttributesType2.tsx","time":34,"edits":3,"cost":"3.01"},{"name":"tests/cases/compiler/APISample_compile.ts","time":45,"edits":4,"cost":"3.00"},{"name":"tests/cases/fourslash/smartSelection_functionParams1.ts","time":22,"edits":2,"cost":"2.98"},{"name":"tests/cases/fourslash/smartSelection_complex.ts","time":22,"edits":2,"cost":"2.98"},{"name":"tests/cases/compiler/exportDefaultWithJSDoc2.ts","time":22,"edits":2,"cost":"2.98"},{"name":"tests/cases/compiler/exportAssignmentWithoutAllowSyntheticDefaultImportsError.ts","time":22,"edits":2,"cost":"2.98"},{"name":"tests/cases/conformance/jsdoc/typeTagPrototypeAssignment.ts","time":22,"edits":2,"cost":"2.98"},{"name":"unittests:: config:: project-references errors when a file in a composite project occurs outside the root","time":11,"edits":1,"cost":"2.98"},{"name":"tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction2_es5.ts","time":11,"edits":1,"cost":"2.98"},{"name":"tests/cases/compiler/forAwaitForUnion.ts","time":22,"edits":2,"cost":"2.98"},{"name":"tests/cases/fourslash/getJavaScriptCompletions14.ts","time":11,"edits":1,"cost":"2.98"},{"name":"tests/cases/compiler/doubleUnderscoreReactNamespace.ts","time":22,"edits":2,"cost":"2.98"},{"name":"tests/cases/conformance/jsdoc/callbackTag3.ts","time":22,"edits":2,"cost":"2.98"},{"name":"tests/cases/fourslash/formattingObjectLiteralOpenCurlyNewlineTyping.ts","time":22,"edits":2,"cost":"2.98"},{"name":"tests/cases/fourslash/incrementalParsingDynamicImport2.ts","time":22,"edits":2,"cost":"2.98"},{"name":"tests/cases/compiler/computedPropertiesTransformedInOtherwiseNonTSClasses.ts","time":22,"edits":2,"cost":"2.98"},{"name":"tests/cases/compiler/unusedTypeParametersWithUnderscore.ts","time":33,"edits":3,"cost":"2.98"},{"name":"tests/cases/conformance/jsx/tsxReactComponentWithDefaultTypeParameter1.tsx","time":44,"edits":4,"cost":"2.98"},{"name":"tests/cases/conformance/es2018/usePromiseFinally.ts","time":22,"edits":2,"cost":"2.98"},{"name":"tests/cases/fourslash/shims/getNavigationBarItems.ts","time":11,"edits":1,"cost":"2.98"},{"name":"tests/cases/compiler/jsdocTypeGenericInstantiationAttempt.ts","time":22,"edits":2,"cost":"2.98"},{"name":"tests/cases/conformance/jsdoc/jsdocPrototypePropertyAccessWithType.ts","time":22,"edits":2,"cost":"2.98"},{"name":"tests/cases/fourslash/completionListKeywords.ts","time":33,"edits":3,"cost":"2.98"},{"name":"tests/cases/compiler/unusedTypeParameters_infer.ts","time":22,"edits":2,"cost":"2.98"},{"name":"tests/cases/fourslash/formatParameter.ts","time":11,"edits":1,"cost":"2.98"},{"name":"tests/cases/fourslash/insertArgumentBeforeOverloadedConstructor.ts","time":11,"edits":1,"cost":"2.98"},{"name":"tests/cases/fourslash/syntaxErrorAfterImport1.ts","time":11,"edits":1,"cost":"2.98"},{"name":"tests/cases/fourslash/formatFunctionAndConstructorType.ts","time":11,"edits":1,"cost":"2.98"},{"name":"tests/cases/fourslash/smartIndentOnUnclosedFunctionDeclaration02.ts","time":11,"edits":1,"cost":"2.98"},{"name":"tests/cases/fourslash/syntacticClassificationsJsx1.ts","time":11,"edits":1,"cost":"2.98"},{"name":"tests/cases/fourslash/navigationBarItemsImports.ts","time":11,"edits":1,"cost":"2.98"},{"name":"tests/cases/conformance/jsdoc/enumTagUseBeforeDefCrash.ts","time":22,"edits":2,"cost":"2.98"},{"name":"tests/cases/fourslash/navigationBarItemsExports.ts","time":11,"edits":1,"cost":"2.98"},{"name":"tests/cases/fourslash/formatEmptyBlock.ts","time":11,"edits":1,"cost":"2.98"},{"name":"tests/cases/fourslash/formatOnEnterFunctionDeclaration.ts","time":11,"edits":1,"cost":"2.98"},{"name":"tests/cases/fourslash/formatAfterObjectLiteral.ts","time":11,"edits":1,"cost":"2.98"},{"name":"tests/cases/fourslash/declarationExpressions.ts","time":22,"edits":2,"cost":"2.98"},{"name":"tests/cases/fourslash/formattingOnChainedCallbacksAndPropertyAccesses.ts","time":11,"edits":1,"cost":"2.98"},{"name":"tests/cases/fourslash/identationAfterInterfaceCall.ts","time":11,"edits":1,"cost":"2.98"},{"name":"tests/cases/fourslash/consistenceOnIndentionsOfObjectsInAListAfterFormatting.ts","time":11,"edits":1,"cost":"2.98"},{"name":"tests/cases/compiler/unusedDestructuring.ts","time":43,"edits":4,"cost":"2.96"},{"name":"tests/cases/compiler/restUnion2.ts","time":32,"edits":3,"cost":"2.95"},{"name":"tests/cases/compiler/jsFileCompilationBindDuplicateIdentifier.ts","time":32,"edits":3,"cost":"2.95"},{"name":"tests/cases/fourslash/smartSelection_emptyRanges.ts","time":21,"edits":2,"cost":"2.93"},{"name":"tests/cases/compiler/jsFileCompilationBindDeepExportsAssignment.ts","time":21,"edits":2,"cost":"2.93"},{"name":"tests/cases/compiler/assigningFunctionToTupleIssuesError.ts","time":21,"edits":2,"cost":"2.93"},{"name":"tests/cases/compiler/jsPropertyAssignedAfterMethodDeclaration.ts","time":21,"edits":2,"cost":"2.93"},{"name":"tests/cases/conformance/externalModules/es6/es6modulekindExportClassNameWithObject.ts","time":21,"edits":2,"cost":"2.93"},{"name":"tests/cases/compiler/commonJsUnusedLocals.ts","time":21,"edits":2,"cost":"2.93"},{"name":"tests/cases/fourslash/completionsImport_default_didNotExistBefore.ts","time":114,"edits":11,"cost":"2.92"},{"name":"tests/cases/conformance/jsdoc/checkJsdocTypeTag6.ts","time":31,"edits":3,"cost":"2.92"},{"name":"tests/cases/conformance/jsdoc/syntaxErrors.ts","time":31,"edits":3,"cost":"2.92"},{"name":"tests/cases/compiler/emitThisInObjectLiteralGetter.ts","time":31,"edits":3,"cost":"2.92"},{"name":"tests/cases/conformance/functions/parameterInitializersForwardReferencing1_es6.ts","time":41,"edits":4,"cost":"2.91"},{"name":"tests/cases/conformance/salsa/propertyAssignmentOnUnresolvedImportedSymbol.ts","time":20,"edits":2,"cost":"2.88"},{"name":"unittests:: tsserver:: resolutionCache:: tsserverProjectSystem extra resolution pass in lshost","time":10,"edits":1,"cost":"2.88"},{"name":"tests/cases/compiler/incrementalInvalid.ts","time":20,"edits":2,"cost":"2.88"},{"name":"unittests:: core paths","time":10,"edits":1,"cost":"2.88"},{"name":"tests/cases/conformance/async/es5/asyncMultiFile_es5.ts","time":10,"edits":1,"cost":"2.88"},{"name":"tests/cases/conformance/types/never/neverTypeErrors1.ts","time":40,"edits":4,"cost":"2.88"},{"name":"tests/cases/fourslash/findAllReferencesJSDocFunctionThis.ts","time":10,"edits":1,"cost":"2.88"},{"name":"tests/cases/fourslash/genericsFormatting.ts","time":20,"edits":2,"cost":"2.88"},{"name":"tests/cases/conformance/jsdoc/jsdocPrefixPostfixParsing.ts","time":30,"edits":3,"cost":"2.88"},{"name":"tests/cases/compiler/errorForConflictingExportEqualsValue.ts","time":20,"edits":2,"cost":"2.88"},{"name":"tests/cases/compiler/noUnusedLocals_selfReference.ts","time":50,"edits":5,"cost":"2.88"},{"name":"tests/cases/compiler/noSubstitutionTemplateStringLiteralTypes.ts","time":20,"edits":2,"cost":"2.88"},{"name":"tests/cases/fourslash/formattingMultilineCommentsWithTabs1.ts","time":10,"edits":1,"cost":"2.88"},{"name":"tests/cases/fourslash/formatTypeOperation.ts","time":10,"edits":1,"cost":"2.88"},{"name":"tests/cases/fourslash/smartIndentOnUnclosedFunctionDeclaration06.ts","time":10,"edits":1,"cost":"2.88"},{"name":"tests/cases/fourslash/debuggerStatementIndent.ts","time":10,"edits":1,"cost":"2.88"},{"name":"tests/cases/fourslash/formattingOnTabAfterCloseCurly.ts","time":10,"edits":1,"cost":"2.88"},{"name":"tests/cases/compiler/jsFileCompilationBindErrors.ts","time":30,"edits":3,"cost":"2.88"},{"name":"tests/cases/conformance/jsdoc/jsdocTwoLineTypedef.ts","time":20,"edits":2,"cost":"2.88"},{"name":"tests/cases/fourslash/singleLineTypeLiteralFormatting.ts","time":10,"edits":1,"cost":"2.88"},{"name":"tests/cases/fourslash/formattingMultipleMappedType.ts","time":20,"edits":2,"cost":"2.88"},{"name":"tests/cases/fourslash/navigationBarGetterAndSetter.ts","time":10,"edits":1,"cost":"2.88"},{"name":"tests/cases/fourslash/syntacticClassificationsObjectLiteral.ts","time":10,"edits":1,"cost":"2.88"},{"name":"tests/cases/fourslash/smartIndentStatementForIn.ts","time":10,"edits":1,"cost":"2.88"},{"name":"tests/cases/fourslash/smartIndentOnUnclosedFunctionDeclaration05.ts","time":10,"edits":1,"cost":"2.88"},{"name":"tests/cases/fourslash/constructorBraceFormatting.ts","time":10,"edits":1,"cost":"2.88"},{"name":"tests/cases/fourslash/formatWithTabs.ts","time":20,"edits":2,"cost":"2.88"},{"name":"tests/cases/fourslash/isInMultiLineCommentOnlyTrivia.ts","time":20,"edits":2,"cost":"2.88"},{"name":"tests/cases/fourslash/tsxQuickInfo3.ts","time":10,"edits":1,"cost":"2.88"},{"name":"tests/cases/fourslash/importDeclPaste0.ts","time":10,"edits":1,"cost":"2.88"},{"name":"tests/cases/fourslash/formatTrailingComma.ts","time":20,"edits":2,"cost":"2.88"},{"name":"tests/cases/fourslash/smartIndentStatementWith.ts","time":10,"edits":1,"cost":"2.88"},{"name":"tests/cases/fourslash/smartIndentListItem.ts","time":10,"edits":1,"cost":"2.88"},{"name":"tests/cases/fourslash/navigationBarItemsSymbols1.ts","time":10,"edits":1,"cost":"2.88"},{"name":"tests/cases/fourslash/formattingOfExportDefault.ts","time":10,"edits":1,"cost":"2.88"},{"name":"tests/cases/compiler/elaboratedErrorsOnNullableTargets01.ts","time":29,"edits":3,"cost":"2.85"},{"name":"tests/cases/fourslash/navigationItemsSpecialPropertyAssignment.ts","time":29,"edits":3,"cost":"2.85"},{"name":"tests/cases/compiler/errorForUsingPropertyOfTypeAsType03.ts","time":29,"edits":3,"cost":"2.85"},{"name":"tests/cases/compiler/incrementalTsBuildInfoFile.ts","time":19,"edits":2,"cost":"2.83"},{"name":"tests/cases/conformance/jsdoc/checkJsdocOnEndOfFile.ts","time":19,"edits":2,"cost":"2.83"},{"name":"tests/cases/fourslash/javaScriptPrototype3.ts","time":19,"edits":2,"cost":"2.83"},{"name":"tests/cases/fourslash/codeFixClassImplementInterfaceComments.ts","time":19,"edits":2,"cost":"2.83"},{"name":"tests/cases/fourslash/formattingChainingMethods.ts","time":19,"edits":2,"cost":"2.83"},{"name":"tests/cases/compiler/contextualTypingFunctionReturningFunction.ts","time":28,"edits":3,"cost":"2.81"},{"name":"tests/cases/fourslash/completionsIsTypeOnlyCompletion.ts","time":18,"edits":2,"cost":"2.78"},{"name":"unittests:: tsserver:: VersionCache simple text","time":9,"edits":1,"cost":"2.78"},{"name":"unittests:: tsbuild:: when tsconfig extends the missing file","time":9,"edits":1,"cost":"2.78"},{"name":"unittests:: config:: project-references path mapping","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/compiler/newMap.ts","time":18,"edits":2,"cost":"2.78"},{"name":"tests/cases/compiler/dynamicImportWithNestedThis_es2015.ts","time":18,"edits":2,"cost":"2.78"},{"name":"tests/cases/conformance/jsdoc/jsdocBindingInUnreachableCode.ts","time":18,"edits":2,"cost":"2.78"},{"name":"tests/cases/fourslash/whiteSpaceTrimming4.ts","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/compiler/dynamicImportInDefaultExportExpression.ts","time":18,"edits":2,"cost":"2.78"},{"name":"tests/cases/fourslash/addVarToConstructor1.ts","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/conformance/salsa/typeFromPropertyAssignment23.ts","time":36,"edits":4,"cost":"2.78"},{"name":"tests/cases/fourslash/tsxFindAllReferences5.ts","time":18,"edits":2,"cost":"2.78"},{"name":"tests/cases/compiler/jsExtendsImplicitAny.ts","time":27,"edits":3,"cost":"2.78"},{"name":"tests/cases/fourslash/moduleIndent.ts","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/fourslash/formattingChangeSettings.ts","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/fourslash/formattingOnSemiColon.ts","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/compiler/jsFileCompilationBindMultipleDefaultExports.ts","time":27,"edits":3,"cost":"2.78"},{"name":"tests/cases/fourslash/navigationBarItemsItemsExternalModules.ts","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/fourslash/navigationItemsInConstructorsExactMatch.ts","time":18,"edits":2,"cost":"2.78"},{"name":"tests/cases/fourslash/formattingIfInElseBlock.ts","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/fourslash/tsxRename8.ts","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/fourslash/formatClassExpression.ts","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/fourslash/syntacticClassificationsForOfKeyword.ts","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/fourslash/formattingSingleLineWithNewLineOptionSet.ts","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/fourslash/formatAsyncKeyword.ts","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/fourslash/formattingHexLiteral.ts","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/fourslash/tsxGoToDefinitionUnionElementType2.ts","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/fourslash/navigationBarItemsFunctionsBroken2.ts","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/fourslash/getMatchingBracesAdjacentBraces.ts","time":18,"edits":2,"cost":"2.78"},{"name":"tests/cases/fourslash/smartIndentOnUnclosedConstructorType01.ts","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/fourslash/interfaceRecursiveInheritanceErrors0.ts","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/fourslash/smartIndentStatementTryCatchFinally.ts","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/fourslash/smartIndentStatementSwitch.ts","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/fourslash/navigationBarItemsMissingName1.ts","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/fourslash/functionFormatting.ts","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/fourslash/formattingWithLimitedSpan.ts","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/fourslash/shims-pp/getNavigationBarItems.ts","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/fourslash/syntacticClassificationsConflictDiff3Markers1.ts","time":18,"edits":2,"cost":"2.78"},{"name":"tests/cases/fourslash/smartIndentClass.ts","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/fourslash/indentAfterImport.ts","time":9,"edits":1,"cost":"2.78"},{"name":"tests/cases/fourslash/navigationBarAnonymousClassAndFunctionExpressions.ts","time":34,"edits":4,"cost":"2.72"},{"name":"tests/cases/fourslash/navigateItemsExports.ts","time":17,"edits":2,"cost":"2.72"},{"name":"tests/cases/fourslash/formattingOptionsChangeJsx.ts","time":17,"edits":2,"cost":"2.72"},{"name":"tests/cases/fourslash/incrementalParsingDynamicImport4.ts","time":17,"edits":2,"cost":"2.72"},{"name":"tests/cases/fourslash/getOutliningForBlockComments.ts","time":17,"edits":2,"cost":"2.72"},{"name":"tests/cases/fourslash/docCommentTemplate_insideEmptyComment.ts","time":17,"edits":2,"cost":"2.72"},{"name":"tests/cases/fourslash/smartIndentObjectBindingPattern02.ts","time":25,"edits":3,"cost":"2.70"},{"name":"tests/cases/fourslash/incrementalParsingDynamicImport3.ts","time":25,"edits":3,"cost":"2.70"},{"name":"unittests:: services:: PreProcessFile:","time":8,"edits":1,"cost":"2.66"},{"name":"unittests:: moduleResolution:: Type reference directive resolution: ","time":8,"edits":1,"cost":"2.66"},{"name":"unittests:: moduleResolution:: Relative imports","time":8,"edits":1,"cost":"2.66"},{"name":"unittests:: assert","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/getMatchingBracesNegativeCases.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/smartIndentOnUnclosedArrowType01.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/regexErrorRecovery.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/compiler/importDeclTypes.ts","time":24,"edits":3,"cost":"2.66"},{"name":"tests/cases/fourslash/breakpointValidationModuleEmpty.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/navigationBarItemsItemsExternalModules2.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/indentationInJsx1.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/formatOnEnterOpenBraceAddNewLine.ts","time":16,"edits":2,"cost":"2.66"},{"name":"tests/cases/fourslash/syntacticClassificationForJSDocTemplateTag.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/smartIndentOnUnclosedObjectTypeLiteral01.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/formatColonAndQMark.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/smartIndentOnUnclosedIndexSignature01.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/formattingElseInsideAFunction.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/navigationBarItemsSymbols2.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/navigationBarItemsItemsExternalModules3.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/formattingOnConstructorSignature.ts","time":24,"edits":3,"cost":"2.66"},{"name":"tests/cases/fourslash/addDeclareToModule.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/smartIndentStartLineInLists.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/formattingCommentsBeforeErrors.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/formattingInDestructuring5.ts","time":16,"edits":2,"cost":"2.66"},{"name":"tests/cases/fourslash/indentNewExpressionNoBraces.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/validBraceCompletionPosition.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/semicolonFormattingAfterArrayLiteral.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/noSmartIndentInsideMultilineString.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/formattingArrayLiteral.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/formattingOnDocumentReadyFunction.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/formattingJsxTexts.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/formatAnyTypeLiteral.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/shims/getIndentationAtPosition.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/formattingInDestructuring4.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/semicolonFormatting.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/navigationBarItemsMissingName2.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/formattingMappedType.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/formattingInDestructuring3.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/fourslash/syntacticClassificationsConflictMarkers1.ts","time":8,"edits":1,"cost":"2.66"},{"name":"tests/cases/conformance/jsdoc/checkJsdocTypedefInParamTag1.ts","time":39,"edits":5,"cost":"2.64"},{"name":"tests/cases/fourslash/tsxGoToDefinitionUnionElementType1.ts","time":31,"edits":4,"cost":"2.63"},{"name":"tests/cases/compiler/jsFileCompilationNonNullAssertion.ts","time":23,"edits":3,"cost":"2.62"},{"name":"tests/cases/fourslash/smartIndentObjectBindingPattern01.ts","time":23,"edits":3,"cost":"2.62"},{"name":"tests/cases/fourslash/findAllRefsRedeclaredPropertyInDerivedInterface.ts","time":38,"edits":5,"cost":"2.61"},{"name":"tests/cases/compiler/unreachableJavascriptChecked.ts","time":30,"edits":4,"cost":"2.60"},{"name":"tests/cases/fourslash/smartIndentReturn.ts","time":15,"edits":2,"cost":"2.60"},{"name":"tests/cases/fourslash/smartIndentOnFunctionParameters.ts","time":15,"edits":2,"cost":"2.60"},{"name":"tests/cases/fourslash/codeFixUnusedIdentifier_deleteWrite.ts","time":15,"edits":2,"cost":"2.60"},{"name":"tests/cases/fourslash/tsxFindAllReferences10.ts","time":15,"edits":2,"cost":"2.60"},{"name":"tests/cases/fourslash/tsxQuickInfo4.ts","time":15,"edits":2,"cost":"2.60"},{"name":"tests/cases/fourslash/findAllRefsThisKeyword.ts","time":29,"edits":4,"cost":"2.56"},{"name":"tests/cases/fourslash/smartSelection_mappedTypes.ts","time":14,"edits":2,"cost":"2.53"},{"name":"unittests:: tsserver:: smartSelection","time":7,"edits":1,"cost":"2.53"},{"name":"unittests:: tsserver:: occurence highlight on string","time":7,"edits":1,"cost":"2.53"},{"name":"unittests:: moduleResolution:: Node module resolution - non-relative paths","time":7,"edits":1,"cost":"2.53"},{"name":"unittests:: tsserver:: format settings","time":7,"edits":1,"cost":"2.53"},{"name":"unittests:: services:: languageService","time":7,"edits":1,"cost":"2.53"},{"name":"unittests:: config:: convertTypeAcquisitionFromJson","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/compiler/jsdocInTypeScript.ts","time":49,"edits":7,"cost":"2.53"},{"name":"tests/cases/fourslash/formattingKeywordAsIdentifier.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/navigationBarItemsStaticAndNonStaticNoMerge.ts","time":14,"edits":2,"cost":"2.53"},{"name":"tests/cases/fourslash/formattingOnTypeLiteral.ts","time":14,"edits":2,"cost":"2.53"},{"name":"tests/cases/fourslash/indentationInAugmentations2.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/superCallError0.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/stringBraceCompletionPosition.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/arrayConcatTypeCheck0.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/smartIndentInsideMultilineString.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/formattingEqualsBeforeBracketInTypeAlias.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/formattingOnModuleIndentation.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/completionsRecommended_import.ts","time":21,"edits":3,"cost":"2.53"},{"name":"tests/cases/fourslash/syntacticClassificationsForOfKeyword2.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/syntacticClassificationsCancellation1.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/semicolonFormattingInsideAComment.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/multilineCommentBeforeOpenBrace.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/spaceAfterReturn.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/smartIndentStatementFor.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/indentAfterFunctionClosingBraces.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/formattingOnCloseBrace.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/formattingSpaceBetweenParent.ts","time":14,"edits":2,"cost":"2.53"},{"name":"tests/cases/fourslash/navigationItemsPrefixMatch.ts","time":14,"edits":2,"cost":"2.53"},{"name":"tests/cases/fourslash/syntacticClassificationsForOfKeyword3.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/formattingRegexes.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/stringTemplateBraceCompletionPosition.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/quickInfoJsPropertyAssignedAfterMethodDeclaration.ts","time":14,"edits":2,"cost":"2.53"},{"name":"tests/cases/fourslash/formatImportDeclaration.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/typeAssertionsFormatting.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/formatOnSemiColonAfterBreak.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/smartIndentEnum.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/publicBreak.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/formattingMultilineTemplateLiterals.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/formattingExpressionsInIfCondition.ts","time":7,"edits":1,"cost":"2.53"},{"name":"tests/cases/fourslash/smartIndentObjectLiteralOpenBracketNewLine.ts","time":20,"edits":3,"cost":"2.48"},{"name":"tests/cases/fourslash/formatDocumentWithTrivia.ts","time":13,"edits":2,"cost":"2.45"},{"name":"tests/cases/fourslash/syntacticClassificationsConflictDiff3Markers2.ts","time":13,"edits":2,"cost":"2.45"},{"name":"tests/cases/fourslash/formatLiteralTypeInUnionOrIntersectionType.ts","time":13,"edits":2,"cost":"2.45"},{"name":"tests/cases/fourslash/docCommentTemplateVariableStatements01.ts","time":19,"edits":3,"cost":"2.43"},{"name":"tests/cases/fourslash/quickInfoJsdocEnum.ts","time":19,"edits":3,"cost":"2.43"},{"name":"tests/cases/fourslash/smartSelection_JSDoc.ts","time":12,"edits":2,"cost":"2.37"},{"name":"unittests:: tsserver:: import helpers","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/shims/getBraceMatchingAtPosition.ts","time":12,"edits":2,"cost":"2.37"},{"name":"tests/cases/fourslash/getOutliningForSingleLineComments.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/smartIndentOnUnclosedComputedProperty01.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/importNameCodeFix_jsExtension.ts","time":24,"edits":4,"cost":"2.37"},{"name":"tests/cases/fourslash/whiteSpaceBeforeReturnTypeFormatting.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/formattingGlobalAugmentation2.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/tsxFindAllReferencesUnionElementType1.ts","time":12,"edits":2,"cost":"2.37"},{"name":"tests/cases/fourslash/smartIndentNonterminatedIfStatementAtEOF.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/incrementalJsDocAdjustsLengthsRight.ts","time":12,"edits":2,"cost":"2.37"},{"name":"tests/cases/fourslash/functionTypePredicateFormatting.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/formattingInDestructuring2.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/navigateItemsImports.ts","time":12,"edits":2,"cost":"2.37"},{"name":"tests/cases/fourslash/navigationBarMerging_grandchildren.ts","time":12,"edits":2,"cost":"2.37"},{"name":"tests/cases/fourslash/getMatchingBraces.ts","time":12,"edits":2,"cost":"2.37"},{"name":"tests/cases/fourslash/formattingOnInterfaces.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/whiteSpaceTrimming3.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/syntacticClassificationsConflictMarkers2.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/smartIndentActualIndentation.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/formattingAfterMultiLineString.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/formatArrayOrObjectLiteralsInVariableList.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/smartIndentTypeArgumentList.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/formattingCrash.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/smartIndentOnAccessors02.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/formatDebuggerStatement.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/tabbingAfterNewlineInsertedBeforeWhile.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/syntacticClassificationsTemplates2.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/navbar_let.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/formattingAfterChainedFatArrow.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/formatObjectBindingPattern_restElementWithPropertyName.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/smartIndentInParenthesizedExpression02.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/smartIndentAfterFatArrowVar.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/formatTsx.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/smartIndentAfterAlignedFunctionArgument.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/semicolonFormattingInsideAStringLiteral.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/indexSignatureWithoutAnnotation.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/formattingQMark.ts","time":6,"edits":1,"cost":"2.37"},{"name":"tests/cases/fourslash/smartSelection_imports.ts","time":11,"edits":2,"cost":"2.29"},{"name":"tests/cases/fourslash/tsxFindAllReferences11.ts","time":11,"edits":2,"cost":"2.29"},{"name":"tests/cases/fourslash/completionsImport_shadowedByLocal.ts","time":22,"edits":4,"cost":"2.29"},{"name":"tests/cases/fourslash/semicolonFormattingNestedStatements.ts","time":11,"edits":2,"cost":"2.29"},{"name":"tests/cases/fourslash/formattingConditionalOperator.ts","time":11,"edits":2,"cost":"2.29"},{"name":"tests/cases/fourslash/shims-pp/getBraceMatchingAtPosition.ts","time":11,"edits":2,"cost":"2.29"},{"name":"tests/cases/fourslash/formatAsyncComputedMethod.ts","time":11,"edits":2,"cost":"2.29"},{"name":"tests/cases/fourslash/formattingObjectLiteralOpenCurlyNewline.ts","time":11,"edits":2,"cost":"2.29"},{"name":"tests/cases/fourslash/formatOnEnterInComment.ts","time":11,"edits":2,"cost":"2.29"},{"name":"tests/cases/fourslash/incrementalParsingWithJsDoc.ts","time":16,"edits":3,"cost":"2.26"},{"name":"tests/cases/fourslash/docCommentTemplateNamespacesAndModules01.ts","time":16,"edits":3,"cost":"2.26"},{"name":"tests/cases/fourslash/autoCloseTag.ts","time":16,"edits":3,"cost":"2.26"},{"name":"tests/cases/fourslash/completionsImport_multipleWithSameName.ts","time":37,"edits":7,"cost":"2.25"},{"name":"unittests:: services:: hostNewLineSupport","time":5,"edits":1,"cost":"2.19"},{"name":"tests/cases/fourslash/tsxFindAllReferencesUnionElementType2.ts","time":10,"edits":2,"cost":"2.19"},{"name":"tests/cases/fourslash/navigationBarItemsNamedArrowFunctions.ts","time":10,"edits":2,"cost":"2.19"},{"name":"tests/cases/fourslash/asOperatorFormatting.ts","time":5,"edits":1,"cost":"2.19"},{"name":"tests/cases/fourslash/formatAfterMultilineComment.ts","time":5,"edits":1,"cost":"2.19"},{"name":"tests/cases/fourslash/formattingForOfKeyword.ts","time":5,"edits":1,"cost":"2.19"},{"name":"tests/cases/fourslash/formatOnOpenCurlyBraceRemoveNewLine.ts","time":10,"edits":2,"cost":"2.19"},{"name":"tests/cases/fourslash/formatSelectionWithTrivia2.ts","time":5,"edits":1,"cost":"2.19"},{"name":"tests/cases/fourslash/smartIndentNonterminatedArgumentListAtEOF.ts","time":5,"edits":1,"cost":"2.19"},{"name":"tests/cases/fourslash/outliningForNonCompleteInterfaceDeclaration.ts","time":5,"edits":1,"cost":"2.19"},{"name":"tests/cases/fourslash/getNameOrDottedNameSpan.ts","time":5,"edits":1,"cost":"2.19"},{"name":"tests/cases/fourslash/smartIndentCloseBrace.ts","time":5,"edits":1,"cost":"2.19"},{"name":"tests/cases/fourslash/importTypeFormatting.ts","time":10,"edits":2,"cost":"2.19"},{"name":"tests/cases/fourslash/typeCheckObjectInArrayLiteral.ts","time":5,"edits":1,"cost":"2.19"},{"name":"tests/cases/fourslash/formattingGlobalAugmentation1.ts","time":5,"edits":1,"cost":"2.19"},{"name":"tests/cases/fourslash/autoFormattingOnPasting.ts","time":14,"edits":3,"cost":"2.12"},{"name":"tests/cases/fourslash/findAllRefsPrimitiveJsDoc.ts","time":9,"edits":2,"cost":"2.09"},{"name":"tests/cases/fourslash/completionForStringLiteralNonrelativeImport15.ts","time":9,"edits":2,"cost":"2.09"},{"name":"tests/cases/fourslash/forceIndentAfterNewLineInsert.ts","time":9,"edits":2,"cost":"2.09"},{"name":"tests/cases/fourslash/formattingOnEnter.ts","time":9,"edits":2,"cost":"2.09"},{"name":"tests/cases/fourslash/navigationItemsExactMatch.ts","time":9,"edits":2,"cost":"2.09"},{"name":"tests/cases/fourslash/formattingSkippedTokens.ts","time":9,"edits":2,"cost":"2.09"},{"name":"tests/cases/fourslash/smartSelection_loneVariableDeclaration.ts","time":8,"edits":2,"cost":"1.97"},{"name":"unittests:: tsserver:: Session:: how Session is extendable via subclassing","time":4,"edits":1,"cost":"1.97"},{"name":"unittests:: tsserver:: getApplicableRefactors","time":4,"edits":1,"cost":"1.97"},{"name":"unittests:: tsserver:: VersionCache TS code","time":4,"edits":1,"cost":"1.97"},{"name":"unittests:: config:: commandLineParsing:: parseCommandLine","time":4,"edits":1,"cost":"1.97"},{"name":"tests/cases/fourslash/editTemplateConstraint.ts","time":8,"edits":2,"cost":"1.97"},{"name":"tests/cases/fourslash/docCommentTemplateInterfacesEnumsAndTypeAliases.ts","time":8,"edits":2,"cost":"1.97"},{"name":"tests/cases/fourslash/navigateItemsConst.ts","time":8,"edits":2,"cost":"1.97"},{"name":"tests/cases/fourslash/formatIfWithEmptyCondition.ts","time":8,"edits":2,"cost":"1.97"},{"name":"tests/cases/fourslash/isInMultiLineCommentInJsxText.ts","time":8,"edits":2,"cost":"1.97"},{"name":"tests/cases/fourslash/navbarNestedCommonJsExports.ts","time":8,"edits":2,"cost":"1.97"},{"name":"tests/cases/fourslash/formattingConditionalTypes.ts","time":8,"edits":2,"cost":"1.97"},{"name":"tests/cases/fourslash/docCommentTemplateVariableStatements03.ts","time":12,"edits":3,"cost":"1.97"},{"name":"tests/cases/fourslash/getOutliningForObjectsInArray.ts","time":12,"edits":3,"cost":"1.97"},{"name":"tests/cases/fourslash/navigateItemsLet.ts","time":8,"edits":2,"cost":"1.97"},{"name":"tests/cases/fourslash/generatorDeclarationFormatting.ts","time":8,"edits":2,"cost":"1.97"},{"name":"tests/cases/fourslash/javaScriptModulesError1.ts","time":4,"edits":1,"cost":"1.97"},{"name":"tests/cases/fourslash/navigationBarInitializerSpans.ts","time":11,"edits":3,"cost":"1.88"},{"name":"tests/cases/fourslash/navigateToQuoted.ts","time":11,"edits":3,"cost":"1.88"},{"name":"tests/cases/fourslash/docCommentTemplateIndentation.ts","time":11,"edits":3,"cost":"1.88"},{"name":"tests/cases/fourslash/smartSelection_bindingPatterns.ts","time":7,"edits":2,"cost":"1.83"},{"name":"tests/cases/fourslash/isInMultiLineCommentInTemplateLiteral.ts","time":7,"edits":2,"cost":"1.83"},{"name":"tests/cases/fourslash/smartIndentOnListEnd.ts","time":7,"edits":2,"cost":"1.83"},{"name":"tests/cases/fourslash/getOutliningSpansDepthElseIf.ts","time":7,"edits":2,"cost":"1.83"},{"name":"tests/cases/fourslash/navigationBarFunctionPrototype.ts","time":7,"edits":2,"cost":"1.83"},{"name":"tests/cases/fourslash/docCommentTemplateFunctionWithParameters.ts","time":7,"edits":2,"cost":"1.83"},{"name":"tests/cases/fourslash/indentationInJsx3.ts","time":7,"edits":2,"cost":"1.83"},{"name":"tests/cases/fourslash/getOutliningSpansForImports.ts","time":7,"edits":2,"cost":"1.83"},{"name":"tests/cases/fourslash/formatRemoveNewLineAfterOpenBrace.ts","time":7,"edits":2,"cost":"1.83"},{"name":"tests/cases/fourslash/completionsImport_named_didNotExistBefore.ts","time":24,"edits":7,"cost":"1.81"},{"name":"tests/cases/fourslash/tsxQuickInfo7.ts","time":20,"edits":6,"cost":"1.79"},{"name":"tests/cases/fourslash/importNameCodeFix_symlink.ts","time":13,"edits":4,"cost":"1.76"},{"name":"tests/cases/fourslash/completionsUniqueSymbol_import.ts","time":13,"edits":4,"cost":"1.76"},{"name":"tests/cases/fourslash/docCommentTemplateObjectLiteralMethods01.ts","time":16,"edits":5,"cost":"1.74"},{"name":"tests/cases/fourslash/formatTypeParameters.ts","time":6,"edits":2,"cost":"1.68"},{"name":"unittests:: tsserver:: autoDiscovery","time":3,"edits":1,"cost":"1.68"},{"name":"unittests:: config:: commandLineParsing:: parseBuildOptions","time":3,"edits":1,"cost":"1.68"},{"name":"unittests:: config:: project-references meta check","time":3,"edits":1,"cost":"1.68"},{"name":"tests/cases/fourslash/formatNoSpaceBetweenClosingParenAndTemplateString.ts","time":6,"edits":2,"cost":"1.68"},{"name":"tests/cases/fourslash/formatRangeEndingAfterCommaOfCall.ts","time":6,"edits":2,"cost":"1.68"},{"name":"tests/cases/fourslash/docCommentTemplateInSingleLineComment.ts","time":6,"edits":2,"cost":"1.68"},{"name":"tests/cases/fourslash/formatInsertSpaceAfterCloseBraceBeforeCloseBracket.ts","time":6,"edits":2,"cost":"1.68"},{"name":"tests/cases/fourslash/formatConflictMarker1.ts","time":6,"edits":2,"cost":"1.68"},{"name":"tests/cases/fourslash/formattingOnSingleLineBlocks.ts","time":6,"edits":2,"cost":"1.68"},{"name":"tests/cases/fourslash/formatObjectBindingPattern.ts","time":6,"edits":2,"cost":"1.68"},{"name":"tests/cases/fourslash/formattingSpaceBeforeFunctionParen.ts","time":9,"edits":3,"cost":"1.68"},{"name":"tests/cases/fourslash/docCommentTemplateEmptyFile.ts","time":11,"edits":4,"cost":"1.59"},{"name":"tests/cases/fourslash/docCommentTemplateVariableStatements02.ts","time":8,"edits":3,"cost":"1.56"},{"name":"tests/cases/fourslash/getOutliningSpansForRegions.ts","time":8,"edits":3,"cost":"1.56"},{"name":"tests/cases/fourslash/tsxQuickInfo6.ts","time":18,"edits":7,"cost":"1.53"},{"name":"tests/cases/fourslash/docCommentTemplateInsideFunctionDeclaration.ts","time":10,"edits":4,"cost":"1.50"},{"name":"tests/cases/fourslash/docCommentTemplateJsSpecialPropertyAssignment.ts","time":5,"edits":2,"cost":"1.50"},{"name":"tests/cases/fourslash/docCommentTemplateFunctionWithParameters_js.ts","time":5,"edits":2,"cost":"1.50"},{"name":"tests/cases/fourslash/formatJsxWithKeywordInIdentifier.ts","time":5,"edits":2,"cost":"1.50"},{"name":"tests/cases/fourslash/docCommentTemplateInMultiLineComment.ts","time":5,"edits":2,"cost":"1.50"},{"name":"tests/cases/fourslash/getOutliningSpansForUnbalancedEndRegion.ts","time":7,"edits":3,"cost":"1.43"},{"name":"tests/cases/fourslash/shims-pp/getOutliningSpans.ts","time":9,"edits":4,"cost":"1.39"},{"name":"unittests:: Reuse program structure:: host is optional","time":2,"edits":1,"cost":"1.27"},{"name":"comment parsing","time":2,"edits":1,"cost":"1.27"},{"name":"unittests:: services:: DocumentRegistry","time":2,"edits":1,"cost":"1.27"},{"name":"unittests:: shimMap","time":2,"edits":1,"cost":"1.27"},{"name":"unittests:: compilerCore","time":2,"edits":1,"cost":"1.27"},{"name":"unittests:: base64","time":2,"edits":1,"cost":"1.27"},{"name":"tests/cases/fourslash/docCommentTemplateNamespacesAndModules02.ts","time":8,"edits":4,"cost":"1.27"},{"name":"tests/cases/fourslash/shims/getOutliningSpans.ts","time":8,"edits":4,"cost":"1.27"},{"name":"tests/cases/fourslash/completionsImport_tsx.ts","time":8,"edits":4,"cost":"1.27"},{"name":"tests/cases/fourslash/completionsImport_default_anonymous.ts","time":18,"edits":9,"cost":"1.27"},{"name":"tests/cases/fourslash/completionsTypeKeywords.ts","time":10,"edits":5,"cost":"1.27"},{"name":"tests/cases/fourslash/docCommentTemplateClassDeclMethods02.ts","time":6,"edits":3,"cost":"1.27"},{"name":"tests/cases/fourslash/formatConflictDiff3Marker1.ts","time":6,"edits":3,"cost":"1.27"},{"name":"tests/cases/fourslash/docCommentTemplateClassDeclMethods01.ts","time":7,"edits":4,"cost":"1.14"},{"name":"tests/cases/fourslash/getOutliningSpans.ts","time":10,"edits":6,"cost":"1.09"},{"name":"tests/cases/fourslash/getOutliningSpansForUnbalancedRegion.ts","time":4,"edits":3,"cost":"0.87"},{"name":"unittests:: tsserver:: typingsInstaller:: Validate package name:","time":1,"edits":1,"cost":"0.58"},{"name":"unittests:: tsserver:: typingsInstaller:: npm installation command","time":1,"edits":1,"cost":"0.58"},{"name":"unittests:: tsserver:: Session:: helpers","time":1,"edits":1,"cost":"0.58"},{"name":"tests/cases/fourslash/docCommentTemplateRegex.ts","time":5,"edits":5,"cost":"0.58"},{"name":"unittests:: moduleResolution:: ModuleResolutionHost.directoryExists","time":0,"edits":1,"cost":"-Infinity"},{"name":"tests/cases/fourslash/fourslash.ts","time":0,"edits":86,"cost":"-Infinity"},{"name":"Public APIs","time":1559,"edits":1,"cost":"7.93"}]} From b50b9e0fd2602815e1c23480ca6cb577896e6758 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 19 Nov 2019 13:00:24 -0800 Subject: [PATCH 26/50] Fix check for `get`/`set` recommendation (#34885) * Added more tests. * Accepted baselines. * Work better with any parameter type. * Accepted baselines. * Use the actual indexed expression. * Add tests that exhibit bad stringification. * Accepted baselines. * Short-circuit stringification on 'undefined'. * Accepted baselines. * Remove space. * Accepted baselines. --- src/compiler/checker.ts | 12 +- src/compiler/diagnosticMessages.json | 2 +- src/compiler/utilities.ts | 7 +- src/services/navigationBar.ts | 1 + ...mplicitAnyStringIndexerOnObject.errors.txt | 157 +++++++-- .../noImplicitAnyStringIndexerOnObject.js | 116 ++++++- ...noImplicitAnyStringIndexerOnObject.symbols | 249 +++++++++++--- .../noImplicitAnyStringIndexerOnObject.types | 303 +++++++++++++++++- .../noImplicitAnyStringIndexerOnObject.ts | 65 +++- 9 files changed, 798 insertions(+), 114 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 0931b235552..e7befc3a4dc 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -11995,7 +11995,7 @@ namespace ts { } } else { - const suggestion = getSuggestionForNonexistentIndexSignature(objectType, accessExpression); + const suggestion = getSuggestionForNonexistentIndexSignature(objectType, accessExpression, indexType); if (suggestion !== undefined) { error(accessExpression, Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1, typeToString(objectType), suggestion); } @@ -23154,15 +23154,13 @@ namespace ts { return suggestion && symbolName(suggestion); } - function getSuggestionForNonexistentIndexSignature(objectType: Type, expr: ElementAccessExpression): string | undefined { + function getSuggestionForNonexistentIndexSignature(objectType: Type, expr: ElementAccessExpression, keyedType: Type): string | undefined { // check if object type has setter or getter - const hasProp = (name: "set" | "get", argCount = 1) => { + function hasProp(name: "set" | "get") { const prop = getPropertyOfObjectType(objectType, <__String>name); if (prop) { const s = getSingleCallSignature(getTypeOfSymbol(prop)); - if (s && getMinArgumentCount(s) === argCount && typeToString(getTypeAtPosition(s, 0)) === "string") { - return true; - } + return !!s && getMinArgumentCount(s) >= 1 && isTypeAssignableTo(keyedType, getTypeAtPosition(s, 0)); } return false; }; @@ -23172,7 +23170,7 @@ namespace ts { return undefined; } - let suggestion = tryGetPropertyAccessOrIdentifierToString(expr); + let suggestion = tryGetPropertyAccessOrIdentifierToString(expr.expression); if (suggestion === undefined) { suggestion = suggestedMethod; } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index d93b725c01b..02e852869cd 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -4518,7 +4518,7 @@ "category": "Error", "code": 7051 }, - "Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}' ?": { + "Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?": { "category": "Error", "code": 7052 }, diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 935c528ebe2..5e40405817e 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -4244,9 +4244,12 @@ namespace ts { export function tryGetPropertyAccessOrIdentifierToString(expr: Expression): string | undefined { if (isPropertyAccessExpression(expr)) { - return tryGetPropertyAccessOrIdentifierToString(expr.expression) + "." + expr.name; + const baseStr = tryGetPropertyAccessOrIdentifierToString(expr.expression); + if (baseStr !== undefined) { + return baseStr + "." + expr.name; + } } - if (isIdentifier(expr)) { + else if (isIdentifier(expr)) { return unescapeLeadingUnderscores(expr.escapedText); } return undefined; diff --git a/src/services/navigationBar.ts b/src/services/navigationBar.ts index 49310ef827f..ba369f975fb 100644 --- a/src/services/navigationBar.ts +++ b/src/services/navigationBar.ts @@ -901,6 +901,7 @@ namespace ts.NavigationBar { return ""; } + // See also 'tryGetPropertyAccessOrIdentifierToString' function getCalledExpressionName(expr: Expression): string | undefined { if (isIdentifier(expr)) { return expr.text; diff --git a/tests/baselines/reference/noImplicitAnyStringIndexerOnObject.errors.txt b/tests/baselines/reference/noImplicitAnyStringIndexerOnObject.errors.txt index 0d2fc1b860e..729c8236abd 100644 --- a/tests/baselines/reference/noImplicitAnyStringIndexerOnObject.errors.txt +++ b/tests/baselines/reference/noImplicitAnyStringIndexerOnObject.errors.txt @@ -1,25 +1,43 @@ tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(1,9): error TS7053: Element implicitly has an 'any' type because expression of type '"hello"' can't be used to index type '{}'. Property 'hello' does not exist on type '{}'. -tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(7,1): error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; }' has no index signature. Did you mean to call 'get' ? -tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(8,13): error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; }' has no index signature. Did you mean to call 'get' ? +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(7,1): error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; }' has no index signature. Did you mean to call 'c.get'? +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(8,13): error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; }' has no index signature. Did you mean to call 'c.get'? tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(13,13): error TS7053: Element implicitly has an 'any' type because expression of type '"hello"' can't be used to index type '{ set: (key: string) => string; }'. Property 'hello' does not exist on type '{ set: (key: string) => string; }'. -tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(19,1): error TS7052: Element implicitly has an 'any' type because type '{ set: (key: string) => string; get: (key: string) => string; }' has no index signature. Did you mean to call 'set' ? -tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(20,1): error TS7052: Element implicitly has an 'any' type because type '{ set: (key: string) => string; get: (key: string) => string; }' has no index signature. Did you mean to call 'set' ? -tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(21,1): error TS7052: Element implicitly has an 'any' type because type '{ set: (key: string) => string; get: (key: string) => string; }' has no index signature. Did you mean to call 'set' ? -tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(26,1): error TS7053: Element implicitly has an 'any' type because expression of type '"a" | "b" | "c"' can't be used to index type '{ a: number; }'. +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(20,3): error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string) => string; }' has no index signature. Did you mean to call 'e.get'? +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(21,3): error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string) => string; }' has no index signature. Did you mean to call 'e.set'? +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(22,3): error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string) => string; }' has no index signature. Did you mean to call 'e.set'? +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(23,3): error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string) => string; }' has no index signature. Did you mean to call 'e.set'? +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(31,3): error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string, value: string) => string; }' has no index signature. Did you mean to call 'e.get'? +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(32,3): error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string, value: string) => string; }' has no index signature. Did you mean to call 'e.set'? +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(33,3): error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string, value: string) => string; }' has no index signature. Did you mean to call 'e.set'? +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(34,3): error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string, value: string) => string; }' has no index signature. Did you mean to call 'e.set'? +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(42,3): error TS7052: Element implicitly has an 'any' type because type '{ get: (key: "hello" | "world") => string; set: (key: "hello" | "world", value: string) => string; }' has no index signature. Did you mean to call 'e.get'? +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(43,3): error TS7052: Element implicitly has an 'any' type because type '{ get: (key: "hello" | "world") => string; set: (key: "hello" | "world", value: string) => string; }' has no index signature. Did you mean to call 'e.set'? +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(44,3): error TS7052: Element implicitly has an 'any' type because type '{ get: (key: "hello" | "world") => string; set: (key: "hello" | "world", value: string) => string; }' has no index signature. Did you mean to call 'e.set'? +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(45,3): error TS7052: Element implicitly has an 'any' type because type '{ get: (key: "hello" | "world") => string; set: (key: "hello" | "world", value: string) => string; }' has no index signature. Did you mean to call 'e.set'? +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(49,3): error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string, value: string) => void; }' has no index signature. Did you mean to call 'get'? +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(50,3): error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string, value: string) => void; }' has no index signature. Did you mean to call 'set'? +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(51,3): error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string, value: string) => void; }' has no index signature. Did you mean to call 'set'? +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(52,3): error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string, value: string) => void; }' has no index signature. Did you mean to call 'set'? +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(56,3): error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string, value: string) => void; }' has no index signature. Did you mean to call 'get'? +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(57,3): error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string, value: string) => void; }' has no index signature. Did you mean to call 'set'? +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(58,3): error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string, value: string) => void; }' has no index signature. Did you mean to call 'set'? +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(59,3): error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string, value: string) => void; }' has no index signature. Did you mean to call 'set'? +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(65,1): error TS7053: Element implicitly has an 'any' type because expression of type '"a" | "b" | "c"' can't be used to index type '{ a: number; }'. Property 'b' does not exist on type '{ a: number; }'. -tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(30,1): error TS7053: Element implicitly has an 'any' type because expression of type '"c"' can't be used to index type '{ a: number; }'. +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(69,1): error TS7053: Element implicitly has an 'any' type because expression of type '"c"' can't be used to index type '{ a: number; }'. Property 'c' does not exist on type '{ a: number; }'. -tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(33,1): error TS7053: Element implicitly has an 'any' type because expression of type 'unique symbol' can't be used to index type '{ a: number; }'. +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(72,1): error TS7053: Element implicitly has an 'any' type because expression of type 'unique symbol' can't be used to index type '{ a: number; }'. Property '[sym]' does not exist on type '{ a: number; }'. -tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(37,1): error TS7053: Element implicitly has an 'any' type because expression of type 'NumEnum' can't be used to index type '{ a: number; }'. +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(76,1): error TS7053: Element implicitly has an 'any' type because expression of type 'NumEnum' can't be used to index type '{ a: number; }'. Property '[NumEnum.a]' does not exist on type '{ a: number; }'. -tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(42,1): error TS7053: Element implicitly has an 'any' type because expression of type 'StrEnum' can't be used to index type '{ a: number; }'. +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(81,1): error TS7053: Element implicitly has an 'any' type because expression of type 'StrEnum' can't be used to index type '{ a: number; }'. Property '[StrEnum.b]' does not exist on type '{ a: number; }'. +tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(93,5): error TS2538: Type 'Dog' cannot be used as an index type. -==== tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts (12 errors) ==== +==== tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts (30 errors) ==== var a = {}["hello"]; ~~~~~~~~~~~ !!! error TS7053: Element implicitly has an 'any' type because expression of type '"hello"' can't be used to index type '{}'. @@ -31,10 +49,10 @@ tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(42,1): error TS7053: }; c['hello']; ~~~~~~~~~~ -!!! error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; }' has no index signature. Did you mean to call 'get' ? +!!! error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; }' has no index signature. Did you mean to call 'c.get'? const foo = c['hello']; ~~~~~~~~~~ -!!! error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; }' has no index signature. Did you mean to call 'get' ? +!!! error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; }' has no index signature. Did you mean to call 'c.get'? var d = { set: (key: string) => 'foobar' @@ -44,19 +62,92 @@ tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(42,1): error TS7053: !!! error TS7053: Element implicitly has an 'any' type because expression of type '"hello"' can't be used to index type '{ set: (key: string) => string; }'. !!! error TS7053: Property 'hello' does not exist on type '{ set: (key: string) => string; }'. - var e = { - set: (key: string) => 'foobar', - get: (key: string) => 'foobar' - }; - e['hello'] = 'modified'; - ~~~~~~~~~~ -!!! error TS7052: Element implicitly has an 'any' type because type '{ set: (key: string) => string; get: (key: string) => string; }' has no index signature. Did you mean to call 'set' ? - e['hello'] += 1; - ~~~~~~~~~~ -!!! error TS7052: Element implicitly has an 'any' type because type '{ set: (key: string) => string; get: (key: string) => string; }' has no index signature. Did you mean to call 'set' ? - e['hello'] ++; - ~~~~~~~~~~ -!!! error TS7052: Element implicitly has an 'any' type because type '{ set: (key: string) => string; get: (key: string) => string; }' has no index signature. Did you mean to call 'set' ? + { + let e = { + get: (key: string) => 'foobar', + set: (key: string) => 'foobar' + }; + e['hello']; + ~~~~~~~~~~ +!!! error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string) => string; }' has no index signature. Did you mean to call 'e.get'? + e['hello'] = 'modified'; + ~~~~~~~~~~ +!!! error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string) => string; }' has no index signature. Did you mean to call 'e.set'? + e['hello'] += 1; + ~~~~~~~~~~ +!!! error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string) => string; }' has no index signature. Did you mean to call 'e.set'? + e['hello'] ++; + ~~~~~~~~~~ +!!! error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string) => string; }' has no index signature. Did you mean to call 'e.set'? + } + + { + let e = { + get: (key: string) => 'foobar', + set: (key: string, value: string) => 'foobar' + }; + e['hello']; + ~~~~~~~~~~ +!!! error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string, value: string) => string; }' has no index signature. Did you mean to call 'e.get'? + e['hello'] = 'modified'; + ~~~~~~~~~~ +!!! error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string, value: string) => string; }' has no index signature. Did you mean to call 'e.set'? + e['hello'] += 1; + ~~~~~~~~~~ +!!! error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string, value: string) => string; }' has no index signature. Did you mean to call 'e.set'? + e['hello'] ++; + ~~~~~~~~~~ +!!! error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string, value: string) => string; }' has no index signature. Did you mean to call 'e.set'? + } + + { + let e = { + get: (key: "hello" | "world") => 'foobar', + set: (key: "hello" | "world", value: string) => 'foobar' + }; + e['hello']; + ~~~~~~~~~~ +!!! error TS7052: Element implicitly has an 'any' type because type '{ get: (key: "hello" | "world") => string; set: (key: "hello" | "world", value: string) => string; }' has no index signature. Did you mean to call 'e.get'? + e['hello'] = 'modified'; + ~~~~~~~~~~ +!!! error TS7052: Element implicitly has an 'any' type because type '{ get: (key: "hello" | "world") => string; set: (key: "hello" | "world", value: string) => string; }' has no index signature. Did you mean to call 'e.set'? + e['hello'] += 1; + ~~~~~~~~~~ +!!! error TS7052: Element implicitly has an 'any' type because type '{ get: (key: "hello" | "world") => string; set: (key: "hello" | "world", value: string) => string; }' has no index signature. Did you mean to call 'e.set'? + e['hello'] ++; + ~~~~~~~~~~ +!!! error TS7052: Element implicitly has an 'any' type because type '{ get: (key: "hello" | "world") => string; set: (key: "hello" | "world", value: string) => string; }' has no index signature. Did you mean to call 'e.set'? + } + + { + ({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello']; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string, value: string) => void; }' has no index signature. Did you mean to call 'get'? + ({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello'] = 'modified'; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string, value: string) => void; }' has no index signature. Did you mean to call 'set'? + ({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello'] += 1; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string, value: string) => void; }' has no index signature. Did you mean to call 'set'? + ({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello'] ++; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string, value: string) => void; }' has no index signature. Did you mean to call 'set'? + } + + { + ({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello']; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string, value: string) => void; }' has no index signature. Did you mean to call 'get'? + ({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello'] = 'modified'; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string, value: string) => void; }' has no index signature. Did you mean to call 'set'? + ({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello'] += 1; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string, value: string) => void; }' has no index signature. Did you mean to call 'set'? + ({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello'] ++; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7052: Element implicitly has an 'any' type because type '{ get: (key: string) => string; set: (key: string, value: string) => void; }' has no index signature. Did you mean to call 'set'? + } const o = { a: 0 }; @@ -93,4 +184,18 @@ tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts(42,1): error TS7053: ~~~~~~~~~~~~~ !!! error TS7053: Element implicitly has an 'any' type because expression of type 'StrEnum' can't be used to index type '{ a: number; }'. !!! error TS7053: Property '[StrEnum.b]' does not exist on type '{ a: number; }'. + + + interface MyMap { + get(key: K): T; + set(key: K, value: T): void; + } + + interface Dog { bark(): void; } + let rover: Dog = { bark() {} }; + + declare let map: MyMap; + map[rover] = "Rover"; + ~~~~~ +!!! error TS2538: Type 'Dog' cannot be used as an index type. \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyStringIndexerOnObject.js b/tests/baselines/reference/noImplicitAnyStringIndexerOnObject.js index 572d9f38caf..aade38856d0 100644 --- a/tests/baselines/reference/noImplicitAnyStringIndexerOnObject.js +++ b/tests/baselines/reference/noImplicitAnyStringIndexerOnObject.js @@ -13,13 +13,52 @@ var d = { }; const bar = d['hello']; -var e = { - set: (key: string) => 'foobar', - get: (key: string) => 'foobar' -}; -e['hello'] = 'modified'; -e['hello'] += 1; -e['hello'] ++; +{ + let e = { + get: (key: string) => 'foobar', + set: (key: string) => 'foobar' + }; + e['hello']; + e['hello'] = 'modified'; + e['hello'] += 1; + e['hello'] ++; +} + +{ + let e = { + get: (key: string) => 'foobar', + set: (key: string, value: string) => 'foobar' + }; + e['hello']; + e['hello'] = 'modified'; + e['hello'] += 1; + e['hello'] ++; +} + +{ + let e = { + get: (key: "hello" | "world") => 'foobar', + set: (key: "hello" | "world", value: string) => 'foobar' + }; + e['hello']; + e['hello'] = 'modified'; + e['hello'] += 1; + e['hello'] ++; +} + +{ + ({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello']; + ({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello'] = 'modified'; + ({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello'] += 1; + ({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello'] ++; +} + +{ + ({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello']; + ({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello'] = 'modified'; + ({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello'] += 1; + ({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello'] ++; +} const o = { a: 0 }; @@ -41,6 +80,18 @@ o[numEnumKey]; enum StrEnum { a = "a", b = "b" } let strEnumKey: StrEnum; o[strEnumKey]; + + +interface MyMap { + get(key: K): T; + set(key: K, value: T): void; +} + +interface Dog { bark(): void; } +let rover: Dog = { bark() {} }; + +declare let map: MyMap; +map[rover] = "Rover"; //// [noImplicitAnyStringIndexerOnObject.js] @@ -55,13 +106,48 @@ var d = { set: function (key) { return 'foobar'; } }; var bar = d['hello']; -var e = { - set: function (key) { return 'foobar'; }, - get: function (key) { return 'foobar'; } -}; -e['hello'] = 'modified'; -e['hello'] += 1; -e['hello']++; +{ + var e = { + get: function (key) { return 'foobar'; }, + set: function (key) { return 'foobar'; } + }; + e['hello']; + e['hello'] = 'modified'; + e['hello'] += 1; + e['hello']++; +} +{ + var e = { + get: function (key) { return 'foobar'; }, + set: function (key, value) { return 'foobar'; } + }; + e['hello']; + e['hello'] = 'modified'; + e['hello'] += 1; + e['hello']++; +} +{ + var e = { + get: function (key) { return 'foobar'; }, + set: function (key, value) { return 'foobar'; } + }; + e['hello']; + e['hello'] = 'modified'; + e['hello'] += 1; + e['hello']++; +} +{ + ({ get: function (key) { return 'hello'; }, set: function (key, value) { } })['hello']; + ({ get: function (key) { return 'hello'; }, set: function (key, value) { } })['hello'] = 'modified'; + ({ get: function (key) { return 'hello'; }, set: function (key, value) { } })['hello'] += 1; + ({ get: function (key) { return 'hello'; }, set: function (key, value) { } })['hello']++; +} +{ + ({ foo: { get: function (key) { return 'hello'; }, set: function (key, value) { } } }).foo['hello']; + ({ foo: { get: function (key) { return 'hello'; }, set: function (key, value) { } } }).foo['hello'] = 'modified'; + ({ foo: { get: function (key) { return 'hello'; }, set: function (key, value) { } } }).foo['hello'] += 1; + ({ foo: { get: function (key) { return 'hello'; }, set: function (key, value) { } } }).foo['hello']++; +} var o = { a: 0 }; o[k]; o[k2]; @@ -80,3 +166,5 @@ var StrEnum; })(StrEnum || (StrEnum = {})); var strEnumKey; o[strEnumKey]; +var rover = { bark: function () { } }; +map[rover] = "Rover"; diff --git a/tests/baselines/reference/noImplicitAnyStringIndexerOnObject.symbols b/tests/baselines/reference/noImplicitAnyStringIndexerOnObject.symbols index 307144b8563..17361623965 100644 --- a/tests/baselines/reference/noImplicitAnyStringIndexerOnObject.symbols +++ b/tests/baselines/reference/noImplicitAnyStringIndexerOnObject.symbols @@ -34,77 +34,246 @@ const bar = d['hello']; >bar : Symbol(bar, Decl(noImplicitAnyStringIndexerOnObject.ts, 12, 5)) >d : Symbol(d, Decl(noImplicitAnyStringIndexerOnObject.ts, 9, 3)) -var e = { ->e : Symbol(e, Decl(noImplicitAnyStringIndexerOnObject.ts, 14, 3)) +{ + let e = { +>e : Symbol(e, Decl(noImplicitAnyStringIndexerOnObject.ts, 15, 5)) - set: (key: string) => 'foobar', ->set : Symbol(set, Decl(noImplicitAnyStringIndexerOnObject.ts, 14, 9)) ->key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 15, 8)) + get: (key: string) => 'foobar', +>get : Symbol(get, Decl(noImplicitAnyStringIndexerOnObject.ts, 15, 11)) +>key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 16, 10)) - get: (key: string) => 'foobar' ->get : Symbol(get, Decl(noImplicitAnyStringIndexerOnObject.ts, 15, 33)) ->key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 16, 8)) + set: (key: string) => 'foobar' +>set : Symbol(set, Decl(noImplicitAnyStringIndexerOnObject.ts, 16, 35)) +>key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 17, 10)) -}; -e['hello'] = 'modified'; ->e : Symbol(e, Decl(noImplicitAnyStringIndexerOnObject.ts, 14, 3)) + }; + e['hello']; +>e : Symbol(e, Decl(noImplicitAnyStringIndexerOnObject.ts, 15, 5)) -e['hello'] += 1; ->e : Symbol(e, Decl(noImplicitAnyStringIndexerOnObject.ts, 14, 3)) + e['hello'] = 'modified'; +>e : Symbol(e, Decl(noImplicitAnyStringIndexerOnObject.ts, 15, 5)) -e['hello'] ++; ->e : Symbol(e, Decl(noImplicitAnyStringIndexerOnObject.ts, 14, 3)) + e['hello'] += 1; +>e : Symbol(e, Decl(noImplicitAnyStringIndexerOnObject.ts, 15, 5)) + + e['hello'] ++; +>e : Symbol(e, Decl(noImplicitAnyStringIndexerOnObject.ts, 15, 5)) +} + +{ + let e = { +>e : Symbol(e, Decl(noImplicitAnyStringIndexerOnObject.ts, 26, 5)) + + get: (key: string) => 'foobar', +>get : Symbol(get, Decl(noImplicitAnyStringIndexerOnObject.ts, 26, 11)) +>key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 27, 10)) + + set: (key: string, value: string) => 'foobar' +>set : Symbol(set, Decl(noImplicitAnyStringIndexerOnObject.ts, 27, 35)) +>key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 28, 10)) +>value : Symbol(value, Decl(noImplicitAnyStringIndexerOnObject.ts, 28, 22)) + + }; + e['hello']; +>e : Symbol(e, Decl(noImplicitAnyStringIndexerOnObject.ts, 26, 5)) + + e['hello'] = 'modified'; +>e : Symbol(e, Decl(noImplicitAnyStringIndexerOnObject.ts, 26, 5)) + + e['hello'] += 1; +>e : Symbol(e, Decl(noImplicitAnyStringIndexerOnObject.ts, 26, 5)) + + e['hello'] ++; +>e : Symbol(e, Decl(noImplicitAnyStringIndexerOnObject.ts, 26, 5)) +} + +{ + let e = { +>e : Symbol(e, Decl(noImplicitAnyStringIndexerOnObject.ts, 37, 5)) + + get: (key: "hello" | "world") => 'foobar', +>get : Symbol(get, Decl(noImplicitAnyStringIndexerOnObject.ts, 37, 11)) +>key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 38, 10)) + + set: (key: "hello" | "world", value: string) => 'foobar' +>set : Symbol(set, Decl(noImplicitAnyStringIndexerOnObject.ts, 38, 46)) +>key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 39, 10)) +>value : Symbol(value, Decl(noImplicitAnyStringIndexerOnObject.ts, 39, 33)) + + }; + e['hello']; +>e : Symbol(e, Decl(noImplicitAnyStringIndexerOnObject.ts, 37, 5)) + + e['hello'] = 'modified'; +>e : Symbol(e, Decl(noImplicitAnyStringIndexerOnObject.ts, 37, 5)) + + e['hello'] += 1; +>e : Symbol(e, Decl(noImplicitAnyStringIndexerOnObject.ts, 37, 5)) + + e['hello'] ++; +>e : Symbol(e, Decl(noImplicitAnyStringIndexerOnObject.ts, 37, 5)) +} + +{ + ({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello']; +>get : Symbol(get, Decl(noImplicitAnyStringIndexerOnObject.ts, 48, 4)) +>key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 48, 11)) +>set : Symbol(set, Decl(noImplicitAnyStringIndexerOnObject.ts, 48, 35)) +>key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 48, 42)) +>value : Symbol(value, Decl(noImplicitAnyStringIndexerOnObject.ts, 48, 54)) + + ({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello'] = 'modified'; +>get : Symbol(get, Decl(noImplicitAnyStringIndexerOnObject.ts, 49, 4)) +>key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 49, 11)) +>set : Symbol(set, Decl(noImplicitAnyStringIndexerOnObject.ts, 49, 35)) +>key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 49, 42)) +>value : Symbol(value, Decl(noImplicitAnyStringIndexerOnObject.ts, 49, 54)) + + ({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello'] += 1; +>get : Symbol(get, Decl(noImplicitAnyStringIndexerOnObject.ts, 50, 4)) +>key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 50, 11)) +>set : Symbol(set, Decl(noImplicitAnyStringIndexerOnObject.ts, 50, 35)) +>key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 50, 42)) +>value : Symbol(value, Decl(noImplicitAnyStringIndexerOnObject.ts, 50, 54)) + + ({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello'] ++; +>get : Symbol(get, Decl(noImplicitAnyStringIndexerOnObject.ts, 51, 4)) +>key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 51, 11)) +>set : Symbol(set, Decl(noImplicitAnyStringIndexerOnObject.ts, 51, 35)) +>key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 51, 42)) +>value : Symbol(value, Decl(noImplicitAnyStringIndexerOnObject.ts, 51, 54)) +} + +{ + ({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello']; +>({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo : Symbol(foo, Decl(noImplicitAnyStringIndexerOnObject.ts, 55, 4)) +>foo : Symbol(foo, Decl(noImplicitAnyStringIndexerOnObject.ts, 55, 4)) +>get : Symbol(get, Decl(noImplicitAnyStringIndexerOnObject.ts, 55, 11)) +>key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 55, 18)) +>set : Symbol(set, Decl(noImplicitAnyStringIndexerOnObject.ts, 55, 42)) +>key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 55, 49)) +>value : Symbol(value, Decl(noImplicitAnyStringIndexerOnObject.ts, 55, 61)) +>foo : Symbol(foo, Decl(noImplicitAnyStringIndexerOnObject.ts, 55, 4)) + + ({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello'] = 'modified'; +>({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo : Symbol(foo, Decl(noImplicitAnyStringIndexerOnObject.ts, 56, 4)) +>foo : Symbol(foo, Decl(noImplicitAnyStringIndexerOnObject.ts, 56, 4)) +>get : Symbol(get, Decl(noImplicitAnyStringIndexerOnObject.ts, 56, 11)) +>key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 56, 18)) +>set : Symbol(set, Decl(noImplicitAnyStringIndexerOnObject.ts, 56, 42)) +>key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 56, 49)) +>value : Symbol(value, Decl(noImplicitAnyStringIndexerOnObject.ts, 56, 61)) +>foo : Symbol(foo, Decl(noImplicitAnyStringIndexerOnObject.ts, 56, 4)) + + ({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello'] += 1; +>({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo : Symbol(foo, Decl(noImplicitAnyStringIndexerOnObject.ts, 57, 4)) +>foo : Symbol(foo, Decl(noImplicitAnyStringIndexerOnObject.ts, 57, 4)) +>get : Symbol(get, Decl(noImplicitAnyStringIndexerOnObject.ts, 57, 11)) +>key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 57, 18)) +>set : Symbol(set, Decl(noImplicitAnyStringIndexerOnObject.ts, 57, 42)) +>key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 57, 49)) +>value : Symbol(value, Decl(noImplicitAnyStringIndexerOnObject.ts, 57, 61)) +>foo : Symbol(foo, Decl(noImplicitAnyStringIndexerOnObject.ts, 57, 4)) + + ({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello'] ++; +>({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo : Symbol(foo, Decl(noImplicitAnyStringIndexerOnObject.ts, 58, 4)) +>foo : Symbol(foo, Decl(noImplicitAnyStringIndexerOnObject.ts, 58, 4)) +>get : Symbol(get, Decl(noImplicitAnyStringIndexerOnObject.ts, 58, 11)) +>key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 58, 18)) +>set : Symbol(set, Decl(noImplicitAnyStringIndexerOnObject.ts, 58, 42)) +>key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 58, 49)) +>value : Symbol(value, Decl(noImplicitAnyStringIndexerOnObject.ts, 58, 61)) +>foo : Symbol(foo, Decl(noImplicitAnyStringIndexerOnObject.ts, 58, 4)) +} const o = { a: 0 }; ->o : Symbol(o, Decl(noImplicitAnyStringIndexerOnObject.ts, 22, 5)) ->a : Symbol(a, Decl(noImplicitAnyStringIndexerOnObject.ts, 22, 11)) +>o : Symbol(o, Decl(noImplicitAnyStringIndexerOnObject.ts, 61, 5)) +>a : Symbol(a, Decl(noImplicitAnyStringIndexerOnObject.ts, 61, 11)) declare const k: "a" | "b" | "c"; ->k : Symbol(k, Decl(noImplicitAnyStringIndexerOnObject.ts, 24, 13)) +>k : Symbol(k, Decl(noImplicitAnyStringIndexerOnObject.ts, 63, 13)) o[k]; ->o : Symbol(o, Decl(noImplicitAnyStringIndexerOnObject.ts, 22, 5)) ->k : Symbol(k, Decl(noImplicitAnyStringIndexerOnObject.ts, 24, 13)) +>o : Symbol(o, Decl(noImplicitAnyStringIndexerOnObject.ts, 61, 5)) +>k : Symbol(k, Decl(noImplicitAnyStringIndexerOnObject.ts, 63, 13)) declare const k2: "c"; ->k2 : Symbol(k2, Decl(noImplicitAnyStringIndexerOnObject.ts, 28, 13)) +>k2 : Symbol(k2, Decl(noImplicitAnyStringIndexerOnObject.ts, 67, 13)) o[k2]; ->o : Symbol(o, Decl(noImplicitAnyStringIndexerOnObject.ts, 22, 5)) ->k2 : Symbol(k2, Decl(noImplicitAnyStringIndexerOnObject.ts, 28, 13)) +>o : Symbol(o, Decl(noImplicitAnyStringIndexerOnObject.ts, 61, 5)) +>k2 : Symbol(k2, Decl(noImplicitAnyStringIndexerOnObject.ts, 67, 13)) declare const sym : unique symbol; ->sym : Symbol(sym, Decl(noImplicitAnyStringIndexerOnObject.ts, 31, 13)) +>sym : Symbol(sym, Decl(noImplicitAnyStringIndexerOnObject.ts, 70, 13)) o[sym]; ->o : Symbol(o, Decl(noImplicitAnyStringIndexerOnObject.ts, 22, 5)) ->sym : Symbol(sym, Decl(noImplicitAnyStringIndexerOnObject.ts, 31, 13)) +>o : Symbol(o, Decl(noImplicitAnyStringIndexerOnObject.ts, 61, 5)) +>sym : Symbol(sym, Decl(noImplicitAnyStringIndexerOnObject.ts, 70, 13)) enum NumEnum { a, b } ->NumEnum : Symbol(NumEnum, Decl(noImplicitAnyStringIndexerOnObject.ts, 32, 7)) ->a : Symbol(NumEnum.a, Decl(noImplicitAnyStringIndexerOnObject.ts, 34, 14)) ->b : Symbol(NumEnum.b, Decl(noImplicitAnyStringIndexerOnObject.ts, 34, 17)) +>NumEnum : Symbol(NumEnum, Decl(noImplicitAnyStringIndexerOnObject.ts, 71, 7)) +>a : Symbol(NumEnum.a, Decl(noImplicitAnyStringIndexerOnObject.ts, 73, 14)) +>b : Symbol(NumEnum.b, Decl(noImplicitAnyStringIndexerOnObject.ts, 73, 17)) let numEnumKey: NumEnum; ->numEnumKey : Symbol(numEnumKey, Decl(noImplicitAnyStringIndexerOnObject.ts, 35, 3)) ->NumEnum : Symbol(NumEnum, Decl(noImplicitAnyStringIndexerOnObject.ts, 32, 7)) +>numEnumKey : Symbol(numEnumKey, Decl(noImplicitAnyStringIndexerOnObject.ts, 74, 3)) +>NumEnum : Symbol(NumEnum, Decl(noImplicitAnyStringIndexerOnObject.ts, 71, 7)) o[numEnumKey]; ->o : Symbol(o, Decl(noImplicitAnyStringIndexerOnObject.ts, 22, 5)) ->numEnumKey : Symbol(numEnumKey, Decl(noImplicitAnyStringIndexerOnObject.ts, 35, 3)) +>o : Symbol(o, Decl(noImplicitAnyStringIndexerOnObject.ts, 61, 5)) +>numEnumKey : Symbol(numEnumKey, Decl(noImplicitAnyStringIndexerOnObject.ts, 74, 3)) enum StrEnum { a = "a", b = "b" } ->StrEnum : Symbol(StrEnum, Decl(noImplicitAnyStringIndexerOnObject.ts, 36, 14)) ->a : Symbol(StrEnum.a, Decl(noImplicitAnyStringIndexerOnObject.ts, 39, 14)) ->b : Symbol(StrEnum.b, Decl(noImplicitAnyStringIndexerOnObject.ts, 39, 23)) +>StrEnum : Symbol(StrEnum, Decl(noImplicitAnyStringIndexerOnObject.ts, 75, 14)) +>a : Symbol(StrEnum.a, Decl(noImplicitAnyStringIndexerOnObject.ts, 78, 14)) +>b : Symbol(StrEnum.b, Decl(noImplicitAnyStringIndexerOnObject.ts, 78, 23)) let strEnumKey: StrEnum; ->strEnumKey : Symbol(strEnumKey, Decl(noImplicitAnyStringIndexerOnObject.ts, 40, 3)) ->StrEnum : Symbol(StrEnum, Decl(noImplicitAnyStringIndexerOnObject.ts, 36, 14)) +>strEnumKey : Symbol(strEnumKey, Decl(noImplicitAnyStringIndexerOnObject.ts, 79, 3)) +>StrEnum : Symbol(StrEnum, Decl(noImplicitAnyStringIndexerOnObject.ts, 75, 14)) o[strEnumKey]; ->o : Symbol(o, Decl(noImplicitAnyStringIndexerOnObject.ts, 22, 5)) ->strEnumKey : Symbol(strEnumKey, Decl(noImplicitAnyStringIndexerOnObject.ts, 40, 3)) +>o : Symbol(o, Decl(noImplicitAnyStringIndexerOnObject.ts, 61, 5)) +>strEnumKey : Symbol(strEnumKey, Decl(noImplicitAnyStringIndexerOnObject.ts, 79, 3)) + + +interface MyMap { +>MyMap : Symbol(MyMap, Decl(noImplicitAnyStringIndexerOnObject.ts, 80, 14)) +>K : Symbol(K, Decl(noImplicitAnyStringIndexerOnObject.ts, 83, 16)) +>T : Symbol(T, Decl(noImplicitAnyStringIndexerOnObject.ts, 83, 18)) + + get(key: K): T; +>get : Symbol(MyMap.get, Decl(noImplicitAnyStringIndexerOnObject.ts, 83, 23)) +>key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 84, 6)) +>K : Symbol(K, Decl(noImplicitAnyStringIndexerOnObject.ts, 83, 16)) +>T : Symbol(T, Decl(noImplicitAnyStringIndexerOnObject.ts, 83, 18)) + + set(key: K, value: T): void; +>set : Symbol(MyMap.set, Decl(noImplicitAnyStringIndexerOnObject.ts, 84, 17)) +>key : Symbol(key, Decl(noImplicitAnyStringIndexerOnObject.ts, 85, 6)) +>K : Symbol(K, Decl(noImplicitAnyStringIndexerOnObject.ts, 83, 16)) +>value : Symbol(value, Decl(noImplicitAnyStringIndexerOnObject.ts, 85, 13)) +>T : Symbol(T, Decl(noImplicitAnyStringIndexerOnObject.ts, 83, 18)) +} + +interface Dog { bark(): void; } +>Dog : Symbol(Dog, Decl(noImplicitAnyStringIndexerOnObject.ts, 86, 1)) +>bark : Symbol(Dog.bark, Decl(noImplicitAnyStringIndexerOnObject.ts, 88, 15)) + +let rover: Dog = { bark() {} }; +>rover : Symbol(rover, Decl(noImplicitAnyStringIndexerOnObject.ts, 89, 3)) +>Dog : Symbol(Dog, Decl(noImplicitAnyStringIndexerOnObject.ts, 86, 1)) +>bark : Symbol(bark, Decl(noImplicitAnyStringIndexerOnObject.ts, 89, 18)) + +declare let map: MyMap; +>map : Symbol(map, Decl(noImplicitAnyStringIndexerOnObject.ts, 91, 11)) +>MyMap : Symbol(MyMap, Decl(noImplicitAnyStringIndexerOnObject.ts, 80, 14)) +>Dog : Symbol(Dog, Decl(noImplicitAnyStringIndexerOnObject.ts, 86, 1)) + +map[rover] = "Rover"; +>map : Symbol(map, Decl(noImplicitAnyStringIndexerOnObject.ts, 91, 11)) +>rover : Symbol(rover, Decl(noImplicitAnyStringIndexerOnObject.ts, 89, 3)) diff --git a/tests/baselines/reference/noImplicitAnyStringIndexerOnObject.types b/tests/baselines/reference/noImplicitAnyStringIndexerOnObject.types index fa74a192248..4a12805418b 100644 --- a/tests/baselines/reference/noImplicitAnyStringIndexerOnObject.types +++ b/tests/baselines/reference/noImplicitAnyStringIndexerOnObject.types @@ -52,42 +52,281 @@ const bar = d['hello']; >d : { set: (key: string) => string; } >'hello' : "hello" -var e = { ->e : { set: (key: string) => string; get: (key: string) => string; } ->{ set: (key: string) => 'foobar', get: (key: string) => 'foobar'} : { set: (key: string) => string; get: (key: string) => string; } +{ + let e = { +>e : { get: (key: string) => string; set: (key: string) => string; } +>{ get: (key: string) => 'foobar', set: (key: string) => 'foobar' } : { get: (key: string) => string; set: (key: string) => string; } - set: (key: string) => 'foobar', ->set : (key: string) => string ->(key: string) => 'foobar' : (key: string) => string ->key : string ->'foobar' : "foobar" - - get: (key: string) => 'foobar' + get: (key: string) => 'foobar', >get : (key: string) => string >(key: string) => 'foobar' : (key: string) => string >key : string >'foobar' : "foobar" -}; -e['hello'] = 'modified'; + set: (key: string) => 'foobar' +>set : (key: string) => string +>(key: string) => 'foobar' : (key: string) => string +>key : string +>'foobar' : "foobar" + + }; + e['hello']; +>e['hello'] : any +>e : { get: (key: string) => string; set: (key: string) => string; } +>'hello' : "hello" + + e['hello'] = 'modified'; >e['hello'] = 'modified' : "modified" >e['hello'] : any ->e : { set: (key: string) => string; get: (key: string) => string; } +>e : { get: (key: string) => string; set: (key: string) => string; } >'hello' : "hello" >'modified' : "modified" -e['hello'] += 1; + e['hello'] += 1; >e['hello'] += 1 : any >e['hello'] : any ->e : { set: (key: string) => string; get: (key: string) => string; } +>e : { get: (key: string) => string; set: (key: string) => string; } >'hello' : "hello" >1 : 1 -e['hello'] ++; + e['hello'] ++; >e['hello'] ++ : number >e['hello'] : any ->e : { set: (key: string) => string; get: (key: string) => string; } +>e : { get: (key: string) => string; set: (key: string) => string; } >'hello' : "hello" +} + +{ + let e = { +>e : { get: (key: string) => string; set: (key: string, value: string) => string; } +>{ get: (key: string) => 'foobar', set: (key: string, value: string) => 'foobar' } : { get: (key: string) => string; set: (key: string, value: string) => string; } + + get: (key: string) => 'foobar', +>get : (key: string) => string +>(key: string) => 'foobar' : (key: string) => string +>key : string +>'foobar' : "foobar" + + set: (key: string, value: string) => 'foobar' +>set : (key: string, value: string) => string +>(key: string, value: string) => 'foobar' : (key: string, value: string) => string +>key : string +>value : string +>'foobar' : "foobar" + + }; + e['hello']; +>e['hello'] : any +>e : { get: (key: string) => string; set: (key: string, value: string) => string; } +>'hello' : "hello" + + e['hello'] = 'modified'; +>e['hello'] = 'modified' : "modified" +>e['hello'] : any +>e : { get: (key: string) => string; set: (key: string, value: string) => string; } +>'hello' : "hello" +>'modified' : "modified" + + e['hello'] += 1; +>e['hello'] += 1 : any +>e['hello'] : any +>e : { get: (key: string) => string; set: (key: string, value: string) => string; } +>'hello' : "hello" +>1 : 1 + + e['hello'] ++; +>e['hello'] ++ : number +>e['hello'] : any +>e : { get: (key: string) => string; set: (key: string, value: string) => string; } +>'hello' : "hello" +} + +{ + let e = { +>e : { get: (key: "hello" | "world") => string; set: (key: "hello" | "world", value: string) => string; } +>{ get: (key: "hello" | "world") => 'foobar', set: (key: "hello" | "world", value: string) => 'foobar' } : { get: (key: "hello" | "world") => string; set: (key: "hello" | "world", value: string) => string; } + + get: (key: "hello" | "world") => 'foobar', +>get : (key: "hello" | "world") => string +>(key: "hello" | "world") => 'foobar' : (key: "hello" | "world") => string +>key : "hello" | "world" +>'foobar' : "foobar" + + set: (key: "hello" | "world", value: string) => 'foobar' +>set : (key: "hello" | "world", value: string) => string +>(key: "hello" | "world", value: string) => 'foobar' : (key: "hello" | "world", value: string) => string +>key : "hello" | "world" +>value : string +>'foobar' : "foobar" + + }; + e['hello']; +>e['hello'] : any +>e : { get: (key: "hello" | "world") => string; set: (key: "hello" | "world", value: string) => string; } +>'hello' : "hello" + + e['hello'] = 'modified'; +>e['hello'] = 'modified' : "modified" +>e['hello'] : any +>e : { get: (key: "hello" | "world") => string; set: (key: "hello" | "world", value: string) => string; } +>'hello' : "hello" +>'modified' : "modified" + + e['hello'] += 1; +>e['hello'] += 1 : any +>e['hello'] : any +>e : { get: (key: "hello" | "world") => string; set: (key: "hello" | "world", value: string) => string; } +>'hello' : "hello" +>1 : 1 + + e['hello'] ++; +>e['hello'] ++ : number +>e['hello'] : any +>e : { get: (key: "hello" | "world") => string; set: (key: "hello" | "world", value: string) => string; } +>'hello' : "hello" +} + +{ + ({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello']; +>({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello'] : any +>({ get: (key: string) => 'hello', set: (key: string, value: string) => {} }) : { get: (key: string) => string; set: (key: string, value: string) => void; } +>{ get: (key: string) => 'hello', set: (key: string, value: string) => {} } : { get: (key: string) => string; set: (key: string, value: string) => void; } +>get : (key: string) => string +>(key: string) => 'hello' : (key: string) => string +>key : string +>'hello' : "hello" +>set : (key: string, value: string) => void +>(key: string, value: string) => {} : (key: string, value: string) => void +>key : string +>value : string +>'hello' : "hello" + + ({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello'] = 'modified'; +>({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello'] = 'modified' : "modified" +>({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello'] : any +>({ get: (key: string) => 'hello', set: (key: string, value: string) => {} }) : { get: (key: string) => string; set: (key: string, value: string) => void; } +>{ get: (key: string) => 'hello', set: (key: string, value: string) => {} } : { get: (key: string) => string; set: (key: string, value: string) => void; } +>get : (key: string) => string +>(key: string) => 'hello' : (key: string) => string +>key : string +>'hello' : "hello" +>set : (key: string, value: string) => void +>(key: string, value: string) => {} : (key: string, value: string) => void +>key : string +>value : string +>'hello' : "hello" +>'modified' : "modified" + + ({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello'] += 1; +>({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello'] += 1 : any +>({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello'] : any +>({ get: (key: string) => 'hello', set: (key: string, value: string) => {} }) : { get: (key: string) => string; set: (key: string, value: string) => void; } +>{ get: (key: string) => 'hello', set: (key: string, value: string) => {} } : { get: (key: string) => string; set: (key: string, value: string) => void; } +>get : (key: string) => string +>(key: string) => 'hello' : (key: string) => string +>key : string +>'hello' : "hello" +>set : (key: string, value: string) => void +>(key: string, value: string) => {} : (key: string, value: string) => void +>key : string +>value : string +>'hello' : "hello" +>1 : 1 + + ({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello'] ++; +>({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello'] ++ : number +>({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello'] : any +>({ get: (key: string) => 'hello', set: (key: string, value: string) => {} }) : { get: (key: string) => string; set: (key: string, value: string) => void; } +>{ get: (key: string) => 'hello', set: (key: string, value: string) => {} } : { get: (key: string) => string; set: (key: string, value: string) => void; } +>get : (key: string) => string +>(key: string) => 'hello' : (key: string) => string +>key : string +>'hello' : "hello" +>set : (key: string, value: string) => void +>(key: string, value: string) => {} : (key: string, value: string) => void +>key : string +>value : string +>'hello' : "hello" +} + +{ + ({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello']; +>({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello'] : any +>({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo : { get: (key: string) => string; set: (key: string, value: string) => void; } +>({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }) : { foo: { get: (key: string) => string; set: (key: string, value: string) => void; }; } +>{ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } } : { foo: { get: (key: string) => string; set: (key: string, value: string) => void; }; } +>foo : { get: (key: string) => string; set: (key: string, value: string) => void; } +>{ get: (key: string) => 'hello', set: (key: string, value: string) => {} } : { get: (key: string) => string; set: (key: string, value: string) => void; } +>get : (key: string) => string +>(key: string) => 'hello' : (key: string) => string +>key : string +>'hello' : "hello" +>set : (key: string, value: string) => void +>(key: string, value: string) => {} : (key: string, value: string) => void +>key : string +>value : string +>foo : { get: (key: string) => string; set: (key: string, value: string) => void; } +>'hello' : "hello" + + ({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello'] = 'modified'; +>({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello'] = 'modified' : "modified" +>({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello'] : any +>({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo : { get: (key: string) => string; set: (key: string, value: string) => void; } +>({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }) : { foo: { get: (key: string) => string; set: (key: string, value: string) => void; }; } +>{ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } } : { foo: { get: (key: string) => string; set: (key: string, value: string) => void; }; } +>foo : { get: (key: string) => string; set: (key: string, value: string) => void; } +>{ get: (key: string) => 'hello', set: (key: string, value: string) => {} } : { get: (key: string) => string; set: (key: string, value: string) => void; } +>get : (key: string) => string +>(key: string) => 'hello' : (key: string) => string +>key : string +>'hello' : "hello" +>set : (key: string, value: string) => void +>(key: string, value: string) => {} : (key: string, value: string) => void +>key : string +>value : string +>foo : { get: (key: string) => string; set: (key: string, value: string) => void; } +>'hello' : "hello" +>'modified' : "modified" + + ({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello'] += 1; +>({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello'] += 1 : any +>({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello'] : any +>({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo : { get: (key: string) => string; set: (key: string, value: string) => void; } +>({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }) : { foo: { get: (key: string) => string; set: (key: string, value: string) => void; }; } +>{ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } } : { foo: { get: (key: string) => string; set: (key: string, value: string) => void; }; } +>foo : { get: (key: string) => string; set: (key: string, value: string) => void; } +>{ get: (key: string) => 'hello', set: (key: string, value: string) => {} } : { get: (key: string) => string; set: (key: string, value: string) => void; } +>get : (key: string) => string +>(key: string) => 'hello' : (key: string) => string +>key : string +>'hello' : "hello" +>set : (key: string, value: string) => void +>(key: string, value: string) => {} : (key: string, value: string) => void +>key : string +>value : string +>foo : { get: (key: string) => string; set: (key: string, value: string) => void; } +>'hello' : "hello" +>1 : 1 + + ({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello'] ++; +>({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello'] ++ : number +>({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello'] : any +>({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo : { get: (key: string) => string; set: (key: string, value: string) => void; } +>({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }) : { foo: { get: (key: string) => string; set: (key: string, value: string) => void; }; } +>{ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } } : { foo: { get: (key: string) => string; set: (key: string, value: string) => void; }; } +>foo : { get: (key: string) => string; set: (key: string, value: string) => void; } +>{ get: (key: string) => 'hello', set: (key: string, value: string) => {} } : { get: (key: string) => string; set: (key: string, value: string) => void; } +>get : (key: string) => string +>(key: string) => 'hello' : (key: string) => string +>key : string +>'hello' : "hello" +>set : (key: string, value: string) => void +>(key: string, value: string) => {} : (key: string, value: string) => void +>key : string +>value : string +>foo : { get: (key: string) => string; set: (key: string, value: string) => void; } +>'hello' : "hello" +} const o = { a: 0 }; >o : { a: number; } @@ -149,3 +388,33 @@ o[strEnumKey]; >o : { a: number; } >strEnumKey : StrEnum + +interface MyMap { + get(key: K): T; +>get : (key: K) => T +>key : K + + set(key: K, value: T): void; +>set : (key: K, value: T) => void +>key : K +>value : T +} + +interface Dog { bark(): void; } +>bark : () => void + +let rover: Dog = { bark() {} }; +>rover : Dog +>{ bark() {} } : { bark(): void; } +>bark : () => void + +declare let map: MyMap; +>map : MyMap + +map[rover] = "Rover"; +>map[rover] = "Rover" : "Rover" +>map[rover] : any +>map : MyMap +>rover : Dog +>"Rover" : "Rover" + diff --git a/tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts b/tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts index 5e1b9430088..a9b11e29034 100644 --- a/tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts +++ b/tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts @@ -14,13 +14,52 @@ var d = { }; const bar = d['hello']; -var e = { - set: (key: string) => 'foobar', - get: (key: string) => 'foobar' -}; -e['hello'] = 'modified'; -e['hello'] += 1; -e['hello'] ++; +{ + let e = { + get: (key: string) => 'foobar', + set: (key: string) => 'foobar' + }; + e['hello']; + e['hello'] = 'modified'; + e['hello'] += 1; + e['hello'] ++; +} + +{ + let e = { + get: (key: string) => 'foobar', + set: (key: string, value: string) => 'foobar' + }; + e['hello']; + e['hello'] = 'modified'; + e['hello'] += 1; + e['hello'] ++; +} + +{ + let e = { + get: (key: "hello" | "world") => 'foobar', + set: (key: "hello" | "world", value: string) => 'foobar' + }; + e['hello']; + e['hello'] = 'modified'; + e['hello'] += 1; + e['hello'] ++; +} + +{ + ({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello']; + ({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello'] = 'modified'; + ({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello'] += 1; + ({ get: (key: string) => 'hello', set: (key: string, value: string) => {} })['hello'] ++; +} + +{ + ({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello']; + ({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello'] = 'modified'; + ({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello'] += 1; + ({ foo: { get: (key: string) => 'hello', set: (key: string, value: string) => {} } }).foo['hello'] ++; +} const o = { a: 0 }; @@ -42,3 +81,15 @@ o[numEnumKey]; enum StrEnum { a = "a", b = "b" } let strEnumKey: StrEnum; o[strEnumKey]; + + +interface MyMap { + get(key: K): T; + set(key: K, value: T): void; +} + +interface Dog { bark(): void; } +let rover: Dog = { bark() {} }; + +declare let map: MyMap; +map[rover] = "Rover"; From 571ca60b089f3fc3b290e7db1adadfd556094b05 Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Tue, 19 Nov 2019 13:11:42 -0800 Subject: [PATCH 27/50] Add preceding semicolon on await insertion when parentheses are included (#34627) * Add preceding semicolon on await insertion when parentheses are included * Just start with precedingToken * Fix semicolon formatter regression * Delete test with debatable expected behavior * Lint after control flow changes --- src/harness/fourslash.ts | 6 +-- src/services/codefixes/addMissingAwait.ts | 9 ++++ src/services/completions.ts | 8 ++- src/services/formatting/rules.ts | 9 +--- src/services/utilities.ts | 13 ++++- .../codeFixAddMissingAwait_propertyAccess2.ts | 15 ++++++ .../codeFixAddMissingAwait_signatures2.ts | 50 +++++++++++++++++++ .../fourslash/completionOfAwaitPromise7.ts | 18 +++++++ 8 files changed, 115 insertions(+), 13 deletions(-) create mode 100644 tests/cases/fourslash/codeFixAddMissingAwait_propertyAccess2.ts create mode 100644 tests/cases/fourslash/codeFixAddMissingAwait_signatures2.ts create mode 100644 tests/cases/fourslash/completionOfAwaitPromise7.ts diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index f6680378617..62545e54bc7 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -2358,9 +2358,9 @@ namespace FourSlash { if (!details) { return this.raiseError(`No completions were found for the given name, source, and preferences.`); } - const codeActions = details.codeActions!; - if (codeActions.length !== 1) { - this.raiseError(`Expected one code action, got ${codeActions.length}`); + const codeActions = details.codeActions; + if (codeActions?.length !== 1) { + this.raiseError(`Expected one code action, got ${codeActions?.length ?? 0}`); } const codeAction = ts.first(codeActions); diff --git a/src/services/codefixes/addMissingAwait.ts b/src/services/codefixes/addMissingAwait.ts index 233c91b153b..96cf09ed08a 100644 --- a/src/services/codefixes/addMissingAwait.ts +++ b/src/services/codefixes/addMissingAwait.ts @@ -257,6 +257,7 @@ namespace ts.codefix { sourceFile, insertionSite.parent.expression, createParen(createAwait(insertionSite.parent.expression))); + insertLeadingSemicolonIfNeeded(changeTracker, insertionSite.parent.expression, sourceFile); } else if (contains(callableConstructableErrorCodes, errorCode) && isCallOrNewExpression(insertionSite.parent)) { if (fixedDeclarations && isIdentifier(insertionSite)) { @@ -266,6 +267,7 @@ namespace ts.codefix { } } changeTracker.replaceNode(sourceFile, insertionSite, createParen(createAwait(insertionSite))); + insertLeadingSemicolonIfNeeded(changeTracker, insertionSite, sourceFile); } else { if (fixedDeclarations && isVariableDeclaration(insertionSite.parent) && isIdentifier(insertionSite.parent.name)) { @@ -277,4 +279,11 @@ namespace ts.codefix { changeTracker.replaceNode(sourceFile, insertionSite, createAwait(insertionSite)); } } + + function insertLeadingSemicolonIfNeeded(changeTracker: textChanges.ChangeTracker, beforeNode: Node, sourceFile: SourceFile) { + const precedingToken = findPrecedingToken(beforeNode.pos, sourceFile); + if (precedingToken && positionIsASICandidate(precedingToken.end, precedingToken.parent, sourceFile)) { + changeTracker.insertText(sourceFile, beforeNode.getStart(sourceFile), ";"); + } + } } diff --git a/src/services/completions.ts b/src/services/completions.ts index c47b4dab95a..8cca9b678d9 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -373,7 +373,13 @@ namespace ts.Completions { } if (origin && originIsPromise(origin) && propertyAccessToConvert) { if (insertText === undefined) insertText = name; - const awaitText = `(await ${propertyAccessToConvert.expression.getText()})`; + const precedingToken = findPrecedingToken(propertyAccessToConvert.pos, sourceFile); + let awaitText = ""; + if (precedingToken && positionIsASICandidate(precedingToken.end, precedingToken.parent, sourceFile)) { + awaitText = ";"; + } + + awaitText += `(await ${propertyAccessToConvert.expression.getText()})`; insertText = needsConvertPropertyAccess ? `${awaitText}${insertText}` : `${awaitText}${insertQuestionDot ? "?." : "."}${insertText}`; replacementSpan = createTextSpanFromBounds(propertyAccessToConvert.getStart(sourceFile), propertyAccessToConvert.end); } diff --git a/src/services/formatting/rules.ts b/src/services/formatting/rules.ts index 8a86cd7a65d..59dcabfd6bc 100644 --- a/src/services/formatting/rules.ts +++ b/src/services/formatting/rules.ts @@ -855,13 +855,6 @@ namespace ts.formatting { } function isSemicolonInsertionContext(context: FormattingContext): boolean { - const contextAncestor = findAncestor(context.currentTokenParent, ancestor => { - if (ancestor.end !== context.currentTokenSpan.end) { - return "quit"; - } - return syntaxMayBeASICandidate(ancestor.kind); - }); - - return !!contextAncestor && isASICandidate(contextAncestor, context.sourceFile); + return positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile); } } diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 55dc95d3fc2..315f61c967d 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -2066,7 +2066,7 @@ namespace ts { syntaxRequiresTrailingModuleBlockOrSemicolonOrASI, syntaxRequiresTrailingSemicolonOrASI); - export function isASICandidate(node: Node, sourceFile: SourceFileLike): boolean { + function nodeIsASICandidate(node: Node, sourceFile: SourceFileLike): boolean { const lastToken = node.getLastToken(sourceFile); if (lastToken && lastToken.kind === SyntaxKind.SemicolonToken) { return false; @@ -2109,6 +2109,17 @@ namespace ts { return startLine !== endLine; } + export function positionIsASICandidate(pos: number, context: Node, sourceFile: SourceFileLike): boolean { + const contextAncestor = findAncestor(context, ancestor => { + if (ancestor.end !== pos) { + return "quit"; + } + return syntaxMayBeASICandidate(ancestor.kind); + }); + + return !!contextAncestor && nodeIsASICandidate(contextAncestor, sourceFile); + } + export function probablyUsesSemicolons(sourceFile: SourceFile): boolean { let withSemicolon = 0; let withoutSemicolon = 0; diff --git a/tests/cases/fourslash/codeFixAddMissingAwait_propertyAccess2.ts b/tests/cases/fourslash/codeFixAddMissingAwait_propertyAccess2.ts new file mode 100644 index 00000000000..e024028b140 --- /dev/null +++ b/tests/cases/fourslash/codeFixAddMissingAwait_propertyAccess2.ts @@ -0,0 +1,15 @@ +/// +////async function fn(a: Promise<{ x: string }>) { +//// console.log(3) +//// a.x; +////} + +verify.codeFix({ + description: ts.Diagnostics.Add_await.message, + index: 0, + newFileContent: +`async function fn(a: Promise<{ x: string }>) { + console.log(3) + ;(await a).x; +}` +}); diff --git a/tests/cases/fourslash/codeFixAddMissingAwait_signatures2.ts b/tests/cases/fourslash/codeFixAddMissingAwait_signatures2.ts new file mode 100644 index 00000000000..17f6651b379 --- /dev/null +++ b/tests/cases/fourslash/codeFixAddMissingAwait_signatures2.ts @@ -0,0 +1,50 @@ +/// +////async function fn(a: Promise<() => void>, b: Promise<() => void> | (() => void), C: Promise<{ new(): any }>) { +//// a() +//// b() +//// new C() +////} + +verify.codeFix({ + description: ts.Diagnostics.Add_await.message, + index: 0, + newFileContent: +`async function fn(a: Promise<() => void>, b: Promise<() => void> | (() => void), C: Promise<{ new(): any }>) { + (await a)() + b() + new C() +}` +}); + +verify.codeFix({ + description: ts.Diagnostics.Add_await.message, + index: 1, + newFileContent: +`async function fn(a: Promise<() => void>, b: Promise<() => void> | (() => void), C: Promise<{ new(): any }>) { + a() + ;(await b)() + new C() +}` +}); + +verify.codeFix({ + description: ts.Diagnostics.Add_await.message, + index: 2, + newFileContent: +`async function fn(a: Promise<() => void>, b: Promise<() => void> | (() => void), C: Promise<{ new(): any }>) { + a() + b() + new (await C)() +}` +}); + +verify.codeFixAll({ + fixAllDescription: ts.Diagnostics.Fix_all_expressions_possibly_missing_await.message, + fixId: "addMissingAwait", + newFileContent: +`async function fn(a: Promise<() => void>, b: Promise<() => void> | (() => void), C: Promise<{ new(): any }>) { + (await a)() + ;(await b)() + new (await C)() +}` +}); diff --git a/tests/cases/fourslash/completionOfAwaitPromise7.ts b/tests/cases/fourslash/completionOfAwaitPromise7.ts new file mode 100644 index 00000000000..b8860a7f2c1 --- /dev/null +++ b/tests/cases/fourslash/completionOfAwaitPromise7.ts @@ -0,0 +1,18 @@ +/// + +////async function foo(x: Promise) { +//// console.log +//// [|x./**/|] +////} + +const replacementSpan = test.ranges()[0]; +verify.completions({ + marker: "", + includes: [ + "then", + { name: "trim", insertText: ';(await x).trim', replacementSpan }, + ], + preferences: { + includeInsertTextCompletions: true, + }, +}); From 75301c8e2ce498359a6b33c3f9c9a6a1bd5980c0 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Tue, 19 Nov 2019 15:02:51 -0800 Subject: [PATCH 28/50] DOM update 2019-11-19 (#35207) * DOM update 2019-11-19 * update baselines * update more baselines --- src/lib/dom.generated.d.ts | 91 ++++++++++++------- src/lib/webworker.generated.d.ts | 27 ++++-- ...rtMeta(module=commonjs,target=es5).symbols | 4 +- ...eta(module=commonjs,target=esnext).symbols | 4 +- ...portMeta(module=esnext,target=es5).symbols | 4 +- ...tMeta(module=esnext,target=esnext).symbols | 4 +- ...portMeta(module=system,target=es5).symbols | 4 +- ...tMeta(module=system,target=esnext).symbols | 4 +- .../intersectionsOfLargeUnions2.errors.txt | 2 +- .../mappedTypeRecursiveInference.errors.txt | 8 +- .../reference/objectFromEntries.types | 2 +- 11 files changed, 96 insertions(+), 58 deletions(-) diff --git a/src/lib/dom.generated.d.ts b/src/lib/dom.generated.d.ts index f9f75763a39..cc5537b24a1 100644 --- a/src/lib/dom.generated.d.ts +++ b/src/lib/dom.generated.d.ts @@ -1496,6 +1496,16 @@ interface RTCTransportStats extends RTCStats { selectedCandidatePairId?: string; } +interface ReadableStreamReadDoneResult { + done: true; + value?: T; +} + +interface ReadableStreamReadValueResult { + done: false; + value: T; +} + interface RegistrationOptions { scope?: string; type?: WorkerType; @@ -2815,7 +2825,7 @@ interface CSSStyleDeclaration { clip: string; clipPath: string; clipRule: string; - color: string | null; + color: string; colorInterpolation: string; colorInterpolationFilters: string; columnCount: string; @@ -2992,7 +3002,7 @@ interface CSSStyleDeclaration { msWrapThrough: string; objectFit: string; objectPosition: string; - opacity: string | null; + opacity: string; order: string; orphans: string; outline: string; @@ -3032,14 +3042,14 @@ interface CSSStyleDeclaration { right: string; rotate: string; rowGap: string; - rubyAlign: string | null; + rubyAlign: string; rubyOverhang: string | null; - rubyPosition: string | null; + rubyPosition: string; scale: string; scrollBehavior: string; shapeRendering: string; - stopColor: string | null; - stopOpacity: string | null; + stopColor: string; + stopOpacity: string; stroke: string; strokeDasharray: string; strokeDashoffset: string; @@ -3052,7 +3062,7 @@ interface CSSStyleDeclaration { tableLayout: string; textAlign: string; textAlignLast: string; - textAnchor: string | null; + textAnchor: string; textCombineUpright: string; textDecoration: string; textDecorationColor: string; @@ -3344,7 +3354,7 @@ interface CacheStorage { delete(cacheName: string): Promise; has(cacheName: string): Promise; keys(): Promise; - match(request: RequestInfo, options?: CacheQueryOptions): Promise; + match(request: RequestInfo, options?: MultiCacheQueryOptions): Promise; open(cacheName: string): Promise; } @@ -4016,6 +4026,7 @@ interface DOMMatrixReadOnly { toJSON(): any; transformPoint(point?: DOMPointInit): DOMPoint; translate(tx?: number, ty?: number, tz?: number): DOMMatrix; + toString(): string; } declare var DOMMatrixReadOnly: { @@ -4024,6 +4035,7 @@ declare var DOMMatrixReadOnly: { fromFloat32Array(array32: Float32Array): DOMMatrixReadOnly; fromFloat64Array(array64: Float64Array): DOMMatrixReadOnly; fromMatrix(other?: DOMMatrixInit): DOMMatrixReadOnly; + toString(): string; }; /** Provides the ability to parse XML or HTML source code from a string into a DOM Document. */ @@ -4181,6 +4193,7 @@ interface DOMTokenList { * Can be set, to change the associated attribute. */ value: string; + toString(): string; /** * Adds all arguments passed, except those already present. * @@ -4416,6 +4429,7 @@ interface DeviceMotionEvent extends Event { declare var DeviceMotionEvent: { prototype: DeviceMotionEvent; new(type: string, eventInitDict?: DeviceMotionEventInit): DeviceMotionEvent; + requestPermission(): Promise; }; interface DeviceMotionEventAcceleration { @@ -4441,6 +4455,7 @@ interface DeviceOrientationEvent extends Event { declare var DeviceOrientationEvent: { prototype: DeviceOrientationEvent; new(type: string, eventInitDict?: DeviceOrientationEventInit): DeviceOrientationEvent; + requestPermission(): Promise; }; /** Provides information about the rate at which the device is rotating around all three axes. */ @@ -6096,10 +6111,10 @@ interface GlobalEventHandlers { */ ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null; ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null; - ontouchcancel: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null; - ontouchend: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null; - ontouchmove: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null; - ontouchstart: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null; + ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null; + ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null; + ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null; + ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null; ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null; ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null; ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null; @@ -7059,6 +7074,7 @@ interface HTMLHyperlinkElementUtils { host: string; hostname: string; href: string; + toString(): string; readonly origin: string; password: string; pathname: string; @@ -7344,7 +7360,7 @@ interface HTMLInputElement extends HTMLElement { * When present, marks an element that can't be submitted without a value. */ required: boolean; - selectionDirection: string | null; + selectionDirection: "forward" | "backward" | "none" | null; /** * Gets or sets the end position or offset of a text selection. */ @@ -8935,7 +8951,7 @@ interface HTMLTextAreaElement extends HTMLElement { * Sets or retrieves the number of horizontal rows contained in the object. */ rows: number; - selectionDirection: string; + selectionDirection: "forward" | "backward" | "none"; /** * Gets or sets the end position or offset of a text selection. */ @@ -9912,6 +9928,7 @@ interface Location { * Can be set, to navigate to the given URL. */ href: string; + toString(): string; /** * Returns the Location object's URL's origin. */ @@ -10370,10 +10387,10 @@ declare var MediaKeys: { interface MediaList { readonly length: number; mediaText: string; + toString(): string; appendMedium(medium: string): void; deleteMedium(medium: string): void; item(index: number): string | null; - toString(): number; [index: number]: string; } @@ -10985,7 +11002,7 @@ interface Node extends EventTarget { /** * Returns the previous sibling. */ - readonly previousSibling: Node | null; + readonly previousSibling: ChildNode | null; textContent: string | null; appendChild(newChild: T): T; /** @@ -12640,6 +12657,7 @@ interface Range extends AbstractRange { setStartAfter(node: Node): void; setStartBefore(node: Node): void; surroundContents(newParent: Node): void; + toString(): string; readonly END_TO_END: number; readonly END_TO_START: number; readonly START_TO_END: number; @@ -12653,6 +12671,7 @@ declare var Range: { readonly END_TO_START: number; readonly START_TO_END: number; readonly START_TO_START: number; + toString(): string; }; interface ReadableByteStreamController { @@ -12707,11 +12726,6 @@ interface ReadableStreamDefaultReader { releaseLock(): void; } -interface ReadableStreamReadResult { - done: boolean; - value: T; -} - interface ReadableStreamReader { cancel(): Promise; read(): Promise>; @@ -14358,7 +14372,7 @@ declare var SVGPathSegMovetoRel: { }; /** Corresponds to the element. */ -interface SVGPatternElement extends SVGElement, SVGFitToViewBox, SVGTests, SVGURIReference { +interface SVGPatternElement extends SVGElement, SVGFitToViewBox, SVGURIReference { readonly height: SVGAnimatedLength; readonly patternContentUnits: SVGAnimatedEnumeration; readonly patternTransform: SVGAnimatedTransformList; @@ -14464,6 +14478,7 @@ declare var SVGPreserveAspectRatio: { interface SVGRadialGradientElement extends SVGGradientElement { readonly cx: SVGAnimatedLength; readonly cy: SVGAnimatedLength; + readonly fr: SVGAnimatedLength; readonly fx: SVGAnimatedLength; readonly fy: SVGAnimatedLength; readonly r: SVGAnimatedLength; @@ -14680,13 +14695,13 @@ interface SVGTests { interface SVGTextContentElement extends SVGGraphicsElement { readonly lengthAdjust: SVGAnimatedEnumeration; readonly textLength: SVGAnimatedLength; - getCharNumAtPosition(point: SVGPoint): number; + getCharNumAtPosition(point?: DOMPointInit): number; getComputedTextLength(): number; - getEndPositionOfChar(charnum: number): SVGPoint; - getExtentOfChar(charnum: number): SVGRect; + getEndPositionOfChar(charnum: number): DOMPoint; + getExtentOfChar(charnum: number): DOMRect; getNumberOfChars(): number; getRotationOfChar(charnum: number): number; - getStartPositionOfChar(charnum: number): SVGPoint; + getStartPositionOfChar(charnum: number): DOMPoint; getSubStringLength(charnum: number, nchars: number): number; selectSubString(charnum: number, nchars: number): void; readonly LENGTHADJUST_SPACING: number; @@ -15029,11 +15044,13 @@ interface Selection { selectAllChildren(node: Node): void; setBaseAndExtent(anchorNode: Node, anchorOffset: number, focusNode: Node, focusOffset: number): void; setPosition(node: Node | null, offset?: number): void; + toString(): string; } declare var Selection: { prototype: Selection; new(): Selection; + toString(): string; }; interface ServiceUIFrameContext { @@ -15660,6 +15677,8 @@ interface TextDecoderCommon { } interface TextDecoderStream extends GenericTransformStream, TextDecoderCommon { + readonly readable: ReadableStream; + readonly writable: WritableStream; } declare var TextDecoderStream: { @@ -15692,6 +15711,8 @@ interface TextEncoderCommon { } interface TextEncoderStream extends GenericTransformStream, TextEncoderCommon { + readonly readable: ReadableStream; + readonly writable: WritableStream; } declare var TextEncoderStream: { @@ -16034,6 +16055,7 @@ interface URL { host: string; hostname: string; href: string; + toString(): string; readonly origin: string; password: string; pathname: string; @@ -16081,12 +16103,14 @@ interface URLSearchParams { */ set(name: string, value: string): void; sort(): void; + toString(): string; forEach(callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any): void; } declare var URLSearchParams: { prototype: URLSearchParams; new(init?: string[][] | Record | string | URLSearchParams): URLSearchParams; + toString(): string; }; /** This WebVR API interface represents any VR device supported by this API. It includes generic information such as device IDs and descriptions, as well as methods for starting to present a VR scene, retrieving eye parameters and display capabilities, and other important functionality. */ @@ -18668,7 +18692,7 @@ interface WindowEventHandlersEventMap { "pagehide": PageTransitionEvent; "pageshow": PageTransitionEvent; "popstate": PopStateEvent; - "rejectionhandled": Event; + "rejectionhandled": PromiseRejectionEvent; "storage": StorageEvent; "unhandledrejection": PromiseRejectionEvent; "unload": Event; @@ -18687,7 +18711,7 @@ interface WindowEventHandlers { onpagehide: ((this: WindowEventHandlers, ev: PageTransitionEvent) => any) | null; onpageshow: ((this: WindowEventHandlers, ev: PageTransitionEvent) => any) | null; onpopstate: ((this: WindowEventHandlers, ev: PopStateEvent) => any) | null; - onrejectionhandled: ((this: WindowEventHandlers, ev: Event) => any) | null; + onrejectionhandled: ((this: WindowEventHandlers, ev: PromiseRejectionEvent) => any) | null; onstorage: ((this: WindowEventHandlers, ev: StorageEvent) => any) | null; onunhandledrejection: ((this: WindowEventHandlers, ev: PromiseRejectionEvent) => any) | null; onunload: ((this: WindowEventHandlers, ev: Event) => any) | null; @@ -19886,10 +19910,10 @@ declare var onsuspend: ((this: Window, ev: Event) => any) | null; */ declare var ontimeupdate: ((this: Window, ev: Event) => any) | null; declare var ontoggle: ((this: Window, ev: Event) => any) | null; -declare var ontouchcancel: ((this: Window, ev: TouchEvent) => any) | null; -declare var ontouchend: ((this: Window, ev: TouchEvent) => any) | null; -declare var ontouchmove: ((this: Window, ev: TouchEvent) => any) | null; -declare var ontouchstart: ((this: Window, ev: TouchEvent) => any) | null; +declare var ontouchcancel: ((this: Window, ev: TouchEvent) => any) | null | undefined; +declare var ontouchend: ((this: Window, ev: TouchEvent) => any) | null | undefined; +declare var ontouchmove: ((this: Window, ev: TouchEvent) => any) | null | undefined; +declare var ontouchstart: ((this: Window, ev: TouchEvent) => any) | null | undefined; declare var ontransitioncancel: ((this: Window, ev: TransitionEvent) => any) | null; declare var ontransitionend: ((this: Window, ev: TransitionEvent) => any) | null; declare var ontransitionrun: ((this: Window, ev: TransitionEvent) => any) | null; @@ -19939,7 +19963,7 @@ declare var ononline: ((this: Window, ev: Event) => any) | null; declare var onpagehide: ((this: Window, ev: PageTransitionEvent) => any) | null; declare var onpageshow: ((this: Window, ev: PageTransitionEvent) => any) | null; declare var onpopstate: ((this: Window, ev: PopStateEvent) => any) | null; -declare var onrejectionhandled: ((this: Window, ev: Event) => any) | null; +declare var onrejectionhandled: ((this: Window, ev: PromiseRejectionEvent) => any) | null; declare var onstorage: ((this: Window, ev: StorageEvent) => any) | null; declare var onunhandledrejection: ((this: Window, ev: PromiseRejectionEvent) => any) | null; declare var onunload: ((this: Window, ev: Event) => any) | null; @@ -19967,6 +19991,7 @@ type ConstrainDouble = number | ConstrainDoubleRange; type ConstrainBoolean = boolean | ConstrainBooleanParameters; type ConstrainDOMString = string | string[] | ConstrainDOMStringParameters; type PerformanceEntryList = PerformanceEntry[]; +type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableStreamReadDoneResult; type VibratePattern = number | number[]; type COSEAlgorithmIdentifier = number; type AuthenticatorSelectionList = AAGUID[]; diff --git a/src/lib/webworker.generated.d.ts b/src/lib/webworker.generated.d.ts index 0199e62b9df..111b94ad021 100644 --- a/src/lib/webworker.generated.d.ts +++ b/src/lib/webworker.generated.d.ts @@ -371,6 +371,16 @@ interface QueuingStrategy { size?: QueuingStrategySizeCallback; } +interface ReadableStreamReadDoneResult { + done: true; + value?: T; +} + +interface ReadableStreamReadValueResult { + done: false; + value: T; +} + interface RegistrationOptions { scope?: string; type?: WorkerType; @@ -703,7 +713,7 @@ interface CacheStorage { delete(cacheName: string): Promise; has(cacheName: string): Promise; keys(): Promise; - match(request: RequestInfo, options?: CacheQueryOptions): Promise; + match(request: RequestInfo, options?: MultiCacheQueryOptions): Promise; open(cacheName: string): Promise; } @@ -2760,11 +2770,6 @@ interface ReadableStreamDefaultReader { releaseLock(): void; } -interface ReadableStreamReadResult { - done: boolean; - value: T; -} - interface ReadableStreamReader { cancel(): Promise; read(): Promise>; @@ -3083,6 +3088,8 @@ interface TextDecoderCommon { } interface TextDecoderStream extends GenericTransformStream, TextDecoderCommon { + readonly readable: ReadableStream; + readonly writable: WritableStream; } declare var TextDecoderStream: { @@ -3115,6 +3122,8 @@ interface TextEncoderCommon { } interface TextEncoderStream extends GenericTransformStream, TextEncoderCommon { + readonly readable: ReadableStream; + readonly writable: WritableStream; } declare var TextEncoderStream: { @@ -3202,6 +3211,7 @@ interface URL { host: string; hostname: string; href: string; + toString(): string; readonly origin: string; password: string; pathname: string; @@ -3246,12 +3256,14 @@ interface URLSearchParams { */ set(name: string, value: string): void; sort(): void; + toString(): string; forEach(callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any): void; } declare var URLSearchParams: { prototype: URLSearchParams; new(init?: string[][] | Record | string | URLSearchParams): URLSearchParams; + toString(): string; }; interface WEBGL_color_buffer_float { @@ -5380,12 +5392,12 @@ interface WorkerLocation { readonly host: string; readonly hostname: string; readonly href: string; + toString(): string; readonly origin: string; readonly pathname: string; readonly port: string; readonly protocol: string; readonly search: string; - toString(): string; } declare var WorkerLocation: { @@ -5804,6 +5816,7 @@ type ImageBitmapSource = CanvasImageSource | Blob | ImageData; type TimerHandler = string | Function; type PerformanceEntryList = PerformanceEntry[]; type PushMessageDataInit = BufferSource | string; +type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableStreamReadDoneResult; type VibratePattern = number | number[]; type AlgorithmIdentifier = string | Algorithm; type HashAlgorithmIdentifier = AlgorithmIdentifier; diff --git a/tests/baselines/reference/importMeta(module=commonjs,target=es5).symbols b/tests/baselines/reference/importMeta(module=commonjs,target=es5).symbols index d21785639ed..d58b14e9aca 100644 --- a/tests/baselines/reference/importMeta(module=commonjs,target=es5).symbols +++ b/tests/baselines/reference/importMeta(module=commonjs,target=es5).symbols @@ -4,9 +4,9 @@ const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString()); >response : Symbol(response, Decl(example.ts, 2, 7)) >fetch : Symbol(fetch, Decl(lib.dom.d.ts, --, --)) ->new URL("../hamsters.jpg", import.meta.url).toString : Symbol(Object.toString, Decl(lib.es5.d.ts, --, --)) +>new URL("../hamsters.jpg", import.meta.url).toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --)) >URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) ->toString : Symbol(Object.toString, Decl(lib.es5.d.ts, --, --)) +>toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --)) const blob = await response.blob(); >blob : Symbol(blob, Decl(example.ts, 3, 7)) diff --git a/tests/baselines/reference/importMeta(module=commonjs,target=esnext).symbols b/tests/baselines/reference/importMeta(module=commonjs,target=esnext).symbols index d21785639ed..d58b14e9aca 100644 --- a/tests/baselines/reference/importMeta(module=commonjs,target=esnext).symbols +++ b/tests/baselines/reference/importMeta(module=commonjs,target=esnext).symbols @@ -4,9 +4,9 @@ const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString()); >response : Symbol(response, Decl(example.ts, 2, 7)) >fetch : Symbol(fetch, Decl(lib.dom.d.ts, --, --)) ->new URL("../hamsters.jpg", import.meta.url).toString : Symbol(Object.toString, Decl(lib.es5.d.ts, --, --)) +>new URL("../hamsters.jpg", import.meta.url).toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --)) >URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) ->toString : Symbol(Object.toString, Decl(lib.es5.d.ts, --, --)) +>toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --)) const blob = await response.blob(); >blob : Symbol(blob, Decl(example.ts, 3, 7)) diff --git a/tests/baselines/reference/importMeta(module=esnext,target=es5).symbols b/tests/baselines/reference/importMeta(module=esnext,target=es5).symbols index d21785639ed..d58b14e9aca 100644 --- a/tests/baselines/reference/importMeta(module=esnext,target=es5).symbols +++ b/tests/baselines/reference/importMeta(module=esnext,target=es5).symbols @@ -4,9 +4,9 @@ const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString()); >response : Symbol(response, Decl(example.ts, 2, 7)) >fetch : Symbol(fetch, Decl(lib.dom.d.ts, --, --)) ->new URL("../hamsters.jpg", import.meta.url).toString : Symbol(Object.toString, Decl(lib.es5.d.ts, --, --)) +>new URL("../hamsters.jpg", import.meta.url).toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --)) >URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) ->toString : Symbol(Object.toString, Decl(lib.es5.d.ts, --, --)) +>toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --)) const blob = await response.blob(); >blob : Symbol(blob, Decl(example.ts, 3, 7)) diff --git a/tests/baselines/reference/importMeta(module=esnext,target=esnext).symbols b/tests/baselines/reference/importMeta(module=esnext,target=esnext).symbols index d21785639ed..d58b14e9aca 100644 --- a/tests/baselines/reference/importMeta(module=esnext,target=esnext).symbols +++ b/tests/baselines/reference/importMeta(module=esnext,target=esnext).symbols @@ -4,9 +4,9 @@ const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString()); >response : Symbol(response, Decl(example.ts, 2, 7)) >fetch : Symbol(fetch, Decl(lib.dom.d.ts, --, --)) ->new URL("../hamsters.jpg", import.meta.url).toString : Symbol(Object.toString, Decl(lib.es5.d.ts, --, --)) +>new URL("../hamsters.jpg", import.meta.url).toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --)) >URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) ->toString : Symbol(Object.toString, Decl(lib.es5.d.ts, --, --)) +>toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --)) const blob = await response.blob(); >blob : Symbol(blob, Decl(example.ts, 3, 7)) diff --git a/tests/baselines/reference/importMeta(module=system,target=es5).symbols b/tests/baselines/reference/importMeta(module=system,target=es5).symbols index d21785639ed..d58b14e9aca 100644 --- a/tests/baselines/reference/importMeta(module=system,target=es5).symbols +++ b/tests/baselines/reference/importMeta(module=system,target=es5).symbols @@ -4,9 +4,9 @@ const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString()); >response : Symbol(response, Decl(example.ts, 2, 7)) >fetch : Symbol(fetch, Decl(lib.dom.d.ts, --, --)) ->new URL("../hamsters.jpg", import.meta.url).toString : Symbol(Object.toString, Decl(lib.es5.d.ts, --, --)) +>new URL("../hamsters.jpg", import.meta.url).toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --)) >URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) ->toString : Symbol(Object.toString, Decl(lib.es5.d.ts, --, --)) +>toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --)) const blob = await response.blob(); >blob : Symbol(blob, Decl(example.ts, 3, 7)) diff --git a/tests/baselines/reference/importMeta(module=system,target=esnext).symbols b/tests/baselines/reference/importMeta(module=system,target=esnext).symbols index d21785639ed..d58b14e9aca 100644 --- a/tests/baselines/reference/importMeta(module=system,target=esnext).symbols +++ b/tests/baselines/reference/importMeta(module=system,target=esnext).symbols @@ -4,9 +4,9 @@ const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString()); >response : Symbol(response, Decl(example.ts, 2, 7)) >fetch : Symbol(fetch, Decl(lib.dom.d.ts, --, --)) ->new URL("../hamsters.jpg", import.meta.url).toString : Symbol(Object.toString, Decl(lib.es5.d.ts, --, --)) +>new URL("../hamsters.jpg", import.meta.url).toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --)) >URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) ->toString : Symbol(Object.toString, Decl(lib.es5.d.ts, --, --)) +>toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --)) const blob = await response.blob(); >blob : Symbol(blob, Decl(example.ts, 3, 7)) diff --git a/tests/baselines/reference/intersectionsOfLargeUnions2.errors.txt b/tests/baselines/reference/intersectionsOfLargeUnions2.errors.txt index 39ec0696ab3..26944647370 100644 --- a/tests/baselines/reference/intersectionsOfLargeUnions2.errors.txt +++ b/tests/baselines/reference/intersectionsOfLargeUnions2.errors.txt @@ -10,7 +10,7 @@ tests/cases/compiler/intersectionsOfLargeUnions2.ts(31,15): error TS2536: Type ' interface ElementTagNameMap { ~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'ElementTagNameMap'. -!!! related TS6203 /.ts/lib.dom.d.ts:19522:6: 'ElementTagNameMap' was also declared here. +!!! related TS6203 /.ts/lib.dom.d.ts:19546:6: 'ElementTagNameMap' was also declared here. [index: number]: HTMLElement } diff --git a/tests/baselines/reference/mappedTypeRecursiveInference.errors.txt b/tests/baselines/reference/mappedTypeRecursiveInference.errors.txt index b0985649684..7cd739bd320 100644 --- a/tests/baselines/reference/mappedTypeRecursiveInference.errors.txt +++ b/tests/baselines/reference/mappedTypeRecursiveInference.errors.txt @@ -1,8 +1,8 @@ -error TS2321: Excessive stack depth comparing types 'XMLHttpRequest' and 'Deep<{ onreadystatechange: unknown; readonly readyState: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: unknown; readonly responseText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; responseType: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseURL: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseXML: { readonly URL: any; readonly activeElement: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; oncopy: any; oncut: any; onpaste: any; readonly fullscreenElement: any; readonly pointerLockElement: any; readonly styleSheets: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadend: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel: any; ontouchend: any; ontouchmove: any; ontouchstart: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; createExpression: any; createNSResolver: any; evaluate: any; }; readonly status: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly statusText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; timeout: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly upload: { addEventListener: any; removeEventListener: any; onabort: any; onerror: any; onload: any; onloadend: any; onloadstart: any; onprogress: any; ontimeout: any; dispatchEvent: any; }; withCredentials: { valueOf: any; }; abort: unknown; getAllResponseHeaders: unknown; getResponseHeader: unknown; open: unknown; overrideMimeType: unknown; send: unknown; setRequestHeader: unknown; readonly DONE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly HEADERS_RECEIVED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly LOADING: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly OPENED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly UNSENT: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; addEventListener: unknown; removeEventListener: unknown; onabort: unknown; onerror: unknown; onload: unknown; onloadend: unknown; onloadstart: unknown; onprogress: unknown; ontimeout: unknown; dispatchEvent: unknown; }>'. -tests/cases/compiler/mappedTypeRecursiveInference.ts(19,18): error TS2321: Excessive stack depth comparing types 'XMLHttpRequest' and 'Deep<{ onreadystatechange: unknown; readonly readyState: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: unknown; readonly responseText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; responseType: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseURL: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseXML: { readonly URL: any; readonly activeElement: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; oncopy: any; oncut: any; onpaste: any; readonly fullscreenElement: any; readonly pointerLockElement: any; readonly styleSheets: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadend: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel: any; ontouchend: any; ontouchmove: any; ontouchstart: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; createExpression: any; createNSResolver: any; evaluate: any; }; readonly status: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly statusText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; timeout: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly upload: { addEventListener: any; removeEventListener: any; onabort: any; onerror: any; onload: any; onloadend: any; onloadstart: any; onprogress: any; ontimeout: any; dispatchEvent: any; }; withCredentials: { valueOf: any; }; abort: unknown; getAllResponseHeaders: unknown; getResponseHeader: unknown; open: unknown; overrideMimeType: unknown; send: unknown; setRequestHeader: unknown; readonly DONE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly HEADERS_RECEIVED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly LOADING: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly OPENED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly UNSENT: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; addEventListener: unknown; removeEventListener: unknown; onabort: unknown; onerror: unknown; onload: unknown; onloadend: unknown; onloadstart: unknown; onprogress: unknown; ontimeout: unknown; dispatchEvent: unknown; }>'. +error TS2321: Excessive stack depth comparing types 'XMLHttpRequest' and 'Deep<{ onreadystatechange: unknown; readonly readyState: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: unknown; readonly responseText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; responseType: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseURL: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseXML: { readonly URL: any; readonly activeElement: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; oncopy: any; oncut: any; onpaste: any; readonly fullscreenElement: any; readonly pointerLockElement: any; readonly styleSheets: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadend: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; createExpression: any; createNSResolver: any; evaluate: any; }; readonly status: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly statusText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; timeout: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly upload: { addEventListener: any; removeEventListener: any; onabort: any; onerror: any; onload: any; onloadend: any; onloadstart: any; onprogress: any; ontimeout: any; dispatchEvent: any; }; withCredentials: { valueOf: any; }; abort: unknown; getAllResponseHeaders: unknown; getResponseHeader: unknown; open: unknown; overrideMimeType: unknown; send: unknown; setRequestHeader: unknown; readonly DONE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly HEADERS_RECEIVED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly LOADING: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly OPENED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly UNSENT: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; addEventListener: unknown; removeEventListener: unknown; onabort: unknown; onerror: unknown; onload: unknown; onloadend: unknown; onloadstart: unknown; onprogress: unknown; ontimeout: unknown; dispatchEvent: unknown; }>'. +tests/cases/compiler/mappedTypeRecursiveInference.ts(19,18): error TS2321: Excessive stack depth comparing types 'XMLHttpRequest' and 'Deep<{ onreadystatechange: unknown; readonly readyState: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: unknown; readonly responseText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; responseType: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseURL: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseXML: { readonly URL: any; readonly activeElement: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; oncopy: any; oncut: any; onpaste: any; readonly fullscreenElement: any; readonly pointerLockElement: any; readonly styleSheets: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadend: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; createExpression: any; createNSResolver: any; evaluate: any; }; readonly status: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly statusText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; timeout: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly upload: { addEventListener: any; removeEventListener: any; onabort: any; onerror: any; onload: any; onloadend: any; onloadstart: any; onprogress: any; ontimeout: any; dispatchEvent: any; }; withCredentials: { valueOf: any; }; abort: unknown; getAllResponseHeaders: unknown; getResponseHeader: unknown; open: unknown; overrideMimeType: unknown; send: unknown; setRequestHeader: unknown; readonly DONE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly HEADERS_RECEIVED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly LOADING: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly OPENED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly UNSENT: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; addEventListener: unknown; removeEventListener: unknown; onabort: unknown; onerror: unknown; onload: unknown; onloadend: unknown; onloadstart: unknown; onprogress: unknown; ontimeout: unknown; dispatchEvent: unknown; }>'. -!!! error TS2321: Excessive stack depth comparing types 'XMLHttpRequest' and 'Deep<{ onreadystatechange: unknown; readonly readyState: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: unknown; readonly responseText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; responseType: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseURL: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseXML: { readonly URL: any; readonly activeElement: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; oncopy: any; oncut: any; onpaste: any; readonly fullscreenElement: any; readonly pointerLockElement: any; readonly styleSheets: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadend: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel: any; ontouchend: any; ontouchmove: any; ontouchstart: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; createExpression: any; createNSResolver: any; evaluate: any; }; readonly status: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly statusText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; timeout: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly upload: { addEventListener: any; removeEventListener: any; onabort: any; onerror: any; onload: any; onloadend: any; onloadstart: any; onprogress: any; ontimeout: any; dispatchEvent: any; }; withCredentials: { valueOf: any; }; abort: unknown; getAllResponseHeaders: unknown; getResponseHeader: unknown; open: unknown; overrideMimeType: unknown; send: unknown; setRequestHeader: unknown; readonly DONE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly HEADERS_RECEIVED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly LOADING: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly OPENED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly UNSENT: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; addEventListener: unknown; removeEventListener: unknown; onabort: unknown; onerror: unknown; onload: unknown; onloadend: unknown; onloadstart: unknown; onprogress: unknown; ontimeout: unknown; dispatchEvent: unknown; }>'. +!!! error TS2321: Excessive stack depth comparing types 'XMLHttpRequest' and 'Deep<{ onreadystatechange: unknown; readonly readyState: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: unknown; readonly responseText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; responseType: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseURL: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseXML: { readonly URL: any; readonly activeElement: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; oncopy: any; oncut: any; onpaste: any; readonly fullscreenElement: any; readonly pointerLockElement: any; readonly styleSheets: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadend: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; createExpression: any; createNSResolver: any; evaluate: any; }; readonly status: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly statusText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; timeout: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly upload: { addEventListener: any; removeEventListener: any; onabort: any; onerror: any; onload: any; onloadend: any; onloadstart: any; onprogress: any; ontimeout: any; dispatchEvent: any; }; withCredentials: { valueOf: any; }; abort: unknown; getAllResponseHeaders: unknown; getResponseHeader: unknown; open: unknown; overrideMimeType: unknown; send: unknown; setRequestHeader: unknown; readonly DONE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly HEADERS_RECEIVED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly LOADING: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly OPENED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly UNSENT: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; addEventListener: unknown; removeEventListener: unknown; onabort: unknown; onerror: unknown; onload: unknown; onloadend: unknown; onloadstart: unknown; onprogress: unknown; ontimeout: unknown; dispatchEvent: unknown; }>'. ==== tests/cases/compiler/mappedTypeRecursiveInference.ts (1 errors) ==== interface A { a: A } declare let a: A; @@ -24,7 +24,7 @@ tests/cases/compiler/mappedTypeRecursiveInference.ts(19,18): error TS2321: Exces let xhr: XMLHttpRequest; const out2 = foo(xhr); ~~~ -!!! error TS2321: Excessive stack depth comparing types 'XMLHttpRequest' and 'Deep<{ onreadystatechange: unknown; readonly readyState: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: unknown; readonly responseText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; responseType: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseURL: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseXML: { readonly URL: any; readonly activeElement: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; oncopy: any; oncut: any; onpaste: any; readonly fullscreenElement: any; readonly pointerLockElement: any; readonly styleSheets: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadend: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel: any; ontouchend: any; ontouchmove: any; ontouchstart: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; createExpression: any; createNSResolver: any; evaluate: any; }; readonly status: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly statusText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; timeout: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly upload: { addEventListener: any; removeEventListener: any; onabort: any; onerror: any; onload: any; onloadend: any; onloadstart: any; onprogress: any; ontimeout: any; dispatchEvent: any; }; withCredentials: { valueOf: any; }; abort: unknown; getAllResponseHeaders: unknown; getResponseHeader: unknown; open: unknown; overrideMimeType: unknown; send: unknown; setRequestHeader: unknown; readonly DONE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly HEADERS_RECEIVED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly LOADING: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly OPENED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly UNSENT: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; addEventListener: unknown; removeEventListener: unknown; onabort: unknown; onerror: unknown; onload: unknown; onloadend: unknown; onloadstart: unknown; onprogress: unknown; ontimeout: unknown; dispatchEvent: unknown; }>'. +!!! error TS2321: Excessive stack depth comparing types 'XMLHttpRequest' and 'Deep<{ onreadystatechange: unknown; readonly readyState: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: unknown; readonly responseText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; responseType: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseURL: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseXML: { readonly URL: any; readonly activeElement: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: any; replaceChild: any; readonly ATTRIBUTE_NODE: any; readonly CDATA_SECTION_NODE: any; readonly COMMENT_NODE: any; readonly DOCUMENT_FRAGMENT_NODE: any; readonly DOCUMENT_NODE: any; readonly DOCUMENT_POSITION_CONTAINED_BY: any; readonly DOCUMENT_POSITION_CONTAINS: any; readonly DOCUMENT_POSITION_DISCONNECTED: any; readonly DOCUMENT_POSITION_FOLLOWING: any; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: any; readonly DOCUMENT_POSITION_PRECEDING: any; readonly DOCUMENT_TYPE_NODE: any; readonly ELEMENT_NODE: any; readonly ENTITY_NODE: any; readonly ENTITY_REFERENCE_NODE: any; readonly NOTATION_NODE: any; readonly PROCESSING_INSTRUCTION_NODE: any; readonly TEXT_NODE: any; dispatchEvent: any; oncopy: any; oncut: any; onpaste: any; readonly fullscreenElement: any; readonly pointerLockElement: any; readonly styleSheets: any; onabort: any; onanimationcancel: any; onanimationend: any; onanimationiteration: any; onanimationstart: any; onauxclick: any; onblur: any; oncancel: any; oncanplay: any; oncanplaythrough: any; onchange: any; onclick: any; onclose: any; oncontextmenu: any; oncuechange: any; ondblclick: any; ondrag: any; ondragend: any; ondragenter: any; ondragexit: any; ondragleave: any; ondragover: any; ondragstart: any; ondrop: any; ondurationchange: any; onemptied: any; onended: any; onerror: any; onfocus: any; ongotpointercapture: any; oninput: any; oninvalid: any; onkeydown: any; onkeypress: any; onkeyup: any; onload: any; onloadeddata: any; onloadedmetadata: any; onloadend: any; onloadstart: any; onlostpointercapture: any; onmousedown: any; onmouseenter: any; onmouseleave: any; onmousemove: any; onmouseout: any; onmouseover: any; onmouseup: any; onpause: any; onplay: any; onplaying: any; onpointercancel: any; onpointerdown: any; onpointerenter: any; onpointerleave: any; onpointermove: any; onpointerout: any; onpointerover: any; onpointerup: any; onprogress: any; onratechange: any; onreset: any; onresize: any; onscroll: any; onsecuritypolicyviolation: any; onseeked: any; onseeking: any; onselect: any; onselectionchange: any; onselectstart: any; onstalled: any; onsubmit: any; onsuspend: any; ontimeupdate: any; ontoggle: any; ontouchcancel?: any; ontouchend?: any; ontouchmove?: any; ontouchstart?: any; ontransitioncancel: any; ontransitionend: any; ontransitionrun: any; ontransitionstart: any; onvolumechange: any; onwaiting: any; onwheel: any; readonly childElementCount: any; readonly children: any; readonly firstElementChild: any; readonly lastElementChild: any; append: any; prepend: any; querySelector: any; querySelectorAll: any; createExpression: any; createNSResolver: any; evaluate: any; }; readonly status: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly statusText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; timeout: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly upload: { addEventListener: any; removeEventListener: any; onabort: any; onerror: any; onload: any; onloadend: any; onloadstart: any; onprogress: any; ontimeout: any; dispatchEvent: any; }; withCredentials: { valueOf: any; }; abort: unknown; getAllResponseHeaders: unknown; getResponseHeader: unknown; open: unknown; overrideMimeType: unknown; send: unknown; setRequestHeader: unknown; readonly DONE: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly HEADERS_RECEIVED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly LOADING: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly OPENED: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly UNSENT: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; addEventListener: unknown; removeEventListener: unknown; onabort: unknown; onerror: unknown; onload: unknown; onloadend: unknown; onloadstart: unknown; onprogress: unknown; ontimeout: unknown; dispatchEvent: unknown; }>'. out2.responseXML out2.responseXML.activeElement.className.length \ No newline at end of file diff --git a/tests/baselines/reference/objectFromEntries.types b/tests/baselines/reference/objectFromEntries.types index 265cbd2d878..8ea08b648ff 100644 --- a/tests/baselines/reference/objectFromEntries.types +++ b/tests/baselines/reference/objectFromEntries.types @@ -23,7 +23,7 @@ const o2 = Object.fromEntries(new URLSearchParams()); >Object : ObjectConstructor >fromEntries : { (entries: Iterable): { [x: string]: T; [x: number]: T; }; (entries: Iterable): any; } >new URLSearchParams() : URLSearchParams ->URLSearchParams : { new (init?: string | URLSearchParams | string[][] | Record): URLSearchParams; prototype: URLSearchParams; } +>URLSearchParams : { new (init?: string | URLSearchParams | string[][] | Record): URLSearchParams; prototype: URLSearchParams; toString(): string; } const o3 = Object.fromEntries(new Map([[Symbol("key"), "value"]])); >o3 : { [x: string]: string; [x: number]: string; } From 17f5469a2c8d755ea7d016d2ecfce8c3f6652cba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C4=81rlis=20Ga=C5=86=C4=A3is?= Date: Wed, 20 Nov 2019 20:50:47 +0200 Subject: [PATCH 29/50] Fix crash with Object.defineProperty for imported alias (--allowJs) (#35198) Fixes #35196 --- src/compiler/binder.ts | 2 +- .../importAliasModuleExports.errors.txt | 11 ++++++++--- .../importAliasModuleExports.symbols | 12 ++++++++++++ .../reference/importAliasModuleExports.types | 19 +++++++++++++++++++ .../salsa/importAliasModuleExports.ts | 2 ++ 5 files changed, 42 insertions(+), 4 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 3372512e0bc..ff402a2fdc2 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -2752,7 +2752,7 @@ namespace ts { function bindObjectDefinePrototypeProperty(node: BindableObjectDefinePropertyCall) { const namespaceSymbol = lookupSymbolForPropertyAccess((node.arguments[0] as PropertyAccessExpression).expression as EntityNameExpression); - if (namespaceSymbol) { + if (namespaceSymbol && namespaceSymbol.valueDeclaration) { // Ensure the namespace symbol becomes class-like addDeclarationToSymbol(namespaceSymbol, namespaceSymbol.valueDeclaration, SymbolFlags.Class); } diff --git a/tests/baselines/reference/importAliasModuleExports.errors.txt b/tests/baselines/reference/importAliasModuleExports.errors.txt index 9cd2cd9768e..9ef29ca8d26 100644 --- a/tests/baselines/reference/importAliasModuleExports.errors.txt +++ b/tests/baselines/reference/importAliasModuleExports.errors.txt @@ -1,8 +1,9 @@ tests/cases/conformance/salsa/main.js(2,13): error TS2339: Property 'foo' does not exist on type 'Alias'. tests/cases/conformance/salsa/main.js(3,13): error TS2339: Property 'func' does not exist on type 'Alias'. tests/cases/conformance/salsa/main.js(3,38): error TS2339: Property '_func' does not exist on type 'Alias'. -tests/cases/conformance/salsa/main.js(5,9): error TS2339: Property 'foo' does not exist on type 'Alias'. -tests/cases/conformance/salsa/main.js(6,9): error TS2339: Property 'func' does not exist on type 'Alias'. +tests/cases/conformance/salsa/main.js(6,9): error TS2339: Property 'foo' does not exist on type 'Alias'. +tests/cases/conformance/salsa/main.js(7,9): error TS2339: Property 'func' does not exist on type 'Alias'. +tests/cases/conformance/salsa/main.js(8,9): error TS2339: Property 'def' does not exist on type 'Alias'. ==== tests/cases/conformance/salsa/mod1.js (0 errors) ==== @@ -11,7 +12,7 @@ tests/cases/conformance/salsa/main.js(6,9): error TS2339: Property 'func' does n } module.exports = Alias; -==== tests/cases/conformance/salsa/main.js (5 errors) ==== +==== tests/cases/conformance/salsa/main.js (6 errors) ==== import A from './mod1' A.prototype.foo = 0 ~~~ @@ -21,6 +22,7 @@ tests/cases/conformance/salsa/main.js(6,9): error TS2339: Property 'func' does n !!! error TS2339: Property 'func' does not exist on type 'Alias'. ~~~~~ !!! error TS2339: Property '_func' does not exist on type 'Alias'. + Object.defineProperty(A.prototype, "def", { value: 0 }); new A().bar new A().foo ~~~ @@ -28,4 +30,7 @@ tests/cases/conformance/salsa/main.js(6,9): error TS2339: Property 'func' does n new A().func() ~~~~ !!! error TS2339: Property 'func' does not exist on type 'Alias'. + new A().def + ~~~ +!!! error TS2339: Property 'def' does not exist on type 'Alias'. \ No newline at end of file diff --git a/tests/baselines/reference/importAliasModuleExports.symbols b/tests/baselines/reference/importAliasModuleExports.symbols index 4d67eb8e197..59bb97dcccd 100644 --- a/tests/baselines/reference/importAliasModuleExports.symbols +++ b/tests/baselines/reference/importAliasModuleExports.symbols @@ -26,6 +26,15 @@ A.prototype.func = function() { this._func = 0; } >prototype : Symbol(A.prototype) >this : Symbol(A, Decl(mod1.js, 0, 0)) +Object.defineProperty(A.prototype, "def", { value: 0 }); +>Object.defineProperty : Symbol(ObjectConstructor.defineProperty, Decl(lib.es5.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>defineProperty : Symbol(ObjectConstructor.defineProperty, Decl(lib.es5.d.ts, --, --)) +>A.prototype : Symbol(A.prototype) +>A : Symbol(A, Decl(main.js, 0, 6)) +>prototype : Symbol(A.prototype) +>value : Symbol(value, Decl(main.js, 3, 43)) + new A().bar >new A().bar : Symbol(A.bar, Decl(mod1.js, 0, 13)) >A : Symbol(A, Decl(main.js, 0, 6)) @@ -37,3 +46,6 @@ new A().foo new A().func() >A : Symbol(A, Decl(main.js, 0, 6)) +new A().def +>A : Symbol(A, Decl(main.js, 0, 6)) + diff --git a/tests/baselines/reference/importAliasModuleExports.types b/tests/baselines/reference/importAliasModuleExports.types index 961748a1c45..1a850c7c6f0 100644 --- a/tests/baselines/reference/importAliasModuleExports.types +++ b/tests/baselines/reference/importAliasModuleExports.types @@ -40,6 +40,19 @@ A.prototype.func = function() { this._func = 0; } >_func : any >0 : 0 +Object.defineProperty(A.prototype, "def", { value: 0 }); +>Object.defineProperty(A.prototype, "def", { value: 0 }) : any +>Object.defineProperty : (o: any, p: string | number | symbol, attributes: PropertyDescriptor & ThisType) => any +>Object : ObjectConstructor +>defineProperty : (o: any, p: string | number | symbol, attributes: PropertyDescriptor & ThisType) => any +>A.prototype : A +>A : typeof A +>prototype : A +>"def" : "def" +>{ value: 0 } : { value: number; } +>value : number +>0 : 0 + new A().bar >new A().bar : () => number >new A() : A @@ -59,3 +72,9 @@ new A().func() >A : typeof A >func : any +new A().def +>new A().def : any +>new A() : A +>A : typeof A +>def : any + diff --git a/tests/cases/conformance/salsa/importAliasModuleExports.ts b/tests/cases/conformance/salsa/importAliasModuleExports.ts index 691dde20269..c58815109d7 100644 --- a/tests/cases/conformance/salsa/importAliasModuleExports.ts +++ b/tests/cases/conformance/salsa/importAliasModuleExports.ts @@ -12,6 +12,8 @@ module.exports = Alias; import A from './mod1' A.prototype.foo = 0 A.prototype.func = function() { this._func = 0; } +Object.defineProperty(A.prototype, "def", { value: 0 }); new A().bar new A().foo new A().func() +new A().def From 0e736a743894313d0b7e66b84a9d96c724f49b3a Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 20 Nov 2019 10:55:40 -0800 Subject: [PATCH 30/50] Fix the usage of pattern matching in module resolution for check of hasZeroOrOneAsteriskCharacter (#35209) * Fix the usage of pattern matching for check of hasZeroOrOneAsteriskCharacter Fixes #35171 * Fix error message --- src/compiler/diagnosticMessages.json | 2 +- src/compiler/program.ts | 2 +- src/compiler/utilities.ts | 1 + ...gBasedModuleResolution2_classic.errors.txt | 4 +-- ...pingBasedModuleResolution2_node.errors.txt | 4 +-- .../reference/pathsValidation4.errors.txt | 26 ++++++++++++++ tests/baselines/reference/pathsValidation4.js | 7 ++++ .../reference/pathsValidation4.trace.json | 36 +++++++++++++++++++ tests/cases/compiler/pathsValidation4.ts | 16 +++++++++ 9 files changed, 92 insertions(+), 6 deletions(-) create mode 100644 tests/baselines/reference/pathsValidation4.errors.txt create mode 100644 tests/baselines/reference/pathsValidation4.js create mode 100644 tests/baselines/reference/pathsValidation4.trace.json create mode 100644 tests/cases/compiler/pathsValidation4.ts diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 02e852869cd..fedf796769b 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -3241,7 +3241,7 @@ "category": "Error", "code": 5061 }, - "Substitution '{0}' in pattern '{1}' in can have at most one '*' character.": { + "Substitution '{0}' in pattern '{1}' can have at most one '*' character.": { "category": "Error", "code": 5062 }, diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 429b7389f5b..cba0cd748b2 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -2980,7 +2980,7 @@ namespace ts { const typeOfSubst = typeof subst; if (typeOfSubst === "string") { if (!hasZeroOrOneAsteriskCharacter(subst)) { - createDiagnosticForOptionPathKeyValue(key, i, Diagnostics.Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character, subst, key); + createDiagnosticForOptionPathKeyValue(key, i, Diagnostics.Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character, subst, key); } } else { diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 5e40405817e..e7c5a7ae208 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -8285,6 +8285,7 @@ namespace ts { export function matchPatternOrExact(patternStrings: readonly string[], candidate: string): string | Pattern | undefined { const patterns: Pattern[] = []; for (const patternString of patternStrings) { + if (!hasZeroOrOneAsteriskCharacter(patternString)) continue; const pattern = tryParsePattern(patternString); if (pattern) { patterns.push(pattern); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution2_classic.errors.txt b/tests/baselines/reference/pathMappingBasedModuleResolution2_classic.errors.txt index 3b0261dd395..61282d7353e 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution2_classic.errors.txt +++ b/tests/baselines/reference/pathMappingBasedModuleResolution2_classic.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/root/tsconfig.json(8,13): error TS5061: Pattern '*1*' can have at most one '*' character. -tests/cases/compiler/root/tsconfig.json(8,22): error TS5062: Substitution '*2*' in pattern '*1*' in can have at most one '*' character. +tests/cases/compiler/root/tsconfig.json(8,22): error TS5062: Substitution '*2*' in pattern '*1*' can have at most one '*' character. ==== tests/cases/compiler/root/tsconfig.json (2 errors) ==== @@ -14,7 +14,7 @@ tests/cases/compiler/root/tsconfig.json(8,22): error TS5062: Substitution '*2*' ~~~~~ !!! error TS5061: Pattern '*1*' can have at most one '*' character. ~~~~~ -!!! error TS5062: Substitution '*2*' in pattern '*1*' in can have at most one '*' character. +!!! error TS5062: Substitution '*2*' in pattern '*1*' can have at most one '*' character. } } } diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution2_node.errors.txt b/tests/baselines/reference/pathMappingBasedModuleResolution2_node.errors.txt index 3b0261dd395..61282d7353e 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution2_node.errors.txt +++ b/tests/baselines/reference/pathMappingBasedModuleResolution2_node.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/root/tsconfig.json(8,13): error TS5061: Pattern '*1*' can have at most one '*' character. -tests/cases/compiler/root/tsconfig.json(8,22): error TS5062: Substitution '*2*' in pattern '*1*' in can have at most one '*' character. +tests/cases/compiler/root/tsconfig.json(8,22): error TS5062: Substitution '*2*' in pattern '*1*' can have at most one '*' character. ==== tests/cases/compiler/root/tsconfig.json (2 errors) ==== @@ -14,7 +14,7 @@ tests/cases/compiler/root/tsconfig.json(8,22): error TS5062: Substitution '*2*' ~~~~~ !!! error TS5061: Pattern '*1*' can have at most one '*' character. ~~~~~ -!!! error TS5062: Substitution '*2*' in pattern '*1*' in can have at most one '*' character. +!!! error TS5062: Substitution '*2*' in pattern '*1*' can have at most one '*' character. } } } diff --git a/tests/baselines/reference/pathsValidation4.errors.txt b/tests/baselines/reference/pathsValidation4.errors.txt new file mode 100644 index 00000000000..8056cc7baa2 --- /dev/null +++ b/tests/baselines/reference/pathsValidation4.errors.txt @@ -0,0 +1,26 @@ +tests/cases/compiler/tsconfig.json(6,11): error TS5061: Pattern '@interface/**/*' can have at most one '*' character. +tests/cases/compiler/tsconfig.json(7,11): error TS5061: Pattern '@service/**/*' can have at most one '*' character. +tests/cases/compiler/tsconfig.json(7,29): error TS5062: Substitution './src/service/**/*' in pattern '@service/**/*' can have at most one '*' character. + + +==== tests/cases/compiler/tsconfig.json (3 errors) ==== + { + "compilerOptions": { + "traceResolution": true, + "baseUrl": "./src", + "paths": { + "@interface/**/*" : ["./src/interface/*"], + ~~~~~~~~~~~~~~~~~ +!!! error TS5061: Pattern '@interface/**/*' can have at most one '*' character. + "@service/**/*": ["./src/service/**/*"], + ~~~~~~~~~~~~~~~ +!!! error TS5061: Pattern '@service/**/*' can have at most one '*' character. + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS5062: Substitution './src/service/**/*' in pattern '@service/**/*' can have at most one '*' character. + "@controller/*": ["controller/*"], + } + } + } + +==== tests/cases/compiler/src/main.ts (0 errors) ==== + import 'someModule'; \ No newline at end of file diff --git a/tests/baselines/reference/pathsValidation4.js b/tests/baselines/reference/pathsValidation4.js new file mode 100644 index 00000000000..eef527fbf74 --- /dev/null +++ b/tests/baselines/reference/pathsValidation4.js @@ -0,0 +1,7 @@ +//// [main.ts] +import 'someModule'; + +//// [main.js] +"use strict"; +exports.__esModule = true; +require("someModule"); diff --git a/tests/baselines/reference/pathsValidation4.trace.json b/tests/baselines/reference/pathsValidation4.trace.json new file mode 100644 index 00000000000..cd4f358050f --- /dev/null +++ b/tests/baselines/reference/pathsValidation4.trace.json @@ -0,0 +1,36 @@ +[ + "======== Resolving module 'someModule' from 'tests/cases/compiler/src/main.ts'. ========", + "Module resolution kind is not specified, using 'NodeJs'.", + "'baseUrl' option is set to 'tests/cases/compiler/src', using this value to resolve non-relative module name 'someModule'.", + "'paths' option is specified, looking for a pattern to match module name 'someModule'.", + "'baseUrl' option is set to 'tests/cases/compiler/src', using this value to resolve non-relative module name 'someModule'.", + "Resolving module name 'someModule' relative to base url 'tests/cases/compiler/src' - 'tests/cases/compiler/src/someModule'.", + "Loading module as file / folder, candidate module location 'tests/cases/compiler/src/someModule', target file type 'TypeScript'.", + "File 'tests/cases/compiler/src/someModule.ts' does not exist.", + "File 'tests/cases/compiler/src/someModule.tsx' does not exist.", + "File 'tests/cases/compiler/src/someModule.d.ts' does not exist.", + "Directory 'tests/cases/compiler/src/someModule' does not exist, skipping all lookups in it.", + "Loading module 'someModule' from 'node_modules' folder, target file type 'TypeScript'.", + "Directory 'tests/cases/compiler/src/node_modules' does not exist, skipping all lookups in it.", + "Directory 'tests/cases/compiler/node_modules' does not exist, skipping all lookups in it.", + "Directory 'tests/cases/node_modules' does not exist, skipping all lookups in it.", + "Directory 'tests/node_modules' does not exist, skipping all lookups in it.", + "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "'baseUrl' option is set to 'tests/cases/compiler/src', using this value to resolve non-relative module name 'someModule'.", + "'paths' option is specified, looking for a pattern to match module name 'someModule'.", + "'baseUrl' option is set to 'tests/cases/compiler/src', using this value to resolve non-relative module name 'someModule'.", + "Resolving module name 'someModule' relative to base url 'tests/cases/compiler/src' - 'tests/cases/compiler/src/someModule'.", + "Loading module as file / folder, candidate module location 'tests/cases/compiler/src/someModule', target file type 'JavaScript'.", + "File 'tests/cases/compiler/src/someModule.js' does not exist.", + "File 'tests/cases/compiler/src/someModule.jsx' does not exist.", + "Directory 'tests/cases/compiler/src/someModule' does not exist, skipping all lookups in it.", + "Loading module 'someModule' from 'node_modules' folder, target file type 'JavaScript'.", + "Directory 'tests/cases/compiler/src/node_modules' does not exist, skipping all lookups in it.", + "Directory 'tests/cases/compiler/node_modules' does not exist, skipping all lookups in it.", + "Directory 'tests/cases/node_modules' does not exist, skipping all lookups in it.", + "Directory 'tests/node_modules' does not exist, skipping all lookups in it.", + "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name 'someModule' was not resolved. ========" +] \ No newline at end of file diff --git a/tests/cases/compiler/pathsValidation4.ts b/tests/cases/compiler/pathsValidation4.ts new file mode 100644 index 00000000000..fc9568c09e3 --- /dev/null +++ b/tests/cases/compiler/pathsValidation4.ts @@ -0,0 +1,16 @@ +// @noTypesAndSymbols: true +// @filename: tsconfig.json +{ + "compilerOptions": { + "traceResolution": true, + "baseUrl": "./src", + "paths": { + "@interface/**/*" : ["./src/interface/*"], + "@service/**/*": ["./src/service/**/*"], + "@controller/*": ["controller/*"], + } + } +} + +// @filename: src/main.ts +import 'someModule'; \ No newline at end of file From ca4486a06557056e7a16680b3b9c1331cad10c16 Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Wed, 20 Nov 2019 14:56:28 -0800 Subject: [PATCH 31/50] Update user baselines (#35218) --- .../reference/docker/office-ui-fabric.log | 1 - tests/baselines/reference/docker/vscode.log | 141 +++++++++++++++++- tests/baselines/reference/user/axios-src.log | 12 +- .../user/chrome-devtools-frontend.log | 15 +- tests/baselines/reference/user/puppeteer.log | 2 +- 5 files changed, 153 insertions(+), 18 deletions(-) diff --git a/tests/baselines/reference/docker/office-ui-fabric.log b/tests/baselines/reference/docker/office-ui-fabric.log index 57100adb972..2e1eaaaaf90 100644 --- a/tests/baselines/reference/docker/office-ui-fabric.log +++ b/tests/baselines/reference/docker/office-ui-fabric.log @@ -144,7 +144,6 @@ Standard output: @uifabric/merge-styles: PASS src/Stylesheet.test.ts @uifabric/merge-styles: PASS src/extractStyleParts.test.ts @uifabric/merge-styles: PASS src/concatStyleSetsWithProps.test.ts -@uifabric/merge-styles: PASS src/fontFace.test.ts @uifabric/merge-styles: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/merge-styles/lib/index.d.ts' @uifabric/merge-styles: Done in ?s. @uifabric/jest-serializer-merge-styles: yarn run vX.X.X diff --git a/tests/baselines/reference/docker/vscode.log b/tests/baselines/reference/docker/vscode.log index 45c7728bdb5..64208c0db8b 100644 --- a/tests/baselines/reference/docker/vscode.log +++ b/tests/baselines/reference/docker/vscode.log @@ -1,11 +1,148 @@ -Exit Code: 0 +Exit Code: 1 Standard output: yarn run vX.X.X $ gulp compile --max_old_space_size=4095 [XX:XX:XX] Node flags detected: --max_old_space_size=4095 [XX:XX:XX] Using gulpfile /vscode/gulpfile.js -Done in ?s. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.ts(229,3): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.ts(230,3): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts(550,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.ts(646,5): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/preferences/browser/keybindingsEditor.ts(413,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/preferences/browser/keybindingWidgets.ts(191,5): Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/feedback/browser/feedback.ts(280,5): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/feedback/browser/feedback.ts(285,5): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.ts(70,3): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/debug/browser/debugHover.ts(110,5): Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts(520,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts(592,3): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts(798,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts(176,3): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/quickinput/quickInput.ts(1545,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/notifications/notificationsToasts.ts(528,4): Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/notifications/notificationsList.ts(224,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/notifications/notificationsCenter.ts(239,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts(984,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts(997,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts(270,5): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts(272,5): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts(414,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/base/browser/ui/splitview/paneview.ts(233,3): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/base/browser/ui/menu/menu.ts(600,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/base/browser/ui/inputbox/inputBox.ts(480,5): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/base/browser/ui/checkbox/checkbox.ts(223,3): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/base/browser/ui/button/button.ts(135,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/compositePart.ts(414,5): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/compositeBarActions.ts(171,5): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/compositeBarActions.ts(182,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/editor/contrib/rename/renameInputField.ts(93,3): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/base/browser/ui/checkbox/checkbox.ts(223,3): Type 'string | null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.ts(229,3): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.ts(230,3): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts(550,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.ts(646,5): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/preferences/browser/keybindingsEditor.ts(413,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/preferences/browser/keybindingWidgets.ts(191,5): Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/feedback/browser/feedback.ts(280,5): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/feedback/browser/feedback.ts(285,5): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.ts(70,3): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/debug/browser/debugHover.ts(110,5): Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts(520,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts(592,3): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts(798,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts(176,3): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/quickinput/quickInput.ts(1545,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/notifications/notificationsToasts.ts(528,4): Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/notifications/notificationsList.ts(224,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/notifications/notificationsCenter.ts(239,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts(984,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts(997,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts(270,5): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts(272,5): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts(414,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/base/browser/ui/splitview/paneview.ts(233,3): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/base/browser/ui/menu/menu.ts(600,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/base/browser/ui/inputbox/inputBox.ts(480,5): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/base/browser/ui/checkbox/checkbox.ts(223,3): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/base/browser/ui/button/button.ts(135,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/compositePart.ts(414,5): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/compositeBarActions.ts(171,5): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/compositeBarActions.ts(182,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/editor/contrib/rename/renameInputField.ts(93,3): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/base/browser/ui/checkbox/checkbox.ts(223,3): Type 'string | null' is not assignable to type 'string'. +info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. Standard error: +[XX:XX:XX] 'compile' errored after +[XX:XX:XX] Error: Found 32 errors + at Stream. (/vscode/build/lib/reporter.js:74:29) + at _end (/vscode/node_modules/through/index.js:65:9) + at Stream.stream.end (/vscode/node_modules/through/index.js:74:5) + at Stream.onend (internal/streams/legacy.js:42:10) + at Stream.emit (events.js:203:15) + at Stream.EventEmitter.emit (domain.js:466:23) + at drain (/vscode/node_modules/through/index.js:34:23) + at Stream.stream.queue.stream.push (/vscode/node_modules/through/index.js:45:5) + at Stream.end (/vscode/node_modules/through/index.js:15:35) + at _end (/vscode/node_modules/through/index.js:65:9) +error Command failed with exit code 1. diff --git a/tests/baselines/reference/user/axios-src.log b/tests/baselines/reference/user/axios-src.log index b9c1388292a..dd75a7d1b97 100644 --- a/tests/baselines/reference/user/axios-src.log +++ b/tests/baselines/reference/user/axios-src.log @@ -1,10 +1,10 @@ Exit Code: 1 Standard output: lib/adapters/http.js(13,19): error TS2732: Cannot find module './../../package.json'. Consider using '--resolveJsonModule' to import module with '.json' extension -lib/adapters/http.js(84,22): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. - Type 'undefined' is not assignable to type 'string'. -lib/adapters/http.js(124,17): error TS2532: Object is possibly 'undefined'. -lib/adapters/http.js(124,40): error TS2532: Object is possibly 'undefined'. +lib/adapters/http.js(84,22): error TS2345: Argument of type 'string | null' is not assignable to parameter of type 'string'. + Type 'null' is not assignable to type 'string'. +lib/adapters/http.js(124,17): error TS2531: Object is possibly 'null'. +lib/adapters/http.js(124,40): error TS2531: Object is possibly 'null'. lib/adapters/http.js(223,23): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | undefined'. lib/adapters/http.js(229,44): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | undefined'. lib/adapters/http.js(235,13): error TS2322: Type 'string' is not assignable to type 'Buffer'. @@ -45,8 +45,8 @@ lib/core/enhanceError.js(37,20): error TS2339: Property 'config' does not exist lib/core/enhanceError.js(38,18): error TS2339: Property 'code' does not exist on type 'Error'. lib/core/settle.js(20,7): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | undefined'. lib/helpers/cookies.js(16,56): error TS2551: Property 'toGMTString' does not exist on type 'Date'. Did you mean 'toUTCString'? -lib/utils.js(248,20): error TS8029: JSDoc '@param' tag has name 'obj1', but there is no parameter with that name. It would match 'arguments' if it had an array type. -lib/utils.js(272,20): error TS8029: JSDoc '@param' tag has name 'obj1', but there is no parameter with that name. It would match 'arguments' if it had an array type. +lib/utils.js(258,20): error TS8029: JSDoc '@param' tag has name 'obj1', but there is no parameter with that name. It would match 'arguments' if it had an array type. +lib/utils.js(282,20): error TS8029: JSDoc '@param' tag has name 'obj1', but there is no parameter with that name. It would match 'arguments' if it had an array type. diff --git a/tests/baselines/reference/user/chrome-devtools-frontend.log b/tests/baselines/reference/user/chrome-devtools-frontend.log index c45cbcc183b..fa10910d039 100644 --- a/tests/baselines/reference/user/chrome-devtools-frontend.log +++ b/tests/baselines/reference/user/chrome-devtools-frontend.log @@ -1,7 +1,7 @@ Exit Code: 1 Standard output: ../../../../built/local/lib.es5.d.ts(1433,11): error TS2300: Duplicate identifier 'ArrayLike'. -../../../../node_modules/@types/node/globals.d.ts(231,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'module' must be of type '{}', but here has type 'NodeModule'. +../../../../node_modules/@types/node/globals.d.ts(235,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'module' must be of type '{}', but here has type 'NodeModule'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(43,8): error TS2339: Property '_importScriptPathPrefix' does not exist on type 'Window & typeof globalThis'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(77,16): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/Runtime.js(78,16): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. @@ -23,7 +23,7 @@ node_modules/chrome-devtools-frontend/front_end/Runtime.js(705,5): error TS2322: node_modules/chrome-devtools-frontend/front_end/Runtime.js(715,7): error TS2322: Type 'Promise' is not assignable to type 'Promise'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(729,7): error TS2322: Type 'Promise' is not assignable to type 'Promise'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(746,5): error TS2322: Type 'Window | {}' is not assignable to type 'Window'. - Type '{}' is missing the following properties from type 'Window': applicationCache, caches, clientInformation, closed, and 229 more. + Type '{}' is missing the following properties from type 'Window': applicationCache, caches, clientInformation, closed, and 225 more. node_modules/chrome-devtools-frontend/front_end/Runtime.js(1083,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. node_modules/chrome-devtools-frontend/front_end/Runtime.js(1088,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. node_modules/chrome-devtools-frontend/front_end/Tests.js(107,5): error TS2322: Type 'Timeout' is not assignable to type 'number'. @@ -143,7 +143,7 @@ node_modules/chrome-devtools-frontend/front_end/accessibility/AXBreadcrumbsPane. node_modules/chrome-devtools-frontend/front_end/accessibility/AXBreadcrumbsPane.js(393,50): error TS2345: Argument of type '-1' is not assignable to parameter of type 'string'. node_modules/chrome-devtools-frontend/front_end/accessibility/AXBreadcrumbsPane.js(396,27): error TS2339: Property 'focus' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/accessibility/AXBreadcrumbsPane.js(447,26): error TS2339: Property 'breadcrumb' does not exist on type 'ChildNode'. -node_modules/chrome-devtools-frontend/front_end/accessibility/AXBreadcrumbsPane.js(457,30): error TS2339: Property 'breadcrumb' does not exist on type 'Node'. +node_modules/chrome-devtools-frontend/front_end/accessibility/AXBreadcrumbsPane.js(457,30): error TS2339: Property 'breadcrumb' does not exist on type 'ChildNode'. node_modules/chrome-devtools-frontend/front_end/accessibility/AXBreadcrumbsPane.js(473,24): error TS2694: Namespace 'Protocol' has no exported member 'Accessibility'. node_modules/chrome-devtools-frontend/front_end/accessibility/AXBreadcrumbsPane.js(481,17): error TS2339: Property 'setTextContentTruncatedIfNeeded' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/accessibility/AXBreadcrumbsPane.js(488,38): error TS2554: Expected 2 arguments, but got 1. @@ -3867,7 +3867,7 @@ node_modules/chrome-devtools-frontend/front_end/console/ConsoleSidebar.js(107,9) node_modules/chrome-devtools-frontend/front_end/console/ConsoleSidebar.js(111,9): error TS2339: Property 'ConsoleSidebar' does not exist on type '{ new (): Console; prototype: Console; }'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleSidebar.js(119,47): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleSidebar.js(122,25): error TS2345: Argument of type 'Element' is not assignable to parameter of type 'Icon'. - Type 'Element' is missing the following properties from type 'Icon': createdCallback, _descriptor, _spriteSheet, _iconType, and 117 more. + Type 'Element' is missing the following properties from type 'Icon': createdCallback, _descriptor, _spriteSheet, _iconType, and 113 more. node_modules/chrome-devtools-frontend/front_end/console/ConsoleSidebar.js(133,9): error TS2339: Property 'ConsoleSidebar' does not exist on type '{ new (): Console; prototype: Console; }'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleSidebar.js(147,27): error TS2322: Type 'Element' is not assignable to type 'Icon'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleSidebar.js(177,67): error TS2555: Expected at least 2 arguments, but got 1. @@ -4990,7 +4990,7 @@ node_modules/chrome-devtools-frontend/front_end/dom_extension/DOMExtension.js(74 node_modules/chrome-devtools-frontend/front_end/dom_extension/DOMExtension.js(745,48): error TS2339: Property 'pageX' does not exist on type 'Event'. node_modules/chrome-devtools-frontend/front_end/dom_extension/DOMExtension.js(745,60): error TS2339: Property 'pageY' does not exist on type 'Event'. node_modules/chrome-devtools-frontend/front_end/dom_extension/DOMExtension.js(753,20): error TS2339: Property 'deepElementFromPoint' does not exist on type 'Document'. -node_modules/chrome-devtools-frontend/front_end/dom_extension/DOMExtension.js(761,5): error TS2740: Type 'ShadowRoot' is missing the following properties from type 'Document': URL, alinkColor, all, anchors, and 174 more. +node_modules/chrome-devtools-frontend/front_end/dom_extension/DOMExtension.js(761,5): error TS2740: Type 'ShadowRoot' is missing the following properties from type 'Document': URL, alinkColor, all, anchors, and 170 more. node_modules/chrome-devtools-frontend/front_end/dom_extension/DOMExtension.js(766,28): error TS2339: Property 'deepElementFromPoint' does not exist on type 'DocumentFragment'. node_modules/chrome-devtools-frontend/front_end/dom_extension/DOMExtension.js(766,70): error TS2339: Property 'deepElementFromPoint' does not exist on type 'Document'. node_modules/chrome-devtools-frontend/front_end/dom_extension/DOMExtension.js(771,20): error TS2339: Property 'deepActiveElement' does not exist on type 'Document'. @@ -5482,11 +5482,10 @@ node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(10 node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1056,29): error TS2339: Property '_section' does not exist on type 'ChildNode'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1073,24): error TS2339: Property '_section' does not exist on type 'ChildNode'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1074,29): error TS2339: Property '_section' does not exist on type 'ChildNode'. -node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1075,7): error TS2739: Type 'Node' is missing the following properties from type 'ChildNode': after, before, remove, replaceWith node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1087,7): error TS2740: Type 'ChildNode' is missing the following properties from type 'Element': assignedSlot, attributes, classList, className, and 68 more. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1088,38): error TS2339: Property '_section' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1090,36): error TS2339: Property '_section' does not exist on type 'Element'. -node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1099,7): error TS2740: Type 'Node' is missing the following properties from type 'Element': assignedSlot, attributes, classList, className, and 72 more. +node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1099,7): error TS2322: Type 'ChildNode' is not assignable to type 'Element'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1100,38): error TS2339: Property '_section' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1102,36): error TS2339: Property '_section' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1232,7): error TS2322: Type 'StylePropertiesSection' is not assignable to type 'this'. @@ -11183,7 +11182,7 @@ node_modules/chrome-devtools-frontend/front_end/timeline/TimelineEventOverview.j node_modules/chrome-devtools-frontend/front_end/timeline/TimelineEventOverview.js(248,81): error TS2339: Property '_overviewIndex' does not exist on type 'TimelineCategory'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineEventOverview.js(384,7): error TS2322: Type 'Promise HTMLImageElement)>' is not assignable to type 'Promise'. Type 'HTMLImageElement | (new (width?: number, height?: number) => HTMLImageElement)' is not assignable to type 'HTMLImageElement'. - Type 'new (width?: number, height?: number) => HTMLImageElement' is missing the following properties from type 'HTMLImageElement': align, alt, border, complete, and 261 more. + Type 'new (width?: number, height?: number) => HTMLImageElement' is missing the following properties from type 'HTMLImageElement': align, alt, border, complete, and 257 more. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineEventOverview.js(457,17): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineEventOverview.js(483,31): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineEventOverview.js(524,28): error TS2339: Property 'peekLast' does not exist on type 'TimelineFrame[]'. diff --git a/tests/baselines/reference/user/puppeteer.log b/tests/baselines/reference/user/puppeteer.log index f368b268259..dd1df5ba416 100644 --- a/tests/baselines/reference/user/puppeteer.log +++ b/tests/baselines/reference/user/puppeteer.log @@ -55,7 +55,7 @@ lib/Page.js(94,33): error TS2345: Argument of type 'CDPSession' is not assignabl lib/Page.js(147,15): error TS2503: Cannot find namespace 'Protocol'. lib/Page.js(220,15): error TS2503: Cannot find namespace 'Protocol'. lib/Page.js(388,20): error TS2503: Cannot find namespace 'Protocol'. -lib/Page.js(451,7): error TS2740: Type '(...args: any[]) => Promise' is missing the following properties from type 'Window': applicationCache, caches, clientInformation, closed, and 227 more. +lib/Page.js(451,7): error TS2740: Type '(...args: any[]) => Promise' is missing the following properties from type 'Window': applicationCache, caches, clientInformation, closed, and 223 more. lib/Page.js(461,9): error TS2349: This expression is not callable. Type 'Window' has no call signatures. lib/Page.js(497,15): error TS2503: Cannot find namespace 'Protocol'. From 77ec756960eeaa2931a05cc4f6a3a66e3578320d Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Wed, 20 Nov 2019 09:34:17 -0500 Subject: [PATCH 32/50] Make `getSourceFileToImportFromResolved` prefer files in `program.getSourceFiles()` Fixes #30550 --- src/services/getEditsForFileRename.ts | 19 ++++++++++++++----- .../getEditsForFileRename_js_simple.ts | 17 +++++++++++++++++ 2 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 tests/cases/fourslash/getEditsForFileRename_js_simple.ts diff --git a/src/services/getEditsForFileRename.ts b/src/services/getEditsForFileRename.ts index 9ab8410f51a..ffce22e3a30 100644 --- a/src/services/getEditsForFileRename.ts +++ b/src/services/getEditsForFileRename.ts @@ -151,7 +151,8 @@ namespace ts { const toImport = oldFromNew !== undefined // If we're at the new location (file was already renamed), need to redo module resolution starting from the old location. // TODO:GH#18217 - ? getSourceFileToImportFromResolved(resolveModuleName(importLiteral.text, oldImportFromPath, program.getCompilerOptions(), host as ModuleResolutionHost), oldToNew) + ? getSourceFileToImportFromResolved(resolveModuleName(importLiteral.text, oldImportFromPath, program.getCompilerOptions(), host as ModuleResolutionHost), + oldToNew, allFiles) : getSourceFileToImport(importedModuleSymbol, importLiteral, sourceFile, program, host, oldToNew); // Need an update if the imported file moved, or the importing file moved and was using a relative path. @@ -192,11 +193,11 @@ namespace ts { const resolved = host.resolveModuleNames ? host.getResolvedModuleWithFailedLookupLocationsFromCache && host.getResolvedModuleWithFailedLookupLocationsFromCache(importLiteral.text, importingSourceFile.fileName) : program.getResolvedModuleWithFailedLookupLocationsFromCache(importLiteral.text, importingSourceFile.fileName); - return getSourceFileToImportFromResolved(resolved, oldToNew); + return getSourceFileToImportFromResolved(resolved, oldToNew, program.getSourceFiles()); } } - function getSourceFileToImportFromResolved(resolved: ResolvedModuleWithFailedLookupLocations | undefined, oldToNew: PathUpdater): ToImport | undefined { + function getSourceFileToImportFromResolved(resolved: ResolvedModuleWithFailedLookupLocations | undefined, oldToNew: PathUpdater, sourceFiles: readonly SourceFile[]): ToImport | undefined { // Search through all locations looking for a moved file, and only then test already existing files. // This is because if `a.ts` is compiled to `a.js` and `a.ts` is moved, we don't want to resolve anything to `a.js`, but to `a.ts`'s new location. if (!resolved) return undefined; @@ -207,13 +208,21 @@ namespace ts { if (result) return result; } - // Then failed lookups except package.json since we dont want to touch them (only included ts/js files) - const result = forEach(resolved.failedLookupLocations, tryChangeWithIgnoringPackageJson); + // Then failed lookups that are in the list of sources + const result = forEach(resolved.failedLookupLocations, tryChangeWithIgnoringPackageJsonExisting) + // Then failed lookups except package.json since we dont want to touch them (only included ts/js files) + || forEach(resolved.failedLookupLocations, tryChangeWithIgnoringPackageJson); if (result) return result; // If nothing changed, then result is resolved module file thats not updated return resolved.resolvedModule && { newFileName: resolved.resolvedModule.resolvedFileName, updated: false }; + function tryChangeWithIgnoringPackageJsonExisting(oldFileName: string) { + const newFileName = oldToNew(oldFileName); + return newFileName && find(sourceFiles, src => src.fileName === newFileName) + ? tryChangeWithIgnoringPackageJson(oldFileName) : undefined; + } + function tryChangeWithIgnoringPackageJson(oldFileName: string) { return !endsWith(oldFileName, "/package.json") ? tryChange(oldFileName) : undefined; } diff --git a/tests/cases/fourslash/getEditsForFileRename_js_simple.ts b/tests/cases/fourslash/getEditsForFileRename_js_simple.ts new file mode 100644 index 00000000000..bd962fce7fb --- /dev/null +++ b/tests/cases/fourslash/getEditsForFileRename_js_simple.ts @@ -0,0 +1,17 @@ +/// + +// @allowJs: true + +// @Filename: /a.js +////import b from "./b.js"; + +// @Filename: /b.js +////module.exports = 1; + +verify.getEditsForFileRename({ + oldPath: "/b.js", + newPath: "/c.js", + newFileContents: { + "/a.js": `import b from "./c.js";`, + }, +}); From 0d993ac59292bd5323115f60bf934bb578995d92 Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Wed, 20 Nov 2019 15:55:13 -0800 Subject: [PATCH 33/50] Update user baselines (#35251) --- tests/baselines/reference/docker/office-ui-fabric.log | 1 + tests/baselines/reference/docker/vscode.log | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/baselines/reference/docker/office-ui-fabric.log b/tests/baselines/reference/docker/office-ui-fabric.log index 2e1eaaaaf90..57100adb972 100644 --- a/tests/baselines/reference/docker/office-ui-fabric.log +++ b/tests/baselines/reference/docker/office-ui-fabric.log @@ -144,6 +144,7 @@ Standard output: @uifabric/merge-styles: PASS src/Stylesheet.test.ts @uifabric/merge-styles: PASS src/extractStyleParts.test.ts @uifabric/merge-styles: PASS src/concatStyleSetsWithProps.test.ts +@uifabric/merge-styles: PASS src/fontFace.test.ts @uifabric/merge-styles: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/merge-styles/lib/index.d.ts' @uifabric/merge-styles: Done in ?s. @uifabric/jest-serializer-merge-styles: yarn run vX.X.X diff --git a/tests/baselines/reference/docker/vscode.log b/tests/baselines/reference/docker/vscode.log index 64208c0db8b..79e7ba208bc 100644 --- a/tests/baselines/reference/docker/vscode.log +++ b/tests/baselines/reference/docker/vscode.log @@ -41,9 +41,9 @@ $ gulp compile --max_old_space_size=4095 Type 'null' is not assignable to type 'string'. [XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts(997,4): Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. -[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts(270,5): Type 'string | null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts(283,5): Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. -[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts(272,5): Type 'string | null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts(285,5): Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. [XX:XX:XX] Error: /vscode/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts(414,4): Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. @@ -103,9 +103,9 @@ $ gulp compile --max_old_space_size=4095 Type 'null' is not assignable to type 'string'. [XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts(997,4): Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. -[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts(270,5): Type 'string | null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts(283,5): Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. -[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts(272,5): Type 'string | null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts(285,5): Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. [XX:XX:XX] Error: /vscode/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts(414,4): Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. From a6d44aa52eeeea5b6978e79734c3965a4323e84f Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Thu, 21 Nov 2019 10:57:55 -0800 Subject: [PATCH 34/50] Map stale empty object type in union into fresh empty object type after spread is complete (#34839) * Map stale empty object type in union into fresh empty object type after spread is complete * Accept minor baseline diff --- src/compiler/checker.ts | 7 +- tests/baselines/reference/objectSpread.types | 6 +- ...ObjectLiteralAssignableToIndexSignature.js | 37 +++++++ ...tLiteralAssignableToIndexSignature.symbols | 57 +++++++++++ ...ectLiteralAssignableToIndexSignature.types | 97 +++++++++++++++++++ ...ObjectLiteralAssignableToIndexSignature.ts | 14 +++ 6 files changed, 214 insertions(+), 4 deletions(-) create mode 100644 tests/baselines/reference/spreadOfObjectLiteralAssignableToIndexSignature.js create mode 100644 tests/baselines/reference/spreadOfObjectLiteralAssignableToIndexSignature.symbols create mode 100644 tests/baselines/reference/spreadOfObjectLiteralAssignableToIndexSignature.types create mode 100644 tests/cases/compiler/spreadOfObjectLiteralAssignableToIndexSignature.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index e7befc3a4dc..eff003dbcd2 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -22090,8 +22090,13 @@ namespace ts { if (spread !== emptyObjectType) { if (propertiesArray.length > 0) { spread = getSpreadType(spread, createObjectLiteralType(), node.symbol, objectFlags, inConstContext); + propertiesArray = []; + propertiesTable = createSymbolTable(); + hasComputedStringProperty = false; + hasComputedNumberProperty = false; } - return spread; + // remap the raw emptyObjectType fed in at the top into a fresh empty object literal type, unique to this use site + return mapType(spread, t => t === emptyObjectType ? createObjectLiteralType() : t); } return createObjectLiteralType(); diff --git a/tests/baselines/reference/objectSpread.types b/tests/baselines/reference/objectSpread.types index 827dd76115b..aa083e5d9f1 100644 --- a/tests/baselines/reference/objectSpread.types +++ b/tests/baselines/reference/objectSpread.types @@ -293,7 +293,7 @@ function conditionalSpreadBoolean(b: boolean) : { x: number, y: number } { } let o2 = { ...b && { x: 21 }} >o2 : {} ->{ ...b && { x: 21 }} : {} | { x: number; } +>{ ...b && { x: 21 }} : { x: number; } | {} >b && { x: 21 } : false | { x: number; } >b : boolean >{ x: 21 } : { x: number; } @@ -334,7 +334,7 @@ function conditionalSpreadNumber(nt: number): { x: number, y: number } { } let o2 = { ...nt && { x: nt }} >o2 : {} ->{ ...nt && { x: nt }} : {} | { x: number; } +>{ ...nt && { x: nt }} : { x: number; } | {} >nt && { x: nt } : 0 | { x: number; } >nt : number >{ x: nt } : { x: number; } @@ -375,7 +375,7 @@ function conditionalSpreadString(st: string): { x: string, y: number } { } let o2 = { ...st && { x: st }} >o2 : {} ->{ ...st && { x: st }} : {} | { x: string; } +>{ ...st && { x: st }} : { x: string; } | {} >st && { x: st } : "" | { x: string; } >st : string >{ x: st } : { x: string; } diff --git a/tests/baselines/reference/spreadOfObjectLiteralAssignableToIndexSignature.js b/tests/baselines/reference/spreadOfObjectLiteralAssignableToIndexSignature.js new file mode 100644 index 00000000000..0dfe09cf753 --- /dev/null +++ b/tests/baselines/reference/spreadOfObjectLiteralAssignableToIndexSignature.js @@ -0,0 +1,37 @@ +//// [spreadOfObjectLiteralAssignableToIndexSignature.ts] +const foo: Record = {} // OK + +interface RecordOfRecords extends Record {} +const recordOfRecords: RecordOfRecords = {} +recordOfRecords.propA = {...(foo !== undefined ? {foo} : {})} // OK +recordOfRecords.propB = {...(foo && {foo})} // OK +recordOfRecords.propC = {...(foo !== undefined && {foo})} // error'd in 3.7 beta, should be OK + +interface RecordOfRecordsOrEmpty extends Record {} +const recordsOfRecordsOrEmpty: RecordOfRecordsOrEmpty = {} +recordsOfRecordsOrEmpty.propA = {...(foo !== undefined ? {foo} : {})} // OK +recordsOfRecordsOrEmpty.propB = {...(foo && {foo})} // OK +recordsOfRecordsOrEmpty.propC = {...(foo !== undefined && {foo})} // OK + +//// [spreadOfObjectLiteralAssignableToIndexSignature.js] +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var foo = {}; // OK +var recordOfRecords = {}; +recordOfRecords.propA = __assign({}, (foo !== undefined ? { foo: foo } : {})); // OK +recordOfRecords.propB = __assign({}, (foo && { foo: foo })); // OK +recordOfRecords.propC = __assign({}, (foo !== undefined && { foo: foo })); // error'd in 3.7 beta, should be OK +var recordsOfRecordsOrEmpty = {}; +recordsOfRecordsOrEmpty.propA = __assign({}, (foo !== undefined ? { foo: foo } : {})); // OK +recordsOfRecordsOrEmpty.propB = __assign({}, (foo && { foo: foo })); // OK +recordsOfRecordsOrEmpty.propC = __assign({}, (foo !== undefined && { foo: foo })); // OK diff --git a/tests/baselines/reference/spreadOfObjectLiteralAssignableToIndexSignature.symbols b/tests/baselines/reference/spreadOfObjectLiteralAssignableToIndexSignature.symbols new file mode 100644 index 00000000000..64881726d14 --- /dev/null +++ b/tests/baselines/reference/spreadOfObjectLiteralAssignableToIndexSignature.symbols @@ -0,0 +1,57 @@ +=== tests/cases/compiler/spreadOfObjectLiteralAssignableToIndexSignature.ts === +const foo: Record = {} // OK +>foo : Symbol(foo, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 0, 5)) +>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) + +interface RecordOfRecords extends Record {} +>RecordOfRecords : Symbol(RecordOfRecords, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 0, 36)) +>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) +>RecordOfRecords : Symbol(RecordOfRecords, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 0, 36)) + +const recordOfRecords: RecordOfRecords = {} +>recordOfRecords : Symbol(recordOfRecords, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 3, 5)) +>RecordOfRecords : Symbol(RecordOfRecords, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 0, 36)) + +recordOfRecords.propA = {...(foo !== undefined ? {foo} : {})} // OK +>recordOfRecords : Symbol(recordOfRecords, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 3, 5)) +>foo : Symbol(foo, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 0, 5)) +>undefined : Symbol(undefined) +>foo : Symbol(foo, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 4, 50)) + +recordOfRecords.propB = {...(foo && {foo})} // OK +>recordOfRecords : Symbol(recordOfRecords, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 3, 5)) +>foo : Symbol(foo, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 0, 5)) +>foo : Symbol(foo, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 5, 37)) + +recordOfRecords.propC = {...(foo !== undefined && {foo})} // error'd in 3.7 beta, should be OK +>recordOfRecords : Symbol(recordOfRecords, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 3, 5)) +>foo : Symbol(foo, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 0, 5)) +>undefined : Symbol(undefined) +>foo : Symbol(foo, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 6, 51)) + +interface RecordOfRecordsOrEmpty extends Record {} +>RecordOfRecordsOrEmpty : Symbol(RecordOfRecordsOrEmpty, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 6, 57)) +>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) +>RecordOfRecordsOrEmpty : Symbol(RecordOfRecordsOrEmpty, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 6, 57)) + +const recordsOfRecordsOrEmpty: RecordOfRecordsOrEmpty = {} +>recordsOfRecordsOrEmpty : Symbol(recordsOfRecordsOrEmpty, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 9, 5)) +>RecordOfRecordsOrEmpty : Symbol(RecordOfRecordsOrEmpty, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 6, 57)) + +recordsOfRecordsOrEmpty.propA = {...(foo !== undefined ? {foo} : {})} // OK +>recordsOfRecordsOrEmpty : Symbol(recordsOfRecordsOrEmpty, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 9, 5)) +>foo : Symbol(foo, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 0, 5)) +>undefined : Symbol(undefined) +>foo : Symbol(foo, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 10, 58)) + +recordsOfRecordsOrEmpty.propB = {...(foo && {foo})} // OK +>recordsOfRecordsOrEmpty : Symbol(recordsOfRecordsOrEmpty, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 9, 5)) +>foo : Symbol(foo, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 0, 5)) +>foo : Symbol(foo, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 11, 45)) + +recordsOfRecordsOrEmpty.propC = {...(foo !== undefined && {foo})} // OK +>recordsOfRecordsOrEmpty : Symbol(recordsOfRecordsOrEmpty, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 9, 5)) +>foo : Symbol(foo, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 0, 5)) +>undefined : Symbol(undefined) +>foo : Symbol(foo, Decl(spreadOfObjectLiteralAssignableToIndexSignature.ts, 12, 59)) + diff --git a/tests/baselines/reference/spreadOfObjectLiteralAssignableToIndexSignature.types b/tests/baselines/reference/spreadOfObjectLiteralAssignableToIndexSignature.types new file mode 100644 index 00000000000..672170acbcd --- /dev/null +++ b/tests/baselines/reference/spreadOfObjectLiteralAssignableToIndexSignature.types @@ -0,0 +1,97 @@ +=== tests/cases/compiler/spreadOfObjectLiteralAssignableToIndexSignature.ts === +const foo: Record = {} // OK +>foo : Record +>{} : {} + +interface RecordOfRecords extends Record {} +const recordOfRecords: RecordOfRecords = {} +>recordOfRecords : RecordOfRecords +>{} : {} + +recordOfRecords.propA = {...(foo !== undefined ? {foo} : {})} // OK +>recordOfRecords.propA = {...(foo !== undefined ? {foo} : {})} : { foo: Record; } | {} +>recordOfRecords.propA : RecordOfRecords +>recordOfRecords : RecordOfRecords +>propA : RecordOfRecords +>{...(foo !== undefined ? {foo} : {})} : { foo: Record; } | {} +>(foo !== undefined ? {foo} : {}) : { foo: Record; } | {} +>foo !== undefined ? {foo} : {} : { foo: Record; } | {} +>foo !== undefined : boolean +>foo : Record +>undefined : undefined +>{foo} : { foo: Record; } +>foo : Record +>{} : {} + +recordOfRecords.propB = {...(foo && {foo})} // OK +>recordOfRecords.propB = {...(foo && {foo})} : { foo: Record; } +>recordOfRecords.propB : RecordOfRecords +>recordOfRecords : RecordOfRecords +>propB : RecordOfRecords +>{...(foo && {foo})} : { foo: Record; } +>(foo && {foo}) : { foo: Record; } +>foo && {foo} : { foo: Record; } +>foo : Record +>{foo} : { foo: Record; } +>foo : Record + +recordOfRecords.propC = {...(foo !== undefined && {foo})} // error'd in 3.7 beta, should be OK +>recordOfRecords.propC = {...(foo !== undefined && {foo})} : { foo: Record; } | {} +>recordOfRecords.propC : RecordOfRecords +>recordOfRecords : RecordOfRecords +>propC : RecordOfRecords +>{...(foo !== undefined && {foo})} : { foo: Record; } | {} +>(foo !== undefined && {foo}) : false | { foo: Record; } +>foo !== undefined && {foo} : false | { foo: Record; } +>foo !== undefined : boolean +>foo : Record +>undefined : undefined +>{foo} : { foo: Record; } +>foo : Record + +interface RecordOfRecordsOrEmpty extends Record {} +const recordsOfRecordsOrEmpty: RecordOfRecordsOrEmpty = {} +>recordsOfRecordsOrEmpty : RecordOfRecordsOrEmpty +>{} : {} + +recordsOfRecordsOrEmpty.propA = {...(foo !== undefined ? {foo} : {})} // OK +>recordsOfRecordsOrEmpty.propA = {...(foo !== undefined ? {foo} : {})} : { foo: Record; } | {} +>recordsOfRecordsOrEmpty.propA : {} | RecordOfRecordsOrEmpty +>recordsOfRecordsOrEmpty : RecordOfRecordsOrEmpty +>propA : {} | RecordOfRecordsOrEmpty +>{...(foo !== undefined ? {foo} : {})} : { foo: Record; } | {} +>(foo !== undefined ? {foo} : {}) : { foo: Record; } | {} +>foo !== undefined ? {foo} : {} : { foo: Record; } | {} +>foo !== undefined : boolean +>foo : Record +>undefined : undefined +>{foo} : { foo: Record; } +>foo : Record +>{} : {} + +recordsOfRecordsOrEmpty.propB = {...(foo && {foo})} // OK +>recordsOfRecordsOrEmpty.propB = {...(foo && {foo})} : { foo: Record; } +>recordsOfRecordsOrEmpty.propB : {} | RecordOfRecordsOrEmpty +>recordsOfRecordsOrEmpty : RecordOfRecordsOrEmpty +>propB : {} | RecordOfRecordsOrEmpty +>{...(foo && {foo})} : { foo: Record; } +>(foo && {foo}) : { foo: Record; } +>foo && {foo} : { foo: Record; } +>foo : Record +>{foo} : { foo: Record; } +>foo : Record + +recordsOfRecordsOrEmpty.propC = {...(foo !== undefined && {foo})} // OK +>recordsOfRecordsOrEmpty.propC = {...(foo !== undefined && {foo})} : { foo: Record; } | {} +>recordsOfRecordsOrEmpty.propC : {} | RecordOfRecordsOrEmpty +>recordsOfRecordsOrEmpty : RecordOfRecordsOrEmpty +>propC : {} | RecordOfRecordsOrEmpty +>{...(foo !== undefined && {foo})} : { foo: Record; } | {} +>(foo !== undefined && {foo}) : false | { foo: Record; } +>foo !== undefined && {foo} : false | { foo: Record; } +>foo !== undefined : boolean +>foo : Record +>undefined : undefined +>{foo} : { foo: Record; } +>foo : Record + diff --git a/tests/cases/compiler/spreadOfObjectLiteralAssignableToIndexSignature.ts b/tests/cases/compiler/spreadOfObjectLiteralAssignableToIndexSignature.ts new file mode 100644 index 00000000000..7fa245f93ec --- /dev/null +++ b/tests/cases/compiler/spreadOfObjectLiteralAssignableToIndexSignature.ts @@ -0,0 +1,14 @@ +// @strict: true +const foo: Record = {} // OK + +interface RecordOfRecords extends Record {} +const recordOfRecords: RecordOfRecords = {} +recordOfRecords.propA = {...(foo !== undefined ? {foo} : {})} // OK +recordOfRecords.propB = {...(foo && {foo})} // OK +recordOfRecords.propC = {...(foo !== undefined && {foo})} // error'd in 3.7 beta, should be OK + +interface RecordOfRecordsOrEmpty extends Record {} +const recordsOfRecordsOrEmpty: RecordOfRecordsOrEmpty = {} +recordsOfRecordsOrEmpty.propA = {...(foo !== undefined ? {foo} : {})} // OK +recordsOfRecordsOrEmpty.propB = {...(foo && {foo})} // OK +recordsOfRecordsOrEmpty.propC = {...(foo !== undefined && {foo})} // OK \ No newline at end of file From 614a07c7d559cc9ebe0195bfca460c28e807ceea Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Thu, 21 Nov 2019 11:20:57 -0800 Subject: [PATCH 35/50] Fix printing and emit for definite assignment assertions (#35095) * Fix printing and emit for definite assignment assertions * Make factories that handle definite assertions internal --- src/compiler/binder.ts | 2 +- src/compiler/emitter.ts | 1 + src/compiler/factory.ts | 22 +++++++++++++++++++ src/compiler/transformers/declarations.ts | 2 +- src/compiler/transformers/ts.ts | 3 ++- src/testRunner/unittests/printer.ts | 11 ++++++++++ ...eCorrectly.definiteAssignmentAssertions.js | 4 ++++ 7 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 tests/baselines/reference/printerApi/printsFileCorrectly.definiteAssignmentAssertions.js diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index ff402a2fdc2..a6c576e3a40 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -3807,7 +3807,7 @@ namespace ts { } // Type annotations are TypeScript syntax. - if (node.type) { + if (node.type || node.exclamationToken) { transformFlags |= TransformFlags.AssertTypeScript; } diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index cbff1fb2512..843b8036230 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -2741,6 +2741,7 @@ namespace ts { function emitVariableDeclaration(node: VariableDeclaration) { emit(node.name); + emit(node.exclamationToken); emitTypeAnnotation(node.type); emitInitializer(node.initializer, node.type ? node.type.end : node.name.end, node); } diff --git a/src/compiler/factory.ts b/src/compiler/factory.ts index d54244c0832..12437d088ff 100644 --- a/src/compiler/factory.ts +++ b/src/compiler/factory.ts @@ -1937,6 +1937,7 @@ namespace ts { } export function createVariableDeclaration(name: string | BindingName, type?: TypeNode, initializer?: Expression) { + /* Internally, one should probably use createTypeScriptVariableDeclaration instead and handle definite assignment assertions */ const node = createSynthesizedNode(SyntaxKind.VariableDeclaration); node.name = asName(name); node.type = type; @@ -1945,6 +1946,7 @@ namespace ts { } export function updateVariableDeclaration(node: VariableDeclaration, name: BindingName, type: TypeNode | undefined, initializer: Expression | undefined) { + /* Internally, one should probably use updateTypeScriptVariableDeclaration instead and handle definite assignment assertions */ return node.name !== name || node.type !== type || node.initializer !== initializer @@ -1952,6 +1954,26 @@ namespace ts { : node; } + /* @internal */ + export function createTypeScriptVariableDeclaration(name: string | BindingName, exclaimationToken?: Token, type?: TypeNode, initializer?: Expression) { + const node = createSynthesizedNode(SyntaxKind.VariableDeclaration); + node.name = asName(name); + node.type = type; + node.initializer = initializer !== undefined ? parenthesizeExpressionForList(initializer) : undefined; + node.exclamationToken = exclaimationToken; + return node; + } + + /* @internal */ + export function updateTypeScriptVariableDeclaration(node: VariableDeclaration, name: BindingName, exclaimationToken: Token | undefined, type: TypeNode | undefined, initializer: Expression | undefined) { + return node.name !== name + || node.type !== type + || node.initializer !== initializer + || node.exclamationToken !== exclaimationToken + ? updateNode(createTypeScriptVariableDeclaration(name, exclaimationToken, type, initializer), node) + : node; + } + export function createVariableDeclarationList(declarations: readonly VariableDeclaration[], flags = NodeFlags.None) { const node = createSynthesizedNode(SyntaxKind.VariableDeclarationList); node.flags |= flags & NodeFlags.BlockScoped; diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 7746ad00b43..e6413af8e85 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -937,7 +937,7 @@ namespace ts { } shouldEnterSuppressNewDiagnosticsContextContext = true; suppressNewDiagnosticContexts = true; // Variable declaration types also suppress new diagnostic contexts, provided the contexts wouldn't be made for binding pattern types - return cleanup(updateVariableDeclaration(input, input.name, ensureType(input, input.type), ensureNoInitializer(input))); + return cleanup(updateTypeScriptVariableDeclaration(input, input.name, /*exclaimationToken*/ undefined, ensureType(input, input.type), ensureNoInitializer(input))); } case SyntaxKind.TypeParameter: { if (isPrivateMethodTypeParameter(input) && (input.default || input.constraint)) { diff --git a/src/compiler/transformers/ts.ts b/src/compiler/transformers/ts.ts index d413a835d0d..ccad86da3e7 100644 --- a/src/compiler/transformers/ts.ts +++ b/src/compiler/transformers/ts.ts @@ -2188,9 +2188,10 @@ namespace ts { } function visitVariableDeclaration(node: VariableDeclaration) { - return updateVariableDeclaration( + return updateTypeScriptVariableDeclaration( node, visitNode(node.name, visitor, isBindingName), + /*exclaimationToken*/ undefined, /*type*/ undefined, visitNode(node.initializer, visitor, isExpression)); } diff --git a/src/testRunner/unittests/printer.ts b/src/testRunner/unittests/printer.ts index 1605e7edc60..39c5503933a 100644 --- a/src/testRunner/unittests/printer.ts +++ b/src/testRunner/unittests/printer.ts @@ -67,6 +67,17 @@ namespace ts { `class A extends B implements C implements D {}`, ScriptTarget.ES2017 ))); + + // github #35093 + printsCorrectly("definiteAssignmentAssertions", {}, printer => printer.printFile(createSourceFile( + "source.ts", + `class A { + prop!: string; + } + + let x!: string;`, + ScriptTarget.ES2017 + ))); }); describe("printBundle", () => { diff --git a/tests/baselines/reference/printerApi/printsFileCorrectly.definiteAssignmentAssertions.js b/tests/baselines/reference/printerApi/printsFileCorrectly.definiteAssignmentAssertions.js new file mode 100644 index 00000000000..46699aee0d1 --- /dev/null +++ b/tests/baselines/reference/printerApi/printsFileCorrectly.definiteAssignmentAssertions.js @@ -0,0 +1,4 @@ +class A { + prop!: string; +} +let x!: string; From 5f1e8cb9b05556f507aaeba4adfdd78f7e79072a Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Thu, 21 Nov 2019 11:34:10 -0800 Subject: [PATCH 36/50] Update user baselines (#35271) --- tests/baselines/reference/docker/office-ui-fabric.log | 1 - tests/baselines/reference/docker/vscode.log | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/baselines/reference/docker/office-ui-fabric.log b/tests/baselines/reference/docker/office-ui-fabric.log index 57100adb972..2e1eaaaaf90 100644 --- a/tests/baselines/reference/docker/office-ui-fabric.log +++ b/tests/baselines/reference/docker/office-ui-fabric.log @@ -144,7 +144,6 @@ Standard output: @uifabric/merge-styles: PASS src/Stylesheet.test.ts @uifabric/merge-styles: PASS src/extractStyleParts.test.ts @uifabric/merge-styles: PASS src/concatStyleSetsWithProps.test.ts -@uifabric/merge-styles: PASS src/fontFace.test.ts @uifabric/merge-styles: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/merge-styles/lib/index.d.ts' @uifabric/merge-styles: Done in ?s. @uifabric/jest-serializer-merge-styles: yarn run vX.X.X diff --git a/tests/baselines/reference/docker/vscode.log b/tests/baselines/reference/docker/vscode.log index 79e7ba208bc..417c006fe4b 100644 --- a/tests/baselines/reference/docker/vscode.log +++ b/tests/baselines/reference/docker/vscode.log @@ -41,9 +41,9 @@ $ gulp compile --max_old_space_size=4095 Type 'null' is not assignable to type 'string'. [XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts(997,4): Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. -[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts(283,5): Type 'string | null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts(278,5): Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. -[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts(285,5): Type 'string | null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts(280,5): Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. [XX:XX:XX] Error: /vscode/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts(414,4): Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. @@ -103,9 +103,9 @@ $ gulp compile --max_old_space_size=4095 Type 'null' is not assignable to type 'string'. [XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts(997,4): Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. -[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts(283,5): Type 'string | null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts(278,5): Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. -[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts(285,5): Type 'string | null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts(280,5): Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. [XX:XX:XX] Error: /vscode/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts(414,4): Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. From 84c84d8dbc5957b3c4576c254689c9b36e8df58a Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Thu, 21 Nov 2019 12:36:55 -0800 Subject: [PATCH 37/50] Update user baselines (#35272) --- tests/baselines/reference/docker/office-ui-fabric.log | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/baselines/reference/docker/office-ui-fabric.log b/tests/baselines/reference/docker/office-ui-fabric.log index 2e1eaaaaf90..57100adb972 100644 --- a/tests/baselines/reference/docker/office-ui-fabric.log +++ b/tests/baselines/reference/docker/office-ui-fabric.log @@ -144,6 +144,7 @@ Standard output: @uifabric/merge-styles: PASS src/Stylesheet.test.ts @uifabric/merge-styles: PASS src/extractStyleParts.test.ts @uifabric/merge-styles: PASS src/concatStyleSetsWithProps.test.ts +@uifabric/merge-styles: PASS src/fontFace.test.ts @uifabric/merge-styles: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/merge-styles/lib/index.d.ts' @uifabric/merge-styles: Done in ?s. @uifabric/jest-serializer-merge-styles: yarn run vX.X.X From 94d4023043dd032a8c96a59677eb63526b6b24b6 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Thu, 21 Nov 2019 13:05:44 -0800 Subject: [PATCH 38/50] Add inference priority level for conditional types in contravariant positions (#35199) * Add inference priority level for conditional types in contravariant positions * Accept new API baselines * Add regression tests * Accept new baselines --- src/compiler/checker.ts | 5 +- src/compiler/types.ts | 11 +- .../reference/api/tsserverlibrary.d.ts | 13 +- tests/baselines/reference/api/typescript.d.ts | 13 +- .../reference/conditionalTypes2.errors.txt | 43 ++++++ .../baselines/reference/conditionalTypes2.js | 71 ++++++++++ .../reference/conditionalTypes2.symbols | 134 ++++++++++++++++++ .../reference/conditionalTypes2.types | 81 +++++++++++ .../types/conditional/conditionalTypes2.ts | 43 ++++++ 9 files changed, 396 insertions(+), 18 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index eff003dbcd2..ca409707ec3 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -17552,9 +17552,12 @@ namespace ts { inferFromTypes(getTrueTypeFromConditionalType(source), getTrueTypeFromConditionalType(target)); inferFromTypes(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target)); } - else if (target.flags & TypeFlags.Conditional && !contravariant) { + else if (target.flags & TypeFlags.Conditional) { + const savePriority = priority; + priority |= contravariant ? InferencePriority.ContravariantConditional : 0; const targetTypes = [getTrueTypeFromConditionalType(target), getFalseTypeFromConditionalType(target)]; inferToMultipleTypes(source, targetTypes, target.flags); + priority = savePriority; } else if (target.flags & TypeFlags.UnionOrIntersection) { inferToMultipleTypes(source, (target).types, target.flags); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 78f62f3013e..5d0511f2320 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -4740,11 +4740,12 @@ namespace ts { HomomorphicMappedType = 1 << 1, // Reverse inference for homomorphic mapped type PartialHomomorphicMappedType = 1 << 2, // Partial reverse inference for homomorphic mapped type MappedTypeConstraint = 1 << 3, // Reverse inference for mapped type - ReturnType = 1 << 4, // Inference made from return type of generic function - LiteralKeyof = 1 << 5, // Inference made from a string literal to a keyof T - NoConstraints = 1 << 6, // Don't infer from constraints of instantiable types - AlwaysStrict = 1 << 7, // Always use strict rules for contravariant inferences - MaxValue = 1 << 8, // Seed for inference priority tracking + ContravariantConditional = 1 << 4, // Conditional type in contravariant position + ReturnType = 1 << 5, // Inference made from return type of generic function + LiteralKeyof = 1 << 6, // Inference made from a string literal to a keyof T + NoConstraints = 1 << 7, // Don't infer from constraints of instantiable types + AlwaysStrict = 1 << 8, // Always use strict rules for contravariant inferences + MaxValue = 1 << 9, // Seed for inference priority tracking PriorityImpliesCombination = ReturnType | MappedTypeConstraint | LiteralKeyof, // These priorities imply that the resulting type should be a combination of all candidates Circularity = -1, // Inference circularity (value less than all other priorities) diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index 94c856cfd04..258ced89916 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -2500,12 +2500,13 @@ declare namespace ts { HomomorphicMappedType = 2, PartialHomomorphicMappedType = 4, MappedTypeConstraint = 8, - ReturnType = 16, - LiteralKeyof = 32, - NoConstraints = 64, - AlwaysStrict = 128, - MaxValue = 256, - PriorityImpliesCombination = 56, + ContravariantConditional = 16, + ReturnType = 32, + LiteralKeyof = 64, + NoConstraints = 128, + AlwaysStrict = 256, + MaxValue = 512, + PriorityImpliesCombination = 104, Circularity = -1 } /** @deprecated Use FileExtensionInfo instead. */ diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 433217ee422..94a41969ed6 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -2500,12 +2500,13 @@ declare namespace ts { HomomorphicMappedType = 2, PartialHomomorphicMappedType = 4, MappedTypeConstraint = 8, - ReturnType = 16, - LiteralKeyof = 32, - NoConstraints = 64, - AlwaysStrict = 128, - MaxValue = 256, - PriorityImpliesCombination = 56, + ContravariantConditional = 16, + ReturnType = 32, + LiteralKeyof = 64, + NoConstraints = 128, + AlwaysStrict = 256, + MaxValue = 512, + PriorityImpliesCombination = 104, Circularity = -1 } /** @deprecated Use FileExtensionInfo instead. */ diff --git a/tests/baselines/reference/conditionalTypes2.errors.txt b/tests/baselines/reference/conditionalTypes2.errors.txt index 4093bf46fb0..11403f0ad75 100644 --- a/tests/baselines/reference/conditionalTypes2.errors.txt +++ b/tests/baselines/reference/conditionalTypes2.errors.txt @@ -273,4 +273,47 @@ tests/cases/conformance/types/conditional/conditionalTypes2.ts(75,12): error TS2 type Hmm = U extends T ? { [K in keyof U]: number } : never; type What = Hmm<{}, { a: string }> const w: What = { a: 4 }; + + // Repro from #33568 + + declare function save(_response: IRootResponse): void; + + exportCommand(save); + + declare function exportCommand(functionToCall: IExportCallback): void; + + interface IExportCallback { + (response: IRootResponse): void; + } + + type IRootResponse = + TResponse extends IRecord ? IRecordResponse : IResponse; + + interface IRecord { + readonly Id: string; + } + + declare type IRecordResponse = IResponse & { + sendRecord(): void; + }; + + declare type IResponse = { + sendValue(name: keyof GetAllPropertiesOfType): void; + }; + + declare type GetPropertyNamesOfType = { + [PropertyName in Extract]: T[PropertyName] extends RestrictToType ? PropertyName : never + }[Extract]; + + declare type GetAllPropertiesOfType = Pick< + T, + GetPropertyNamesOfType, RestrictToType> + >; + + // Repro from #33568 + + declare function ff(x: Foo3): void; + declare function gg(f: (x: Foo3) => void): void; + type Foo3 = T extends number ? { n: T } : { x: T }; + gg(ff); \ No newline at end of file diff --git a/tests/baselines/reference/conditionalTypes2.js b/tests/baselines/reference/conditionalTypes2.js index cb35ac6cc2d..ac2cb7465f7 100644 --- a/tests/baselines/reference/conditionalTypes2.js +++ b/tests/baselines/reference/conditionalTypes2.js @@ -194,6 +194,49 @@ type PCCB = ProductComplementComplement['b']; type Hmm = U extends T ? { [K in keyof U]: number } : never; type What = Hmm<{}, { a: string }> const w: What = { a: 4 }; + +// Repro from #33568 + +declare function save(_response: IRootResponse): void; + +exportCommand(save); + +declare function exportCommand(functionToCall: IExportCallback): void; + +interface IExportCallback { + (response: IRootResponse): void; +} + +type IRootResponse = + TResponse extends IRecord ? IRecordResponse : IResponse; + +interface IRecord { + readonly Id: string; +} + +declare type IRecordResponse = IResponse & { + sendRecord(): void; +}; + +declare type IResponse = { + sendValue(name: keyof GetAllPropertiesOfType): void; +}; + +declare type GetPropertyNamesOfType = { + [PropertyName in Extract]: T[PropertyName] extends RestrictToType ? PropertyName : never +}[Extract]; + +declare type GetAllPropertiesOfType = Pick< + T, + GetPropertyNamesOfType, RestrictToType> +>; + +// Repro from #33568 + +declare function ff(x: Foo3): void; +declare function gg(f: (x: Foo3) => void): void; +type Foo3 = T extends number ? { n: T } : { x: T }; +gg(ff); //// [conditionalTypes2.js] @@ -272,6 +315,8 @@ function foo(value) { } } var w = { a: 4 }; +exportCommand(save); +gg(ff); //// [conditionalTypes2.d.ts] @@ -406,3 +451,29 @@ declare type What = Hmm<{}, { a: string; }>; declare const w: What; +declare function save(_response: IRootResponse): void; +declare function exportCommand(functionToCall: IExportCallback): void; +interface IExportCallback { + (response: IRootResponse): void; +} +declare type IRootResponse = TResponse extends IRecord ? IRecordResponse : IResponse; +interface IRecord { + readonly Id: string; +} +declare type IRecordResponse = IResponse & { + sendRecord(): void; +}; +declare type IResponse = { + sendValue(name: keyof GetAllPropertiesOfType): void; +}; +declare type GetPropertyNamesOfType = { + [PropertyName in Extract]: T[PropertyName] extends RestrictToType ? PropertyName : never; +}[Extract]; +declare type GetAllPropertiesOfType = Pick, RestrictToType>>; +declare function ff(x: Foo3): void; +declare function gg(f: (x: Foo3) => void): void; +declare type Foo3 = T extends number ? { + n: T; +} : { + x: T; +}; diff --git a/tests/baselines/reference/conditionalTypes2.symbols b/tests/baselines/reference/conditionalTypes2.symbols index f665cbc3c71..9f980b3d0ce 100644 --- a/tests/baselines/reference/conditionalTypes2.symbols +++ b/tests/baselines/reference/conditionalTypes2.symbols @@ -707,3 +707,137 @@ const w: What = { a: 4 }; >What : Symbol(What, Decl(conditionalTypes2.ts, 192, 76)) >a : Symbol(a, Decl(conditionalTypes2.ts, 194, 17)) +// Repro from #33568 + +declare function save(_response: IRootResponse): void; +>save : Symbol(save, Decl(conditionalTypes2.ts, 194, 25)) +>_response : Symbol(_response, Decl(conditionalTypes2.ts, 198, 22)) +>IRootResponse : Symbol(IRootResponse, Decl(conditionalTypes2.ts, 206, 1)) + +exportCommand(save); +>exportCommand : Symbol(exportCommand, Decl(conditionalTypes2.ts, 200, 20)) +>save : Symbol(save, Decl(conditionalTypes2.ts, 194, 25)) + +declare function exportCommand(functionToCall: IExportCallback): void; +>exportCommand : Symbol(exportCommand, Decl(conditionalTypes2.ts, 200, 20)) +>TResponse : Symbol(TResponse, Decl(conditionalTypes2.ts, 202, 31)) +>functionToCall : Symbol(functionToCall, Decl(conditionalTypes2.ts, 202, 42)) +>IExportCallback : Symbol(IExportCallback, Decl(conditionalTypes2.ts, 202, 92)) +>TResponse : Symbol(TResponse, Decl(conditionalTypes2.ts, 202, 31)) + +interface IExportCallback { +>IExportCallback : Symbol(IExportCallback, Decl(conditionalTypes2.ts, 202, 92)) +>TResponse : Symbol(TResponse, Decl(conditionalTypes2.ts, 204, 26)) + + (response: IRootResponse): void; +>response : Symbol(response, Decl(conditionalTypes2.ts, 205, 2)) +>IRootResponse : Symbol(IRootResponse, Decl(conditionalTypes2.ts, 206, 1)) +>TResponse : Symbol(TResponse, Decl(conditionalTypes2.ts, 204, 26)) +} + +type IRootResponse = +>IRootResponse : Symbol(IRootResponse, Decl(conditionalTypes2.ts, 206, 1)) +>TResponse : Symbol(TResponse, Decl(conditionalTypes2.ts, 208, 19)) + + TResponse extends IRecord ? IRecordResponse : IResponse; +>TResponse : Symbol(TResponse, Decl(conditionalTypes2.ts, 208, 19)) +>IRecord : Symbol(IRecord, Decl(conditionalTypes2.ts, 209, 79)) +>IRecordResponse : Symbol(IRecordResponse, Decl(conditionalTypes2.ts, 213, 1)) +>TResponse : Symbol(TResponse, Decl(conditionalTypes2.ts, 208, 19)) +>IResponse : Symbol(IResponse, Decl(conditionalTypes2.ts, 217, 2)) +>TResponse : Symbol(TResponse, Decl(conditionalTypes2.ts, 208, 19)) + +interface IRecord { +>IRecord : Symbol(IRecord, Decl(conditionalTypes2.ts, 209, 79)) + + readonly Id: string; +>Id : Symbol(IRecord.Id, Decl(conditionalTypes2.ts, 211, 19)) +} + +declare type IRecordResponse = IResponse & { +>IRecordResponse : Symbol(IRecordResponse, Decl(conditionalTypes2.ts, 213, 1)) +>T : Symbol(T, Decl(conditionalTypes2.ts, 215, 29)) +>IRecord : Symbol(IRecord, Decl(conditionalTypes2.ts, 209, 79)) +>IResponse : Symbol(IResponse, Decl(conditionalTypes2.ts, 217, 2)) +>T : Symbol(T, Decl(conditionalTypes2.ts, 215, 29)) + + sendRecord(): void; +>sendRecord : Symbol(sendRecord, Decl(conditionalTypes2.ts, 215, 66)) + +}; + +declare type IResponse = { +>IResponse : Symbol(IResponse, Decl(conditionalTypes2.ts, 217, 2)) +>T : Symbol(T, Decl(conditionalTypes2.ts, 219, 23)) + + sendValue(name: keyof GetAllPropertiesOfType): void; +>sendValue : Symbol(sendValue, Decl(conditionalTypes2.ts, 219, 29)) +>name : Symbol(name, Decl(conditionalTypes2.ts, 220, 11)) +>GetAllPropertiesOfType : Symbol(GetAllPropertiesOfType, Decl(conditionalTypes2.ts, 225, 28)) +>T : Symbol(T, Decl(conditionalTypes2.ts, 219, 23)) + +}; + +declare type GetPropertyNamesOfType = { +>GetPropertyNamesOfType : Symbol(GetPropertyNamesOfType, Decl(conditionalTypes2.ts, 221, 2)) +>T : Symbol(T, Decl(conditionalTypes2.ts, 223, 36)) +>RestrictToType : Symbol(RestrictToType, Decl(conditionalTypes2.ts, 223, 38)) + + [PropertyName in Extract]: T[PropertyName] extends RestrictToType ? PropertyName : never +>PropertyName : Symbol(PropertyName, Decl(conditionalTypes2.ts, 224, 2)) +>Extract : Symbol(Extract, Decl(lib.es5.d.ts, --, --)) +>T : Symbol(T, Decl(conditionalTypes2.ts, 223, 36)) +>T : Symbol(T, Decl(conditionalTypes2.ts, 223, 36)) +>PropertyName : Symbol(PropertyName, Decl(conditionalTypes2.ts, 224, 2)) +>RestrictToType : Symbol(RestrictToType, Decl(conditionalTypes2.ts, 223, 38)) +>PropertyName : Symbol(PropertyName, Decl(conditionalTypes2.ts, 224, 2)) + +}[Extract]; +>Extract : Symbol(Extract, Decl(lib.es5.d.ts, --, --)) +>T : Symbol(T, Decl(conditionalTypes2.ts, 223, 36)) + +declare type GetAllPropertiesOfType = Pick< +>GetAllPropertiesOfType : Symbol(GetAllPropertiesOfType, Decl(conditionalTypes2.ts, 225, 28)) +>T : Symbol(T, Decl(conditionalTypes2.ts, 227, 36)) +>RestrictToType : Symbol(RestrictToType, Decl(conditionalTypes2.ts, 227, 38)) +>Pick : Symbol(Pick, Decl(lib.es5.d.ts, --, --)) + + T, +>T : Symbol(T, Decl(conditionalTypes2.ts, 227, 36)) + + GetPropertyNamesOfType, RestrictToType> +>GetPropertyNamesOfType : Symbol(GetPropertyNamesOfType, Decl(conditionalTypes2.ts, 221, 2)) +>Required : Symbol(Required, Decl(lib.es5.d.ts, --, --)) +>T : Symbol(T, Decl(conditionalTypes2.ts, 227, 36)) +>RestrictToType : Symbol(RestrictToType, Decl(conditionalTypes2.ts, 227, 38)) + +>; + +// Repro from #33568 + +declare function ff(x: Foo3): void; +>ff : Symbol(ff, Decl(conditionalTypes2.ts, 230, 2)) +>x : Symbol(x, Decl(conditionalTypes2.ts, 234, 20)) +>Foo3 : Symbol(Foo3, Decl(conditionalTypes2.ts, 235, 54)) + +declare function gg(f: (x: Foo3) => void): void; +>gg : Symbol(gg, Decl(conditionalTypes2.ts, 234, 43)) +>T : Symbol(T, Decl(conditionalTypes2.ts, 235, 20)) +>f : Symbol(f, Decl(conditionalTypes2.ts, 235, 23)) +>x : Symbol(x, Decl(conditionalTypes2.ts, 235, 27)) +>Foo3 : Symbol(Foo3, Decl(conditionalTypes2.ts, 235, 54)) +>T : Symbol(T, Decl(conditionalTypes2.ts, 235, 20)) + +type Foo3 = T extends number ? { n: T } : { x: T }; +>Foo3 : Symbol(Foo3, Decl(conditionalTypes2.ts, 235, 54)) +>T : Symbol(T, Decl(conditionalTypes2.ts, 236, 10)) +>T : Symbol(T, Decl(conditionalTypes2.ts, 236, 10)) +>n : Symbol(n, Decl(conditionalTypes2.ts, 236, 35)) +>T : Symbol(T, Decl(conditionalTypes2.ts, 236, 10)) +>x : Symbol(x, Decl(conditionalTypes2.ts, 236, 46)) +>T : Symbol(T, Decl(conditionalTypes2.ts, 236, 10)) + +gg(ff); +>gg : Symbol(gg, Decl(conditionalTypes2.ts, 234, 43)) +>ff : Symbol(ff, Decl(conditionalTypes2.ts, 230, 2)) + diff --git a/tests/baselines/reference/conditionalTypes2.types b/tests/baselines/reference/conditionalTypes2.types index e3d949f268e..f23d61aa885 100644 --- a/tests/baselines/reference/conditionalTypes2.types +++ b/tests/baselines/reference/conditionalTypes2.types @@ -446,3 +446,84 @@ const w: What = { a: 4 }; >a : number >4 : 4 +// Repro from #33568 + +declare function save(_response: IRootResponse): void; +>save : (_response: IResponse) => void +>_response : IResponse + +exportCommand(save); +>exportCommand(save) : void +>exportCommand : (functionToCall: IExportCallback) => void +>save : (_response: IResponse) => void + +declare function exportCommand(functionToCall: IExportCallback): void; +>exportCommand : (functionToCall: IExportCallback) => void +>functionToCall : IExportCallback + +interface IExportCallback { + (response: IRootResponse): void; +>response : IRootResponse +} + +type IRootResponse = +>IRootResponse : IRootResponse + + TResponse extends IRecord ? IRecordResponse : IResponse; + +interface IRecord { + readonly Id: string; +>Id : string +} + +declare type IRecordResponse = IResponse & { +>IRecordResponse : IRecordResponse + + sendRecord(): void; +>sendRecord : () => void + +}; + +declare type IResponse = { +>IResponse : IResponse + + sendValue(name: keyof GetAllPropertiesOfType): void; +>sendValue : (name: { [PropertyName in Extract]: Required[PropertyName] extends string ? PropertyName : never; }[Extract]) => void +>name : { [PropertyName in Extract]: Required[PropertyName] extends string ? PropertyName : never; }[Extract] + +}; + +declare type GetPropertyNamesOfType = { +>GetPropertyNamesOfType : { [PropertyName in Extract]: T[PropertyName] extends RestrictToType ? PropertyName : never; }[Extract] + + [PropertyName in Extract]: T[PropertyName] extends RestrictToType ? PropertyName : never +}[Extract]; + +declare type GetAllPropertiesOfType = Pick< +>GetAllPropertiesOfType : Pick]: Required[PropertyName] extends RestrictToType ? PropertyName : never; }[Extract]> + + T, + GetPropertyNamesOfType, RestrictToType> +>; + +// Repro from #33568 + +declare function ff(x: Foo3): void; +>ff : (x: { x: string; }) => void +>x : { x: string; } + +declare function gg(f: (x: Foo3) => void): void; +>gg : (f: (x: Foo3) => void) => void +>f : (x: Foo3) => void +>x : Foo3 + +type Foo3 = T extends number ? { n: T } : { x: T }; +>Foo3 : Foo3 +>n : T +>x : T + +gg(ff); +>gg(ff) : void +>gg : (f: (x: Foo3) => void) => void +>ff : (x: { x: string; }) => void + diff --git a/tests/cases/conformance/types/conditional/conditionalTypes2.ts b/tests/cases/conformance/types/conditional/conditionalTypes2.ts index bb70093f233..ea30ec89fbf 100644 --- a/tests/cases/conformance/types/conditional/conditionalTypes2.ts +++ b/tests/cases/conformance/types/conditional/conditionalTypes2.ts @@ -196,3 +196,46 @@ type PCCB = ProductComplementComplement['b']; type Hmm = U extends T ? { [K in keyof U]: number } : never; type What = Hmm<{}, { a: string }> const w: What = { a: 4 }; + +// Repro from #33568 + +declare function save(_response: IRootResponse): void; + +exportCommand(save); + +declare function exportCommand(functionToCall: IExportCallback): void; + +interface IExportCallback { + (response: IRootResponse): void; +} + +type IRootResponse = + TResponse extends IRecord ? IRecordResponse : IResponse; + +interface IRecord { + readonly Id: string; +} + +declare type IRecordResponse = IResponse & { + sendRecord(): void; +}; + +declare type IResponse = { + sendValue(name: keyof GetAllPropertiesOfType): void; +}; + +declare type GetPropertyNamesOfType = { + [PropertyName in Extract]: T[PropertyName] extends RestrictToType ? PropertyName : never +}[Extract]; + +declare type GetAllPropertiesOfType = Pick< + T, + GetPropertyNamesOfType, RestrictToType> +>; + +// Repro from #33568 + +declare function ff(x: Foo3): void; +declare function gg(f: (x: Foo3) => void): void; +type Foo3 = T extends number ? { n: T } : { x: T }; +gg(ff); From 9b78599c63eded542ad85f149e06ed1538808af3 Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Thu, 21 Nov 2019 13:10:21 -0800 Subject: [PATCH 39/50] Update user baselines (#35275) --- tests/baselines/reference/docker/office-ui-fabric.log | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/baselines/reference/docker/office-ui-fabric.log b/tests/baselines/reference/docker/office-ui-fabric.log index 57100adb972..2e1eaaaaf90 100644 --- a/tests/baselines/reference/docker/office-ui-fabric.log +++ b/tests/baselines/reference/docker/office-ui-fabric.log @@ -144,7 +144,6 @@ Standard output: @uifabric/merge-styles: PASS src/Stylesheet.test.ts @uifabric/merge-styles: PASS src/extractStyleParts.test.ts @uifabric/merge-styles: PASS src/concatStyleSetsWithProps.test.ts -@uifabric/merge-styles: PASS src/fontFace.test.ts @uifabric/merge-styles: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/merge-styles/lib/index.d.ts' @uifabric/merge-styles: Done in ?s. @uifabric/jest-serializer-merge-styles: yarn run vX.X.X From cfa367d7f9dfc36149ad5ad7a0ce8ab91e323e8c Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Thu, 21 Nov 2019 13:13:46 -0800 Subject: [PATCH 40/50] Have definite assignment assertions on property signatures mark them as typescript (#35270) --- src/compiler/binder.ts | 2 +- .../definiteAssignmentWithErrorStillStripped.errors.txt | 9 +++++++++ .../definiteAssignmentWithErrorStillStripped.js | 9 +++++++++ .../definiteAssignmentWithErrorStillStripped.symbols | 7 +++++++ .../definiteAssignmentWithErrorStillStripped.types | 7 +++++++ .../compiler/definiteAssignmentWithErrorStillStripped.ts | 5 +++++ 6 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 tests/baselines/reference/definiteAssignmentWithErrorStillStripped.errors.txt create mode 100644 tests/baselines/reference/definiteAssignmentWithErrorStillStripped.js create mode 100644 tests/baselines/reference/definiteAssignmentWithErrorStillStripped.symbols create mode 100644 tests/baselines/reference/definiteAssignmentWithErrorStillStripped.types create mode 100644 tests/cases/compiler/definiteAssignmentWithErrorStillStripped.ts diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index a6c576e3a40..e09fa73e3c2 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -3643,7 +3643,7 @@ namespace ts { let transformFlags = subtreeFlags | TransformFlags.ContainsClassFields; // Decorators, TypeScript-specific modifiers, and type annotations are TypeScript syntax. - if (some(node.decorators) || hasModifier(node, ModifierFlags.TypeScriptModifier) || node.type || node.questionToken) { + if (some(node.decorators) || hasModifier(node, ModifierFlags.TypeScriptModifier) || node.type || node.questionToken || node.exclamationToken) { transformFlags |= TransformFlags.AssertTypeScript; } diff --git a/tests/baselines/reference/definiteAssignmentWithErrorStillStripped.errors.txt b/tests/baselines/reference/definiteAssignmentWithErrorStillStripped.errors.txt new file mode 100644 index 00000000000..d6625904b2b --- /dev/null +++ b/tests/baselines/reference/definiteAssignmentWithErrorStillStripped.errors.txt @@ -0,0 +1,9 @@ +tests/cases/compiler/definiteAssignmentWithErrorStillStripped.ts(2,6): error TS1255: A definite assignment assertion '!' is not permitted in this context. + + +==== tests/cases/compiler/definiteAssignmentWithErrorStillStripped.ts (1 errors) ==== + class C { + p!; + ~ +!!! error TS1255: A definite assignment assertion '!' is not permitted in this context. + } \ No newline at end of file diff --git a/tests/baselines/reference/definiteAssignmentWithErrorStillStripped.js b/tests/baselines/reference/definiteAssignmentWithErrorStillStripped.js new file mode 100644 index 00000000000..2c397b83d8c --- /dev/null +++ b/tests/baselines/reference/definiteAssignmentWithErrorStillStripped.js @@ -0,0 +1,9 @@ +//// [definiteAssignmentWithErrorStillStripped.ts] +class C { + p!; +} + +//// [definiteAssignmentWithErrorStillStripped.js] +class C { + p; +} diff --git a/tests/baselines/reference/definiteAssignmentWithErrorStillStripped.symbols b/tests/baselines/reference/definiteAssignmentWithErrorStillStripped.symbols new file mode 100644 index 00000000000..63a6f56b36f --- /dev/null +++ b/tests/baselines/reference/definiteAssignmentWithErrorStillStripped.symbols @@ -0,0 +1,7 @@ +=== tests/cases/compiler/definiteAssignmentWithErrorStillStripped.ts === +class C { +>C : Symbol(C, Decl(definiteAssignmentWithErrorStillStripped.ts, 0, 0)) + + p!; +>p : Symbol(C.p, Decl(definiteAssignmentWithErrorStillStripped.ts, 0, 9)) +} diff --git a/tests/baselines/reference/definiteAssignmentWithErrorStillStripped.types b/tests/baselines/reference/definiteAssignmentWithErrorStillStripped.types new file mode 100644 index 00000000000..9cdd939ec38 --- /dev/null +++ b/tests/baselines/reference/definiteAssignmentWithErrorStillStripped.types @@ -0,0 +1,7 @@ +=== tests/cases/compiler/definiteAssignmentWithErrorStillStripped.ts === +class C { +>C : C + + p!; +>p : any +} diff --git a/tests/cases/compiler/definiteAssignmentWithErrorStillStripped.ts b/tests/cases/compiler/definiteAssignmentWithErrorStillStripped.ts new file mode 100644 index 00000000000..4f7f594363a --- /dev/null +++ b/tests/cases/compiler/definiteAssignmentWithErrorStillStripped.ts @@ -0,0 +1,5 @@ +// @target: esnext +// @useDefineForClassFields: true +class C { + p!; +} \ No newline at end of file From 663a42be94f3695cac9e5017d3b7857aca2500d0 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Thu, 21 Nov 2019 15:21:35 -0800 Subject: [PATCH 41/50] Allow references to globalThis to be made in declaration emit (#35279) --- src/compiler/checker.ts | 34 ++++++---- ...uleWithExportedAndNonExportedClasses.types | 2 +- ...CodeGenModuleWithMemberClassConflict.types | 4 +- ...isionCodeGenModuleWithMemberVariable.types | 2 +- ...sionCodeGenModuleWithModuleReopening.types | 8 +-- ...lisionCodeGenModuleWithPrivateMember.types | 2 +- ...llisionCodeGenModuleWithUnicodeNames.types | 2 +- ...peAnnotationVisibilityErrorTypeAlias.types | 2 +- ...clarationsForFileShadowingGlobalNoError.js | 65 +++++++++++++++++++ ...tionsForFileShadowingGlobalNoError.symbols | 34 ++++++++++ ...rationsForFileShadowingGlobalNoError.types | 33 ++++++++++ .../baselines/reference/genericDefaults.types | 2 +- ...mportAndVariableDeclarationConflict1.types | 2 +- ...mportAndVariableDeclarationConflict2.types | 2 +- ...mportAndVariableDeclarationConflict3.types | 2 +- ...mportAndVariableDeclarationConflict4.types | 2 +- .../reference/importedModuleAddToGlobal.types | 2 +- ...bleAssignmentOfIdenticallyNamedTypes.types | 4 +- .../mergedModuleDeclarationCodeGen5.types | 2 +- .../moduleWithStatementsOfEveryKind.types | 2 +- tests/baselines/reference/nameCollision.types | 14 ++-- .../reference/newOperatorConformance.types | 2 +- .../reference/newOperatorErrorCases.types | 2 +- .../reference/thisInModuleFunction1.types | 2 +- tests/baselines/reference/tsxEmit3.types | 2 +- ...arametersCheckedByNoUnusedParameters.types | 2 +- ...ParametersNotCheckedByNoUnusedLocals.types | 2 +- ...clarationsForFileShadowingGlobalNoError.ts | 17 +++++ 28 files changed, 205 insertions(+), 46 deletions(-) create mode 100644 tests/baselines/reference/declarationsForFileShadowingGlobalNoError.js create mode 100644 tests/baselines/reference/declarationsForFileShadowingGlobalNoError.symbols create mode 100644 tests/baselines/reference/declarationsForFileShadowingGlobalNoError.types create mode 100644 tests/cases/compiler/declarationsForFileShadowingGlobalNoError.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ca409707ec3..cb64a3c5cfd 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -3312,8 +3312,8 @@ namespace ts { return [symbol!]; } - // Check if symbol is any of the alias - return forEachEntry(symbols, symbolFromSymbolTable => { + // Check if symbol is any of the aliases in scope + const result = forEachEntry(symbols, symbolFromSymbolTable => { if (symbolFromSymbolTable.flags & SymbolFlags.Alias && symbolFromSymbolTable.escapedName !== InternalSymbolName.ExportEquals && symbolFromSymbolTable.escapedName !== InternalSymbolName.Default @@ -3326,16 +3326,9 @@ namespace ts { ) { const resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); - if (isAccessible(symbolFromSymbolTable, resolvedImportedSymbol, ignoreQualification)) { - return [symbolFromSymbolTable]; - } - - // Look in the exported members, if we can find accessibleSymbolChain, symbol is accessible using this chain - // but only if the symbolFromSymbolTable can be qualified - const candidateTable = getExportsOfSymbol(resolvedImportedSymbol); - const accessibleSymbolsFromExports = candidateTable && getAccessibleSymbolChainFromSymbolTable(candidateTable, /*ignoreQualification*/ true); - if (accessibleSymbolsFromExports && canQualifySymbol(symbolFromSymbolTable, getQualifiedLeftMeaning(meaning))) { - return [symbolFromSymbolTable].concat(accessibleSymbolsFromExports); + const candidate = getCandidateListForSymbol(symbolFromSymbolTable, resolvedImportedSymbol, ignoreQualification); + if (candidate) { + return candidate; } } if (symbolFromSymbolTable.escapedName === symbol!.escapedName && symbolFromSymbolTable.exportSymbol) { @@ -3344,6 +3337,23 @@ namespace ts { } } }); + + // If there's no result and we're looking at the global symbol table, treat `globalThis` like an alias and try to lookup thru that + return result || (symbols === globals ? getCandidateListForSymbol(globalThisSymbol, globalThisSymbol, ignoreQualification) : undefined); + } + + function getCandidateListForSymbol(symbolFromSymbolTable: Symbol, resolvedImportedSymbol: Symbol, ignoreQualification: boolean | undefined) { + if (isAccessible(symbolFromSymbolTable, resolvedImportedSymbol, ignoreQualification)) { + return [symbolFromSymbolTable]; + } + + // Look in the exported members, if we can find accessibleSymbolChain, symbol is accessible using this chain + // but only if the symbolFromSymbolTable can be qualified + const candidateTable = getExportsOfSymbol(resolvedImportedSymbol); + const accessibleSymbolsFromExports = candidateTable && getAccessibleSymbolChainFromSymbolTable(candidateTable, /*ignoreQualification*/ true); + if (accessibleSymbolsFromExports && canQualifySymbol(symbolFromSymbolTable, getQualifiedLeftMeaning(meaning))) { + return [symbolFromSymbolTable].concat(accessibleSymbolsFromExports); + } } } diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.types b/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.types index 12a6af08955..a7fdb5d3cec 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.types +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.types @@ -1,6 +1,6 @@ === tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedClasses.ts === module A { ->A : typeof A +>A : typeof globalThis.A export class A { >A : A diff --git a/tests/baselines/reference/collisionCodeGenModuleWithMemberClassConflict.types b/tests/baselines/reference/collisionCodeGenModuleWithMemberClassConflict.types index edbe25b7a7d..1f42615b018 100644 --- a/tests/baselines/reference/collisionCodeGenModuleWithMemberClassConflict.types +++ b/tests/baselines/reference/collisionCodeGenModuleWithMemberClassConflict.types @@ -1,6 +1,6 @@ === tests/cases/compiler/collisionCodeGenModuleWithMemberClassConflict.ts === module m1 { ->m1 : typeof m1 +>m1 : typeof globalThis.m1 export class m1 { >m1 : m1 @@ -14,7 +14,7 @@ var foo = new m1.m1(); >m1 : typeof m1.m1 module m2 { ->m2 : typeof m2 +>m2 : typeof globalThis.m2 export class m2 { >m2 : m2 diff --git a/tests/baselines/reference/collisionCodeGenModuleWithMemberVariable.types b/tests/baselines/reference/collisionCodeGenModuleWithMemberVariable.types index 959a45ab372..8818326fad3 100644 --- a/tests/baselines/reference/collisionCodeGenModuleWithMemberVariable.types +++ b/tests/baselines/reference/collisionCodeGenModuleWithMemberVariable.types @@ -1,6 +1,6 @@ === tests/cases/compiler/collisionCodeGenModuleWithMemberVariable.ts === module m1 { ->m1 : typeof m1 +>m1 : typeof globalThis.m1 export var m1 = 10; >m1 : number diff --git a/tests/baselines/reference/collisionCodeGenModuleWithModuleReopening.types b/tests/baselines/reference/collisionCodeGenModuleWithModuleReopening.types index 2f8c05f2357..30ca9374ab6 100644 --- a/tests/baselines/reference/collisionCodeGenModuleWithModuleReopening.types +++ b/tests/baselines/reference/collisionCodeGenModuleWithModuleReopening.types @@ -1,6 +1,6 @@ === tests/cases/compiler/collisionCodeGenModuleWithModuleReopening.ts === module m1 { ->m1 : typeof m1 +>m1 : typeof globalThis.m1 export class m1 { >m1 : m1 @@ -14,7 +14,7 @@ var foo = new m1.m1(); >m1 : typeof m1.m1 module m1 { ->m1 : typeof m1 +>m1 : typeof globalThis.m1 export class c1 { >c1 : c1 @@ -37,7 +37,7 @@ var foo2 = new m1.c1(); >c1 : typeof m1.c1 module m2 { ->m2 : typeof m2 +>m2 : typeof globalThis.m2 export class c1 { >c1 : c1 @@ -59,7 +59,7 @@ var foo3 = new m2.c1(); >c1 : typeof m2.c1 module m2 { ->m2 : typeof m2 +>m2 : typeof globalThis.m2 export class m2 { >m2 : m2 diff --git a/tests/baselines/reference/collisionCodeGenModuleWithPrivateMember.types b/tests/baselines/reference/collisionCodeGenModuleWithPrivateMember.types index a4af255dcf3..c314eb05c8c 100644 --- a/tests/baselines/reference/collisionCodeGenModuleWithPrivateMember.types +++ b/tests/baselines/reference/collisionCodeGenModuleWithPrivateMember.types @@ -1,6 +1,6 @@ === tests/cases/compiler/collisionCodeGenModuleWithPrivateMember.ts === module m1 { ->m1 : typeof m1 +>m1 : typeof globalThis.m1 class m1 { >m1 : m1 diff --git a/tests/baselines/reference/collisionCodeGenModuleWithUnicodeNames.types b/tests/baselines/reference/collisionCodeGenModuleWithUnicodeNames.types index 5d7ca71b1be..d998f7f6c44 100644 --- a/tests/baselines/reference/collisionCodeGenModuleWithUnicodeNames.types +++ b/tests/baselines/reference/collisionCodeGenModuleWithUnicodeNames.types @@ -1,6 +1,6 @@ === tests/cases/compiler/collisionCodeGenModuleWithUnicodeNames.ts === module 才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123 { ->才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123 : typeof 才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123 +>才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123 : typeof globalThis.才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123 export class 才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123 { >才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123 : 才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123 diff --git a/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorTypeAlias.types b/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorTypeAlias.types index 5240b23cf98..55385050d56 100644 --- a/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorTypeAlias.types +++ b/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorTypeAlias.types @@ -34,7 +34,7 @@ module M1 { >Window : Window export var p: W; // No error ->p : string | Window +>p : string | globalThis.Window } } diff --git a/tests/baselines/reference/declarationsForFileShadowingGlobalNoError.js b/tests/baselines/reference/declarationsForFileShadowingGlobalNoError.js new file mode 100644 index 00000000000..ed972a1312c --- /dev/null +++ b/tests/baselines/reference/declarationsForFileShadowingGlobalNoError.js @@ -0,0 +1,65 @@ +//// [tests/cases/compiler/declarationsForFileShadowingGlobalNoError.ts] //// + +//// [dom.ts] +export type DOMNode = Node; +//// [custom.ts] +export type Node = {}; +//// [index.ts] +import { Node } from './custom' +import { DOMNode } from './dom' + +type Constructor = new (...args: any[]) => any + +export const mixin = (Base: Constructor) => { + return class extends Base { + get(domNode: DOMNode) {} + } +} + +//// [dom.js] +"use strict"; +exports.__esModule = true; +//// [custom.js] +"use strict"; +exports.__esModule = true; +//// [index.js] +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +exports.__esModule = true; +exports.mixin = function (Base) { + return /** @class */ (function (_super) { + __extends(class_1, _super); + function class_1() { + return _super !== null && _super.apply(this, arguments) || this; + } + class_1.prototype.get = function (domNode) { }; + return class_1; + }(Base)); +}; + + +//// [dom.d.ts] +export declare type DOMNode = Node; +//// [custom.d.ts] +export declare type Node = {}; +//// [index.d.ts] +declare type Constructor = new (...args: any[]) => any; +export declare const mixin: (Base: Constructor) => { + new (...args: any[]): { + [x: string]: any; + get(domNode: globalThis.Node): void; + }; +}; +export {}; diff --git a/tests/baselines/reference/declarationsForFileShadowingGlobalNoError.symbols b/tests/baselines/reference/declarationsForFileShadowingGlobalNoError.symbols new file mode 100644 index 00000000000..70b06cd5209 --- /dev/null +++ b/tests/baselines/reference/declarationsForFileShadowingGlobalNoError.symbols @@ -0,0 +1,34 @@ +=== tests/cases/compiler/dom.ts === +export type DOMNode = Node; +>DOMNode : Symbol(DOMNode, Decl(dom.ts, 0, 0)) +>Node : Symbol(Node, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) + +=== tests/cases/compiler/custom.ts === +export type Node = {}; +>Node : Symbol(Node, Decl(custom.ts, 0, 0)) + +=== tests/cases/compiler/index.ts === +import { Node } from './custom' +>Node : Symbol(Node, Decl(index.ts, 0, 8)) + +import { DOMNode } from './dom' +>DOMNode : Symbol(DOMNode, Decl(index.ts, 1, 8)) + +type Constructor = new (...args: any[]) => any +>Constructor : Symbol(Constructor, Decl(index.ts, 1, 31)) +>args : Symbol(args, Decl(index.ts, 3, 24)) + +export const mixin = (Base: Constructor) => { +>mixin : Symbol(mixin, Decl(index.ts, 5, 12)) +>Base : Symbol(Base, Decl(index.ts, 5, 22)) +>Constructor : Symbol(Constructor, Decl(index.ts, 1, 31)) + + return class extends Base { +>Base : Symbol(Base, Decl(index.ts, 5, 22)) + + get(domNode: DOMNode) {} +>get : Symbol((Anonymous class).get, Decl(index.ts, 6, 29)) +>domNode : Symbol(domNode, Decl(index.ts, 7, 8)) +>DOMNode : Symbol(DOMNode, Decl(index.ts, 1, 8)) + } +} diff --git a/tests/baselines/reference/declarationsForFileShadowingGlobalNoError.types b/tests/baselines/reference/declarationsForFileShadowingGlobalNoError.types new file mode 100644 index 00000000000..a091c2942c0 --- /dev/null +++ b/tests/baselines/reference/declarationsForFileShadowingGlobalNoError.types @@ -0,0 +1,33 @@ +=== tests/cases/compiler/dom.ts === +export type DOMNode = Node; +>DOMNode : Node + +=== tests/cases/compiler/custom.ts === +export type Node = {}; +>Node : Node + +=== tests/cases/compiler/index.ts === +import { Node } from './custom' +>Node : any + +import { DOMNode } from './dom' +>DOMNode : any + +type Constructor = new (...args: any[]) => any +>Constructor : Constructor +>args : any[] + +export const mixin = (Base: Constructor) => { +>mixin : (Base: Constructor) => typeof (Anonymous class) +>(Base: Constructor) => { return class extends Base { get(domNode: DOMNode) {} }} : (Base: Constructor) => typeof (Anonymous class) +>Base : Constructor + + return class extends Base { +>class extends Base { get(domNode: DOMNode) {} } : typeof (Anonymous class) +>Base : Constructor + + get(domNode: DOMNode) {} +>get : (domNode: globalThis.Node) => void +>domNode : globalThis.Node + } +} diff --git a/tests/baselines/reference/genericDefaults.types b/tests/baselines/reference/genericDefaults.types index 5bea18de7c3..6596b2f98b5 100644 --- a/tests/baselines/reference/genericDefaults.types +++ b/tests/baselines/reference/genericDefaults.types @@ -1770,7 +1770,7 @@ const i06c02 = (>x).a; >a : [number, string] interface i07 { a: A; } ->a : A +>a : globalThis.A interface i07 { b: A; } >b : A diff --git a/tests/baselines/reference/importAndVariableDeclarationConflict1.types b/tests/baselines/reference/importAndVariableDeclarationConflict1.types index 0b06b1dcae6..da6c1ae0a4e 100644 --- a/tests/baselines/reference/importAndVariableDeclarationConflict1.types +++ b/tests/baselines/reference/importAndVariableDeclarationConflict1.types @@ -1,6 +1,6 @@ === tests/cases/compiler/importAndVariableDeclarationConflict1.ts === module m { ->m : typeof m +>m : typeof globalThis.m export var m = ''; >m : string diff --git a/tests/baselines/reference/importAndVariableDeclarationConflict2.types b/tests/baselines/reference/importAndVariableDeclarationConflict2.types index 4b6e9acec06..c84aa0ba4bf 100644 --- a/tests/baselines/reference/importAndVariableDeclarationConflict2.types +++ b/tests/baselines/reference/importAndVariableDeclarationConflict2.types @@ -1,6 +1,6 @@ === tests/cases/compiler/importAndVariableDeclarationConflict2.ts === module m { ->m : typeof m +>m : typeof globalThis.m export var m = ''; >m : string diff --git a/tests/baselines/reference/importAndVariableDeclarationConflict3.types b/tests/baselines/reference/importAndVariableDeclarationConflict3.types index e958147c3a2..1ccd55c8a2f 100644 --- a/tests/baselines/reference/importAndVariableDeclarationConflict3.types +++ b/tests/baselines/reference/importAndVariableDeclarationConflict3.types @@ -1,6 +1,6 @@ === tests/cases/compiler/importAndVariableDeclarationConflict3.ts === module m { ->m : typeof m +>m : typeof globalThis.m export var m = ''; >m : string diff --git a/tests/baselines/reference/importAndVariableDeclarationConflict4.types b/tests/baselines/reference/importAndVariableDeclarationConflict4.types index a92741dbf1d..2ebc4ce0a30 100644 --- a/tests/baselines/reference/importAndVariableDeclarationConflict4.types +++ b/tests/baselines/reference/importAndVariableDeclarationConflict4.types @@ -1,6 +1,6 @@ === tests/cases/compiler/importAndVariableDeclarationConflict4.ts === module m { ->m : typeof m +>m : typeof globalThis.m export var m = ''; >m : string diff --git a/tests/baselines/reference/importedModuleAddToGlobal.types b/tests/baselines/reference/importedModuleAddToGlobal.types index 830fc54e781..1c900b0c307 100644 --- a/tests/baselines/reference/importedModuleAddToGlobal.types +++ b/tests/baselines/reference/importedModuleAddToGlobal.types @@ -12,7 +12,7 @@ module A { } module B { ->B : typeof B +>B : typeof globalThis.B import a = A; >a : any diff --git a/tests/baselines/reference/incompatibleAssignmentOfIdenticallyNamedTypes.types b/tests/baselines/reference/incompatibleAssignmentOfIdenticallyNamedTypes.types index 5ab00210d91..ab3129ef5ef 100644 --- a/tests/baselines/reference/incompatibleAssignmentOfIdenticallyNamedTypes.types +++ b/tests/baselines/reference/incompatibleAssignmentOfIdenticallyNamedTypes.types @@ -13,11 +13,11 @@ class Foo { >fn : () => void this.x = a; ->this.x = a : T +>this.x = a : globalThis.T >this.x : T >this : this >x : T ->a : T +>a : globalThis.T } } diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen5.types b/tests/baselines/reference/mergedModuleDeclarationCodeGen5.types index ab4203d7951..25970a50155 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen5.types +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen5.types @@ -13,7 +13,7 @@ module M.buz.plop { module M.buz.plop { >M : typeof M >buz : typeof buz ->plop : typeof M.buz.plop +>plop : typeof globalThis.M.buz.plop function gunk() { } >gunk : () => void diff --git a/tests/baselines/reference/moduleWithStatementsOfEveryKind.types b/tests/baselines/reference/moduleWithStatementsOfEveryKind.types index ea74c1905fc..371763a9f67 100644 --- a/tests/baselines/reference/moduleWithStatementsOfEveryKind.types +++ b/tests/baselines/reference/moduleWithStatementsOfEveryKind.types @@ -1,6 +1,6 @@ === tests/cases/conformance/internalModules/moduleBody/moduleWithStatementsOfEveryKind.ts === module A { ->A : typeof A +>A : typeof globalThis.A class A { s: string } >A : A diff --git a/tests/baselines/reference/nameCollision.types b/tests/baselines/reference/nameCollision.types index f75f47df84f..dc08cc2b749 100644 --- a/tests/baselines/reference/nameCollision.types +++ b/tests/baselines/reference/nameCollision.types @@ -1,6 +1,6 @@ === tests/cases/conformance/internalModules/codeGeneration/nameCollision.ts === module A { ->A : typeof A +>A : typeof globalThis.A // these 2 statements force an underscore before the 'A' // in the generated function call. @@ -22,7 +22,7 @@ module B { } module B { ->B : typeof B +>B : typeof globalThis.B // re-opened module with colliding name // this should add an underscore. @@ -35,21 +35,21 @@ module B { } module X { ->X : typeof X +>X : typeof globalThis.X var X = 13; >X : number >13 : 13 export module Y { ->Y : typeof X.Y +>Y : typeof globalThis.X.Y var Y = 13; >Y : number >13 : 13 export module Z { ->Z : typeof X.Y.Z +>Z : typeof globalThis.X.Y.Z var X = 12; >X : number @@ -67,8 +67,8 @@ module X { } module Y.Y { ->Y : typeof Y ->Y : typeof Y.Y +>Y : typeof globalThis.Y +>Y : typeof globalThis.Y.Y export enum Y { >Y : Y diff --git a/tests/baselines/reference/newOperatorConformance.types b/tests/baselines/reference/newOperatorConformance.types index d7755c3b8ef..d25499320a2 100644 --- a/tests/baselines/reference/newOperatorConformance.types +++ b/tests/baselines/reference/newOperatorConformance.types @@ -12,7 +12,7 @@ class C1 { } class T { ->T : T +>T : globalThis.T constructor(n?: T) { } >n : T diff --git a/tests/baselines/reference/newOperatorErrorCases.types b/tests/baselines/reference/newOperatorErrorCases.types index dd2d57413fa..0f5cb3622ab 100644 --- a/tests/baselines/reference/newOperatorErrorCases.types +++ b/tests/baselines/reference/newOperatorErrorCases.types @@ -12,7 +12,7 @@ class C1 { } class T { ->T : T +>T : globalThis.T constructor(n?: T) { } >n : T diff --git a/tests/baselines/reference/thisInModuleFunction1.types b/tests/baselines/reference/thisInModuleFunction1.types index c73f9ebbd9c..390736a3129 100644 --- a/tests/baselines/reference/thisInModuleFunction1.types +++ b/tests/baselines/reference/thisInModuleFunction1.types @@ -1,6 +1,6 @@ === tests/cases/compiler/thisInModuleFunction1.ts === module bar { ->bar : typeof bar +>bar : typeof globalThis.bar export function bar() { >bar : () => any diff --git a/tests/baselines/reference/tsxEmit3.types b/tests/baselines/reference/tsxEmit3.types index e4730cffd61..5666e0a22d0 100644 --- a/tests/baselines/reference/tsxEmit3.types +++ b/tests/baselines/reference/tsxEmit3.types @@ -67,7 +67,7 @@ module M { } module M { ->M : typeof M +>M : typeof globalThis.M var M = 100; >M : number diff --git a/tests/baselines/reference/unusedTypeParametersCheckedByNoUnusedParameters.types b/tests/baselines/reference/unusedTypeParametersCheckedByNoUnusedParameters.types index 0ce521e288c..589c7e8c495 100644 --- a/tests/baselines/reference/unusedTypeParametersCheckedByNoUnusedParameters.types +++ b/tests/baselines/reference/unusedTypeParametersCheckedByNoUnusedParameters.types @@ -3,7 +3,7 @@ function f() { } >f : () => void type T = { }; ->T : {} +>T : globalThis.T interface I { }; diff --git a/tests/baselines/reference/unusedTypeParametersNotCheckedByNoUnusedLocals.types b/tests/baselines/reference/unusedTypeParametersNotCheckedByNoUnusedLocals.types index 6e2979a080a..08c8038bc6e 100644 --- a/tests/baselines/reference/unusedTypeParametersNotCheckedByNoUnusedLocals.types +++ b/tests/baselines/reference/unusedTypeParametersNotCheckedByNoUnusedLocals.types @@ -3,7 +3,7 @@ function f() { } >f : () => void type T = { }; ->T : {} +>T : globalThis.T interface I { }; diff --git a/tests/cases/compiler/declarationsForFileShadowingGlobalNoError.ts b/tests/cases/compiler/declarationsForFileShadowingGlobalNoError.ts new file mode 100644 index 00000000000..22da11c4ba0 --- /dev/null +++ b/tests/cases/compiler/declarationsForFileShadowingGlobalNoError.ts @@ -0,0 +1,17 @@ +// @declaration: true +// @lib: dom,es6 +// @filename: dom.ts +export type DOMNode = Node; +// @filename: custom.ts +export type Node = {}; +// @filename: index.ts +import { Node } from './custom' +import { DOMNode } from './dom' + +type Constructor = new (...args: any[]) => any + +export const mixin = (Base: Constructor) => { + return class extends Base { + get(domNode: DOMNode) {} + } +} \ No newline at end of file From 02348895c912088f4dd1545794348f5acaa33cf4 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Thu, 21 Nov 2019 16:07:55 -0800 Subject: [PATCH 42/50] Add fp-ts to user tests (#35249) --- tests/cases/user/fp-ts/test.json | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 tests/cases/user/fp-ts/test.json diff --git a/tests/cases/user/fp-ts/test.json b/tests/cases/user/fp-ts/test.json new file mode 100644 index 00000000000..b5a0b49f68c --- /dev/null +++ b/tests/cases/user/fp-ts/test.json @@ -0,0 +1,4 @@ +{ + "cloneUrl": "https://github.com/gcanti/fp-ts.git", + "types": ["node"] +} From dc1c45aa9b7f2841ff3f5b758126cd2b7c0489ea Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Thu, 21 Nov 2019 17:02:57 -0800 Subject: [PATCH 43/50] Fix azure-sdk dockerfile for latest rush --- tests/cases/docker/azure-sdk/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cases/docker/azure-sdk/Dockerfile b/tests/cases/docker/azure-sdk/Dockerfile index e65643445aa..627d7a63e96 100644 --- a/tests/cases/docker/azure-sdk/Dockerfile +++ b/tests/cases/docker/azure-sdk/Dockerfile @@ -6,7 +6,7 @@ RUN git pull RUN rush update WORKDIR /azure-sdk/sdk/core/core-http # Sync up all TS versions used internally so they're all linked from a known location -RUN rush add -p "typescript@3.5.1" --exact --dev -m +RUN rush add -p "typescript@3.5.1" --dev -m # Relink installed TSes to built TS WORKDIR /azure-sdk/common/temp/node_modules/.registry.npmjs.org/typescript/3.5.1/node_modules RUN rm -rf typescript From cfefe841b7c98b8b9682d8235bcd86798e24ce0f Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Wed, 20 Nov 2019 09:36:42 -0500 Subject: [PATCH 44/50] Allow `--inspect=port` in `gulp runtests` Makes it possible to run two debuggers side-by-side. --- scripts/build/options.js | 6 +++--- scripts/build/tests.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/build/options.js b/scripts/build/options.js index 8eda9e0041d..c65c217f266 100644 --- a/scripts/build/options.js +++ b/scripts/build/options.js @@ -4,8 +4,8 @@ const os = require("os"); /** @type {CommandLineOptions} */ module.exports = minimist(process.argv.slice(2), { - boolean: ["debug", "dirty", "inspect", "light", "colors", "lint", "lkg", "soft", "fix", "failed", "keepFailed", "force", "built"], - string: ["browser", "tests", "host", "reporter", "stackTraceLimit", "timeout", "shards", "shardId"], + boolean: ["debug", "dirty", "light", "colors", "lint", "lkg", "soft", "fix", "failed", "keepFailed", "force", "built"], + string: ["browser", "tests", "inspect", "host", "reporter", "stackTraceLimit", "timeout", "shards", "shardId"], alias: { "b": "browser", "d": "debug", "debug-brk": "debug", @@ -49,7 +49,6 @@ if (module.exports.built) { * @typedef TypedOptions * @property {boolean} debug * @property {boolean} dirty - * @property {boolean} inspect * @property {boolean} light * @property {boolean} colors * @property {boolean} lint @@ -59,6 +58,7 @@ if (module.exports.built) { * @property {boolean} fix * @property {string} browser * @property {string} tests + * @property {string} inspect * @property {string} runners * @property {string|number} workers * @property {string} host diff --git a/scripts/build/tests.js b/scripts/build/tests.js index f22db233765..418b2ac6d7a 100644 --- a/scripts/build/tests.js +++ b/scripts/build/tests.js @@ -89,8 +89,8 @@ async function runConsoleTests(runJs, defaultReporter, runInParallel, watchMode, else { args.push("--no-colors"); } - if (inspect) { - args.unshift("--inspect-brk"); + if (inspect !== undefined) { + args.unshift(inspect == "" ? "--inspect-brk" : "--inspect-brk="+inspect); } else if (debug) { args.unshift("--debug-brk"); From 20b246c83a1b084529e0b6a08356505b3cf7668c Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 16 Nov 2019 04:13:51 -0500 Subject: [PATCH 45/50] Fix `getIntrinsicAttributesTypeFromJsxOpeningLikeElement` Use `getIndexTypeOfType`+`getDeclaredTypeOfSymbol` instead of `getIndexInfoOfSymbol`. Fixes #34730. --- src/compiler/checker.ts | 3 ++- .../reference/jsxIntrinsicElementsExtendsRecord.js | 10 ++++++++++ .../jsxIntrinsicElementsExtendsRecord.symbols | 12 ++++++++++++ .../jsxIntrinsicElementsExtendsRecord.types | 9 +++++++++ .../compiler/jsxIntrinsicElementsExtendsRecord.tsx | 8 ++++++++ 5 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 tests/baselines/reference/jsxIntrinsicElementsExtendsRecord.js create mode 100644 tests/baselines/reference/jsxIntrinsicElementsExtendsRecord.symbols create mode 100644 tests/baselines/reference/jsxIntrinsicElementsExtendsRecord.types create mode 100644 tests/cases/compiler/jsxIntrinsicElementsExtendsRecord.tsx diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index cb64a3c5cfd..e3f4644b0b9 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -22563,7 +22563,8 @@ namespace ts { return links.resolvedJsxElementAttributesType = getTypeOfSymbol(symbol); } else if (links.jsxFlags & JsxFlags.IntrinsicIndexedElement) { - return links.resolvedJsxElementAttributesType = getIndexInfoOfSymbol(symbol, IndexKind.String)!.type; + return links.resolvedJsxElementAttributesType = + getIndexTypeOfType(getDeclaredTypeOfSymbol(symbol), IndexKind.String)!; } else { return links.resolvedJsxElementAttributesType = errorType; diff --git a/tests/baselines/reference/jsxIntrinsicElementsExtendsRecord.js b/tests/baselines/reference/jsxIntrinsicElementsExtendsRecord.js new file mode 100644 index 00000000000..212897a20ba --- /dev/null +++ b/tests/baselines/reference/jsxIntrinsicElementsExtendsRecord.js @@ -0,0 +1,10 @@ +//// [index.tsx] +declare namespace JSX { + interface IntrinsicElements extends Record {} +} + +; + + +//// [index.jsx] +; diff --git a/tests/baselines/reference/jsxIntrinsicElementsExtendsRecord.symbols b/tests/baselines/reference/jsxIntrinsicElementsExtendsRecord.symbols new file mode 100644 index 00000000000..00c6f9fe7d0 --- /dev/null +++ b/tests/baselines/reference/jsxIntrinsicElementsExtendsRecord.symbols @@ -0,0 +1,12 @@ +=== tests/cases/compiler/index.tsx === +declare namespace JSX { +>JSX : Symbol(JSX, Decl(index.tsx, 0, 0)) + + interface IntrinsicElements extends Record {} +>IntrinsicElements : Symbol(IntrinsicElements, Decl(index.tsx, 0, 23)) +>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) +} + +; +>a : Symbol(JSX.IntrinsicElements, Decl(index.tsx, 0, 23)) + diff --git a/tests/baselines/reference/jsxIntrinsicElementsExtendsRecord.types b/tests/baselines/reference/jsxIntrinsicElementsExtendsRecord.types new file mode 100644 index 00000000000..a4f4476080c --- /dev/null +++ b/tests/baselines/reference/jsxIntrinsicElementsExtendsRecord.types @@ -0,0 +1,9 @@ +=== tests/cases/compiler/index.tsx === +declare namespace JSX { + interface IntrinsicElements extends Record {} +} + +; +> : error +>a : any + diff --git a/tests/cases/compiler/jsxIntrinsicElementsExtendsRecord.tsx b/tests/cases/compiler/jsxIntrinsicElementsExtendsRecord.tsx new file mode 100644 index 00000000000..ee78e249768 --- /dev/null +++ b/tests/cases/compiler/jsxIntrinsicElementsExtendsRecord.tsx @@ -0,0 +1,8 @@ +// @jsx: preserve + +// @filename: index.tsx +declare namespace JSX { + interface IntrinsicElements extends Record {} +} + +; From f017fa04c477997fc64e364a2a45e013514fbdf1 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 14 Nov 2019 14:10:17 -0500 Subject: [PATCH 46/50] Scan types of `yield` expressions in classes too Also, drop the other cases where they were ignored, since they're forbidden in enums, and the others are fine wrt the comment that was there. Fixes #34892 --- src/compiler/utilities.ts | 5 +---- tests/baselines/reference/generatorTypeCheck39.types | 2 +- tests/baselines/reference/generatorTypeCheck40.types | 2 +- tests/baselines/reference/generatorTypeCheck55.types | 2 +- tests/baselines/reference/generatorTypeCheck56.types | 2 +- tests/baselines/reference/generatorTypeCheck57.types | 2 +- tests/baselines/reference/generatorTypeCheck58.types | 2 +- tests/baselines/reference/generatorTypeCheck60.types | 2 +- tests/baselines/reference/generatorTypeCheck61.types | 2 +- 9 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index e7c5a7ae208..a7e3c8c34a0 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1221,11 +1221,8 @@ namespace ts { case SyntaxKind.InterfaceDeclaration: case SyntaxKind.ModuleDeclaration: case SyntaxKind.TypeAliasDeclaration: - case SyntaxKind.ClassDeclaration: - case SyntaxKind.ClassExpression: // These are not allowed inside a generator now, but eventually they may be allowed - // as local types. Regardless, any yield statements contained within them should be - // skipped in this traversal. + // as local types. Regardless, skip them to avoid the work. return; default: if (isFunctionLike(node)) { diff --git a/tests/baselines/reference/generatorTypeCheck39.types b/tests/baselines/reference/generatorTypeCheck39.types index 5ca4062b558..bca24c5336d 100644 --- a/tests/baselines/reference/generatorTypeCheck39.types +++ b/tests/baselines/reference/generatorTypeCheck39.types @@ -8,7 +8,7 @@ function decorator(x: any) { >y : any } function* g() { ->g : () => Generator +>g : () => Generator @decorator(yield 0) >decorator(yield 0) : (y: any) => void diff --git a/tests/baselines/reference/generatorTypeCheck40.types b/tests/baselines/reference/generatorTypeCheck40.types index 4e774158175..12b1abf598f 100644 --- a/tests/baselines/reference/generatorTypeCheck40.types +++ b/tests/baselines/reference/generatorTypeCheck40.types @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck40.ts === function* g() { ->g : () => Generator +>g : () => Generator class C extends (yield 0) { } >C : C diff --git a/tests/baselines/reference/generatorTypeCheck55.types b/tests/baselines/reference/generatorTypeCheck55.types index 15c3303b438..63b59328dcb 100644 --- a/tests/baselines/reference/generatorTypeCheck55.types +++ b/tests/baselines/reference/generatorTypeCheck55.types @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck55.ts === function* g() { ->g : () => Generator +>g : () => Generator var x = class C extends (yield) {}; >x : typeof C diff --git a/tests/baselines/reference/generatorTypeCheck56.types b/tests/baselines/reference/generatorTypeCheck56.types index 6f05396a1f1..f76c3676c07 100644 --- a/tests/baselines/reference/generatorTypeCheck56.types +++ b/tests/baselines/reference/generatorTypeCheck56.types @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck56.ts === function* g() { ->g : () => Generator +>g : () => Generator var x = class C { >x : typeof C diff --git a/tests/baselines/reference/generatorTypeCheck57.types b/tests/baselines/reference/generatorTypeCheck57.types index 9e660521dfb..43c949ebe7e 100644 --- a/tests/baselines/reference/generatorTypeCheck57.types +++ b/tests/baselines/reference/generatorTypeCheck57.types @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck57.ts === function* g() { ->g : () => Generator +>g : () => Generator class C { >C : C diff --git a/tests/baselines/reference/generatorTypeCheck58.types b/tests/baselines/reference/generatorTypeCheck58.types index 69d1723be96..bff6b12e822 100644 --- a/tests/baselines/reference/generatorTypeCheck58.types +++ b/tests/baselines/reference/generatorTypeCheck58.types @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck58.ts === function* g() { ->g : () => Generator +>g : () => Generator class C { >C : C diff --git a/tests/baselines/reference/generatorTypeCheck60.types b/tests/baselines/reference/generatorTypeCheck60.types index b10101b6f41..453432d3070 100644 --- a/tests/baselines/reference/generatorTypeCheck60.types +++ b/tests/baselines/reference/generatorTypeCheck60.types @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck60.ts === function* g() { ->g : () => Generator +>g : () => Generator class C extends (yield) {}; >C : C diff --git a/tests/baselines/reference/generatorTypeCheck61.types b/tests/baselines/reference/generatorTypeCheck61.types index 91874ffa58d..d78d7439d47 100644 --- a/tests/baselines/reference/generatorTypeCheck61.types +++ b/tests/baselines/reference/generatorTypeCheck61.types @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck61.ts === function * g() { ->g : () => Generator +>g : () => Generator @(yield 0) >(yield 0) : any From 1388f873a3881e9a96bc15a8adf3f6ce9ca2d0c7 Mon Sep 17 00:00:00 2001 From: Jack Bates Date: Fri, 22 Nov 2019 14:15:17 -0700 Subject: [PATCH 47/50] Add fp-ts to .gitignore (#35295) --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 6110c168e6f..4bc5d393441 100644 --- a/.gitignore +++ b/.gitignore @@ -90,6 +90,7 @@ tests/cases/user/TypeScript-React-Native-Starter/TypeScript-React-Native-Starter tests/cases/user/TypeScript-Vue-Starter/TypeScript-Vue-Starter tests/cases/user/TypeScript-WeChat-Starter/TypeScript-WeChat-Starter tests/cases/user/create-react-app/create-react-app +tests/cases/user/fp-ts/fp-ts tests/cases/user/webpack/webpack tests/cases/user/puppeteer/puppeteer tests/cases/user/axios-src/axios-src From 3e329469c11cb757aa5456413f59cbd878a4c007 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Fri, 22 Nov 2019 14:36:22 -0800 Subject: [PATCH 48/50] Actually use the moer complete update function in visitEachChild (#35301) --- src/compiler/visitor.ts | 3 ++- src/testRunner/unittests/transform.ts | 11 +++++++++++ ...Correctly.transformDefiniteAssignmentAssertions.js | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 tests/baselines/reference/transformApi/transformsCorrectly.transformDefiniteAssignmentAssertions.js diff --git a/src/compiler/visitor.ts b/src/compiler/visitor.ts index 4f36ccb1b90..f9ce78293e4 100644 --- a/src/compiler/visitor.ts +++ b/src/compiler/visitor.ts @@ -702,8 +702,9 @@ namespace ts { visitNode((node).finallyBlock, visitor, isBlock)); case SyntaxKind.VariableDeclaration: - return updateVariableDeclaration(node, + return updateTypeScriptVariableDeclaration(node, visitNode((node).name, visitor, isBindingName), + visitNode((node).exclamationToken, tokenVisitor, isToken), visitNode((node).type, visitor, isTypeNode), visitNode((node).initializer, visitor, isExpression)); diff --git a/src/testRunner/unittests/transform.ts b/src/testRunner/unittests/transform.ts index bcb0c93d1a8..fd5b54d3565 100644 --- a/src/testRunner/unittests/transform.ts +++ b/src/testRunner/unittests/transform.ts @@ -97,6 +97,17 @@ namespace ts { ]); }); + testBaseline("transformDefiniteAssignmentAssertions", () => { + return transformSourceFile(`let a!: () => void`, [ + context => file => visitNode(file, function visitor(node: Node): VisitResult { + if (node.kind === SyntaxKind.VoidKeyword) { + return createIdentifier("undefined"); + } + return visitEachChild(node, visitor, context); + }) + ]); + }); + testBaseline("fromTranspileModule", () => { return transpileModule(`var oldName = undefined;`, { transformers: { diff --git a/tests/baselines/reference/transformApi/transformsCorrectly.transformDefiniteAssignmentAssertions.js b/tests/baselines/reference/transformApi/transformsCorrectly.transformDefiniteAssignmentAssertions.js new file mode 100644 index 00000000000..cbcf5f6a820 --- /dev/null +++ b/tests/baselines/reference/transformApi/transformsCorrectly.transformDefiniteAssignmentAssertions.js @@ -0,0 +1 @@ +let a!: () => undefined; From 3da85df51130c0e1706a42398da7dc60ade58757 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 22 Nov 2019 14:51:22 -0800 Subject: [PATCH 49/50] =?UTF-8?q?Clean=20up=20error=20messages=20for=20usi?= =?UTF-8?q?ng=20TypeScript=20syntax=20in=20JavaScr=E2=80=A6=20(#35254)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix up quotation marks in error messages in JavaScript files. * Accepted baselines. * Typescript -> TypeScript * Accepted baselines. * Migrate syntactic diagnostics tests to baselining tests. * Accepted baselines. * Update diagnosticMessages.json * Removed markers. * Add ability to baseline both semantic and syntactic diagnostics. * Fix up broken diagnostics when using a server LS. * Accepted baselines. * Lints. * Fake up sourcefile objects in the tsserver session client instead. * Fewer allocations. --- src/compiler/commandLineParser.ts | 2 +- src/compiler/diagnosticMessages.json | 32 ++---- src/compiler/program.ts | 35 +++--- src/harness/client.ts | 8 +- src/harness/fourslash.ts | 65 ++++++++++- .../reference/decoratorInJsFile.errors.txt | 4 +- .../reference/decoratorInJsFile1.errors.txt | 4 +- ...ssingTypeArgsOnJSConstructCalls.errors.txt | 16 +-- ...tJavaScriptSyntacticDiagnostics01.baseline | 17 +++ ...tJavaScriptSyntacticDiagnostics02.baseline | 32 ++++++ ...etJavaScriptSyntacticDiagnostics1.baseline | 8 ++ ...tJavaScriptSyntacticDiagnostics10.baseline | 8 ++ ...tJavaScriptSyntacticDiagnostics11.baseline | 8 ++ ...tJavaScriptSyntacticDiagnostics12.baseline | 8 ++ ...tJavaScriptSyntacticDiagnostics13.baseline | 8 ++ ...tJavaScriptSyntacticDiagnostics14.baseline | 8 ++ ...tJavaScriptSyntacticDiagnostics15.baseline | 8 ++ ...tJavaScriptSyntacticDiagnostics16.baseline | 8 ++ ...tJavaScriptSyntacticDiagnostics17.baseline | 8 ++ ...tJavaScriptSyntacticDiagnostics18.baseline | 19 ++++ ...tJavaScriptSyntacticDiagnostics19.baseline | 8 ++ ...etJavaScriptSyntacticDiagnostics2.baseline | 8 ++ ...etJavaScriptSyntacticDiagnostics3.baseline | 8 ++ ...etJavaScriptSyntacticDiagnostics4.baseline | 8 ++ ...etJavaScriptSyntacticDiagnostics5.baseline | 8 ++ ...etJavaScriptSyntacticDiagnostics6.baseline | 8 ++ ...etJavaScriptSyntacticDiagnostics7.baseline | 8 ++ ...etJavaScriptSyntacticDiagnostics8.baseline | 8 ++ ...etJavaScriptSyntacticDiagnostics9.baseline | 8 ++ .../jsDeclarationsClassesErr.errors.txt | 84 +++++++------- .../reference/jsDeclarationsEnums.errors.txt | 48 ++++---- .../jsDeclarationsExportFormsErr.errors.txt | 8 +- .../jsDeclarationsInterfaces.errors.txt | 104 +++++++++--------- ...FileCompilationAbstractModifier.errors.txt | 8 +- ...tionAmbientVarDeclarationSyntax.errors.txt | 4 +- .../jsFileCompilationEnumSyntax.errors.txt | 4 +- ...mpilationExportAssignmentSyntax.errors.txt | 4 +- ...tionHeritageClauseSyntaxOfClass.errors.txt | 4 +- ...leCompilationImportEqualsSyntax.errors.txt | 4 +- ...sFileCompilationInterfaceSyntax.errors.txt | 4 +- .../jsFileCompilationModuleSyntax.errors.txt | 4 +- ...FileCompilationNonNullAssertion.errors.txt | 4 +- ...tionalClassElementSyntaxOfClass.errors.txt | 8 +- ...ileCompilationOptionalParameter.errors.txt | 4 +- ...lationPublicMethodSyntaxOfClass.errors.txt | 4 +- ...pilationPublicParameterModifier.errors.txt | 4 +- ...ationReturnTypeSyntaxOfFunction.errors.txt | 4 +- ...sFileCompilationTypeAliasSyntax.errors.txt | 4 +- ...ilationTypeArgumentSyntaxOfCall.errors.txt | 16 +-- ...jsFileCompilationTypeAssertions.errors.txt | 4 +- ...sFileCompilationTypeOfParameter.errors.txt | 4 +- ...ationTypeParameterSyntaxOfClass.errors.txt | 4 +- ...arameterSyntaxOfClassExpression.errors.txt | 4 +- ...onTypeParameterSyntaxOfFunction.errors.txt | 4 +- ...sFileCompilationTypeSyntaxOfVar.errors.txt | 4 +- .../reference/jsdocTypedefNoCrash2.errors.txt | 4 +- ...xCheckJsxNoTypeArgumentsAllowed.errors.txt | 4 +- tests/cases/fourslash/fourslash.ts | 2 + .../getJavaScriptSyntacticDiagnostics1.ts | 7 +- .../getJavaScriptSyntacticDiagnostics10.ts | 7 +- .../getJavaScriptSyntacticDiagnostics11.ts | 7 +- .../getJavaScriptSyntacticDiagnostics12.ts | 7 +- .../getJavaScriptSyntacticDiagnostics13.ts | 7 +- .../getJavaScriptSyntacticDiagnostics14.ts | 7 +- .../getJavaScriptSyntacticDiagnostics15.ts | 7 +- .../getJavaScriptSyntacticDiagnostics16.ts | 7 +- .../getJavaScriptSyntacticDiagnostics17.ts | 7 +- .../getJavaScriptSyntacticDiagnostics18.ts | 17 +-- .../getJavaScriptSyntacticDiagnostics19.ts | 7 +- .../getJavaScriptSyntacticDiagnostics2.ts | 7 +- .../getJavaScriptSyntacticDiagnostics3.ts | 7 +- .../getJavaScriptSyntacticDiagnostics4.ts | 7 +- .../getJavaScriptSyntacticDiagnostics5.ts | 7 +- .../getJavaScriptSyntacticDiagnostics6.ts | 7 +- .../getJavaScriptSyntacticDiagnostics7.ts | 7 +- .../getJavaScriptSyntacticDiagnostics8.ts | 7 +- .../getJavaScriptSyntacticDiagnostics9.ts | 7 +- .../getJavaScriptSyntacticDiagnostics01.ts | 16 +-- .../getJavaScriptSyntacticDiagnostics02.ts | 35 +----- 79 files changed, 547 insertions(+), 387 deletions(-) create mode 100644 tests/baselines/reference/getJavaScriptSyntacticDiagnostics01.baseline create mode 100644 tests/baselines/reference/getJavaScriptSyntacticDiagnostics02.baseline create mode 100644 tests/baselines/reference/getJavaScriptSyntacticDiagnostics1.baseline create mode 100644 tests/baselines/reference/getJavaScriptSyntacticDiagnostics10.baseline create mode 100644 tests/baselines/reference/getJavaScriptSyntacticDiagnostics11.baseline create mode 100644 tests/baselines/reference/getJavaScriptSyntacticDiagnostics12.baseline create mode 100644 tests/baselines/reference/getJavaScriptSyntacticDiagnostics13.baseline create mode 100644 tests/baselines/reference/getJavaScriptSyntacticDiagnostics14.baseline create mode 100644 tests/baselines/reference/getJavaScriptSyntacticDiagnostics15.baseline create mode 100644 tests/baselines/reference/getJavaScriptSyntacticDiagnostics16.baseline create mode 100644 tests/baselines/reference/getJavaScriptSyntacticDiagnostics17.baseline create mode 100644 tests/baselines/reference/getJavaScriptSyntacticDiagnostics18.baseline create mode 100644 tests/baselines/reference/getJavaScriptSyntacticDiagnostics19.baseline create mode 100644 tests/baselines/reference/getJavaScriptSyntacticDiagnostics2.baseline create mode 100644 tests/baselines/reference/getJavaScriptSyntacticDiagnostics3.baseline create mode 100644 tests/baselines/reference/getJavaScriptSyntacticDiagnostics4.baseline create mode 100644 tests/baselines/reference/getJavaScriptSyntacticDiagnostics5.baseline create mode 100644 tests/baselines/reference/getJavaScriptSyntacticDiagnostics6.baseline create mode 100644 tests/baselines/reference/getJavaScriptSyntacticDiagnostics7.baseline create mode 100644 tests/baselines/reference/getJavaScriptSyntacticDiagnostics8.baseline create mode 100644 tests/baselines/reference/getJavaScriptSyntacticDiagnostics9.baseline diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 4bcc1e48c8f..0f799c0af61 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -1539,7 +1539,7 @@ namespace ts { } if (element.questionToken) { - errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element.questionToken, Diagnostics._0_can_only_be_used_in_a_ts_file, "?")); + errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element.questionToken, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")); } if (!isDoubleQuotedString(element.name)) { errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element.name, Diagnostics.String_literal_with_double_quotes_expected)); diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index fedf796769b..4fb13c564bc 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -4543,59 +4543,51 @@ "category": "Error", "code": 8001 }, - "'import ... =' can only be used in a .ts file.": { + "'import ... =' can only be used in TypeScript files.": { "category": "Error", "code": 8002 }, - "'export=' can only be used in a .ts file.": { + "'export =' can only be used in TypeScript files.": { "category": "Error", "code": 8003 }, - "'type parameter declarations' can only be used in a .ts file.": { + "Type parameter declarations can only be used in TypeScript files.": { "category": "Error", "code": 8004 }, - "'implements clauses' can only be used in a .ts file.": { + "'implements' clauses can only be used in TypeScript files.": { "category": "Error", "code": 8005 }, - "'interface declarations' can only be used in a .ts file.": { + "'{0}' declarations can only be used in TypeScript files.": { "category": "Error", "code": 8006 }, - "'module declarations' can only be used in a .ts file.": { - "category": "Error", - "code": 8007 - }, - "'type aliases' can only be used in a .ts file.": { + "Type aliases can only be used in TypeScript files.": { "category": "Error", "code": 8008 }, - "'{0}' can only be used in a .ts file.": { + "The '{0}' modifier can only be used in TypeScript files.": { "category": "Error", "code": 8009 }, - "'types' can only be used in a .ts file.": { + "Type annotations can only be used in TypeScript files.": { "category": "Error", "code": 8010 }, - "'type arguments' can only be used in a .ts file.": { + "Type arguments can only be used in TypeScript files.": { "category": "Error", "code": 8011 }, - "'parameter modifiers' can only be used in a .ts file.": { + "Parameter modifiers can only be used in TypeScript files.": { "category": "Error", "code": 8012 }, - "'non-null assertions' can only be used in a .ts file.": { + "Non-null assertions can only be used in TypeScript files.": { "category": "Error", "code": 8013 }, - "'enum declarations' can only be used in a .ts file.": { - "category": "Error", - "code": 8015 - }, - "'type assertion expressions' can only be used in a .ts file.": { + "Type assertion expressions can only be used in TypeScript files.": { "category": "Error", "code": 8016 }, diff --git a/src/compiler/program.ts b/src/compiler/program.ts index cba0cd748b2..2af18fb6bbb 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1797,7 +1797,7 @@ namespace ts { case SyntaxKind.PropertyDeclaration: case SyntaxKind.MethodDeclaration: if ((parent).questionToken === node) { - diagnostics.push(createDiagnosticForNode(node, Diagnostics._0_can_only_be_used_in_a_ts_file, "?")); + diagnostics.push(createDiagnosticForNode(node, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")); return; } // falls through @@ -1811,45 +1811,48 @@ namespace ts { case SyntaxKind.VariableDeclaration: // type annotation if ((parent).type === node) { - diagnostics.push(createDiagnosticForNode(node, Diagnostics.types_can_only_be_used_in_a_ts_file)); + diagnostics.push(createDiagnosticForNode(node, Diagnostics.Type_annotations_can_only_be_used_in_TypeScript_files)); return; } } switch (node.kind) { case SyntaxKind.ImportEqualsDeclaration: - diagnostics.push(createDiagnosticForNode(node, Diagnostics.import_can_only_be_used_in_a_ts_file)); + diagnostics.push(createDiagnosticForNode(node, Diagnostics.import_can_only_be_used_in_TypeScript_files)); return; case SyntaxKind.ExportAssignment: if ((node).isExportEquals) { - diagnostics.push(createDiagnosticForNode(node, Diagnostics.export_can_only_be_used_in_a_ts_file)); + diagnostics.push(createDiagnosticForNode(node, Diagnostics.export_can_only_be_used_in_TypeScript_files)); return; } break; case SyntaxKind.HeritageClause: const heritageClause = node; if (heritageClause.token === SyntaxKind.ImplementsKeyword) { - diagnostics.push(createDiagnosticForNode(node, Diagnostics.implements_clauses_can_only_be_used_in_a_ts_file)); + diagnostics.push(createDiagnosticForNode(node, Diagnostics.implements_clauses_can_only_be_used_in_TypeScript_files)); return; } break; case SyntaxKind.InterfaceDeclaration: - diagnostics.push(createDiagnosticForNode(node, Diagnostics.interface_declarations_can_only_be_used_in_a_ts_file)); + diagnostics.push(createDiagnosticForNode(node, Diagnostics.Interface_declaration_cannot_have_implements_clause)); return; case SyntaxKind.ModuleDeclaration: - diagnostics.push(createDiagnosticForNode(node, Diagnostics.module_declarations_can_only_be_used_in_a_ts_file)); + const moduleKeyword = node.flags & NodeFlags.Namespace ? tokenToString(SyntaxKind.NamespaceKeyword) : tokenToString(SyntaxKind.ModuleKeyword); + Debug.assertDefined(moduleKeyword); + diagnostics.push(createDiagnosticForNode(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, moduleKeyword)); return; case SyntaxKind.TypeAliasDeclaration: - diagnostics.push(createDiagnosticForNode(node, Diagnostics.type_aliases_can_only_be_used_in_a_ts_file)); + diagnostics.push(createDiagnosticForNode(node, Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files)); return; case SyntaxKind.EnumDeclaration: - diagnostics.push(createDiagnosticForNode(node, Diagnostics.enum_declarations_can_only_be_used_in_a_ts_file)); + const enumKeyword = Debug.assertDefined(tokenToString(SyntaxKind.EnumKeyword)); + diagnostics.push(createDiagnosticForNode(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, enumKeyword)); return; case SyntaxKind.NonNullExpression: - diagnostics.push(createDiagnosticForNode(node, Diagnostics.non_null_assertions_can_only_be_used_in_a_ts_file)); + diagnostics.push(createDiagnosticForNode(node, Diagnostics.Non_null_assertions_can_only_be_used_in_TypeScript_files)); return; case SyntaxKind.AsExpression: - diagnostics.push(createDiagnosticForNode((node as AsExpression).type, Diagnostics.type_assertion_expressions_can_only_be_used_in_a_ts_file)); + diagnostics.push(createDiagnosticForNode((node as AsExpression).type, Diagnostics.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)); return; case SyntaxKind.TypeAssertionExpression: Debug.fail(); // Won't parse these in a JS file anyway, as they are interpreted as JSX. @@ -1878,7 +1881,7 @@ namespace ts { case SyntaxKind.ArrowFunction: // Check type parameters if (nodes === (parent).typeParameters) { - diagnostics.push(createDiagnosticForNodeArray(nodes, Diagnostics.type_parameter_declarations_can_only_be_used_in_a_ts_file)); + diagnostics.push(createDiagnosticForNodeArray(nodes, Diagnostics.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)); return; } // falls through @@ -1894,7 +1897,7 @@ namespace ts { if (nodes === (parent).modifiers) { for (const modifier of >nodes) { if (modifier.kind !== SyntaxKind.StaticKeyword) { - diagnostics.push(createDiagnosticForNode(modifier, Diagnostics._0_can_only_be_used_in_a_ts_file, tokenToString(modifier.kind))); + diagnostics.push(createDiagnosticForNode(modifier, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, tokenToString(modifier.kind))); } } return; @@ -1903,7 +1906,7 @@ namespace ts { case SyntaxKind.Parameter: // Check modifiers of parameter declaration if (nodes === (parent).modifiers) { - diagnostics.push(createDiagnosticForNodeArray(nodes, Diagnostics.parameter_modifiers_can_only_be_used_in_a_ts_file)); + diagnostics.push(createDiagnosticForNodeArray(nodes, Diagnostics.Parameter_modifiers_can_only_be_used_in_TypeScript_files)); return; } break; @@ -1915,7 +1918,7 @@ namespace ts { case SyntaxKind.TaggedTemplateExpression: // Check type arguments if (nodes === (parent).typeArguments) { - diagnostics.push(createDiagnosticForNodeArray(nodes, Diagnostics.type_arguments_can_only_be_used_in_a_ts_file)); + diagnostics.push(createDiagnosticForNodeArray(nodes, Diagnostics.Type_arguments_can_only_be_used_in_TypeScript_files)); return; } break; @@ -1941,7 +1944,7 @@ namespace ts { case SyntaxKind.ReadonlyKeyword: case SyntaxKind.DeclareKeyword: case SyntaxKind.AbstractKeyword: - diagnostics.push(createDiagnosticForNode(modifier, Diagnostics._0_can_only_be_used_in_a_ts_file, tokenToString(modifier.kind))); + diagnostics.push(createDiagnosticForNode(modifier, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, tokenToString(modifier.kind))); break; // These are all legal modifiers. diff --git a/src/harness/client.ts b/src/harness/client.ts index 046a5303040..78b454b565b 100644 --- a/src/harness/client.ts +++ b/src/harness/client.ts @@ -374,12 +374,14 @@ namespace ts.server { private getDiagnostics(file: string, command: CommandNames): DiagnosticWithLocation[] { const request = this.processRequest(command, { file, includeLinePosition: true }); const response = this.processResponse(request); + const sourceText = getSnapshotText(this.host.getScriptSnapshot(file)!); + const fakeSourceFile = { fileName: file, text: sourceText } as SourceFile; // Warning! This is a huge lie! return (response.body).map((entry): DiagnosticWithLocation => { const category = firstDefined(Object.keys(DiagnosticCategory), id => isString(id) && entry.category === id.toLowerCase() ? (DiagnosticCategory)[id] : undefined); return { - file: undefined!, // TODO: GH#18217 + file: fakeSourceFile, start: entry.start, length: entry.length, messageText: entry.message, @@ -518,14 +520,14 @@ namespace ts.server { return notImplemented(); } - getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems { + getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems | undefined { const args: protocol.SignatureHelpRequestArgs = this.createFileLocationRequestArgs(fileName, position); const request = this.processRequest(CommandNames.SignatureHelp, args); const response = this.processResponse(request); if (!response.body) { - return undefined!; // TODO: GH#18217 + return undefined; } const { items, applicableSpan: encodedApplicableSpan, selectedItemIndex, argumentIndex, argumentCount } = response.body; diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 62545e54bc7..68a0387f376 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -221,7 +221,7 @@ namespace FourSlash { } } - constructor(private basePath: string, private testType: FourSlashTestType, public testData: FourSlashData) { + constructor(private originalInputFileName: string, private basePath: string, private testType: FourSlashTestType, public testData: FourSlashData) { // Create a new Services Adapter this.cancellationToken = new TestCancellationToken(); let compilationOptions = convertGlobalOptionsToCompilerOptions(this.testData.globalOptions); @@ -1475,7 +1475,7 @@ namespace FourSlash { } public baselineCurrentFileBreakpointLocations() { - const baselineFile = this.getBaselineFileName().replace("breakpointValidation", "bpSpan"); + const baselineFile = this.getBaselineFileNameForInternalFourslashFile().replace("breakpointValidation", "bpSpan"); Harness.Baseline.runBaseline(baselineFile, this.baselineCurrentFileLocations(pos => this.getBreakpointStatementLocation(pos)!)); } @@ -1554,8 +1554,49 @@ namespace FourSlash { return result; } + public baselineSyntacticDiagnostics() { + const files = this.getCompilerTestFiles(); + const result = this.getSyntacticDiagnosticBaselineText(files); + Harness.Baseline.runBaseline(this.getBaselineFileNameForContainingTestFile(), result); + } + + private getCompilerTestFiles() { + return ts.map(this.testData.files, ({ content, fileName }) => ({ + content, unitName: fileName + })); + } + + public baselineSyntacticAndSemanticDiagnostics() { + const files = this.getCompilerTestFiles(); + const result = this.getSyntacticDiagnosticBaselineText(files) + + Harness.IO.newLine() + + Harness.IO.newLine() + + this.getSemanticDiagnosticBaselineText(files); + Harness.Baseline.runBaseline(this.getBaselineFileNameForContainingTestFile(), result); + } + + private getSyntacticDiagnosticBaselineText(files: Harness.Compiler.TestFile[]) { + const diagnostics = ts.flatMap(files, + file => this.languageService.getSyntacticDiagnostics(file.unitName) + ); + const result = `Syntactic Diagnostics for file '${this.originalInputFileName}':` + + Harness.IO.newLine() + + Harness.Compiler.getErrorBaseline(files, diagnostics, /*pretty*/ false); + return result; + } + + private getSemanticDiagnosticBaselineText(files: Harness.Compiler.TestFile[]) { + const diagnostics = ts.flatMap(files, + file => this.languageService.getSemanticDiagnostics(file.unitName) + ); + const result = `Semantic Diagnostics for file '${this.originalInputFileName}':` + + Harness.IO.newLine() + + Harness.Compiler.getErrorBaseline(files, diagnostics, /*pretty*/ false); + return result; + } + public baselineQuickInfo() { - const baselineFile = this.getBaselineFileName(); + const baselineFile = this.getBaselineFileNameForInternalFourslashFile(); Harness.Baseline.runBaseline( baselineFile, stringify( @@ -1567,7 +1608,7 @@ namespace FourSlash { public baselineSmartSelection() { const n = "\n"; - const baselineFile = this.getBaselineFileName(); + const baselineFile = this.getBaselineFileNameForInternalFourslashFile(); const markers = this.getMarkers(); const fileContent = this.activeFile.content; const text = markers.map(marker => { @@ -1652,11 +1693,15 @@ namespace FourSlash { Harness.IO.log(stringify(help.items[help.selectedItemIndex])); } - private getBaselineFileName() { + private getBaselineFileNameForInternalFourslashFile() { return this.testData.globalOptions[MetadataOptionNames.baselineFile] || ts.getBaseFileName(this.activeFile.fileName).replace(ts.Extension.Ts, ".baseline"); } + private getBaselineFileNameForContainingTestFile() { + return ts.getBaseFileName(this.originalInputFileName).replace(ts.Extension.Ts, ".baseline"); + } + private getSignatureHelp({ triggerReason }: FourSlashInterface.VerifySignatureHelpOptions): ts.SignatureHelpItems | undefined { return this.languageService.getSignatureHelpItems(this.activeFile.fileName, this.currentCaretPosition, { triggerReason @@ -3263,7 +3308,7 @@ namespace FourSlash { // Parse out the files and their metadata const testData = parseTestData(absoluteBasePath, content, absoluteFileName); - const state = new TestState(absoluteBasePath, testType, testData); + const state = new TestState(absoluteFileName, absoluteBasePath, testType, testData); const output = ts.transpileModule(content, { reportDiagnostics: true, compilerOptions: { target: ts.ScriptTarget.ES2015 } }); if (output.diagnostics!.length > 0) { throw new Error(`Syntax error in ${absoluteBasePath}: ${output.diagnostics![0].messageText}`); @@ -4122,6 +4167,14 @@ namespace FourSlashInterface { this.state.baselineSmartSelection(); } + public baselineSyntacticDiagnostics() { + this.state.baselineSyntacticDiagnostics(); + } + + public baselineSyntacticAndSemanticDiagnostics() { + this.state.baselineSyntacticAndSemanticDiagnostics(); + } + public nameOrDottedNameSpanTextIs(text: string) { this.state.verifyCurrentNameOrDottedNameSpanText(text); } diff --git a/tests/baselines/reference/decoratorInJsFile.errors.txt b/tests/baselines/reference/decoratorInJsFile.errors.txt index 521c67d4e23..3524eb863e5 100644 --- a/tests/baselines/reference/decoratorInJsFile.errors.txt +++ b/tests/baselines/reference/decoratorInJsFile.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/a.js(3,12): error TS8010: 'types' can only be used in a .ts file. +tests/cases/compiler/a.js(3,12): error TS8010: Type annotations can only be used in TypeScript files. ==== tests/cases/compiler/a.js (1 errors) ==== @@ -6,7 +6,7 @@ tests/cases/compiler/a.js(3,12): error TS8010: 'types' can only be used in a .ts class SomeClass { foo(x: number) { ~~~~~~ -!!! error TS8010: 'types' can only be used in a .ts file. +!!! error TS8010: Type annotations can only be used in TypeScript files. } } \ No newline at end of file diff --git a/tests/baselines/reference/decoratorInJsFile1.errors.txt b/tests/baselines/reference/decoratorInJsFile1.errors.txt index 9cb55bd2016..e436dfca859 100644 --- a/tests/baselines/reference/decoratorInJsFile1.errors.txt +++ b/tests/baselines/reference/decoratorInJsFile1.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/a.js(2,7): error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning. -tests/cases/compiler/a.js(3,12): error TS8010: 'types' can only be used in a .ts file. +tests/cases/compiler/a.js(3,12): error TS8010: Type annotations can only be used in TypeScript files. ==== tests/cases/compiler/a.js (2 errors) ==== @@ -9,7 +9,7 @@ tests/cases/compiler/a.js(3,12): error TS8010: 'types' can only be used in a .ts !!! error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning. foo(x: number) { ~~~~~~ -!!! error TS8010: 'types' can only be used in a .ts file. +!!! error TS8010: Type annotations can only be used in TypeScript files. } } \ No newline at end of file diff --git a/tests/baselines/reference/fillInMissingTypeArgsOnJSConstructCalls.errors.txt b/tests/baselines/reference/fillInMissingTypeArgsOnJSConstructCalls.errors.txt index 966e3e35613..f40ed6fa996 100644 --- a/tests/baselines/reference/fillInMissingTypeArgsOnJSConstructCalls.errors.txt +++ b/tests/baselines/reference/fillInMissingTypeArgsOnJSConstructCalls.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/BaseB.js(2,24): error TS8004: 'type parameter declarations' can only be used in a .ts file. +tests/cases/compiler/BaseB.js(2,24): error TS8004: Type parameter declarations can only be used in TypeScript files. tests/cases/compiler/BaseB.js(2,25): error TS1005: ',' expected. tests/cases/compiler/BaseB.js(3,14): error TS2304: Cannot find name 'Class'. -tests/cases/compiler/BaseB.js(3,14): error TS8010: 'types' can only be used in a .ts file. +tests/cases/compiler/BaseB.js(3,14): error TS8010: Type annotations can only be used in TypeScript files. tests/cases/compiler/BaseB.js(4,25): error TS2304: Cannot find name 'Class'. -tests/cases/compiler/BaseB.js(4,25): error TS8010: 'types' can only be used in a .ts file. -tests/cases/compiler/SubB.js(3,41): error TS8011: 'type arguments' can only be used in a .ts file. +tests/cases/compiler/BaseB.js(4,25): error TS8010: Type annotations can only be used in TypeScript files. +tests/cases/compiler/SubB.js(3,41): error TS8011: Type arguments can only be used in TypeScript files. ==== tests/cases/compiler/BaseA.js (0 errors) ==== @@ -19,19 +19,19 @@ tests/cases/compiler/SubB.js(3,41): error TS8011: 'type arguments' can only be u import BaseA from './BaseA'; export default class B { ~~~~~~~~ -!!! error TS8004: 'type parameter declarations' can only be used in a .ts file. +!!! error TS8004: Type parameter declarations can only be used in TypeScript files. ~ !!! error TS1005: ',' expected. _AClass: Class; ~~~~~ !!! error TS2304: Cannot find name 'Class'. ~~~~~~~~ -!!! error TS8010: 'types' can only be used in a .ts file. +!!! error TS8010: Type annotations can only be used in TypeScript files. constructor(AClass: Class) { ~~~~~ !!! error TS2304: Cannot find name 'Class'. ~~~~~~~~ -!!! error TS8010: 'types' can only be used in a .ts file. +!!! error TS8010: Type annotations can only be used in TypeScript files. this._AClass = AClass; } } @@ -40,7 +40,7 @@ tests/cases/compiler/SubB.js(3,41): error TS8011: 'type arguments' can only be u import BaseB from './BaseB'; export default class SubB extends BaseB { ~~~~ -!!! error TS8011: 'type arguments' can only be used in a .ts file. +!!! error TS8011: Type arguments can only be used in TypeScript files. constructor() { super(SubA); } diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics01.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics01.baseline new file mode 100644 index 00000000000..934bc31c831 --- /dev/null +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics01.baseline @@ -0,0 +1,17 @@ +Syntactic Diagnostics for file '/tests/cases/fourslash/server/getJavaScriptSyntacticDiagnostics01.ts': +/tests/cases/fourslash/server/a.js(1,5): error TS1134: Variable declaration expected. +/tests/cases/fourslash/server/a.js(1,8): error TS1109: Expression expected. + + +==== /tests/cases/fourslash/server/a.js (2 errors) ==== + var ===; + ~~~ +!!! error TS1134: Variable declaration expected. + ~ +!!! error TS1109: Expression expected. + +Semantic Diagnostics for file '/tests/cases/fourslash/server/getJavaScriptSyntacticDiagnostics01.ts': + + +==== /tests/cases/fourslash/server/a.js (0 errors) ==== + var ===; \ No newline at end of file diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics02.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics02.baseline new file mode 100644 index 00000000000..fae50364167 --- /dev/null +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics02.baseline @@ -0,0 +1,32 @@ +Syntactic Diagnostics for file '/tests/cases/fourslash/server/getJavaScriptSyntacticDiagnostics02.ts': +/tests/cases/fourslash/server/b.js(2,8): error TS8010: Type annotations can only be used in TypeScript files. +/tests/cases/fourslash/server/b.js(3,17): error TS8010: Type annotations can only be used in TypeScript files. +/tests/cases/fourslash/server/b.js(4,5): error TS1134: Variable declaration expected. +/tests/cases/fourslash/server/b.js(4,9): error TS1134: Variable declaration expected. +/tests/cases/fourslash/server/b.js(4,11): error TS1134: Variable declaration expected. + + +==== /tests/cases/fourslash/server/b.js (5 errors) ==== + var a = "a"; + var b: boolean = true; + ~~~~~~~ +!!! error TS8010: Type annotations can only be used in TypeScript files. + function foo(): string { } + ~~~~~~ +!!! error TS8010: Type annotations can only be used in TypeScript files. + var var = "c"; + ~~~ +!!! error TS1134: Variable declaration expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~ +!!! error TS1134: Variable declaration expected. + +Semantic Diagnostics for file '/tests/cases/fourslash/server/getJavaScriptSyntacticDiagnostics02.ts': + + +==== /tests/cases/fourslash/server/b.js (0 errors) ==== + var a = "a"; + var b: boolean = true; + function foo(): string { } + var var = "c"; \ No newline at end of file diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics1.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics1.baseline new file mode 100644 index 00000000000..780c5a15082 --- /dev/null +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics1.baseline @@ -0,0 +1,8 @@ +Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics1.ts': +/tests/cases/fourslash/a.js(1,1): error TS8002: 'import ... =' can only be used in TypeScript files. + + +==== /tests/cases/fourslash/a.js (1 errors) ==== + import a = b; + ~~~~~~~~~~~~~ +!!! error TS8002: 'import ... =' can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics10.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics10.baseline new file mode 100644 index 00000000000..ca184aa5aad --- /dev/null +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics10.baseline @@ -0,0 +1,8 @@ +Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics10.ts': +/tests/cases/fourslash/a.js(1,12): error TS8004: Type parameter declarations can only be used in TypeScript files. + + +==== /tests/cases/fourslash/a.js (1 errors) ==== + function F() { } + ~ +!!! error TS8004: Type parameter declarations can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics11.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics11.baseline new file mode 100644 index 00000000000..c23fbe8672f --- /dev/null +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics11.baseline @@ -0,0 +1,8 @@ +Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics11.ts': +/tests/cases/fourslash/a.js(1,15): error TS8010: Type annotations can only be used in TypeScript files. + + +==== /tests/cases/fourslash/a.js (1 errors) ==== + function F(): number { } + ~~~~~~ +!!! error TS8010: Type annotations can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics12.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics12.baseline new file mode 100644 index 00000000000..73ca590b32a --- /dev/null +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics12.baseline @@ -0,0 +1,8 @@ +Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics12.ts': +/tests/cases/fourslash/a.js(1,1): error TS8009: The 'declare' modifier can only be used in TypeScript files. + + +==== /tests/cases/fourslash/a.js (1 errors) ==== + declare var v; + ~~~~~~~ +!!! error TS8009: The 'declare' modifier can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics13.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics13.baseline new file mode 100644 index 00000000000..a2dcecb6a40 --- /dev/null +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics13.baseline @@ -0,0 +1,8 @@ +Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics13.ts': +/tests/cases/fourslash/a.js(1,8): error TS8010: Type annotations can only be used in TypeScript files. + + +==== /tests/cases/fourslash/a.js (1 errors) ==== + var v: () => number; + ~~~~~~~~~~~~ +!!! error TS8010: Type annotations can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics14.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics14.baseline new file mode 100644 index 00000000000..89eed8663ec --- /dev/null +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics14.baseline @@ -0,0 +1,8 @@ +Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics14.ts': +/tests/cases/fourslash/a.js(1,5): error TS8011: Type arguments can only be used in TypeScript files. + + +==== /tests/cases/fourslash/a.js (1 errors) ==== + Foo(); + ~~~~~~ +!!! error TS8011: Type arguments can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics15.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics15.baseline new file mode 100644 index 00000000000..f30956f93c4 --- /dev/null +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics15.baseline @@ -0,0 +1,8 @@ +Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics15.ts': +/tests/cases/fourslash/a.js(1,12): error TS8012: Parameter modifiers can only be used in TypeScript files. + + +==== /tests/cases/fourslash/a.js (1 errors) ==== + function F(public p) { } + ~~~~~~ +!!! error TS8012: Parameter modifiers can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics16.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics16.baseline new file mode 100644 index 00000000000..c72e41a2d04 --- /dev/null +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics16.baseline @@ -0,0 +1,8 @@ +Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics16.ts': +/tests/cases/fourslash/a.js(1,13): error TS8009: The '?' modifier can only be used in TypeScript files. + + +==== /tests/cases/fourslash/a.js (1 errors) ==== + function F(p?) { } + ~ +!!! error TS8009: The '?' modifier can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics17.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics17.baseline new file mode 100644 index 00000000000..199c3cbfd80 --- /dev/null +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics17.baseline @@ -0,0 +1,8 @@ +Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics17.ts': +/tests/cases/fourslash/a.js(1,15): error TS8010: Type annotations can only be used in TypeScript files. + + +==== /tests/cases/fourslash/a.js (1 errors) ==== + function F(a: number) { } + ~~~~~~ +!!! error TS8010: Type annotations can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics18.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics18.baseline new file mode 100644 index 00000000000..c493a7f97c8 --- /dev/null +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics18.baseline @@ -0,0 +1,19 @@ +Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics18.ts': +/tests/cases/fourslash/a.js(4,5): error TS8009: The 'public' modifier can only be used in TypeScript files. +/tests/cases/fourslash/b.js(2,8): error TS8010: Type annotations can only be used in TypeScript files. + + +==== /tests/cases/fourslash/a.js (1 errors) ==== + class C { + x; // Regular property declaration allowed + static y; // static allowed + public z; // public not allowed + ~~~~~~ +!!! error TS8009: The 'public' modifier can only be used in TypeScript files. + } +==== /tests/cases/fourslash/b.js (1 errors) ==== + class C { + x: number; // Types not allowed + ~~~~~~ +!!! error TS8010: Type annotations can only be used in TypeScript files. + } \ No newline at end of file diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics19.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics19.baseline new file mode 100644 index 00000000000..28d89307f19 --- /dev/null +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics19.baseline @@ -0,0 +1,8 @@ +Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics19.ts': +/tests/cases/fourslash/a.js(1,6): error TS8006: 'enum' declarations can only be used in TypeScript files. + + +==== /tests/cases/fourslash/a.js (1 errors) ==== + enum E { } + ~ +!!! error TS8006: 'enum' declarations can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics2.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics2.baseline new file mode 100644 index 00000000000..f786f88c988 --- /dev/null +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics2.baseline @@ -0,0 +1,8 @@ +Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics2.ts': +/tests/cases/fourslash/a.js(1,1): error TS8003: 'export =' can only be used in TypeScript files. + + +==== /tests/cases/fourslash/a.js (1 errors) ==== + export = b; + ~~~~~~~~~~~ +!!! error TS8003: 'export =' can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics3.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics3.baseline new file mode 100644 index 00000000000..de3624928b0 --- /dev/null +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics3.baseline @@ -0,0 +1,8 @@ +Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics3.ts': +/tests/cases/fourslash/a.js(1,9): error TS8004: Type parameter declarations can only be used in TypeScript files. + + +==== /tests/cases/fourslash/a.js (1 errors) ==== + class C { } + ~ +!!! error TS8004: Type parameter declarations can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics4.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics4.baseline new file mode 100644 index 00000000000..59e80b81dd2 --- /dev/null +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics4.baseline @@ -0,0 +1,8 @@ +Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics4.ts': +/tests/cases/fourslash/a.js(1,1): error TS8009: The 'public' modifier can only be used in TypeScript files. + + +==== /tests/cases/fourslash/a.js (1 errors) ==== + public class C { } + ~~~~~~ +!!! error TS8009: The 'public' modifier can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics5.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics5.baseline new file mode 100644 index 00000000000..06f705ebe79 --- /dev/null +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics5.baseline @@ -0,0 +1,8 @@ +Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics5.ts': +/tests/cases/fourslash/a.js(1,9): error TS8005: 'implements' clauses can only be used in TypeScript files. + + +==== /tests/cases/fourslash/a.js (1 errors) ==== + class C implements D { } + ~~~~~~~~~~~~ +!!! error TS8005: 'implements' clauses can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics6.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics6.baseline new file mode 100644 index 00000000000..a129f7ca8c5 --- /dev/null +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics6.baseline @@ -0,0 +1,8 @@ +Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics6.ts': +/tests/cases/fourslash/a.js(1,11): error TS1176: Interface declaration cannot have 'implements' clause. + + +==== /tests/cases/fourslash/a.js (1 errors) ==== + interface I { } + ~ +!!! error TS1176: Interface declaration cannot have 'implements' clause. \ No newline at end of file diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics7.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics7.baseline new file mode 100644 index 00000000000..86420e6a056 --- /dev/null +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics7.baseline @@ -0,0 +1,8 @@ +Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics7.ts': +/tests/cases/fourslash/a.js(1,8): error TS8006: 'module' declarations can only be used in TypeScript files. + + +==== /tests/cases/fourslash/a.js (1 errors) ==== + module M { } + ~ +!!! error TS8006: 'module' declarations can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics8.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics8.baseline new file mode 100644 index 00000000000..27ea265b073 --- /dev/null +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics8.baseline @@ -0,0 +1,8 @@ +Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics8.ts': +/tests/cases/fourslash/a.js(1,6): error TS8008: Type aliases can only be used in TypeScript files. + + +==== /tests/cases/fourslash/a.js (1 errors) ==== + type a = b; + ~ +!!! error TS8008: Type aliases can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics9.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics9.baseline new file mode 100644 index 00000000000..64193706ccc --- /dev/null +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics9.baseline @@ -0,0 +1,8 @@ +Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics9.ts': +/tests/cases/fourslash/a.js(1,1): error TS8009: The 'public' modifier can only be used in TypeScript files. + + +==== /tests/cases/fourslash/a.js (1 errors) ==== + public function F() { } + ~~~~~~ +!!! error TS8009: The 'public' modifier can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/jsDeclarationsClassesErr.errors.txt b/tests/baselines/reference/jsDeclarationsClassesErr.errors.txt index ef78bf109c8..0f2fd791aab 100644 --- a/tests/baselines/reference/jsDeclarationsClassesErr.errors.txt +++ b/tests/baselines/reference/jsDeclarationsClassesErr.errors.txt @@ -1,24 +1,24 @@ -tests/cases/conformance/jsdoc/declarations/index.js(4,16): error TS8004: 'type parameter declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(5,12): error TS8010: 'types' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(8,16): error TS8004: 'type parameter declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(8,29): error TS8011: 'type arguments' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(9,12): error TS8010: 'types' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(13,11): error TS8010: 'types' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(19,11): error TS8010: 'types' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(23,11): error TS8010: 'types' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(27,11): error TS8010: 'types' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(28,11): error TS8010: 'types' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(32,11): error TS8010: 'types' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(39,11): error TS8010: 'types' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(43,11): error TS8010: 'types' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(47,11): error TS8010: 'types' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(48,11): error TS8010: 'types' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(52,11): error TS8010: 'types' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(53,11): error TS8010: 'types' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(59,11): error TS8010: 'types' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(63,11): error TS8010: 'types' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(67,11): error TS8010: 'types' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(68,11): error TS8010: 'types' can only be used in a .ts file. +tests/cases/conformance/jsdoc/declarations/index.js(4,16): error TS8004: Type parameter declarations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(5,12): error TS8010: Type annotations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(8,16): error TS8004: Type parameter declarations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(8,29): error TS8011: Type arguments can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(9,12): error TS8010: Type annotations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(13,11): error TS8010: Type annotations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(19,11): error TS8010: Type annotations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(23,11): error TS8010: Type annotations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(27,11): error TS8010: Type annotations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(28,11): error TS8010: Type annotations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(32,11): error TS8010: Type annotations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(39,11): error TS8010: Type annotations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(43,11): error TS8010: Type annotations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(47,11): error TS8010: Type annotations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(48,11): error TS8010: Type annotations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(52,11): error TS8010: Type annotations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(53,11): error TS8010: Type annotations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(59,11): error TS8010: Type annotations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(63,11): error TS8010: Type annotations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(67,11): error TS8010: Type annotations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(68,11): error TS8010: Type annotations can only be used in TypeScript files. ==== tests/cases/conformance/jsdoc/declarations/index.js (21 errors) ==== @@ -27,26 +27,26 @@ tests/cases/conformance/jsdoc/declarations/index.js(68,11): error TS8010: 'types export class M { ~ -!!! error TS8004: 'type parameter declarations' can only be used in a .ts file. +!!! error TS8004: Type parameter declarations can only be used in TypeScript files. field: T; ~ -!!! error TS8010: 'types' can only be used in a .ts file. +!!! error TS8010: Type annotations can only be used in TypeScript files. } export class N extends M { ~ -!!! error TS8004: 'type parameter declarations' can only be used in a .ts file. +!!! error TS8004: Type parameter declarations can only be used in TypeScript files. ~ -!!! error TS8011: 'type arguments' can only be used in a .ts file. +!!! error TS8011: Type arguments can only be used in TypeScript files. other: U; ~ -!!! error TS8010: 'types' can only be used in a .ts file. +!!! error TS8010: Type annotations can only be used in TypeScript files. } export class O { [idx: string]: string; ~~~~~~ -!!! error TS8010: 'types' can only be used in a .ts file. +!!! error TS8010: Type annotations can only be used in TypeScript files. } export class P extends O {} @@ -54,28 +54,28 @@ tests/cases/conformance/jsdoc/declarations/index.js(68,11): error TS8010: 'types export class Q extends O { [idx: string]: "ok"; ~~~~~~ -!!! error TS8010: 'types' can only be used in a .ts file. +!!! error TS8010: Type annotations can only be used in TypeScript files. } export class R extends O { [idx: number]: "ok"; ~~~~~~ -!!! error TS8010: 'types' can only be used in a .ts file. +!!! error TS8010: Type annotations can only be used in TypeScript files. } export class S extends O { [idx: string]: "ok"; ~~~~~~ -!!! error TS8010: 'types' can only be used in a .ts file. +!!! error TS8010: Type annotations can only be used in TypeScript files. [idx: number]: never; ~~~~~~ -!!! error TS8010: 'types' can only be used in a .ts file. +!!! error TS8010: Type annotations can only be used in TypeScript files. } export class T { [idx: number]: string; ~~~~~~ -!!! error TS8010: 'types' can only be used in a .ts file. +!!! error TS8010: Type annotations can only be used in TypeScript files. } export class U extends T {} @@ -84,31 +84,31 @@ tests/cases/conformance/jsdoc/declarations/index.js(68,11): error TS8010: 'types export class V extends T { [idx: string]: string; ~~~~~~ -!!! error TS8010: 'types' can only be used in a .ts file. +!!! error TS8010: Type annotations can only be used in TypeScript files. } export class W extends T { [idx: number]: "ok"; ~~~~~~ -!!! error TS8010: 'types' can only be used in a .ts file. +!!! error TS8010: Type annotations can only be used in TypeScript files. } export class X extends T { [idx: string]: string; ~~~~~~ -!!! error TS8010: 'types' can only be used in a .ts file. +!!! error TS8010: Type annotations can only be used in TypeScript files. [idx: number]: "ok"; ~~~~~~ -!!! error TS8010: 'types' can only be used in a .ts file. +!!! error TS8010: Type annotations can only be used in TypeScript files. } export class Y { [idx: string]: {x: number}; ~~~~~~ -!!! error TS8010: 'types' can only be used in a .ts file. +!!! error TS8010: Type annotations can only be used in TypeScript files. [idx: number]: {x: number, y: number}; ~~~~~~ -!!! error TS8010: 'types' can only be used in a .ts file. +!!! error TS8010: Type annotations can only be used in TypeScript files. } export class Z extends Y {} @@ -116,21 +116,21 @@ tests/cases/conformance/jsdoc/declarations/index.js(68,11): error TS8010: 'types export class AA extends Y { [idx: string]: {x: number, y: number}; ~~~~~~ -!!! error TS8010: 'types' can only be used in a .ts file. +!!! error TS8010: Type annotations can only be used in TypeScript files. } export class BB extends Y { [idx: number]: {x: 0, y: 0}; ~~~~~~ -!!! error TS8010: 'types' can only be used in a .ts file. +!!! error TS8010: Type annotations can only be used in TypeScript files. } export class CC extends Y { [idx: string]: {x: number, y: number}; ~~~~~~ -!!! error TS8010: 'types' can only be used in a .ts file. +!!! error TS8010: Type annotations can only be used in TypeScript files. [idx: number]: {x: 0, y: 0}; ~~~~~~ -!!! error TS8010: 'types' can only be used in a .ts file. +!!! error TS8010: Type annotations can only be used in TypeScript files. } \ No newline at end of file diff --git a/tests/baselines/reference/jsDeclarationsEnums.errors.txt b/tests/baselines/reference/jsDeclarationsEnums.errors.txt index 630d4aab7e9..d11d246f978 100644 --- a/tests/baselines/reference/jsDeclarationsEnums.errors.txt +++ b/tests/baselines/reference/jsDeclarationsEnums.errors.txt @@ -1,15 +1,15 @@ -tests/cases/conformance/jsdoc/declarations/index.js(4,13): error TS8015: 'enum declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(6,13): error TS8015: 'enum declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(10,6): error TS8015: 'enum declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(14,6): error TS8015: 'enum declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(18,13): error TS8015: 'enum declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(22,13): error TS8015: 'enum declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(24,13): error TS8015: 'enum declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(30,13): error TS8015: 'enum declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(35,13): error TS8015: 'enum declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(41,19): error TS8015: 'enum declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(47,13): error TS8015: 'enum declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(55,19): error TS8015: 'enum declarations' can only be used in a .ts file. +tests/cases/conformance/jsdoc/declarations/index.js(4,13): error TS8006: 'enum' declarations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(6,13): error TS8006: 'enum' declarations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(10,6): error TS8006: 'enum' declarations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(14,6): error TS8006: 'enum' declarations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(18,13): error TS8006: 'enum' declarations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(22,13): error TS8006: 'enum' declarations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(24,13): error TS8006: 'enum' declarations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(30,13): error TS8006: 'enum' declarations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(35,13): error TS8006: 'enum' declarations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(41,19): error TS8006: 'enum' declarations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(47,13): error TS8006: 'enum' declarations can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/index.js(55,19): error TS8006: 'enum' declarations can only be used in TypeScript files. ==== tests/cases/conformance/jsdoc/declarations/index.js (12 errors) ==== @@ -18,39 +18,39 @@ tests/cases/conformance/jsdoc/declarations/index.js(55,19): error TS8015: 'enum export enum A {} ~ -!!! error TS8015: 'enum declarations' can only be used in a .ts file. +!!! error TS8006: 'enum' declarations can only be used in TypeScript files. export enum B { ~ -!!! error TS8015: 'enum declarations' can only be used in a .ts file. +!!! error TS8006: 'enum' declarations can only be used in TypeScript files. Member } enum C {} ~ -!!! error TS8015: 'enum declarations' can only be used in a .ts file. +!!! error TS8006: 'enum' declarations can only be used in TypeScript files. export { C }; enum DD {} ~~ -!!! error TS8015: 'enum declarations' can only be used in a .ts file. +!!! error TS8006: 'enum' declarations can only be used in TypeScript files. export { DD as D }; export enum E {} ~ -!!! error TS8015: 'enum declarations' can only be used in a .ts file. +!!! error TS8006: 'enum' declarations can only be used in TypeScript files. export { E as EE }; export { F as FF }; export enum F {} ~ -!!! error TS8015: 'enum declarations' can only be used in a .ts file. +!!! error TS8006: 'enum' declarations can only be used in TypeScript files. export enum G { ~ -!!! error TS8015: 'enum declarations' can only be used in a .ts file. +!!! error TS8006: 'enum' declarations can only be used in TypeScript files. A = 1, B, C @@ -58,14 +58,14 @@ tests/cases/conformance/jsdoc/declarations/index.js(55,19): error TS8015: 'enum export enum H { ~ -!!! error TS8015: 'enum declarations' can only be used in a .ts file. +!!! error TS8006: 'enum' declarations can only be used in TypeScript files. A = "a", B = "b" } export enum I { ~ -!!! error TS8015: 'enum declarations' can only be used in a .ts file. +!!! error TS8006: 'enum' declarations can only be used in TypeScript files. A = "a", B = 0, C @@ -73,7 +73,7 @@ tests/cases/conformance/jsdoc/declarations/index.js(55,19): error TS8015: 'enum export const enum J { ~ -!!! error TS8015: 'enum declarations' can only be used in a .ts file. +!!! error TS8006: 'enum' declarations can only be used in TypeScript files. A = 1, B, C @@ -81,7 +81,7 @@ tests/cases/conformance/jsdoc/declarations/index.js(55,19): error TS8015: 'enum export enum K { ~ -!!! error TS8015: 'enum declarations' can only be used in a .ts file. +!!! error TS8006: 'enum' declarations can only be used in TypeScript files. None = 0, A = 1 << 0, B = 1 << 1, @@ -91,7 +91,7 @@ tests/cases/conformance/jsdoc/declarations/index.js(55,19): error TS8015: 'enum export const enum L { ~ -!!! error TS8015: 'enum declarations' can only be used in a .ts file. +!!! error TS8006: 'enum' declarations can only be used in TypeScript files. None = 0, A = 1 << 0, B = 1 << 1, diff --git a/tests/baselines/reference/jsDeclarationsExportFormsErr.errors.txt b/tests/baselines/reference/jsDeclarationsExportFormsErr.errors.txt index d0d5c78f0d1..0a71049f2fc 100644 --- a/tests/baselines/reference/jsDeclarationsExportFormsErr.errors.txt +++ b/tests/baselines/reference/jsDeclarationsExportFormsErr.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/jsdoc/declarations/bar.js(1,1): error TS8002: 'import ... =' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/bar.js(2,1): error TS8003: 'export=' can only be used in a .ts file. +tests/cases/conformance/jsdoc/declarations/bar.js(1,1): error TS8002: 'import ... =' can only be used in TypeScript files. +tests/cases/conformance/jsdoc/declarations/bar.js(2,1): error TS8003: 'export =' can only be used in TypeScript files. tests/cases/conformance/jsdoc/declarations/bin.js(2,1): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`. tests/cases/conformance/jsdoc/declarations/globalNs.js(2,1): error TS1315: Global module exports may only appear in declaration files. @@ -10,10 +10,10 @@ tests/cases/conformance/jsdoc/declarations/globalNs.js(2,1): error TS1315: Globa ==== tests/cases/conformance/jsdoc/declarations/bar.js (2 errors) ==== import ns = require("./cls"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS8002: 'import ... =' can only be used in a .ts file. +!!! error TS8002: 'import ... =' can only be used in TypeScript files. export = ns; // TS Only ~~~~~~~~~~~~ -!!! error TS8003: 'export=' can only be used in a .ts file. +!!! error TS8003: 'export =' can only be used in TypeScript files. ==== tests/cases/conformance/jsdoc/declarations/bin.js (1 errors) ==== import * as ns from "./cls"; diff --git a/tests/baselines/reference/jsDeclarationsInterfaces.errors.txt b/tests/baselines/reference/jsDeclarationsInterfaces.errors.txt index 24ed71af908..50efca43598 100644 --- a/tests/baselines/reference/jsDeclarationsInterfaces.errors.txt +++ b/tests/baselines/reference/jsDeclarationsInterfaces.errors.txt @@ -1,29 +1,29 @@ -tests/cases/conformance/jsdoc/declarations/index.js(4,18): error TS8006: 'interface declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(6,18): error TS8006: 'interface declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(10,18): error TS8006: 'interface declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(31,11): error TS8006: 'interface declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(35,11): error TS8006: 'interface declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(39,18): error TS8006: 'interface declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(43,18): error TS8006: 'interface declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(45,18): error TS8006: 'interface declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(49,18): error TS8006: 'interface declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(53,18): error TS8006: 'interface declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(57,18): error TS8006: 'interface declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(61,18): error TS8006: 'interface declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(65,18): error TS8006: 'interface declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(67,18): error TS8006: 'interface declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(71,18): error TS8006: 'interface declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(75,18): error TS8006: 'interface declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(80,18): error TS8006: 'interface declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(84,18): error TS8006: 'interface declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(87,18): error TS8006: 'interface declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(91,18): error TS8006: 'interface declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(95,18): error TS8006: 'interface declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(100,18): error TS8006: 'interface declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(105,18): error TS8006: 'interface declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(107,18): error TS8006: 'interface declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(111,18): error TS8006: 'interface declarations' can only be used in a .ts file. -tests/cases/conformance/jsdoc/declarations/index.js(115,18): error TS8006: 'interface declarations' can only be used in a .ts file. +tests/cases/conformance/jsdoc/declarations/index.js(4,18): error TS1176: Interface declaration cannot have 'implements' clause. +tests/cases/conformance/jsdoc/declarations/index.js(6,18): error TS1176: Interface declaration cannot have 'implements' clause. +tests/cases/conformance/jsdoc/declarations/index.js(10,18): error TS1176: Interface declaration cannot have 'implements' clause. +tests/cases/conformance/jsdoc/declarations/index.js(31,11): error TS1176: Interface declaration cannot have 'implements' clause. +tests/cases/conformance/jsdoc/declarations/index.js(35,11): error TS1176: Interface declaration cannot have 'implements' clause. +tests/cases/conformance/jsdoc/declarations/index.js(39,18): error TS1176: Interface declaration cannot have 'implements' clause. +tests/cases/conformance/jsdoc/declarations/index.js(43,18): error TS1176: Interface declaration cannot have 'implements' clause. +tests/cases/conformance/jsdoc/declarations/index.js(45,18): error TS1176: Interface declaration cannot have 'implements' clause. +tests/cases/conformance/jsdoc/declarations/index.js(49,18): error TS1176: Interface declaration cannot have 'implements' clause. +tests/cases/conformance/jsdoc/declarations/index.js(53,18): error TS1176: Interface declaration cannot have 'implements' clause. +tests/cases/conformance/jsdoc/declarations/index.js(57,18): error TS1176: Interface declaration cannot have 'implements' clause. +tests/cases/conformance/jsdoc/declarations/index.js(61,18): error TS1176: Interface declaration cannot have 'implements' clause. +tests/cases/conformance/jsdoc/declarations/index.js(65,18): error TS1176: Interface declaration cannot have 'implements' clause. +tests/cases/conformance/jsdoc/declarations/index.js(67,18): error TS1176: Interface declaration cannot have 'implements' clause. +tests/cases/conformance/jsdoc/declarations/index.js(71,18): error TS1176: Interface declaration cannot have 'implements' clause. +tests/cases/conformance/jsdoc/declarations/index.js(75,18): error TS1176: Interface declaration cannot have 'implements' clause. +tests/cases/conformance/jsdoc/declarations/index.js(80,18): error TS1176: Interface declaration cannot have 'implements' clause. +tests/cases/conformance/jsdoc/declarations/index.js(84,18): error TS1176: Interface declaration cannot have 'implements' clause. +tests/cases/conformance/jsdoc/declarations/index.js(87,18): error TS1176: Interface declaration cannot have 'implements' clause. +tests/cases/conformance/jsdoc/declarations/index.js(91,18): error TS1176: Interface declaration cannot have 'implements' clause. +tests/cases/conformance/jsdoc/declarations/index.js(95,18): error TS1176: Interface declaration cannot have 'implements' clause. +tests/cases/conformance/jsdoc/declarations/index.js(100,18): error TS1176: Interface declaration cannot have 'implements' clause. +tests/cases/conformance/jsdoc/declarations/index.js(105,18): error TS1176: Interface declaration cannot have 'implements' clause. +tests/cases/conformance/jsdoc/declarations/index.js(107,18): error TS1176: Interface declaration cannot have 'implements' clause. +tests/cases/conformance/jsdoc/declarations/index.js(111,18): error TS1176: Interface declaration cannot have 'implements' clause. +tests/cases/conformance/jsdoc/declarations/index.js(115,18): error TS1176: Interface declaration cannot have 'implements' clause. ==== tests/cases/conformance/jsdoc/declarations/index.js (26 errors) ==== @@ -32,17 +32,17 @@ tests/cases/conformance/jsdoc/declarations/index.js(115,18): error TS8006: 'inte export interface A {} ~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. export interface B { ~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. cat: string; } export interface C { ~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. field: T & U; optionalField?: T; readonly readonlyField: T & U; @@ -65,135 +65,135 @@ tests/cases/conformance/jsdoc/declarations/index.js(115,18): error TS8006: 'inte interface G {} ~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. export { G }; interface HH {} ~~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. export { HH as H }; export interface I {} ~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. export { I as II }; export { J as JJ }; export interface J {} ~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. export interface K extends I,J { ~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. x: string; } export interface L extends K { ~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. y: string; } export interface M { ~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. field: T; } export interface N extends M { ~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. other: U; } export interface O { ~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. [idx: string]: string; } export interface P extends O {} ~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. export interface Q extends O { ~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. [idx: string]: "ok"; } export interface R extends O { ~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. [idx: number]: "ok"; } export interface S extends O { ~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. [idx: string]: "ok"; [idx: number]: never; } export interface T { ~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. [idx: number]: string; } export interface U extends T {} ~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. export interface V extends T { ~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. [idx: string]: string; } export interface W extends T { ~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. [idx: number]: "ok"; } export interface X extends T { ~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. [idx: string]: string; [idx: number]: "ok"; } export interface Y { ~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. [idx: string]: {x: number}; [idx: number]: {x: number, y: number}; } export interface Z extends Y {} ~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. export interface AA extends Y { ~~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. [idx: string]: {x: number, y: number}; } export interface BB extends Y { ~~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. [idx: number]: {x: 0, y: 0}; } export interface CC extends Y { ~~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. +!!! error TS1176: Interface declaration cannot have 'implements' clause. [idx: string]: {x: number, y: number}; [idx: number]: {x: 0, y: 0}; } diff --git a/tests/baselines/reference/jsFileCompilationAbstractModifier.errors.txt b/tests/baselines/reference/jsFileCompilationAbstractModifier.errors.txt index 48bf64ac109..59e6dff6903 100644 --- a/tests/baselines/reference/jsFileCompilationAbstractModifier.errors.txt +++ b/tests/baselines/reference/jsFileCompilationAbstractModifier.errors.txt @@ -1,7 +1,7 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -tests/cases/compiler/a.js(1,1): error TS8009: 'abstract' can only be used in a .ts file. -tests/cases/compiler/a.js(2,5): error TS8009: 'abstract' can only be used in a .ts file. +tests/cases/compiler/a.js(1,1): error TS8009: The 'abstract' modifier can only be used in TypeScript files. +tests/cases/compiler/a.js(2,5): error TS8009: The 'abstract' modifier can only be used in TypeScript files. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. @@ -9,8 +9,8 @@ tests/cases/compiler/a.js(2,5): error TS8009: 'abstract' can only be used in a . ==== tests/cases/compiler/a.js (2 errors) ==== abstract class c { ~~~~~~~~ -!!! error TS8009: 'abstract' can only be used in a .ts file. +!!! error TS8009: The 'abstract' modifier can only be used in TypeScript files. abstract x; ~~~~~~~~ -!!! error TS8009: 'abstract' can only be used in a .ts file. +!!! error TS8009: The 'abstract' modifier can only be used in TypeScript files. } \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt index 75451b15389..b7082bc2674 100644 --- a/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt @@ -1,6 +1,6 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -tests/cases/compiler/a.js(1,1): error TS8009: 'declare' can only be used in a .ts file. +tests/cases/compiler/a.js(1,1): error TS8009: The 'declare' modifier can only be used in TypeScript files. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. @@ -8,4 +8,4 @@ tests/cases/compiler/a.js(1,1): error TS8009: 'declare' can only be used in a .t ==== tests/cases/compiler/a.js (1 errors) ==== declare var v; ~~~~~~~ -!!! error TS8009: 'declare' can only be used in a .ts file. \ No newline at end of file +!!! error TS8009: The 'declare' modifier can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt index 85d3b5ef798..b87ee7f666c 100644 --- a/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt @@ -1,6 +1,6 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -tests/cases/compiler/a.js(1,6): error TS8015: 'enum declarations' can only be used in a .ts file. +tests/cases/compiler/a.js(1,6): error TS8006: 'enum' declarations can only be used in TypeScript files. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. @@ -8,4 +8,4 @@ tests/cases/compiler/a.js(1,6): error TS8015: 'enum declarations' can only be us ==== tests/cases/compiler/a.js (1 errors) ==== enum E { } ~ -!!! error TS8015: 'enum declarations' can only be used in a .ts file. \ No newline at end of file +!!! error TS8006: 'enum' declarations can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt index e3df8cf5d94..2542c7a35fd 100644 --- a/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt @@ -1,6 +1,6 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -tests/cases/compiler/a.js(1,1): error TS8003: 'export=' can only be used in a .ts file. +tests/cases/compiler/a.js(1,1): error TS8003: 'export =' can only be used in TypeScript files. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. @@ -8,4 +8,4 @@ tests/cases/compiler/a.js(1,1): error TS8003: 'export=' can only be used in a .t ==== tests/cases/compiler/a.js (1 errors) ==== export = b; ~~~~~~~~~~~ -!!! error TS8003: 'export=' can only be used in a .ts file. \ No newline at end of file +!!! error TS8003: 'export =' can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt index 95e967401a8..9e94fa4c532 100644 --- a/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt +++ b/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt @@ -1,6 +1,6 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -tests/cases/compiler/a.js(1,9): error TS8005: 'implements clauses' can only be used in a .ts file. +tests/cases/compiler/a.js(1,9): error TS8005: 'implements' clauses can only be used in TypeScript files. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. @@ -8,4 +8,4 @@ tests/cases/compiler/a.js(1,9): error TS8005: 'implements clauses' can only be u ==== tests/cases/compiler/a.js (1 errors) ==== class C implements D { } ~~~~~~~~~~~~ -!!! error TS8005: 'implements clauses' can only be used in a .ts file. \ No newline at end of file +!!! error TS8005: 'implements' clauses can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt index d6d0ce64d44..d3a932d234e 100644 --- a/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt @@ -1,6 +1,6 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -tests/cases/compiler/a.js(1,1): error TS8002: 'import ... =' can only be used in a .ts file. +tests/cases/compiler/a.js(1,1): error TS8002: 'import ... =' can only be used in TypeScript files. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. @@ -8,4 +8,4 @@ tests/cases/compiler/a.js(1,1): error TS8002: 'import ... =' can only be used in ==== tests/cases/compiler/a.js (1 errors) ==== import a = b; ~~~~~~~~~~~~~ -!!! error TS8002: 'import ... =' can only be used in a .ts file. \ No newline at end of file +!!! error TS8002: 'import ... =' can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt index be051cafc86..0f2923f1094 100644 --- a/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt @@ -1,6 +1,6 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -tests/cases/compiler/a.js(1,11): error TS8006: 'interface declarations' can only be used in a .ts file. +tests/cases/compiler/a.js(1,11): error TS1176: Interface declaration cannot have 'implements' clause. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. @@ -8,4 +8,4 @@ tests/cases/compiler/a.js(1,11): error TS8006: 'interface declarations' can only ==== tests/cases/compiler/a.js (1 errors) ==== interface I { } ~ -!!! error TS8006: 'interface declarations' can only be used in a .ts file. \ No newline at end of file +!!! error TS1176: Interface declaration cannot have 'implements' clause. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt index cd0bd8ef91a..040a95d60cc 100644 --- a/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt @@ -1,6 +1,6 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -tests/cases/compiler/a.js(1,8): error TS8007: 'module declarations' can only be used in a .ts file. +tests/cases/compiler/a.js(1,8): error TS8006: 'module' declarations can only be used in TypeScript files. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. @@ -8,4 +8,4 @@ tests/cases/compiler/a.js(1,8): error TS8007: 'module declarations' can only be ==== tests/cases/compiler/a.js (1 errors) ==== module M { } ~ -!!! error TS8007: 'module declarations' can only be used in a .ts file. \ No newline at end of file +!!! error TS8006: 'module' declarations can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationNonNullAssertion.errors.txt b/tests/baselines/reference/jsFileCompilationNonNullAssertion.errors.txt index 13670601f70..68250662d89 100644 --- a/tests/baselines/reference/jsFileCompilationNonNullAssertion.errors.txt +++ b/tests/baselines/reference/jsFileCompilationNonNullAssertion.errors.txt @@ -1,8 +1,8 @@ -/src/a.js(1,1): error TS8013: 'non-null assertions' can only be used in a .ts file. +/src/a.js(1,1): error TS8013: Non-null assertions can only be used in TypeScript files. ==== /src/a.js (1 errors) ==== 0! ~~ -!!! error TS8013: 'non-null assertions' can only be used in a .ts file. +!!! error TS8013: Non-null assertions can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationOptionalClassElementSyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationOptionalClassElementSyntaxOfClass.errors.txt index b4ebcf41983..41280531679 100644 --- a/tests/baselines/reference/jsFileCompilationOptionalClassElementSyntaxOfClass.errors.txt +++ b/tests/baselines/reference/jsFileCompilationOptionalClassElementSyntaxOfClass.errors.txt @@ -1,7 +1,7 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -tests/cases/compiler/a.js(2,8): error TS8009: '?' can only be used in a .ts file. -tests/cases/compiler/a.js(4,8): error TS8009: '?' can only be used in a .ts file. +tests/cases/compiler/a.js(2,8): error TS8009: The '?' modifier can only be used in TypeScript files. +tests/cases/compiler/a.js(4,8): error TS8009: The '?' modifier can only be used in TypeScript files. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. @@ -10,9 +10,9 @@ tests/cases/compiler/a.js(4,8): error TS8009: '?' can only be used in a .ts file class C { foo?() { ~ -!!! error TS8009: '?' can only be used in a .ts file. +!!! error TS8009: The '?' modifier can only be used in TypeScript files. } bar? = 1; ~ -!!! error TS8009: '?' can only be used in a .ts file. +!!! error TS8009: The '?' modifier can only be used in TypeScript files. } \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt b/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt index a340f3d6d1b..55352d8ad3c 100644 --- a/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt +++ b/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt @@ -1,6 +1,6 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -tests/cases/compiler/a.js(1,13): error TS8009: '?' can only be used in a .ts file. +tests/cases/compiler/a.js(1,13): error TS8009: The '?' modifier can only be used in TypeScript files. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. @@ -8,4 +8,4 @@ tests/cases/compiler/a.js(1,13): error TS8009: '?' can only be used in a .ts fil ==== tests/cases/compiler/a.js (1 errors) ==== function F(p?) { } ~ -!!! error TS8009: '?' can only be used in a .ts file. \ No newline at end of file +!!! error TS8009: The '?' modifier can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt index 2f2cccf83d8..98f4329a180 100644 --- a/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt +++ b/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt @@ -1,6 +1,6 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -tests/cases/compiler/a.js(2,5): error TS8009: 'public' can only be used in a .ts file. +tests/cases/compiler/a.js(2,5): error TS8009: The 'public' modifier can only be used in TypeScript files. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. @@ -9,6 +9,6 @@ tests/cases/compiler/a.js(2,5): error TS8009: 'public' can only be used in a .ts class C { public foo() { ~~~~~~ -!!! error TS8009: 'public' can only be used in a .ts file. +!!! error TS8009: The 'public' modifier can only be used in TypeScript files. } } \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt b/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt index 6f266b7df31..61030f4384d 100644 --- a/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt +++ b/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt @@ -1,6 +1,6 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -tests/cases/compiler/a.js(1,23): error TS8012: 'parameter modifiers' can only be used in a .ts file. +tests/cases/compiler/a.js(1,23): error TS8012: Parameter modifiers can only be used in TypeScript files. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. @@ -8,4 +8,4 @@ tests/cases/compiler/a.js(1,23): error TS8012: 'parameter modifiers' can only be ==== tests/cases/compiler/a.js (1 errors) ==== class C { constructor(public x) { }} ~~~~~~ -!!! error TS8012: 'parameter modifiers' can only be used in a .ts file. \ No newline at end of file +!!! error TS8012: Parameter modifiers can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt b/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt index f43d221d6a9..ad28a6a7bec 100644 --- a/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt +++ b/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt @@ -1,6 +1,6 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -tests/cases/compiler/a.js(1,15): error TS8010: 'types' can only be used in a .ts file. +tests/cases/compiler/a.js(1,15): error TS8010: Type annotations can only be used in TypeScript files. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. @@ -8,4 +8,4 @@ tests/cases/compiler/a.js(1,15): error TS8010: 'types' can only be used in a .ts ==== tests/cases/compiler/a.js (1 errors) ==== function F(): number { } ~~~~~~ -!!! error TS8010: 'types' can only be used in a .ts file. \ No newline at end of file +!!! error TS8010: Type annotations can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt index dd7c1d858e6..f78ddcb964c 100644 --- a/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt @@ -1,6 +1,6 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -tests/cases/compiler/a.js(1,6): error TS8008: 'type aliases' can only be used in a .ts file. +tests/cases/compiler/a.js(1,6): error TS8008: Type aliases can only be used in TypeScript files. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. @@ -8,4 +8,4 @@ tests/cases/compiler/a.js(1,6): error TS8008: 'type aliases' can only be used in ==== tests/cases/compiler/a.js (1 errors) ==== type a = b; ~ -!!! error TS8008: 'type aliases' can only be used in a .ts file. \ No newline at end of file +!!! error TS8008: Type aliases can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt b/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt index 5b47b12c534..91732ec1b11 100644 --- a/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt @@ -1,19 +1,19 @@ -tests/cases/compiler/a.jsx(1,5): error TS8011: 'type arguments' can only be used in a .ts file. -tests/cases/compiler/a.jsx(2,5): error TS8011: 'type arguments' can only be used in a .ts file. -tests/cases/compiler/a.jsx(3,6): error TS8011: 'type arguments' can only be used in a .ts file. -tests/cases/compiler/a.jsx(4,6): error TS8011: 'type arguments' can only be used in a .ts file. +tests/cases/compiler/a.jsx(1,5): error TS8011: Type arguments can only be used in TypeScript files. +tests/cases/compiler/a.jsx(2,5): error TS8011: Type arguments can only be used in TypeScript files. +tests/cases/compiler/a.jsx(3,6): error TS8011: Type arguments can only be used in TypeScript files. +tests/cases/compiler/a.jsx(4,6): error TS8011: Type arguments can only be used in TypeScript files. ==== tests/cases/compiler/a.jsx (4 errors) ==== Foo(); ~~~~~~ -!!! error TS8011: 'type arguments' can only be used in a .ts file. +!!! error TS8011: Type arguments can only be used in TypeScript files. Foo``; ~~~~~~ -!!! error TS8011: 'type arguments' can only be used in a .ts file. +!!! error TS8011: Type arguments can only be used in TypeScript files. >; ~~~~~~ -!!! error TS8011: 'type arguments' can only be used in a .ts file. +!!! error TS8011: Type arguments can only be used in TypeScript files. />; ~~~~~~ -!!! error TS8011: 'type arguments' can only be used in a .ts file. \ No newline at end of file +!!! error TS8011: Type arguments can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt index 13fbe712dba..c120f1de953 100644 --- a/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt @@ -1,4 +1,4 @@ -/src/a.js(1,6): error TS8016: 'type assertion expressions' can only be used in a .ts file. +/src/a.js(1,6): error TS8016: Type assertion expressions can only be used in TypeScript files. /src/a.js(2,10): error TS17008: JSX element 'string' has no corresponding closing tag. /src/a.js(3,1): error TS1005: 'undefined; ~~~~~~ !!! error TS17008: JSX element 'string' has no corresponding closing tag. diff --git a/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt b/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt index 754d83cff0c..c8978dbbc26 100644 --- a/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt @@ -1,6 +1,6 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -tests/cases/compiler/a.js(1,15): error TS8010: 'types' can only be used in a .ts file. +tests/cases/compiler/a.js(1,15): error TS8010: Type annotations can only be used in TypeScript files. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. @@ -8,4 +8,4 @@ tests/cases/compiler/a.js(1,15): error TS8010: 'types' can only be used in a .ts ==== tests/cases/compiler/a.js (1 errors) ==== function F(a: number) { } ~~~~~~ -!!! error TS8010: 'types' can only be used in a .ts file. \ No newline at end of file +!!! error TS8010: Type annotations can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt index 7f27e1e8211..35761630f47 100644 --- a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt @@ -1,6 +1,6 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -tests/cases/compiler/a.js(1,9): error TS8004: 'type parameter declarations' can only be used in a .ts file. +tests/cases/compiler/a.js(1,9): error TS8004: Type parameter declarations can only be used in TypeScript files. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. @@ -8,4 +8,4 @@ tests/cases/compiler/a.js(1,9): error TS8004: 'type parameter declarations' can ==== tests/cases/compiler/a.js (1 errors) ==== class C { } ~ -!!! error TS8004: 'type parameter declarations' can only be used in a .ts file. \ No newline at end of file +!!! error TS8004: Type parameter declarations can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClassExpression.errors.txt b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClassExpression.errors.txt index 61bf225dddc..4d60376d051 100644 --- a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClassExpression.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClassExpression.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/a.js(1,19): error TS8004: 'type parameter declarations' can only be used in a .ts file. +tests/cases/compiler/a.js(1,19): error TS8004: Type parameter declarations can only be used in TypeScript files. ==== tests/cases/compiler/a.js (1 errors) ==== const Bar = class {}; ~ -!!! error TS8004: 'type parameter declarations' can only be used in a .ts file. +!!! error TS8004: Type parameter declarations can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt index 12b53c41b97..4fc9d7709e6 100644 --- a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt @@ -1,6 +1,6 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -tests/cases/compiler/a.js(1,12): error TS8004: 'type parameter declarations' can only be used in a .ts file. +tests/cases/compiler/a.js(1,12): error TS8004: Type parameter declarations can only be used in TypeScript files. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. @@ -8,4 +8,4 @@ tests/cases/compiler/a.js(1,12): error TS8004: 'type parameter declarations' can ==== tests/cases/compiler/a.js (1 errors) ==== function F() { } ~ -!!! error TS8004: 'type parameter declarations' can only be used in a .ts file. \ No newline at end of file +!!! error TS8004: Type parameter declarations can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt b/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt index 9c7dd647ca7..7eebf3580ff 100644 --- a/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt @@ -1,6 +1,6 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -tests/cases/compiler/a.js(1,8): error TS8010: 'types' can only be used in a .ts file. +tests/cases/compiler/a.js(1,8): error TS8010: Type annotations can only be used in TypeScript files. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. @@ -8,4 +8,4 @@ tests/cases/compiler/a.js(1,8): error TS8010: 'types' can only be used in a .ts ==== tests/cases/compiler/a.js (1 errors) ==== var v: () => number; ~~~~~~~~~~~~ -!!! error TS8010: 'types' can only be used in a .ts file. \ No newline at end of file +!!! error TS8010: Type annotations can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/baselines/reference/jsdocTypedefNoCrash2.errors.txt b/tests/baselines/reference/jsdocTypedefNoCrash2.errors.txt index 6c4a15e5947..9448bf84a2a 100644 --- a/tests/baselines/reference/jsdocTypedefNoCrash2.errors.txt +++ b/tests/baselines/reference/jsdocTypedefNoCrash2.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/export.js(1,13): error TS8008: 'type aliases' can only be used in a .ts file. +tests/cases/compiler/export.js(1,13): error TS8008: Type aliases can only be used in TypeScript files. ==== tests/cases/compiler/export.js (1 errors) ==== export type foo = 5; ~~~ -!!! error TS8008: 'type aliases' can only be used in a .ts file. +!!! error TS8008: Type aliases can only be used in TypeScript files. /** * @typedef {{ * }} diff --git a/tests/baselines/reference/jsxCheckJsxNoTypeArgumentsAllowed.errors.txt b/tests/baselines/reference/jsxCheckJsxNoTypeArgumentsAllowed.errors.txt index 90b3719161e..30e0a50c70d 100644 --- a/tests/baselines/reference/jsxCheckJsxNoTypeArgumentsAllowed.errors.txt +++ b/tests/baselines/reference/jsxCheckJsxNoTypeArgumentsAllowed.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/jsx/file.jsx(4,17): error TS8011: 'type arguments' can only be used in a .ts file. +tests/cases/conformance/jsx/file.jsx(4,17): error TS8011: Type arguments can only be used in TypeScript files. ==== tests/cases/conformance/jsx/component.d.ts (0 errors) ==== @@ -18,5 +18,5 @@ tests/cases/conformance/jsx/file.jsx(4,17): error TS8011: 'type arguments' can o let x = a={10} b="hi" />; // error, no type arguments in js ~~~~ -!!! error TS8011: 'type arguments' can only be used in a .ts file. +!!! error TS8011: Type arguments can only be used in TypeScript files. \ No newline at end of file diff --git a/tests/cases/fourslash/fourslash.ts b/tests/cases/fourslash/fourslash.ts index d93ad08ed07..e2626774a99 100644 --- a/tests/cases/fourslash/fourslash.ts +++ b/tests/cases/fourslash/fourslash.ts @@ -310,6 +310,8 @@ declare namespace FourSlashInterface { baselineCurrentFileBreakpointLocations(): void; baselineCurrentFileNameOrDottedNameSpans(): void; baselineGetEmitOutput(insertResultsIntoVfs?: boolean): void; + baselineSyntacticDiagnostics(): void; + baselineSyntacticAndSemanticDiagnostics(): void; getEmitOutput(expectedOutputFiles: ReadonlyArray): void; baselineQuickInfo(): void; baselineSmartSelection(): void; diff --git a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics1.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics1.ts index 46d9062c468..d1712d4aaeb 100644 --- a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics1.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics1.ts @@ -2,9 +2,6 @@ // @allowJs: true // @Filename: a.js -////[|import a = b;|] +////import a = b; -verify.getSyntacticDiagnostics([{ - message: "'import ... =' can only be used in a .ts file.", - code: 8002 -}]); +verify.baselineSyntacticDiagnostics(); diff --git a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics10.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics10.ts index 9f859c527d1..f7245a8ba3f 100644 --- a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics10.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics10.ts @@ -2,9 +2,6 @@ // @allowJs: true // @Filename: a.js -////function F<[|T|]>() { } +////function F() { } -verify.getSyntacticDiagnostics([{ - message: "'type parameter declarations' can only be used in a .ts file.", - code: 8004 -}]); +verify.baselineSyntacticDiagnostics(); diff --git a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics11.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics11.ts index f3928bf997d..508a85e4b04 100644 --- a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics11.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics11.ts @@ -2,9 +2,6 @@ // @allowJs: true // @Filename: a.js -////function F(): [|number|] { } +////function F(): number { } -verify.getSyntacticDiagnostics([{ - message: "'types' can only be used in a .ts file.", - code: 8010 -}]); +verify.baselineSyntacticDiagnostics(); diff --git a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics12.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics12.ts index e9494017d5d..b06e680bd5c 100644 --- a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics12.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics12.ts @@ -2,9 +2,6 @@ // @allowJs: true // @Filename: a.js -////[|declare|] var v; +////declare var v; -verify.getSyntacticDiagnostics([{ - message: "'declare' can only be used in a .ts file.", - code: 8009 -}]); +verify.baselineSyntacticDiagnostics(); diff --git a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics13.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics13.ts index 98b0471b256..19cf4fda7a5 100644 --- a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics13.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics13.ts @@ -2,9 +2,6 @@ // @allowJs: true // @Filename: a.js -////var v: [|() => number|]; +////var v: () => number; -verify.getSyntacticDiagnostics([{ - message: "'types' can only be used in a .ts file.", - code: 8010 -}]); \ No newline at end of file +verify.baselineSyntacticDiagnostics(); \ No newline at end of file diff --git a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics14.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics14.ts index ed694fc4e5b..c662735e1f4 100644 --- a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics14.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics14.ts @@ -2,9 +2,6 @@ // @allowJs: true // @Filename: a.js -////Foo<[|number|]>(); +////Foo(); -verify.getSyntacticDiagnostics([{ - message: "'type arguments' can only be used in a .ts file.", - code: 8011 -}]); +verify.baselineSyntacticDiagnostics(); diff --git a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics15.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics15.ts index 5e3955a658b..030ba0e8df1 100644 --- a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics15.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics15.ts @@ -2,9 +2,6 @@ // @allowJs: true // @Filename: a.js -////function F([|public|] p) { } +////function F(public p) { } -verify.getSyntacticDiagnostics([{ - message: "'parameter modifiers' can only be used in a .ts file.", - code: 8012 -}]); +verify.baselineSyntacticDiagnostics(); diff --git a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics16.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics16.ts index 826c4157036..b3cfed1c98e 100644 --- a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics16.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics16.ts @@ -2,9 +2,6 @@ // @allowJs: true // @Filename: a.js -////function F(p[|?|]) { } +////function F(p?) { } -verify.getSyntacticDiagnostics([{ - message: "'?' can only be used in a .ts file.", - code: 8009 -}]); +verify.baselineSyntacticDiagnostics(); diff --git a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics17.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics17.ts index 2bda62590d7..f9d25c2c5cd 100644 --- a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics17.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics17.ts @@ -2,9 +2,6 @@ // @allowJs: true // @Filename: a.js -////function F(a: [|number|]) { } +////function F(a: number) { } -verify.getSyntacticDiagnostics([{ - message: "'types' can only be used in a .ts file.", - code: 8010 -}]); +verify.baselineSyntacticDiagnostics(); diff --git a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics18.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics18.ts index 3344a630ca6..0a9eb486e14 100644 --- a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics18.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics18.ts @@ -5,23 +5,12 @@ ////class C { //// x; // Regular property declaration allowed //// static y; // static allowed -//// [|public|] z; // public not allowed +//// public z; // public not allowed ////} -goTo.file("a.js"); -verify.getSyntacticDiagnostics([{ - message: "\'public\' can only be used in a .ts file.", - code: 8009 -}]); - // @Filename: b.js ////class C { -//// x: [|number|]; // Types not allowed +//// x: number; // Types not allowed ////} -goTo.file("b.js"); -verify.getSyntacticDiagnostics([{ - message: "'types' can only be used in a .ts file.", - range: test.ranges()[1], - code: 8010 -}]); +verify.baselineSyntacticDiagnostics() diff --git a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics19.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics19.ts index 3198615d8b4..ca6872d6a6a 100644 --- a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics19.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics19.ts @@ -2,9 +2,6 @@ // @allowJs: true // @Filename: a.js -////enum [|E|] { } +////enum E { } -verify.getSyntacticDiagnostics([{ - message: "'enum declarations' can only be used in a .ts file.", - code: 8015 -}]); +verify.baselineSyntacticDiagnostics(); diff --git a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics2.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics2.ts index 1ad538071dd..6791673255c 100644 --- a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics2.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics2.ts @@ -2,9 +2,6 @@ // @allowJs: true // @Filename: a.js -////[|export = b;|] +////export = b; -verify.getSyntacticDiagnostics([{ - message: "'export=' can only be used in a .ts file.", - code: 8003 -}]); +verify.baselineSyntacticDiagnostics(); diff --git a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics3.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics3.ts index 709e466bcf1..f5c5a0ad0b6 100644 --- a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics3.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics3.ts @@ -2,9 +2,6 @@ // @allowJs: true // @Filename: a.js -////class C<[|T|]> { } +////class C { } -verify.getSyntacticDiagnostics([{ - message: "'type parameter declarations' can only be used in a .ts file.", - code: 8004 -}]); +verify.baselineSyntacticDiagnostics(); diff --git a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics4.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics4.ts index 936d6ede996..ceb2e71193e 100644 --- a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics4.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics4.ts @@ -2,9 +2,6 @@ // @allowJs: true // @Filename: a.js -////[|public|] class C { } +////public class C { } -verify.getSyntacticDiagnostics([{ - message: "'public' can only be used in a .ts file.", - code: 8009 -}]); +verify.baselineSyntacticDiagnostics(); diff --git a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics5.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics5.ts index f0b765e0ce9..4f75ca35a4e 100644 --- a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics5.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics5.ts @@ -2,9 +2,6 @@ // @allowJs: true // @Filename: a.js -////class C [|implements D|] { } +////class C implements D { } -verify.getSyntacticDiagnostics([{ - message: "'implements clauses' can only be used in a .ts file.", - code: 8005 -}]); +verify.baselineSyntacticDiagnostics(); diff --git a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics6.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics6.ts index 565513d8c07..afc06795baa 100644 --- a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics6.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics6.ts @@ -2,9 +2,6 @@ // @allowJs: true // @Filename: a.js -////interface [|I|] { } +////interface I { } -verify.getSyntacticDiagnostics([{ - message: "'interface declarations' can only be used in a .ts file.", - code: 8006 -}]); +verify.baselineSyntacticDiagnostics(); diff --git a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics7.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics7.ts index 66985164936..f9f42bf3a1c 100644 --- a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics7.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics7.ts @@ -2,9 +2,6 @@ // @allowJs: true // @Filename: a.js -////module [|M|] { } +////module M { } -verify.getSyntacticDiagnostics([{ - message: "'module declarations' can only be used in a .ts file.", - code: 8007 -}]); +verify.baselineSyntacticDiagnostics(); diff --git a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics8.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics8.ts index 6655f923022..03c80ae5317 100644 --- a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics8.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics8.ts @@ -2,9 +2,6 @@ // @allowJs: true // @Filename: a.js -////type [|a|] = b; +////type a = b; -verify.getSyntacticDiagnostics([{ - message: "'type aliases' can only be used in a .ts file.", - code: 8008 -}]); +verify.baselineSyntacticDiagnostics(); diff --git a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics9.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics9.ts index fe83ad8488e..51234ba40ed 100644 --- a/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics9.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics9.ts @@ -2,9 +2,6 @@ // @allowJs: true // @Filename: a.js -////[|public|] function F() { } +////public function F() { } -verify.getSyntacticDiagnostics([{ - message: "'public' can only be used in a .ts file.", - code: 8009 -}]); +verify.baselineSyntacticDiagnostics(); diff --git a/tests/cases/fourslash/server/getJavaScriptSyntacticDiagnostics01.ts b/tests/cases/fourslash/server/getJavaScriptSyntacticDiagnostics01.ts index 9b3153b13ac..1a888cb8b8f 100644 --- a/tests/cases/fourslash/server/getJavaScriptSyntacticDiagnostics01.ts +++ b/tests/cases/fourslash/server/getJavaScriptSyntacticDiagnostics01.ts @@ -2,18 +2,6 @@ // @allowJs: true // @Filename: a.js -////var [|===|][|;|] +////var ===; -verify.getSyntacticDiagnostics([ - { - message: "Variable declaration expected.", - range: test.ranges()[0], - code: 1134 - }, - { - message: "Expression expected.", - range: test.ranges()[1], - code: 1109 - }, -]); -verify.getSemanticDiagnostics([]); +verify.baselineSyntacticAndSemanticDiagnostics() \ No newline at end of file diff --git a/tests/cases/fourslash/server/getJavaScriptSyntacticDiagnostics02.ts b/tests/cases/fourslash/server/getJavaScriptSyntacticDiagnostics02.ts index 4d2b3d5d989..8b182bd98eb 100644 --- a/tests/cases/fourslash/server/getJavaScriptSyntacticDiagnostics02.ts +++ b/tests/cases/fourslash/server/getJavaScriptSyntacticDiagnostics02.ts @@ -3,35 +3,8 @@ // @allowJs: true // @Filename: b.js ////var a = "a"; -////var b: [|boolean|] = true; -////function foo(): [|string|] { } -////var [|var|] [|=|] [|"c"|]; +////var b: boolean = true; +////function foo(): string { } +////var var = "c"; -verify.getSyntacticDiagnostics([ - { - message: "'types' can only be used in a .ts file.", - range: test.ranges()[0], - code: 8010 - }, - { - message: "\'types\' can only be used in a .ts file.", - range: test.ranges()[1], - code: 8010 - }, - { - message: "Variable declaration expected.", - range: test.ranges()[2], - code: 1134 - }, - { - message: "Variable declaration expected.", - range: test.ranges()[3], - code: 1134 - }, - { - message: "Variable declaration expected.", - range: test.ranges()[4], - code: 1134 - }, -]); -verify.getSemanticDiagnostics([]); +verify.baselineSyntacticAndSemanticDiagnostics() \ No newline at end of file From 2075f74fef777aa096be8451d3aed1c28b53e171 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Fri, 22 Nov 2019 14:52:29 -0800 Subject: [PATCH 50/50] useDefineForClassFields skips emit of ambient properties (#35058) * useDefineForClassFields skips emit of ambient properties Previously: ```ts class C { declare p } ``` would incorrectly emit ```js class C { constructor() { Object.defineProperty(this, "p", { enumerable: true, configurable: true, writable: true, value: void 0 }); } } ``` when useDefineForClassFields was turned on (for targets m : Symbol(A.m, Decl(definePropertyES5.ts, 5, 13)) + + declare notEmitted: boolean; +>notEmitted : Symbol(A.notEmitted, Decl(definePropertyES5.ts, 6, 11)) } diff --git a/tests/baselines/reference/definePropertyES5.types b/tests/baselines/reference/definePropertyES5.types index 3f82787c13a..7fffb77b74c 100644 --- a/tests/baselines/reference/definePropertyES5.types +++ b/tests/baselines/reference/definePropertyES5.types @@ -25,5 +25,8 @@ class A { m() { } >m : () => void + + declare notEmitted: boolean; +>notEmitted : boolean } diff --git a/tests/baselines/reference/definePropertyESNext.js b/tests/baselines/reference/definePropertyESNext.js new file mode 100644 index 00000000000..5fbd2fad7a9 --- /dev/null +++ b/tests/baselines/reference/definePropertyESNext.js @@ -0,0 +1,46 @@ +//// [definePropertyESNext.ts] +var x: "p" = "p" +class A { + a = 12 + b + ["computed"] = 13 + ;[x] = 14 + m() { } + constructor(public readonly y: number) { } + declare notEmitted; +} +class B { +} +class C extends B { + z = this.ka + constructor(public ka: number) { + super() + } + ki = this.ka +} + + +//// [definePropertyESNext.js] +var x = "p"; +class A { + y; + a = 12; + b; + ["computed"] = 13; + [x] = 14; + m() { } + constructor(y) { + this.y = y; + } +} +class B { +} +class C extends B { + ka; + z = this.ka; + constructor(ka) { + super(); + this.ka = ka; + } + ki = this.ka; +} diff --git a/tests/baselines/reference/definePropertyESNext.symbols b/tests/baselines/reference/definePropertyESNext.symbols new file mode 100644 index 00000000000..56463362d4e --- /dev/null +++ b/tests/baselines/reference/definePropertyESNext.symbols @@ -0,0 +1,56 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/definePropertyESNext.ts === +var x: "p" = "p" +>x : Symbol(x, Decl(definePropertyESNext.ts, 0, 3)) + +class A { +>A : Symbol(A, Decl(definePropertyESNext.ts, 0, 16)) + + a = 12 +>a : Symbol(A.a, Decl(definePropertyESNext.ts, 1, 9)) + + b +>b : Symbol(A.b, Decl(definePropertyESNext.ts, 2, 10)) + + ["computed"] = 13 +>["computed"] : Symbol(A["computed"], Decl(definePropertyESNext.ts, 3, 5)) +>"computed" : Symbol(A["computed"], Decl(definePropertyESNext.ts, 3, 5)) + + ;[x] = 14 +>[x] : Symbol(A[x], Decl(definePropertyESNext.ts, 5, 5)) +>x : Symbol(x, Decl(definePropertyESNext.ts, 0, 3)) + + m() { } +>m : Symbol(A.m, Decl(definePropertyESNext.ts, 5, 13)) + + constructor(public readonly y: number) { } +>y : Symbol(A.y, Decl(definePropertyESNext.ts, 7, 16)) + + declare notEmitted; +>notEmitted : Symbol(A.notEmitted, Decl(definePropertyESNext.ts, 7, 46)) +} +class B { +>B : Symbol(B, Decl(definePropertyESNext.ts, 9, 1)) +} +class C extends B { +>C : Symbol(C, Decl(definePropertyESNext.ts, 11, 1)) +>B : Symbol(B, Decl(definePropertyESNext.ts, 9, 1)) + + z = this.ka +>z : Symbol(C.z, Decl(definePropertyESNext.ts, 12, 19)) +>this.ka : Symbol(C.ka, Decl(definePropertyESNext.ts, 14, 16)) +>this : Symbol(C, Decl(definePropertyESNext.ts, 11, 1)) +>ka : Symbol(C.ka, Decl(definePropertyESNext.ts, 14, 16)) + + constructor(public ka: number) { +>ka : Symbol(C.ka, Decl(definePropertyESNext.ts, 14, 16)) + + super() +>super : Symbol(B, Decl(definePropertyESNext.ts, 9, 1)) + } + ki = this.ka +>ki : Symbol(C.ki, Decl(definePropertyESNext.ts, 16, 5)) +>this.ka : Symbol(C.ka, Decl(definePropertyESNext.ts, 14, 16)) +>this : Symbol(C, Decl(definePropertyESNext.ts, 11, 1)) +>ka : Symbol(C.ka, Decl(definePropertyESNext.ts, 14, 16)) +} + diff --git a/tests/baselines/reference/definePropertyESNext.types b/tests/baselines/reference/definePropertyESNext.types new file mode 100644 index 00000000000..303387461a5 --- /dev/null +++ b/tests/baselines/reference/definePropertyESNext.types @@ -0,0 +1,61 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/definePropertyESNext.ts === +var x: "p" = "p" +>x : "p" +>"p" : "p" + +class A { +>A : A + + a = 12 +>a : number +>12 : 12 + + b +>b : any + + ["computed"] = 13 +>["computed"] : number +>"computed" : "computed" +>13 : 13 + + ;[x] = 14 +>[x] : number +>x : "p" +>14 : 14 + + m() { } +>m : () => void + + constructor(public readonly y: number) { } +>y : number + + declare notEmitted; +>notEmitted : any +} +class B { +>B : B +} +class C extends B { +>C : C +>B : B + + z = this.ka +>z : number +>this.ka : number +>this : this +>ka : number + + constructor(public ka: number) { +>ka : number + + super() +>super() : void +>super : typeof B + } + ki = this.ka +>ki : number +>this.ka : number +>this : this +>ka : number +} + diff --git a/tests/baselines/reference/derivedUninitializedPropertyDeclaration.js b/tests/baselines/reference/derivedUninitializedPropertyDeclaration.js index 471cd5bbf1d..48715eefe0c 100644 --- a/tests/baselines/reference/derivedUninitializedPropertyDeclaration.js +++ b/tests/baselines/reference/derivedUninitializedPropertyDeclaration.js @@ -113,9 +113,7 @@ var BDBang = /** @class */ (function (_super) { var BOther = /** @class */ (function (_super) { __extends(BOther, _super); function BOther() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.property = 'y'; // initialiser not allowed with declare - return _this; + return _super !== null && _super.apply(this, arguments) || this; } BOther.prototype.m = function () { return 2; }; // not allowed on methods return BOther; diff --git a/tests/baselines/reference/illegalModifiersOnClassElements.js b/tests/baselines/reference/illegalModifiersOnClassElements.js index b87c822738b..1650d65aa70 100644 --- a/tests/baselines/reference/illegalModifiersOnClassElements.js +++ b/tests/baselines/reference/illegalModifiersOnClassElements.js @@ -7,7 +7,6 @@ class C { //// [illegalModifiersOnClassElements.js] var C = /** @class */ (function () { function C() { - this.foo = 1; this.bar = 1; } return C; diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/definePropertyES5.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/definePropertyES5.ts index 73e1ee515d1..a2338889134 100644 --- a/tests/cases/conformance/classes/propertyMemberDeclarations/definePropertyES5.ts +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/definePropertyES5.ts @@ -7,4 +7,5 @@ class A { ["computed"] = 13 ;[x] = 14 m() { } + declare notEmitted: boolean; } diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/definePropertyESNext.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/definePropertyESNext.ts new file mode 100644 index 00000000000..4bfd516229f --- /dev/null +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/definePropertyESNext.ts @@ -0,0 +1,21 @@ +// @target: esnext +// @useDefineForClassFields: true +var x: "p" = "p" +class A { + a = 12 + b + ["computed"] = 13 + ;[x] = 14 + m() { } + constructor(public readonly y: number) { } + declare notEmitted; +} +class B { +} +class C extends B { + z = this.ka + constructor(public ka: number) { + super() + } + ki = this.ka +}