From a22aaf0ee74ae8882827993a675548ed6d604471 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Tue, 26 Mar 2024 13:40:28 -0700 Subject: [PATCH 1/9] Control flow analysis for element access with variable index (#57847) --- src/compiler/checker.ts | 27 ++- .../controlFlowComputedPropertyNames.symbols | 134 ++++++++++++++ .../controlFlowComputedPropertyNames.types | 163 ++++++++++++++++++ .../mappedTypeGenericIndexedAccess.types | 8 +- .../noUncheckedIndexedAccess.errors.txt | 6 +- .../reference/noUncheckedIndexedAccess.types | 2 +- .../controlFlowComputedPropertyNames.ts | 41 +++++ 7 files changed, 367 insertions(+), 14 deletions(-) create mode 100644 tests/baselines/reference/controlFlowComputedPropertyNames.symbols create mode 100644 tests/baselines/reference/controlFlowComputedPropertyNames.types create mode 100644 tests/cases/conformance/controlFlow/controlFlowComputedPropertyNames.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 7cff9af11039d..613698c4ffd96 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -26622,13 +26622,20 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return getFlowCacheKey((node as NonNullExpression | ParenthesizedExpression).expression, declaredType, initialType, flowContainer); case SyntaxKind.QualifiedName: const left = getFlowCacheKey((node as QualifiedName).left, declaredType, initialType, flowContainer); - return left && left + "." + (node as QualifiedName).right.escapedText; + return left && `${left}.${(node as QualifiedName).right.escapedText}`; case SyntaxKind.PropertyAccessExpression: case SyntaxKind.ElementAccessExpression: const propName = getAccessedPropertyName(node as AccessExpression); if (propName !== undefined) { const key = getFlowCacheKey((node as AccessExpression).expression, declaredType, initialType, flowContainer); - return key && key + "." + propName; + return key && `${key}.${propName}`; + } + if (isElementAccessExpression(node) && isIdentifier(node.argumentExpression)) { + const symbol = getResolvedSymbol(node.argumentExpression); + if (isConstantVariable(symbol) || isParameterOrMutableLocalVariable(symbol) && !isSymbolAssigned(symbol)) { + const key = getFlowCacheKey((node as AccessExpression).expression, declaredType, initialType, flowContainer); + return key && `${key}.@${getSymbolId(symbol)}`; + } } break; case SyntaxKind.ObjectBindingPattern: @@ -26674,9 +26681,19 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { case SyntaxKind.PropertyAccessExpression: case SyntaxKind.ElementAccessExpression: const sourcePropertyName = getAccessedPropertyName(source as AccessExpression); - const targetPropertyName = isAccessExpression(target) ? getAccessedPropertyName(target) : undefined; - return sourcePropertyName !== undefined && targetPropertyName !== undefined && targetPropertyName === sourcePropertyName && - isMatchingReference((source as AccessExpression).expression, (target as AccessExpression).expression); + if (sourcePropertyName !== undefined) { + const targetPropertyName = isAccessExpression(target) ? getAccessedPropertyName(target) : undefined; + if (targetPropertyName !== undefined) { + return targetPropertyName === sourcePropertyName && isMatchingReference((source as AccessExpression).expression, (target as AccessExpression).expression); + } + } + if (isElementAccessExpression(source) && isElementAccessExpression(target) && isIdentifier(source.argumentExpression) && isIdentifier(target.argumentExpression)) { + const symbol = getResolvedSymbol(source.argumentExpression); + if (symbol === getResolvedSymbol(target.argumentExpression) && (isConstantVariable(symbol) || isParameterOrMutableLocalVariable(symbol) && !isSymbolAssigned(symbol))) { + return isMatchingReference(source.expression, target.expression); + } + } + break; case SyntaxKind.QualifiedName: return isAccessExpression(target) && (source as QualifiedName).right.escapedText === getAccessedPropertyName(target) && diff --git a/tests/baselines/reference/controlFlowComputedPropertyNames.symbols b/tests/baselines/reference/controlFlowComputedPropertyNames.symbols new file mode 100644 index 0000000000000..2d3236aff4621 --- /dev/null +++ b/tests/baselines/reference/controlFlowComputedPropertyNames.symbols @@ -0,0 +1,134 @@ +//// [tests/cases/conformance/controlFlow/controlFlowComputedPropertyNames.ts] //// + +=== controlFlowComputedPropertyNames.ts === +function f1(obj: Record, key: string) { +>f1 : Symbol(f1, Decl(controlFlowComputedPropertyNames.ts, 0, 0)) +>obj : Symbol(obj, Decl(controlFlowComputedPropertyNames.ts, 0, 12)) +>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) +>key : Symbol(key, Decl(controlFlowComputedPropertyNames.ts, 0, 41)) + + if (typeof obj[key] === "string") { +>obj : Symbol(obj, Decl(controlFlowComputedPropertyNames.ts, 0, 12)) +>key : Symbol(key, Decl(controlFlowComputedPropertyNames.ts, 0, 41)) + + obj[key].toUpperCase(); +>obj[key].toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --)) +>obj : Symbol(obj, Decl(controlFlowComputedPropertyNames.ts, 0, 12)) +>key : Symbol(key, Decl(controlFlowComputedPropertyNames.ts, 0, 41)) +>toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --)) + } +} + +function f2(obj: Record, key: string) { +>f2 : Symbol(f2, Decl(controlFlowComputedPropertyNames.ts, 4, 1)) +>obj : Symbol(obj, Decl(controlFlowComputedPropertyNames.ts, 6, 12)) +>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) +>key : Symbol(key, Decl(controlFlowComputedPropertyNames.ts, 6, 52)) + + if (obj[key] !== undefined) { +>obj : Symbol(obj, Decl(controlFlowComputedPropertyNames.ts, 6, 12)) +>key : Symbol(key, Decl(controlFlowComputedPropertyNames.ts, 6, 52)) +>undefined : Symbol(undefined) + + obj[key].toUpperCase(); +>obj[key].toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --)) +>obj : Symbol(obj, Decl(controlFlowComputedPropertyNames.ts, 6, 12)) +>key : Symbol(key, Decl(controlFlowComputedPropertyNames.ts, 6, 52)) +>toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --)) + } + let key2 = key + key; +>key2 : Symbol(key2, Decl(controlFlowComputedPropertyNames.ts, 10, 7)) +>key : Symbol(key, Decl(controlFlowComputedPropertyNames.ts, 6, 52)) +>key : Symbol(key, Decl(controlFlowComputedPropertyNames.ts, 6, 52)) + + if (obj[key2] !== undefined) { +>obj : Symbol(obj, Decl(controlFlowComputedPropertyNames.ts, 6, 12)) +>key2 : Symbol(key2, Decl(controlFlowComputedPropertyNames.ts, 10, 7)) +>undefined : Symbol(undefined) + + obj[key2].toUpperCase(); +>obj[key2].toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --)) +>obj : Symbol(obj, Decl(controlFlowComputedPropertyNames.ts, 6, 12)) +>key2 : Symbol(key2, Decl(controlFlowComputedPropertyNames.ts, 10, 7)) +>toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --)) + } + const key3 = key + key; +>key3 : Symbol(key3, Decl(controlFlowComputedPropertyNames.ts, 14, 9)) +>key : Symbol(key, Decl(controlFlowComputedPropertyNames.ts, 6, 52)) +>key : Symbol(key, Decl(controlFlowComputedPropertyNames.ts, 6, 52)) + + if (obj[key3] !== undefined) { +>obj : Symbol(obj, Decl(controlFlowComputedPropertyNames.ts, 6, 12)) +>key3 : Symbol(key3, Decl(controlFlowComputedPropertyNames.ts, 14, 9)) +>undefined : Symbol(undefined) + + obj[key3].toUpperCase(); +>obj[key3].toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --)) +>obj : Symbol(obj, Decl(controlFlowComputedPropertyNames.ts, 6, 12)) +>key3 : Symbol(key3, Decl(controlFlowComputedPropertyNames.ts, 14, 9)) +>toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --)) + } +} + +type Thing = { a?: string, b?: number, c?: number }; +>Thing : Symbol(Thing, Decl(controlFlowComputedPropertyNames.ts, 18, 1)) +>a : Symbol(a, Decl(controlFlowComputedPropertyNames.ts, 20, 14)) +>b : Symbol(b, Decl(controlFlowComputedPropertyNames.ts, 20, 26)) +>c : Symbol(c, Decl(controlFlowComputedPropertyNames.ts, 20, 38)) + +function f3(obj: Thing, key: keyof Thing) { +>f3 : Symbol(f3, Decl(controlFlowComputedPropertyNames.ts, 20, 52)) +>obj : Symbol(obj, Decl(controlFlowComputedPropertyNames.ts, 22, 12)) +>Thing : Symbol(Thing, Decl(controlFlowComputedPropertyNames.ts, 18, 1)) +>key : Symbol(key, Decl(controlFlowComputedPropertyNames.ts, 22, 23)) +>Thing : Symbol(Thing, Decl(controlFlowComputedPropertyNames.ts, 18, 1)) + + if (obj[key] !== undefined) { +>obj : Symbol(obj, Decl(controlFlowComputedPropertyNames.ts, 22, 12)) +>key : Symbol(key, Decl(controlFlowComputedPropertyNames.ts, 22, 23)) +>undefined : Symbol(undefined) + + if (typeof obj[key] === "string") { +>obj : Symbol(obj, Decl(controlFlowComputedPropertyNames.ts, 22, 12)) +>key : Symbol(key, Decl(controlFlowComputedPropertyNames.ts, 22, 23)) + + obj[key].toUpperCase(); +>obj[key].toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --)) +>obj : Symbol(obj, Decl(controlFlowComputedPropertyNames.ts, 22, 12)) +>key : Symbol(key, Decl(controlFlowComputedPropertyNames.ts, 22, 23)) +>toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --)) + } + if (typeof obj[key] === "number") { +>obj : Symbol(obj, Decl(controlFlowComputedPropertyNames.ts, 22, 12)) +>key : Symbol(key, Decl(controlFlowComputedPropertyNames.ts, 22, 23)) + + obj[key].toFixed(); +>obj[key].toFixed : Symbol(Number.toFixed, Decl(lib.es5.d.ts, --, --)) +>obj : Symbol(obj, Decl(controlFlowComputedPropertyNames.ts, 22, 12)) +>key : Symbol(key, Decl(controlFlowComputedPropertyNames.ts, 22, 23)) +>toFixed : Symbol(Number.toFixed, Decl(lib.es5.d.ts, --, --)) + } + } +} + +function f4(obj: Record, key: K) { +>f4 : Symbol(f4, Decl(controlFlowComputedPropertyNames.ts, 31, 1)) +>K : Symbol(K, Decl(controlFlowComputedPropertyNames.ts, 33, 12)) +>obj : Symbol(obj, Decl(controlFlowComputedPropertyNames.ts, 33, 30)) +>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) +>K : Symbol(K, Decl(controlFlowComputedPropertyNames.ts, 33, 12)) +>key : Symbol(key, Decl(controlFlowComputedPropertyNames.ts, 33, 65)) +>K : Symbol(K, Decl(controlFlowComputedPropertyNames.ts, 33, 12)) + + if (obj[key]) { +>obj : Symbol(obj, Decl(controlFlowComputedPropertyNames.ts, 33, 30)) +>key : Symbol(key, Decl(controlFlowComputedPropertyNames.ts, 33, 65)) + + obj[key].toUpperCase(); +>obj[key].toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --)) +>obj : Symbol(obj, Decl(controlFlowComputedPropertyNames.ts, 33, 30)) +>key : Symbol(key, Decl(controlFlowComputedPropertyNames.ts, 33, 65)) +>toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --)) + } +} + diff --git a/tests/baselines/reference/controlFlowComputedPropertyNames.types b/tests/baselines/reference/controlFlowComputedPropertyNames.types new file mode 100644 index 0000000000000..6fd96872fa7f3 --- /dev/null +++ b/tests/baselines/reference/controlFlowComputedPropertyNames.types @@ -0,0 +1,163 @@ +//// [tests/cases/conformance/controlFlow/controlFlowComputedPropertyNames.ts] //// + +=== controlFlowComputedPropertyNames.ts === +function f1(obj: Record, key: string) { +>f1 : (obj: Record, key: string) => void +>obj : Record +>key : string + + if (typeof obj[key] === "string") { +>typeof obj[key] === "string" : boolean +>typeof obj[key] : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>obj[key] : unknown +>obj : Record +>key : string +>"string" : "string" + + obj[key].toUpperCase(); +>obj[key].toUpperCase() : string +>obj[key].toUpperCase : () => string +>obj[key] : string +>obj : Record +>key : string +>toUpperCase : () => string + } +} + +function f2(obj: Record, key: string) { +>f2 : (obj: Record, key: string) => void +>obj : Record +>key : string + + if (obj[key] !== undefined) { +>obj[key] !== undefined : boolean +>obj[key] : string | undefined +>obj : Record +>key : string +>undefined : undefined + + obj[key].toUpperCase(); +>obj[key].toUpperCase() : string +>obj[key].toUpperCase : () => string +>obj[key] : string +>obj : Record +>key : string +>toUpperCase : () => string + } + let key2 = key + key; +>key2 : string +>key + key : string +>key : string +>key : string + + if (obj[key2] !== undefined) { +>obj[key2] !== undefined : boolean +>obj[key2] : string | undefined +>obj : Record +>key2 : string +>undefined : undefined + + obj[key2].toUpperCase(); +>obj[key2].toUpperCase() : string +>obj[key2].toUpperCase : () => string +>obj[key2] : string +>obj : Record +>key2 : string +>toUpperCase : () => string + } + const key3 = key + key; +>key3 : string +>key + key : string +>key : string +>key : string + + if (obj[key3] !== undefined) { +>obj[key3] !== undefined : boolean +>obj[key3] : string | undefined +>obj : Record +>key3 : string +>undefined : undefined + + obj[key3].toUpperCase(); +>obj[key3].toUpperCase() : string +>obj[key3].toUpperCase : () => string +>obj[key3] : string +>obj : Record +>key3 : string +>toUpperCase : () => string + } +} + +type Thing = { a?: string, b?: number, c?: number }; +>Thing : { a?: string | undefined; b?: number | undefined; c?: number | undefined; } +>a : string | undefined +>b : number | undefined +>c : number | undefined + +function f3(obj: Thing, key: keyof Thing) { +>f3 : (obj: Thing, key: keyof Thing) => void +>obj : Thing +>key : keyof Thing + + if (obj[key] !== undefined) { +>obj[key] !== undefined : boolean +>obj[key] : string | number | undefined +>obj : Thing +>key : keyof Thing +>undefined : undefined + + if (typeof obj[key] === "string") { +>typeof obj[key] === "string" : boolean +>typeof obj[key] : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>obj[key] : string | number +>obj : Thing +>key : keyof Thing +>"string" : "string" + + obj[key].toUpperCase(); +>obj[key].toUpperCase() : string +>obj[key].toUpperCase : () => string +>obj[key] : string +>obj : Thing +>key : keyof Thing +>toUpperCase : () => string + } + if (typeof obj[key] === "number") { +>typeof obj[key] === "number" : boolean +>typeof obj[key] : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>obj[key] : string | number +>obj : Thing +>key : keyof Thing +>"number" : "number" + + obj[key].toFixed(); +>obj[key].toFixed() : string +>obj[key].toFixed : (fractionDigits?: number | undefined) => string +>obj[key] : number +>obj : Thing +>key : keyof Thing +>toFixed : (fractionDigits?: number | undefined) => string + } + } +} + +function f4(obj: Record, key: K) { +>f4 : (obj: Record, key: K) => void +>obj : Record +>key : K + + if (obj[key]) { +>obj[key] : Record[K] +>obj : Record +>key : K + + obj[key].toUpperCase(); +>obj[key].toUpperCase() : string +>obj[key].toUpperCase : () => string +>obj[key] : string +>obj : Record +>key : K +>toUpperCase : () => string + } +} + diff --git a/tests/baselines/reference/mappedTypeGenericIndexedAccess.types b/tests/baselines/reference/mappedTypeGenericIndexedAccess.types index 75dd61b90a26e..cb4107f6d38a3 100644 --- a/tests/baselines/reference/mappedTypeGenericIndexedAccess.types +++ b/tests/baselines/reference/mappedTypeGenericIndexedAccess.types @@ -60,14 +60,14 @@ class Test { >[] : never[] } this.entries[name]?.push(entry); ->this.entries[name]?.push(entry) : number | undefined ->this.entries[name]?.push : ((...items: Types[T][]) => number) | undefined ->this.entries[name] : Types[T][] | undefined +>this.entries[name]?.push(entry) : number +>this.entries[name]?.push : (...items: Types[T][]) => number +>this.entries[name] : Types[T][] >this.entries : { first?: { a1: true; }[] | undefined; second?: { a2: true; }[] | undefined; third?: { a3: true; }[] | undefined; } >this : this >entries : { first?: { a1: true; }[] | undefined; second?: { a2: true; }[] | undefined; third?: { a3: true; }[] | undefined; } >name : T ->push : ((...items: Types[T][]) => number) | undefined +>push : (...items: Types[T][]) => number >entry : Types[T] } } diff --git a/tests/baselines/reference/noUncheckedIndexedAccess.errors.txt b/tests/baselines/reference/noUncheckedIndexedAccess.errors.txt index 5e3da68cf77f1..1199c0dbb17d1 100644 --- a/tests/baselines/reference/noUncheckedIndexedAccess.errors.txt +++ b/tests/baselines/reference/noUncheckedIndexedAccess.errors.txt @@ -33,8 +33,7 @@ noUncheckedIndexedAccess.ts(90,7): error TS2322: Type 'string | undefined' is no Type 'undefined' is not assignable to type 'string'. noUncheckedIndexedAccess.ts(98,5): error TS2322: Type 'undefined' is not assignable to type '{ [key: string]: string; a: string; b: string; }[Key]'. Type 'undefined' is not assignable to type 'string'. -noUncheckedIndexedAccess.ts(99,11): error TS2322: Type 'string | undefined' is not assignable to type 'string'. - Type 'undefined' is not assignable to type 'string'. +noUncheckedIndexedAccess.ts(99,11): error TS2322: Type 'undefined' is not assignable to type 'string'. ==== noUncheckedIndexedAccess.ts (31 errors) ==== @@ -203,8 +202,7 @@ noUncheckedIndexedAccess.ts(99,11): error TS2322: Type 'string | undefined' is n !!! error TS2322: Type 'undefined' is not assignable to type 'string'. const v: string = myRecord2[key]; // Should error ~ -!!! error TS2322: Type 'string | undefined' is not assignable to type 'string'. -!!! error TS2322: Type 'undefined' is not assignable to type 'string'. +!!! error TS2322: Type 'undefined' is not assignable to type 'string'. }; \ No newline at end of file diff --git a/tests/baselines/reference/noUncheckedIndexedAccess.types b/tests/baselines/reference/noUncheckedIndexedAccess.types index 54fad592dfc87..c6fffb01a5f50 100644 --- a/tests/baselines/reference/noUncheckedIndexedAccess.types +++ b/tests/baselines/reference/noUncheckedIndexedAccess.types @@ -412,7 +412,7 @@ const fn3 = (key: Key) => { const v: string = myRecord2[key]; // Should error >v : string ->myRecord2[key] : string | undefined +>myRecord2[key] : undefined >myRecord2 : { [key: string]: string; a: string; b: string; } >key : Key diff --git a/tests/cases/conformance/controlFlow/controlFlowComputedPropertyNames.ts b/tests/cases/conformance/controlFlow/controlFlowComputedPropertyNames.ts new file mode 100644 index 0000000000000..5c29e86f97d3f --- /dev/null +++ b/tests/cases/conformance/controlFlow/controlFlowComputedPropertyNames.ts @@ -0,0 +1,41 @@ +// @strict: true +// @noEmit: true + +function f1(obj: Record, key: string) { + if (typeof obj[key] === "string") { + obj[key].toUpperCase(); + } +} + +function f2(obj: Record, key: string) { + if (obj[key] !== undefined) { + obj[key].toUpperCase(); + } + let key2 = key + key; + if (obj[key2] !== undefined) { + obj[key2].toUpperCase(); + } + const key3 = key + key; + if (obj[key3] !== undefined) { + obj[key3].toUpperCase(); + } +} + +type Thing = { a?: string, b?: number, c?: number }; + +function f3(obj: Thing, key: keyof Thing) { + if (obj[key] !== undefined) { + if (typeof obj[key] === "string") { + obj[key].toUpperCase(); + } + if (typeof obj[key] === "number") { + obj[key].toFixed(); + } + } +} + +function f4(obj: Record, key: K) { + if (obj[key]) { + obj[key].toUpperCase(); + } +} From 2de69b09c5a67ab1e73ca952151521b5ca876dd9 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Tue, 26 Mar 2024 22:52:43 +0200 Subject: [PATCH 2/9] feat(41825): JSDoc equivalent of import * (#57207) --- src/compiler/binder.ts | 47 ++++ src/compiler/checker.ts | 36 ++- src/compiler/emitter.ts | 22 ++ src/compiler/factory/nodeFactory.ts | 25 ++ src/compiler/factory/nodeTests.ts | 5 + src/compiler/parser.ts | 66 ++++- src/compiler/program.ts | 15 +- src/compiler/scanner.ts | 12 +- src/compiler/transformers/declarations.ts | 3 + src/compiler/types.ts | 29 ++- src/compiler/utilities.ts | 12 +- .../codefixes/convertToTypeOnlyImport.ts | 5 +- src/services/codefixes/importFixes.ts | 14 +- src/services/codefixes/useDefaultImport.ts | 3 +- src/services/completions.ts | 47 ++-- src/services/importTracker.ts | 7 +- src/services/jsDoc.ts | 1 + src/services/organizeImports.ts | 5 +- src/services/refactors/convertImport.ts | 26 +- src/services/stringCompletions.ts | 1 + src/services/utilities.ts | 5 +- src/testRunner/unittests/jsDocParsing.ts | 28 +++ ...ocComments.parsesCorrectly.importTag1.json | 54 ++++ ...ocComments.parsesCorrectly.importTag2.json | 76 ++++++ ...ocComments.parsesCorrectly.importTag3.json | 61 +++++ ...ocComments.parsesCorrectly.importTag4.json | 62 +++++ tests/baselines/reference/api/typescript.d.ts | 29 ++- .../findAllRefsJsDocImportTag.baseline.jsonc | 105 ++++++++ ...ToDefinitionJsDocImportTag1.baseline.jsonc | 17 ++ ...ToDefinitionJsDocImportTag2.baseline.jsonc | 5 + ...ToDefinitionJsDocImportTag3.baseline.jsonc | 5 + ...ToDefinitionJsDocImportTag4.baseline.jsonc | 20 ++ ...ToDefinitionJsDocImportTag5.baseline.jsonc | 25 ++ tests/baselines/reference/importTag1.symbols | 22 ++ tests/baselines/reference/importTag1.types | 20 ++ .../reference/importTag10.errors.txt | 11 + tests/baselines/reference/importTag10.symbols | 8 + tests/baselines/reference/importTag10.types | 8 + .../reference/importTag11.errors.txt | 13 + tests/baselines/reference/importTag11.symbols | 8 + tests/baselines/reference/importTag11.types | 8 + .../reference/importTag12.errors.txt | 10 + tests/baselines/reference/importTag12.symbols | 8 + tests/baselines/reference/importTag12.types | 8 + .../reference/importTag13.errors.txt | 13 + tests/baselines/reference/importTag13.symbols | 6 + tests/baselines/reference/importTag13.types | 6 + .../reference/importTag14.errors.txt | 14 ++ tests/baselines/reference/importTag14.symbols | 6 + tests/baselines/reference/importTag14.types | 6 + .../importTag15(module=es2015).errors.txt | 18 ++ .../reference/importTag15(module=es2015).js | 25 ++ .../importTag15(module=es2015).symbols | 15 ++ .../importTag15(module=es2015).types | 15 ++ .../importTag15(module=esnext).errors.txt | 18 ++ .../reference/importTag15(module=esnext).js | 25 ++ .../importTag15(module=esnext).symbols | 15 ++ .../importTag15(module=esnext).types | 15 ++ tests/baselines/reference/importTag16.js | 32 +++ tests/baselines/reference/importTag16.symbols | 21 ++ tests/baselines/reference/importTag16.types | 19 ++ tests/baselines/reference/importTag2.symbols | 22 ++ tests/baselines/reference/importTag2.types | 20 ++ tests/baselines/reference/importTag3.symbols | 22 ++ tests/baselines/reference/importTag3.types | 20 ++ .../baselines/reference/importTag4.errors.txt | 27 ++ tests/baselines/reference/importTag4.symbols | 26 ++ tests/baselines/reference/importTag4.types | 24 ++ tests/baselines/reference/importTag5.js | 33 +++ tests/baselines/reference/importTag5.symbols | 22 ++ tests/baselines/reference/importTag5.types | 20 ++ tests/baselines/reference/importTag6.symbols | 33 +++ tests/baselines/reference/importTag6.types | 29 +++ tests/baselines/reference/importTag7.symbols | 32 +++ tests/baselines/reference/importTag7.types | 28 +++ tests/baselines/reference/importTag8.symbols | 32 +++ tests/baselines/reference/importTag8.types | 28 +++ tests/baselines/reference/importTag9.symbols | 32 +++ tests/baselines/reference/importTag9.types | 28 +++ .../jsdocImportTagCompletion2.baseline | 48 ++++ .../jsdocImportTagCompletion3.baseline | 51 ++++ ...docParameterTagSnippetCompletion1.baseline | 238 ++++++++++++++++++ ...docParameterTagSnippetCompletion2.baseline | 70 ++++++ ...docParameterTagSnippetCompletion3.baseline | 84 +++++++ .../renameJsDocImportTag.baseline.jsonc | 10 + tests/cases/conformance/jsdoc/importTag1.ts | 18 ++ tests/cases/conformance/jsdoc/importTag10.ts | 8 + tests/cases/conformance/jsdoc/importTag11.ts | 8 + tests/cases/conformance/jsdoc/importTag12.ts | 8 + tests/cases/conformance/jsdoc/importTag13.ts | 11 + tests/cases/conformance/jsdoc/importTag14.ts | 6 + tests/cases/conformance/jsdoc/importTag15.ts | 15 ++ tests/cases/conformance/jsdoc/importTag16.ts | 17 ++ tests/cases/conformance/jsdoc/importTag2.ts | 18 ++ tests/cases/conformance/jsdoc/importTag3.ts | 18 ++ tests/cases/conformance/jsdoc/importTag4.ts | 22 ++ tests/cases/conformance/jsdoc/importTag5.ts | 19 ++ tests/cases/conformance/jsdoc/importTag6.ts | 25 ++ tests/cases/conformance/jsdoc/importTag7.ts | 24 ++ tests/cases/conformance/jsdoc/importTag8.ts | 24 ++ tests/cases/conformance/jsdoc/importTag9.ts | 24 ++ .../cases/fourslash/autoImportJsDocImport1.ts | 40 +++ .../fourslash/findAllRefsJsDocImportTag.ts | 19 ++ .../goToDefinitionJsDocImportTag1.ts | 14 ++ .../goToDefinitionJsDocImportTag2.ts | 14 ++ .../goToDefinitionJsDocImportTag3.ts | 14 ++ .../goToDefinitionJsDocImportTag4.ts | 14 ++ .../goToDefinitionJsDocImportTag5.ts | 19 ++ .../fourslash/jsdocImportTagCompletion1.ts | 13 + .../fourslash/jsdocImportTagCompletion2.ts | 14 ++ .../fourslash/jsdocImportTagCompletion3.ts | 18 ++ .../refactorConvertImport_namedToDefault2.ts | 26 ++ ...efactorConvertImport_namedToNamespace10.ts | 15 ++ ...efactorConvertImport_namespaceToNamed1.ts} | 0 ...refactorConvertImport_namespaceToNamed2.ts | 31 +++ tests/cases/fourslash/renameJsDocImportTag.ts | 19 ++ 116 files changed, 2689 insertions(+), 91 deletions(-) create mode 100644 tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.importTag1.json create mode 100644 tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.importTag2.json create mode 100644 tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.importTag3.json create mode 100644 tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.importTag4.json create mode 100644 tests/baselines/reference/findAllRefsJsDocImportTag.baseline.jsonc create mode 100644 tests/baselines/reference/goToDefinitionJsDocImportTag1.baseline.jsonc create mode 100644 tests/baselines/reference/goToDefinitionJsDocImportTag2.baseline.jsonc create mode 100644 tests/baselines/reference/goToDefinitionJsDocImportTag3.baseline.jsonc create mode 100644 tests/baselines/reference/goToDefinitionJsDocImportTag4.baseline.jsonc create mode 100644 tests/baselines/reference/goToDefinitionJsDocImportTag5.baseline.jsonc create mode 100644 tests/baselines/reference/importTag1.symbols create mode 100644 tests/baselines/reference/importTag1.types create mode 100644 tests/baselines/reference/importTag10.errors.txt create mode 100644 tests/baselines/reference/importTag10.symbols create mode 100644 tests/baselines/reference/importTag10.types create mode 100644 tests/baselines/reference/importTag11.errors.txt create mode 100644 tests/baselines/reference/importTag11.symbols create mode 100644 tests/baselines/reference/importTag11.types create mode 100644 tests/baselines/reference/importTag12.errors.txt create mode 100644 tests/baselines/reference/importTag12.symbols create mode 100644 tests/baselines/reference/importTag12.types create mode 100644 tests/baselines/reference/importTag13.errors.txt create mode 100644 tests/baselines/reference/importTag13.symbols create mode 100644 tests/baselines/reference/importTag13.types create mode 100644 tests/baselines/reference/importTag14.errors.txt create mode 100644 tests/baselines/reference/importTag14.symbols create mode 100644 tests/baselines/reference/importTag14.types create mode 100644 tests/baselines/reference/importTag15(module=es2015).errors.txt create mode 100644 tests/baselines/reference/importTag15(module=es2015).js create mode 100644 tests/baselines/reference/importTag15(module=es2015).symbols create mode 100644 tests/baselines/reference/importTag15(module=es2015).types create mode 100644 tests/baselines/reference/importTag15(module=esnext).errors.txt create mode 100644 tests/baselines/reference/importTag15(module=esnext).js create mode 100644 tests/baselines/reference/importTag15(module=esnext).symbols create mode 100644 tests/baselines/reference/importTag15(module=esnext).types create mode 100644 tests/baselines/reference/importTag16.js create mode 100644 tests/baselines/reference/importTag16.symbols create mode 100644 tests/baselines/reference/importTag16.types create mode 100644 tests/baselines/reference/importTag2.symbols create mode 100644 tests/baselines/reference/importTag2.types create mode 100644 tests/baselines/reference/importTag3.symbols create mode 100644 tests/baselines/reference/importTag3.types create mode 100644 tests/baselines/reference/importTag4.errors.txt create mode 100644 tests/baselines/reference/importTag4.symbols create mode 100644 tests/baselines/reference/importTag4.types create mode 100644 tests/baselines/reference/importTag5.js create mode 100644 tests/baselines/reference/importTag5.symbols create mode 100644 tests/baselines/reference/importTag5.types create mode 100644 tests/baselines/reference/importTag6.symbols create mode 100644 tests/baselines/reference/importTag6.types create mode 100644 tests/baselines/reference/importTag7.symbols create mode 100644 tests/baselines/reference/importTag7.types create mode 100644 tests/baselines/reference/importTag8.symbols create mode 100644 tests/baselines/reference/importTag8.types create mode 100644 tests/baselines/reference/importTag9.symbols create mode 100644 tests/baselines/reference/importTag9.types create mode 100644 tests/baselines/reference/jsdocImportTagCompletion2.baseline create mode 100644 tests/baselines/reference/jsdocImportTagCompletion3.baseline create mode 100644 tests/baselines/reference/renameJsDocImportTag.baseline.jsonc create mode 100644 tests/cases/conformance/jsdoc/importTag1.ts create mode 100644 tests/cases/conformance/jsdoc/importTag10.ts create mode 100644 tests/cases/conformance/jsdoc/importTag11.ts create mode 100644 tests/cases/conformance/jsdoc/importTag12.ts create mode 100644 tests/cases/conformance/jsdoc/importTag13.ts create mode 100644 tests/cases/conformance/jsdoc/importTag14.ts create mode 100644 tests/cases/conformance/jsdoc/importTag15.ts create mode 100644 tests/cases/conformance/jsdoc/importTag16.ts create mode 100644 tests/cases/conformance/jsdoc/importTag2.ts create mode 100644 tests/cases/conformance/jsdoc/importTag3.ts create mode 100644 tests/cases/conformance/jsdoc/importTag4.ts create mode 100644 tests/cases/conformance/jsdoc/importTag5.ts create mode 100644 tests/cases/conformance/jsdoc/importTag6.ts create mode 100644 tests/cases/conformance/jsdoc/importTag7.ts create mode 100644 tests/cases/conformance/jsdoc/importTag8.ts create mode 100644 tests/cases/conformance/jsdoc/importTag9.ts create mode 100644 tests/cases/fourslash/autoImportJsDocImport1.ts create mode 100644 tests/cases/fourslash/findAllRefsJsDocImportTag.ts create mode 100644 tests/cases/fourslash/goToDefinitionJsDocImportTag1.ts create mode 100644 tests/cases/fourslash/goToDefinitionJsDocImportTag2.ts create mode 100644 tests/cases/fourslash/goToDefinitionJsDocImportTag3.ts create mode 100644 tests/cases/fourslash/goToDefinitionJsDocImportTag4.ts create mode 100644 tests/cases/fourslash/goToDefinitionJsDocImportTag5.ts create mode 100644 tests/cases/fourslash/jsdocImportTagCompletion1.ts create mode 100644 tests/cases/fourslash/jsdocImportTagCompletion2.ts create mode 100644 tests/cases/fourslash/jsdocImportTagCompletion3.ts create mode 100644 tests/cases/fourslash/refactorConvertImport_namedToDefault2.ts create mode 100644 tests/cases/fourslash/refactorConvertImport_namedToNamespace10.ts rename tests/cases/fourslash/{refactorConvertImport_namespaceToNamed.ts => refactorConvertImport_namespaceToNamed1.ts} (100%) create mode 100644 tests/cases/fourslash/refactorConvertImport_namespaceToNamed2.ts create mode 100644 tests/cases/fourslash/renameJsDocImportTag.ts diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index d5f020294ed87..94f9be9c02c58 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -94,6 +94,7 @@ import { getExpandoInitializer, getHostSignatureFromJSDoc, getImmediatelyInvokedFunctionExpression, + getJSDocHost, getJSDocTypeTag, getLeftmostAccessExpression, getNameOfDeclaration, @@ -229,6 +230,7 @@ import { JSDocClassTag, JSDocEnumTag, JSDocFunctionType, + JSDocImportTag, JSDocOverloadTag, JSDocParameterTag, JSDocPropertyLikeTag, @@ -525,6 +527,7 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { var lastContainer: HasLocals; var delayedTypeAliases: (JSDocTypedefTag | JSDocCallbackTag | JSDocEnumTag)[]; var seenThisKeyword: boolean; + var jsDocImports: JSDocImportTag[]; // state used by control flow analysis var currentFlow: FlowNode; @@ -592,6 +595,7 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { file.symbolCount = symbolCount; file.classifiableNames = classifiableNames; delayedBindJSDocTypedefTag(); + bindJSDocImports(); } file = undefined!; @@ -603,6 +607,7 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { blockScopeContainer = undefined!; lastContainer = undefined!; delayedTypeAliases = undefined!; + jsDocImports = undefined!; seenThisKeyword = false; currentFlow = undefined!; currentBreakTarget = undefined; @@ -1181,6 +1186,9 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { bindJSDocTypeAlias(node as JSDocTypedefTag | JSDocCallbackTag | JSDocEnumTag); break; // In source files and blocks, bind functions first to match hoisting that occurs at runtime + case SyntaxKind.JSDocImportTag: + bindJSDocImportTag(node as JSDocImportTag); + break; case SyntaxKind.SourceFile: { bindEachFunctionsFirst((node as SourceFile).statements); bind((node as SourceFile).endOfFileToken); @@ -2065,6 +2073,14 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { } } + function bindJSDocImportTag(node: JSDocImportTag) { + bind(node.tagName); + + if (typeof node.comment !== "string") { + bindEach(node.comment); + } + } + function bindOptionalExpression(node: Expression, trueTarget: FlowLabel, falseTarget: FlowLabel) { doWithConditionalBranches(bind, node, trueTarget, falseTarget); if (!isOptionalChain(node) || isOutermostOptionalChain(node)) { @@ -2443,6 +2459,35 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { currentFlow = saveCurrentFlow; } + function bindJSDocImports() { + if (jsDocImports === undefined) { + return; + } + + const saveContainer = container; + const saveLastContainer = lastContainer; + const saveBlockScopeContainer = blockScopeContainer; + const saveParent = parent; + const saveCurrentFlow = currentFlow; + + for (const jsDocImportTag of jsDocImports) { + const host = getJSDocHost(jsDocImportTag); + const enclosingContainer = host ? getEnclosingContainer(host) as IsContainer | undefined : undefined; + const enclosingBlockScopeContainer = host ? getEnclosingBlockScopeContainer(host) as IsBlockScopedContainer | undefined : undefined; + container = enclosingContainer || file; + blockScopeContainer = enclosingBlockScopeContainer || file; + currentFlow = initFlowNode({ flags: FlowFlags.Start }); + parent = jsDocImportTag; + bind(jsDocImportTag.importClause); + } + + container = saveContainer; + lastContainer = saveLastContainer; + blockScopeContainer = saveBlockScopeContainer; + parent = saveParent; + currentFlow = saveCurrentFlow; + } + // The binder visits every node in the syntax tree so it is a convenient place to perform a single localized // check for reserved words used as identifiers in strict mode code, as well as `yield` or `await` in // [Yield] or [Await] contexts, respectively. @@ -2995,6 +3040,8 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { return (delayedTypeAliases || (delayedTypeAliases = [])).push(node as JSDocTypedefTag | JSDocCallbackTag | JSDocEnumTag); case SyntaxKind.JSDocOverloadTag: return bind((node as JSDocOverloadTag).typeExpression); + case SyntaxKind.JSDocImportTag: + return (jsDocImports || (jsDocImports = [])).push(node as JSDocImportTag); } } diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 613698c4ffd96..c9313f78f5ae7 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -11,8 +11,8 @@ import { AmbientModuleDeclaration, and, AnonymousType, + AnyImportOrJsDocImport, AnyImportOrReExport, - AnyImportSyntax, append, appendIfUnique, ArrayBindingPattern, @@ -581,6 +581,7 @@ import { isJSDocCallbackTag, isJSDocConstructSignature, isJSDocFunctionType, + isJSDocImportTag, isJSDocIndexSignature, isJSDocLinkLike, isJSDocMemberName, @@ -770,6 +771,7 @@ import { JSDocEnumTag, JSDocFunctionType, JSDocImplementsTag, + JSDocImportTag, JSDocLink, JSDocLinkCode, JSDocLinkPlain, @@ -3382,6 +3384,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { case SyntaxKind.JSDocTypedefTag: case SyntaxKind.JSDocCallbackTag: case SyntaxKind.JSDocEnumTag: + case SyntaxKind.JSDocImportTag: // js type aliases do not resolve names from their host, so skip past it const root = getJSDocRoot(location); if (root) { @@ -3950,7 +3953,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { || (n === stopAt || isFunctionLike(n) && (!getImmediatelyInvokedFunctionExpression(n) || (getFunctionFlags(n) & FunctionFlags.AsyncGenerator)) ? "quit" : false)); } - function getAnyImportSyntax(node: Node): AnyImportSyntax | undefined { + function getAnyImportSyntax(node: Node): AnyImportOrJsDocImport | undefined { switch (node.kind) { case SyntaxKind.ImportEqualsDeclaration: return node as ImportEqualsDeclaration; @@ -4288,8 +4291,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } - function getExternalModuleMember(node: ImportDeclaration | ExportDeclaration | VariableDeclaration, specifier: ImportOrExportSpecifier | BindingElement | PropertyAccessExpression, dontResolveAlias = false): Symbol | undefined { - const moduleSpecifier = getExternalModuleRequireArgument(node) || (node as ImportDeclaration | ExportDeclaration).moduleSpecifier!; + function getExternalModuleMember(node: ImportDeclaration | ExportDeclaration | VariableDeclaration | JSDocImportTag, specifier: ImportOrExportSpecifier | BindingElement | PropertyAccessExpression, dontResolveAlias = false): Symbol | undefined { + const moduleSpecifier = getExternalModuleRequireArgument(node) || (node as ImportDeclaration | ExportDeclaration | JSDocImportTag).moduleSpecifier!; const moduleSymbol = resolveExternalModuleName(node, moduleSpecifier)!; // TODO: GH#18217 const name = !isPropertyAccessExpression(specifier) && specifier.propertyName || specifier.name; if (!isIdentifier(name)) { @@ -5014,6 +5017,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { ? location : (isModuleDeclaration(location) ? location : location.parent && isModuleDeclaration(location.parent) && location.parent.name === location ? location.parent : undefined)?.name || (isLiteralImportTypeNode(location) ? location : undefined)?.argument.literal || + (isInJSFile(location) && isJSDocImportTag(location) ? location.moduleSpecifier : undefined) || (isVariableDeclaration(location) && location.initializer && isRequireCall(location.initializer, /*requireStringLiteralLikeArgument*/ true) ? location.initializer.arguments[0] : undefined) || findAncestor(location, isImportCall)?.arguments[0] || findAncestor(location, isImportDeclaration)?.moduleSpecifier || @@ -9800,12 +9804,14 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { case SyntaxKind.ImportClause: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); // generate specifier (even though we're reusing and existing one) for ambient module reference include side effects const specifier = bundled ? factory.createStringLiteral(generatedSpecifier) : (node as ImportClause).parent.moduleSpecifier; + const attributes = isImportDeclaration(node.parent) ? node.parent.attributes : undefined; + const isTypeOnly = isJSDocImportTag((node as ImportClause).parent); addResult( factory.createImportDeclaration( /*modifiers*/ undefined, - factory.createImportClause(/*isTypeOnly*/ false, factory.createIdentifier(localName), /*namedBindings*/ undefined), + factory.createImportClause(isTypeOnly, factory.createIdentifier(localName), /*namedBindings*/ undefined), specifier, - (node as ImportClause).parent.attributes, + attributes, ), ModifierFlags.None, ); @@ -9814,10 +9820,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { case SyntaxKind.NamespaceImport: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); // generate specifier (even though we're reusing and existing one) for ambient module reference include side effects const specifier = bundled ? factory.createStringLiteral(generatedSpecifier) : (node as NamespaceImport).parent.parent.moduleSpecifier; + const isTypeOnly = isJSDocImportTag((node as NamespaceImport).parent.parent); addResult( factory.createImportDeclaration( /*modifiers*/ undefined, - factory.createImportClause(/*isTypeOnly*/ false, /*name*/ undefined, factory.createNamespaceImport(factory.createIdentifier(localName))), + factory.createImportClause(isTypeOnly, /*name*/ undefined, factory.createNamespaceImport(factory.createIdentifier(localName))), specifier, (node as ImportClause).parent.attributes, ), @@ -9839,11 +9846,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { case SyntaxKind.ImportSpecifier: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); // generate specifier (even though we're reusing and existing one) for ambient module reference include side effects const specifier = bundled ? factory.createStringLiteral(generatedSpecifier) : (node as ImportSpecifier).parent.parent.parent.moduleSpecifier; + const isTypeOnly = isJSDocImportTag((node as ImportSpecifier).parent.parent.parent); addResult( factory.createImportDeclaration( /*modifiers*/ undefined, factory.createImportClause( - /*isTypeOnly*/ false, + isTypeOnly, /*name*/ undefined, factory.createNamedImports([ factory.createImportSpecifier( @@ -42193,6 +42201,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } + function checkJSDocImportTag(node: JSDocImportTag) { + checkImportAttributes(node); + } + function checkJSDocImplementsTag(node: JSDocImplementsTag): void { const classLike = getEffectiveJSDocHost(node); if (!classLike || !isClassDeclaration(classLike) && !isClassExpression(classLike)) { @@ -46402,7 +46414,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } - function checkImportAttributes(declaration: ImportDeclaration | ExportDeclaration) { + function checkImportAttributes(declaration: ImportDeclaration | ExportDeclaration | JSDocImportTag) { const node = declaration.attributes; if (node) { const importAttributesType = getGlobalImportAttributesType(/*reportErrors*/ true); @@ -46429,7 +46441,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return grammarErrorOnNode(node, message); } - if (isImportDeclaration(declaration) ? declaration.importClause?.isTypeOnly : declaration.isTypeOnly) { + const isTypeOnly = isJSDocImportTag(declaration) || (isImportDeclaration(declaration) ? declaration.importClause?.isTypeOnly : declaration.isTypeOnly); + if (isTypeOnly) { return grammarErrorOnNode(node, isImportAttributes ? Diagnostics.Import_attributes_cannot_be_used_with_type_only_imports_or_exports : Diagnostics.Import_assertions_cannot_be_used_with_type_only_imports_or_exports); } @@ -46957,6 +46970,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return checkJSDocSatisfiesTag(node as JSDocSatisfiesTag); case SyntaxKind.JSDocThisTag: return checkJSDocThisTag(node as JSDocThisTag); + case SyntaxKind.JSDocImportTag: + return checkJSDocImportTag(node as JSDocImportTag); case SyntaxKind.IndexedAccessType: return checkIndexedAccessType(node as IndexedAccessTypeNode); case SyntaxKind.MappedType: @@ -47913,6 +47928,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if ( (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) || ((node.parent.kind === SyntaxKind.ImportDeclaration || node.parent.kind === SyntaxKind.ExportDeclaration) && (node.parent as ImportDeclaration).moduleSpecifier === node) || + (isInJSFile(node) && isJSDocImportTag(node.parent) && node.parent.moduleSpecifier === node) || ((isInJSFile(node) && isRequireCall(node.parent, /*requireStringLiteralLikeArgument*/ false)) || isImportCall(node.parent)) || (isLiteralTypeNode(node.parent) && isLiteralImportTypeNode(node.parent.parent) && node.parent.parent.argument === node.parent) ) { diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 15e1847f72ac3..01a525951f844 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -243,6 +243,7 @@ import { JSDocEnumTag, JSDocFunctionType, JSDocImplementsTag, + JSDocImportTag, JSDocNameReference, JSDocNonNullableType, JSDocNullableType, @@ -1826,6 +1827,8 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri return emitJSDocTypedefTag(node as JSDocTypedefTag); case SyntaxKind.JSDocSeeTag: return emitJSDocSeeTag(node as JSDocSeeTag); + case SyntaxKind.JSDocImportTag: + return emitJSDocImportTag(node as JSDocImportTag); // SyntaxKind.JSDocPropertyTag (see JSDocParameterTag, above) // Transformation nodes @@ -4006,6 +4009,25 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri emitJSDocComment(tag.comment); } + function emitJSDocImportTag(tag: JSDocImportTag) { + emitJSDocTagName(tag.tagName); + writeSpace(); + + if (tag.importClause) { + emit(tag.importClause); + writeSpace(); + + emitTokenWithComment(SyntaxKind.FromKeyword, tag.importClause.end, writeKeyword, tag); + writeSpace(); + } + + emitExpression(tag.moduleSpecifier); + if (tag.attributes) { + emitWithLeadingSpace(tag.attributes); + } + emitJSDocComment(tag.comment); + } + function emitJSDocNameReference(node: JSDocNameReference) { writeSpace(); writePunctuation("{"); diff --git a/src/compiler/factory/nodeFactory.ts b/src/compiler/factory/nodeFactory.ts index 57594879a59ab..76e084c90d8f0 100644 --- a/src/compiler/factory/nodeFactory.ts +++ b/src/compiler/factory/nodeFactory.ts @@ -226,6 +226,7 @@ import { JSDocEnumTag, JSDocFunctionType, JSDocImplementsTag, + JSDocImportTag, JSDocLink, JSDocLinkCode, JSDocLinkPlain, @@ -857,6 +858,8 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode updateJSDocImplementsTag, createJSDocSeeTag, updateJSDocSeeTag, + createJSDocImportTag, + updateJSDocImportTag, createJSDocNameReference, updateJSDocNameReference, createJSDocMemberName, @@ -5523,6 +5526,26 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode : node; } + // @api + function createJSDocImportTag(tagName: Identifier | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes?: ImportAttributes, comment?: string | NodeArray): JSDocImportTag { + const node = createBaseJSDocTag(SyntaxKind.JSDocImportTag, tagName ?? createIdentifier("import"), comment); + node.importClause = importClause; + node.moduleSpecifier = moduleSpecifier; + node.attributes = attributes; + node.comment = comment; + return node; + } + + function updateJSDocImportTag(node: JSDocImportTag, tagName: Identifier | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes: ImportAttributes | undefined, comment: string | NodeArray | undefined): JSDocImportTag { + return node.tagName !== tagName + || node.comment !== comment + || node.importClause !== importClause + || node.moduleSpecifier !== moduleSpecifier + || node.attributes !== attributes + ? update(createJSDocImportTag(tagName, importClause, moduleSpecifier, attributes, comment), node) + : node; + } + // @api function createJSDocText(text: string): JSDocText { const node = createBaseNode(SyntaxKind.JSDocText); @@ -7179,6 +7202,8 @@ function getDefaultTagNameForKind(kind: JSDocTag["kind"]): string { return "augments"; case SyntaxKind.JSDocImplementsTag: return "implements"; + case SyntaxKind.JSDocImportTag: + return "import"; default: return Debug.fail(`Unsupported kind: ${Debug.formatSyntaxKind(kind)}`); } diff --git a/src/compiler/factory/nodeTests.ts b/src/compiler/factory/nodeTests.ts index 249b442316cf3..012616ac5dc70 100644 --- a/src/compiler/factory/nodeTests.ts +++ b/src/compiler/factory/nodeTests.ts @@ -91,6 +91,7 @@ import { JSDocEnumTag, JSDocFunctionType, JSDocImplementsTag, + JSDocImportTag, JSDocLink, JSDocLinkCode, JSDocLinkPlain, @@ -1183,6 +1184,10 @@ export function isJSDocThrowsTag(node: Node): node is JSDocThrowsTag { return node.kind === SyntaxKind.JSDocThrowsTag; } +export function isJSDocImportTag(node: Node): node is JSDocImportTag { + return node.kind === SyntaxKind.JSDocImportTag; +} + // Synthesized list /** @internal */ diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 009e1cdf3ea8f..ca4bb9ed61275 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -175,6 +175,7 @@ import { JSDocEnumTag, JSDocFunctionType, JSDocImplementsTag, + JSDocImportTag, JSDocLink, JSDocLinkCode, JSDocLinkPlain, @@ -1125,6 +1126,7 @@ const forEachChildTable: ForEachChildTable = { [SyntaxKind.JSDocReadonlyTag]: forEachChildInJSDocTag, [SyntaxKind.JSDocDeprecatedTag]: forEachChildInJSDocTag, [SyntaxKind.JSDocOverrideTag]: forEachChildInJSDocTag, + [SyntaxKind.JSDocImportTag]: forEachChildInJSDocImportTag, [SyntaxKind.PartiallyEmittedExpression]: forEachChildInPartiallyEmittedExpression, }; @@ -1214,6 +1216,14 @@ function forEachChildInJSDocTag(node: JSDocUnknownTag | JSDocClassTag | JSDoc || (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment)); } +function forEachChildInJSDocImportTag(node: JSDocImportTag, cbNode: (node: Node) => T | undefined, cbNodes?: (nodes: NodeArray) => T | undefined): T | undefined { + return visitNode(cbNode, node.tagName) + || visitNode(cbNode, node.importClause) + || visitNode(cbNode, node.moduleSpecifier) + || visitNode(cbNode, node.attributes) + || (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment)); +} + function forEachChildInPartiallyEmittedExpression(node: PartiallyEmittedExpression, cbNode: (node: Node) => T | undefined, _cbNodes?: (nodes: NodeArray) => T | undefined): T | undefined { return visitNode(cbNode, node.expression); } @@ -3875,7 +3885,7 @@ namespace Parser { } function parseJSDocType(): TypeNode { - scanner.setInJSDocType(true); + scanner.setSkipJsDocLeadingAsterisks(true); const pos = getNodePos(); if (parseOptional(SyntaxKind.ModuleKeyword)) { // TODO(rbuckton): We never set the type for a JSDocNamepathType. What should we put here? @@ -3893,13 +3903,13 @@ namespace Parser { } } - scanner.setInJSDocType(false); + scanner.setSkipJsDocLeadingAsterisks(false); return finishNode(moduleTag, pos); } const hasDotDotDot = parseOptional(SyntaxKind.DotDotDotToken); let type = parseTypeOrTypePredicate(); - scanner.setInJSDocType(false); + scanner.setSkipJsDocLeadingAsterisks(false); if (hasDotDotDot) { type = finishNode(factory.createJSDocVariadicType(type), pos); } @@ -8346,6 +8356,16 @@ namespace Parser { return parseImportEqualsDeclaration(pos, hasJSDoc, modifiers, identifier, isTypeOnly); } + const importClause = tryParseImportClause(identifier, afterImportPos, isTypeOnly); + const moduleSpecifier = parseModuleSpecifier(); + const attributes = tryParseImportAttributes(); + + parseSemicolon(); + const node = factory.createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes); + return withJSDoc(finishNode(node, pos), hasJSDoc); + } + + function tryParseImportClause(identifier: Identifier | undefined, pos: number, isTypeOnly: boolean, skipJsDocLeadingAsterisks = false) { // ImportDeclaration: // import ImportClause from ModuleSpecifier ; // import ModuleSpecifier; @@ -8355,18 +8375,17 @@ namespace Parser { token() === SyntaxKind.AsteriskToken || // import * token() === SyntaxKind.OpenBraceToken // import { ) { - importClause = parseImportClause(identifier, afterImportPos, isTypeOnly); + importClause = parseImportClause(identifier, pos, isTypeOnly, skipJsDocLeadingAsterisks); parseExpected(SyntaxKind.FromKeyword); } - const moduleSpecifier = parseModuleSpecifier(); + return importClause; + } + + function tryParseImportAttributes() { const currentToken = token(); - let attributes: ImportAttributes | undefined; if ((currentToken === SyntaxKind.WithKeyword || currentToken === SyntaxKind.AssertKeyword) && !scanner.hasPrecedingLineBreak()) { - attributes = parseImportAttributes(currentToken); + return parseImportAttributes(currentToken); } - parseSemicolon(); - const node = factory.createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes); - return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseImportAttribute() { @@ -8422,7 +8441,7 @@ namespace Parser { return finished; } - function parseImportClause(identifier: Identifier | undefined, pos: number, isTypeOnly: boolean) { + function parseImportClause(identifier: Identifier | undefined, pos: number, isTypeOnly: boolean, skipJsDocLeadingAsterisks: boolean) { // ImportClause: // ImportedDefaultBinding // NameSpaceImport @@ -8437,7 +8456,9 @@ namespace Parser { !identifier || parseOptional(SyntaxKind.CommaToken) ) { + if (skipJsDocLeadingAsterisks) scanner.setSkipJsDocLeadingAsterisks(true); namedBindings = token() === SyntaxKind.AsteriskToken ? parseNamespaceImport() : parseNamedImportsOrExports(SyntaxKind.NamedImports); + if (skipJsDocLeadingAsterisks) scanner.setSkipJsDocLeadingAsterisks(false); } return finishNode(factory.createImportClause(isTypeOnly, identifier, namedBindings), pos); @@ -9073,6 +9094,9 @@ namespace Parser { case "throws": tag = parseThrowsTag(start, tagName, margin, indentText); break; + case "import": + tag = parseImportTag(start, tagName, margin, indentText); + break; default: tag = parseUnknownTag(start, tagName, margin, indentText); break; @@ -9445,13 +9469,29 @@ namespace Parser { return finishNode(factory.createJSDocSatisfiesTag(tagName, typeExpression, comments), start); } + function parseImportTag(start: number, tagName: Identifier, margin: number, indentText: string): JSDocImportTag { + const afterImportTagPos = scanner.getTokenFullStart(); + + let identifier: Identifier | undefined; + if (isIdentifier()) { + identifier = parseIdentifier(); + } + + const importClause = tryParseImportClause(identifier, afterImportTagPos, /*isTypeOnly*/ true, /*skipJsDocLeadingAsterisks*/ true); + const moduleSpecifier = parseModuleSpecifier(); + const attributes = tryParseImportAttributes(); + + const comments = margin !== undefined && indentText !== undefined ? parseTrailingTagComments(start, getNodePos(), margin, indentText) : undefined; + return finishNode(factory.createJSDocImportTag(tagName, importClause, moduleSpecifier, attributes, comments), start); + } + function parseExpressionWithTypeArgumentsForAugments(): ExpressionWithTypeArguments & { expression: Identifier | PropertyAccessEntityNameExpression; } { const usedBrace = parseOptional(SyntaxKind.OpenBraceToken); const pos = getNodePos(); const expression = parsePropertyAccessEntityNameExpression(); - scanner.setInJSDocType(true); + scanner.setSkipJsDocLeadingAsterisks(true); const typeArguments = tryParseTypeArguments(); - scanner.setInJSDocType(false); + scanner.setSkipJsDocLeadingAsterisks(false); const node = factory.createExpressionWithTypeArguments(expression, typeArguments) as ExpressionWithTypeArguments & { expression: Identifier | PropertyAccessEntityNameExpression; }; const res = finishNode(node, pos); if (usedBrace) { diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 80ba1d4a5a23d..0bce5b25a9a06 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -192,6 +192,7 @@ import { isImportTypeNode, isIncrementalCompilation, isInJSFile, + isJSDocImportTag, isLiteralImportTypeNode, isModifier, isModuleDeclaration, @@ -205,6 +206,7 @@ import { isStringLiteral, isStringLiteralLike, isTraceEnabled, + JSDocImportTag, JsonSourceFile, JsxEmit, length, @@ -868,7 +870,7 @@ export function getModeForResolutionAtIndex(file: SourceFileImportsList, index: } /** @internal */ -export function isExclusivelyTypeOnlyImportOrExport(decl: ImportDeclaration | ExportDeclaration) { +export function isExclusivelyTypeOnlyImportOrExport(decl: ImportDeclaration | ExportDeclaration | JSDocImportTag) { if (isExportDeclaration(decl)) { return decl.isTypeOnly; } @@ -3346,7 +3348,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg } if ((file.flags & NodeFlags.PossiblyContainsDynamicImport) || isJavaScriptFile) { - collectDynamicImportOrRequireCalls(file); + collectDynamicImportOrRequireOrJsDocImportCalls(file); } file.imports = imports || emptyArray; @@ -3403,7 +3405,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg } } - function collectDynamicImportOrRequireCalls(file: SourceFile) { + function collectDynamicImportOrRequireOrJsDocImportCalls(file: SourceFile) { const r = /import|require/g; while (r.exec(file.text) !== null) { // eslint-disable-line no-null/no-null const node = getNodeAtPosition(file, r.lastIndex); @@ -3420,6 +3422,13 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg setParentRecursive(node, /*incremental*/ false); // we need parent data on imports before the program is fully bound, so we ensure it's set here imports = append(imports, node.argument.literal); } + else if (isJavaScriptFile && isJSDocImportTag(node)) { + const moduleNameExpr = getExternalModuleName(node); + if (moduleNameExpr && isStringLiteral(moduleNameExpr) && moduleNameExpr.text) { + setParentRecursive(node, /*incremental*/ false); + imports = append(imports, moduleNameExpr); + } + } } } diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index 2c63db910328a..9a3331badd3f6 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -103,7 +103,7 @@ export interface Scanner { setTextPos(textPos: number): void; resetTokenState(pos: number): void; /** @internal */ - setInJSDocType(inType: boolean): void; + setSkipJsDocLeadingAsterisks(skip: boolean): void; // Invokes the provided callback then unconditionally restores the scanner to the state it // was in immediately prior to invoking the callback. The result of invoking the callback // is returned from this function. @@ -978,7 +978,7 @@ export function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean var tokenFlags: TokenFlags; var commentDirectives: CommentDirective[] | undefined; - var inJSDocType = 0; + var skipJsDocLeadingAsterisks = 0; var scriptKind = ScriptKind.Unknown; var jsDocParsingMode = JSDocParsingMode.ParseAll; @@ -1032,7 +1032,7 @@ export function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean setOnError, resetTokenState, setTextPos: resetTokenState, - setInJSDocType, + setSkipJsDocLeadingAsterisks, tryScan, lookAhead, scanRange, @@ -1892,7 +1892,7 @@ export function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean return pos += 2, token = SyntaxKind.AsteriskAsteriskToken; } pos++; - if (inJSDocType && !asteriskSeen && (tokenFlags & TokenFlags.PrecedingLineBreak)) { + if (skipJsDocLeadingAsterisks && !asteriskSeen && (tokenFlags & TokenFlags.PrecedingLineBreak)) { // decoration at the start of a JSDoc comment line asteriskSeen = true; continue; @@ -2804,8 +2804,8 @@ export function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean tokenFlags = TokenFlags.None; } - function setInJSDocType(inType: boolean) { - inJSDocType += inType ? 1 : -1; + function setSkipJsDocLeadingAsterisks(skip: boolean) { + skipJsDocLeadingAsterisks += skip ? 1 : -1; } } diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 80bcbfa3fc94c..8e813273f7d0c 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -110,6 +110,7 @@ import { isIndexSignatureDeclaration, isInterfaceDeclaration, isInternalDeclaration, + isJSDocImportTag, isJsonSourceFile, isLateVisibilityPaintedStatement, isLiteralImportTypeNode, @@ -1313,6 +1314,8 @@ export function transformDeclarations(context: TransformationContext) { } if (isDeclaration(input) && isDeclarationAndNotVisible(input)) return; + if (isJSDocImportTag(input)) return; + // Elide implementation signatures from overload sets if (isFunctionLike(input) && resolver.isImplementationOfOverload(input)) return; diff --git a/src/compiler/types.ts b/src/compiler/types.ts index ce6064fbdc409..fe828ad4a4529 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -439,6 +439,7 @@ export const enum SyntaxKind { JSDocPropertyTag, JSDocThrowsTag, JSDocSatisfiesTag, + JSDocImportTag, // Synthesized list SyntaxList, @@ -481,9 +482,9 @@ export const enum SyntaxKind { LastStatement = DebuggerStatement, FirstNode = QualifiedName, FirstJSDocNode = JSDocTypeExpression, - LastJSDocNode = JSDocSatisfiesTag, + LastJSDocNode = JSDocImportTag, FirstJSDocTagNode = JSDocTag, - LastJSDocTagNode = JSDocSatisfiesTag, + LastJSDocTagNode = JSDocImportTag, /** @internal */ FirstContextualKeyword = AbstractKeyword, /** @internal */ LastContextualKeyword = OfKeyword, } @@ -1036,7 +1037,8 @@ export type ForEachChildNodes = | JSDocThrowsTag | JSDocOverrideTag | JSDocSatisfiesTag - | JSDocOverloadTag; + | JSDocOverloadTag + | JSDocImportTag; /** @internal */ export type HasChildren = @@ -3646,7 +3648,7 @@ export type NamedExportBindings = // import d, { a, b as x } from "mod" => name = d, namedBinding: NamedImports = { elements: [{ name: a }, { name: x, propertyName: b}]} export interface ImportClause extends NamedDeclaration { readonly kind: SyntaxKind.ImportClause; - readonly parent: ImportDeclaration; + readonly parent: ImportDeclaration | JSDocImportTag; readonly isTypeOnly: boolean; readonly name?: Identifier; // Default binding readonly namedBindings?: NamedImportBindings; @@ -4058,6 +4060,14 @@ export interface JSDocSatisfiesExpression extends ParenthesizedExpression { readonly _jsDocSatisfiesExpressionBrand: never; } +export interface JSDocImportTag extends JSDocTag { + readonly kind: SyntaxKind.JSDocImportTag; + readonly parent: JSDoc; + readonly importClause?: ImportClause; + readonly moduleSpecifier: Expression; + readonly attributes?: ImportAttributes; +} + // NOTE: Ensure this is up-to-date with src/debug/debug.ts // dprint-ignore export const enum FlowFlags { @@ -5436,7 +5446,10 @@ export type TypePredicate = ThisTypePredicate | IdentifierTypePredicate | Assert export type AnyImportSyntax = ImportDeclaration | ImportEqualsDeclaration; /** @internal */ -export type AnyImportOrRequire = AnyImportSyntax | VariableDeclarationInitializedTo; +export type AnyImportOrJsDocImport = AnyImportSyntax | JSDocImportTag; + +/** @internal */ +export type AnyImportOrRequire = AnyImportOrJsDocImport | VariableDeclarationInitializedTo; /** @internal */ export type AnyImportOrBareOrAccessedRequire = AnyImportSyntax | VariableDeclarationInitializedTo; @@ -5471,7 +5484,7 @@ export interface ValidImportTypeNode extends ImportTypeNode { /** @internal */ export type AnyValidImportOrReExport = - | (ImportDeclaration | ExportDeclaration) & { moduleSpecifier: StringLiteral; } + | (ImportDeclaration | ExportDeclaration | JSDocImportTag) & { moduleSpecifier: StringLiteral; } | ImportEqualsDeclaration & { moduleReference: ExternalModuleReference & { expression: StringLiteral; }; } | RequireOrImportCall | ValidImportTypeNode; @@ -5496,7 +5509,7 @@ export interface RequireVariableDeclarationList extends VariableDeclarationList /** @internal */ export type LateVisibilityPaintedStatement = - | AnyImportSyntax + | AnyImportOrJsDocImport | VariableStatement | ClassDeclaration | FunctionDeclaration @@ -8767,6 +8780,8 @@ export interface NodeFactory { updateJSDocThrowsTag(node: JSDocThrowsTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment?: string | NodeArray | undefined): JSDocThrowsTag; createJSDocSatisfiesTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray): JSDocSatisfiesTag; updateJSDocSatisfiesTag(node: JSDocSatisfiesTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray | undefined): JSDocSatisfiesTag; + createJSDocImportTag(tagName: Identifier | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes?: ImportAttributes, comment?: string | NodeArray): JSDocImportTag; + updateJSDocImportTag(node: JSDocImportTag, tagName: Identifier | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes: ImportAttributes | undefined, comment: string | NodeArray | undefined): JSDocImportTag; createJSDocText(text: string): JSDocText; updateJSDocText(node: JSDocText, text: string): JSDocText; createJSDocComment(comment?: string | NodeArray | undefined, tags?: readonly JSDocTag[] | undefined): JSDoc; diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 184f68b0c6221..cf9c49fa53f83 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -354,6 +354,7 @@ import { JSDocArray, JSDocCallbackTag, JSDocEnumTag, + JSDocImportTag, JSDocMemberName, JSDocOverloadTag, JSDocParameterTag, @@ -3981,13 +3982,14 @@ export function isFunctionSymbol(symbol: Symbol | undefined) { } /** @internal */ -export function tryGetModuleSpecifierFromDeclaration(node: AnyImportOrBareOrAccessedRequire | AliasDeclarationNode | ExportDeclaration | ImportTypeNode): StringLiteralLike | undefined { +export function tryGetModuleSpecifierFromDeclaration(node: AnyImportOrBareOrAccessedRequire | AliasDeclarationNode | ExportDeclaration | ImportTypeNode | JSDocImportTag): StringLiteralLike | undefined { switch (node.kind) { case SyntaxKind.VariableDeclaration: case SyntaxKind.BindingElement: return findAncestor(node.initializer, (node): node is RequireOrImportCall => isRequireCall(node, /*requireStringLiteralLikeArgument*/ true))?.arguments[0]; case SyntaxKind.ImportDeclaration: case SyntaxKind.ExportDeclaration: + case SyntaxKind.JSDocImportTag: return tryCast(node.moduleSpecifier, isStringLiteralLike); case SyntaxKind.ImportEqualsDeclaration: return tryCast(tryCast(node.moduleReference, isExternalModuleReference)?.expression, isStringLiteralLike); @@ -4016,6 +4018,7 @@ export function tryGetImportFromModuleSpecifier(node: StringLiteralLike): AnyVal switch (node.parent.kind) { case SyntaxKind.ImportDeclaration: case SyntaxKind.ExportDeclaration: + case SyntaxKind.JSDocImportTag: return node.parent as AnyValidImportOrReExport; case SyntaxKind.ExternalModuleReference: return (node.parent as ExternalModuleReference).parent as AnyValidImportOrReExport; @@ -4030,10 +4033,11 @@ export function tryGetImportFromModuleSpecifier(node: StringLiteralLike): AnyVal } /** @internal */ -export function getExternalModuleName(node: AnyImportOrReExport | ImportTypeNode | ImportCall | ModuleDeclaration): Expression | undefined { +export function getExternalModuleName(node: AnyImportOrReExport | ImportTypeNode | ImportCall | ModuleDeclaration | JSDocImportTag): Expression | undefined { switch (node.kind) { case SyntaxKind.ImportDeclaration: case SyntaxKind.ExportDeclaration: + case SyntaxKind.JSDocImportTag: return node.moduleSpecifier; case SyntaxKind.ImportEqualsDeclaration: return node.moduleReference.kind === SyntaxKind.ExternalModuleReference ? node.moduleReference.expression : undefined; @@ -4063,8 +4067,8 @@ export function getNamespaceDeclarationNode(node: ImportDeclaration | ImportEqua } /** @internal */ -export function isDefaultImport(node: ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration): boolean { - return node.kind === SyntaxKind.ImportDeclaration && !!node.importClause && !!node.importClause.name; +export function isDefaultImport(node: ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration | JSDocImportTag): boolean { + return (node.kind === SyntaxKind.ImportDeclaration || node.kind === SyntaxKind.JSDocImportTag) && !!node.importClause && !!node.importClause.name; } /** @internal */ diff --git a/src/services/codefixes/convertToTypeOnlyImport.ts b/src/services/codefixes/convertToTypeOnlyImport.ts index 6b680e62ba817..29d4261c7578e 100644 --- a/src/services/codefixes/convertToTypeOnlyImport.ts +++ b/src/services/codefixes/convertToTypeOnlyImport.ts @@ -37,8 +37,8 @@ registerCodeFix({ const declaration = getDeclaration(context.sourceFile, context.span.start); if (declaration) { const changes = textChanges.ChangeTracker.with(context, t => doChange(t, context.sourceFile, declaration)); - const importDeclarationChanges = declaration.kind === SyntaxKind.ImportSpecifier && canConvertImportDeclarationForSpecifier(declaration, context.sourceFile, context.program) - ? textChanges.ChangeTracker.with(context, t => doChange(t, context.sourceFile, declaration.parent.parent.parent)) + const importDeclarationChanges = declaration.kind === SyntaxKind.ImportSpecifier && isImportDeclaration(declaration.parent.parent.parent) && canConvertImportDeclarationForSpecifier(declaration, context.sourceFile, context.program) + ? textChanges.ChangeTracker.with(context, t => doChange(t, context.sourceFile, declaration.parent.parent.parent as ImportDeclaration)) : undefined; const mainAction = createCodeFixAction( fixId, @@ -71,6 +71,7 @@ registerCodeFix({ } else if ( errorDeclaration?.kind === SyntaxKind.ImportSpecifier + && isImportDeclaration(errorDeclaration.parent.parent.parent) && !fixedImportDeclarations.has(errorDeclaration.parent.parent.parent) && canConvertImportDeclarationForSpecifier(errorDeclaration, diag.file, context.program) ) { diff --git a/src/services/codefixes/importFixes.ts b/src/services/codefixes/importFixes.ts index 80400b140438e..78df7b3a90007 100644 --- a/src/services/codefixes/importFixes.ts +++ b/src/services/codefixes/importFixes.ts @@ -72,6 +72,7 @@ import { isImportEqualsDeclaration, isInJSFile, isIntrinsicJsxName, + isJSDocImportTag, isJsxClosingElement, isJsxOpeningFragment, isJsxOpeningLikeElement, @@ -694,6 +695,7 @@ function getNamespaceLikeImportText(declaration: AnyImportOrRequire) { return tryCast(declaration.name, isIdentifier)?.text; case SyntaxKind.ImportEqualsDeclaration: return declaration.name.text; + case SyntaxKind.JSDocImportTag: case SyntaxKind.ImportDeclaration: return tryCast(declaration.importClause?.namedBindings, isNamespaceImport)?.name.text; default: @@ -806,7 +808,7 @@ function createExistingImportMap(checker: TypeChecker, importingFile: SourceFile (importMap ||= createMultiMap()).add(getSymbolId(moduleSymbol), i.parent); } } - else if (i.kind === SyntaxKind.ImportDeclaration || i.kind === SyntaxKind.ImportEqualsDeclaration) { + else if (i.kind === SyntaxKind.ImportDeclaration || i.kind === SyntaxKind.ImportEqualsDeclaration || i.kind === SyntaxKind.JSDocImportTag) { const moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier); if (moduleSymbol) { (importMap ||= createMultiMap()).add(getSymbolId(moduleSymbol), i); @@ -816,10 +818,16 @@ function createExistingImportMap(checker: TypeChecker, importingFile: SourceFile return { getImportsForExportInfo: ({ moduleSymbol, exportKind, targetFlags, symbol }: SymbolExportInfo): readonly FixAddToExistingImportInfo[] => { - // Can't use an es6 import for a type in JS. - if (!(targetFlags & SymbolFlags.Value) && isSourceFileJS(importingFile)) return emptyArray; const matchingDeclarations = importMap?.get(getSymbolId(moduleSymbol)); if (!matchingDeclarations) return emptyArray; + + // Can't use an es6 import for a type in JS. + if ( + isSourceFileJS(importingFile) + && !(targetFlags & SymbolFlags.Value) + && !every(matchingDeclarations, isJSDocImportTag) + ) return emptyArray; + const importKind = getImportKind(importingFile, exportKind, compilerOptions); return matchingDeclarations.map(declaration => ({ declaration, importKind, symbol, targetFlags })); }, diff --git a/src/services/codefixes/useDefaultImport.ts b/src/services/codefixes/useDefaultImport.ts index 92ef84495a7bb..11d647517593a 100644 --- a/src/services/codefixes/useDefaultImport.ts +++ b/src/services/codefixes/useDefaultImport.ts @@ -7,6 +7,7 @@ import { Identifier, isExternalModuleReference, isIdentifier, + isImportDeclaration, isImportEqualsDeclaration, isNamespaceImport, makeImport, @@ -51,7 +52,7 @@ function getInfo(sourceFile: SourceFile, pos: number): Info | undefined { if (isImportEqualsDeclaration(parent) && isExternalModuleReference(parent.moduleReference)) { return { importNode: parent, name, moduleSpecifier: parent.moduleReference.expression }; } - else if (isNamespaceImport(parent)) { + else if (isNamespaceImport(parent) && isImportDeclaration(parent.parent.parent)) { const importNode = parent.parent.parent; return { importNode, name, moduleSpecifier: importNode.moduleSpecifier }; } diff --git a/src/services/completions.ts b/src/services/completions.ts index 6ebdefce12490..197a2dbb3b36e 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -188,6 +188,7 @@ import { isJSDoc, isJSDocAugmentsTag, isJSDocImplementsTag, + isJSDocImportTag, isJSDocParameterTag, isJSDocTag, isJSDocTemplateTag, @@ -255,6 +256,7 @@ import { isVariableDeclaration, isVariableLike, JsDoc, + JSDocImportTag, JSDocParameterTag, JSDocPropertyTag, JSDocReturnTag, @@ -3202,6 +3204,7 @@ function getCompletionData( log("getCompletionData: Is inside comment: " + (timestamp() - start)); let insideJsDocTagTypeExpression = false; + let insideJsDocImportTag = false; let isInSnippetScope = false; if (insideComment) { if (hasDocComment(sourceFile, position)) { @@ -3242,25 +3245,30 @@ function getCompletionData( if (tag.tagName.pos <= position && position <= tag.tagName.end) { return { kind: CompletionDataKind.JsDocTagName }; } - const typeExpression = tryGetTypeExpressionFromTag(tag); - if (typeExpression) { - currentToken = getTokenAtPosition(sourceFile, position); - if ( - !currentToken || - (!isDeclarationName(currentToken) && - (currentToken.parent.kind !== SyntaxKind.JSDocPropertyTag || - (currentToken.parent as JSDocPropertyTag).name !== currentToken)) - ) { - // Use as type location if inside tag's type expression - insideJsDocTagTypeExpression = isCurrentlyEditingNode(typeExpression); - } + if (isJSDocImportTag(tag)) { + insideJsDocImportTag = true; } - if (!insideJsDocTagTypeExpression && isJSDocParameterTag(tag) && (nodeIsMissing(tag.name) || tag.name.pos <= position && position <= tag.name.end)) { - return { kind: CompletionDataKind.JsDocParameterName, tag }; + else { + const typeExpression = tryGetTypeExpressionFromTag(tag); + if (typeExpression) { + currentToken = getTokenAtPosition(sourceFile, position); + if ( + !currentToken || + (!isDeclarationName(currentToken) && + (currentToken.parent.kind !== SyntaxKind.JSDocPropertyTag || + (currentToken.parent as JSDocPropertyTag).name !== currentToken)) + ) { + // Use as type location if inside tag's type expression + insideJsDocTagTypeExpression = isCurrentlyEditingNode(typeExpression); + } + } + if (!insideJsDocTagTypeExpression && isJSDocParameterTag(tag) && (nodeIsMissing(tag.name) || tag.name.pos <= position && position <= tag.name.end)) { + return { kind: CompletionDataKind.JsDocParameterName, tag }; + } } } - if (!insideJsDocTagTypeExpression) { + if (!insideJsDocTagTypeExpression && !insideJsDocImportTag) { // Proceed if the current position is in jsDoc tag expression; otherwise it is a normal // comment or the plain text part of a jsDoc comment, so no completion should be available log("Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment."); @@ -3271,7 +3279,7 @@ function getCompletionData( start = timestamp(); // The decision to provide completion depends on the contextToken, which is determined through the previousToken. // Note: 'previousToken' (and thus 'contextToken') can be undefined if we are the beginning of the file - const isJsOnlyLocation = !insideJsDocTagTypeExpression && isSourceFileJS(sourceFile); + const isJsOnlyLocation = !insideJsDocTagTypeExpression && !insideJsDocImportTag && isSourceFileJS(sourceFile); const tokens = getRelevantTokens(position, sourceFile); const previousToken = tokens.previousToken!; let contextToken = tokens.contextToken!; @@ -3952,6 +3960,7 @@ function getCompletionData( function isTypeOnlyCompletion(): boolean { return insideJsDocTagTypeExpression + || insideJsDocImportTag || !!importStatementCompletion && isTypeOnlyImportOrExportDeclaration(location.parent) || !isContextTokenValueLocation(contextToken) && (isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker) @@ -5742,9 +5751,9 @@ function getImportStatementCompletionInfo(contextToken: Node, sourceFile: Source } } -function getSingleLineReplacementSpanForImportCompletionNode(node: ImportDeclaration | ImportEqualsDeclaration | ImportSpecifier | Token | undefined) { +function getSingleLineReplacementSpanForImportCompletionNode(node: ImportDeclaration | ImportEqualsDeclaration | ImportSpecifier | JSDocImportTag | Token | undefined) { if (!node) return undefined; - const top = findAncestor(node, or(isImportDeclaration, isImportEqualsDeclaration)) ?? node; + const top = findAncestor(node, or(isImportDeclaration, isImportEqualsDeclaration, isJSDocImportTag)) ?? node; const sourceFile = top.getSourceFile(); if (rangeIsOnSingleLine(top, sourceFile)) { return createTextSpanFromNode(top, sourceFile); @@ -5753,7 +5762,7 @@ function getSingleLineReplacementSpanForImportCompletionNode(node: ImportDeclara Debug.assert(top.kind !== SyntaxKind.ImportKeyword && top.kind !== SyntaxKind.ImportSpecifier); // Guess which point in the import might actually be a later statement parsed as part of the import // during parser recovery - either in the middle of named imports, or the module specifier. - const potentialSplitPoint = top.kind === SyntaxKind.ImportDeclaration + const potentialSplitPoint = top.kind === SyntaxKind.ImportDeclaration || top.kind === SyntaxKind.JSDocImportTag ? getPotentiallyInvalidImportSpecifier(top.importClause?.namedBindings) ?? top.moduleSpecifier : top.moduleReference; const withoutModuleSpecifier: TextRange = { diff --git a/src/services/importTracker.ts b/src/services/importTracker.ts index b0e7215625e12..6f54bf158e48d 100644 --- a/src/services/importTracker.ts +++ b/src/services/importTracker.ts @@ -1,5 +1,6 @@ import { __String, + AnyImportOrJsDocImport, AnyImportOrReExport, AssignmentDeclarationKind, BinaryExpression, @@ -57,6 +58,7 @@ import { isVariableDeclaration, isVariableDeclarationInitializedToBareOrAccessedRequire, isVariableStatement, + JSDocImportTag, ModifierFlags, ModuleBlock, ModuleDeclaration, @@ -138,7 +140,7 @@ interface AmbientModuleDeclaration extends ModuleDeclaration { } type SourceFileLike = SourceFile | AmbientModuleDeclaration; // Identifier for the case of `const x = require("y")`. -type Importer = AnyImportOrReExport | ValidImportTypeNode | Identifier; +type Importer = AnyImportOrReExport | ValidImportTypeNode | Identifier | JSDocImportTag; type ImporterOrCallExpression = Importer | CallExpression; /** Returns import statements that directly reference the exporting module, and a list of files that may access the module through a namespace. */ @@ -215,6 +217,7 @@ function getImportersForExport( break; case SyntaxKind.ImportDeclaration: + case SyntaxKind.JSDocImportTag: directImports.push(direct); const namedBindings = direct.importClause && direct.importClause.namedBindings; if (namedBindings && namedBindings.kind === SyntaxKind.NamespaceImport) { @@ -267,7 +270,7 @@ function getImportersForExport( }); } - function handleNamespaceImport(importDeclaration: ImportEqualsDeclaration | ImportDeclaration, name: Identifier, isReExport: boolean, alreadyAddedDirect: boolean): void { + function handleNamespaceImport(importDeclaration: AnyImportOrJsDocImport, name: Identifier, isReExport: boolean, alreadyAddedDirect: boolean): void { if (exportKind === ExportKind.ExportEquals) { // This is a direct import, not import-as-namespace. if (!alreadyAddedDirect) directImports.push(importDeclaration); diff --git a/src/services/jsDoc.ts b/src/services/jsDoc.ts index 6f387271048dc..a08937cfd7e99 100644 --- a/src/services/jsDoc.ts +++ b/src/services/jsDoc.ts @@ -131,6 +131,7 @@ const jsDocTagNames = [ "host", "ignore", "implements", + "import", "inheritdoc", "inner", "instance", diff --git a/src/services/organizeImports.ts b/src/services/organizeImports.ts index 29f3ab5482d08..14a794c526af5 100644 --- a/src/services/organizeImports.ts +++ b/src/services/organizeImports.ts @@ -40,6 +40,7 @@ import { isString, isStringLiteral, isStringLiteralLike, + JSDocImportTag, jsxModeNeedsExplicitImport, LanguageServiceHost, length, @@ -709,7 +710,7 @@ function detectModuleSpecifierCaseBySort(importDeclsByGroup: (readonly AnyImport return detectCaseSensitivityBySort(moduleSpecifiersByGroup, comparersToTest); } -function detectNamedImportOrganizationBySort(originalGroups: readonly ImportDeclaration[], comparersToTest: Comparer[], typesToTest: OrganizeImportsTypeOrder[]): { namedImportComparer: Comparer; typeOrder: OrganizeImportsTypeOrder | undefined; isSorted: boolean; } | undefined { +function detectNamedImportOrganizationBySort(originalGroups: readonly (ImportDeclaration | JSDocImportTag)[], comparersToTest: Comparer[], typesToTest: OrganizeImportsTypeOrder[]): { namedImportComparer: Comparer; typeOrder: OrganizeImportsTypeOrder | undefined; isSorted: boolean; } | undefined { // Filter for import declarations with named imports. Will be a flat array of import declarations without separations by group let bothNamedImports = false; const importDeclsWithNamed = originalGroups.filter(i => { @@ -884,7 +885,7 @@ function getNamedImportSpecifierComparer(pref } /** @internal */ -export function getNamedImportSpecifierComparerWithDetection(importDecl: ImportDeclaration, preferences: UserPreferences, sourceFile?: SourceFile): { specifierComparer: Comparer; isSorted: boolean | undefined; } { +export function getNamedImportSpecifierComparerWithDetection(importDecl: ImportDeclaration | JSDocImportTag, preferences: UserPreferences, sourceFile?: SourceFile): { specifierComparer: Comparer; isSorted: boolean | undefined; } { // sort case sensitivity: // - if the user preference is explicit, use that // - otherwise, if there are enough existing import specifiers in this import to detect unambiguously, use that diff --git a/src/services/refactors/convertImport.ts b/src/services/refactors/convertImport.ts index 5e6ac06ec846d..4dbfd40d89185 100644 --- a/src/services/refactors/convertImport.ts +++ b/src/services/refactors/convertImport.ts @@ -24,12 +24,14 @@ import { ImportSpecifier, isExportSpecifier, isImportDeclaration, + isJSDocImportTag, isPropertyAccessExpression, isPropertyAccessOrQualifiedName, isShorthandPropertyAssignment, isStringLiteral, NamedImports, NamespaceImport, + or, Program, PropertyAccessExpression, QualifiedName, @@ -110,8 +112,8 @@ function getImportConversionInfo(context: RefactorContext, considerPartialSpans const { file } = context; const span = getRefactorContextSpan(context); const token = getTokenAtPosition(file, span.start); - const importDecl = considerPartialSpans ? findAncestor(token, isImportDeclaration) : getParentNodeInSpan(token, file, span); - if (!importDecl || !isImportDeclaration(importDecl)) return { error: "Selection is not an import declaration." }; + const importDecl = considerPartialSpans ? findAncestor(token, or(isImportDeclaration, isJSDocImportTag)) : getParentNodeInSpan(token, file, span); + if (importDecl === undefined || !(isImportDeclaration(importDecl) || isJSDocImportTag(importDecl))) return { error: "Selection is not an import declaration." }; const end = span.start + span.length; const nextToken = findNextToken(importDecl, importDecl.parent, file); @@ -189,12 +191,13 @@ function doChangeNamespaceToNamed(sourceFile: SourceFile, checker: TypeChecker, }); const importDecl = toConvert.parent.parent; - if (usedAsNamespaceOrDefault && !allowSyntheticDefaultImports) { + if (usedAsNamespaceOrDefault && !allowSyntheticDefaultImports && isImportDeclaration(importDecl)) { // Need to leave the namespace import alone - changes.insertNodeAfter(sourceFile, importDecl, updateImport(importDecl, /*defaultImportName*/ undefined, importSpecifiers)); + changes.insertNodeAfter(sourceFile, importDecl, createImport(importDecl, /*defaultImportName*/ undefined, importSpecifiers)); } else { - changes.replaceNode(sourceFile, importDecl, updateImport(importDecl, usedAsNamespaceOrDefault ? factory.createIdentifier(toConvert.name.text) : undefined, importSpecifiers)); + const defaultImportName = usedAsNamespaceOrDefault ? factory.createIdentifier(toConvert.name.text) : undefined; + changes.replaceNode(sourceFile, toConvert.parent, createImportClause(defaultImportName, importSpecifiers)); } } @@ -266,9 +269,10 @@ export function doChangeNamedToNamespaceOrDefault(sourceFile: SourceFile, progra ? factory.createIdentifier(namespaceImportName) : factory.createNamespaceImport(factory.createIdentifier(namespaceImportName)), ); - if (neededNamedImports.size) { + + if (neededNamedImports.size && isImportDeclaration(importDecl)) { const newNamedImports: ImportSpecifier[] = arrayFrom(neededNamedImports.values(), element => factory.createImportSpecifier(element.isTypeOnly, element.propertyName && factory.createIdentifier(element.propertyName.text), factory.createIdentifier(element.name.text))); - changes.insertNodeAfter(sourceFile, toConvert.parent.parent, updateImport(importDecl, /*defaultImportName*/ undefined, newNamedImports)); + changes.insertNodeAfter(sourceFile, toConvert.parent.parent, createImport(importDecl, /*defaultImportName*/ undefined, newNamedImports)); } } @@ -279,6 +283,10 @@ function isExportEqualsModule(moduleSpecifier: Expression, checker: TypeChecker) return externalModule !== exportEquals; } -function updateImport(old: ImportDeclaration, defaultImportName: Identifier | undefined, elements: readonly ImportSpecifier[] | undefined): ImportDeclaration { - return factory.createImportDeclaration(/*modifiers*/ undefined, factory.createImportClause(/*isTypeOnly*/ false, defaultImportName, elements && elements.length ? factory.createNamedImports(elements) : undefined), old.moduleSpecifier, /*attributes*/ undefined); +function createImport(node: ImportDeclaration, defaultImportName: Identifier | undefined, elements: readonly ImportSpecifier[] | undefined): ImportDeclaration { + return factory.createImportDeclaration(/*modifiers*/ undefined, createImportClause(defaultImportName, elements), node.moduleSpecifier, /*attributes*/ undefined); +} + +function createImportClause(defaultImportName: Identifier | undefined, elements: readonly ImportSpecifier[] | undefined) { + return factory.createImportClause(/*isTypeOnly*/ false, defaultImportName, elements && elements.length ? factory.createNamedImports(elements) : undefined); } diff --git a/src/services/stringCompletions.ts b/src/services/stringCompletions.ts index 5cb669be5368c..b5115345cd582 100644 --- a/src/services/stringCompletions.ts +++ b/src/services/stringCompletions.ts @@ -420,6 +420,7 @@ function getStringLiteralCompletionEntries(sourceFile: SourceFile, node: StringL case SyntaxKind.ImportDeclaration: case SyntaxKind.ExportDeclaration: case SyntaxKind.ExternalModuleReference: + case SyntaxKind.JSDocImportTag: // Get all known external module names or complete a path to a module // i.e. import * as ns from "/*completion position*/"; // var y = import("/*completion position*/"); diff --git a/src/services/utilities.ts b/src/services/utilities.ts index cfc9c629837d4..ca9ebafe08bfc 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -188,6 +188,7 @@ import { isInternalModuleImportEqualsDeclaration, isJSDoc, isJSDocCommentContainingNode, + isJSDocImportTag, isJSDocLink, isJSDocLinkCode, isJSDocLinkLike, @@ -258,6 +259,7 @@ import { isWhiteSpaceSingleLine, isYieldExpression, IterationStatement, + JSDocImportTag, JSDocLink, JSDocLinkCode, JSDocLinkDisplayPart, @@ -1244,7 +1246,7 @@ function getAdjustedLocationForDeclaration(node: Node, forRename: boolean) { } } -function getAdjustedLocationForImportDeclaration(node: ImportDeclaration, forRename: boolean) { +function getAdjustedLocationForImportDeclaration(node: ImportDeclaration | JSDocImportTag, forRename: boolean) { if (node.importClause) { if (node.importClause.name && node.importClause.namedBindings) { // do not adjust if we have both a name and named bindings @@ -2578,6 +2580,7 @@ export function isModuleSpecifierLike(node: Node): node is StringLiteralLike { return isStringLiteralLike(node) && ( isExternalModuleReference(node.parent) || isImportDeclaration(node.parent) || + isJSDocImportTag(node.parent) || isRequireCall(node.parent, /*requireStringLiteralLikeArgument*/ false) && node.parent.arguments[0] === node || isImportCall(node.parent) && node.parent.arguments[0] === node ); diff --git a/src/testRunner/unittests/jsDocParsing.ts b/src/testRunner/unittests/jsDocParsing.ts index 56ba3a9cc05eb..0635aff6cdd1d 100644 --- a/src/testRunner/unittests/jsDocParsing.ts +++ b/src/testRunner/unittests/jsDocParsing.ts @@ -204,6 +204,34 @@ describe("unittests:: JSDocParsing", () => { */`, ); + parsesCorrectly( + "importTag1", + `/** + * @import foo from 'foo' + */`, + ); + + parsesCorrectly( + "importTag2", + `/** + * @import { foo } from 'foo' + */`, + ); + + parsesCorrectly( + "importTag3", + `/** + * @import * as types from 'foo' + */`, + ); + + parsesCorrectly( + "importTag4", + `/** + * @import * as types from 'foo' comment part + */`, + ); + parsesCorrectly( "returnTag1", `/** diff --git a/tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.importTag1.json b/tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.importTag1.json new file mode 100644 index 0000000000000..4b1926859ba6b --- /dev/null +++ b/tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.importTag1.json @@ -0,0 +1,54 @@ +{ + "kind": "JSDoc", + "pos": 0, + "end": 35, + "flags": "JSDoc", + "modifierFlagsCache": 0, + "transformFlags": 0, + "tags": { + "0": { + "kind": "JSDocImportTag", + "pos": 8, + "end": 30, + "modifierFlagsCache": 0, + "transformFlags": 0, + "tagName": { + "kind": "Identifier", + "pos": 9, + "end": 15, + "modifierFlagsCache": 0, + "transformFlags": 0, + "escapedText": "import" + }, + "importClause": { + "kind": "ImportClause", + "pos": 16, + "end": 19, + "modifierFlagsCache": 0, + "transformFlags": 1, + "isTypeOnly": true, + "name": { + "kind": "Identifier", + "pos": 16, + "end": 19, + "modifierFlagsCache": 0, + "transformFlags": 0, + "escapedText": "foo" + } + }, + "moduleSpecifier": { + "kind": "StringLiteral", + "pos": 24, + "end": 30, + "modifierFlagsCache": 0, + "transformFlags": 0, + "text": "foo" + } + }, + "length": 1, + "pos": 8, + "end": 30, + "hasTrailingComma": false, + "transformFlags": 0 + } +} \ No newline at end of file diff --git a/tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.importTag2.json b/tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.importTag2.json new file mode 100644 index 0000000000000..a6f633d01dbec --- /dev/null +++ b/tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.importTag2.json @@ -0,0 +1,76 @@ +{ + "kind": "JSDoc", + "pos": 0, + "end": 39, + "flags": "JSDoc", + "modifierFlagsCache": 0, + "transformFlags": 0, + "tags": { + "0": { + "kind": "JSDocImportTag", + "pos": 8, + "end": 34, + "modifierFlagsCache": 0, + "transformFlags": 0, + "tagName": { + "kind": "Identifier", + "pos": 9, + "end": 15, + "modifierFlagsCache": 0, + "transformFlags": 0, + "escapedText": "import" + }, + "importClause": { + "kind": "ImportClause", + "pos": 16, + "end": 23, + "modifierFlagsCache": 0, + "transformFlags": 1, + "isTypeOnly": true, + "namedBindings": { + "kind": "NamedImports", + "pos": 16, + "end": 23, + "modifierFlagsCache": 0, + "transformFlags": 0, + "elements": { + "0": { + "kind": "ImportSpecifier", + "pos": 17, + "end": 21, + "modifierFlagsCache": 0, + "transformFlags": 0, + "isTypeOnly": false, + "name": { + "kind": "Identifier", + "pos": 17, + "end": 21, + "modifierFlagsCache": 0, + "transformFlags": 0, + "escapedText": "foo" + } + }, + "length": 1, + "pos": 17, + "end": 21, + "hasTrailingComma": false, + "transformFlags": 0 + } + } + }, + "moduleSpecifier": { + "kind": "StringLiteral", + "pos": 28, + "end": 34, + "modifierFlagsCache": 0, + "transformFlags": 0, + "text": "foo" + } + }, + "length": 1, + "pos": 8, + "end": 34, + "hasTrailingComma": false, + "transformFlags": 0 + } +} \ No newline at end of file diff --git a/tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.importTag3.json b/tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.importTag3.json new file mode 100644 index 0000000000000..fd0b84c089d5a --- /dev/null +++ b/tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.importTag3.json @@ -0,0 +1,61 @@ +{ + "kind": "JSDoc", + "pos": 0, + "end": 42, + "flags": "JSDoc", + "modifierFlagsCache": 0, + "transformFlags": 0, + "tags": { + "0": { + "kind": "JSDocImportTag", + "pos": 8, + "end": 37, + "modifierFlagsCache": 0, + "transformFlags": 0, + "tagName": { + "kind": "Identifier", + "pos": 9, + "end": 15, + "modifierFlagsCache": 0, + "transformFlags": 0, + "escapedText": "import" + }, + "importClause": { + "kind": "ImportClause", + "pos": 16, + "end": 26, + "modifierFlagsCache": 0, + "transformFlags": 1, + "isTypeOnly": true, + "namedBindings": { + "kind": "NamespaceImport", + "pos": 16, + "end": 26, + "modifierFlagsCache": 0, + "transformFlags": 0, + "name": { + "kind": "Identifier", + "pos": 20, + "end": 26, + "modifierFlagsCache": 0, + "transformFlags": 0, + "escapedText": "types" + } + } + }, + "moduleSpecifier": { + "kind": "StringLiteral", + "pos": 31, + "end": 37, + "modifierFlagsCache": 0, + "transformFlags": 0, + "text": "foo" + } + }, + "length": 1, + "pos": 8, + "end": 37, + "hasTrailingComma": false, + "transformFlags": 0 + } +} \ No newline at end of file diff --git a/tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.importTag4.json b/tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.importTag4.json new file mode 100644 index 0000000000000..f25a957cd57db --- /dev/null +++ b/tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.importTag4.json @@ -0,0 +1,62 @@ +{ + "kind": "JSDoc", + "pos": 0, + "end": 55, + "flags": "JSDoc", + "modifierFlagsCache": 0, + "transformFlags": 0, + "tags": { + "0": { + "kind": "JSDocImportTag", + "pos": 8, + "end": 53, + "modifierFlagsCache": 0, + "transformFlags": 0, + "tagName": { + "kind": "Identifier", + "pos": 9, + "end": 15, + "modifierFlagsCache": 0, + "transformFlags": 0, + "escapedText": "import" + }, + "comment": "comment part", + "importClause": { + "kind": "ImportClause", + "pos": 16, + "end": 26, + "modifierFlagsCache": 0, + "transformFlags": 1, + "isTypeOnly": true, + "namedBindings": { + "kind": "NamespaceImport", + "pos": 16, + "end": 26, + "modifierFlagsCache": 0, + "transformFlags": 0, + "name": { + "kind": "Identifier", + "pos": 20, + "end": 26, + "modifierFlagsCache": 0, + "transformFlags": 0, + "escapedText": "types" + } + } + }, + "moduleSpecifier": { + "kind": "StringLiteral", + "pos": 31, + "end": 37, + "modifierFlagsCache": 0, + "transformFlags": 0, + "text": "foo" + } + }, + "length": 1, + "pos": 8, + "end": 53, + "hasTrailingComma": false, + "transformFlags": 0 + } +} \ No newline at end of file diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 1601e677d29d5..3c7a59ea0da74 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -3940,12 +3940,13 @@ declare namespace ts { JSDocPropertyTag = 348, JSDocThrowsTag = 349, JSDocSatisfiesTag = 350, - SyntaxList = 351, - NotEmittedStatement = 352, - PartiallyEmittedExpression = 353, - CommaListExpression = 354, - SyntheticReferenceExpression = 355, - Count = 356, + JSDocImportTag = 351, + SyntaxList = 352, + NotEmittedStatement = 353, + PartiallyEmittedExpression = 354, + CommaListExpression = 355, + SyntheticReferenceExpression = 356, + Count = 357, FirstAssignment = 64, LastAssignment = 79, FirstCompoundAssignment = 65, @@ -3974,9 +3975,9 @@ declare namespace ts { LastStatement = 259, FirstNode = 166, FirstJSDocNode = 309, - LastJSDocNode = 350, + LastJSDocNode = 351, FirstJSDocTagNode = 327, - LastJSDocTagNode = 350, + LastJSDocTagNode = 351, } type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia; type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral; @@ -5426,7 +5427,7 @@ declare namespace ts { type NamedExportBindings = NamespaceExport | NamedExports; interface ImportClause extends NamedDeclaration { readonly kind: SyntaxKind.ImportClause; - readonly parent: ImportDeclaration; + readonly parent: ImportDeclaration | JSDocImportTag; readonly isTypeOnly: boolean; readonly name?: Identifier; readonly namedBindings?: NamedImportBindings; @@ -5783,6 +5784,13 @@ declare namespace ts { readonly kind: SyntaxKind.JSDocSatisfiesTag; readonly typeExpression: JSDocTypeExpression; } + interface JSDocImportTag extends JSDocTag { + readonly kind: SyntaxKind.JSDocImportTag; + readonly parent: JSDoc; + readonly importClause?: ImportClause; + readonly moduleSpecifier: Expression; + readonly attributes?: ImportAttributes; + } enum FlowFlags { Unreachable = 1, Start = 2, @@ -7696,6 +7704,8 @@ declare namespace ts { updateJSDocThrowsTag(node: JSDocThrowsTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment?: string | NodeArray | undefined): JSDocThrowsTag; createJSDocSatisfiesTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray): JSDocSatisfiesTag; updateJSDocSatisfiesTag(node: JSDocSatisfiesTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray | undefined): JSDocSatisfiesTag; + createJSDocImportTag(tagName: Identifier | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes?: ImportAttributes, comment?: string | NodeArray): JSDocImportTag; + updateJSDocImportTag(node: JSDocImportTag, tagName: Identifier | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes: ImportAttributes | undefined, comment: string | NodeArray | undefined): JSDocImportTag; createJSDocText(text: string): JSDocText; updateJSDocText(node: JSDocText, text: string): JSDocText; createJSDocComment(comment?: string | NodeArray | undefined, tags?: readonly JSDocTag[] | undefined): JSDoc; @@ -8998,6 +9008,7 @@ declare namespace ts { function isJSDocImplementsTag(node: Node): node is JSDocImplementsTag; function isJSDocSatisfiesTag(node: Node): node is JSDocSatisfiesTag; function isJSDocThrowsTag(node: Node): node is JSDocThrowsTag; + function isJSDocImportTag(node: Node): node is JSDocImportTag; function isQuestionOrExclamationToken(node: Node): node is QuestionToken | ExclamationToken; function isIdentifierOrThisTypeNode(node: Node): node is Identifier | ThisTypeNode; function isReadonlyKeywordOrPlusOrMinusToken(node: Node): node is ReadonlyKeyword | PlusToken | MinusToken; diff --git a/tests/baselines/reference/findAllRefsJsDocImportTag.baseline.jsonc b/tests/baselines/reference/findAllRefsJsDocImportTag.baseline.jsonc new file mode 100644 index 0000000000000..46b3bdd60105c --- /dev/null +++ b/tests/baselines/reference/findAllRefsJsDocImportTag.baseline.jsonc @@ -0,0 +1,105 @@ +// === findAllReferences === +// === /a.js === +// /** +// * <|@import { [|{| defId: 0, isWriteAccess: true |}A|] } from "./b"; +// |>*/ +// +// /** +// * @param { [|{| defId: 0 |}A|]/*FIND ALL REFS*/ } a +// */ +// function f(a) {} + +// === /b.ts === +// <|export interface [|{| defId: 1, isWriteAccess: true |}A|] { }|> + + // === Definitions === + // === /a.js === + // /** + // * <|@import { [|{| defId: 0 |}A|] } from "./b"; + // |>*/ + // + // /** + // * @param { A/*FIND ALL REFS*/ } a + // */ + // function f(a) {} + + // === /b.ts === + // <|export interface [|{| defId: 1 |}A|] { }|> + + // === Details === + [ + { + "defId": 0, + "containerKind": "", + "containerName": "", + "kind": "alias", + "name": "(alias) interface A\nimport A", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "alias", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "interface", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "A", + "kind": "aliasName" + }, + { + "text": "\n", + "kind": "lineBreak" + }, + { + "text": "import", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "A", + "kind": "aliasName" + } + ] + }, + { + "defId": 1, + "containerKind": "", + "containerName": "", + "kind": "interface", + "name": "interface A", + "displayParts": [ + { + "text": "interface", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "A", + "kind": "interfaceName" + } + ] + } + ] \ No newline at end of file diff --git a/tests/baselines/reference/goToDefinitionJsDocImportTag1.baseline.jsonc b/tests/baselines/reference/goToDefinitionJsDocImportTag1.baseline.jsonc new file mode 100644 index 0000000000000..2ac01a22845c7 --- /dev/null +++ b/tests/baselines/reference/goToDefinitionJsDocImportTag1.baseline.jsonc @@ -0,0 +1,17 @@ +// === goToDefinition === +// === /b.ts === +// [||]export interface A { } + +// === /a.js === +// /** +// * @import { A } from [|"./b/*GOTO DEF*/"|] +// */ + + // === Details === + [ + { + "kind": "script", + "name": "./b", + "unverified": false + } + ] \ No newline at end of file diff --git a/tests/baselines/reference/goToDefinitionJsDocImportTag2.baseline.jsonc b/tests/baselines/reference/goToDefinitionJsDocImportTag2.baseline.jsonc new file mode 100644 index 0000000000000..70db19f1b24fd --- /dev/null +++ b/tests/baselines/reference/goToDefinitionJsDocImportTag2.baseline.jsonc @@ -0,0 +1,5 @@ +// === goToDefinition === +// === /a.js === +// /** +// * @import { A } from/*GOTO DEF*/ "./b" +// */ \ No newline at end of file diff --git a/tests/baselines/reference/goToDefinitionJsDocImportTag3.baseline.jsonc b/tests/baselines/reference/goToDefinitionJsDocImportTag3.baseline.jsonc new file mode 100644 index 0000000000000..443b3ca3d9c62 --- /dev/null +++ b/tests/baselines/reference/goToDefinitionJsDocImportTag3.baseline.jsonc @@ -0,0 +1,5 @@ +// === goToDefinition === +// === /a.js === +// /** +// * @import { A } from /*GOTO DEF*/ "./b"; +// */ \ No newline at end of file diff --git a/tests/baselines/reference/goToDefinitionJsDocImportTag4.baseline.jsonc b/tests/baselines/reference/goToDefinitionJsDocImportTag4.baseline.jsonc new file mode 100644 index 0000000000000..8db114c5c52f3 --- /dev/null +++ b/tests/baselines/reference/goToDefinitionJsDocImportTag4.baseline.jsonc @@ -0,0 +1,20 @@ +// === goToDefinition === +// === /b.ts === +// <|export interface [|A|] { }|> + +// === /a.js === +// /** +// * @import { [|A|]/*GOTO DEF*/ } from "./b"; +// */ + + // === Details === + [ + { + "kind": "interface", + "name": "A", + "containerName": "\"/b\"", + "isLocal": false, + "isAmbient": false, + "unverified": false + } + ] \ No newline at end of file diff --git a/tests/baselines/reference/goToDefinitionJsDocImportTag5.baseline.jsonc b/tests/baselines/reference/goToDefinitionJsDocImportTag5.baseline.jsonc new file mode 100644 index 0000000000000..e58acd52951ca --- /dev/null +++ b/tests/baselines/reference/goToDefinitionJsDocImportTag5.baseline.jsonc @@ -0,0 +1,25 @@ +// === goToDefinition === +// === /b.ts === +// <|export interface [|A|] { }|> + +// === /a.js === +// /** +// * @import { A } from "./b"; +// */ +// +// /** +// * @param { [|A|]/*GOTO DEF*/ } a +// */ +// function f(a) {} + + // === Details === + [ + { + "kind": "interface", + "name": "A", + "containerName": "\"/b\"", + "isLocal": false, + "isAmbient": false, + "unverified": false + } + ] \ No newline at end of file diff --git a/tests/baselines/reference/importTag1.symbols b/tests/baselines/reference/importTag1.symbols new file mode 100644 index 0000000000000..ba55b1fac1cc9 --- /dev/null +++ b/tests/baselines/reference/importTag1.symbols @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/jsdoc/importTag1.ts] //// + +=== /types.ts === +export interface Foo { +>Foo : Symbol(Foo, Decl(types.ts, 0, 0)) + + a: number; +>a : Symbol(Foo.a, Decl(types.ts, 0, 22)) +} + +=== /foo.js === +/** + * @import { Foo } from "./types" + */ + +/** + * @param { Foo } foo + */ +function f(foo) {} +>f : Symbol(f, Decl(foo.js, 0, 0)) +>foo : Symbol(foo, Decl(foo.js, 7, 11)) + diff --git a/tests/baselines/reference/importTag1.types b/tests/baselines/reference/importTag1.types new file mode 100644 index 0000000000000..b442a096969a8 --- /dev/null +++ b/tests/baselines/reference/importTag1.types @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/jsdoc/importTag1.ts] //// + +=== /types.ts === +export interface Foo { + a: number; +>a : number +} + +=== /foo.js === +/** + * @import { Foo } from "./types" + */ + +/** + * @param { Foo } foo + */ +function f(foo) {} +>f : (foo: Foo) => void +>foo : Foo + diff --git a/tests/baselines/reference/importTag10.errors.txt b/tests/baselines/reference/importTag10.errors.txt new file mode 100644 index 0000000000000..496ce7f502595 --- /dev/null +++ b/tests/baselines/reference/importTag10.errors.txt @@ -0,0 +1,11 @@ +/foo.js(2,11): error TS1109: Expression expected. + + +==== /foo.js (1 errors) ==== + /** + * @import + + */ + +!!! error TS1109: Expression expected. + \ No newline at end of file diff --git a/tests/baselines/reference/importTag10.symbols b/tests/baselines/reference/importTag10.symbols new file mode 100644 index 0000000000000..f5b061a7abad6 --- /dev/null +++ b/tests/baselines/reference/importTag10.symbols @@ -0,0 +1,8 @@ +//// [tests/cases/conformance/jsdoc/importTag10.ts] //// + +=== /foo.js === + +/** + * @import + */ + diff --git a/tests/baselines/reference/importTag10.types b/tests/baselines/reference/importTag10.types new file mode 100644 index 0000000000000..f5b061a7abad6 --- /dev/null +++ b/tests/baselines/reference/importTag10.types @@ -0,0 +1,8 @@ +//// [tests/cases/conformance/jsdoc/importTag10.ts] //// + +=== /foo.js === + +/** + * @import + */ + diff --git a/tests/baselines/reference/importTag11.errors.txt b/tests/baselines/reference/importTag11.errors.txt new file mode 100644 index 0000000000000..e2c5c367f15d8 --- /dev/null +++ b/tests/baselines/reference/importTag11.errors.txt @@ -0,0 +1,13 @@ +/foo.js(2,15): error TS1109: Expression expected. +/foo.js(3,2): error TS1005: 'from' expected. + + +==== /foo.js (2 errors) ==== + /** + * @import foo + +!!! error TS1109: Expression expected. + */ + +!!! error TS1005: 'from' expected. + \ No newline at end of file diff --git a/tests/baselines/reference/importTag11.symbols b/tests/baselines/reference/importTag11.symbols new file mode 100644 index 0000000000000..4f1674c511c55 --- /dev/null +++ b/tests/baselines/reference/importTag11.symbols @@ -0,0 +1,8 @@ +//// [tests/cases/conformance/jsdoc/importTag11.ts] //// + +=== /foo.js === + +/** + * @import foo + */ + diff --git a/tests/baselines/reference/importTag11.types b/tests/baselines/reference/importTag11.types new file mode 100644 index 0000000000000..4f1674c511c55 --- /dev/null +++ b/tests/baselines/reference/importTag11.types @@ -0,0 +1,8 @@ +//// [tests/cases/conformance/jsdoc/importTag11.ts] //// + +=== /foo.js === + +/** + * @import foo + */ + diff --git a/tests/baselines/reference/importTag12.errors.txt b/tests/baselines/reference/importTag12.errors.txt new file mode 100644 index 0000000000000..f557cd1974d0b --- /dev/null +++ b/tests/baselines/reference/importTag12.errors.txt @@ -0,0 +1,10 @@ +/foo.js(2,20): error TS1109: Expression expected. + + +==== /foo.js (1 errors) ==== + /** + * @import foo from + +!!! error TS1109: Expression expected. + */ + \ No newline at end of file diff --git a/tests/baselines/reference/importTag12.symbols b/tests/baselines/reference/importTag12.symbols new file mode 100644 index 0000000000000..8c6cdc2734f7f --- /dev/null +++ b/tests/baselines/reference/importTag12.symbols @@ -0,0 +1,8 @@ +//// [tests/cases/conformance/jsdoc/importTag12.ts] //// + +=== /foo.js === + +/** + * @import foo from + */ + diff --git a/tests/baselines/reference/importTag12.types b/tests/baselines/reference/importTag12.types new file mode 100644 index 0000000000000..8c6cdc2734f7f --- /dev/null +++ b/tests/baselines/reference/importTag12.types @@ -0,0 +1,8 @@ +//// [tests/cases/conformance/jsdoc/importTag12.ts] //// + +=== /foo.js === + +/** + * @import foo from + */ + diff --git a/tests/baselines/reference/importTag13.errors.txt b/tests/baselines/reference/importTag13.errors.txt new file mode 100644 index 0000000000000..49025119c000b --- /dev/null +++ b/tests/baselines/reference/importTag13.errors.txt @@ -0,0 +1,13 @@ +/foo.js(1,15): error TS1005: 'from' expected. + + +==== /foo.js (1 errors) ==== + /** @import x = require("types") */ + ~ +!!! error TS1005: 'from' expected. + +==== /types.ts (0 errors) ==== + export interface Foo { + a: number; + } + \ No newline at end of file diff --git a/tests/baselines/reference/importTag13.symbols b/tests/baselines/reference/importTag13.symbols new file mode 100644 index 0000000000000..fbc59963b3da9 --- /dev/null +++ b/tests/baselines/reference/importTag13.symbols @@ -0,0 +1,6 @@ +//// [tests/cases/conformance/jsdoc/importTag13.ts] //// + +=== /foo.js === + +/** @import x = require("types") */ + diff --git a/tests/baselines/reference/importTag13.types b/tests/baselines/reference/importTag13.types new file mode 100644 index 0000000000000..fbc59963b3da9 --- /dev/null +++ b/tests/baselines/reference/importTag13.types @@ -0,0 +1,6 @@ +//// [tests/cases/conformance/jsdoc/importTag13.ts] //// + +=== /foo.js === + +/** @import x = require("types") */ + diff --git a/tests/baselines/reference/importTag14.errors.txt b/tests/baselines/reference/importTag14.errors.txt new file mode 100644 index 0000000000000..20360234a4bfb --- /dev/null +++ b/tests/baselines/reference/importTag14.errors.txt @@ -0,0 +1,14 @@ +/foo.js(1,33): error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. +/foo.js(1,33): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'. +/foo.js(1,38): error TS1005: '{' expected. + + +==== /foo.js (3 errors) ==== + /** @import * as f from "./foo" with */ + ~~~~ +!!! error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'. + ~~~~ +!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'. + +!!! error TS1005: '{' expected. + \ No newline at end of file diff --git a/tests/baselines/reference/importTag14.symbols b/tests/baselines/reference/importTag14.symbols new file mode 100644 index 0000000000000..05e0be8659973 --- /dev/null +++ b/tests/baselines/reference/importTag14.symbols @@ -0,0 +1,6 @@ +//// [tests/cases/conformance/jsdoc/importTag14.ts] //// + +=== /foo.js === + +/** @import * as f from "./foo" with */ + diff --git a/tests/baselines/reference/importTag14.types b/tests/baselines/reference/importTag14.types new file mode 100644 index 0000000000000..05e0be8659973 --- /dev/null +++ b/tests/baselines/reference/importTag14.types @@ -0,0 +1,6 @@ +//// [tests/cases/conformance/jsdoc/importTag14.ts] //// + +=== /foo.js === + +/** @import * as f from "./foo" with */ + diff --git a/tests/baselines/reference/importTag15(module=es2015).errors.txt b/tests/baselines/reference/importTag15(module=es2015).errors.txt new file mode 100644 index 0000000000000..e3dba21b47669 --- /dev/null +++ b/tests/baselines/reference/importTag15(module=es2015).errors.txt @@ -0,0 +1,18 @@ +1.js(1,30): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'. +1.js(2,33): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'. + + +==== 0.ts (0 errors) ==== + export interface I { } + +==== 1.js (2 errors) ==== + /** @import { I } from './0' with { type: "json" } */ + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'. + /** @import * as foo from './0' with { type: "json" } */ + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'. + + /** @param {I} a */ + function f(a) {} + \ No newline at end of file diff --git a/tests/baselines/reference/importTag15(module=es2015).js b/tests/baselines/reference/importTag15(module=es2015).js new file mode 100644 index 0000000000000..ad2c1ac5a07d4 --- /dev/null +++ b/tests/baselines/reference/importTag15(module=es2015).js @@ -0,0 +1,25 @@ +//// [tests/cases/conformance/jsdoc/importTag15.ts] //// + +//// [0.ts] +export interface I { } + +//// [1.js] +/** @import { I } from './0' with { type: "json" } */ +/** @import * as foo from './0' with { type: "json" } */ + +/** @param {I} a */ +function f(a) {} + + + + +//// [0.d.ts] +export interface I { +} +//// [1.d.ts] +/** @import { I } from './0' with { type: "json" } */ +/** @import * as foo from './0' with { type: "json" } */ +/** @param {I} a */ +declare function f(a: I): void; +import type { I } from './0' with { type: "json" }; +import type * as foo from './0'; diff --git a/tests/baselines/reference/importTag15(module=es2015).symbols b/tests/baselines/reference/importTag15(module=es2015).symbols new file mode 100644 index 0000000000000..992eb71ede062 --- /dev/null +++ b/tests/baselines/reference/importTag15(module=es2015).symbols @@ -0,0 +1,15 @@ +//// [tests/cases/conformance/jsdoc/importTag15.ts] //// + +=== 0.ts === +export interface I { } +>I : Symbol(I, Decl(0.ts, 0, 0)) + +=== 1.js === +/** @import { I } from './0' with { type: "json" } */ +/** @import * as foo from './0' with { type: "json" } */ + +/** @param {I} a */ +function f(a) {} +>f : Symbol(f, Decl(1.js, 0, 0)) +>a : Symbol(a, Decl(1.js, 4, 11)) + diff --git a/tests/baselines/reference/importTag15(module=es2015).types b/tests/baselines/reference/importTag15(module=es2015).types new file mode 100644 index 0000000000000..fb18e6928b70b --- /dev/null +++ b/tests/baselines/reference/importTag15(module=es2015).types @@ -0,0 +1,15 @@ +//// [tests/cases/conformance/jsdoc/importTag15.ts] //// + +=== 0.ts === + +export interface I { } + +=== 1.js === +/** @import { I } from './0' with { type: "json" } */ +/** @import * as foo from './0' with { type: "json" } */ + +/** @param {I} a */ +function f(a) {} +>f : (a: I) => void +>a : I + diff --git a/tests/baselines/reference/importTag15(module=esnext).errors.txt b/tests/baselines/reference/importTag15(module=esnext).errors.txt new file mode 100644 index 0000000000000..3b98c15768bff --- /dev/null +++ b/tests/baselines/reference/importTag15(module=esnext).errors.txt @@ -0,0 +1,18 @@ +1.js(1,30): error TS2857: Import attributes cannot be used with type-only imports or exports. +1.js(2,33): error TS2857: Import attributes cannot be used with type-only imports or exports. + + +==== 0.ts (0 errors) ==== + export interface I { } + +==== 1.js (2 errors) ==== + /** @import { I } from './0' with { type: "json" } */ + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2857: Import attributes cannot be used with type-only imports or exports. + /** @import * as foo from './0' with { type: "json" } */ + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2857: Import attributes cannot be used with type-only imports or exports. + + /** @param {I} a */ + function f(a) {} + \ No newline at end of file diff --git a/tests/baselines/reference/importTag15(module=esnext).js b/tests/baselines/reference/importTag15(module=esnext).js new file mode 100644 index 0000000000000..ad2c1ac5a07d4 --- /dev/null +++ b/tests/baselines/reference/importTag15(module=esnext).js @@ -0,0 +1,25 @@ +//// [tests/cases/conformance/jsdoc/importTag15.ts] //// + +//// [0.ts] +export interface I { } + +//// [1.js] +/** @import { I } from './0' with { type: "json" } */ +/** @import * as foo from './0' with { type: "json" } */ + +/** @param {I} a */ +function f(a) {} + + + + +//// [0.d.ts] +export interface I { +} +//// [1.d.ts] +/** @import { I } from './0' with { type: "json" } */ +/** @import * as foo from './0' with { type: "json" } */ +/** @param {I} a */ +declare function f(a: I): void; +import type { I } from './0' with { type: "json" }; +import type * as foo from './0'; diff --git a/tests/baselines/reference/importTag15(module=esnext).symbols b/tests/baselines/reference/importTag15(module=esnext).symbols new file mode 100644 index 0000000000000..992eb71ede062 --- /dev/null +++ b/tests/baselines/reference/importTag15(module=esnext).symbols @@ -0,0 +1,15 @@ +//// [tests/cases/conformance/jsdoc/importTag15.ts] //// + +=== 0.ts === +export interface I { } +>I : Symbol(I, Decl(0.ts, 0, 0)) + +=== 1.js === +/** @import { I } from './0' with { type: "json" } */ +/** @import * as foo from './0' with { type: "json" } */ + +/** @param {I} a */ +function f(a) {} +>f : Symbol(f, Decl(1.js, 0, 0)) +>a : Symbol(a, Decl(1.js, 4, 11)) + diff --git a/tests/baselines/reference/importTag15(module=esnext).types b/tests/baselines/reference/importTag15(module=esnext).types new file mode 100644 index 0000000000000..fb18e6928b70b --- /dev/null +++ b/tests/baselines/reference/importTag15(module=esnext).types @@ -0,0 +1,15 @@ +//// [tests/cases/conformance/jsdoc/importTag15.ts] //// + +=== 0.ts === + +export interface I { } + +=== 1.js === +/** @import { I } from './0' with { type: "json" } */ +/** @import * as foo from './0' with { type: "json" } */ + +/** @param {I} a */ +function f(a) {} +>f : (a: I) => void +>a : I + diff --git a/tests/baselines/reference/importTag16.js b/tests/baselines/reference/importTag16.js new file mode 100644 index 0000000000000..63134d7d50256 --- /dev/null +++ b/tests/baselines/reference/importTag16.js @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/jsdoc/importTag16.ts] //// + +//// [a.ts] +export default interface Foo {} +export interface I {} + +//// [b.js] +/** @import Foo, { I } from "./a" */ + +/** + * @param {Foo} a + * @param {I} b + */ +export function foo(a, b) {} + + + + +//// [a.d.ts] +export default interface Foo { +} +export interface I { +} +//// [b.d.ts] +/** @import Foo, { I } from "./a" */ +/** + * @param {Foo} a + * @param {I} b + */ +export function foo(a: Foo, b: I): void; +import type Foo from "./a"; +import type { I } from "./a"; diff --git a/tests/baselines/reference/importTag16.symbols b/tests/baselines/reference/importTag16.symbols new file mode 100644 index 0000000000000..d092f1c89e7bd --- /dev/null +++ b/tests/baselines/reference/importTag16.symbols @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/jsdoc/importTag16.ts] //// + +=== a.ts === +export default interface Foo {} +>Foo : Symbol(Foo, Decl(a.ts, 0, 0)) + +export interface I {} +>I : Symbol(I, Decl(a.ts, 0, 31)) + +=== b.js === +/** @import Foo, { I } from "./a" */ + +/** + * @param {Foo} a + * @param {I} b + */ +export function foo(a, b) {} +>foo : Symbol(foo, Decl(b.js, 0, 0)) +>a : Symbol(a, Decl(b.js, 6, 20)) +>b : Symbol(b, Decl(b.js, 6, 22)) + diff --git a/tests/baselines/reference/importTag16.types b/tests/baselines/reference/importTag16.types new file mode 100644 index 0000000000000..13356e92a76d4 --- /dev/null +++ b/tests/baselines/reference/importTag16.types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/jsdoc/importTag16.ts] //// + +=== a.ts === + +export default interface Foo {} +export interface I {} + +=== b.js === +/** @import Foo, { I } from "./a" */ + +/** + * @param {Foo} a + * @param {I} b + */ +export function foo(a, b) {} +>foo : (a: Foo, b: I) => void +>a : Foo +>b : I + diff --git a/tests/baselines/reference/importTag2.symbols b/tests/baselines/reference/importTag2.symbols new file mode 100644 index 0000000000000..549bf3dd77536 --- /dev/null +++ b/tests/baselines/reference/importTag2.symbols @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/jsdoc/importTag2.ts] //// + +=== /types.ts === +export interface Foo { +>Foo : Symbol(Foo, Decl(types.ts, 0, 0)) + + a: number; +>a : Symbol(Foo.a, Decl(types.ts, 0, 22)) +} + +=== /foo.js === +/** + * @import * as types from "./types" + */ + +/** + * @param { types.Foo } foo + */ +export function f(foo) {} +>f : Symbol(f, Decl(foo.js, 0, 0)) +>foo : Symbol(foo, Decl(foo.js, 7, 18)) + diff --git a/tests/baselines/reference/importTag2.types b/tests/baselines/reference/importTag2.types new file mode 100644 index 0000000000000..5a18d5e849e91 --- /dev/null +++ b/tests/baselines/reference/importTag2.types @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/jsdoc/importTag2.ts] //// + +=== /types.ts === +export interface Foo { + a: number; +>a : number +} + +=== /foo.js === +/** + * @import * as types from "./types" + */ + +/** + * @param { types.Foo } foo + */ +export function f(foo) {} +>f : (foo: types.Foo) => void +>foo : types.Foo + diff --git a/tests/baselines/reference/importTag3.symbols b/tests/baselines/reference/importTag3.symbols new file mode 100644 index 0000000000000..9c6ecab2ed79f --- /dev/null +++ b/tests/baselines/reference/importTag3.symbols @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/jsdoc/importTag3.ts] //// + +=== /types.ts === +export default interface Foo { +>Foo : Symbol(Foo, Decl(types.ts, 0, 0)) + + a: number; +>a : Symbol(Foo.a, Decl(types.ts, 0, 30)) +} + +=== /foo.js === +/** + * @import Foo from "./types" + */ + +/** + * @param { Foo } foo + */ +export function f(foo) {} +>f : Symbol(f, Decl(foo.js, 0, 0)) +>foo : Symbol(foo, Decl(foo.js, 7, 18)) + diff --git a/tests/baselines/reference/importTag3.types b/tests/baselines/reference/importTag3.types new file mode 100644 index 0000000000000..da6d62466da82 --- /dev/null +++ b/tests/baselines/reference/importTag3.types @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/jsdoc/importTag3.ts] //// + +=== /types.ts === +export default interface Foo { + a: number; +>a : number +} + +=== /foo.js === +/** + * @import Foo from "./types" + */ + +/** + * @param { Foo } foo + */ +export function f(foo) {} +>f : (foo: Foo) => void +>foo : Foo + diff --git a/tests/baselines/reference/importTag4.errors.txt b/tests/baselines/reference/importTag4.errors.txt new file mode 100644 index 0000000000000..dbfd8ad5b4132 --- /dev/null +++ b/tests/baselines/reference/importTag4.errors.txt @@ -0,0 +1,27 @@ +/foo.js(2,14): error TS2300: Duplicate identifier 'Foo'. +/foo.js(6,14): error TS2300: Duplicate identifier 'Foo'. + + +==== /types.ts (0 errors) ==== + export interface Foo { + a: number; + } + +==== /foo.js (2 errors) ==== + /** + * @import { Foo } from "./types" + ~~~ +!!! error TS2300: Duplicate identifier 'Foo'. + */ + + /** + * @import { Foo } from "./types" + ~~~ +!!! error TS2300: Duplicate identifier 'Foo'. + */ + + /** + * @param { Foo } foo + */ + function f(foo) {} + \ No newline at end of file diff --git a/tests/baselines/reference/importTag4.symbols b/tests/baselines/reference/importTag4.symbols new file mode 100644 index 0000000000000..67ce4c4fc307d --- /dev/null +++ b/tests/baselines/reference/importTag4.symbols @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/jsdoc/importTag4.ts] //// + +=== /types.ts === +export interface Foo { +>Foo : Symbol(Foo, Decl(types.ts, 0, 0)) + + a: number; +>a : Symbol(Foo.a, Decl(types.ts, 0, 22)) +} + +=== /foo.js === +/** + * @import { Foo } from "./types" + */ + +/** + * @import { Foo } from "./types" + */ + +/** + * @param { Foo } foo + */ +function f(foo) {} +>f : Symbol(f, Decl(foo.js, 0, 0)) +>foo : Symbol(foo, Decl(foo.js, 11, 11)) + diff --git a/tests/baselines/reference/importTag4.types b/tests/baselines/reference/importTag4.types new file mode 100644 index 0000000000000..473a932a89ce2 --- /dev/null +++ b/tests/baselines/reference/importTag4.types @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/jsdoc/importTag4.ts] //// + +=== /types.ts === +export interface Foo { + a: number; +>a : number +} + +=== /foo.js === +/** + * @import { Foo } from "./types" + */ + +/** + * @import { Foo } from "./types" + */ + +/** + * @param { Foo } foo + */ +function f(foo) {} +>f : (foo: Foo) => void +>foo : Foo + diff --git a/tests/baselines/reference/importTag5.js b/tests/baselines/reference/importTag5.js new file mode 100644 index 0000000000000..a4814bf10fdd0 --- /dev/null +++ b/tests/baselines/reference/importTag5.js @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/jsdoc/importTag5.ts] //// + +//// [types.ts] +export interface Foo { + a: number; +} + +//// [foo.js] +/** + * @import { Foo } from "./types" + */ + +/** + * @param { Foo } foo + */ +function f(foo) {} + + + + +//// [types.d.ts] +export interface Foo { + a: number; +} +//// [foo.d.ts] +/** + * @import { Foo } from "./types" + */ +/** + * @param { Foo } foo + */ +declare function f(foo: Foo): void; +import type { Foo } from "./types"; diff --git a/tests/baselines/reference/importTag5.symbols b/tests/baselines/reference/importTag5.symbols new file mode 100644 index 0000000000000..35242e6c8988e --- /dev/null +++ b/tests/baselines/reference/importTag5.symbols @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/jsdoc/importTag5.ts] //// + +=== /types.ts === +export interface Foo { +>Foo : Symbol(Foo, Decl(types.ts, 0, 0)) + + a: number; +>a : Symbol(Foo.a, Decl(types.ts, 0, 22)) +} + +=== /foo.js === +/** + * @import { Foo } from "./types" + */ + +/** + * @param { Foo } foo + */ +function f(foo) {} +>f : Symbol(f, Decl(foo.js, 0, 0)) +>foo : Symbol(foo, Decl(foo.js, 7, 11)) + diff --git a/tests/baselines/reference/importTag5.types b/tests/baselines/reference/importTag5.types new file mode 100644 index 0000000000000..7d9641be55328 --- /dev/null +++ b/tests/baselines/reference/importTag5.types @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/jsdoc/importTag5.ts] //// + +=== /types.ts === +export interface Foo { + a: number; +>a : number +} + +=== /foo.js === +/** + * @import { Foo } from "./types" + */ + +/** + * @param { Foo } foo + */ +function f(foo) {} +>f : (foo: Foo) => void +>foo : Foo + diff --git a/tests/baselines/reference/importTag6.symbols b/tests/baselines/reference/importTag6.symbols new file mode 100644 index 0000000000000..3b917273f6476 --- /dev/null +++ b/tests/baselines/reference/importTag6.symbols @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/jsdoc/importTag6.ts] //// + +=== /types.ts === +export interface A { +>A : Symbol(A, Decl(types.ts, 0, 0)) + + a: number; +>a : Symbol(A.a, Decl(types.ts, 0, 20)) +} +export interface B { +>B : Symbol(B, Decl(types.ts, 2, 1)) + + a: number; +>a : Symbol(B.a, Decl(types.ts, 3, 20)) +} + +=== /foo.js === +/** + * @import { + * A, + * B, + * } from "./types" + */ + +/** + * @param { A } a + * @param { B } b + */ +function f(a, b) {} +>f : Symbol(f, Decl(foo.js, 0, 0)) +>a : Symbol(a, Decl(foo.js, 11, 11)) +>b : Symbol(b, Decl(foo.js, 11, 13)) + diff --git a/tests/baselines/reference/importTag6.types b/tests/baselines/reference/importTag6.types new file mode 100644 index 0000000000000..5adef07704d7e --- /dev/null +++ b/tests/baselines/reference/importTag6.types @@ -0,0 +1,29 @@ +//// [tests/cases/conformance/jsdoc/importTag6.ts] //// + +=== /types.ts === +export interface A { + a: number; +>a : number +} +export interface B { + a: number; +>a : number +} + +=== /foo.js === +/** + * @import { + * A, + * B, + * } from "./types" + */ + +/** + * @param { A } a + * @param { B } b + */ +function f(a, b) {} +>f : (a: * A, b: * B) => void +>a : * A +>b : * B + diff --git a/tests/baselines/reference/importTag7.symbols b/tests/baselines/reference/importTag7.symbols new file mode 100644 index 0000000000000..b4aa8eaf26004 --- /dev/null +++ b/tests/baselines/reference/importTag7.symbols @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/jsdoc/importTag7.ts] //// + +=== /types.ts === +export interface A { +>A : Symbol(A, Decl(types.ts, 0, 0)) + + a: number; +>a : Symbol(A.a, Decl(types.ts, 0, 20)) +} +export interface B { +>B : Symbol(B, Decl(types.ts, 2, 1)) + + a: number; +>a : Symbol(B.a, Decl(types.ts, 3, 20)) +} + +=== /foo.js === +/** + * @import { + * A, + * B } from "./types" + */ + +/** + * @param { A } a + * @param { B } b + */ +function f(a, b) {} +>f : Symbol(f, Decl(foo.js, 0, 0)) +>a : Symbol(a, Decl(foo.js, 10, 11)) +>b : Symbol(b, Decl(foo.js, 10, 13)) + diff --git a/tests/baselines/reference/importTag7.types b/tests/baselines/reference/importTag7.types new file mode 100644 index 0000000000000..f97e3f166e982 --- /dev/null +++ b/tests/baselines/reference/importTag7.types @@ -0,0 +1,28 @@ +//// [tests/cases/conformance/jsdoc/importTag7.ts] //// + +=== /types.ts === +export interface A { + a: number; +>a : number +} +export interface B { + a: number; +>a : number +} + +=== /foo.js === +/** + * @import { + * A, + * B } from "./types" + */ + +/** + * @param { A } a + * @param { B } b + */ +function f(a, b) {} +>f : (a: * A, b: * B) => void +>a : * A +>b : * B + diff --git a/tests/baselines/reference/importTag8.symbols b/tests/baselines/reference/importTag8.symbols new file mode 100644 index 0000000000000..16aae22f55617 --- /dev/null +++ b/tests/baselines/reference/importTag8.symbols @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/jsdoc/importTag8.ts] //// + +=== /types.ts === +export interface A { +>A : Symbol(A, Decl(types.ts, 0, 0)) + + a: number; +>a : Symbol(A.a, Decl(types.ts, 0, 20)) +} +export interface B { +>B : Symbol(B, Decl(types.ts, 2, 1)) + + a: number; +>a : Symbol(B.a, Decl(types.ts, 3, 20)) +} + +=== /foo.js === +/** + * @import + * { A, B } + * from "./types" + */ + +/** + * @param { A } a + * @param { B } b + */ +function f(a, b) {} +>f : Symbol(f, Decl(foo.js, 0, 0)) +>a : Symbol(a, Decl(foo.js, 10, 11)) +>b : Symbol(b, Decl(foo.js, 10, 13)) + diff --git a/tests/baselines/reference/importTag8.types b/tests/baselines/reference/importTag8.types new file mode 100644 index 0000000000000..8494d7cb28c04 --- /dev/null +++ b/tests/baselines/reference/importTag8.types @@ -0,0 +1,28 @@ +//// [tests/cases/conformance/jsdoc/importTag8.ts] //// + +=== /types.ts === +export interface A { + a: number; +>a : number +} +export interface B { + a: number; +>a : number +} + +=== /foo.js === +/** + * @import + * { A, B } + * from "./types" + */ + +/** + * @param { A } a + * @param { B } b + */ +function f(a, b) {} +>f : (a: A, b: B) => void +>a : A +>b : B + diff --git a/tests/baselines/reference/importTag9.symbols b/tests/baselines/reference/importTag9.symbols new file mode 100644 index 0000000000000..dcd2cf14dd9c6 --- /dev/null +++ b/tests/baselines/reference/importTag9.symbols @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/jsdoc/importTag9.ts] //// + +=== /types.ts === +export interface A { +>A : Symbol(A, Decl(types.ts, 0, 0)) + + a: number; +>a : Symbol(A.a, Decl(types.ts, 0, 20)) +} +export interface B { +>B : Symbol(B, Decl(types.ts, 2, 1)) + + a: number; +>a : Symbol(B.a, Decl(types.ts, 3, 20)) +} + +=== /foo.js === +/** + * @import + * * as types + * from "./types" + */ + +/** + * @param { types.A } a + * @param { types.B } b + */ +function f(a, b) {} +>f : Symbol(f, Decl(foo.js, 0, 0)) +>a : Symbol(a, Decl(foo.js, 10, 11)) +>b : Symbol(b, Decl(foo.js, 10, 13)) + diff --git a/tests/baselines/reference/importTag9.types b/tests/baselines/reference/importTag9.types new file mode 100644 index 0000000000000..22aef4498b3ba --- /dev/null +++ b/tests/baselines/reference/importTag9.types @@ -0,0 +1,28 @@ +//// [tests/cases/conformance/jsdoc/importTag9.ts] //// + +=== /types.ts === +export interface A { + a: number; +>a : number +} +export interface B { + a: number; +>a : number +} + +=== /foo.js === +/** + * @import + * * as types + * from "./types" + */ + +/** + * @param { types.A } a + * @param { types.B } b + */ +function f(a, b) {} +>f : (a: types.A, b: types.B) => void +>a : types.A +>b : types.B + diff --git a/tests/baselines/reference/jsdocImportTagCompletion2.baseline b/tests/baselines/reference/jsdocImportTagCompletion2.baseline new file mode 100644 index 0000000000000..e05a6ff4579fd --- /dev/null +++ b/tests/baselines/reference/jsdocImportTagCompletion2.baseline @@ -0,0 +1,48 @@ +// === Completions === +=== /b.js === +// /** +// * @import { } from "./a" +// ^ +// | ---------------------------------------------------------------------- +// | interface A +// | ---------------------------------------------------------------------- +// */ + +[ + { + "marker": { + "fileName": "/b.js", + "position": 17, + "name": "" + }, + "item": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "A", + "kind": "interface", + "kindModifiers": "export", + "sortText": "11", + "displayParts": [ + { + "text": "interface", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "A", + "kind": "interfaceName" + } + ], + "documentation": [] + } + ] + } + } +] \ No newline at end of file diff --git a/tests/baselines/reference/jsdocImportTagCompletion3.baseline b/tests/baselines/reference/jsdocImportTagCompletion3.baseline new file mode 100644 index 0000000000000..6d25b1ae8f40c --- /dev/null +++ b/tests/baselines/reference/jsdocImportTagCompletion3.baseline @@ -0,0 +1,51 @@ +// === Completions === +=== /tests/cases/fourslash/./c.js === +// /** +// * @import * as types from "./" +// ^ +// | ---------------------------------------------------------------------- +// | a +// | b +// | ---------------------------------------------------------------------- +// */ + +[ + { + "marker": { + "fileName": "/tests/cases/fourslash/./c.js", + "position": 34, + "name": "" + }, + "item": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "a", + "kind": "script", + "kindModifiers": ".ts", + "sortText": "11", + "displayParts": [ + { + "text": "a", + "kind": "text" + } + ] + }, + { + "name": "b", + "kind": "script", + "kindModifiers": ".ts", + "sortText": "11", + "displayParts": [ + { + "text": "b", + "kind": "text" + } + ] + } + ] + } + } +] \ No newline at end of file diff --git a/tests/baselines/reference/jsdocParameterTagSnippetCompletion1.baseline b/tests/baselines/reference/jsdocParameterTagSnippetCompletion1.baseline index 970b5ae25841e..eaa52ac7e7b66 100644 --- a/tests/baselines/reference/jsdocParameterTagSnippetCompletion1.baseline +++ b/tests/baselines/reference/jsdocParameterTagSnippetCompletion1.baseline @@ -40,6 +40,7 @@ // | host // | ignore // | implements +// | import // | inheritdoc // | inner // | instance @@ -136,6 +137,7 @@ // | @host // | @ignore // | @implements +// | @import // | @inheritdoc // | @inner // | @instance @@ -229,6 +231,7 @@ // | host // | ignore // | implements +// | import // | inheritdoc // | inner // | instance @@ -327,6 +330,7 @@ // | host // | ignore // | implements +// | import // | inheritdoc // | inner // | instance @@ -427,6 +431,7 @@ // | host // | ignore // | implements +// | import // | inheritdoc // | inner // | instance @@ -522,6 +527,7 @@ // | host // | ignore // | implements +// | import // | inheritdoc // | inner // | instance @@ -618,6 +624,7 @@ // | host // | ignore // | implements +// | import // | inheritdoc // | inner // | instance @@ -714,6 +721,7 @@ // | host // | ignore // | implements +// | import // | inheritdoc // | inner // | instance @@ -809,6 +817,7 @@ // | host // | ignore // | implements +// | import // | inheritdoc // | inner // | instance @@ -905,6 +914,7 @@ // | host // | ignore // | implements +// | import // | inheritdoc // | inner // | instance @@ -998,6 +1008,7 @@ // | host // | ignore // | implements +// | import // | inheritdoc // | inner // | instance @@ -1092,6 +1103,7 @@ // | host // | ignore // | implements +// | import // | inheritdoc // | inner // | instance @@ -1186,6 +1198,7 @@ // | host // | ignore // | implements +// | import // | inheritdoc // | inner // | instance @@ -1279,6 +1292,7 @@ // | host // | ignore // | implements +// | import // | inheritdoc // | inner // | instance @@ -1374,6 +1388,7 @@ // | @host // | @ignore // | @implements +// | @import // | @inheritdoc // | @inner // | @instance @@ -1467,6 +1482,7 @@ // | host // | ignore // | implements +// | import // | inheritdoc // | inner // | instance @@ -1562,6 +1578,7 @@ // | host // | ignore // | implements +// | import // | inheritdoc // | inner // | instance @@ -2096,6 +2113,19 @@ ], "documentation": [] }, + { + "name": "import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "inheritdoc", "kind": "", @@ -3215,6 +3245,19 @@ ], "documentation": [] }, + { + "name": "import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "inheritdoc", "kind": "", @@ -4334,6 +4377,19 @@ ], "documentation": [] }, + { + "name": "@import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "@import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "@inheritdoc", "kind": "", @@ -5440,6 +5496,19 @@ ], "documentation": [] }, + { + "name": "import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "inheritdoc", "kind": "", @@ -6546,6 +6615,19 @@ ], "documentation": [] }, + { + "name": "import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "inheritdoc", "kind": "", @@ -7652,6 +7734,19 @@ ], "documentation": [] }, + { + "name": "import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "inheritdoc", "kind": "", @@ -8771,6 +8866,19 @@ ], "documentation": [] }, + { + "name": "@import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "@import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "@inheritdoc", "kind": "", @@ -9877,6 +9985,19 @@ ], "documentation": [] }, + { + "name": "import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "inheritdoc", "kind": "", @@ -10983,6 +11104,19 @@ ], "documentation": [] }, + { + "name": "import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "inheritdoc", "kind": "", @@ -12089,6 +12223,19 @@ ], "documentation": [] }, + { + "name": "import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "inheritdoc", "kind": "", @@ -13195,6 +13342,19 @@ ], "documentation": [] }, + { + "name": "import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "inheritdoc", "kind": "", @@ -14301,6 +14461,19 @@ ], "documentation": [] }, + { + "name": "import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "inheritdoc", "kind": "", @@ -15407,6 +15580,19 @@ ], "documentation": [] }, + { + "name": "import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "inheritdoc", "kind": "", @@ -16513,6 +16699,19 @@ ], "documentation": [] }, + { + "name": "import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "inheritdoc", "kind": "", @@ -17632,6 +17831,19 @@ ], "documentation": [] }, + { + "name": "import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "inheritdoc", "kind": "", @@ -18738,6 +18950,19 @@ ], "documentation": [] }, + { + "name": "import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "inheritdoc", "kind": "", @@ -19844,6 +20069,19 @@ ], "documentation": [] }, + { + "name": "import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "inheritdoc", "kind": "", diff --git a/tests/baselines/reference/jsdocParameterTagSnippetCompletion2.baseline b/tests/baselines/reference/jsdocParameterTagSnippetCompletion2.baseline index 0e8cc9b8ceed1..61f8d6a823f74 100644 --- a/tests/baselines/reference/jsdocParameterTagSnippetCompletion2.baseline +++ b/tests/baselines/reference/jsdocParameterTagSnippetCompletion2.baseline @@ -40,6 +40,7 @@ // | @host // | @ignore // | @implements +// | @import // | @inheritdoc // | @inner // | @instance @@ -133,6 +134,7 @@ // | host // | ignore // | implements +// | import // | inheritdoc // | inner // | instance @@ -231,6 +233,7 @@ // | host // | ignore // | implements +// | import // | inheritdoc // | inner // | instance @@ -323,6 +326,7 @@ // | host // | ignore // | implements +// | import // | inheritdoc // | inner // | instance @@ -416,6 +420,7 @@ // | @host // | @ignore // | @implements +// | @import // | @inheritdoc // | @inner // | @instance @@ -948,6 +953,19 @@ ], "documentation": [] }, + { + "name": "@import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "@import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "@inheritdoc", "kind": "", @@ -2056,6 +2074,19 @@ ], "documentation": [] }, + { + "name": "@import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "@import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "@inheritdoc", "kind": "", @@ -3164,6 +3195,19 @@ ], "documentation": [] }, + { + "name": "import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "inheritdoc", "kind": "", @@ -4272,6 +4316,19 @@ ], "documentation": [] }, + { + "name": "import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "inheritdoc", "kind": "", @@ -5380,6 +5437,19 @@ ], "documentation": [] }, + { + "name": "import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "inheritdoc", "kind": "", diff --git a/tests/baselines/reference/jsdocParameterTagSnippetCompletion3.baseline b/tests/baselines/reference/jsdocParameterTagSnippetCompletion3.baseline index 31809167ab0f8..e5b6942d334f0 100644 --- a/tests/baselines/reference/jsdocParameterTagSnippetCompletion3.baseline +++ b/tests/baselines/reference/jsdocParameterTagSnippetCompletion3.baseline @@ -40,6 +40,7 @@ // | host // | ignore // | implements +// | import // | inheritdoc // | inner // | instance @@ -131,6 +132,7 @@ // | host // | ignore // | implements +// | import // | inheritdoc // | inner // | instance @@ -223,6 +225,7 @@ // | host // | ignore // | implements +// | import // | inheritdoc // | inner // | instance @@ -318,6 +321,7 @@ // | host // | ignore // | implements +// | import // | inheritdoc // | inner // | instance @@ -413,6 +417,7 @@ // | host // | ignore // | implements +// | import // | inheritdoc // | inner // | instance @@ -506,6 +511,7 @@ // | host // | ignore // | implements +// | import // | inheritdoc // | inner // | instance @@ -1039,6 +1045,19 @@ ], "documentation": [] }, + { + "name": "import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "inheritdoc", "kind": "", @@ -2145,6 +2164,19 @@ ], "documentation": [] }, + { + "name": "import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "inheritdoc", "kind": "", @@ -3251,6 +3283,19 @@ ], "documentation": [] }, + { + "name": "import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "inheritdoc", "kind": "", @@ -4357,6 +4402,19 @@ ], "documentation": [] }, + { + "name": "import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "inheritdoc", "kind": "", @@ -5463,6 +5521,19 @@ ], "documentation": [] }, + { + "name": "import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "inheritdoc", "kind": "", @@ -6569,6 +6640,19 @@ ], "documentation": [] }, + { + "name": "import", + "kind": "", + "kindModifiers": "", + "sortText": "11", + "displayParts": [ + { + "text": "import", + "kind": "text" + } + ], + "documentation": [] + }, { "name": "inheritdoc", "kind": "", diff --git a/tests/baselines/reference/renameJsDocImportTag.baseline.jsonc b/tests/baselines/reference/renameJsDocImportTag.baseline.jsonc new file mode 100644 index 0000000000000..69afeb9c6e35a --- /dev/null +++ b/tests/baselines/reference/renameJsDocImportTag.baseline.jsonc @@ -0,0 +1,10 @@ +// === findRenameLocations === +// === /a.js === +// /** +// * <|@import { /*START PREFIX*/A as [|ARENAME|] } from "./b"; +// |>*/ +// +// /** +// * @param { [|ARENAME|]/*RENAME*/ } a +// */ +// function f(a) {} \ No newline at end of file diff --git a/tests/cases/conformance/jsdoc/importTag1.ts b/tests/cases/conformance/jsdoc/importTag1.ts new file mode 100644 index 0000000000000..b85735da4d96b --- /dev/null +++ b/tests/cases/conformance/jsdoc/importTag1.ts @@ -0,0 +1,18 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /types.ts +export interface Foo { + a: number; +} + +// @filename: /foo.js +/** + * @import { Foo } from "./types" + */ + +/** + * @param { Foo } foo + */ +function f(foo) {} diff --git a/tests/cases/conformance/jsdoc/importTag10.ts b/tests/cases/conformance/jsdoc/importTag10.ts new file mode 100644 index 0000000000000..ae3f71e74eed4 --- /dev/null +++ b/tests/cases/conformance/jsdoc/importTag10.ts @@ -0,0 +1,8 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /foo.js +/** + * @import + */ diff --git a/tests/cases/conformance/jsdoc/importTag11.ts b/tests/cases/conformance/jsdoc/importTag11.ts new file mode 100644 index 0000000000000..f4c2d18ecb7cd --- /dev/null +++ b/tests/cases/conformance/jsdoc/importTag11.ts @@ -0,0 +1,8 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /foo.js +/** + * @import foo + */ diff --git a/tests/cases/conformance/jsdoc/importTag12.ts b/tests/cases/conformance/jsdoc/importTag12.ts new file mode 100644 index 0000000000000..464444b8f924c --- /dev/null +++ b/tests/cases/conformance/jsdoc/importTag12.ts @@ -0,0 +1,8 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /foo.js +/** + * @import foo from + */ diff --git a/tests/cases/conformance/jsdoc/importTag13.ts b/tests/cases/conformance/jsdoc/importTag13.ts new file mode 100644 index 0000000000000..8f15c41695bb2 --- /dev/null +++ b/tests/cases/conformance/jsdoc/importTag13.ts @@ -0,0 +1,11 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /types.ts +export interface Foo { + a: number; +} + +// @filename: /foo.js +/** @import x = require("types") */ diff --git a/tests/cases/conformance/jsdoc/importTag14.ts b/tests/cases/conformance/jsdoc/importTag14.ts new file mode 100644 index 0000000000000..98375d7356c39 --- /dev/null +++ b/tests/cases/conformance/jsdoc/importTag14.ts @@ -0,0 +1,6 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /foo.js +/** @import * as f from "./foo" with */ diff --git a/tests/cases/conformance/jsdoc/importTag15.ts b/tests/cases/conformance/jsdoc/importTag15.ts new file mode 100644 index 0000000000000..50004fdb86ac9 --- /dev/null +++ b/tests/cases/conformance/jsdoc/importTag15.ts @@ -0,0 +1,15 @@ +// @declaration: true +// @emitDeclarationOnly: true +// @module: esnext,es2015 +// @checkJs: true +// @allowJs: true + +// @filename: 0.ts +export interface I { } + +// @filename: 1.js +/** @import { I } from './0' with { type: "json" } */ +/** @import * as foo from './0' with { type: "json" } */ + +/** @param {I} a */ +function f(a) {} diff --git a/tests/cases/conformance/jsdoc/importTag16.ts b/tests/cases/conformance/jsdoc/importTag16.ts new file mode 100644 index 0000000000000..0a28cd9c8a580 --- /dev/null +++ b/tests/cases/conformance/jsdoc/importTag16.ts @@ -0,0 +1,17 @@ +// @declaration: true +// @emitDeclarationOnly: true +// @checkJs: true +// @allowJs: true + +// @filename: a.ts +export default interface Foo {} +export interface I {} + +// @filename: b.js +/** @import Foo, { I } from "./a" */ + +/** + * @param {Foo} a + * @param {I} b + */ +export function foo(a, b) {} diff --git a/tests/cases/conformance/jsdoc/importTag2.ts b/tests/cases/conformance/jsdoc/importTag2.ts new file mode 100644 index 0000000000000..e306afb43a828 --- /dev/null +++ b/tests/cases/conformance/jsdoc/importTag2.ts @@ -0,0 +1,18 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /types.ts +export interface Foo { + a: number; +} + +// @filename: /foo.js +/** + * @import * as types from "./types" + */ + +/** + * @param { types.Foo } foo + */ +export function f(foo) {} diff --git a/tests/cases/conformance/jsdoc/importTag3.ts b/tests/cases/conformance/jsdoc/importTag3.ts new file mode 100644 index 0000000000000..7ebe8894b5243 --- /dev/null +++ b/tests/cases/conformance/jsdoc/importTag3.ts @@ -0,0 +1,18 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /types.ts +export default interface Foo { + a: number; +} + +// @filename: /foo.js +/** + * @import Foo from "./types" + */ + +/** + * @param { Foo } foo + */ +export function f(foo) {} diff --git a/tests/cases/conformance/jsdoc/importTag4.ts b/tests/cases/conformance/jsdoc/importTag4.ts new file mode 100644 index 0000000000000..1f76717279c5b --- /dev/null +++ b/tests/cases/conformance/jsdoc/importTag4.ts @@ -0,0 +1,22 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /types.ts +export interface Foo { + a: number; +} + +// @filename: /foo.js +/** + * @import { Foo } from "./types" + */ + +/** + * @import { Foo } from "./types" + */ + +/** + * @param { Foo } foo + */ +function f(foo) {} diff --git a/tests/cases/conformance/jsdoc/importTag5.ts b/tests/cases/conformance/jsdoc/importTag5.ts new file mode 100644 index 0000000000000..7dfedad464d9b --- /dev/null +++ b/tests/cases/conformance/jsdoc/importTag5.ts @@ -0,0 +1,19 @@ +// @checkJs: true +// @allowJs: true +// @declaration: true +// @emitDeclarationOnly: true + +// @filename: /types.ts +export interface Foo { + a: number; +} + +// @filename: /foo.js +/** + * @import { Foo } from "./types" + */ + +/** + * @param { Foo } foo + */ +function f(foo) {} diff --git a/tests/cases/conformance/jsdoc/importTag6.ts b/tests/cases/conformance/jsdoc/importTag6.ts new file mode 100644 index 0000000000000..2d6470c3ff55a --- /dev/null +++ b/tests/cases/conformance/jsdoc/importTag6.ts @@ -0,0 +1,25 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /types.ts +export interface A { + a: number; +} +export interface B { + a: number; +} + +// @filename: /foo.js +/** + * @import { + * A, + * B, + * } from "./types" + */ + +/** + * @param { A } a + * @param { B } b + */ +function f(a, b) {} diff --git a/tests/cases/conformance/jsdoc/importTag7.ts b/tests/cases/conformance/jsdoc/importTag7.ts new file mode 100644 index 0000000000000..d6643e411f268 --- /dev/null +++ b/tests/cases/conformance/jsdoc/importTag7.ts @@ -0,0 +1,24 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /types.ts +export interface A { + a: number; +} +export interface B { + a: number; +} + +// @filename: /foo.js +/** + * @import { + * A, + * B } from "./types" + */ + +/** + * @param { A } a + * @param { B } b + */ +function f(a, b) {} diff --git a/tests/cases/conformance/jsdoc/importTag8.ts b/tests/cases/conformance/jsdoc/importTag8.ts new file mode 100644 index 0000000000000..9832c5485852e --- /dev/null +++ b/tests/cases/conformance/jsdoc/importTag8.ts @@ -0,0 +1,24 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /types.ts +export interface A { + a: number; +} +export interface B { + a: number; +} + +// @filename: /foo.js +/** + * @import + * { A, B } + * from "./types" + */ + +/** + * @param { A } a + * @param { B } b + */ +function f(a, b) {} diff --git a/tests/cases/conformance/jsdoc/importTag9.ts b/tests/cases/conformance/jsdoc/importTag9.ts new file mode 100644 index 0000000000000..6cf733d5e83de --- /dev/null +++ b/tests/cases/conformance/jsdoc/importTag9.ts @@ -0,0 +1,24 @@ +// @checkJs: true +// @allowJs: true +// @noEmit: true + +// @filename: /types.ts +export interface A { + a: number; +} +export interface B { + a: number; +} + +// @filename: /foo.js +/** + * @import + * * as types + * from "./types" + */ + +/** + * @param { types.A } a + * @param { types.B } b + */ +function f(a, b) {} diff --git a/tests/cases/fourslash/autoImportJsDocImport1.ts b/tests/cases/fourslash/autoImportJsDocImport1.ts new file mode 100644 index 0000000000000..65fa9f9506de2 --- /dev/null +++ b/tests/cases/fourslash/autoImportJsDocImport1.ts @@ -0,0 +1,40 @@ +/// + +// @verbatimModuleSyntax: true +// @target: esnext +// @allowJs: true +// @checkJs: true + +// @Filename: /foo.ts +//// export const A = 1; +//// export type B = { x: number }; +//// export type C = 1; +//// export class D { y: string } + +// @Filename: /test.js +/////** +//// * @import { A, D, C } from "./foo" +//// */ +//// +/////** +//// * @param { typeof A } a +//// * @param { B/**/ | C } b +//// * @param { C } c +//// * @param { D } d +//// */ +////export function f(a, b, c, d) { } + +goTo.marker(""); +verify.importFixAtPosition([ +`/** + * @import { A, D, C, B } from "./foo" + */ + +/** + * @param { typeof A } a + * @param { B | C } b + * @param { C } c + * @param { D } d + */ +export function f(a, b, c, d) { }` +]); diff --git a/tests/cases/fourslash/findAllRefsJsDocImportTag.ts b/tests/cases/fourslash/findAllRefsJsDocImportTag.ts new file mode 100644 index 0000000000000..8fb66d013e57f --- /dev/null +++ b/tests/cases/fourslash/findAllRefsJsDocImportTag.ts @@ -0,0 +1,19 @@ +/// + +// @allowJS: true +// @checkJs: true + +// @Filename: /b.ts +////export interface A { } + +// @Filename: /a.js +/////** +//// * @import { A } from "./b"; +//// */ +//// +/////** +//// * @param { [|A/**/|] } a +//// */ +////function f(a) {} + +verify.baselineFindAllReferences(""); diff --git a/tests/cases/fourslash/goToDefinitionJsDocImportTag1.ts b/tests/cases/fourslash/goToDefinitionJsDocImportTag1.ts new file mode 100644 index 0000000000000..56983716b193e --- /dev/null +++ b/tests/cases/fourslash/goToDefinitionJsDocImportTag1.ts @@ -0,0 +1,14 @@ +/// + +// @allowJS: true +// @checkJs: true + +// @Filename: /b.ts +/////*2*/export interface A { } + +// @Filename: /a.js +/////** +//// * @import { A } from [|"./b/*1*/"|] +//// */ + +verify.baselineGoToDefinition("1"); diff --git a/tests/cases/fourslash/goToDefinitionJsDocImportTag2.ts b/tests/cases/fourslash/goToDefinitionJsDocImportTag2.ts new file mode 100644 index 0000000000000..bc8ed4cde99e6 --- /dev/null +++ b/tests/cases/fourslash/goToDefinitionJsDocImportTag2.ts @@ -0,0 +1,14 @@ +/// + +// @allowJS: true +// @checkJs: true + +// @Filename: /b.ts +/////*2*/export interface A { } + +// @Filename: /a.js +/////** +//// * @import { A } [|from/*1*/|] "./b" +//// */ + +verify.baselineGoToDefinition("1"); diff --git a/tests/cases/fourslash/goToDefinitionJsDocImportTag3.ts b/tests/cases/fourslash/goToDefinitionJsDocImportTag3.ts new file mode 100644 index 0000000000000..239c42803a1a8 --- /dev/null +++ b/tests/cases/fourslash/goToDefinitionJsDocImportTag3.ts @@ -0,0 +1,14 @@ +/// + +// @allowJS: true +// @checkJs: true + +// @Filename: /b.ts +/////*2*/export interface A { } + +// @Filename: /a.js +/////** +//// * @import { A } [|from /*1*/|] "./b"; +//// */ + +verify.baselineGoToDefinition("1"); diff --git a/tests/cases/fourslash/goToDefinitionJsDocImportTag4.ts b/tests/cases/fourslash/goToDefinitionJsDocImportTag4.ts new file mode 100644 index 0000000000000..fd47f3555899b --- /dev/null +++ b/tests/cases/fourslash/goToDefinitionJsDocImportTag4.ts @@ -0,0 +1,14 @@ +/// + +// @allowJS: true +// @checkJs: true + +// @Filename: /b.ts +////export interface /*2*/A { } + +// @Filename: /a.js +/////** +//// * @import { [|A/*1*/|] } from "./b"; +//// */ + +verify.baselineGoToDefinition("1"); diff --git a/tests/cases/fourslash/goToDefinitionJsDocImportTag5.ts b/tests/cases/fourslash/goToDefinitionJsDocImportTag5.ts new file mode 100644 index 0000000000000..fb8a886d5f6af --- /dev/null +++ b/tests/cases/fourslash/goToDefinitionJsDocImportTag5.ts @@ -0,0 +1,19 @@ +/// + +// @allowJS: true +// @checkJs: true + +// @Filename: /b.ts +////export interface /*2*/A { } + +// @Filename: /a.js +/////** +//// * @import { A } from "./b"; +//// */ +//// +/////** +//// * @param { [|A/*1*/|] } a +//// */ +////function f(a) {} + +verify.baselineGoToDefinition("1"); diff --git a/tests/cases/fourslash/jsdocImportTagCompletion1.ts b/tests/cases/fourslash/jsdocImportTagCompletion1.ts new file mode 100644 index 0000000000000..cb7ed23924193 --- /dev/null +++ b/tests/cases/fourslash/jsdocImportTagCompletion1.ts @@ -0,0 +1,13 @@ +/// + +// @allowJS: true +// @checkJs: true + +// @filename: /a.js +/////** +//// * @/**/ +//// */ + +verify.completions( + { marker: "", includes: ["import"] }, +); diff --git a/tests/cases/fourslash/jsdocImportTagCompletion2.ts b/tests/cases/fourslash/jsdocImportTagCompletion2.ts new file mode 100644 index 0000000000000..4a249ba7f6054 --- /dev/null +++ b/tests/cases/fourslash/jsdocImportTagCompletion2.ts @@ -0,0 +1,14 @@ +/// + +// @allowJS: true +// @checkJs: true + +// @filename: /a.ts +////export interface A {} + +// @filename: /b.js +/////** +//// * @import { /**/ } from "./a" +//// */ + +verify.baselineCompletions(); diff --git a/tests/cases/fourslash/jsdocImportTagCompletion3.ts b/tests/cases/fourslash/jsdocImportTagCompletion3.ts new file mode 100644 index 0000000000000..3b84d092aa6d8 --- /dev/null +++ b/tests/cases/fourslash/jsdocImportTagCompletion3.ts @@ -0,0 +1,18 @@ +/// + +// @allowJS: true +// @checkJs: true +// @module: esnext + +// @filename: ./a.ts +////export interface A {} + +// @filename: ./b.ts +////export interface B {} + +// @filename: ./c.js +/////** +//// * @import * as types from ".//**/" +//// */ + +verify.baselineCompletions(); diff --git a/tests/cases/fourslash/refactorConvertImport_namedToDefault2.ts b/tests/cases/fourslash/refactorConvertImport_namedToDefault2.ts new file mode 100644 index 0000000000000..07195e88ef19e --- /dev/null +++ b/tests/cases/fourslash/refactorConvertImport_namedToDefault2.ts @@ -0,0 +1,26 @@ +/// + +// @esModuleInterop: true +// @allowJs: true +// @checkJs: true + +// @Filename: /process.d.ts +////declare module "process" { +//// interface Process { +//// pid: number; +//// addListener(event: string, listener: (...args: any[]) => void): void; +//// } +//// var process: Process; +//// export = process; +////} + +// @Filename: /a.js +/////** [|@import { pid, addListener } from "process"|] */ + +goTo.selectRange(test.ranges()[0]); +edit.applyRefactor({ + refactorName: "Convert import", + actionName: "Convert named imports to default import", + actionDescription: "Convert named imports to default import", + newContent: `/** @import process from "process" */`, +}); diff --git a/tests/cases/fourslash/refactorConvertImport_namedToNamespace10.ts b/tests/cases/fourslash/refactorConvertImport_namedToNamespace10.ts new file mode 100644 index 0000000000000..7fe2e578d8ae8 --- /dev/null +++ b/tests/cases/fourslash/refactorConvertImport_namedToNamespace10.ts @@ -0,0 +1,15 @@ +/// + +// @allowJs: true +// @checkJs: true + +// @filename: /a.js +/////** [|@import { join } from "path"|] */ + +goTo.selectRange(test.ranges()[0]); +edit.applyRefactor({ + refactorName: "Convert import", + actionName: "Convert named imports to namespace import", + actionDescription: "Convert named imports to namespace import", + newContent: `/** @import * as path from "path" */`, +}); diff --git a/tests/cases/fourslash/refactorConvertImport_namespaceToNamed.ts b/tests/cases/fourslash/refactorConvertImport_namespaceToNamed1.ts similarity index 100% rename from tests/cases/fourslash/refactorConvertImport_namespaceToNamed.ts rename to tests/cases/fourslash/refactorConvertImport_namespaceToNamed1.ts diff --git a/tests/cases/fourslash/refactorConvertImport_namespaceToNamed2.ts b/tests/cases/fourslash/refactorConvertImport_namespaceToNamed2.ts new file mode 100644 index 0000000000000..439ab3026fbc1 --- /dev/null +++ b/tests/cases/fourslash/refactorConvertImport_namespaceToNamed2.ts @@ -0,0 +1,31 @@ +/// +// @allowJs: true +// @checkJs: true + +// @filename: /a.js +/////** +//// * [|@import * as types from "types"|] +//// */ +//// +/////** +//// * @param { types.A } a +//// * @param { types.B } b +//// */ +////function f() { } + +goTo.selectRange(test.ranges()[0]); +edit.applyRefactor({ + refactorName: "Convert import", + actionName: "Convert namespace import to named imports", + actionDescription: "Convert namespace import to named imports", + newContent: +`/** + * @import { A, B } from "types" + */ + +/** + * @param { A } a + * @param { B } b + */ +function f() { }`, +}); diff --git a/tests/cases/fourslash/renameJsDocImportTag.ts b/tests/cases/fourslash/renameJsDocImportTag.ts new file mode 100644 index 0000000000000..1e76dc1df8166 --- /dev/null +++ b/tests/cases/fourslash/renameJsDocImportTag.ts @@ -0,0 +1,19 @@ +/// + +// @allowJS: true +// @checkJs: true + +// @Filename: /b.ts +////export interface A { } + +// @Filename: /a.js +/////** +//// * @import { A } from "./b"; +//// */ +//// +/////** +//// * @param { [|A/**/|] } a +//// */ +////function f(a) {} + +verify.baselineRename(""); From 6d0cc1beda9a83bbd5926c6f4998ca93f5e777a3 Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Wed, 27 Mar 2024 06:14:59 +0000 Subject: [PATCH 3/9] Update package-lock.json --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index af65b0090a277..8df601c1bf275 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3069,9 +3069,9 @@ } }, "node_modules/mocha": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.3.0.tgz", - "integrity": "sha512-uF2XJs+7xSLsrmIvn37i/wnc91nw7XjOQB8ccyx5aEgdnohr7n+rEiZP23WkCYHjilR6+EboEnbq/ZQDz4LSbg==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz", + "integrity": "sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==", "dev": true, "dependencies": { "ansi-colors": "4.1.1", @@ -6562,9 +6562,9 @@ "dev": true }, "mocha": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.3.0.tgz", - "integrity": "sha512-uF2XJs+7xSLsrmIvn37i/wnc91nw7XjOQB8ccyx5aEgdnohr7n+rEiZP23WkCYHjilR6+EboEnbq/ZQDz4LSbg==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz", + "integrity": "sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==", "dev": true, "requires": { "ansi-colors": "4.1.1", From e1874f3ffed435b6367adaba3b81608e931dcf6c Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Wed, 27 Mar 2024 09:57:09 -0700 Subject: [PATCH 4/9] Propagate outer type parameters of single signature types (#57403) --- src/compiler/checker.ts | 84 +++++++++++--- src/compiler/types.ts | 9 ++ tests/baselines/reference/api/typescript.d.ts | 1 + ...lWithinOwnBodyCastTypeParameterIdentity.js | 52 +++++++++ ...inOwnBodyCastTypeParameterIdentity.symbols | 104 ++++++++++++++++++ ...thinOwnBodyCastTypeParameterIdentity.types | 83 ++++++++++++++ .../reference/nestedGenericSpreadInference.js | 14 +++ .../nestedGenericSpreadInference.symbols | 34 ++++++ .../nestedGenericSpreadInference.types | 27 +++++ ...lWithinOwnBodyCastTypeParameterIdentity.ts | 26 +++++ .../compiler/nestedGenericSpreadInference.ts | 6 + 11 files changed, 423 insertions(+), 17 deletions(-) create mode 100644 tests/baselines/reference/genericCallWithinOwnBodyCastTypeParameterIdentity.js create mode 100644 tests/baselines/reference/genericCallWithinOwnBodyCastTypeParameterIdentity.symbols create mode 100644 tests/baselines/reference/genericCallWithinOwnBodyCastTypeParameterIdentity.types create mode 100644 tests/baselines/reference/nestedGenericSpreadInference.js create mode 100644 tests/baselines/reference/nestedGenericSpreadInference.symbols create mode 100644 tests/baselines/reference/nestedGenericSpreadInference.types create mode 100644 tests/cases/compiler/genericCallWithinOwnBodyCastTypeParameterIdentity.ts create mode 100644 tests/cases/compiler/nestedGenericSpreadInference.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c9313f78f5ae7..c63a47d85502f 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -967,6 +967,7 @@ import { SignatureFlags, SignatureKind, singleElementArray, + SingleSignatureType, skipOuterExpressions, skipParentheses, skipTrivia, @@ -7165,7 +7166,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const abstractSignatures = filter(resolved.constructSignatures, signature => !!(signature.flags & SignatureFlags.Abstract)); if (some(abstractSignatures)) { - const types = map(abstractSignatures, getOrCreateTypeFromSignature); + const types = map(abstractSignatures, s => getOrCreateTypeFromSignature(s)); // count the number of type elements excluding abstract constructors const typeElementCount = resolved.callSignatures.length + (resolved.constructSignatures.length - abstractSignatures.length) + @@ -15672,7 +15673,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return undefined; } - function getSignatureInstantiation(signature: Signature, typeArguments: Type[] | undefined, isJavascript: boolean, inferredTypeParameters?: readonly TypeParameter[]): Signature { + function getSignatureInstantiation(signature: Signature, typeArguments: readonly Type[] | undefined, isJavascript: boolean, inferredTypeParameters?: readonly TypeParameter[]): Signature { const instantiatedSignature = getSignatureInstantiationWithoutFillingInTypeArguments(signature, fillMissingTypeArguments(typeArguments, signature.typeParameters, getMinTypeArgumentCount(signature.typeParameters), isJavascript)); if (inferredTypeParameters) { const returnSignature = getSingleCallOrConstructSignature(getReturnTypeOfSignature(instantiatedSignature)); @@ -15736,6 +15737,16 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { ); } + function getImplementationSignature(signature: Signature) { + return signature.typeParameters ? + signature.implementationSignatureCache ||= createImplementationSignature(signature) : + signature; + } + + function createImplementationSignature(signature: Signature) { + return signature.typeParameters ? instantiateSignature(signature, createTypeMapper([], [])) : signature; + } + function getBaseSignature(signature: Signature) { const typeParameters = signature.typeParameters; if (typeParameters) { @@ -15757,7 +15768,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return signature; } - function getOrCreateTypeFromSignature(signature: Signature): ObjectType { + function getOrCreateTypeFromSignature(signature: Signature, outerTypeParameters?: TypeParameter[]): ObjectType { // There are two ways to declare a construct signature, one is by declaring a class constructor // using the constructor keyword, and the other is declaring a bare construct signature in an // object type literal or interface (using the new keyword). Each way of declaring a constructor @@ -15768,7 +15779,16 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // If declaration is undefined, it is likely to be the signature of the default constructor. const isConstructor = kind === undefined || kind === SyntaxKind.Constructor || kind === SyntaxKind.ConstructSignature || kind === SyntaxKind.ConstructorType; - const type = createObjectType(ObjectFlags.Anonymous); + // The type must have a symbol with a `Function` flag and a declaration in order to be correctly flagged as possibly containing + // type variables by `couldContainTypeVariables` + const type = createObjectType(ObjectFlags.Anonymous | ObjectFlags.SingleSignatureType, createSymbol(SymbolFlags.Function, InternalSymbolName.Function)) as SingleSignatureType; + if (signature.declaration && !nodeIsSynthesized(signature.declaration)) { // skip synthetic declarations - keeping those around could be bad, since they lack a parent pointer + type.symbol.declarations = [signature.declaration]; + type.symbol.valueDeclaration = signature.declaration; + } + outerTypeParameters ||= signature.declaration && getOuterTypeParameters(signature.declaration, /*includeThisTypes*/ true); + type.outerTypeParameters = outerTypeParameters; + type.members = emptySymbols; type.properties = emptyArray; type.callSignatures = !isConstructor ? [signature] : emptyArray; @@ -19749,7 +19769,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const links = getNodeLinks(declaration); const target = type.objectFlags & ObjectFlags.Reference ? links.resolvedType! as DeferredTypeReference : type.objectFlags & ObjectFlags.Instantiated ? type.target! : type; - let typeParameters = links.outerTypeParameters; + let typeParameters = type.objectFlags & ObjectFlags.SingleSignatureType ? (type as SingleSignatureType).outerTypeParameters : links.outerTypeParameters; if (!typeParameters) { // The first time an anonymous type is instantiated we compute and store a list of the type // parameters that are in scope (and therefore potentially referenced). For type literals that @@ -19980,6 +20000,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (type.objectFlags & ObjectFlags.InstantiationExpressionType) { (result as InstantiationExpressionType).node = (type as InstantiationExpressionType).node; } + if (type.objectFlags & ObjectFlags.SingleSignatureType) { + (result as SingleSignatureType).outerTypeParameters = (type as SingleSignatureType).outerTypeParameters; + } result.target = type; result.mapper = mapper; result.aliasSymbol = aliasSymbol || type.aliasSymbol; @@ -25263,6 +25286,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const result = !!(type.flags & TypeFlags.Instantiable || type.flags & TypeFlags.Object && !isNonGenericTopLevelType(type) && ( objectFlags & ObjectFlags.Reference && ((type as TypeReference).node || some(getTypeArguments(type as TypeReference), couldContainTypeVariables)) || + objectFlags & ObjectFlags.SingleSignatureType && !!length((type as SingleSignatureType).outerTypeParameters) || objectFlags & ObjectFlags.Anonymous && type.symbol && type.symbol.flags & (SymbolFlags.Function | SymbolFlags.Method | SymbolFlags.Class | SymbolFlags.TypeLiteral | SymbolFlags.ObjectLiteral) && type.symbol.declarations || objectFlags & (ObjectFlags.Mapped | ObjectFlags.ReverseMapped | ObjectFlags.ObjectRestType | ObjectFlags.InstantiationExpressionType) ) || @@ -25622,6 +25646,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } + /** + * @returns `true` if `type` has the shape `[T[0]]` where `T` is `typeParameter` + */ + function isTupleOfSelf(typeParameter: TypeParameter, type: Type) { + return isTupleType(type) && getTupleElementType(type, 0) === getIndexedAccessType(typeParameter, getNumberLiteralType(0)) && !getTypeOfPropertyOfType(type, "1" as __String); + } + function inferTypes(inferences: InferenceInfo[], originalSource: Type, originalTarget: Type, priority = InferencePriority.None, contravariant = false) { let bivariant = false; let propagationType: Type; @@ -25750,6 +25781,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { inference.priority = priority; } if (priority === inference.priority) { + // Inferring A to [A[0]] is a zero information inference (it guarantees A becomes its constraint), but oft arises from generic argument list inferences + // By discarding it early, we can allow more fruitful results to be used instead. + if (isTupleOfSelf(inference.typeParameter, candidate)) { + return; + } // We make contravariant inferences only if we are in a pure contravariant position, // i.e. only if we have not descended into a bivariant position. if (contravariant && !bivariant) { @@ -34388,6 +34424,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { checkMode: CheckMode, reportErrors: boolean, containingMessageChain: (() => DiagnosticMessageChain | undefined) | undefined, + inferenceContext: InferenceContext | undefined, ): readonly Diagnostic[] | undefined { const errorOutputContainer: { errors?: Diagnostic[]; skipLogging?: boolean; } = { errors: undefined, skipLogging: true }; if (isJsxOpeningLikeElement(node)) { @@ -34422,7 +34459,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // If one or more arguments are still excluded (as indicated by CheckMode.SkipContextSensitive), // we obtain the regular type of any object literal arguments because we may not have inferred complete // parameter types yet and therefore excess property checks may yield false positives (see #17041). - const checkArgType = checkMode & CheckMode.SkipContextSensitive ? getRegularTypeOfObjectLiteral(argType) : argType; + const regularArgType = checkMode & CheckMode.SkipContextSensitive ? getRegularTypeOfObjectLiteral(argType) : argType; + // If this was inferred under a given inference context, we may need to instantiate the expression type to finish resolving + // the type variables in the expression. + const checkArgType = inferenceContext ? instantiateType(regularArgType, inferenceContext.nonFixingMapper) : regularArgType; const effectiveCheckArgumentNode = getEffectiveCheckNode(arg); if (!checkTypeRelatedToAndOptionallyElaborate(checkArgType, paramType, relation, reportErrors ? effectiveCheckArgumentNode : undefined, effectiveCheckArgumentNode, headMessage, containingMessageChain, errorOutputContainer)) { Debug.assert(!reportErrors || !!errorOutputContainer.errors, "parameter should have errors when reporting errors"); @@ -34887,7 +34927,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (headMessage) { chain = chainDiagnosticMessages(chain, headMessage); } - const diags = getSignatureApplicabilityError(node, args, last, assignableRelation, CheckMode.Normal, /*reportErrors*/ true, () => chain); + const diags = getSignatureApplicabilityError(node, args, last, assignableRelation, CheckMode.Normal, /*reportErrors*/ true, () => chain, /*inferenceContext*/ undefined); if (diags) { for (const d of diags) { if (last.declaration && candidatesForArgumentError.length > 3) { @@ -34909,7 +34949,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { let i = 0; for (const c of candidatesForArgumentError) { const chain = () => chainDiagnosticMessages(/*details*/ undefined, Diagnostics.Overload_0_of_1_2_gave_the_following_error, i + 1, candidates.length, signatureToString(c)); - const diags = getSignatureApplicabilityError(node, args, c, assignableRelation, CheckMode.Normal, /*reportErrors*/ true, chain); + const diags = getSignatureApplicabilityError(node, args, c, assignableRelation, CheckMode.Normal, /*reportErrors*/ true, chain, /*inferenceContext*/ undefined); if (diags) { if (diags.length <= min) { min = diags.length; @@ -34998,7 +35038,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (some(typeArguments) || !hasCorrectArity(node, args, candidate, signatureHelpTrailingComma)) { return undefined; } - if (getSignatureApplicabilityError(node, args, candidate, relation, CheckMode.Normal, /*reportErrors*/ false, /*containingMessageChain*/ undefined)) { + if (getSignatureApplicabilityError(node, args, candidate, relation, CheckMode.Normal, /*reportErrors*/ false, /*containingMessageChain*/ undefined, /*inferenceContext*/ undefined)) { candidatesForArgumentError = [candidate]; return undefined; } @@ -35006,7 +35046,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } for (let candidateIndex = 0; candidateIndex < candidates.length; candidateIndex++) { - const candidate = candidates[candidateIndex]; + let candidate = candidates[candidateIndex]; if (!hasCorrectTypeArgumentArity(candidate, typeArguments) || !hasCorrectArity(node, args, candidate, signatureHelpTrailingComma)) { continue; } @@ -35015,7 +35055,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { let inferenceContext: InferenceContext | undefined; if (candidate.typeParameters) { - let typeArgumentTypes: Type[] | undefined; + // If we are *inside the body of candidate*, we need to create a clone of `candidate` with differing type parameter identities, + // so our inference results for this call doesn't pollute expression types referencing the outer type parameter! + if (candidate.declaration && findAncestor(node, a => a === candidate.declaration)) { + candidate = getImplementationSignature(candidate); + } + let typeArgumentTypes: readonly Type[] | undefined; if (some(typeArguments)) { typeArgumentTypes = checkTypeArguments(candidate, typeArguments, /*reportErrors*/ false); if (!typeArgumentTypes) { @@ -35024,8 +35069,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } else { - inferenceContext = createInferenceContext(candidate.typeParameters, candidate, /*flags*/ isInJSFile(node) ? InferenceFlags.AnyDefault : InferenceFlags.None); - typeArgumentTypes = inferTypeArguments(node, candidate, args, argCheckMode | CheckMode.SkipGenericFunctions, inferenceContext); + inferenceContext = createInferenceContext(candidate.typeParameters!, candidate, /*flags*/ isInJSFile(node) ? InferenceFlags.AnyDefault : InferenceFlags.None); + // The resulting type arguments are instantiated with the inference context mapper, as the inferred types may still contain references to the inference context's + // type variables via contextual projection. These are kept generic until all inferences are locked in, so the dependencies expressed can pass constraint checks. + typeArgumentTypes = instantiateTypes(inferTypeArguments(node, candidate, args, argCheckMode | CheckMode.SkipGenericFunctions, inferenceContext), inferenceContext.nonFixingMapper); argCheckMode |= inferenceContext.flags & InferenceFlags.SkippedGenericFunction ? CheckMode.SkipGenericFunctions : CheckMode.Normal; } checkCandidate = getSignatureInstantiation(candidate, typeArgumentTypes, isInJSFile(candidate.declaration), inferenceContext && inferenceContext.inferredTypeParameters); @@ -35039,7 +35086,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { else { checkCandidate = candidate; } - if (getSignatureApplicabilityError(node, args, checkCandidate, relation, argCheckMode, /*reportErrors*/ false, /*containingMessageChain*/ undefined)) { + if (getSignatureApplicabilityError(node, args, checkCandidate, relation, argCheckMode, /*reportErrors*/ false, /*containingMessageChain*/ undefined, inferenceContext)) { // Give preference to error candidates that have no rest parameters (as they are more specific) (candidatesForArgumentError || (candidatesForArgumentError = [])).push(checkCandidate); continue; @@ -35050,7 +35097,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // round of type inference and applicability checking for this particular candidate. argCheckMode = CheckMode.Normal; if (inferenceContext) { - const typeArgumentTypes = inferTypeArguments(node, candidate, args, argCheckMode, inferenceContext); + const typeArgumentTypes = instantiateTypes(inferTypeArguments(node, candidate, args, argCheckMode, inferenceContext), inferenceContext.mapper); checkCandidate = getSignatureInstantiation(candidate, typeArgumentTypes, isInJSFile(candidate.declaration), inferenceContext.inferredTypeParameters); // If the original signature has a generic rest type, instantiation may produce a // signature with different arity and we need to perform another arity check. @@ -35059,7 +35106,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { continue; } } - if (getSignatureApplicabilityError(node, args, checkCandidate, relation, argCheckMode, /*reportErrors*/ false, /*containingMessageChain*/ undefined)) { + if (getSignatureApplicabilityError(node, args, checkCandidate, relation, argCheckMode, /*reportErrors*/ false, /*containingMessageChain*/ undefined, inferenceContext)) { // Give preference to error candidates that have no rest parameters (as they are more specific) (candidatesForArgumentError || (candidatesForArgumentError = [])).push(checkCandidate); continue; @@ -39515,7 +39562,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } } - return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, context)); + // TODO: The signature may reference any outer inference contexts, but we map pop off and then apply new inference contexts, and thus get different inferred types. + // That this is cached on the *first* such attempt is not currently an issue, since expression types *also* get cached on the first pass. If we ever properly speculate, though, + // the cached "isolatedSignatureType" signature field absolutely needs to be included in the list of speculative caches. + return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, context), flatMap(inferenceContexts, c => c && map(c.inferences, i => i.typeParameter)).slice()); } } } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index fe828ad4a4529..6d948d7d5ce3f 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -6221,6 +6221,7 @@ export const enum ObjectFlags { ContainsSpread = 1 << 21, // Object literal contains spread operation ObjectRestType = 1 << 22, // Originates in object rest declaration InstantiationExpressionType = 1 << 23, // Originates in instantiation expression + SingleSignatureType = 1 << 27, // A single signature type extracted from a potentially broader type /** @internal */ IsClassInstanceClone = 1 << 24, // Type is a clone of a class instance type // Flags that require TypeFlags.Object and ObjectFlags.Reference @@ -6431,6 +6432,12 @@ export interface AnonymousType extends ObjectType { instantiations?: Map; // Instantiations of generic type alias (undefined if non-generic) } +/** @internal */ +// A SingleSignatureType may have bespoke outer type parameters to handle free type variable inferences +export interface SingleSignatureType extends AnonymousType { + outerTypeParameters?: TypeParameter[]; +} + /** @internal */ export interface InstantiationExpressionType extends AnonymousType { node: NodeWithTypeArguments; @@ -6716,6 +6723,8 @@ export interface Signature { isolatedSignatureType?: ObjectType; // A manufactured type that just contains the signature for purposes of signature comparison /** @internal */ instantiations?: Map; // Generic signature instantiation cache + /** @internal */ + implementationSignatureCache?: Signature; // Copy of the signature with fresh type parameters to use in checking the body of a potentially self-referential generic function (deferred) } export const enum IndexKind { diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 3c7a59ea0da74..442ea84640299 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -6598,6 +6598,7 @@ declare namespace ts { ContainsSpread = 2097152, ObjectRestType = 4194304, InstantiationExpressionType = 8388608, + SingleSignatureType = 134217728, } interface ObjectType extends Type { objectFlags: ObjectFlags; diff --git a/tests/baselines/reference/genericCallWithinOwnBodyCastTypeParameterIdentity.js b/tests/baselines/reference/genericCallWithinOwnBodyCastTypeParameterIdentity.js new file mode 100644 index 0000000000000..9c1884e53c471 --- /dev/null +++ b/tests/baselines/reference/genericCallWithinOwnBodyCastTypeParameterIdentity.js @@ -0,0 +1,52 @@ +//// [tests/cases/compiler/genericCallWithinOwnBodyCastTypeParameterIdentity.ts] //// + +//// [genericCallWithinOwnBodyCastTypeParameterIdentity.ts] +interface Thenable { + then( + onFulfilled: (value: Value) => V | Thenable, + ): Thenable; +} + +const toThenable = (fn: (input: Input) => Result | Thenable) => + (input: Input): Thenable => { + const result = fn(input) + return { + then(onFulfilled: (value: Result) => V | Thenable) { + return toThenable(onFulfilled)(result as Result) + } + }; + } + +const toThenableInferred = (fn: (input: Input) => Result | Thenable) => + (input: Input): Thenable => { + const result = fn(input) + return { + then(onFulfilled) { + return toThenableInferred(onFulfilled)(result as Result) + } + }; + } + + +//// [genericCallWithinOwnBodyCastTypeParameterIdentity.js] +"use strict"; +var toThenable = function (fn) { + return function (input) { + var result = fn(input); + return { + then: function (onFulfilled) { + return toThenable(onFulfilled)(result); + } + }; + }; +}; +var toThenableInferred = function (fn) { + return function (input) { + var result = fn(input); + return { + then: function (onFulfilled) { + return toThenableInferred(onFulfilled)(result); + } + }; + }; +}; diff --git a/tests/baselines/reference/genericCallWithinOwnBodyCastTypeParameterIdentity.symbols b/tests/baselines/reference/genericCallWithinOwnBodyCastTypeParameterIdentity.symbols new file mode 100644 index 0000000000000..7cbd117b09ffb --- /dev/null +++ b/tests/baselines/reference/genericCallWithinOwnBodyCastTypeParameterIdentity.symbols @@ -0,0 +1,104 @@ +//// [tests/cases/compiler/genericCallWithinOwnBodyCastTypeParameterIdentity.ts] //// + +=== genericCallWithinOwnBodyCastTypeParameterIdentity.ts === +interface Thenable { +>Thenable : Symbol(Thenable, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 0, 0)) +>Value : Symbol(Value, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 0, 19)) + + then( +>then : Symbol(Thenable.then, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 0, 27)) +>V : Symbol(V, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 1, 9)) + + onFulfilled: (value: Value) => V | Thenable, +>onFulfilled : Symbol(onFulfilled, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 1, 12)) +>value : Symbol(value, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 2, 22)) +>Value : Symbol(Value, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 0, 19)) +>V : Symbol(V, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 1, 9)) +>Thenable : Symbol(Thenable, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 0, 0)) +>V : Symbol(V, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 1, 9)) + + ): Thenable; +>Thenable : Symbol(Thenable, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 0, 0)) +>V : Symbol(V, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 1, 9)) +} + +const toThenable = (fn: (input: Input) => Result | Thenable) => +>toThenable : Symbol(toThenable, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 6, 5)) +>Result : Symbol(Result, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 6, 20)) +>Input : Symbol(Input, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 6, 27)) +>fn : Symbol(fn, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 6, 35)) +>input : Symbol(input, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 6, 40)) +>Input : Symbol(Input, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 6, 27)) +>Result : Symbol(Result, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 6, 20)) +>Thenable : Symbol(Thenable, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 0, 0)) +>Result : Symbol(Result, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 6, 20)) + + (input: Input): Thenable => { +>input : Symbol(input, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 7, 5)) +>Input : Symbol(Input, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 6, 27)) +>Thenable : Symbol(Thenable, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 0, 0)) +>Result : Symbol(Result, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 6, 20)) + + const result = fn(input) +>result : Symbol(result, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 8, 13)) +>fn : Symbol(fn, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 6, 35)) +>input : Symbol(input, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 7, 5)) + + return { + then(onFulfilled: (value: Result) => V | Thenable) { +>then : Symbol(then, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 9, 16)) +>V : Symbol(V, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 10, 17)) +>onFulfilled : Symbol(onFulfilled, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 10, 20)) +>value : Symbol(value, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 10, 34)) +>Result : Symbol(Result, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 6, 20)) +>V : Symbol(V, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 10, 17)) +>Thenable : Symbol(Thenable, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 0, 0)) +>V : Symbol(V, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 10, 17)) + + return toThenable(onFulfilled)(result as Result) +>toThenable : Symbol(toThenable, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 6, 5)) +>V : Symbol(V, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 10, 17)) +>Result : Symbol(Result, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 6, 20)) +>onFulfilled : Symbol(onFulfilled, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 10, 20)) +>result : Symbol(result, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 8, 13)) +>Result : Symbol(Result, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 6, 20)) + } + }; + } + +const toThenableInferred = (fn: (input: Input) => Result | Thenable) => +>toThenableInferred : Symbol(toThenableInferred, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 16, 5)) +>Result : Symbol(Result, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 16, 28)) +>Input : Symbol(Input, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 16, 35)) +>fn : Symbol(fn, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 16, 43)) +>input : Symbol(input, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 16, 48)) +>Input : Symbol(Input, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 16, 35)) +>Result : Symbol(Result, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 16, 28)) +>Thenable : Symbol(Thenable, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 0, 0)) +>Result : Symbol(Result, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 16, 28)) + + (input: Input): Thenable => { +>input : Symbol(input, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 17, 5)) +>Input : Symbol(Input, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 16, 35)) +>Thenable : Symbol(Thenable, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 0, 0)) +>Result : Symbol(Result, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 16, 28)) + + const result = fn(input) +>result : Symbol(result, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 18, 13)) +>fn : Symbol(fn, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 16, 43)) +>input : Symbol(input, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 17, 5)) + + return { + then(onFulfilled) { +>then : Symbol(then, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 19, 16)) +>onFulfilled : Symbol(onFulfilled, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 20, 17)) + + return toThenableInferred(onFulfilled)(result as Result) +>toThenableInferred : Symbol(toThenableInferred, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 16, 5)) +>onFulfilled : Symbol(onFulfilled, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 20, 17)) +>result : Symbol(result, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 18, 13)) +>Result : Symbol(Result, Decl(genericCallWithinOwnBodyCastTypeParameterIdentity.ts, 16, 28)) + } + }; + } + diff --git a/tests/baselines/reference/genericCallWithinOwnBodyCastTypeParameterIdentity.types b/tests/baselines/reference/genericCallWithinOwnBodyCastTypeParameterIdentity.types new file mode 100644 index 0000000000000..390177662069d --- /dev/null +++ b/tests/baselines/reference/genericCallWithinOwnBodyCastTypeParameterIdentity.types @@ -0,0 +1,83 @@ +//// [tests/cases/compiler/genericCallWithinOwnBodyCastTypeParameterIdentity.ts] //// + +=== genericCallWithinOwnBodyCastTypeParameterIdentity.ts === +interface Thenable { + then( +>then : (onFulfilled: (value: Value) => V | Thenable) => Thenable + + onFulfilled: (value: Value) => V | Thenable, +>onFulfilled : (value: Value) => V | Thenable +>value : Value + + ): Thenable; +} + +const toThenable = (fn: (input: Input) => Result | Thenable) => +>toThenable : (fn: (input: Input) => Result | Thenable) => (input: Input) => Thenable +>(fn: (input: Input) => Result | Thenable) => (input: Input): Thenable => { const result = fn(input) return { then(onFulfilled: (value: Result) => V | Thenable) { return toThenable(onFulfilled)(result as Result) } }; } : (fn: (input: Input) => Result | Thenable) => (input: Input) => Thenable +>fn : (input: Input) => Result | Thenable +>input : Input + + (input: Input): Thenable => { +>(input: Input): Thenable => { const result = fn(input) return { then(onFulfilled: (value: Result) => V | Thenable) { return toThenable(onFulfilled)(result as Result) } }; } : (input: Input) => Thenable +>input : Input + + const result = fn(input) +>result : Result | Thenable +>fn(input) : Result | Thenable +>fn : (input: Input) => Result | Thenable +>input : Input + + return { +>{ then(onFulfilled: (value: Result) => V | Thenable) { return toThenable(onFulfilled)(result as Result) } } : { then(onFulfilled: (value: Result) => V | Thenable): Thenable; } + + then(onFulfilled: (value: Result) => V | Thenable) { +>then : (onFulfilled: (value: Result) => V | Thenable) => Thenable +>onFulfilled : (value: Result) => V | Thenable +>value : Result + + return toThenable(onFulfilled)(result as Result) +>toThenable(onFulfilled)(result as Result) : Thenable +>toThenable(onFulfilled) : (input: Result) => Thenable +>toThenable : (fn: (input: Input) => Result | Thenable) => (input: Input) => Thenable +>onFulfilled : (value: Result) => V | Thenable +>result as Result : Result +>result : Result | Thenable + } + }; + } + +const toThenableInferred = (fn: (input: Input) => Result | Thenable) => +>toThenableInferred : (fn: (input: Input) => Result | Thenable) => (input: Input) => Thenable +>(fn: (input: Input) => Result | Thenable) => (input: Input): Thenable => { const result = fn(input) return { then(onFulfilled) { return toThenableInferred(onFulfilled)(result as Result) } }; } : (fn: (input: Input) => Result | Thenable) => (input: Input) => Thenable +>fn : (input: Input) => Result | Thenable +>input : Input + + (input: Input): Thenable => { +>(input: Input): Thenable => { const result = fn(input) return { then(onFulfilled) { return toThenableInferred(onFulfilled)(result as Result) } }; } : (input: Input) => Thenable +>input : Input + + const result = fn(input) +>result : Result | Thenable +>fn(input) : Result | Thenable +>fn : (input: Input) => Result | Thenable +>input : Input + + return { +>{ then(onFulfilled) { return toThenableInferred(onFulfilled)(result as Result) } } : { then(onFulfilled: (value: Result) => V | Thenable): Thenable; } + + then(onFulfilled) { +>then : (onFulfilled: (value: Result) => V | Thenable) => Thenable +>onFulfilled : (value: Result) => V | Thenable + + return toThenableInferred(onFulfilled)(result as Result) +>toThenableInferred(onFulfilled)(result as Result) : Thenable +>toThenableInferred(onFulfilled) : (input: Result) => Thenable +>toThenableInferred : (fn: (input: Input) => Result | Thenable) => (input: Input) => Thenable +>onFulfilled : (value: Result) => V | Thenable +>result as Result : Result +>result : Result | Thenable + } + }; + } + diff --git a/tests/baselines/reference/nestedGenericSpreadInference.js b/tests/baselines/reference/nestedGenericSpreadInference.js new file mode 100644 index 0000000000000..00bb4a558c2d4 --- /dev/null +++ b/tests/baselines/reference/nestedGenericSpreadInference.js @@ -0,0 +1,14 @@ +//// [tests/cases/compiler/nestedGenericSpreadInference.ts] //// + +//// [nestedGenericSpreadInference.ts] +declare function wrap(x: X): { x: X }; +declare function call(x: { x: (...args: A) => T }, ...args: A): T; + +// This should be of type `number` - ideally, it also would not error. +const leak = call(wrap((x: T) => x), 1); + + +//// [nestedGenericSpreadInference.js] +"use strict"; +// This should be of type `number` - ideally, it also would not error. +var leak = call(wrap(function (x) { return x; }), 1); diff --git a/tests/baselines/reference/nestedGenericSpreadInference.symbols b/tests/baselines/reference/nestedGenericSpreadInference.symbols new file mode 100644 index 0000000000000..bef06547b70ec --- /dev/null +++ b/tests/baselines/reference/nestedGenericSpreadInference.symbols @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/nestedGenericSpreadInference.ts] //// + +=== nestedGenericSpreadInference.ts === +declare function wrap(x: X): { x: X }; +>wrap : Symbol(wrap, Decl(nestedGenericSpreadInference.ts, 0, 0)) +>X : Symbol(X, Decl(nestedGenericSpreadInference.ts, 0, 22)) +>x : Symbol(x, Decl(nestedGenericSpreadInference.ts, 0, 25)) +>X : Symbol(X, Decl(nestedGenericSpreadInference.ts, 0, 22)) +>x : Symbol(x, Decl(nestedGenericSpreadInference.ts, 0, 33)) +>X : Symbol(X, Decl(nestedGenericSpreadInference.ts, 0, 22)) + +declare function call(x: { x: (...args: A) => T }, ...args: A): T; +>call : Symbol(call, Decl(nestedGenericSpreadInference.ts, 0, 41)) +>A : Symbol(A, Decl(nestedGenericSpreadInference.ts, 1, 22)) +>T : Symbol(T, Decl(nestedGenericSpreadInference.ts, 1, 42)) +>x : Symbol(x, Decl(nestedGenericSpreadInference.ts, 1, 46)) +>x : Symbol(x, Decl(nestedGenericSpreadInference.ts, 1, 50)) +>args : Symbol(args, Decl(nestedGenericSpreadInference.ts, 1, 55)) +>A : Symbol(A, Decl(nestedGenericSpreadInference.ts, 1, 22)) +>T : Symbol(T, Decl(nestedGenericSpreadInference.ts, 1, 42)) +>args : Symbol(args, Decl(nestedGenericSpreadInference.ts, 1, 74)) +>A : Symbol(A, Decl(nestedGenericSpreadInference.ts, 1, 22)) +>T : Symbol(T, Decl(nestedGenericSpreadInference.ts, 1, 42)) + +// This should be of type `number` - ideally, it also would not error. +const leak = call(wrap((x: T) => x), 1); +>leak : Symbol(leak, Decl(nestedGenericSpreadInference.ts, 4, 5)) +>call : Symbol(call, Decl(nestedGenericSpreadInference.ts, 0, 41)) +>wrap : Symbol(wrap, Decl(nestedGenericSpreadInference.ts, 0, 0)) +>T : Symbol(T, Decl(nestedGenericSpreadInference.ts, 4, 24)) +>x : Symbol(x, Decl(nestedGenericSpreadInference.ts, 4, 27)) +>T : Symbol(T, Decl(nestedGenericSpreadInference.ts, 4, 24)) +>x : Symbol(x, Decl(nestedGenericSpreadInference.ts, 4, 27)) + diff --git a/tests/baselines/reference/nestedGenericSpreadInference.types b/tests/baselines/reference/nestedGenericSpreadInference.types new file mode 100644 index 0000000000000..7d62f13b35347 --- /dev/null +++ b/tests/baselines/reference/nestedGenericSpreadInference.types @@ -0,0 +1,27 @@ +//// [tests/cases/compiler/nestedGenericSpreadInference.ts] //// + +=== nestedGenericSpreadInference.ts === +declare function wrap(x: X): { x: X }; +>wrap : (x: X) => { x: X;} +>x : X +>x : X + +declare function call(x: { x: (...args: A) => T }, ...args: A): T; +>call : (x: { x: (...args: A) => T; }, ...args: A) => T +>x : { x: (...args: A) => T; } +>x : (...args: A) => T +>args : A +>args : A + +// This should be of type `number` - ideally, it also would not error. +const leak = call(wrap((x: T) => x), 1); +>leak : number +>call(wrap((x: T) => x), 1) : number +>call : (x: { x: (...args: A) => T; }, ...args: A) => T +>wrap((x: T) => x) : { x: (x: A[0]) => A[0]; } +>wrap : (x: X) => { x: X; } +>(x: T) => x : (x: T) => T +>x : T +>x : T +>1 : 1 + diff --git a/tests/cases/compiler/genericCallWithinOwnBodyCastTypeParameterIdentity.ts b/tests/cases/compiler/genericCallWithinOwnBodyCastTypeParameterIdentity.ts new file mode 100644 index 0000000000000..97058662ae75d --- /dev/null +++ b/tests/cases/compiler/genericCallWithinOwnBodyCastTypeParameterIdentity.ts @@ -0,0 +1,26 @@ +// @strict: true +interface Thenable { + then( + onFulfilled: (value: Value) => V | Thenable, + ): Thenable; +} + +const toThenable = (fn: (input: Input) => Result | Thenable) => + (input: Input): Thenable => { + const result = fn(input) + return { + then(onFulfilled: (value: Result) => V | Thenable) { + return toThenable(onFulfilled)(result as Result) + } + }; + } + +const toThenableInferred = (fn: (input: Input) => Result | Thenable) => + (input: Input): Thenable => { + const result = fn(input) + return { + then(onFulfilled) { + return toThenableInferred(onFulfilled)(result as Result) + } + }; + } diff --git a/tests/cases/compiler/nestedGenericSpreadInference.ts b/tests/cases/compiler/nestedGenericSpreadInference.ts new file mode 100644 index 0000000000000..14e606f5f5cbf --- /dev/null +++ b/tests/cases/compiler/nestedGenericSpreadInference.ts @@ -0,0 +1,6 @@ +// @strict: true +declare function wrap(x: X): { x: X }; +declare function call(x: { x: (...args: A) => T }, ...args: A): T; + +// This should be of type `number` - ideally, it also would not error. +const leak = call(wrap((x: T) => x), 1); From a39c43cc7884dd923b12b3c75f6c0d6e3ce3c5dc Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Wed, 27 Mar 2024 10:23:12 -0700 Subject: [PATCH 5/9] Fix main baselines (#57962) --- tests/baselines/reference/genericFunctionInference1.types | 6 +++--- .../baselines/reference/nestedGenericSpreadInference.types | 2 +- tests/baselines/reference/promisePermutations.types | 2 +- tests/baselines/reference/promisePermutations2.types | 2 +- tests/baselines/reference/promisePermutations3.types | 2 +- tests/baselines/reference/promiseType.types | 2 +- tests/baselines/reference/propTypeValidatorInference.types | 2 +- tests/baselines/reference/recursiveConditionalTypes.types | 4 ++-- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/baselines/reference/genericFunctionInference1.types b/tests/baselines/reference/genericFunctionInference1.types index 558114547b464..69e6b7cc5a140 100644 --- a/tests/baselines/reference/genericFunctionInference1.types +++ b/tests/baselines/reference/genericFunctionInference1.types @@ -3,9 +3,9 @@ === Performance Stats === Subtype cache: 100 / 100 (nearest 100) Assignability cache: 200 / 200 (nearest 100) -Type Count: 1,200 / 1,300 (nearest 100) -Instantiation count: 1,500 / 1,500 (nearest 500) -Symbol count: 32,000 / 32,000 (nearest 500) +Type Count: 1,300 / 1,300 (nearest 100) +Instantiation count: 2,000 / 2,500 (nearest 500) +Symbol count: 32,500 / 33,000 (nearest 500) === genericFunctionInference1.ts === declare function pipe(ab: (...args: A) => B): (...args: A) => B; diff --git a/tests/baselines/reference/nestedGenericSpreadInference.types b/tests/baselines/reference/nestedGenericSpreadInference.types index 7d62f13b35347..d290eb064a363 100644 --- a/tests/baselines/reference/nestedGenericSpreadInference.types +++ b/tests/baselines/reference/nestedGenericSpreadInference.types @@ -7,7 +7,7 @@ declare function wrap(x: X): { x: X }; >x : X declare function call(x: { x: (...args: A) => T }, ...args: A): T; ->call : (x: { x: (...args: A) => T; }, ...args: A) => T +>call : (x: { x: (...args: A) => T;}, ...args: A) => T >x : { x: (...args: A) => T; } >x : (...args: A) => T >args : A diff --git a/tests/baselines/reference/promisePermutations.types b/tests/baselines/reference/promisePermutations.types index 527c34182528a..c6285ce98e789 100644 --- a/tests/baselines/reference/promisePermutations.types +++ b/tests/baselines/reference/promisePermutations.types @@ -4,7 +4,7 @@ Subtype cache: 400 / 400 (nearest 100) Assignability cache: 200 / 200 (nearest 100) Type Count: 1,700 / 1,800 (nearest 100) -Instantiation count: 6,500 / 6,500 (nearest 500) +Instantiation count: 7,000 / 7,000 (nearest 500) Symbol count: 28,000 / 28,000 (nearest 500) === promisePermutations.ts === diff --git a/tests/baselines/reference/promisePermutations2.types b/tests/baselines/reference/promisePermutations2.types index ad1985135e862..034f4f1913ae2 100644 --- a/tests/baselines/reference/promisePermutations2.types +++ b/tests/baselines/reference/promisePermutations2.types @@ -4,7 +4,7 @@ Subtype cache: 200 / 200 (nearest 100) Assignability cache: 200 / 200 (nearest 100) Type Count: 800 / 900 (nearest 100) -Instantiation count: 2,500 / 2,500 (nearest 500) +Instantiation count: 2,500 / 3,000 (nearest 500) Symbol count: 27,000 / 27,000 (nearest 500) === promisePermutations2.ts === diff --git a/tests/baselines/reference/promisePermutations3.types b/tests/baselines/reference/promisePermutations3.types index 9f7141ed48a61..ac2d8a3ed83d1 100644 --- a/tests/baselines/reference/promisePermutations3.types +++ b/tests/baselines/reference/promisePermutations3.types @@ -4,7 +4,7 @@ Subtype cache: 300 / 300 (nearest 100) Assignability cache: 200 / 200 (nearest 100) Type Count: 1,500 / 1,500 (nearest 100) -Instantiation count: 5,000 / 5,500 (nearest 500) +Instantiation count: 5,500 / 6,000 (nearest 500) Symbol count: 27,500 / 27,500 (nearest 500) === promisePermutations3.ts === diff --git a/tests/baselines/reference/promiseType.types b/tests/baselines/reference/promiseType.types index e749197829a0f..839fd7066ec4f 100644 --- a/tests/baselines/reference/promiseType.types +++ b/tests/baselines/reference/promiseType.types @@ -3,7 +3,7 @@ === Performance Stats === Assignability cache: 200 / 200 (nearest 100) Type Count: 700 / 700 (nearest 100) -Instantiation count: 1,500 / 1,500 (nearest 500) +Instantiation count: 2,000 / 2,000 (nearest 500) Symbol count: 28,000 / 28,000 (nearest 500) === promiseType.ts === diff --git a/tests/baselines/reference/propTypeValidatorInference.types b/tests/baselines/reference/propTypeValidatorInference.types index a83743938054c..f84efcb082bc8 100644 --- a/tests/baselines/reference/propTypeValidatorInference.types +++ b/tests/baselines/reference/propTypeValidatorInference.types @@ -3,7 +3,7 @@ === Performance Stats === Assignability cache: 100 / 100 (nearest 100) Type Count: 400 / 400 (nearest 100) -Instantiation count: 3,000 / 3,000 (nearest 500) +Instantiation count: 3,000 / 3,500 (nearest 500) Symbol count: 25,500 / 25,500 (nearest 500) === node_modules/prop-types/index.d.ts === diff --git a/tests/baselines/reference/recursiveConditionalTypes.types b/tests/baselines/reference/recursiveConditionalTypes.types index c7fb414c86c40..23921e4713aaf 100644 --- a/tests/baselines/reference/recursiveConditionalTypes.types +++ b/tests/baselines/reference/recursiveConditionalTypes.types @@ -3,8 +3,8 @@ === Performance Stats === Identity cache: 100 / 100 (nearest 100) Assignability cache: 300 / 300 (nearest 100) -Type Count: 507,600 / 507,900 (nearest 100) -Instantiation count: 524,000 / 524,500 (nearest 500) +Type Count: 507,700 / 507,900 (nearest 100) +Instantiation count: 524,500 / 524,500 (nearest 500) Symbol count: 1,072,500 / 1,073,000 (nearest 500) === recursiveConditionalTypes.ts === From 32a1370fa8d33eec5734331b3396f796a9b9c5cc Mon Sep 17 00:00:00 2001 From: Neil Bryson Date: Wed, 27 Mar 2024 18:38:11 +0100 Subject: [PATCH 6/9] Add missing parameters from Array.toLocaleString on ES2015 libs (#57679) --- src/lib/es2015.core.d.ts | 40 ++ src/lib/es2020.bigint.d.ts | 4 +- .../reference/arrayToLocaleStringES2015.js | 117 ++++ .../arrayToLocaleStringES2015.symbols | 306 +++++++++ .../reference/arrayToLocaleStringES2015.types | 473 ++++++++++++++ .../reference/arrayToLocaleStringES2020.js | 142 +++++ .../arrayToLocaleStringES2020.symbols | 374 +++++++++++ .../reference/arrayToLocaleStringES2020.types | 582 ++++++++++++++++++ .../arrayToLocaleStringES5.errors.txt | 125 ++++ .../reference/arrayToLocaleStringES5.js | 106 ++++ .../reference/arrayToLocaleStringES5.symbols | 270 ++++++++ .../reference/arrayToLocaleStringES5.types | 414 +++++++++++++ tests/baselines/reference/bigintIndex.symbols | 2 +- ...oChangeYourTargetLibraryES2016Plus.symbols | 2 +- .../reference/es2022SharedMemory.symbols | 4 +- .../reference/findLast(target=es2022).symbols | 36 +- .../reference/findLast(target=esnext).symbols | 36 +- .../reference/indexAt(target=es2021).symbols | 18 +- .../reference/indexAt(target=es2022).symbols | 18 +- .../reference/indexAt(target=esnext).symbols | 18 +- .../reference/jsxChildrenWrongType.types | 2 +- ...ithAsClauseAndLateBoundProperty.errors.txt | 4 +- ...TypeWithAsClauseAndLateBoundProperty.types | 6 +- ...edTypeWithAsClauseAndLateBoundProperty2.js | 12 +- ...ypeWithAsClauseAndLateBoundProperty2.types | 6 +- .../reference/templateLiteralTypes4.types | 2 +- .../reference/typedArrays-es6.symbols | 18 +- tests/baselines/reference/typedArrays.symbols | 198 +++--- .../typedArraysCrossAssignability01.symbols | 18 +- .../unionAndIntersectionInference3.types | 2 +- .../reference/valueOfTypedArray.symbols | 32 +- .../verifyDefaultLib_webworker.types | 2 +- .../compiler/arrayToLocaleStringES2015.ts | 63 ++ .../compiler/arrayToLocaleStringES2020.ts | 77 +++ .../cases/compiler/arrayToLocaleStringES5.ts | 57 ++ 35 files changed, 3369 insertions(+), 217 deletions(-) create mode 100644 tests/baselines/reference/arrayToLocaleStringES2015.js create mode 100644 tests/baselines/reference/arrayToLocaleStringES2015.symbols create mode 100644 tests/baselines/reference/arrayToLocaleStringES2015.types create mode 100644 tests/baselines/reference/arrayToLocaleStringES2020.js create mode 100644 tests/baselines/reference/arrayToLocaleStringES2020.symbols create mode 100644 tests/baselines/reference/arrayToLocaleStringES2020.types create mode 100644 tests/baselines/reference/arrayToLocaleStringES5.errors.txt create mode 100644 tests/baselines/reference/arrayToLocaleStringES5.js create mode 100644 tests/baselines/reference/arrayToLocaleStringES5.symbols create mode 100644 tests/baselines/reference/arrayToLocaleStringES5.types create mode 100644 tests/cases/compiler/arrayToLocaleStringES2015.ts create mode 100644 tests/cases/compiler/arrayToLocaleStringES2020.ts create mode 100644 tests/cases/compiler/arrayToLocaleStringES5.ts diff --git a/src/lib/es2015.core.d.ts b/src/lib/es2015.core.d.ts index 397e19639a3d9..fda087bb55126 100644 --- a/src/lib/es2015.core.d.ts +++ b/src/lib/es2015.core.d.ts @@ -42,6 +42,8 @@ interface Array { * @param end If not specified, length of the this object is used as its default value. */ copyWithin(target: number, start: number, end?: number): this; + + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } interface ArrayConstructor { @@ -342,6 +344,8 @@ interface ReadonlyArray { * predicate. If it is not provided, undefined is used instead. */ findIndex(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): number; + + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } interface RegExp { @@ -537,3 +541,39 @@ interface StringConstructor { */ raw(template: { raw: readonly string[] | ArrayLike; }, ...substitutions: any[]): string; } + +interface Int8Array { + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; +} + +interface Uint8Array { + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; +} + +interface Uint8ClampedArray { + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; +} + +interface Int16Array { + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; +} + +interface Uint16Array { + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; +} + +interface Int32Array { + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; +} + +interface Uint32Array { + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; +} + +interface Float32Array { + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; +} + +interface Float64Array { + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; +} diff --git a/src/lib/es2020.bigint.d.ts b/src/lib/es2020.bigint.d.ts index c2d3267e365e4..b4b46c7d9bb15 100644 --- a/src/lib/es2020.bigint.d.ts +++ b/src/lib/es2020.bigint.d.ts @@ -351,7 +351,7 @@ interface BigInt64Array { subarray(begin?: number, end?: number): BigInt64Array; /** Converts the array to a string by using the current locale. */ - toLocaleString(): string; + toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; /** Returns a string representation of the array. */ toString(): string; @@ -623,7 +623,7 @@ interface BigUint64Array { subarray(begin?: number, end?: number): BigUint64Array; /** Converts the array to a string by using the current locale. */ - toLocaleString(): string; + toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; /** Returns a string representation of the array. */ toString(): string; diff --git a/tests/baselines/reference/arrayToLocaleStringES2015.js b/tests/baselines/reference/arrayToLocaleStringES2015.js new file mode 100644 index 0000000000000..06a3af447db2e --- /dev/null +++ b/tests/baselines/reference/arrayToLocaleStringES2015.js @@ -0,0 +1,117 @@ +//// [tests/cases/compiler/arrayToLocaleStringES2015.ts] //// + +//// [arrayToLocaleStringES2015.ts] +let str: string; +const arr = [1, 2, 3]; +str = arr.toLocaleString(); // OK +str = arr.toLocaleString('en-US'); // OK +str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const dates: readonly Date[] = [new Date(), new Date()]; +str = dates.toLocaleString(); // OK +str = dates.toLocaleString('fr'); // OK +str = dates.toLocaleString('fr', { timeZone: 'UTC' }); // OK + +const mixed = [1, new Date(), 59782, new Date()]; +str = mixed.toLocaleString(); // OK +str = mixed.toLocaleString('fr'); // OK +str = mixed.toLocaleString('de', { style: 'currency', currency: 'EUR' }); // OK +str = (mixed as ReadonlyArray).toLocaleString('de', { currency: 'EUR', style: 'currency', timeZone: 'UTC' }); // OK + +const int8Array = new Int8Array(3); +str = int8Array.toLocaleString(); // OK +str = int8Array.toLocaleString('en-US'); // OK +str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const uint8Array = new Uint8Array(3); +str = uint8Array.toLocaleString(); // OK +str = uint8Array.toLocaleString('en-US'); // OK +str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const uint8ClampedArray = new Uint8ClampedArray(3); +str = uint8ClampedArray.toLocaleString(); // OK +str = uint8ClampedArray.toLocaleString('en-US'); // OK +str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const int16Array = new Int16Array(3); +str = int16Array.toLocaleString(); // OK +str = int16Array.toLocaleString('en-US'); // OK +str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const uint16Array = new Uint16Array(3); +str = uint16Array.toLocaleString(); // OK +str = uint16Array.toLocaleString('en-US'); // OK +str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const int32Array = new Int32Array(3); +str = int32Array.toLocaleString(); // OK +str = int32Array.toLocaleString('en-US'); // OK +str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const uint32Array = new Uint32Array(3); +str = uint32Array.toLocaleString(); // OK +str = uint32Array.toLocaleString('en-US'); // OK +str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const float32Array = new Float32Array(3); +str = float32Array.toLocaleString(); // OK +str = float32Array.toLocaleString('en-US'); // OK +str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const float64Array = new Float64Array(3); +str = float64Array.toLocaleString(); // OK +str = float64Array.toLocaleString('en-US'); // OK +str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + + +//// [arrayToLocaleStringES2015.js] +let str; +const arr = [1, 2, 3]; +str = arr.toLocaleString(); // OK +str = arr.toLocaleString('en-US'); // OK +str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +const dates = [new Date(), new Date()]; +str = dates.toLocaleString(); // OK +str = dates.toLocaleString('fr'); // OK +str = dates.toLocaleString('fr', { timeZone: 'UTC' }); // OK +const mixed = [1, new Date(), 59782, new Date()]; +str = mixed.toLocaleString(); // OK +str = mixed.toLocaleString('fr'); // OK +str = mixed.toLocaleString('de', { style: 'currency', currency: 'EUR' }); // OK +str = mixed.toLocaleString('de', { currency: 'EUR', style: 'currency', timeZone: 'UTC' }); // OK +const int8Array = new Int8Array(3); +str = int8Array.toLocaleString(); // OK +str = int8Array.toLocaleString('en-US'); // OK +str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +const uint8Array = new Uint8Array(3); +str = uint8Array.toLocaleString(); // OK +str = uint8Array.toLocaleString('en-US'); // OK +str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +const uint8ClampedArray = new Uint8ClampedArray(3); +str = uint8ClampedArray.toLocaleString(); // OK +str = uint8ClampedArray.toLocaleString('en-US'); // OK +str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +const int16Array = new Int16Array(3); +str = int16Array.toLocaleString(); // OK +str = int16Array.toLocaleString('en-US'); // OK +str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +const uint16Array = new Uint16Array(3); +str = uint16Array.toLocaleString(); // OK +str = uint16Array.toLocaleString('en-US'); // OK +str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +const int32Array = new Int32Array(3); +str = int32Array.toLocaleString(); // OK +str = int32Array.toLocaleString('en-US'); // OK +str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +const uint32Array = new Uint32Array(3); +str = uint32Array.toLocaleString(); // OK +str = uint32Array.toLocaleString('en-US'); // OK +str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +const float32Array = new Float32Array(3); +str = float32Array.toLocaleString(); // OK +str = float32Array.toLocaleString('en-US'); // OK +str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +const float64Array = new Float64Array(3); +str = float64Array.toLocaleString(); // OK +str = float64Array.toLocaleString('en-US'); // OK +str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK diff --git a/tests/baselines/reference/arrayToLocaleStringES2015.symbols b/tests/baselines/reference/arrayToLocaleStringES2015.symbols new file mode 100644 index 0000000000000..21e366c11d5af --- /dev/null +++ b/tests/baselines/reference/arrayToLocaleStringES2015.symbols @@ -0,0 +1,306 @@ +//// [tests/cases/compiler/arrayToLocaleStringES2015.ts] //// + +=== arrayToLocaleStringES2015.ts === +let str: string; +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) + +const arr = [1, 2, 3]; +>arr : Symbol(arr, Decl(arrayToLocaleStringES2015.ts, 1, 5)) + +str = arr.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>arr.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>arr : Symbol(arr, Decl(arrayToLocaleStringES2015.ts, 1, 5)) +>toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = arr.toLocaleString('en-US'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>arr.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>arr : Symbol(arr, Decl(arrayToLocaleStringES2015.ts, 1, 5)) +>toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>arr.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>arr : Symbol(arr, Decl(arrayToLocaleStringES2015.ts, 1, 5)) +>toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES2015.ts, 4, 35)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2015.ts, 4, 54)) + +const dates: readonly Date[] = [new Date(), new Date()]; +>dates : Symbol(dates, Decl(arrayToLocaleStringES2015.ts, 6, 5)) +>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) + +str = dates.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>dates.toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>dates : Symbol(dates, Decl(arrayToLocaleStringES2015.ts, 6, 5)) +>toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = dates.toLocaleString('fr'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>dates.toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>dates : Symbol(dates, Decl(arrayToLocaleStringES2015.ts, 6, 5)) +>toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = dates.toLocaleString('fr', { timeZone: 'UTC' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>dates.toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>dates : Symbol(dates, Decl(arrayToLocaleStringES2015.ts, 6, 5)) +>toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>timeZone : Symbol(timeZone, Decl(arrayToLocaleStringES2015.ts, 9, 34)) + +const mixed = [1, new Date(), 59782, new Date()]; +>mixed : Symbol(mixed, Decl(arrayToLocaleStringES2015.ts, 11, 5)) +>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) + +str = mixed.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>mixed.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>mixed : Symbol(mixed, Decl(arrayToLocaleStringES2015.ts, 11, 5)) +>toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = mixed.toLocaleString('fr'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>mixed.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>mixed : Symbol(mixed, Decl(arrayToLocaleStringES2015.ts, 11, 5)) +>toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = mixed.toLocaleString('de', { style: 'currency', currency: 'EUR' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>mixed.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>mixed : Symbol(mixed, Decl(arrayToLocaleStringES2015.ts, 11, 5)) +>toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES2015.ts, 14, 34)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2015.ts, 14, 53)) + +str = (mixed as ReadonlyArray).toLocaleString('de', { currency: 'EUR', style: 'currency', timeZone: 'UTC' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>(mixed as ReadonlyArray).toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>mixed : Symbol(mixed, Decl(arrayToLocaleStringES2015.ts, 11, 5)) +>ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2015.ts, 15, 68)) +>style : Symbol(style, Decl(arrayToLocaleStringES2015.ts, 15, 85)) +>timeZone : Symbol(timeZone, Decl(arrayToLocaleStringES2015.ts, 15, 104)) + +const int8Array = new Int8Array(3); +>int8Array : Symbol(int8Array, Decl(arrayToLocaleStringES2015.ts, 17, 5)) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) + +str = int8Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>int8Array.toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>int8Array : Symbol(int8Array, Decl(arrayToLocaleStringES2015.ts, 17, 5)) +>toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = int8Array.toLocaleString('en-US'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>int8Array.toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>int8Array : Symbol(int8Array, Decl(arrayToLocaleStringES2015.ts, 17, 5)) +>toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>int8Array.toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>int8Array : Symbol(int8Array, Decl(arrayToLocaleStringES2015.ts, 17, 5)) +>toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES2015.ts, 20, 41)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2015.ts, 20, 60)) + +const uint8Array = new Uint8Array(3); +>uint8Array : Symbol(uint8Array, Decl(arrayToLocaleStringES2015.ts, 22, 5)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) + +str = uint8Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>uint8Array.toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>uint8Array : Symbol(uint8Array, Decl(arrayToLocaleStringES2015.ts, 22, 5)) +>toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = uint8Array.toLocaleString('en-US'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>uint8Array.toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>uint8Array : Symbol(uint8Array, Decl(arrayToLocaleStringES2015.ts, 22, 5)) +>toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>uint8Array.toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>uint8Array : Symbol(uint8Array, Decl(arrayToLocaleStringES2015.ts, 22, 5)) +>toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES2015.ts, 25, 42)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2015.ts, 25, 61)) + +const uint8ClampedArray = new Uint8ClampedArray(3); +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayToLocaleStringES2015.ts, 27, 5)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) + +str = uint8ClampedArray.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>uint8ClampedArray.toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayToLocaleStringES2015.ts, 27, 5)) +>toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = uint8ClampedArray.toLocaleString('en-US'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>uint8ClampedArray.toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayToLocaleStringES2015.ts, 27, 5)) +>toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>uint8ClampedArray.toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayToLocaleStringES2015.ts, 27, 5)) +>toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES2015.ts, 30, 49)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2015.ts, 30, 68)) + +const int16Array = new Int16Array(3); +>int16Array : Symbol(int16Array, Decl(arrayToLocaleStringES2015.ts, 32, 5)) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) + +str = int16Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>int16Array.toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>int16Array : Symbol(int16Array, Decl(arrayToLocaleStringES2015.ts, 32, 5)) +>toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = int16Array.toLocaleString('en-US'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>int16Array.toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>int16Array : Symbol(int16Array, Decl(arrayToLocaleStringES2015.ts, 32, 5)) +>toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>int16Array.toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>int16Array : Symbol(int16Array, Decl(arrayToLocaleStringES2015.ts, 32, 5)) +>toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES2015.ts, 35, 42)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2015.ts, 35, 61)) + +const uint16Array = new Uint16Array(3); +>uint16Array : Symbol(uint16Array, Decl(arrayToLocaleStringES2015.ts, 37, 5)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) + +str = uint16Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>uint16Array.toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>uint16Array : Symbol(uint16Array, Decl(arrayToLocaleStringES2015.ts, 37, 5)) +>toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = uint16Array.toLocaleString('en-US'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>uint16Array.toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>uint16Array : Symbol(uint16Array, Decl(arrayToLocaleStringES2015.ts, 37, 5)) +>toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>uint16Array.toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>uint16Array : Symbol(uint16Array, Decl(arrayToLocaleStringES2015.ts, 37, 5)) +>toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES2015.ts, 40, 43)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2015.ts, 40, 62)) + +const int32Array = new Int32Array(3); +>int32Array : Symbol(int32Array, Decl(arrayToLocaleStringES2015.ts, 42, 5)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) + +str = int32Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>int32Array.toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>int32Array : Symbol(int32Array, Decl(arrayToLocaleStringES2015.ts, 42, 5)) +>toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = int32Array.toLocaleString('en-US'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>int32Array.toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>int32Array : Symbol(int32Array, Decl(arrayToLocaleStringES2015.ts, 42, 5)) +>toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>int32Array.toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>int32Array : Symbol(int32Array, Decl(arrayToLocaleStringES2015.ts, 42, 5)) +>toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES2015.ts, 45, 42)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2015.ts, 45, 61)) + +const uint32Array = new Uint32Array(3); +>uint32Array : Symbol(uint32Array, Decl(arrayToLocaleStringES2015.ts, 47, 5)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) + +str = uint32Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>uint32Array.toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>uint32Array : Symbol(uint32Array, Decl(arrayToLocaleStringES2015.ts, 47, 5)) +>toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = uint32Array.toLocaleString('en-US'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>uint32Array.toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>uint32Array : Symbol(uint32Array, Decl(arrayToLocaleStringES2015.ts, 47, 5)) +>toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>uint32Array.toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>uint32Array : Symbol(uint32Array, Decl(arrayToLocaleStringES2015.ts, 47, 5)) +>toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES2015.ts, 50, 43)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2015.ts, 50, 62)) + +const float32Array = new Float32Array(3); +>float32Array : Symbol(float32Array, Decl(arrayToLocaleStringES2015.ts, 52, 5)) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) + +str = float32Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>float32Array.toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>float32Array : Symbol(float32Array, Decl(arrayToLocaleStringES2015.ts, 52, 5)) +>toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = float32Array.toLocaleString('en-US'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>float32Array.toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>float32Array : Symbol(float32Array, Decl(arrayToLocaleStringES2015.ts, 52, 5)) +>toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>float32Array.toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>float32Array : Symbol(float32Array, Decl(arrayToLocaleStringES2015.ts, 52, 5)) +>toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES2015.ts, 55, 44)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2015.ts, 55, 63)) + +const float64Array = new Float64Array(3); +>float64Array : Symbol(float64Array, Decl(arrayToLocaleStringES2015.ts, 57, 5)) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) + +str = float64Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>float64Array.toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>float64Array : Symbol(float64Array, Decl(arrayToLocaleStringES2015.ts, 57, 5)) +>toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = float64Array.toLocaleString('en-US'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>float64Array.toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>float64Array : Symbol(float64Array, Decl(arrayToLocaleStringES2015.ts, 57, 5)) +>toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2015.ts, 0, 3)) +>float64Array.toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>float64Array : Symbol(float64Array, Decl(arrayToLocaleStringES2015.ts, 57, 5)) +>toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES2015.ts, 60, 44)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2015.ts, 60, 63)) + diff --git a/tests/baselines/reference/arrayToLocaleStringES2015.types b/tests/baselines/reference/arrayToLocaleStringES2015.types new file mode 100644 index 0000000000000..972e434e74fa0 --- /dev/null +++ b/tests/baselines/reference/arrayToLocaleStringES2015.types @@ -0,0 +1,473 @@ +//// [tests/cases/compiler/arrayToLocaleStringES2015.ts] //// + +=== arrayToLocaleStringES2015.ts === +let str: string; +>str : string + +const arr = [1, 2, 3]; +>arr : number[] +>[1, 2, 3] : number[] +>1 : 1 +>2 : 2 +>3 : 3 + +str = arr.toLocaleString(); // OK +>str = arr.toLocaleString() : string +>str : string +>arr.toLocaleString() : string +>arr.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>arr : number[] +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } + +str = arr.toLocaleString('en-US'); // OK +>str = arr.toLocaleString('en-US') : string +>str : string +>arr.toLocaleString('en-US') : string +>arr.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>arr : number[] +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>'en-US' : "en-US" + +str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>arr.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>arr : number[] +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +>style : "currency" +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const dates: readonly Date[] = [new Date(), new Date()]; +>dates : readonly Date[] +>[new Date(), new Date()] : Date[] +>new Date() : Date +>Date : DateConstructor +>new Date() : Date +>Date : DateConstructor + +str = dates.toLocaleString(); // OK +>str = dates.toLocaleString() : string +>str : string +>dates.toLocaleString() : string +>dates.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>dates : readonly Date[] +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } + +str = dates.toLocaleString('fr'); // OK +>str = dates.toLocaleString('fr') : string +>str : string +>dates.toLocaleString('fr') : string +>dates.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>dates : readonly Date[] +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>'fr' : "fr" + +str = dates.toLocaleString('fr', { timeZone: 'UTC' }); // OK +>str = dates.toLocaleString('fr', { timeZone: 'UTC' }) : string +>str : string +>dates.toLocaleString('fr', { timeZone: 'UTC' }) : string +>dates.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>dates : readonly Date[] +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>'fr' : "fr" +>{ timeZone: 'UTC' } : { timeZone: string; } +>timeZone : string +>'UTC' : "UTC" + +const mixed = [1, new Date(), 59782, new Date()]; +>mixed : (number | Date)[] +>[1, new Date(), 59782, new Date()] : (number | Date)[] +>1 : 1 +>new Date() : Date +>Date : DateConstructor +>59782 : 59782 +>new Date() : Date +>Date : DateConstructor + +str = mixed.toLocaleString(); // OK +>str = mixed.toLocaleString() : string +>str : string +>mixed.toLocaleString() : string +>mixed.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>mixed : (number | Date)[] +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } + +str = mixed.toLocaleString('fr'); // OK +>str = mixed.toLocaleString('fr') : string +>str : string +>mixed.toLocaleString('fr') : string +>mixed.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>mixed : (number | Date)[] +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>'fr' : "fr" + +str = mixed.toLocaleString('de', { style: 'currency', currency: 'EUR' }); // OK +>str = mixed.toLocaleString('de', { style: 'currency', currency: 'EUR' }) : string +>str : string +>mixed.toLocaleString('de', { style: 'currency', currency: 'EUR' }) : string +>mixed.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>mixed : (number | Date)[] +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>'de' : "de" +>{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +>style : "currency" +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +str = (mixed as ReadonlyArray).toLocaleString('de', { currency: 'EUR', style: 'currency', timeZone: 'UTC' }); // OK +>str = (mixed as ReadonlyArray).toLocaleString('de', { currency: 'EUR', style: 'currency', timeZone: 'UTC' }) : string +>str : string +>(mixed as ReadonlyArray).toLocaleString('de', { currency: 'EUR', style: 'currency', timeZone: 'UTC' }) : string +>(mixed as ReadonlyArray).toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>(mixed as ReadonlyArray) : readonly (number | Date)[] +>mixed as ReadonlyArray : readonly (number | Date)[] +>mixed : (number | Date)[] +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>'de' : "de" +>{ currency: 'EUR', style: 'currency', timeZone: 'UTC' } : { currency: string; style: "currency"; timeZone: string; } +>currency : string +>'EUR' : "EUR" +>style : "currency" +>'currency' : "currency" +>timeZone : string +>'UTC' : "UTC" + +const int8Array = new Int8Array(3); +>int8Array : Int8Array +>new Int8Array(3) : Int8Array +>Int8Array : Int8ArrayConstructor +>3 : 3 + +str = int8Array.toLocaleString(); // OK +>str = int8Array.toLocaleString() : string +>str : string +>int8Array.toLocaleString() : string +>int8Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>int8Array : Int8Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } + +str = int8Array.toLocaleString('en-US'); // OK +>str = int8Array.toLocaleString('en-US') : string +>str : string +>int8Array.toLocaleString('en-US') : string +>int8Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>int8Array : Int8Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" + +str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>int8Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>int8Array : Int8Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +>style : "currency" +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const uint8Array = new Uint8Array(3); +>uint8Array : Uint8Array +>new Uint8Array(3) : Uint8Array +>Uint8Array : Uint8ArrayConstructor +>3 : 3 + +str = uint8Array.toLocaleString(); // OK +>str = uint8Array.toLocaleString() : string +>str : string +>uint8Array.toLocaleString() : string +>uint8Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>uint8Array : Uint8Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } + +str = uint8Array.toLocaleString('en-US'); // OK +>str = uint8Array.toLocaleString('en-US') : string +>str : string +>uint8Array.toLocaleString('en-US') : string +>uint8Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>uint8Array : Uint8Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" + +str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>uint8Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>uint8Array : Uint8Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +>style : "currency" +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const uint8ClampedArray = new Uint8ClampedArray(3); +>uint8ClampedArray : Uint8ClampedArray +>new Uint8ClampedArray(3) : Uint8ClampedArray +>Uint8ClampedArray : Uint8ClampedArrayConstructor +>3 : 3 + +str = uint8ClampedArray.toLocaleString(); // OK +>str = uint8ClampedArray.toLocaleString() : string +>str : string +>uint8ClampedArray.toLocaleString() : string +>uint8ClampedArray.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>uint8ClampedArray : Uint8ClampedArray +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } + +str = uint8ClampedArray.toLocaleString('en-US'); // OK +>str = uint8ClampedArray.toLocaleString('en-US') : string +>str : string +>uint8ClampedArray.toLocaleString('en-US') : string +>uint8ClampedArray.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>uint8ClampedArray : Uint8ClampedArray +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" + +str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>uint8ClampedArray.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>uint8ClampedArray : Uint8ClampedArray +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +>style : "currency" +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const int16Array = new Int16Array(3); +>int16Array : Int16Array +>new Int16Array(3) : Int16Array +>Int16Array : Int16ArrayConstructor +>3 : 3 + +str = int16Array.toLocaleString(); // OK +>str = int16Array.toLocaleString() : string +>str : string +>int16Array.toLocaleString() : string +>int16Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>int16Array : Int16Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } + +str = int16Array.toLocaleString('en-US'); // OK +>str = int16Array.toLocaleString('en-US') : string +>str : string +>int16Array.toLocaleString('en-US') : string +>int16Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>int16Array : Int16Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" + +str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>int16Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>int16Array : Int16Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +>style : "currency" +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const uint16Array = new Uint16Array(3); +>uint16Array : Uint16Array +>new Uint16Array(3) : Uint16Array +>Uint16Array : Uint16ArrayConstructor +>3 : 3 + +str = uint16Array.toLocaleString(); // OK +>str = uint16Array.toLocaleString() : string +>str : string +>uint16Array.toLocaleString() : string +>uint16Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>uint16Array : Uint16Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } + +str = uint16Array.toLocaleString('en-US'); // OK +>str = uint16Array.toLocaleString('en-US') : string +>str : string +>uint16Array.toLocaleString('en-US') : string +>uint16Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>uint16Array : Uint16Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" + +str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>uint16Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>uint16Array : Uint16Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +>style : "currency" +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const int32Array = new Int32Array(3); +>int32Array : Int32Array +>new Int32Array(3) : Int32Array +>Int32Array : Int32ArrayConstructor +>3 : 3 + +str = int32Array.toLocaleString(); // OK +>str = int32Array.toLocaleString() : string +>str : string +>int32Array.toLocaleString() : string +>int32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>int32Array : Int32Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } + +str = int32Array.toLocaleString('en-US'); // OK +>str = int32Array.toLocaleString('en-US') : string +>str : string +>int32Array.toLocaleString('en-US') : string +>int32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>int32Array : Int32Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" + +str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>int32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>int32Array : Int32Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +>style : "currency" +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const uint32Array = new Uint32Array(3); +>uint32Array : Uint32Array +>new Uint32Array(3) : Uint32Array +>Uint32Array : Uint32ArrayConstructor +>3 : 3 + +str = uint32Array.toLocaleString(); // OK +>str = uint32Array.toLocaleString() : string +>str : string +>uint32Array.toLocaleString() : string +>uint32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>uint32Array : Uint32Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } + +str = uint32Array.toLocaleString('en-US'); // OK +>str = uint32Array.toLocaleString('en-US') : string +>str : string +>uint32Array.toLocaleString('en-US') : string +>uint32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>uint32Array : Uint32Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" + +str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>uint32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>uint32Array : Uint32Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +>style : "currency" +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const float32Array = new Float32Array(3); +>float32Array : Float32Array +>new Float32Array(3) : Float32Array +>Float32Array : Float32ArrayConstructor +>3 : 3 + +str = float32Array.toLocaleString(); // OK +>str = float32Array.toLocaleString() : string +>str : string +>float32Array.toLocaleString() : string +>float32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>float32Array : Float32Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } + +str = float32Array.toLocaleString('en-US'); // OK +>str = float32Array.toLocaleString('en-US') : string +>str : string +>float32Array.toLocaleString('en-US') : string +>float32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>float32Array : Float32Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" + +str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>float32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>float32Array : Float32Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +>style : "currency" +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const float64Array = new Float64Array(3); +>float64Array : Float64Array +>new Float64Array(3) : Float64Array +>Float64Array : Float64ArrayConstructor +>3 : 3 + +str = float64Array.toLocaleString(); // OK +>str = float64Array.toLocaleString() : string +>str : string +>float64Array.toLocaleString() : string +>float64Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>float64Array : Float64Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } + +str = float64Array.toLocaleString('en-US'); // OK +>str = float64Array.toLocaleString('en-US') : string +>str : string +>float64Array.toLocaleString('en-US') : string +>float64Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>float64Array : Float64Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" + +str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>float64Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>float64Array : Float64Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +>style : "currency" +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + diff --git a/tests/baselines/reference/arrayToLocaleStringES2020.js b/tests/baselines/reference/arrayToLocaleStringES2020.js new file mode 100644 index 0000000000000..7273c07e77367 --- /dev/null +++ b/tests/baselines/reference/arrayToLocaleStringES2020.js @@ -0,0 +1,142 @@ +//// [tests/cases/compiler/arrayToLocaleStringES2020.ts] //// + +//// [arrayToLocaleStringES2020.ts] +let str: string; +const arr = [1, 2, 3]; +str = arr.toLocaleString(); // OK +str = arr.toLocaleString('en-US'); // OK +str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const dates: readonly Date[] = [new Date(), new Date()]; +str = dates.toLocaleString(); // OK +str = dates.toLocaleString('fr'); // OK +str = dates.toLocaleString('fr', { timeZone: 'UTC' }); // OK + +const mixed = [1, new Date(), 59782, new Date()]; +str = mixed.toLocaleString(); // OK +str = mixed.toLocaleString('de', { style: 'currency', currency: 'EUR' }); // OK +str = (mixed as ReadonlyArray).toLocaleString('de', { currency: 'EUR', style: 'currency', timeZone: 'UTC' }); // OK + +const bigInts = [BigInt(1), BigInt(2), BigInt(3)]; +str = bigInts.toLocaleString(); // OK +str = bigInts.toLocaleString('en-US'); // OK +str = bigInts.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const int8Array = new Int8Array(3); +str = int8Array.toLocaleString(); // OK +str = int8Array.toLocaleString('en-US'); // OK +str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const uint8Array = new Uint8Array(3); +str = uint8Array.toLocaleString(); // OK +str = uint8Array.toLocaleString('en-US'); // OK +str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const uint8ClampedArray = new Uint8ClampedArray(3); +str = uint8ClampedArray.toLocaleString(); // OK +str = uint8ClampedArray.toLocaleString('en-US'); // OK +str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const int16Array = new Int16Array(3); +str = int16Array.toLocaleString(); // OK +str = int16Array.toLocaleString('en-US'); // OK +str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const uint16Array = new Uint16Array(3); +str = uint16Array.toLocaleString(); // OK +str = uint16Array.toLocaleString('en-US'); // OK +str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const int32Array = new Int32Array(3); +str = int32Array.toLocaleString(); // OK +str = int32Array.toLocaleString('en-US'); // OK +str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const uint32Array = new Uint32Array(3); +str = uint32Array.toLocaleString(); // OK +str = uint32Array.toLocaleString('en-US'); // OK +str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const float32Array = new Float32Array(3); +str = float32Array.toLocaleString(); // OK +str = float32Array.toLocaleString('en-US'); // OK +str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const float64Array = new Float64Array(3); +str = float64Array.toLocaleString(); // OK +str = float64Array.toLocaleString('en-US'); // OK +str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const bigInt64Array = new BigInt64Array(3); +str = bigInt64Array.toLocaleString(); // OK +str = bigInt64Array.toLocaleString('en-US'); // OK +str = bigInt64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const bigIntUint64Array = new BigUint64Array(3); +str = bigIntUint64Array.toLocaleString(); // OK +str = bigIntUint64Array.toLocaleString('en-US'); // OK +str = bigIntUint64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + + +//// [arrayToLocaleStringES2020.js] +let str; +const arr = [1, 2, 3]; +str = arr.toLocaleString(); // OK +str = arr.toLocaleString('en-US'); // OK +str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +const dates = [new Date(), new Date()]; +str = dates.toLocaleString(); // OK +str = dates.toLocaleString('fr'); // OK +str = dates.toLocaleString('fr', { timeZone: 'UTC' }); // OK +const mixed = [1, new Date(), 59782, new Date()]; +str = mixed.toLocaleString(); // OK +str = mixed.toLocaleString('de', { style: 'currency', currency: 'EUR' }); // OK +str = mixed.toLocaleString('de', { currency: 'EUR', style: 'currency', timeZone: 'UTC' }); // OK +const bigInts = [BigInt(1), BigInt(2), BigInt(3)]; +str = bigInts.toLocaleString(); // OK +str = bigInts.toLocaleString('en-US'); // OK +str = bigInts.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +const int8Array = new Int8Array(3); +str = int8Array.toLocaleString(); // OK +str = int8Array.toLocaleString('en-US'); // OK +str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +const uint8Array = new Uint8Array(3); +str = uint8Array.toLocaleString(); // OK +str = uint8Array.toLocaleString('en-US'); // OK +str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +const uint8ClampedArray = new Uint8ClampedArray(3); +str = uint8ClampedArray.toLocaleString(); // OK +str = uint8ClampedArray.toLocaleString('en-US'); // OK +str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +const int16Array = new Int16Array(3); +str = int16Array.toLocaleString(); // OK +str = int16Array.toLocaleString('en-US'); // OK +str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +const uint16Array = new Uint16Array(3); +str = uint16Array.toLocaleString(); // OK +str = uint16Array.toLocaleString('en-US'); // OK +str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +const int32Array = new Int32Array(3); +str = int32Array.toLocaleString(); // OK +str = int32Array.toLocaleString('en-US'); // OK +str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +const uint32Array = new Uint32Array(3); +str = uint32Array.toLocaleString(); // OK +str = uint32Array.toLocaleString('en-US'); // OK +str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +const float32Array = new Float32Array(3); +str = float32Array.toLocaleString(); // OK +str = float32Array.toLocaleString('en-US'); // OK +str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +const float64Array = new Float64Array(3); +str = float64Array.toLocaleString(); // OK +str = float64Array.toLocaleString('en-US'); // OK +str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +const bigInt64Array = new BigInt64Array(3); +str = bigInt64Array.toLocaleString(); // OK +str = bigInt64Array.toLocaleString('en-US'); // OK +str = bigInt64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +const bigIntUint64Array = new BigUint64Array(3); +str = bigIntUint64Array.toLocaleString(); // OK +str = bigIntUint64Array.toLocaleString('en-US'); // OK +str = bigIntUint64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK diff --git a/tests/baselines/reference/arrayToLocaleStringES2020.symbols b/tests/baselines/reference/arrayToLocaleStringES2020.symbols new file mode 100644 index 0000000000000..dbf741f3b6449 --- /dev/null +++ b/tests/baselines/reference/arrayToLocaleStringES2020.symbols @@ -0,0 +1,374 @@ +//// [tests/cases/compiler/arrayToLocaleStringES2020.ts] //// + +=== arrayToLocaleStringES2020.ts === +let str: string; +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) + +const arr = [1, 2, 3]; +>arr : Symbol(arr, Decl(arrayToLocaleStringES2020.ts, 1, 5)) + +str = arr.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>arr.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>arr : Symbol(arr, Decl(arrayToLocaleStringES2020.ts, 1, 5)) +>toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = arr.toLocaleString('en-US'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>arr.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>arr : Symbol(arr, Decl(arrayToLocaleStringES2020.ts, 1, 5)) +>toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>arr.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>arr : Symbol(arr, Decl(arrayToLocaleStringES2020.ts, 1, 5)) +>toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES2020.ts, 4, 35)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2020.ts, 4, 54)) + +const dates: readonly Date[] = [new Date(), new Date()]; +>dates : Symbol(dates, Decl(arrayToLocaleStringES2020.ts, 6, 5)) +>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) +>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) +>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) + +str = dates.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>dates.toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>dates : Symbol(dates, Decl(arrayToLocaleStringES2020.ts, 6, 5)) +>toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = dates.toLocaleString('fr'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>dates.toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>dates : Symbol(dates, Decl(arrayToLocaleStringES2020.ts, 6, 5)) +>toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = dates.toLocaleString('fr', { timeZone: 'UTC' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>dates.toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>dates : Symbol(dates, Decl(arrayToLocaleStringES2020.ts, 6, 5)) +>toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>timeZone : Symbol(timeZone, Decl(arrayToLocaleStringES2020.ts, 9, 34)) + +const mixed = [1, new Date(), 59782, new Date()]; +>mixed : Symbol(mixed, Decl(arrayToLocaleStringES2020.ts, 11, 5)) +>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) +>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) + +str = mixed.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>mixed.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>mixed : Symbol(mixed, Decl(arrayToLocaleStringES2020.ts, 11, 5)) +>toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = mixed.toLocaleString('de', { style: 'currency', currency: 'EUR' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>mixed.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>mixed : Symbol(mixed, Decl(arrayToLocaleStringES2020.ts, 11, 5)) +>toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES2020.ts, 13, 34)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2020.ts, 13, 53)) + +str = (mixed as ReadonlyArray).toLocaleString('de', { currency: 'EUR', style: 'currency', timeZone: 'UTC' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>(mixed as ReadonlyArray).toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>mixed : Symbol(mixed, Decl(arrayToLocaleStringES2020.ts, 11, 5)) +>ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) +>toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2020.ts, 14, 68)) +>style : Symbol(style, Decl(arrayToLocaleStringES2020.ts, 14, 85)) +>timeZone : Symbol(timeZone, Decl(arrayToLocaleStringES2020.ts, 14, 104)) + +const bigInts = [BigInt(1), BigInt(2), BigInt(3)]; +>bigInts : Symbol(bigInts, Decl(arrayToLocaleStringES2020.ts, 16, 5)) +>BigInt : Symbol(BigInt, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --)) +>BigInt : Symbol(BigInt, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --)) +>BigInt : Symbol(BigInt, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --)) + +str = bigInts.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>bigInts.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>bigInts : Symbol(bigInts, Decl(arrayToLocaleStringES2020.ts, 16, 5)) +>toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = bigInts.toLocaleString('en-US'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>bigInts.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>bigInts : Symbol(bigInts, Decl(arrayToLocaleStringES2020.ts, 16, 5)) +>toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = bigInts.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>bigInts.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>bigInts : Symbol(bigInts, Decl(arrayToLocaleStringES2020.ts, 16, 5)) +>toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES2020.ts, 19, 39)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2020.ts, 19, 58)) + +const int8Array = new Int8Array(3); +>int8Array : Symbol(int8Array, Decl(arrayToLocaleStringES2020.ts, 21, 5)) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) + +str = int8Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>int8Array.toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>int8Array : Symbol(int8Array, Decl(arrayToLocaleStringES2020.ts, 21, 5)) +>toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = int8Array.toLocaleString('en-US'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>int8Array.toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>int8Array : Symbol(int8Array, Decl(arrayToLocaleStringES2020.ts, 21, 5)) +>toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>int8Array.toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>int8Array : Symbol(int8Array, Decl(arrayToLocaleStringES2020.ts, 21, 5)) +>toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES2020.ts, 24, 41)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2020.ts, 24, 60)) + +const uint8Array = new Uint8Array(3); +>uint8Array : Symbol(uint8Array, Decl(arrayToLocaleStringES2020.ts, 26, 5)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) + +str = uint8Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>uint8Array.toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>uint8Array : Symbol(uint8Array, Decl(arrayToLocaleStringES2020.ts, 26, 5)) +>toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = uint8Array.toLocaleString('en-US'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>uint8Array.toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>uint8Array : Symbol(uint8Array, Decl(arrayToLocaleStringES2020.ts, 26, 5)) +>toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>uint8Array.toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>uint8Array : Symbol(uint8Array, Decl(arrayToLocaleStringES2020.ts, 26, 5)) +>toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES2020.ts, 29, 42)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2020.ts, 29, 61)) + +const uint8ClampedArray = new Uint8ClampedArray(3); +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayToLocaleStringES2020.ts, 31, 5)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) + +str = uint8ClampedArray.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>uint8ClampedArray.toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayToLocaleStringES2020.ts, 31, 5)) +>toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = uint8ClampedArray.toLocaleString('en-US'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>uint8ClampedArray.toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayToLocaleStringES2020.ts, 31, 5)) +>toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>uint8ClampedArray.toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayToLocaleStringES2020.ts, 31, 5)) +>toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES2020.ts, 34, 49)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2020.ts, 34, 68)) + +const int16Array = new Int16Array(3); +>int16Array : Symbol(int16Array, Decl(arrayToLocaleStringES2020.ts, 36, 5)) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) + +str = int16Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>int16Array.toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>int16Array : Symbol(int16Array, Decl(arrayToLocaleStringES2020.ts, 36, 5)) +>toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = int16Array.toLocaleString('en-US'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>int16Array.toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>int16Array : Symbol(int16Array, Decl(arrayToLocaleStringES2020.ts, 36, 5)) +>toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>int16Array.toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>int16Array : Symbol(int16Array, Decl(arrayToLocaleStringES2020.ts, 36, 5)) +>toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES2020.ts, 39, 42)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2020.ts, 39, 61)) + +const uint16Array = new Uint16Array(3); +>uint16Array : Symbol(uint16Array, Decl(arrayToLocaleStringES2020.ts, 41, 5)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) + +str = uint16Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>uint16Array.toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>uint16Array : Symbol(uint16Array, Decl(arrayToLocaleStringES2020.ts, 41, 5)) +>toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = uint16Array.toLocaleString('en-US'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>uint16Array.toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>uint16Array : Symbol(uint16Array, Decl(arrayToLocaleStringES2020.ts, 41, 5)) +>toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>uint16Array.toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>uint16Array : Symbol(uint16Array, Decl(arrayToLocaleStringES2020.ts, 41, 5)) +>toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES2020.ts, 44, 43)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2020.ts, 44, 62)) + +const int32Array = new Int32Array(3); +>int32Array : Symbol(int32Array, Decl(arrayToLocaleStringES2020.ts, 46, 5)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) + +str = int32Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>int32Array.toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>int32Array : Symbol(int32Array, Decl(arrayToLocaleStringES2020.ts, 46, 5)) +>toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = int32Array.toLocaleString('en-US'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>int32Array.toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>int32Array : Symbol(int32Array, Decl(arrayToLocaleStringES2020.ts, 46, 5)) +>toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>int32Array.toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>int32Array : Symbol(int32Array, Decl(arrayToLocaleStringES2020.ts, 46, 5)) +>toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES2020.ts, 49, 42)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2020.ts, 49, 61)) + +const uint32Array = new Uint32Array(3); +>uint32Array : Symbol(uint32Array, Decl(arrayToLocaleStringES2020.ts, 51, 5)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) + +str = uint32Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>uint32Array.toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>uint32Array : Symbol(uint32Array, Decl(arrayToLocaleStringES2020.ts, 51, 5)) +>toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = uint32Array.toLocaleString('en-US'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>uint32Array.toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>uint32Array : Symbol(uint32Array, Decl(arrayToLocaleStringES2020.ts, 51, 5)) +>toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>uint32Array.toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>uint32Array : Symbol(uint32Array, Decl(arrayToLocaleStringES2020.ts, 51, 5)) +>toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES2020.ts, 54, 43)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2020.ts, 54, 62)) + +const float32Array = new Float32Array(3); +>float32Array : Symbol(float32Array, Decl(arrayToLocaleStringES2020.ts, 56, 5)) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) + +str = float32Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>float32Array.toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>float32Array : Symbol(float32Array, Decl(arrayToLocaleStringES2020.ts, 56, 5)) +>toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = float32Array.toLocaleString('en-US'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>float32Array.toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>float32Array : Symbol(float32Array, Decl(arrayToLocaleStringES2020.ts, 56, 5)) +>toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>float32Array.toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>float32Array : Symbol(float32Array, Decl(arrayToLocaleStringES2020.ts, 56, 5)) +>toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES2020.ts, 59, 44)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2020.ts, 59, 63)) + +const float64Array = new Float64Array(3); +>float64Array : Symbol(float64Array, Decl(arrayToLocaleStringES2020.ts, 61, 5)) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) + +str = float64Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>float64Array.toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>float64Array : Symbol(float64Array, Decl(arrayToLocaleStringES2020.ts, 61, 5)) +>toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = float64Array.toLocaleString('en-US'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>float64Array.toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>float64Array : Symbol(float64Array, Decl(arrayToLocaleStringES2020.ts, 61, 5)) +>toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>float64Array.toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>float64Array : Symbol(float64Array, Decl(arrayToLocaleStringES2020.ts, 61, 5)) +>toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES2020.ts, 64, 44)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2020.ts, 64, 63)) + +const bigInt64Array = new BigInt64Array(3); +>bigInt64Array : Symbol(bigInt64Array, Decl(arrayToLocaleStringES2020.ts, 66, 5)) +>BigInt64Array : Symbol(BigInt64Array, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --)) + +str = bigInt64Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>bigInt64Array.toLocaleString : Symbol(BigInt64Array.toLocaleString, Decl(lib.es2020.bigint.d.ts, --, --)) +>bigInt64Array : Symbol(bigInt64Array, Decl(arrayToLocaleStringES2020.ts, 66, 5)) +>toLocaleString : Symbol(BigInt64Array.toLocaleString, Decl(lib.es2020.bigint.d.ts, --, --)) + +str = bigInt64Array.toLocaleString('en-US'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>bigInt64Array.toLocaleString : Symbol(BigInt64Array.toLocaleString, Decl(lib.es2020.bigint.d.ts, --, --)) +>bigInt64Array : Symbol(bigInt64Array, Decl(arrayToLocaleStringES2020.ts, 66, 5)) +>toLocaleString : Symbol(BigInt64Array.toLocaleString, Decl(lib.es2020.bigint.d.ts, --, --)) + +str = bigInt64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>bigInt64Array.toLocaleString : Symbol(BigInt64Array.toLocaleString, Decl(lib.es2020.bigint.d.ts, --, --)) +>bigInt64Array : Symbol(bigInt64Array, Decl(arrayToLocaleStringES2020.ts, 66, 5)) +>toLocaleString : Symbol(BigInt64Array.toLocaleString, Decl(lib.es2020.bigint.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES2020.ts, 69, 45)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2020.ts, 69, 64)) + +const bigIntUint64Array = new BigUint64Array(3); +>bigIntUint64Array : Symbol(bigIntUint64Array, Decl(arrayToLocaleStringES2020.ts, 71, 5)) +>BigUint64Array : Symbol(BigUint64Array, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --)) + +str = bigIntUint64Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>bigIntUint64Array.toLocaleString : Symbol(BigUint64Array.toLocaleString, Decl(lib.es2020.bigint.d.ts, --, --)) +>bigIntUint64Array : Symbol(bigIntUint64Array, Decl(arrayToLocaleStringES2020.ts, 71, 5)) +>toLocaleString : Symbol(BigUint64Array.toLocaleString, Decl(lib.es2020.bigint.d.ts, --, --)) + +str = bigIntUint64Array.toLocaleString('en-US'); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>bigIntUint64Array.toLocaleString : Symbol(BigUint64Array.toLocaleString, Decl(lib.es2020.bigint.d.ts, --, --)) +>bigIntUint64Array : Symbol(bigIntUint64Array, Decl(arrayToLocaleStringES2020.ts, 71, 5)) +>toLocaleString : Symbol(BigUint64Array.toLocaleString, Decl(lib.es2020.bigint.d.ts, --, --)) + +str = bigIntUint64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES2020.ts, 0, 3)) +>bigIntUint64Array.toLocaleString : Symbol(BigUint64Array.toLocaleString, Decl(lib.es2020.bigint.d.ts, --, --)) +>bigIntUint64Array : Symbol(bigIntUint64Array, Decl(arrayToLocaleStringES2020.ts, 71, 5)) +>toLocaleString : Symbol(BigUint64Array.toLocaleString, Decl(lib.es2020.bigint.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES2020.ts, 74, 49)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES2020.ts, 74, 68)) + diff --git a/tests/baselines/reference/arrayToLocaleStringES2020.types b/tests/baselines/reference/arrayToLocaleStringES2020.types new file mode 100644 index 0000000000000..584b25dac545b --- /dev/null +++ b/tests/baselines/reference/arrayToLocaleStringES2020.types @@ -0,0 +1,582 @@ +//// [tests/cases/compiler/arrayToLocaleStringES2020.ts] //// + +=== arrayToLocaleStringES2020.ts === +let str: string; +>str : string + +const arr = [1, 2, 3]; +>arr : number[] +>[1, 2, 3] : number[] +>1 : 1 +>2 : 2 +>3 : 3 + +str = arr.toLocaleString(); // OK +>str = arr.toLocaleString() : string +>str : string +>arr.toLocaleString() : string +>arr.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>arr : number[] +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } + +str = arr.toLocaleString('en-US'); // OK +>str = arr.toLocaleString('en-US') : string +>str : string +>arr.toLocaleString('en-US') : string +>arr.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>arr : number[] +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>'en-US' : "en-US" + +str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>arr.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>arr : number[] +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +>style : "currency" +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const dates: readonly Date[] = [new Date(), new Date()]; +>dates : readonly Date[] +>[new Date(), new Date()] : Date[] +>new Date() : Date +>Date : DateConstructor +>new Date() : Date +>Date : DateConstructor + +str = dates.toLocaleString(); // OK +>str = dates.toLocaleString() : string +>str : string +>dates.toLocaleString() : string +>dates.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>dates : readonly Date[] +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } + +str = dates.toLocaleString('fr'); // OK +>str = dates.toLocaleString('fr') : string +>str : string +>dates.toLocaleString('fr') : string +>dates.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>dates : readonly Date[] +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>'fr' : "fr" + +str = dates.toLocaleString('fr', { timeZone: 'UTC' }); // OK +>str = dates.toLocaleString('fr', { timeZone: 'UTC' }) : string +>str : string +>dates.toLocaleString('fr', { timeZone: 'UTC' }) : string +>dates.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>dates : readonly Date[] +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>'fr' : "fr" +>{ timeZone: 'UTC' } : { timeZone: string; } +>timeZone : string +>'UTC' : "UTC" + +const mixed = [1, new Date(), 59782, new Date()]; +>mixed : (number | Date)[] +>[1, new Date(), 59782, new Date()] : (number | Date)[] +>1 : 1 +>new Date() : Date +>Date : DateConstructor +>59782 : 59782 +>new Date() : Date +>Date : DateConstructor + +str = mixed.toLocaleString(); // OK +>str = mixed.toLocaleString() : string +>str : string +>mixed.toLocaleString() : string +>mixed.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>mixed : (number | Date)[] +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } + +str = mixed.toLocaleString('de', { style: 'currency', currency: 'EUR' }); // OK +>str = mixed.toLocaleString('de', { style: 'currency', currency: 'EUR' }) : string +>str : string +>mixed.toLocaleString('de', { style: 'currency', currency: 'EUR' }) : string +>mixed.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>mixed : (number | Date)[] +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>'de' : "de" +>{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +>style : "currency" +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +str = (mixed as ReadonlyArray).toLocaleString('de', { currency: 'EUR', style: 'currency', timeZone: 'UTC' }); // OK +>str = (mixed as ReadonlyArray).toLocaleString('de', { currency: 'EUR', style: 'currency', timeZone: 'UTC' }) : string +>str : string +>(mixed as ReadonlyArray).toLocaleString('de', { currency: 'EUR', style: 'currency', timeZone: 'UTC' }) : string +>(mixed as ReadonlyArray).toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>(mixed as ReadonlyArray) : readonly (number | Date)[] +>mixed as ReadonlyArray : readonly (number | Date)[] +>mixed : (number | Date)[] +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>'de' : "de" +>{ currency: 'EUR', style: 'currency', timeZone: 'UTC' } : { currency: string; style: "currency"; timeZone: string; } +>currency : string +>'EUR' : "EUR" +>style : "currency" +>'currency' : "currency" +>timeZone : string +>'UTC' : "UTC" + +const bigInts = [BigInt(1), BigInt(2), BigInt(3)]; +>bigInts : bigint[] +>[BigInt(1), BigInt(2), BigInt(3)] : bigint[] +>BigInt(1) : bigint +>BigInt : BigIntConstructor +>1 : 1 +>BigInt(2) : bigint +>BigInt : BigIntConstructor +>2 : 2 +>BigInt(3) : bigint +>BigInt : BigIntConstructor +>3 : 3 + +str = bigInts.toLocaleString(); // OK +>str = bigInts.toLocaleString() : string +>str : string +>bigInts.toLocaleString() : string +>bigInts.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>bigInts : bigint[] +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } + +str = bigInts.toLocaleString('en-US'); // OK +>str = bigInts.toLocaleString('en-US') : string +>str : string +>bigInts.toLocaleString('en-US') : string +>bigInts.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>bigInts : bigint[] +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>'en-US' : "en-US" + +str = bigInts.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str = bigInts.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>bigInts.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>bigInts.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>bigInts : bigint[] +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +>style : "currency" +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const int8Array = new Int8Array(3); +>int8Array : Int8Array +>new Int8Array(3) : Int8Array +>Int8Array : Int8ArrayConstructor +>3 : 3 + +str = int8Array.toLocaleString(); // OK +>str = int8Array.toLocaleString() : string +>str : string +>int8Array.toLocaleString() : string +>int8Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>int8Array : Int8Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } + +str = int8Array.toLocaleString('en-US'); // OK +>str = int8Array.toLocaleString('en-US') : string +>str : string +>int8Array.toLocaleString('en-US') : string +>int8Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>int8Array : Int8Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" + +str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>int8Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>int8Array : Int8Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +>style : "currency" +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const uint8Array = new Uint8Array(3); +>uint8Array : Uint8Array +>new Uint8Array(3) : Uint8Array +>Uint8Array : Uint8ArrayConstructor +>3 : 3 + +str = uint8Array.toLocaleString(); // OK +>str = uint8Array.toLocaleString() : string +>str : string +>uint8Array.toLocaleString() : string +>uint8Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>uint8Array : Uint8Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } + +str = uint8Array.toLocaleString('en-US'); // OK +>str = uint8Array.toLocaleString('en-US') : string +>str : string +>uint8Array.toLocaleString('en-US') : string +>uint8Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>uint8Array : Uint8Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" + +str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>uint8Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>uint8Array : Uint8Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +>style : "currency" +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const uint8ClampedArray = new Uint8ClampedArray(3); +>uint8ClampedArray : Uint8ClampedArray +>new Uint8ClampedArray(3) : Uint8ClampedArray +>Uint8ClampedArray : Uint8ClampedArrayConstructor +>3 : 3 + +str = uint8ClampedArray.toLocaleString(); // OK +>str = uint8ClampedArray.toLocaleString() : string +>str : string +>uint8ClampedArray.toLocaleString() : string +>uint8ClampedArray.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>uint8ClampedArray : Uint8ClampedArray +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } + +str = uint8ClampedArray.toLocaleString('en-US'); // OK +>str = uint8ClampedArray.toLocaleString('en-US') : string +>str : string +>uint8ClampedArray.toLocaleString('en-US') : string +>uint8ClampedArray.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>uint8ClampedArray : Uint8ClampedArray +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" + +str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>uint8ClampedArray.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>uint8ClampedArray : Uint8ClampedArray +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +>style : "currency" +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const int16Array = new Int16Array(3); +>int16Array : Int16Array +>new Int16Array(3) : Int16Array +>Int16Array : Int16ArrayConstructor +>3 : 3 + +str = int16Array.toLocaleString(); // OK +>str = int16Array.toLocaleString() : string +>str : string +>int16Array.toLocaleString() : string +>int16Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>int16Array : Int16Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } + +str = int16Array.toLocaleString('en-US'); // OK +>str = int16Array.toLocaleString('en-US') : string +>str : string +>int16Array.toLocaleString('en-US') : string +>int16Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>int16Array : Int16Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" + +str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>int16Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>int16Array : Int16Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +>style : "currency" +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const uint16Array = new Uint16Array(3); +>uint16Array : Uint16Array +>new Uint16Array(3) : Uint16Array +>Uint16Array : Uint16ArrayConstructor +>3 : 3 + +str = uint16Array.toLocaleString(); // OK +>str = uint16Array.toLocaleString() : string +>str : string +>uint16Array.toLocaleString() : string +>uint16Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>uint16Array : Uint16Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } + +str = uint16Array.toLocaleString('en-US'); // OK +>str = uint16Array.toLocaleString('en-US') : string +>str : string +>uint16Array.toLocaleString('en-US') : string +>uint16Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>uint16Array : Uint16Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" + +str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>uint16Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>uint16Array : Uint16Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +>style : "currency" +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const int32Array = new Int32Array(3); +>int32Array : Int32Array +>new Int32Array(3) : Int32Array +>Int32Array : Int32ArrayConstructor +>3 : 3 + +str = int32Array.toLocaleString(); // OK +>str = int32Array.toLocaleString() : string +>str : string +>int32Array.toLocaleString() : string +>int32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>int32Array : Int32Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } + +str = int32Array.toLocaleString('en-US'); // OK +>str = int32Array.toLocaleString('en-US') : string +>str : string +>int32Array.toLocaleString('en-US') : string +>int32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>int32Array : Int32Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" + +str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>int32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>int32Array : Int32Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +>style : "currency" +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const uint32Array = new Uint32Array(3); +>uint32Array : Uint32Array +>new Uint32Array(3) : Uint32Array +>Uint32Array : Uint32ArrayConstructor +>3 : 3 + +str = uint32Array.toLocaleString(); // OK +>str = uint32Array.toLocaleString() : string +>str : string +>uint32Array.toLocaleString() : string +>uint32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>uint32Array : Uint32Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } + +str = uint32Array.toLocaleString('en-US'); // OK +>str = uint32Array.toLocaleString('en-US') : string +>str : string +>uint32Array.toLocaleString('en-US') : string +>uint32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>uint32Array : Uint32Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" + +str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>uint32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>uint32Array : Uint32Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +>style : "currency" +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const float32Array = new Float32Array(3); +>float32Array : Float32Array +>new Float32Array(3) : Float32Array +>Float32Array : Float32ArrayConstructor +>3 : 3 + +str = float32Array.toLocaleString(); // OK +>str = float32Array.toLocaleString() : string +>str : string +>float32Array.toLocaleString() : string +>float32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>float32Array : Float32Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } + +str = float32Array.toLocaleString('en-US'); // OK +>str = float32Array.toLocaleString('en-US') : string +>str : string +>float32Array.toLocaleString('en-US') : string +>float32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>float32Array : Float32Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" + +str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>float32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>float32Array : Float32Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +>style : "currency" +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const float64Array = new Float64Array(3); +>float64Array : Float64Array +>new Float64Array(3) : Float64Array +>Float64Array : Float64ArrayConstructor +>3 : 3 + +str = float64Array.toLocaleString(); // OK +>str = float64Array.toLocaleString() : string +>str : string +>float64Array.toLocaleString() : string +>float64Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>float64Array : Float64Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } + +str = float64Array.toLocaleString('en-US'); // OK +>str = float64Array.toLocaleString('en-US') : string +>str : string +>float64Array.toLocaleString('en-US') : string +>float64Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>float64Array : Float64Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" + +str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>float64Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>float64Array : Float64Array +>toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +>style : "currency" +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const bigInt64Array = new BigInt64Array(3); +>bigInt64Array : BigInt64Array +>new BigInt64Array(3) : BigInt64Array +>BigInt64Array : BigInt64ArrayConstructor +>3 : 3 + +str = bigInt64Array.toLocaleString(); // OK +>str = bigInt64Array.toLocaleString() : string +>str : string +>bigInt64Array.toLocaleString() : string +>bigInt64Array.toLocaleString : (locales?: string | string[], options?: Intl.NumberFormatOptions) => string +>bigInt64Array : BigInt64Array +>toLocaleString : (locales?: string | string[], options?: Intl.NumberFormatOptions) => string + +str = bigInt64Array.toLocaleString('en-US'); // OK +>str = bigInt64Array.toLocaleString('en-US') : string +>str : string +>bigInt64Array.toLocaleString('en-US') : string +>bigInt64Array.toLocaleString : (locales?: string | string[], options?: Intl.NumberFormatOptions) => string +>bigInt64Array : BigInt64Array +>toLocaleString : (locales?: string | string[], options?: Intl.NumberFormatOptions) => string +>'en-US' : "en-US" + +str = bigInt64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str = bigInt64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>bigInt64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>bigInt64Array.toLocaleString : (locales?: string | string[], options?: Intl.NumberFormatOptions) => string +>bigInt64Array : BigInt64Array +>toLocaleString : (locales?: string | string[], options?: Intl.NumberFormatOptions) => string +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +>style : "currency" +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const bigIntUint64Array = new BigUint64Array(3); +>bigIntUint64Array : BigUint64Array +>new BigUint64Array(3) : BigUint64Array +>BigUint64Array : BigUint64ArrayConstructor +>3 : 3 + +str = bigIntUint64Array.toLocaleString(); // OK +>str = bigIntUint64Array.toLocaleString() : string +>str : string +>bigIntUint64Array.toLocaleString() : string +>bigIntUint64Array.toLocaleString : (locales?: string | string[], options?: Intl.NumberFormatOptions) => string +>bigIntUint64Array : BigUint64Array +>toLocaleString : (locales?: string | string[], options?: Intl.NumberFormatOptions) => string + +str = bigIntUint64Array.toLocaleString('en-US'); // OK +>str = bigIntUint64Array.toLocaleString('en-US') : string +>str : string +>bigIntUint64Array.toLocaleString('en-US') : string +>bigIntUint64Array.toLocaleString : (locales?: string | string[], options?: Intl.NumberFormatOptions) => string +>bigIntUint64Array : BigUint64Array +>toLocaleString : (locales?: string | string[], options?: Intl.NumberFormatOptions) => string +>'en-US' : "en-US" + +str = bigIntUint64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK +>str = bigIntUint64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>bigIntUint64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>bigIntUint64Array.toLocaleString : (locales?: string | string[], options?: Intl.NumberFormatOptions) => string +>bigIntUint64Array : BigUint64Array +>toLocaleString : (locales?: string | string[], options?: Intl.NumberFormatOptions) => string +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +>style : "currency" +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + diff --git a/tests/baselines/reference/arrayToLocaleStringES5.errors.txt b/tests/baselines/reference/arrayToLocaleStringES5.errors.txt new file mode 100644 index 0000000000000..de64c526dd03e --- /dev/null +++ b/tests/baselines/reference/arrayToLocaleStringES5.errors.txt @@ -0,0 +1,125 @@ +arrayToLocaleStringES5.ts(4,26): error TS2554: Expected 0 arguments, but got 1. +arrayToLocaleStringES5.ts(5,26): error TS2554: Expected 0 arguments, but got 2. +arrayToLocaleStringES5.ts(9,28): error TS2554: Expected 0 arguments, but got 1. +arrayToLocaleStringES5.ts(10,28): error TS2554: Expected 0 arguments, but got 2. +arrayToLocaleStringES5.ts(14,32): error TS2554: Expected 0 arguments, but got 1. +arrayToLocaleStringES5.ts(15,32): error TS2554: Expected 0 arguments, but got 2. +arrayToLocaleStringES5.ts(19,33): error TS2554: Expected 0 arguments, but got 1. +arrayToLocaleStringES5.ts(20,33): error TS2554: Expected 0 arguments, but got 2. +arrayToLocaleStringES5.ts(24,40): error TS2554: Expected 0 arguments, but got 1. +arrayToLocaleStringES5.ts(25,40): error TS2554: Expected 0 arguments, but got 2. +arrayToLocaleStringES5.ts(29,33): error TS2554: Expected 0 arguments, but got 1. +arrayToLocaleStringES5.ts(30,33): error TS2554: Expected 0 arguments, but got 2. +arrayToLocaleStringES5.ts(34,34): error TS2554: Expected 0 arguments, but got 1. +arrayToLocaleStringES5.ts(35,34): error TS2554: Expected 0 arguments, but got 2. +arrayToLocaleStringES5.ts(39,33): error TS2554: Expected 0 arguments, but got 1. +arrayToLocaleStringES5.ts(40,33): error TS2554: Expected 0 arguments, but got 2. +arrayToLocaleStringES5.ts(44,34): error TS2554: Expected 0 arguments, but got 1. +arrayToLocaleStringES5.ts(45,34): error TS2554: Expected 0 arguments, but got 2. +arrayToLocaleStringES5.ts(49,35): error TS2554: Expected 0 arguments, but got 1. +arrayToLocaleStringES5.ts(50,35): error TS2554: Expected 0 arguments, but got 2. +arrayToLocaleStringES5.ts(54,35): error TS2554: Expected 0 arguments, but got 1. +arrayToLocaleStringES5.ts(55,35): error TS2554: Expected 0 arguments, but got 2. + + +==== arrayToLocaleStringES5.ts (22 errors) ==== + let str: string; + const arr = [1, 2, 3]; + str = arr.toLocaleString(); // OK + str = arr.toLocaleString('en-US'); // should be error + ~~~~~~~ +!!! error TS2554: Expected 0 arguments, but got 1. + str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2554: Expected 0 arguments, but got 2. + + const dates: readonly Date[] = [new Date(), new Date()]; + str = dates.toLocaleString(); // OK + str = dates.toLocaleString('fr'); // should be error + ~~~~ +!!! error TS2554: Expected 0 arguments, but got 1. + str = dates.toLocaleString('fr', { timeZone: 'UTC' }); // should be error + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2554: Expected 0 arguments, but got 2. + + const int8Array = new Int8Array(3); + str = int8Array.toLocaleString(); // OK + str = int8Array.toLocaleString('en-US'); // should be error + ~~~~~~~ +!!! error TS2554: Expected 0 arguments, but got 1. + str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2554: Expected 0 arguments, but got 2. + + const uint8Array = new Uint8Array(3); + str = uint8Array.toLocaleString(); // OK + str = uint8Array.toLocaleString('en-US'); // should be error + ~~~~~~~ +!!! error TS2554: Expected 0 arguments, but got 1. + str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2554: Expected 0 arguments, but got 2. + + const uint8ClampedArray = new Uint8ClampedArray(3); + str = uint8ClampedArray.toLocaleString(); // OK + str = uint8ClampedArray.toLocaleString('en-US'); // should be error + ~~~~~~~ +!!! error TS2554: Expected 0 arguments, but got 1. + str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2554: Expected 0 arguments, but got 2. + + const int16Array = new Int16Array(3); + str = int16Array.toLocaleString(); // OK + str = int16Array.toLocaleString('en-US'); // should be error + ~~~~~~~ +!!! error TS2554: Expected 0 arguments, but got 1. + str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2554: Expected 0 arguments, but got 2. + + const uint16Array = new Uint16Array(3); + str = uint16Array.toLocaleString(); // OK + str = uint16Array.toLocaleString('en-US'); // should be error + ~~~~~~~ +!!! error TS2554: Expected 0 arguments, but got 1. + str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2554: Expected 0 arguments, but got 2. + + const int32Array = new Int32Array(3); + str = int32Array.toLocaleString(); // OK + str = int32Array.toLocaleString('en-US'); // should be error + ~~~~~~~ +!!! error TS2554: Expected 0 arguments, but got 1. + str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2554: Expected 0 arguments, but got 2. + + const uint32Array = new Uint32Array(3); + str = uint32Array.toLocaleString(); // OK + str = uint32Array.toLocaleString('en-US'); // should be error + ~~~~~~~ +!!! error TS2554: Expected 0 arguments, but got 1. + str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2554: Expected 0 arguments, but got 2. + + const float32Array = new Float32Array(3); + str = float32Array.toLocaleString(); // OK + str = float32Array.toLocaleString('en-US'); // should be error + ~~~~~~~ +!!! error TS2554: Expected 0 arguments, but got 1. + str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2554: Expected 0 arguments, but got 2. + + const float64Array = new Float64Array(3); + str = float64Array.toLocaleString(); // OK + str = float64Array.toLocaleString('en-US'); // should be error + ~~~~~~~ +!!! error TS2554: Expected 0 arguments, but got 1. + str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2554: Expected 0 arguments, but got 2. + \ No newline at end of file diff --git a/tests/baselines/reference/arrayToLocaleStringES5.js b/tests/baselines/reference/arrayToLocaleStringES5.js new file mode 100644 index 0000000000000..0cc38b6750c4e --- /dev/null +++ b/tests/baselines/reference/arrayToLocaleStringES5.js @@ -0,0 +1,106 @@ +//// [tests/cases/compiler/arrayToLocaleStringES5.ts] //// + +//// [arrayToLocaleStringES5.ts] +let str: string; +const arr = [1, 2, 3]; +str = arr.toLocaleString(); // OK +str = arr.toLocaleString('en-US'); // should be error +str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + +const dates: readonly Date[] = [new Date(), new Date()]; +str = dates.toLocaleString(); // OK +str = dates.toLocaleString('fr'); // should be error +str = dates.toLocaleString('fr', { timeZone: 'UTC' }); // should be error + +const int8Array = new Int8Array(3); +str = int8Array.toLocaleString(); // OK +str = int8Array.toLocaleString('en-US'); // should be error +str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + +const uint8Array = new Uint8Array(3); +str = uint8Array.toLocaleString(); // OK +str = uint8Array.toLocaleString('en-US'); // should be error +str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + +const uint8ClampedArray = new Uint8ClampedArray(3); +str = uint8ClampedArray.toLocaleString(); // OK +str = uint8ClampedArray.toLocaleString('en-US'); // should be error +str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + +const int16Array = new Int16Array(3); +str = int16Array.toLocaleString(); // OK +str = int16Array.toLocaleString('en-US'); // should be error +str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + +const uint16Array = new Uint16Array(3); +str = uint16Array.toLocaleString(); // OK +str = uint16Array.toLocaleString('en-US'); // should be error +str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + +const int32Array = new Int32Array(3); +str = int32Array.toLocaleString(); // OK +str = int32Array.toLocaleString('en-US'); // should be error +str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + +const uint32Array = new Uint32Array(3); +str = uint32Array.toLocaleString(); // OK +str = uint32Array.toLocaleString('en-US'); // should be error +str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + +const float32Array = new Float32Array(3); +str = float32Array.toLocaleString(); // OK +str = float32Array.toLocaleString('en-US'); // should be error +str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + +const float64Array = new Float64Array(3); +str = float64Array.toLocaleString(); // OK +str = float64Array.toLocaleString('en-US'); // should be error +str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + + +//// [arrayToLocaleStringES5.js] +var str; +var arr = [1, 2, 3]; +str = arr.toLocaleString(); // OK +str = arr.toLocaleString('en-US'); // should be error +str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +var dates = [new Date(), new Date()]; +str = dates.toLocaleString(); // OK +str = dates.toLocaleString('fr'); // should be error +str = dates.toLocaleString('fr', { timeZone: 'UTC' }); // should be error +var int8Array = new Int8Array(3); +str = int8Array.toLocaleString(); // OK +str = int8Array.toLocaleString('en-US'); // should be error +str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +var uint8Array = new Uint8Array(3); +str = uint8Array.toLocaleString(); // OK +str = uint8Array.toLocaleString('en-US'); // should be error +str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +var uint8ClampedArray = new Uint8ClampedArray(3); +str = uint8ClampedArray.toLocaleString(); // OK +str = uint8ClampedArray.toLocaleString('en-US'); // should be error +str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +var int16Array = new Int16Array(3); +str = int16Array.toLocaleString(); // OK +str = int16Array.toLocaleString('en-US'); // should be error +str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +var uint16Array = new Uint16Array(3); +str = uint16Array.toLocaleString(); // OK +str = uint16Array.toLocaleString('en-US'); // should be error +str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +var int32Array = new Int32Array(3); +str = int32Array.toLocaleString(); // OK +str = int32Array.toLocaleString('en-US'); // should be error +str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +var uint32Array = new Uint32Array(3); +str = uint32Array.toLocaleString(); // OK +str = uint32Array.toLocaleString('en-US'); // should be error +str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +var float32Array = new Float32Array(3); +str = float32Array.toLocaleString(); // OK +str = float32Array.toLocaleString('en-US'); // should be error +str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +var float64Array = new Float64Array(3); +str = float64Array.toLocaleString(); // OK +str = float64Array.toLocaleString('en-US'); // should be error +str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error diff --git a/tests/baselines/reference/arrayToLocaleStringES5.symbols b/tests/baselines/reference/arrayToLocaleStringES5.symbols new file mode 100644 index 0000000000000..092b133ba6fb1 --- /dev/null +++ b/tests/baselines/reference/arrayToLocaleStringES5.symbols @@ -0,0 +1,270 @@ +//// [tests/cases/compiler/arrayToLocaleStringES5.ts] //// + +=== arrayToLocaleStringES5.ts === +let str: string; +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) + +const arr = [1, 2, 3]; +>arr : Symbol(arr, Decl(arrayToLocaleStringES5.ts, 1, 5)) + +str = arr.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>arr.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>arr : Symbol(arr, Decl(arrayToLocaleStringES5.ts, 1, 5)) +>toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + +str = arr.toLocaleString('en-US'); // should be error +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>arr.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>arr : Symbol(arr, Decl(arrayToLocaleStringES5.ts, 1, 5)) +>toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + +str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>arr.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>arr : Symbol(arr, Decl(arrayToLocaleStringES5.ts, 1, 5)) +>toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 4, 35)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 4, 54)) + +const dates: readonly Date[] = [new Date(), new Date()]; +>dates : Symbol(dates, Decl(arrayToLocaleStringES5.ts, 6, 5)) +>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + +str = dates.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>dates.toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>dates : Symbol(dates, Decl(arrayToLocaleStringES5.ts, 6, 5)) +>toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --)) + +str = dates.toLocaleString('fr'); // should be error +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>dates.toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>dates : Symbol(dates, Decl(arrayToLocaleStringES5.ts, 6, 5)) +>toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --)) + +str = dates.toLocaleString('fr', { timeZone: 'UTC' }); // should be error +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>dates.toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>dates : Symbol(dates, Decl(arrayToLocaleStringES5.ts, 6, 5)) +>toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>timeZone : Symbol(timeZone, Decl(arrayToLocaleStringES5.ts, 9, 34)) + +const int8Array = new Int8Array(3); +>int8Array : Symbol(int8Array, Decl(arrayToLocaleStringES5.ts, 11, 5)) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + +str = int8Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>int8Array.toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>int8Array : Symbol(int8Array, Decl(arrayToLocaleStringES5.ts, 11, 5)) +>toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + +str = int8Array.toLocaleString('en-US'); // should be error +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>int8Array.toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>int8Array : Symbol(int8Array, Decl(arrayToLocaleStringES5.ts, 11, 5)) +>toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + +str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>int8Array.toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>int8Array : Symbol(int8Array, Decl(arrayToLocaleStringES5.ts, 11, 5)) +>toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 14, 41)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 14, 60)) + +const uint8Array = new Uint8Array(3); +>uint8Array : Symbol(uint8Array, Decl(arrayToLocaleStringES5.ts, 16, 5)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + +str = uint8Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>uint8Array.toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>uint8Array : Symbol(uint8Array, Decl(arrayToLocaleStringES5.ts, 16, 5)) +>toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + +str = uint8Array.toLocaleString('en-US'); // should be error +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>uint8Array.toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>uint8Array : Symbol(uint8Array, Decl(arrayToLocaleStringES5.ts, 16, 5)) +>toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + +str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>uint8Array.toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>uint8Array : Symbol(uint8Array, Decl(arrayToLocaleStringES5.ts, 16, 5)) +>toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 19, 42)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 19, 61)) + +const uint8ClampedArray = new Uint8ClampedArray(3); +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayToLocaleStringES5.ts, 21, 5)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + +str = uint8ClampedArray.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>uint8ClampedArray.toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayToLocaleStringES5.ts, 21, 5)) +>toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --)) + +str = uint8ClampedArray.toLocaleString('en-US'); // should be error +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>uint8ClampedArray.toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayToLocaleStringES5.ts, 21, 5)) +>toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --)) + +str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>uint8ClampedArray.toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayToLocaleStringES5.ts, 21, 5)) +>toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 24, 49)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 24, 68)) + +const int16Array = new Int16Array(3); +>int16Array : Symbol(int16Array, Decl(arrayToLocaleStringES5.ts, 26, 5)) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + +str = int16Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>int16Array.toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>int16Array : Symbol(int16Array, Decl(arrayToLocaleStringES5.ts, 26, 5)) +>toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + +str = int16Array.toLocaleString('en-US'); // should be error +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>int16Array.toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>int16Array : Symbol(int16Array, Decl(arrayToLocaleStringES5.ts, 26, 5)) +>toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + +str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>int16Array.toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>int16Array : Symbol(int16Array, Decl(arrayToLocaleStringES5.ts, 26, 5)) +>toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 29, 42)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 29, 61)) + +const uint16Array = new Uint16Array(3); +>uint16Array : Symbol(uint16Array, Decl(arrayToLocaleStringES5.ts, 31, 5)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + +str = uint16Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>uint16Array.toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>uint16Array : Symbol(uint16Array, Decl(arrayToLocaleStringES5.ts, 31, 5)) +>toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + +str = uint16Array.toLocaleString('en-US'); // should be error +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>uint16Array.toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>uint16Array : Symbol(uint16Array, Decl(arrayToLocaleStringES5.ts, 31, 5)) +>toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + +str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>uint16Array.toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>uint16Array : Symbol(uint16Array, Decl(arrayToLocaleStringES5.ts, 31, 5)) +>toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 34, 43)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 34, 62)) + +const int32Array = new Int32Array(3); +>int32Array : Symbol(int32Array, Decl(arrayToLocaleStringES5.ts, 36, 5)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + +str = int32Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>int32Array.toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>int32Array : Symbol(int32Array, Decl(arrayToLocaleStringES5.ts, 36, 5)) +>toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + +str = int32Array.toLocaleString('en-US'); // should be error +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>int32Array.toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>int32Array : Symbol(int32Array, Decl(arrayToLocaleStringES5.ts, 36, 5)) +>toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + +str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>int32Array.toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>int32Array : Symbol(int32Array, Decl(arrayToLocaleStringES5.ts, 36, 5)) +>toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 39, 42)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 39, 61)) + +const uint32Array = new Uint32Array(3); +>uint32Array : Symbol(uint32Array, Decl(arrayToLocaleStringES5.ts, 41, 5)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + +str = uint32Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>uint32Array.toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>uint32Array : Symbol(uint32Array, Decl(arrayToLocaleStringES5.ts, 41, 5)) +>toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + +str = uint32Array.toLocaleString('en-US'); // should be error +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>uint32Array.toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>uint32Array : Symbol(uint32Array, Decl(arrayToLocaleStringES5.ts, 41, 5)) +>toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + +str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>uint32Array.toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>uint32Array : Symbol(uint32Array, Decl(arrayToLocaleStringES5.ts, 41, 5)) +>toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 44, 43)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 44, 62)) + +const float32Array = new Float32Array(3); +>float32Array : Symbol(float32Array, Decl(arrayToLocaleStringES5.ts, 46, 5)) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + +str = float32Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>float32Array.toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>float32Array : Symbol(float32Array, Decl(arrayToLocaleStringES5.ts, 46, 5)) +>toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + +str = float32Array.toLocaleString('en-US'); // should be error +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>float32Array.toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>float32Array : Symbol(float32Array, Decl(arrayToLocaleStringES5.ts, 46, 5)) +>toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + +str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>float32Array.toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>float32Array : Symbol(float32Array, Decl(arrayToLocaleStringES5.ts, 46, 5)) +>toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 49, 44)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 49, 63)) + +const float64Array = new Float64Array(3); +>float64Array : Symbol(float64Array, Decl(arrayToLocaleStringES5.ts, 51, 5)) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + +str = float64Array.toLocaleString(); // OK +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>float64Array.toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>float64Array : Symbol(float64Array, Decl(arrayToLocaleStringES5.ts, 51, 5)) +>toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + +str = float64Array.toLocaleString('en-US'); // should be error +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>float64Array.toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>float64Array : Symbol(float64Array, Decl(arrayToLocaleStringES5.ts, 51, 5)) +>toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + +str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +>str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +>float64Array.toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>float64Array : Symbol(float64Array, Decl(arrayToLocaleStringES5.ts, 51, 5)) +>toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) +>style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 54, 44)) +>currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 54, 63)) + diff --git a/tests/baselines/reference/arrayToLocaleStringES5.types b/tests/baselines/reference/arrayToLocaleStringES5.types new file mode 100644 index 0000000000000..158050d19c1d3 --- /dev/null +++ b/tests/baselines/reference/arrayToLocaleStringES5.types @@ -0,0 +1,414 @@ +//// [tests/cases/compiler/arrayToLocaleStringES5.ts] //// + +=== arrayToLocaleStringES5.ts === +let str: string; +>str : string + +const arr = [1, 2, 3]; +>arr : number[] +>[1, 2, 3] : number[] +>1 : 1 +>2 : 2 +>3 : 3 + +str = arr.toLocaleString(); // OK +>str = arr.toLocaleString() : string +>str : string +>arr.toLocaleString() : string +>arr.toLocaleString : () => string +>arr : number[] +>toLocaleString : () => string + +str = arr.toLocaleString('en-US'); // should be error +>str = arr.toLocaleString('en-US') : string +>str : string +>arr.toLocaleString('en-US') : string +>arr.toLocaleString : () => string +>arr : number[] +>toLocaleString : () => string +>'en-US' : "en-US" + +str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +>str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>arr.toLocaleString : () => string +>arr : number[] +>toLocaleString : () => string +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; } +>style : string +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const dates: readonly Date[] = [new Date(), new Date()]; +>dates : readonly Date[] +>[new Date(), new Date()] : Date[] +>new Date() : Date +>Date : DateConstructor +>new Date() : Date +>Date : DateConstructor + +str = dates.toLocaleString(); // OK +>str = dates.toLocaleString() : string +>str : string +>dates.toLocaleString() : string +>dates.toLocaleString : () => string +>dates : readonly Date[] +>toLocaleString : () => string + +str = dates.toLocaleString('fr'); // should be error +>str = dates.toLocaleString('fr') : string +>str : string +>dates.toLocaleString('fr') : string +>dates.toLocaleString : () => string +>dates : readonly Date[] +>toLocaleString : () => string +>'fr' : "fr" + +str = dates.toLocaleString('fr', { timeZone: 'UTC' }); // should be error +>str = dates.toLocaleString('fr', { timeZone: 'UTC' }) : string +>str : string +>dates.toLocaleString('fr', { timeZone: 'UTC' }) : string +>dates.toLocaleString : () => string +>dates : readonly Date[] +>toLocaleString : () => string +>'fr' : "fr" +>{ timeZone: 'UTC' } : { timeZone: string; } +>timeZone : string +>'UTC' : "UTC" + +const int8Array = new Int8Array(3); +>int8Array : Int8Array +>new Int8Array(3) : Int8Array +>Int8Array : Int8ArrayConstructor +>3 : 3 + +str = int8Array.toLocaleString(); // OK +>str = int8Array.toLocaleString() : string +>str : string +>int8Array.toLocaleString() : string +>int8Array.toLocaleString : () => string +>int8Array : Int8Array +>toLocaleString : () => string + +str = int8Array.toLocaleString('en-US'); // should be error +>str = int8Array.toLocaleString('en-US') : string +>str : string +>int8Array.toLocaleString('en-US') : string +>int8Array.toLocaleString : () => string +>int8Array : Int8Array +>toLocaleString : () => string +>'en-US' : "en-US" + +str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +>str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>int8Array.toLocaleString : () => string +>int8Array : Int8Array +>toLocaleString : () => string +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; } +>style : string +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const uint8Array = new Uint8Array(3); +>uint8Array : Uint8Array +>new Uint8Array(3) : Uint8Array +>Uint8Array : Uint8ArrayConstructor +>3 : 3 + +str = uint8Array.toLocaleString(); // OK +>str = uint8Array.toLocaleString() : string +>str : string +>uint8Array.toLocaleString() : string +>uint8Array.toLocaleString : () => string +>uint8Array : Uint8Array +>toLocaleString : () => string + +str = uint8Array.toLocaleString('en-US'); // should be error +>str = uint8Array.toLocaleString('en-US') : string +>str : string +>uint8Array.toLocaleString('en-US') : string +>uint8Array.toLocaleString : () => string +>uint8Array : Uint8Array +>toLocaleString : () => string +>'en-US' : "en-US" + +str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +>str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>uint8Array.toLocaleString : () => string +>uint8Array : Uint8Array +>toLocaleString : () => string +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; } +>style : string +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const uint8ClampedArray = new Uint8ClampedArray(3); +>uint8ClampedArray : Uint8ClampedArray +>new Uint8ClampedArray(3) : Uint8ClampedArray +>Uint8ClampedArray : Uint8ClampedArrayConstructor +>3 : 3 + +str = uint8ClampedArray.toLocaleString(); // OK +>str = uint8ClampedArray.toLocaleString() : string +>str : string +>uint8ClampedArray.toLocaleString() : string +>uint8ClampedArray.toLocaleString : () => string +>uint8ClampedArray : Uint8ClampedArray +>toLocaleString : () => string + +str = uint8ClampedArray.toLocaleString('en-US'); // should be error +>str = uint8ClampedArray.toLocaleString('en-US') : string +>str : string +>uint8ClampedArray.toLocaleString('en-US') : string +>uint8ClampedArray.toLocaleString : () => string +>uint8ClampedArray : Uint8ClampedArray +>toLocaleString : () => string +>'en-US' : "en-US" + +str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +>str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>uint8ClampedArray.toLocaleString : () => string +>uint8ClampedArray : Uint8ClampedArray +>toLocaleString : () => string +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; } +>style : string +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const int16Array = new Int16Array(3); +>int16Array : Int16Array +>new Int16Array(3) : Int16Array +>Int16Array : Int16ArrayConstructor +>3 : 3 + +str = int16Array.toLocaleString(); // OK +>str = int16Array.toLocaleString() : string +>str : string +>int16Array.toLocaleString() : string +>int16Array.toLocaleString : () => string +>int16Array : Int16Array +>toLocaleString : () => string + +str = int16Array.toLocaleString('en-US'); // should be error +>str = int16Array.toLocaleString('en-US') : string +>str : string +>int16Array.toLocaleString('en-US') : string +>int16Array.toLocaleString : () => string +>int16Array : Int16Array +>toLocaleString : () => string +>'en-US' : "en-US" + +str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +>str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>int16Array.toLocaleString : () => string +>int16Array : Int16Array +>toLocaleString : () => string +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; } +>style : string +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const uint16Array = new Uint16Array(3); +>uint16Array : Uint16Array +>new Uint16Array(3) : Uint16Array +>Uint16Array : Uint16ArrayConstructor +>3 : 3 + +str = uint16Array.toLocaleString(); // OK +>str = uint16Array.toLocaleString() : string +>str : string +>uint16Array.toLocaleString() : string +>uint16Array.toLocaleString : () => string +>uint16Array : Uint16Array +>toLocaleString : () => string + +str = uint16Array.toLocaleString('en-US'); // should be error +>str = uint16Array.toLocaleString('en-US') : string +>str : string +>uint16Array.toLocaleString('en-US') : string +>uint16Array.toLocaleString : () => string +>uint16Array : Uint16Array +>toLocaleString : () => string +>'en-US' : "en-US" + +str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +>str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>uint16Array.toLocaleString : () => string +>uint16Array : Uint16Array +>toLocaleString : () => string +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; } +>style : string +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const int32Array = new Int32Array(3); +>int32Array : Int32Array +>new Int32Array(3) : Int32Array +>Int32Array : Int32ArrayConstructor +>3 : 3 + +str = int32Array.toLocaleString(); // OK +>str = int32Array.toLocaleString() : string +>str : string +>int32Array.toLocaleString() : string +>int32Array.toLocaleString : () => string +>int32Array : Int32Array +>toLocaleString : () => string + +str = int32Array.toLocaleString('en-US'); // should be error +>str = int32Array.toLocaleString('en-US') : string +>str : string +>int32Array.toLocaleString('en-US') : string +>int32Array.toLocaleString : () => string +>int32Array : Int32Array +>toLocaleString : () => string +>'en-US' : "en-US" + +str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +>str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>int32Array.toLocaleString : () => string +>int32Array : Int32Array +>toLocaleString : () => string +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; } +>style : string +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const uint32Array = new Uint32Array(3); +>uint32Array : Uint32Array +>new Uint32Array(3) : Uint32Array +>Uint32Array : Uint32ArrayConstructor +>3 : 3 + +str = uint32Array.toLocaleString(); // OK +>str = uint32Array.toLocaleString() : string +>str : string +>uint32Array.toLocaleString() : string +>uint32Array.toLocaleString : () => string +>uint32Array : Uint32Array +>toLocaleString : () => string + +str = uint32Array.toLocaleString('en-US'); // should be error +>str = uint32Array.toLocaleString('en-US') : string +>str : string +>uint32Array.toLocaleString('en-US') : string +>uint32Array.toLocaleString : () => string +>uint32Array : Uint32Array +>toLocaleString : () => string +>'en-US' : "en-US" + +str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +>str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>uint32Array.toLocaleString : () => string +>uint32Array : Uint32Array +>toLocaleString : () => string +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; } +>style : string +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const float32Array = new Float32Array(3); +>float32Array : Float32Array +>new Float32Array(3) : Float32Array +>Float32Array : Float32ArrayConstructor +>3 : 3 + +str = float32Array.toLocaleString(); // OK +>str = float32Array.toLocaleString() : string +>str : string +>float32Array.toLocaleString() : string +>float32Array.toLocaleString : () => string +>float32Array : Float32Array +>toLocaleString : () => string + +str = float32Array.toLocaleString('en-US'); // should be error +>str = float32Array.toLocaleString('en-US') : string +>str : string +>float32Array.toLocaleString('en-US') : string +>float32Array.toLocaleString : () => string +>float32Array : Float32Array +>toLocaleString : () => string +>'en-US' : "en-US" + +str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +>str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>float32Array.toLocaleString : () => string +>float32Array : Float32Array +>toLocaleString : () => string +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; } +>style : string +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + +const float64Array = new Float64Array(3); +>float64Array : Float64Array +>new Float64Array(3) : Float64Array +>Float64Array : Float64ArrayConstructor +>3 : 3 + +str = float64Array.toLocaleString(); // OK +>str = float64Array.toLocaleString() : string +>str : string +>float64Array.toLocaleString() : string +>float64Array.toLocaleString : () => string +>float64Array : Float64Array +>toLocaleString : () => string + +str = float64Array.toLocaleString('en-US'); // should be error +>str = float64Array.toLocaleString('en-US') : string +>str : string +>float64Array.toLocaleString('en-US') : string +>float64Array.toLocaleString : () => string +>float64Array : Float64Array +>toLocaleString : () => string +>'en-US' : "en-US" + +str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +>str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>str : string +>float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +>float64Array.toLocaleString : () => string +>float64Array : Float64Array +>toLocaleString : () => string +>'en-US' : "en-US" +>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; } +>style : string +>'currency' : "currency" +>currency : string +>'EUR' : "EUR" + diff --git a/tests/baselines/reference/bigintIndex.symbols b/tests/baselines/reference/bigintIndex.symbols index edc521fc864fb..77dbc2cb6f4eb 100644 --- a/tests/baselines/reference/bigintIndex.symbols +++ b/tests/baselines/reference/bigintIndex.symbols @@ -47,7 +47,7 @@ const bigNum: bigint = 0n; const typedArray = new Uint8Array(3); >typedArray : Symbol(typedArray, Decl(a.ts, 17, 5)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) typedArray[bigNum] = 0xAA; // should error >typedArray : Symbol(typedArray, Decl(a.ts, 17, 5)) diff --git a/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2016Plus.symbols b/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2016Plus.symbols index b95b41c4d71b9..562c539287906 100644 --- a/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2016Plus.symbols +++ b/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2016Plus.symbols @@ -32,7 +32,7 @@ const testIntlFormatToParts = new Intl.DateTimeFormat("en-US").formatToParts(); const testAtomics = Atomics.add(new Uint8Array(0), 0, 0); >testAtomics : Symbol(testAtomics, Decl(doYouNeedToChangeYourTargetLibraryES2016Plus.ts, 10, 5)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) const testSharedArrayBuffer = new SharedArrayBuffer(5); >testSharedArrayBuffer : Symbol(testSharedArrayBuffer, Decl(doYouNeedToChangeYourTargetLibraryES2016Plus.ts, 11, 5)) diff --git a/tests/baselines/reference/es2022SharedMemory.symbols b/tests/baselines/reference/es2022SharedMemory.symbols index d072731e9568e..b95b68a189f9f 100644 --- a/tests/baselines/reference/es2022SharedMemory.symbols +++ b/tests/baselines/reference/es2022SharedMemory.symbols @@ -5,12 +5,12 @@ const sab = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 1024); >sab : Symbol(sab, Decl(es2022SharedMemory.ts, 0, 5)) >SharedArrayBuffer : Symbol(SharedArrayBuffer, Decl(lib.es2017.sharedmemory.d.ts, --, --), Decl(lib.es2017.sharedmemory.d.ts, --, --)) >Int32Array.BYTES_PER_ELEMENT : Symbol(Int32ArrayConstructor.BYTES_PER_ELEMENT, Decl(lib.es5.d.ts, --, --)) ->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >BYTES_PER_ELEMENT : Symbol(Int32ArrayConstructor.BYTES_PER_ELEMENT, Decl(lib.es5.d.ts, --, --)) const int32 = new Int32Array(sab); >int32 : Symbol(int32, Decl(es2022SharedMemory.ts, 1, 5)) ->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >sab : Symbol(sab, Decl(es2022SharedMemory.ts, 0, 5)) const sab64 = new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 1024); diff --git a/tests/baselines/reference/findLast(target=es2022).symbols b/tests/baselines/reference/findLast(target=es2022).symbols index 56df72fed8bc3..d06600e2d6133 100644 --- a/tests/baselines/reference/findLast(target=es2022).symbols +++ b/tests/baselines/reference/findLast(target=es2022).symbols @@ -12,47 +12,47 @@ const itemString: string | undefined = ["string"].findLast((item) => item === "s >item : Symbol(item, Decl(findLast.ts, 1, 60)) new Int8Array().findLast((item) => item === 0); ->Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >item : Symbol(item, Decl(findLast.ts, 2, 26)) >item : Symbol(item, Decl(findLast.ts, 2, 26)) new Uint8Array().findLast((item) => item === 0); ->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >item : Symbol(item, Decl(findLast.ts, 3, 27)) >item : Symbol(item, Decl(findLast.ts, 3, 27)) new Uint8ClampedArray().findLast((item) => item === 0); ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >item : Symbol(item, Decl(findLast.ts, 4, 34)) >item : Symbol(item, Decl(findLast.ts, 4, 34)) new Int16Array().findLast((item) => item === 0); ->Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >item : Symbol(item, Decl(findLast.ts, 5, 27)) >item : Symbol(item, Decl(findLast.ts, 5, 27)) new Uint16Array().findLast((item) => item === 0); ->Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >item : Symbol(item, Decl(findLast.ts, 6, 28)) >item : Symbol(item, Decl(findLast.ts, 6, 28)) new Int32Array().findLast((item) => item === 0); ->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >item : Symbol(item, Decl(findLast.ts, 7, 27)) >item : Symbol(item, Decl(findLast.ts, 7, 27)) new Uint32Array().findLast((item) => item === 0); ->Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >item : Symbol(item, Decl(findLast.ts, 8, 28)) >item : Symbol(item, Decl(findLast.ts, 8, 28)) new Float32Array().findLast((item) => item === 0); ->Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >item : Symbol(item, Decl(findLast.ts, 9, 29)) >item : Symbol(item, Decl(findLast.ts, 9, 29)) new Float64Array().findLast((item) => item === 0); ->Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >item : Symbol(item, Decl(findLast.ts, 10, 29)) >item : Symbol(item, Decl(findLast.ts, 10, 29)) @@ -79,47 +79,47 @@ const indexString: number = ["string"].findLastIndex((item) => item === "string" >item : Symbol(item, Decl(findLast.ts, 15, 54)) new Int8Array().findLastIndex((item) => item === 0); ->Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >item : Symbol(item, Decl(findLast.ts, 16, 31)) >item : Symbol(item, Decl(findLast.ts, 16, 31)) new Uint8Array().findLastIndex((item) => item === 0); ->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >item : Symbol(item, Decl(findLast.ts, 17, 32)) >item : Symbol(item, Decl(findLast.ts, 17, 32)) new Uint8ClampedArray().findLastIndex((item) => item === 0); ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >item : Symbol(item, Decl(findLast.ts, 18, 39)) >item : Symbol(item, Decl(findLast.ts, 18, 39)) new Int16Array().findLastIndex((item) => item === 0); ->Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >item : Symbol(item, Decl(findLast.ts, 19, 32)) >item : Symbol(item, Decl(findLast.ts, 19, 32)) new Uint16Array().findLastIndex((item) => item === 0); ->Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >item : Symbol(item, Decl(findLast.ts, 20, 33)) >item : Symbol(item, Decl(findLast.ts, 20, 33)) new Int32Array().findLastIndex((item) => item === 0); ->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >item : Symbol(item, Decl(findLast.ts, 21, 32)) >item : Symbol(item, Decl(findLast.ts, 21, 32)) new Uint32Array().findLastIndex((item) => item === 0); ->Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >item : Symbol(item, Decl(findLast.ts, 22, 33)) >item : Symbol(item, Decl(findLast.ts, 22, 33)) new Float32Array().findLastIndex((item) => item === 0); ->Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >item : Symbol(item, Decl(findLast.ts, 23, 34)) >item : Symbol(item, Decl(findLast.ts, 23, 34)) new Float64Array().findLastIndex((item) => item === 0); ->Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >item : Symbol(item, Decl(findLast.ts, 24, 34)) >item : Symbol(item, Decl(findLast.ts, 24, 34)) diff --git a/tests/baselines/reference/findLast(target=esnext).symbols b/tests/baselines/reference/findLast(target=esnext).symbols index ff443433554f8..0e47b29a2e7fa 100644 --- a/tests/baselines/reference/findLast(target=esnext).symbols +++ b/tests/baselines/reference/findLast(target=esnext).symbols @@ -17,63 +17,63 @@ const itemString: string | undefined = ["string"].findLast((item) => item === "s new Int8Array().findLast((item) => item === 0); >new Int8Array().findLast : Symbol(Int8Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) ->Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >findLast : Symbol(Int8Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) >item : Symbol(item, Decl(findLast.ts, 2, 26)) >item : Symbol(item, Decl(findLast.ts, 2, 26)) new Uint8Array().findLast((item) => item === 0); >new Uint8Array().findLast : Symbol(Uint8Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >findLast : Symbol(Uint8Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) >item : Symbol(item, Decl(findLast.ts, 3, 27)) >item : Symbol(item, Decl(findLast.ts, 3, 27)) new Uint8ClampedArray().findLast((item) => item === 0); >new Uint8ClampedArray().findLast : Symbol(Uint8ClampedArray.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >findLast : Symbol(Uint8ClampedArray.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) >item : Symbol(item, Decl(findLast.ts, 4, 34)) >item : Symbol(item, Decl(findLast.ts, 4, 34)) new Int16Array().findLast((item) => item === 0); >new Int16Array().findLast : Symbol(Int16Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) ->Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >findLast : Symbol(Int16Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) >item : Symbol(item, Decl(findLast.ts, 5, 27)) >item : Symbol(item, Decl(findLast.ts, 5, 27)) new Uint16Array().findLast((item) => item === 0); >new Uint16Array().findLast : Symbol(Uint16Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >findLast : Symbol(Uint16Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) >item : Symbol(item, Decl(findLast.ts, 6, 28)) >item : Symbol(item, Decl(findLast.ts, 6, 28)) new Int32Array().findLast((item) => item === 0); >new Int32Array().findLast : Symbol(Int32Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) ->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >findLast : Symbol(Int32Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) >item : Symbol(item, Decl(findLast.ts, 7, 27)) >item : Symbol(item, Decl(findLast.ts, 7, 27)) new Uint32Array().findLast((item) => item === 0); >new Uint32Array().findLast : Symbol(Uint32Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >findLast : Symbol(Uint32Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) >item : Symbol(item, Decl(findLast.ts, 8, 28)) >item : Symbol(item, Decl(findLast.ts, 8, 28)) new Float32Array().findLast((item) => item === 0); >new Float32Array().findLast : Symbol(Float32Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) ->Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >findLast : Symbol(Float32Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) >item : Symbol(item, Decl(findLast.ts, 9, 29)) >item : Symbol(item, Decl(findLast.ts, 9, 29)) new Float64Array().findLast((item) => item === 0); >new Float64Array().findLast : Symbol(Float64Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) ->Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >findLast : Symbol(Float64Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) >item : Symbol(item, Decl(findLast.ts, 10, 29)) >item : Symbol(item, Decl(findLast.ts, 10, 29)) @@ -110,63 +110,63 @@ const indexString: number = ["string"].findLastIndex((item) => item === "string" new Int8Array().findLastIndex((item) => item === 0); >new Int8Array().findLastIndex : Symbol(Int8Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) ->Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >findLastIndex : Symbol(Int8Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) >item : Symbol(item, Decl(findLast.ts, 16, 31)) >item : Symbol(item, Decl(findLast.ts, 16, 31)) new Uint8Array().findLastIndex((item) => item === 0); >new Uint8Array().findLastIndex : Symbol(Uint8Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >findLastIndex : Symbol(Uint8Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) >item : Symbol(item, Decl(findLast.ts, 17, 32)) >item : Symbol(item, Decl(findLast.ts, 17, 32)) new Uint8ClampedArray().findLastIndex((item) => item === 0); >new Uint8ClampedArray().findLastIndex : Symbol(Uint8ClampedArray.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >findLastIndex : Symbol(Uint8ClampedArray.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) >item : Symbol(item, Decl(findLast.ts, 18, 39)) >item : Symbol(item, Decl(findLast.ts, 18, 39)) new Int16Array().findLastIndex((item) => item === 0); >new Int16Array().findLastIndex : Symbol(Int16Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) ->Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >findLastIndex : Symbol(Int16Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) >item : Symbol(item, Decl(findLast.ts, 19, 32)) >item : Symbol(item, Decl(findLast.ts, 19, 32)) new Uint16Array().findLastIndex((item) => item === 0); >new Uint16Array().findLastIndex : Symbol(Uint16Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >findLastIndex : Symbol(Uint16Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) >item : Symbol(item, Decl(findLast.ts, 20, 33)) >item : Symbol(item, Decl(findLast.ts, 20, 33)) new Int32Array().findLastIndex((item) => item === 0); >new Int32Array().findLastIndex : Symbol(Int32Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) ->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >findLastIndex : Symbol(Int32Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) >item : Symbol(item, Decl(findLast.ts, 21, 32)) >item : Symbol(item, Decl(findLast.ts, 21, 32)) new Uint32Array().findLastIndex((item) => item === 0); >new Uint32Array().findLastIndex : Symbol(Uint32Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >findLastIndex : Symbol(Uint32Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) >item : Symbol(item, Decl(findLast.ts, 22, 33)) >item : Symbol(item, Decl(findLast.ts, 22, 33)) new Float32Array().findLastIndex((item) => item === 0); >new Float32Array().findLastIndex : Symbol(Float32Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) ->Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >findLastIndex : Symbol(Float32Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) >item : Symbol(item, Decl(findLast.ts, 23, 34)) >item : Symbol(item, Decl(findLast.ts, 23, 34)) new Float64Array().findLastIndex((item) => item === 0); >new Float64Array().findLastIndex : Symbol(Float64Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) ->Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >findLastIndex : Symbol(Float64Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) >item : Symbol(item, Decl(findLast.ts, 24, 34)) >item : Symbol(item, Decl(findLast.ts, 24, 34)) diff --git a/tests/baselines/reference/indexAt(target=es2021).symbols b/tests/baselines/reference/indexAt(target=es2021).symbols index 03d94fc85e606..14bb045e06571 100644 --- a/tests/baselines/reference/indexAt(target=es2021).symbols +++ b/tests/baselines/reference/indexAt(target=es2021).symbols @@ -4,31 +4,31 @@ [0].at(0); "foo".at(0); new Int8Array().at(0); ->Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) new Uint8Array().at(0); ->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) new Uint8ClampedArray().at(0); ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) new Int16Array().at(0); ->Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) new Uint16Array().at(0); ->Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) new Int32Array().at(0); ->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) new Uint32Array().at(0); ->Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) new Float32Array().at(0); ->Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) new Float64Array().at(0); ->Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) new BigInt64Array().at(0); >BigInt64Array : Symbol(BigInt64Array, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --)) diff --git a/tests/baselines/reference/indexAt(target=es2022).symbols b/tests/baselines/reference/indexAt(target=es2022).symbols index ae368775711de..a17cd95293ee3 100644 --- a/tests/baselines/reference/indexAt(target=es2022).symbols +++ b/tests/baselines/reference/indexAt(target=es2022).symbols @@ -11,47 +11,47 @@ new Int8Array().at(0); >new Int8Array().at : Symbol(Int8Array.at, Decl(lib.es2022.array.d.ts, --, --)) ->Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >at : Symbol(Int8Array.at, Decl(lib.es2022.array.d.ts, --, --)) new Uint8Array().at(0); >new Uint8Array().at : Symbol(Uint8Array.at, Decl(lib.es2022.array.d.ts, --, --)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >at : Symbol(Uint8Array.at, Decl(lib.es2022.array.d.ts, --, --)) new Uint8ClampedArray().at(0); >new Uint8ClampedArray().at : Symbol(Uint8ClampedArray.at, Decl(lib.es2022.array.d.ts, --, --)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >at : Symbol(Uint8ClampedArray.at, Decl(lib.es2022.array.d.ts, --, --)) new Int16Array().at(0); >new Int16Array().at : Symbol(Int16Array.at, Decl(lib.es2022.array.d.ts, --, --)) ->Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >at : Symbol(Int16Array.at, Decl(lib.es2022.array.d.ts, --, --)) new Uint16Array().at(0); >new Uint16Array().at : Symbol(Uint16Array.at, Decl(lib.es2022.array.d.ts, --, --)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >at : Symbol(Uint16Array.at, Decl(lib.es2022.array.d.ts, --, --)) new Int32Array().at(0); >new Int32Array().at : Symbol(Int32Array.at, Decl(lib.es2022.array.d.ts, --, --)) ->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >at : Symbol(Int32Array.at, Decl(lib.es2022.array.d.ts, --, --)) new Uint32Array().at(0); >new Uint32Array().at : Symbol(Uint32Array.at, Decl(lib.es2022.array.d.ts, --, --)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >at : Symbol(Uint32Array.at, Decl(lib.es2022.array.d.ts, --, --)) new Float32Array().at(0); >new Float32Array().at : Symbol(Float32Array.at, Decl(lib.es2022.array.d.ts, --, --)) ->Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >at : Symbol(Float32Array.at, Decl(lib.es2022.array.d.ts, --, --)) new Float64Array().at(0); >new Float64Array().at : Symbol(Float64Array.at, Decl(lib.es2022.array.d.ts, --, --)) ->Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) >at : Symbol(Float64Array.at, Decl(lib.es2022.array.d.ts, --, --)) new BigInt64Array().at(0); diff --git a/tests/baselines/reference/indexAt(target=esnext).symbols b/tests/baselines/reference/indexAt(target=esnext).symbols index f5bcab1f931fb..dbccd4a169ca1 100644 --- a/tests/baselines/reference/indexAt(target=esnext).symbols +++ b/tests/baselines/reference/indexAt(target=esnext).symbols @@ -11,47 +11,47 @@ new Int8Array().at(0); >new Int8Array().at : Symbol(Int8Array.at, Decl(lib.es2022.array.d.ts, --, --)) ->Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >at : Symbol(Int8Array.at, Decl(lib.es2022.array.d.ts, --, --)) new Uint8Array().at(0); >new Uint8Array().at : Symbol(Uint8Array.at, Decl(lib.es2022.array.d.ts, --, --)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >at : Symbol(Uint8Array.at, Decl(lib.es2022.array.d.ts, --, --)) new Uint8ClampedArray().at(0); >new Uint8ClampedArray().at : Symbol(Uint8ClampedArray.at, Decl(lib.es2022.array.d.ts, --, --)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >at : Symbol(Uint8ClampedArray.at, Decl(lib.es2022.array.d.ts, --, --)) new Int16Array().at(0); >new Int16Array().at : Symbol(Int16Array.at, Decl(lib.es2022.array.d.ts, --, --)) ->Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >at : Symbol(Int16Array.at, Decl(lib.es2022.array.d.ts, --, --)) new Uint16Array().at(0); >new Uint16Array().at : Symbol(Uint16Array.at, Decl(lib.es2022.array.d.ts, --, --)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >at : Symbol(Uint16Array.at, Decl(lib.es2022.array.d.ts, --, --)) new Int32Array().at(0); >new Int32Array().at : Symbol(Int32Array.at, Decl(lib.es2022.array.d.ts, --, --)) ->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >at : Symbol(Int32Array.at, Decl(lib.es2022.array.d.ts, --, --)) new Uint32Array().at(0); >new Uint32Array().at : Symbol(Uint32Array.at, Decl(lib.es2022.array.d.ts, --, --)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >at : Symbol(Uint32Array.at, Decl(lib.es2022.array.d.ts, --, --)) new Float32Array().at(0); >new Float32Array().at : Symbol(Float32Array.at, Decl(lib.es2022.array.d.ts, --, --)) ->Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >at : Symbol(Float32Array.at, Decl(lib.es2022.array.d.ts, --, --)) new Float64Array().at(0); >new Float64Array().at : Symbol(Float64Array.at, Decl(lib.es2022.array.d.ts, --, --)) ->Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >at : Symbol(Float64Array.at, Decl(lib.es2022.array.d.ts, --, --)) new BigInt64Array().at(0); diff --git a/tests/baselines/reference/jsxChildrenWrongType.types b/tests/baselines/reference/jsxChildrenWrongType.types index b98ade61b67ef..328f8d50cb26d 100644 --- a/tests/baselines/reference/jsxChildrenWrongType.types +++ b/tests/baselines/reference/jsxChildrenWrongType.types @@ -4,7 +4,7 @@ Assignability cache: 400 / 400 (nearest 100) Type Count: 1,400 / 1,400 (nearest 100) Instantiation count: 1,500 / 1,500 (nearest 500) -Symbol count: 31,500 / 31,500 (nearest 500) +Symbol count: 32,000 / 32,000 (nearest 500) === other.tsx === /// diff --git a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt index 6dac97e6c4f8e..380aa151c2c22 100644 --- a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt +++ b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt @@ -1,4 +1,4 @@ -mappedTypeWithAsClauseAndLateBoundProperty.ts(3,1): error TS2741: Property 'length' is missing in type '{ [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; }' but required in type 'number[]'. +mappedTypeWithAsClauseAndLateBoundProperty.ts(3,1): error TS2741: Property 'length' is missing in type '{ [x: number]: number; toString: () => string; toLocaleString: { (): string; (locales: string | string[], options?: NumberFormatOptions & DateTimeFormatOptions): string; }; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; }' but required in type 'number[]'. ==== mappedTypeWithAsClauseAndLateBoundProperty.ts (1 errors) ==== @@ -6,6 +6,6 @@ mappedTypeWithAsClauseAndLateBoundProperty.ts(3,1): error TS2741: Property 'leng declare let src2: { [K in keyof number[] as Exclude]: (number[])[K] }; tgt2 = src2; // Should error ~~~~ -!!! error TS2741: Property 'length' is missing in type '{ [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; }' but required in type 'number[]'. +!!! error TS2741: Property 'length' is missing in type '{ [x: number]: number; toString: () => string; toLocaleString: { (): string; (locales: string | string[], options?: NumberFormatOptions & DateTimeFormatOptions): string; }; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; }' but required in type 'number[]'. !!! related TS2728 lib.es5.d.ts:--:--: 'length' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.types b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.types index 4d9bf2b86fb35..21c9a849f8dde 100644 --- a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.types +++ b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.types @@ -5,10 +5,10 @@ declare let tgt2: number[]; >tgt2 : number[] declare let src2: { [K in keyof number[] as Exclude]: (number[])[K] }; ->src2 : { [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S_1, thisArg?: any): S_1[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U_1, currentValue: number, currentIndex: number, array: number[]) => U_1, initialValue: U_1): U_1; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U_2, currentValue: number, currentIndex: number, array: number[]) => U_2, initialValue: U_2): U_2; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S_2, thisArg?: any): S_2; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U_3 | readonly U_3[], thisArg?: This) => U_3[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; } +>src2 : { [x: number]: number; toString: () => string; toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S_1, thisArg?: any): S_1[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U_1, currentValue: number, currentIndex: number, array: number[]) => U_1, initialValue: U_1): U_1; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U_2, currentValue: number, currentIndex: number, array: number[]) => U_2, initialValue: U_2): U_2; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S_2, thisArg?: any): S_2; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U_3 | readonly U_3[], thisArg?: This) => U_3[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; } tgt2 = src2; // Should error ->tgt2 = src2 : { [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S_1, thisArg?: any): S_1[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U_1, currentValue: number, currentIndex: number, array: number[]) => U_1, initialValue: U_1): U_1; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U_2, currentValue: number, currentIndex: number, array: number[]) => U_2, initialValue: U_2): U_2; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S_2, thisArg?: any): S_2; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U_3 | readonly U_3[], thisArg?: This) => U_3[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; } +>tgt2 = src2 : { [x: number]: number; toString: () => string; toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S_1, thisArg?: any): S_1[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U_1, currentValue: number, currentIndex: number, array: number[]) => U_1, initialValue: U_1): U_1; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U_2, currentValue: number, currentIndex: number, array: number[]) => U_2, initialValue: U_2): U_2; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S_2, thisArg?: any): S_2; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U_3 | readonly U_3[], thisArg?: This) => U_3[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; } >tgt2 : number[] ->src2 : { [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S_1, thisArg?: any): S_1[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U_1, currentValue: number, currentIndex: number, array: number[]) => U_1, initialValue: U_1): U_1; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U_2, currentValue: number, currentIndex: number, array: number[]) => U_2, initialValue: U_2): U_2; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S_2, thisArg?: any): S_2; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U_3 | readonly U_3[], thisArg?: This) => U_3[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; } +>src2 : { [x: number]: number; toString: () => string; toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S_1, thisArg?: any): S_1[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U_1, currentValue: number, currentIndex: number, array: number[]) => U_1, initialValue: U_1): U_1; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U_2, currentValue: number, currentIndex: number, array: number[]) => U_2, initialValue: U_2): U_2; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S_2, thisArg?: any): S_2; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U_3 | readonly U_3[], thisArg?: This) => U_3[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; } diff --git a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.js b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.js index 9bfc37222f9a8..d4b703bce8ee4 100644 --- a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.js +++ b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.js @@ -12,7 +12,10 @@ export const thing = null; export declare const thing: { [x: number]: number; toString: () => string; - toLocaleString: () => string; + toLocaleString: { + (): string; + (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; + }; pop: () => number; push: (...items: number[]) => number; concat: { @@ -109,14 +112,17 @@ export declare const thing: { //// [DtsFileErrors] -mappedTypeWithAsClauseAndLateBoundProperty2.d.ts(24,118): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +mappedTypeWithAsClauseAndLateBoundProperty2.d.ts(27,118): error TS2526: A 'this' type is available only in a non-static member of a class or interface. ==== mappedTypeWithAsClauseAndLateBoundProperty2.d.ts (1 errors) ==== export declare const thing: { [x: number]: number; toString: () => string; - toLocaleString: () => string; + toLocaleString: { + (): string; + (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; + }; pop: () => number; push: (...items: number[]) => number; concat: { diff --git a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.types b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.types index 0938c9402a3d6..4dc24f579e7fa 100644 --- a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.types +++ b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.types @@ -2,8 +2,8 @@ === mappedTypeWithAsClauseAndLateBoundProperty2.ts === export const thing = (null as any as { [K in keyof number[] as Exclude]: (number[])[K] }); ->thing : { [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S_1, thisArg?: any): S_1[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U_1, currentValue: number, currentIndex: number, array: number[]) => U_1, initialValue: U_1): U_1; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U_2, currentValue: number, currentIndex: number, array: number[]) => U_2, initialValue: U_2): U_2; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S_2, thisArg?: any): S_2; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U_3 | readonly U_3[], thisArg?: This) => U_3[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; } ->(null as any as { [K in keyof number[] as Exclude]: (number[])[K] }) : { [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S_1, thisArg?: any): S_1[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U_1, currentValue: number, currentIndex: number, array: number[]) => U_1, initialValue: U_1): U_1; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U_2, currentValue: number, currentIndex: number, array: number[]) => U_2, initialValue: U_2): U_2; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S_2, thisArg?: any): S_2; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U_3 | readonly U_3[], thisArg?: This) => U_3[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; } ->null as any as { [K in keyof number[] as Exclude]: (number[])[K] } : { [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S_1, thisArg?: any): S_1[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U_1, currentValue: number, currentIndex: number, array: number[]) => U_1, initialValue: U_1): U_1; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U_2, currentValue: number, currentIndex: number, array: number[]) => U_2, initialValue: U_2): U_2; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S_2, thisArg?: any): S_2; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U_3 | readonly U_3[], thisArg?: This) => U_3[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; } +>thing : { [x: number]: number; toString: () => string; toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S_1, thisArg?: any): S_1[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U_1, currentValue: number, currentIndex: number, array: number[]) => U_1, initialValue: U_1): U_1; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U_2, currentValue: number, currentIndex: number, array: number[]) => U_2, initialValue: U_2): U_2; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S_2, thisArg?: any): S_2; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U_3 | readonly U_3[], thisArg?: This) => U_3[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; } +>(null as any as { [K in keyof number[] as Exclude]: (number[])[K] }) : { [x: number]: number; toString: () => string; toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S_1, thisArg?: any): S_1[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U_1, currentValue: number, currentIndex: number, array: number[]) => U_1, initialValue: U_1): U_1; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U_2, currentValue: number, currentIndex: number, array: number[]) => U_2, initialValue: U_2): U_2; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S_2, thisArg?: any): S_2; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U_3 | readonly U_3[], thisArg?: This) => U_3[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; } +>null as any as { [K in keyof number[] as Exclude]: (number[])[K] } : { [x: number]: number; toString: () => string; toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S_1, thisArg?: any): S_1[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U_1, currentValue: number, currentIndex: number, array: number[]) => U_1, initialValue: U_1): U_1; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U_2, currentValue: number, currentIndex: number, array: number[]) => U_2, initialValue: U_2): U_2; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S_2, thisArg?: any): S_2; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U_3 | readonly U_3[], thisArg?: This) => U_3[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; } >null as any : any diff --git a/tests/baselines/reference/templateLiteralTypes4.types b/tests/baselines/reference/templateLiteralTypes4.types index a303ca6304e90..cd070845ed60a 100644 --- a/tests/baselines/reference/templateLiteralTypes4.types +++ b/tests/baselines/reference/templateLiteralTypes4.types @@ -4,7 +4,7 @@ Assignability cache: 1,400 / 1,400 (nearest 100) Type Count: 900 / 900 (nearest 100) Instantiation count: 1,000 / 1,500 (nearest 500) -Symbol count: 29,500 / 29,500 (nearest 500) +Symbol count: 30,000 / 30,000 (nearest 500) === templateLiteralTypes4.ts === // infer from number diff --git a/tests/baselines/reference/typedArrays-es6.symbols b/tests/baselines/reference/typedArrays-es6.symbols index 65f89f1f0f024..a0ea517856f94 100644 --- a/tests/baselines/reference/typedArrays-es6.symbols +++ b/tests/baselines/reference/typedArrays-es6.symbols @@ -3,35 +3,35 @@ === typedArrays-es6.ts === const float32Array = new Float32Array(1); >float32Array : Symbol(float32Array, Decl(typedArrays-es6.ts, 0, 5)) ->Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) [...float32Array]; >float32Array : Symbol(float32Array, Decl(typedArrays-es6.ts, 0, 5)) const float64Array = new Float64Array(1); >float64Array : Symbol(float64Array, Decl(typedArrays-es6.ts, 3, 5)) ->Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) [...float64Array]; >float64Array : Symbol(float64Array, Decl(typedArrays-es6.ts, 3, 5)) const int16Array = new Int16Array(1); >int16Array : Symbol(int16Array, Decl(typedArrays-es6.ts, 6, 5)) ->Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) [...int16Array]; >int16Array : Symbol(int16Array, Decl(typedArrays-es6.ts, 6, 5)) const int32Array = new Int32Array(1); >int32Array : Symbol(int32Array, Decl(typedArrays-es6.ts, 9, 5)) ->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) [...int32Array]; >int32Array : Symbol(int32Array, Decl(typedArrays-es6.ts, 9, 5)) const int8Array = new Int8Array(1); >int8Array : Symbol(int8Array, Decl(typedArrays-es6.ts, 12, 5)) ->Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) [...int8Array]; >int8Array : Symbol(int8Array, Decl(typedArrays-es6.ts, 12, 5)) @@ -45,28 +45,28 @@ const nodeList = new NodeList(); const uint16Array = new Uint16Array(1); >uint16Array : Symbol(uint16Array, Decl(typedArrays-es6.ts, 18, 5)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) [...uint16Array]; >uint16Array : Symbol(uint16Array, Decl(typedArrays-es6.ts, 18, 5)) const uint32Array = new Uint32Array(1); >uint32Array : Symbol(uint32Array, Decl(typedArrays-es6.ts, 21, 5)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) [...uint32Array]; >uint32Array : Symbol(uint32Array, Decl(typedArrays-es6.ts, 21, 5)) const uint8Array = new Uint8Array(1); >uint8Array : Symbol(uint8Array, Decl(typedArrays-es6.ts, 24, 5)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) [...uint8Array]; >uint8Array : Symbol(uint8Array, Decl(typedArrays-es6.ts, 24, 5)) const uint8ClampedArray = new Uint8ClampedArray(1); >uint8ClampedArray : Symbol(uint8ClampedArray, Decl(typedArrays-es6.ts, 27, 5)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) [...uint8ClampedArray]; >uint8ClampedArray : Symbol(uint8ClampedArray, Decl(typedArrays-es6.ts, 27, 5)) diff --git a/tests/baselines/reference/typedArrays.symbols b/tests/baselines/reference/typedArrays.symbols index 0ac75fa4b8dca..3092529ae474d 100644 --- a/tests/baselines/reference/typedArrays.symbols +++ b/tests/baselines/reference/typedArrays.symbols @@ -9,39 +9,39 @@ function CreateTypedArrayTypes() { typedArrays[0] = Int8Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 1, 7)) ->Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) typedArrays[1] = Uint8Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 1, 7)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) typedArrays[2] = Int16Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 1, 7)) ->Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) typedArrays[3] = Uint16Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 1, 7)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) typedArrays[4] = Int32Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 1, 7)) ->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) typedArrays[5] = Uint32Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 1, 7)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) typedArrays[6] = Float32Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 1, 7)) ->Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) typedArrays[7] = Float64Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 1, 7)) ->Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) typedArrays[8] = Uint8ClampedArray; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 1, 7)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) return typedArrays; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 1, 7)) @@ -56,47 +56,47 @@ function CreateTypedArrayInstancesFromLength(obj: number) { typedArrays[0] = new Int8Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 16, 7)) ->Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 15, 45)) typedArrays[1] = new Uint8Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 16, 7)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 15, 45)) typedArrays[2] = new Int16Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 16, 7)) ->Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 15, 45)) typedArrays[3] = new Uint16Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 16, 7)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 15, 45)) typedArrays[4] = new Int32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 16, 7)) ->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 15, 45)) typedArrays[5] = new Uint32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 16, 7)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 15, 45)) typedArrays[6] = new Float32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 16, 7)) ->Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 15, 45)) typedArrays[7] = new Float64Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 16, 7)) ->Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 15, 45)) typedArrays[8] = new Uint8ClampedArray(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 16, 7)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 15, 45)) return typedArrays; @@ -112,47 +112,47 @@ function CreateTypedArrayInstancesFromArray(obj: number[]) { typedArrays[0] = new Int8Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 31, 7)) ->Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 30, 44)) typedArrays[1] = new Uint8Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 31, 7)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 30, 44)) typedArrays[2] = new Int16Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 31, 7)) ->Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 30, 44)) typedArrays[3] = new Uint16Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 31, 7)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 30, 44)) typedArrays[4] = new Int32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 31, 7)) ->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 30, 44)) typedArrays[5] = new Uint32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 31, 7)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 30, 44)) typedArrays[6] = new Float32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 31, 7)) ->Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 30, 44)) typedArrays[7] = new Float64Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 31, 7)) ->Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 30, 44)) typedArrays[8] = new Uint8ClampedArray(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 31, 7)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 30, 44)) return typedArrays; @@ -169,63 +169,63 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { typedArrays[0] = Int8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 46, 7)) >Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 45, 44)) typedArrays[1] = Uint8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 46, 7)) >Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 45, 44)) typedArrays[2] = Int16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 46, 7)) >Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 45, 44)) typedArrays[3] = Uint16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 46, 7)) >Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 45, 44)) typedArrays[4] = Int32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 46, 7)) >Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 45, 44)) typedArrays[5] = Uint32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 46, 7)) >Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 45, 44)) typedArrays[6] = Float32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 46, 7)) >Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 45, 44)) typedArrays[7] = Float64Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 46, 7)) >Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 45, 44)) typedArrays[8] = Uint8ClampedArray.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 46, 7)) >Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 45, 44)) @@ -244,63 +244,63 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { typedArrays[0] = Int8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 61, 7)) >Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 60, 47)) typedArrays[1] = Uint8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 61, 7)) >Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 60, 47)) typedArrays[2] = Int16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 61, 7)) >Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 60, 47)) typedArrays[3] = Uint16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 61, 7)) >Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 60, 47)) typedArrays[4] = Int32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 61, 7)) >Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 60, 47)) typedArrays[5] = Uint32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 61, 7)) >Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 60, 47)) typedArrays[6] = Float32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 61, 7)) >Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 60, 47)) typedArrays[7] = Float64Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 61, 7)) >Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 60, 47)) typedArrays[8] = Uint8ClampedArray.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 61, 7)) >Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 60, 47)) @@ -318,63 +318,63 @@ function CreateTypedArraysOf(obj) { typedArrays[0] = Int8Array.of(...obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 76, 7)) >Int8Array.of : Symbol(Int8ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) ->Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >of : Symbol(Int8ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 75, 29)) typedArrays[1] = Uint8Array.of(...obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 76, 7)) >Uint8Array.of : Symbol(Uint8ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >of : Symbol(Uint8ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 75, 29)) typedArrays[2] = Int16Array.of(...obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 76, 7)) >Int16Array.of : Symbol(Int16ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) ->Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >of : Symbol(Int16ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 75, 29)) typedArrays[3] = Uint16Array.of(...obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 76, 7)) >Uint16Array.of : Symbol(Uint16ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >of : Symbol(Uint16ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 75, 29)) typedArrays[4] = Int32Array.of(...obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 76, 7)) >Int32Array.of : Symbol(Int32ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) ->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >of : Symbol(Int32ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 75, 29)) typedArrays[5] = Uint32Array.of(...obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 76, 7)) >Uint32Array.of : Symbol(Uint32ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >of : Symbol(Uint32ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 75, 29)) typedArrays[6] = Float32Array.of(...obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 76, 7)) >Float32Array.of : Symbol(Float32ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) ->Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >of : Symbol(Float32ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 75, 29)) typedArrays[7] = Float64Array.of(...obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 76, 7)) >Float64Array.of : Symbol(Float64ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) ->Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >of : Symbol(Float64ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 75, 29)) typedArrays[8] = Uint8ClampedArray.of(...obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 76, 7)) >Uint8ClampedArray.of : Symbol(Uint8ClampedArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >of : Symbol(Uint8ClampedArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 75, 29)) @@ -391,55 +391,55 @@ function CreateTypedArraysOf2() { typedArrays[0] = Int8Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 91, 7)) >Int8Array.of : Symbol(Int8ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) ->Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >of : Symbol(Int8ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) typedArrays[1] = Uint8Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 91, 7)) >Uint8Array.of : Symbol(Uint8ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >of : Symbol(Uint8ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) typedArrays[2] = Int16Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 91, 7)) >Int16Array.of : Symbol(Int16ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) ->Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >of : Symbol(Int16ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) typedArrays[3] = Uint16Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 91, 7)) >Uint16Array.of : Symbol(Uint16ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >of : Symbol(Uint16ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) typedArrays[4] = Int32Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 91, 7)) >Int32Array.of : Symbol(Int32ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) ->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >of : Symbol(Int32ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) typedArrays[5] = Uint32Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 91, 7)) >Uint32Array.of : Symbol(Uint32ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >of : Symbol(Uint32ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) typedArrays[6] = Float32Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 91, 7)) >Float32Array.of : Symbol(Float32ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) ->Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >of : Symbol(Float32ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) typedArrays[7] = Float64Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 91, 7)) >Float64Array.of : Symbol(Float64ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) ->Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >of : Symbol(Float64ArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) typedArrays[8] = Uint8ClampedArray.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 91, 7)) >Uint8ClampedArray.of : Symbol(Uint8ClampedArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >of : Symbol(Uint8ClampedArrayConstructor.of, Decl(lib.es5.d.ts, --, --)) return typedArrays; @@ -463,7 +463,7 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) typedArrays[0] = Int8Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 106, 7)) >Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) @@ -471,7 +471,7 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) typedArrays[1] = Uint8Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 106, 7)) >Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) @@ -479,7 +479,7 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) typedArrays[2] = Int16Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 106, 7)) >Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) @@ -487,7 +487,7 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) typedArrays[3] = Uint16Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 106, 7)) >Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) @@ -495,7 +495,7 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) typedArrays[4] = Int32Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 106, 7)) >Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) @@ -503,7 +503,7 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) typedArrays[5] = Uint32Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 106, 7)) >Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) @@ -511,7 +511,7 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) typedArrays[6] = Float32Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 106, 7)) >Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) @@ -519,7 +519,7 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) typedArrays[7] = Float64Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 106, 7)) >Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) @@ -527,7 +527,7 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) typedArrays[8] = Uint8ClampedArray.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 106, 7)) >Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) @@ -550,7 +550,7 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n typedArrays[0] = Int8Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 121, 7)) >Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) @@ -558,7 +558,7 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n typedArrays[1] = Uint8Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 121, 7)) >Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) @@ -566,7 +566,7 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n typedArrays[2] = Int16Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 121, 7)) >Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) @@ -574,7 +574,7 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n typedArrays[3] = Uint16Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 121, 7)) >Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) @@ -582,7 +582,7 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n typedArrays[4] = Int32Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 121, 7)) >Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) @@ -590,7 +590,7 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n typedArrays[5] = Uint32Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 121, 7)) >Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) @@ -598,7 +598,7 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n typedArrays[6] = Float32Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 121, 7)) >Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) @@ -606,7 +606,7 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n typedArrays[7] = Float64Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 121, 7)) >Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) @@ -614,7 +614,7 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n typedArrays[8] = Uint8ClampedArray.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 121, 7)) >Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) @@ -638,7 +638,7 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v typedArrays[0] = Int8Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) >Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) @@ -647,7 +647,7 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v typedArrays[1] = Uint8Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) >Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) @@ -656,7 +656,7 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v typedArrays[2] = Int16Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) >Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) @@ -665,7 +665,7 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v typedArrays[3] = Uint16Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) >Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) @@ -674,7 +674,7 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v typedArrays[4] = Int32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) >Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) @@ -683,7 +683,7 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v typedArrays[5] = Uint32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) >Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) @@ -692,7 +692,7 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v typedArrays[6] = Float32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) >Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) @@ -701,7 +701,7 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v typedArrays[7] = Float64Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) >Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) @@ -710,7 +710,7 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v typedArrays[8] = Uint8ClampedArray.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) >Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) @@ -738,7 +738,7 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe typedArrays[0] = Int8Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) >Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) @@ -747,7 +747,7 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe typedArrays[1] = Uint8Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) >Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) @@ -756,7 +756,7 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe typedArrays[2] = Int16Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) >Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) @@ -765,7 +765,7 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe typedArrays[3] = Uint16Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) >Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) @@ -774,7 +774,7 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe typedArrays[4] = Int32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) >Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) @@ -783,7 +783,7 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe typedArrays[5] = Uint32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) >Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) @@ -792,7 +792,7 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe typedArrays[6] = Float32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) >Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) @@ -801,7 +801,7 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe typedArrays[7] = Float64Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) >Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) @@ -810,7 +810,7 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe typedArrays[8] = Uint8ClampedArray.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) >Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) diff --git a/tests/baselines/reference/typedArraysCrossAssignability01.symbols b/tests/baselines/reference/typedArraysCrossAssignability01.symbols index 12f439d8992db..e5ce5319e81ac 100644 --- a/tests/baselines/reference/typedArraysCrossAssignability01.symbols +++ b/tests/baselines/reference/typedArraysCrossAssignability01.symbols @@ -6,39 +6,39 @@ function CheckAssignability() { let arr_Int8Array = new Int8Array(1); >arr_Int8Array : Symbol(arr_Int8Array, Decl(typedArraysCrossAssignability01.ts, 1, 7)) ->Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) let arr_Uint8Array = new Uint8Array(1); >arr_Uint8Array : Symbol(arr_Uint8Array, Decl(typedArraysCrossAssignability01.ts, 2, 7)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) let arr_Int16Array = new Int16Array(1); >arr_Int16Array : Symbol(arr_Int16Array, Decl(typedArraysCrossAssignability01.ts, 3, 7)) ->Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) let arr_Uint16Array = new Uint16Array(1); >arr_Uint16Array : Symbol(arr_Uint16Array, Decl(typedArraysCrossAssignability01.ts, 4, 7)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) let arr_Int32Array = new Int32Array(1); >arr_Int32Array : Symbol(arr_Int32Array, Decl(typedArraysCrossAssignability01.ts, 5, 7)) ->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) let arr_Uint32Array = new Uint32Array(1); >arr_Uint32Array : Symbol(arr_Uint32Array, Decl(typedArraysCrossAssignability01.ts, 6, 7)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) let arr_Float32Array = new Float32Array(1); >arr_Float32Array : Symbol(arr_Float32Array, Decl(typedArraysCrossAssignability01.ts, 7, 7)) ->Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) let arr_Float64Array = new Float64Array(1); >arr_Float64Array : Symbol(arr_Float64Array, Decl(typedArraysCrossAssignability01.ts, 8, 7)) ->Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) let arr_Uint8ClampedArray = new Uint8ClampedArray(1); >arr_Uint8ClampedArray : Symbol(arr_Uint8ClampedArray, Decl(typedArraysCrossAssignability01.ts, 9, 7)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) arr_Int8Array = arr_Int8Array; >arr_Int8Array : Symbol(arr_Int8Array, Decl(typedArraysCrossAssignability01.ts, 1, 7)) diff --git a/tests/baselines/reference/unionAndIntersectionInference3.types b/tests/baselines/reference/unionAndIntersectionInference3.types index 95158c6b7d2c5..419e3eb29a2ef 100644 --- a/tests/baselines/reference/unionAndIntersectionInference3.types +++ b/tests/baselines/reference/unionAndIntersectionInference3.types @@ -4,7 +4,7 @@ Assignability cache: 300 / 300 (nearest 100) Type Count: 1,500 / 1,500 (nearest 100) Instantiation count: 2,500 / 2,500 (nearest 500) -Symbol count: 31,000 / 31,000 (nearest 500) +Symbol count: 31,500 / 31,500 (nearest 500) === unionAndIntersectionInference3.ts === // Repro from #30720 diff --git a/tests/baselines/reference/valueOfTypedArray.symbols b/tests/baselines/reference/valueOfTypedArray.symbols index c201f8ddcbdae..a0d267bd41075 100644 --- a/tests/baselines/reference/valueOfTypedArray.symbols +++ b/tests/baselines/reference/valueOfTypedArray.symbols @@ -4,58 +4,58 @@ // All declarations should pass, as valueOf has been specialized for all TypedArrays const typedArray0: Int8Array = (new Int8Array()).valueOf(); >typedArray0 : Symbol(typedArray0, Decl(valueOfTypedArray.ts, 1, 5)) ->Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) >(new Int8Array()).valueOf : Symbol(Int8Array.valueOf, Decl(lib.es5.d.ts, --, --)) ->Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) >valueOf : Symbol(Int8Array.valueOf, Decl(lib.es5.d.ts, --, --)) const typedArray1: Uint8Array = (new Uint8Array()).valueOf(); >typedArray1 : Symbol(typedArray1, Decl(valueOfTypedArray.ts, 2, 5)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) >(new Uint8Array()).valueOf : Symbol(Uint8Array.valueOf, Decl(lib.es5.d.ts, --, --)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) >valueOf : Symbol(Uint8Array.valueOf, Decl(lib.es5.d.ts, --, --)) const typedArray2: Int16Array = (new Int16Array()).valueOf(); >typedArray2 : Symbol(typedArray2, Decl(valueOfTypedArray.ts, 3, 5)) ->Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) >(new Int16Array()).valueOf : Symbol(Int16Array.valueOf, Decl(lib.es5.d.ts, --, --)) ->Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) >valueOf : Symbol(Int16Array.valueOf, Decl(lib.es5.d.ts, --, --)) const typedArray3: Uint16Array = (new Uint16Array()).valueOf(); >typedArray3 : Symbol(typedArray3, Decl(valueOfTypedArray.ts, 4, 5)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) >(new Uint16Array()).valueOf : Symbol(Uint16Array.valueOf, Decl(lib.es5.d.ts, --, --)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) >valueOf : Symbol(Uint16Array.valueOf, Decl(lib.es5.d.ts, --, --)) const typedArray4: Int32Array = (new Int32Array()).valueOf(); >typedArray4 : Symbol(typedArray4, Decl(valueOfTypedArray.ts, 5, 5)) ->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) >(new Int32Array()).valueOf : Symbol(Int32Array.valueOf, Decl(lib.es5.d.ts, --, --)) ->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) >valueOf : Symbol(Int32Array.valueOf, Decl(lib.es5.d.ts, --, --)) const typedArray5: Uint32Array = (new Uint32Array()).valueOf(); >typedArray5 : Symbol(typedArray5, Decl(valueOfTypedArray.ts, 6, 5)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) >(new Uint32Array()).valueOf : Symbol(Uint32Array.valueOf, Decl(lib.es5.d.ts, --, --)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) >valueOf : Symbol(Uint32Array.valueOf, Decl(lib.es5.d.ts, --, --)) const typedArray6: Float32Array = (new Float32Array()).valueOf(); >typedArray6 : Symbol(typedArray6, Decl(valueOfTypedArray.ts, 7, 5)) ->Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) >(new Float32Array()).valueOf : Symbol(Float32Array.valueOf, Decl(lib.es5.d.ts, --, --)) ->Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) >valueOf : Symbol(Float32Array.valueOf, Decl(lib.es5.d.ts, --, --)) const typedArray7: Float64Array = (new Float64Array()).valueOf(); >typedArray7 : Symbol(typedArray7, Decl(valueOfTypedArray.ts, 8, 5)) ->Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) >(new Float64Array()).valueOf : Symbol(Float64Array.valueOf, Decl(lib.es5.d.ts, --, --)) ->Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --)) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) >valueOf : Symbol(Float64Array.valueOf, Decl(lib.es5.d.ts, --, --)) const typedArray8: BigInt64Array = (new BigInt64Array()).valueOf(); diff --git a/tests/baselines/reference/verifyDefaultLib_webworker.types b/tests/baselines/reference/verifyDefaultLib_webworker.types index 00bfbd5013e00..2029499f5c5cf 100644 --- a/tests/baselines/reference/verifyDefaultLib_webworker.types +++ b/tests/baselines/reference/verifyDefaultLib_webworker.types @@ -4,7 +4,7 @@ Assignability cache: 600 / 600 (nearest 100) Type Count: 6,200 / 6,200 (nearest 100) Instantiation count: 1,000 / 1,000 (nearest 500) -Symbol count: 14,000 / 14,000 (nearest 500) +Symbol count: 14,500 / 14,500 (nearest 500) === verifyDefaultLib_webworker.ts === var x: Worker; diff --git a/tests/cases/compiler/arrayToLocaleStringES2015.ts b/tests/cases/compiler/arrayToLocaleStringES2015.ts new file mode 100644 index 0000000000000..95bba8c179756 --- /dev/null +++ b/tests/cases/compiler/arrayToLocaleStringES2015.ts @@ -0,0 +1,63 @@ +// @target: es2015 + +let str: string; +const arr = [1, 2, 3]; +str = arr.toLocaleString(); // OK +str = arr.toLocaleString('en-US'); // OK +str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const dates: readonly Date[] = [new Date(), new Date()]; +str = dates.toLocaleString(); // OK +str = dates.toLocaleString('fr'); // OK +str = dates.toLocaleString('fr', { timeZone: 'UTC' }); // OK + +const mixed = [1, new Date(), 59782, new Date()]; +str = mixed.toLocaleString(); // OK +str = mixed.toLocaleString('fr'); // OK +str = mixed.toLocaleString('de', { style: 'currency', currency: 'EUR' }); // OK +str = (mixed as ReadonlyArray).toLocaleString('de', { currency: 'EUR', style: 'currency', timeZone: 'UTC' }); // OK + +const int8Array = new Int8Array(3); +str = int8Array.toLocaleString(); // OK +str = int8Array.toLocaleString('en-US'); // OK +str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const uint8Array = new Uint8Array(3); +str = uint8Array.toLocaleString(); // OK +str = uint8Array.toLocaleString('en-US'); // OK +str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const uint8ClampedArray = new Uint8ClampedArray(3); +str = uint8ClampedArray.toLocaleString(); // OK +str = uint8ClampedArray.toLocaleString('en-US'); // OK +str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const int16Array = new Int16Array(3); +str = int16Array.toLocaleString(); // OK +str = int16Array.toLocaleString('en-US'); // OK +str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const uint16Array = new Uint16Array(3); +str = uint16Array.toLocaleString(); // OK +str = uint16Array.toLocaleString('en-US'); // OK +str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const int32Array = new Int32Array(3); +str = int32Array.toLocaleString(); // OK +str = int32Array.toLocaleString('en-US'); // OK +str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const uint32Array = new Uint32Array(3); +str = uint32Array.toLocaleString(); // OK +str = uint32Array.toLocaleString('en-US'); // OK +str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const float32Array = new Float32Array(3); +str = float32Array.toLocaleString(); // OK +str = float32Array.toLocaleString('en-US'); // OK +str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const float64Array = new Float64Array(3); +str = float64Array.toLocaleString(); // OK +str = float64Array.toLocaleString('en-US'); // OK +str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK diff --git a/tests/cases/compiler/arrayToLocaleStringES2020.ts b/tests/cases/compiler/arrayToLocaleStringES2020.ts new file mode 100644 index 0000000000000..e526d4c1c4f8d --- /dev/null +++ b/tests/cases/compiler/arrayToLocaleStringES2020.ts @@ -0,0 +1,77 @@ +// @target: es2020 + +let str: string; +const arr = [1, 2, 3]; +str = arr.toLocaleString(); // OK +str = arr.toLocaleString('en-US'); // OK +str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const dates: readonly Date[] = [new Date(), new Date()]; +str = dates.toLocaleString(); // OK +str = dates.toLocaleString('fr'); // OK +str = dates.toLocaleString('fr', { timeZone: 'UTC' }); // OK + +const mixed = [1, new Date(), 59782, new Date()]; +str = mixed.toLocaleString(); // OK +str = mixed.toLocaleString('de', { style: 'currency', currency: 'EUR' }); // OK +str = (mixed as ReadonlyArray).toLocaleString('de', { currency: 'EUR', style: 'currency', timeZone: 'UTC' }); // OK + +const bigInts = [BigInt(1), BigInt(2), BigInt(3)]; +str = bigInts.toLocaleString(); // OK +str = bigInts.toLocaleString('en-US'); // OK +str = bigInts.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const int8Array = new Int8Array(3); +str = int8Array.toLocaleString(); // OK +str = int8Array.toLocaleString('en-US'); // OK +str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const uint8Array = new Uint8Array(3); +str = uint8Array.toLocaleString(); // OK +str = uint8Array.toLocaleString('en-US'); // OK +str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const uint8ClampedArray = new Uint8ClampedArray(3); +str = uint8ClampedArray.toLocaleString(); // OK +str = uint8ClampedArray.toLocaleString('en-US'); // OK +str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const int16Array = new Int16Array(3); +str = int16Array.toLocaleString(); // OK +str = int16Array.toLocaleString('en-US'); // OK +str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const uint16Array = new Uint16Array(3); +str = uint16Array.toLocaleString(); // OK +str = uint16Array.toLocaleString('en-US'); // OK +str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const int32Array = new Int32Array(3); +str = int32Array.toLocaleString(); // OK +str = int32Array.toLocaleString('en-US'); // OK +str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const uint32Array = new Uint32Array(3); +str = uint32Array.toLocaleString(); // OK +str = uint32Array.toLocaleString('en-US'); // OK +str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const float32Array = new Float32Array(3); +str = float32Array.toLocaleString(); // OK +str = float32Array.toLocaleString('en-US'); // OK +str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const float64Array = new Float64Array(3); +str = float64Array.toLocaleString(); // OK +str = float64Array.toLocaleString('en-US'); // OK +str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const bigInt64Array = new BigInt64Array(3); +str = bigInt64Array.toLocaleString(); // OK +str = bigInt64Array.toLocaleString('en-US'); // OK +str = bigInt64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK + +const bigIntUint64Array = new BigUint64Array(3); +str = bigIntUint64Array.toLocaleString(); // OK +str = bigIntUint64Array.toLocaleString('en-US'); // OK +str = bigIntUint64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // OK diff --git a/tests/cases/compiler/arrayToLocaleStringES5.ts b/tests/cases/compiler/arrayToLocaleStringES5.ts new file mode 100644 index 0000000000000..a0d1a6464ee9e --- /dev/null +++ b/tests/cases/compiler/arrayToLocaleStringES5.ts @@ -0,0 +1,57 @@ +// @target: es5 + +let str: string; +const arr = [1, 2, 3]; +str = arr.toLocaleString(); // OK +str = arr.toLocaleString('en-US'); // should be error +str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + +const dates: readonly Date[] = [new Date(), new Date()]; +str = dates.toLocaleString(); // OK +str = dates.toLocaleString('fr'); // should be error +str = dates.toLocaleString('fr', { timeZone: 'UTC' }); // should be error + +const int8Array = new Int8Array(3); +str = int8Array.toLocaleString(); // OK +str = int8Array.toLocaleString('en-US'); // should be error +str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + +const uint8Array = new Uint8Array(3); +str = uint8Array.toLocaleString(); // OK +str = uint8Array.toLocaleString('en-US'); // should be error +str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + +const uint8ClampedArray = new Uint8ClampedArray(3); +str = uint8ClampedArray.toLocaleString(); // OK +str = uint8ClampedArray.toLocaleString('en-US'); // should be error +str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + +const int16Array = new Int16Array(3); +str = int16Array.toLocaleString(); // OK +str = int16Array.toLocaleString('en-US'); // should be error +str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + +const uint16Array = new Uint16Array(3); +str = uint16Array.toLocaleString(); // OK +str = uint16Array.toLocaleString('en-US'); // should be error +str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + +const int32Array = new Int32Array(3); +str = int32Array.toLocaleString(); // OK +str = int32Array.toLocaleString('en-US'); // should be error +str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + +const uint32Array = new Uint32Array(3); +str = uint32Array.toLocaleString(); // OK +str = uint32Array.toLocaleString('en-US'); // should be error +str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + +const float32Array = new Float32Array(3); +str = float32Array.toLocaleString(); // OK +str = float32Array.toLocaleString('en-US'); // should be error +str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + +const float64Array = new Float64Array(3); +str = float64Array.toLocaleString(); // OK +str = float64Array.toLocaleString('en-US'); // should be error +str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error From 47f48d3bacd52fb09e43a7a83fea1927153b9e73 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Wed, 27 Mar 2024 10:40:05 -0700 Subject: [PATCH 7/9] Apply same single-line style to copied nodes as manufactured ones (#57890) Co-authored-by: TypeScript Bot --- src/compiler/checker.ts | 11 +- ...leTypesInNestedMemberTypeAnnotations.types | 2 +- ...onAndModuleWithSameNameAndCommonRoot.types | 2 +- ...leWithSameNameAndDifferentCommonRoot.types | 2 +- ...ithExportedAndNonExportedImportAlias.types | 2 +- .../accessorsOverrideProperty8.types | 2 +- .../reference/aliasUsageInObjectLiteral.types | 2 +- ...dThisPropertyInitializerDoesntNarrow.types | 2 +- tests/baselines/reference/anonterface.types | 2 +- .../anyAssignabilityInInheritance.types | 2 +- .../argumentExpressionContextualTyping.types | 2 +- .../arrayLiteralContextualType.types | 2 +- ...ayLiteralWithMultipleBestCommonTypes.types | 16 +-- .../reference/arraySigChecking.types | 2 +- .../reference/assignmentCompatBug5.types | 2 +- ...nmentCompatFunctionsWithOptionalArgs.types | 2 +- .../reference/assignmentCompatOnNew.types | 2 +- .../assignmentCompatWithCallSignatures3.types | 12 +- .../assignmentCompatWithCallSignatures4.types | 14 +-- .../assignmentCompatWithCallSignatures5.types | 12 +- .../assignmentCompatWithCallSignatures6.types | 10 +- ...gnmentCompatWithConstructSignatures3.types | 12 +- ...gnmentCompatWithConstructSignatures4.types | 14 +-- ...gnmentCompatWithConstructSignatures5.types | 12 +- ...gnmentCompatWithConstructSignatures6.types | 10 +- ...assignmentToParenthesizedIdentifiers.types | 2 +- ...ncFunctionReturnExpressionErrorSpans.types | 4 +- ...BindingElementWithLiteralInitializer.types | 2 +- .../reference/awaitUnionPromise.types | 2 +- .../reference/awaitedTypeStrictNull.types | 2 +- tests/baselines/reference/callChain.2.types | 4 +- tests/baselines/reference/callChain.3.types | 4 +- tests/baselines/reference/callChain.types | 4 +- ...SignatureAssignabilityInInheritance2.types | 12 +- ...SignatureAssignabilityInInheritance3.types | 14 +-- ...SignatureAssignabilityInInheritance4.types | 12 +- ...SignatureAssignabilityInInheritance5.types | 10 +- ...SignatureAssignabilityInInheritance6.types | 10 +- .../reference/callsOnComplexSignatures.types | 20 ++-- ...nedSpecializationToObjectTypeLiteral.types | 2 +- ...heckJsxSubtleSkipContextSensitiveBug.types | 2 +- .../reference/checkObjectDefineProperty.types | 2 +- .../circularReferenceInReturnType2.types | 2 +- .../classExtendsInterfaceInExpression.types | 2 +- .../coAndContraVariantInferences.types | 4 +- .../complexRecursiveCollections.types | 36 +++--- .../reference/complicatedPrivacy.types | 8 +- .../computedPropertiesInDestructuring1.types | 10 +- ...mputedPropertiesInDestructuring1_ES6.types | 10 +- .../computedPropertyNames48_ES5.types | 2 +- .../computedPropertyNames48_ES6.types | 2 +- ...itionalTypeAssignabilityWhenDeferred.types | 4 +- .../conditionalTypeDoesntSpinForever.types | 14 +-- .../reference/conditionalTypes1.types | 2 +- .../reference/conditionalTypes2.types | 4 +- .../constraintWithIndexedAccess.types | 2 +- ...SignatureAssignabilityInInheritance2.types | 12 +- ...SignatureAssignabilityInInheritance3.types | 14 +-- ...SignatureAssignabilityInInheritance4.types | 12 +- ...SignatureAssignabilityInInheritance5.types | 10 +- ...SignatureAssignabilityInInheritance6.types | 10 +- .../reference/constructorAsType.types | 4 +- ...tFromUnionWithPrimitiveNoImplicitAny.types | 2 +- .../contextualReturnTypeOfIIFE3.types | 2 +- ...itionalTypeInstantiationUsingDefault.types | 2 +- .../reference/contextualTypeFromJSDoc.types | 2 +- ...ntextualTypeOfIndexedAccessParameter.types | 4 +- .../reference/contextualTyping.types | 2 +- .../reference/contextualTyping23.types | 2 +- .../reference/contextualTyping24.types | 2 +- .../reference/contextualTyping25.types | 2 +- .../reference/contextualTyping26.types | 2 +- .../reference/contextualTyping27.types | 2 +- .../reference/contextualTyping32.types | 2 +- .../reference/contextualTyping33.types | 2 +- .../contextualTypingOfObjectLiterals.types | 2 +- .../contextualTypingOfOptionalMembers.types | 2 +- ...TypeAsyncFunctionReturnTypeFromUnion.types | 4 +- .../contextuallyTypedJsxChildren.types | 2 +- ...ty(exactoptionalpropertytypes=false).types | 2 +- ...rty(exactoptionalpropertytypes=true).types | 2 +- ...allyTypedParametersWithInitializers1.types | 4 +- ...allyTypedParametersWithInitializers2.types | 6 +- ...TypedStringLiteralsInJsxAttributes01.types | 4 +- .../controlFlowAliasedDiscriminants.types | 2 +- .../reference/controlFlowAliasing.types | 36 +++--- .../reference/controlFlowArrays.types | 2 +- ...FlowDestructuringVariablesInTryCatch.types | 2 +- .../reference/controlFlowGenericTypes.types | 2 +- .../reference/controlFlowInOperator.types | 2 +- .../controlFlowIterationErrorsAsync.types | 2 +- .../reference/controlFlowOptionalChain.types | 4 +- .../reference/controlFlowOptionalChain3.types | 4 +- ...tParametersOfFunctionAndFunctionType.types | 2 +- ...declarationEmitAliasFromIndirectFile.types | 4 +- ...clarationEmitArrowFunctionNoRenaming.types | 4 +- ...ationEmitBindingPatternsFunctionExpr.types | 4 +- ...declarationEmitBindingPatternsUnused.types | 8 +- .../declarationEmitDestructuring1.types | 4 +- ...OptionalBindingParametersInOverloads.types | 2 +- ...cturingWithOptionalBindingParameters.types | 2 +- ...nEmitDuplicateParameterDestructuring.types | 8 +- .../declarationEmitOptionalMethod.types | 4 +- .../reference/declarationMapsMultifile.types | 2 +- .../reference/declarationMapsOutFile.types | 2 +- .../reference/declarationMapsOutFile2.types | 2 +- .../declarationMapsWithSourceMap.types | 2 +- ...ertyCheckingWhenTargetIsIntersection.types | 4 +- .../deeplyNestedAssignabilityIssue.types | 4 +- .../reference/deeplyNestedMappedTypes.types | 58 ++++----- ...defaultDeclarationEmitNamedCorrectly.types | 4 +- ...eclarationEmitShadowedNamedCorrectly.types | 4 +- .../defaultValueInFunctionTypes.types | 2 +- .../deferredLookupTypeResolution.types | 2 +- tests/baselines/reference/deleteChain.types | 16 +-- .../dependentDestructuredVariables.types | 20 ++-- ...InterfaceIncompatibleWithBaseIndexer.types | 2 +- ...HiddenBaseCallViaSuperPropertyAccess.types | 4 +- .../destructionAssignmentError.types | 2 +- .../destructureOptionalParameter.types | 4 +- ...ucturedMaappedTypeIsNotImplicitlyAny.types | 2 +- .../destructuringAssignmentWithDefault.types | 4 +- .../reference/destructuringControlFlow.types | 4 +- ...estructuringParameterDeclaration1ES5.types | 14 +-- ...ringParameterDeclaration1ES5iterable.types | 14 +-- ...estructuringParameterDeclaration1ES6.types | 14 +-- .../destructuringParameterDeclaration2.types | 2 +- .../destructuringParameterDeclaration5.types | 6 +- .../destructuringParameterDeclaration8.types | 2 +- ...yAssignmentNameIsNotAssignmentTarget.types | 2 +- .../destructuringTypeGuardFlow.types | 2 +- ...ionsForExpressionsWhichCouldBeCalled.types | 2 +- ...y3(exactoptionalpropertytypes=false).types | 4 +- ...ty3(exactoptionalpropertytypes=true).types | 4 +- .../reference/discriminatedUnionTypes2.types | 12 +- ...iteralProperty_computedNameNegative1.types | 4 +- .../elaboratedErrorsOnNullableTargets01.types | 4 +- .../reference/elementAccessChain.2.types | 4 +- .../reference/elementAccessChain.types | 14 +-- ...BindingPatternInDeclarationSignature.types | 32 ++--- .../enumAssignabilityInInheritance.types | 2 +- .../reference/equalityStrictNulls.types | 2 +- .../errorsInGenericTypeReference.types | 10 +- .../esNextWeakRefs_IterableWeakMap.types | 4 +- .../excessPropertiesInOverloads.types | 4 +- ...tyCheckIntersectionWithRecursiveType.types | 2 +- .../excessPropertyCheckWithUnions.types | 2 +- ...yCheckingIntersectionWithConditional.types | 4 +- ...ropertyChecksWithNestedIntersections.types | 2 +- .../excessiveStackDepthFlatArray.types | 2 +- .../expandoFunctionContextualTypesJs.types | 2 +- .../forInStrictNullChecksNoError.types | 2 +- .../reference/freshLiteralInference.types | 2 +- .../reference/functionAssignment.types | 2 +- ...nWithArgumentOfTypeFunctionTypeArray.types | 2 +- .../reference/functionLiterals.types | 4 +- .../reference/functionOverloads14.types | 4 +- .../reference/functionOverloads15.types | 4 +- .../reference/functionOverloads16.types | 4 +- .../reference/functionOverloads17.types | 2 +- .../reference/functionOverloads18.types | 2 +- .../reference/functionOverloads19.types | 4 +- .../reference/functionOverloads20.types | 4 +- .../reference/functionOverloads21.types | 4 +- .../reference/functionOverloads22.types | 4 +- .../reference/functionOverloads34.types | 4 +- .../reference/functionOverloads35.types | 4 +- .../reference/functionOverloads36.types | 4 +- .../reference/functionOverloads37.types | 4 +- .../reference/functionOverloads38.types | 4 +- .../reference/functionOverloads39.types | 4 +- .../reference/functionOverloads40.types | 4 +- .../reference/functionOverloads41.types | 4 +- .../reference/functionOverloads42.types | 4 +- .../reference/functionOverloads43.types | 4 +- .../reference/functionOverloads44.types | 8 +- .../reference/functionOverloads45.types | 8 +- .../reference/functionReturnTypeQuery.types | 2 +- .../reference/generatedContextualTyping.types | 110 +++++++++--------- .../generatorReturnContextualType.types | 16 +-- .../genericArrayPropertyAssignment.types | 2 +- ...nericAssignmentCompatWithInterfaces1.types | 2 +- ...icCallWithConstructorTypedArguments5.types | 4 +- ...nericCallWithFunctionTypedArguments5.types | 4 +- .../genericCallWithObjectLiteralArgs.types | 2 +- ...nericCallWithObjectLiteralArguments1.types | 2 +- .../genericCallWithObjectTypeArgs2.types | 4 +- ...allWithObjectTypeArgsAndConstraints2.types | 2 +- ...allWithObjectTypeArgsAndConstraints3.types | 2 +- ...hOverloadedConstructorTypedArguments.types | 6 +- ...OverloadedConstructorTypedArguments2.types | 6 +- ...WithOverloadedFunctionTypedArguments.types | 6 +- ...ithOverloadedFunctionTypedArguments2.types | 6 +- .../reference/genericContextualTypes2.types | 6 +- .../reference/genericContextualTypes3.types | 6 +- .../reference/genericFunctionInference1.types | 22 ++-- .../reference/genericFunctionInference2.types | 2 +- .../reference/genericFunctionParameters.types | 2 +- ...ericFunctionsAndConditionalInference.types | 4 +- ...stantiationEquivalentToObjectLiteral.types | 2 +- .../reference/genericInterfaceTypeCall.types | 2 +- .../reference/genericRestTypes.types | 2 +- .../genericSpecializationToTypeLiteral1.types | 2 +- ...enericTypeWithNonGenericBaseMisMatch.types | 2 +- tests/baselines/reference/generics2.types | 2 +- .../reference/generics2NoError.types | 2 +- ...cMappedTypeIntersectionAssignability.types | 2 +- .../identityAndDivergentNormalizedTypes.types | 8 +- .../identityRelationNeverTypes.types | 2 +- .../reference/illegalGenericWrapping1.types | 2 +- ...yFunctionInvocationWithAnyArguements.types | 2 +- .../reference/implicitIndexSignatures.types | 4 +- .../reference/inKeywordAndIntersection.types | 2 +- .../inKeywordTypeguard(strict=false).types | 24 ++-- .../inKeywordTypeguard(strict=true).types | 24 ++-- .../reference/incompatibleTypes.types | 14 +-- .../indexSignatureAndMappedType.types | 6 +- .../reference/indexSignatureInOtherFile.types | 2 +- .../indexSignatureInOtherFile1.types | 2 +- ...peUnknownStillRequiresIndexSignature.types | 2 +- .../reference/indexSignatures1.types | 6 +- .../indexSignaturesInferentialTyping.types | 4 +- .../indexedAccessNormalization.types | 2 +- .../indexerReturningTypeParameter1.types | 4 +- .../indirectTypeParameterReferences.types | 2 +- .../reference/inferFromBindingPattern.types | 2 +- ...inferFromGenericFunctionReturnTypes3.types | 2 +- ...yWithContextSensitiveReturnStatement.types | 2 +- ...rStringLiteralUnionForBindingElement.types | 2 +- .../reference/inferTypePredicates.types | 2 +- tests/baselines/reference/inferTypes1.types | 4 +- .../inferenceOptionalProperties.types | 2 +- .../inferenceOptionalPropertiesStrict.types | 2 +- ...eOptionalPropertiesToIndexSignatures.types | 2 +- .../inferenceShouldFailOnEvolvingArrays.types | 4 +- ...erentialTypingWithFunctionTypeNested.types | 4 +- ...inferentialTypingWithFunctionTypeZip.types | 2 +- .../baselines/reference/inferingFromAny.types | 10 +- .../inferredIndexerOnNamespaceImport.types | 2 +- .../inferrenceInfiniteLoopWithSubtyping.types | 8 +- .../infinitelyGenerativeInheritance1.types | 4 +- ...arameterBeforeNonoptionalNotOptional.types | 6 +- ...lineJsxFactoryDeclarationsLocalTypes.types | 8 +- ...ofOperatorWithInvalidOperands.es2015.types | 4 +- .../reference/instantiationExpressions.types | 8 +- .../interfaceExtendsObjectIntersection.types | 2 +- .../reference/interfaceImplementation7.types | 6 +- .../interfacePropertiesWithSameName1.types | 6 +- .../interfacePropertiesWithSameName2.types | 10 +- ...nOfTypeVariableHasApparentSignatures.types | 2 +- .../reference/intersectionPropertyCheck.types | 6 +- .../reference/intersectionReduction.types | 10 +- .../intersectionReductionStrict.types | 8 +- .../intersectionTypeInference1.types | 10 +- .../intersectionTypeInference2.types | 2 +- .../reference/intersectionTypeMembers.types | 8 +- ...rsectionType_useDefineForClassFields.types | 2 +- ...ithConstructSignaturePrototypeResult.types | 2 +- .../reference/intraExpressionInferences.types | 44 +++---- .../isomorphicMappedTypeInference.types | 4 +- ...DeclarationsExportDefinePropertyEmit.types | 4 +- .../reference/jsDeclarationsFunctions.types | 4 +- .../jsDeclarationsFunctionsCjs.types | 4 +- .../jsDeclarationsReactComponents.types | 4 +- .../jsFileImportPreservedWhenUsed.types | 2 +- .../reference/jsdocFunctionType.types | 2 +- .../baselines/reference/jsdocParamTag2.types | 12 +- .../reference/jsdocTemplateTag6.types | 2 +- .../jsxCallbackWithDestructuring.types | 2 +- .../jsxChildrenGenericContextualTypes.types | 4 +- ...omplexSignatureHasApplicabilityError.types | 6 +- .../baselines/reference/jsxElementType.types | 20 ++-- .../reference/jsxEmitWithAttributes.types | 2 +- .../jsxFactoryAndReactNamespace.types | 2 +- .../reference/jsxFactoryIdentifier.types | 2 +- ...xFactoryNotIdentifierOrQualifiedName.types | 2 +- ...FactoryNotIdentifierOrQualifiedName2.types | 2 +- .../reference/jsxFactoryQualifiedName.types | 2 +- .../jsxIntrinsicElementsCompatability.types | 2 +- ...ibraryManagedAttributesUnusedGeneric.types | 4 +- .../jsxNamespaceGlobalReexport.types | 12 +- ...paceGlobalReexportMissingAliasTarget.types | 12 +- ...xNamespaceImplicitImportJSXNamespace.types | 12 +- .../reference/jsxPartialSpread.types | 6 +- tests/baselines/reference/keyofAndForIn.types | 2 +- .../reference/keyofAndIndexedAccess.types | 18 +-- .../reference/keyofAndIndexedAccess2.types | 10 +- .../logicalAssignment2(target=es2015).types | 4 +- .../logicalAssignment2(target=es2020).types | 4 +- .../logicalAssignment2(target=es2021).types | 4 +- .../logicalAssignment2(target=esnext).types | 4 +- .../mappedToToIndexSignatureInference.types | 2 +- .../reference/mappedTypeAsClauses.types | 2 +- .../mappedTypeContextualTypesApplied.types | 12 +- .../mappedTypeGenericIndexedAccess.types | 4 +- ...mappedTypeInferenceAliasSubstitution.types | 4 +- .../reference/mappedTypeInferenceErrors.types | 2 +- .../reference/mappedTypeModifiers.types | 4 +- .../reference/mappedTypeMultiInference.types | 2 +- ...mappedTypeNestedGenericInstantiation.types | 2 +- .../reference/mappedTypeWithAny.types | 4 +- tests/baselines/reference/mappedTypes1.types | 8 +- tests/baselines/reference/mappedTypes4.types | 4 +- .../methodSignaturesWithOverloads.types | 2 +- .../methodSignaturesWithOverloads2.types | 2 +- .../reference/mixinAccessModifiers.types | 4 +- .../reference/mixinClassesAnnotated.types | 4 +- .../moduleAliasAsFunctionArgument.types | 2 +- .../baselines/reference/multiLineErrors.types | 2 +- tests/baselines/reference/multiline.types | 2 +- ...ameterBIndingElementNameInInnerScope.types | 2 +- .../narrowingConstrainedTypeVariable.types | 2 +- .../reference/narrowingDestructuring.types | 2 +- ...nCaseClauseAfterCaseClauseWithReturn.types | 2 +- .../narrowingTypeofDiscriminant.types | 4 +- .../reference/narrowingTypeofFunction.types | 2 +- .../reference/narrowingTypeofObject.types | 4 +- .../reference/narrowingTypeofUndefined1.types | 2 +- .../reference/narrowingUnionToUnion.types | 8 +- ...rbyIdenticalGenericLambdasAssignable.types | 4 +- .../nestedExcessPropertyChecking.types | 16 +-- .../nestedTypeVariableInfersLiteral.types | 6 +- ...everAsDiscriminantType(strict=false).types | 2 +- ...neverAsDiscriminantType(strict=true).types | 2 +- .../reference/neverReturningFunctions1.types | 2 +- .../reference/neverTypeErrors1.types | 2 +- .../reference/neverTypeErrors2.types | 2 +- ...AnyDestructuringParameterDeclaration.types | 4 +- .../noImplicitReturnsExclusions.types | 2 +- tests/baselines/reference/noInfer.types | 6 +- .../nodeModuleReexportFromDottedPath.types | 2 +- ...DeclarationEmitErrors(module=node16).types | 4 +- ...clarationEmitErrors(module=nodenext).types | 4 +- ...eclarationEmitErrors1(module=node16).types | 4 +- ...larationEmitErrors1(module=nodenext).types | 4 +- .../reference/nonInstantiatedModule.types | 4 +- .../reference/nonNullMappedType.types | 2 +- .../objectLitTargetTypeCallSite.types | 2 +- .../objectLiteralContextualTyping.types | 2 +- ...LiteralShorthandPropertiesAssignment.types | 4 +- ...eralShorthandPropertiesAssignmentES6.types | 4 +- ...alShorthandPropertiesAssignmentError.types | 4 +- ...AssignmentErrorFromMissingIdentifier.types | 4 +- ...lShorthandPropertiesFunctionArgument.types | 2 +- ...ShorthandPropertiesFunctionArgument2.types | 2 +- tests/baselines/reference/objectRest.types | 8 +- .../reference/objectRestAssignment.types | 4 +- ...objectRestBindingContextualInference.types | 2 +- .../reference/objectRestNegative.types | 2 +- .../reference/objectRestParameter.types | 10 +- .../reference/objectRestParameterES5.types | 10 +- tests/baselines/reference/objectSpread.types | 14 +-- .../reference/objectSpreadStrictNull.types | 2 +- .../operationsAvailableOnPromisedType.types | 2 +- .../optionalBindingParameters2.types | 2 +- .../optionalBindingParameters4.types | 2 +- ...ptionalBindingParametersInOverloads2.types | 2 +- .../reference/optionalChainingInference.types | 2 +- ...ameterInDestructuringWithInitializer.types | 14 +-- .../reference/optionalPropertiesTest.types | 2 +- .../reference/overloadResolutionTest1.types | 12 +- ...structorFixesInferencesAppropriately.types | 2 +- .../overloadsWithProvisionalErrors.types | 4 +- tests/baselines/reference/override19.types | 2 +- .../parameterDestructuringObjectLiteral.types | 4 +- .../parameterNamesInTypeParameterList.types | 4 +- ...TypesWhenAppropriatelyContextualized.types | 2 +- .../parserShorthandPropertyAssignment1.types | 2 +- tests/baselines/reference/parserharness.types | 10 +- .../reference/primitiveUnionDetection.types | 2 +- .../privateNameAndPropertySignature.types | 4 +- .../privateNameInLhsReceiverExpression.types | 2 +- .../privateWriteOnlyAccessorRead.types | 4 +- .../reference/promisePermutations.types | 4 +- .../reference/promisePermutations2.types | 4 +- .../reference/promisePermutations3.types | 4 +- .../reference/propertyAccessChain.2.types | 4 +- .../reference/propertyAccessChain.types | 14 +-- .../reference/propertyAccessWidening.types | 2 +- .../reference/ramdaToolsNoInfinite2.types | 2 +- .../reactReadonlyHOCAssignabilityReal.types | 2 +- ...ssignmentInSubclassOfClassExpression.types | 2 +- .../reference/recursiveClassBaseType.types | 2 +- ...siveConditionalEvaluationNonInfinite.types | 2 +- .../reference/recursiveConditionalTypes.types | 4 +- .../reference/returnTypeTypeArguments.types | 2 +- ...reverseMappedPartiallyInferableTypes.types | 2 +- .../reverseMappedTypeAssignableToIndex.types | 2 +- ...erseMappedTypeIntersectionConstraint.types | 14 +-- ...appedTypePrimitiveConstraintProperty.types | 2 +- .../reverseMappedUnionInference.types | 2 +- ...irectedDeepObjectLiteralElaborations.types | 4 +- ...natureOverloadReturnTypeWithIndexers.types | 16 +-- .../spellingSuggestionJSXAttribute.types | 2 +- .../reference/spreadOverwritesProperty.types | 4 +- .../spreadOverwritesPropertyStrict.types | 14 +-- tests/baselines/reference/spreadUnion3.types | 4 +- .../reference/staticInheritance.types | 2 +- .../reference/strictOptionalProperties1.types | 8 +- .../reference/strictSubtypeAndNarrowing.types | 16 +-- .../strictTypeofUnionNarrowing.types | 4 +- .../subtypingWithCallSignatures2.types | 34 +++--- .../subtypingWithCallSignatures3.types | 34 +++--- .../subtypingWithCallSignatures4.types | 36 +++--- .../subtypingWithConstructSignatures2.types | 26 ++--- .../subtypingWithConstructSignatures3.types | 24 ++-- .../subtypingWithConstructSignatures4.types | 24 ++-- .../subtypingWithConstructSignatures5.types | 10 +- .../subtypingWithConstructSignatures6.types | 10 +- .../switchCaseCircularRefeference.types | 2 +- .../reference/symbolProperty21.types | 2 +- .../reference/symbolProperty35.types | 4 +- .../reference/symbolProperty41.types | 4 +- .../reference/symbolProperty61.types | 2 +- ...ingsWithManyCallAndMemberExpressions.types | 2 +- ...sWithManyCallAndMemberExpressionsES6.types | 2 +- .../taggedTemplatesWithTypeArguments1.types | 4 +- .../reference/targetTypeCastTest.types | 2 +- .../reference/targetTypeVoidFunc.types | 2 +- .../reference/templateLiteralTypes3.types | 4 +- .../reference/templateLiteralTypes4.types | 4 +- .../reference/templateLiteralTypes6.types | 2 +- .../templateLiteralTypesPatterns.types | 4 +- .../baselines/reference/thisInTypeQuery.types | 4 +- .../reference/thisTypeInFunctions.types | 38 +++--- .../thisTypeInFunctionsNegative.types | 38 +++--- .../reference/thisTypeSyntacticContext.types | 6 +- .../reference/tslibReExportHelpers2.types | 4 +- ...uteQuickinfoTypesSameAsObjectLiteral.types | 4 +- .../reference/tsxSfcReturnNull.types | 2 +- .../tsxSfcReturnNullStrictNullChecks.types | 2 +- ...sxSfcReturnUndefinedStrictNullChecks.types | 2 +- .../reference/tsxSpreadChildren.types | 2 +- ...InvalidType(jsx=react,target=es2015).types | 2 +- ...renInvalidType(jsx=react,target=es5).types | 2 +- ...lidType(jsx=react-jsx,target=es2015).types | 2 +- ...nvalidType(jsx=react-jsx,target=es5).types | 2 +- ...xStatelessFunctionComponentOverload1.types | 20 ++-- ...xStatelessFunctionComponentOverload2.types | 2 +- ...xStatelessFunctionComponentOverload3.types | 8 +- ...xStatelessFunctionComponentOverload4.types | 12 +- .../tsxStatelessFunctionComponents1.types | 4 +- .../tsxStatelessFunctionComponents2.types | 2 +- ...FunctionComponentsWithTypeArguments1.types | 4 +- ...FunctionComponentsWithTypeArguments2.types | 6 +- ...FunctionComponentsWithTypeArguments3.types | 8 +- ...FunctionComponentsWithTypeArguments4.types | 4 +- ...FunctionComponentsWithTypeArguments5.types | 4 +- tests/baselines/reference/tsxTypeErrors.types | 2 +- .../reference/tsxUnionElementType1.types | 4 +- .../reference/tsxUnionElementType2.types | 4 +- .../reference/tsxUnionElementType5.types | 2 +- .../reference/tsxUnionElementType6.types | 2 +- .../tsxUnionMemberChecksFilterDataProps.types | 4 +- .../reference/typeArgInference.types | 4 +- .../typeArgumentInferenceOrdering.types | 2 +- ...peArgumentInferenceWithObjectLiteral.types | 2 +- ...NarrowsIndexedAccessOfKnownProperty1.types | 4 +- ...NarrowsIndexedAccessOfKnownProperty5.types | 2 +- ...NarrowsIndexedAccessOfKnownProperty6.types | 2 +- .../typeGuardOfFormTypeOfFunction.types | 6 +- .../typeGuardOfFromPropNameInUnionType.types | 2 +- ...typeInferenceWithExcessPropertiesJsx.types | 2 +- .../reference/typeLiteralCallback.types | 2 +- tests/baselines/reference/typeMatch1.types | 2 +- tests/baselines/reference/typeName1.types | 6 +- .../typeParameterConstModifiers.types | 14 +-- ...ameterConstModifiersWithIntersection.types | 8 +- .../typeParametersInStaticMethods.types | 4 +- .../typePredicateStructuralMatch.types | 8 +- .../typeSatisfaction_errorLocations1.types | 16 +-- ...pertyaccessfromindexsignature=false).types | 2 +- ...opertyaccessfromindexsignature=true).types | 2 +- ...nce2(nouncheckedindexedaccess=false).types | 2 +- ...ance2(nouncheckedindexedaccess=true).types | 2 +- .../typeVariableConstraintIntersections.types | 2 +- .../reference/typeofObjectInference.types | 8 +- tests/baselines/reference/typeofThis.types | 4 +- .../types.asyncGenerators.es2018.1.types | 2 +- .../reference/undeclaredModuleError.types | 4 +- .../undefinedArgumentInference.types | 2 +- .../reference/unicodeEscapesInJsxtags.types | 4 +- .../unionAndIntersectionInference2.types | 2 +- ...onErrorMessageOnMatchingDiscriminant.types | 2 +- ...heckNoApparentPropTypeMismatchErrors.types | 4 +- .../unionReductionMutualSubtypes.types | 2 +- .../unionSignaturesWithThisParameter.types | 2 +- .../reference/unionTypeReduction2.types | 6 +- .../unionTypeWithIndexSignature.types | 2 +- tests/baselines/reference/uniqueSymbols.types | 4 +- .../reference/uniqueSymbolsDeclarations.types | 2 +- .../uniqueSymbolsDeclarationsErrors.types | 2 +- tests/baselines/reference/unknownType1.types | 2 +- tests/baselines/reference/unknownType2.types | 2 +- .../reference/varArgParamTypeCheck.types | 2 +- .../reference/varArgsOnConstructorTypes.types | 2 +- tests/baselines/reference/vardecl.types | 16 +-- ...aratorResolvedDuringContextualTyping.types | 2 +- .../baselines/reference/variadicTuples1.types | 4 +- .../vueLikeDataAndPropsInference.types | 4 +- .../vueLikeDataAndPropsInference2.types | 4 +- tests/baselines/reference/weakType.types | 6 +- tests/baselines/reference/widenToAny1.types | 2 +- 503 files changed, 1411 insertions(+), 1406 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c63a47d85502f..f8473dfba8b16 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -272,6 +272,7 @@ import { getEffectiveTypeParameterDeclarations, getElementOrPropertyAccessName, getEmitDeclarations, + getEmitFlags, getEmitModuleKind, getEmitModuleResolutionKind, getEmitScriptTarget, @@ -632,6 +633,7 @@ import { isLiteralTypeNode, isLogicalOrCoalescingBinaryExpression, isLogicalOrCoalescingBinaryOperator, + isMappedTypeNode, isMetaProperty, isMethodDeclaration, isMethodSignature, @@ -8620,7 +8622,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { cancellationToken.throwIfCancellationRequested(); } let hadError = false; - const file = getSourceFileOfNode(existing); const transformed = visitNode(existing, visitExistingNodeTreeSymbols, isTypeNode); if (hadError) { return undefined; @@ -8756,8 +8757,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } - if (file && isTupleTypeNode(node) && !nodeIsSynthesized(node) && (getLineAndCharacterOfPosition(file, node.pos).line === getLineAndCharacterOfPosition(file, node.end).line)) { - setEmitFlags(node, EmitFlags.SingleLine); + if (isTupleTypeNode(node) || isTypeLiteralNode(node) || isMappedTypeNode(node)) { + const visited = visitEachChild(node, visitExistingNodeTreeSymbols, /*context*/ undefined); + const clone = setTextRange(visited === node ? factory.cloneNode(node) : visited, node); + const flags = getEmitFlags(clone); + setEmitFlags(clone, flags | (context.flags & NodeBuilderFlags.MultilineObjectLiterals && isTypeLiteralNode(node) ? 0 : EmitFlags.SingleLine)); + return clone; } return visitEachChild(node, visitExistingNodeTreeSymbols, /*context*/ undefined); diff --git a/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.types b/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.types index b2b63a2c4e8e3..474e980c43ecb 100644 --- a/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.types +++ b/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.types @@ -13,7 +13,7 @@ module A { } export var UnitSquare : { ->UnitSquare : { top: { left: Point; right: Point;}; bottom: { left: Point; right: Point;}; } +>UnitSquare : { top: { left: Point; right: Point; }; bottom: { left: Point; right: Point; }; } top: { left: Point, right: Point }, >top : { left: Point; right: Point; } diff --git a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.types b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.types index 3e3334393fdbf..cce94ce1aac6d 100644 --- a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.types +++ b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.types @@ -35,7 +35,7 @@ module A { === test.ts === var fn: () => { x: number; y: number }; ->fn : () => { x: number; y: number;} +>fn : () => { x: number; y: number; } >x : number >y : number diff --git a/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.types b/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.types index 6a1233bff157b..5a250921afc07 100644 --- a/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.types +++ b/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.types @@ -35,7 +35,7 @@ module B { === test.ts === var fn: () => { x: number; y: number }; ->fn : () => { x: number; y: number;} +>fn : () => { x: number; y: number; } >x : number >y : number diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.types b/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.types index 1dc36a08ef444..648b7c84b09a0 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.types +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.types @@ -84,7 +84,7 @@ var p = Geometry.Origin; >Origin : A.Point var line: { start: { x: number; y: number }; end: { x: number; y: number; } }; ->line : { start: { x: number; y: number;}; end: { x: number; y: number;}; } +>line : { start: { x: number; y: number; }; end: { x: number; y: number; }; } >start : { x: number; y: number; } >x : number >y : number diff --git a/tests/baselines/reference/accessorsOverrideProperty8.types b/tests/baselines/reference/accessorsOverrideProperty8.types index f922554ae6740..4f88f1993b020 100644 --- a/tests/baselines/reference/accessorsOverrideProperty8.types +++ b/tests/baselines/reference/accessorsOverrideProperty8.types @@ -16,7 +16,7 @@ type AnyCtor

= new (...a: any[]) => P >a : any[] declare function classWithProperties(properties: T, klass: AnyCtor

): { ->classWithProperties : (properties: T, klass: AnyCtor

) => { new (): P & Properties; prototype: P & Properties;} +>classWithProperties : (properties: T, klass: AnyCtor

) => { new (): P & Properties; prototype: P & Properties; } >key : string >properties : T >klass : AnyCtor

diff --git a/tests/baselines/reference/aliasUsageInObjectLiteral.types b/tests/baselines/reference/aliasUsageInObjectLiteral.types index f523ac40b7f5c..7bae06186454e 100644 --- a/tests/baselines/reference/aliasUsageInObjectLiteral.types +++ b/tests/baselines/reference/aliasUsageInObjectLiteral.types @@ -30,7 +30,7 @@ var b: { x: IHasVisualizationModel } = { x: moduleA }; >moduleA : typeof moduleA var c: { y: { z: IHasVisualizationModel } } = { y: { z: moduleA } }; ->c : { y: { z: IHasVisualizationModel;}; } +>c : { y: { z: IHasVisualizationModel; }; } >y : { z: IHasVisualizationModel; } >z : IHasVisualizationModel >{ y: { z: moduleA } } : { y: { z: typeof moduleA; }; } diff --git a/tests/baselines/reference/annotatedThisPropertyInitializerDoesntNarrow.types b/tests/baselines/reference/annotatedThisPropertyInitializerDoesntNarrow.types index 45267a2357356..f257b2b453176 100644 --- a/tests/baselines/reference/annotatedThisPropertyInitializerDoesntNarrow.types +++ b/tests/baselines/reference/annotatedThisPropertyInitializerDoesntNarrow.types @@ -4,7 +4,7 @@ // from webpack/lib/Compilation.js and filed at #26427 /** @param {{ [s: string]: number }} map */ function mappy(map) {} ->mappy : (map: { [s: string]: number;}) => void +>mappy : (map: { [s: string]: number; }) => void >map : { [s: string]: number; } export class C { diff --git a/tests/baselines/reference/anonterface.types b/tests/baselines/reference/anonterface.types index 59405729860ad..fe06fc23f0ebc 100644 --- a/tests/baselines/reference/anonterface.types +++ b/tests/baselines/reference/anonterface.types @@ -8,7 +8,7 @@ module M { >C : C m(fn:{ (n:number):string; },n2:number):string { ->m : (fn: { (n: number): string;}, n2: number) => string +>m : (fn: { (n: number): string; }, n2: number) => string >fn : (n: number) => string >n : number >n2 : number diff --git a/tests/baselines/reference/anyAssignabilityInInheritance.types b/tests/baselines/reference/anyAssignabilityInInheritance.types index b96b62e1af6c4..4a007478c0618 100644 --- a/tests/baselines/reference/anyAssignabilityInInheritance.types +++ b/tests/baselines/reference/anyAssignabilityInInheritance.types @@ -85,7 +85,7 @@ var r3 = foo3(a); // any >a : any declare function foo7(x: { bar: number }): { bar: number }; ->foo7 : { (x: { bar: number;}): { bar: number;}; (x: any): any; } +>foo7 : { (x: { bar: number; }): { bar: number; }; (x: any): any; } >x : { bar: number; } >bar : number >bar : number diff --git a/tests/baselines/reference/argumentExpressionContextualTyping.types b/tests/baselines/reference/argumentExpressionContextualTyping.types index 7f2a00182a805..193f1b83252ce 100644 --- a/tests/baselines/reference/argumentExpressionContextualTyping.types +++ b/tests/baselines/reference/argumentExpressionContextualTyping.types @@ -47,7 +47,7 @@ var o = { x: ["string", 1], y: { c: true, d: "world", e: 3 } }; >3 : 3 var o1: { x: [string, number], y: { c: boolean, d: string, e: number } } = { x: ["string", 1], y: { c: true, d: "world", e: 3 } }; ->o1 : { x: [string, number]; y: { c: boolean; d: string; e: number;}; } +>o1 : { x: [string, number]; y: { c: boolean; d: string; e: number; }; } >x : [string, number] >y : { c: boolean; d: string; e: number; } >c : boolean diff --git a/tests/baselines/reference/arrayLiteralContextualType.types b/tests/baselines/reference/arrayLiteralContextualType.types index d1608304a946c..5af5173d6112b 100644 --- a/tests/baselines/reference/arrayLiteralContextualType.types +++ b/tests/baselines/reference/arrayLiteralContextualType.types @@ -35,7 +35,7 @@ function foo(animals: IAnimal[]) { } >animals : IAnimal[] function bar(animals: { [n: number]: IAnimal }) { } ->bar : (animals: { [n: number]: IAnimal;}) => void +>bar : (animals: { [n: number]: IAnimal; }) => void >animals : { [n: number]: IAnimal; } >n : number diff --git a/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.types b/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.types index 032764689df88..773948a4648f7 100644 --- a/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.types +++ b/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.types @@ -58,28 +58,28 @@ var es = [(x: string) => 2, (x: Object) => 1]; // { (x:string) => number }[] >1 : 1 var fs = [(a: { x: number; y?: number }) => 1, (b: { x: number; z?: number }) => 2]; // (a: { x: number; y?: number }) => number[] ->fs : (((a: { x: number; y?: number;}) => number) | ((b: { x: number; z?: number;}) => number))[] ->[(a: { x: number; y?: number }) => 1, (b: { x: number; z?: number }) => 2] : (((a: { x: number; y?: number;}) => number) | ((b: { x: number; z?: number;}) => number))[] ->(a: { x: number; y?: number }) => 1 : (a: { x: number; y?: number;}) => number +>fs : (((a: { x: number; y?: number; }) => number) | ((b: { x: number; z?: number; }) => number))[] +>[(a: { x: number; y?: number }) => 1, (b: { x: number; z?: number }) => 2] : (((a: { x: number; y?: number; }) => number) | ((b: { x: number; z?: number; }) => number))[] +>(a: { x: number; y?: number }) => 1 : (a: { x: number; y?: number; }) => number >a : { x: number; y?: number; } >x : number >y : number >1 : 1 ->(b: { x: number; z?: number }) => 2 : (b: { x: number; z?: number;}) => number +>(b: { x: number; z?: number }) => 2 : (b: { x: number; z?: number; }) => number >b : { x: number; z?: number; } >x : number >z : number >2 : 2 var gs = [(b: { x: number; z?: number }) => 2, (a: { x: number; y?: number }) => 1]; // (b: { x: number; z?: number }) => number[] ->gs : (((b: { x: number; z?: number;}) => number) | ((a: { x: number; y?: number;}) => number))[] ->[(b: { x: number; z?: number }) => 2, (a: { x: number; y?: number }) => 1] : (((b: { x: number; z?: number;}) => number) | ((a: { x: number; y?: number;}) => number))[] ->(b: { x: number; z?: number }) => 2 : (b: { x: number; z?: number;}) => number +>gs : (((b: { x: number; z?: number; }) => number) | ((a: { x: number; y?: number; }) => number))[] +>[(b: { x: number; z?: number }) => 2, (a: { x: number; y?: number }) => 1] : (((b: { x: number; z?: number; }) => number) | ((a: { x: number; y?: number; }) => number))[] +>(b: { x: number; z?: number }) => 2 : (b: { x: number; z?: number; }) => number >b : { x: number; z?: number; } >x : number >z : number >2 : 2 ->(a: { x: number; y?: number }) => 1 : (a: { x: number; y?: number;}) => number +>(a: { x: number; y?: number }) => 1 : (a: { x: number; y?: number; }) => number >a : { x: number; y?: number; } >x : number >y : number diff --git a/tests/baselines/reference/arraySigChecking.types b/tests/baselines/reference/arraySigChecking.types index 161463fd6e35d..0cea993b4faec 100644 --- a/tests/baselines/reference/arraySigChecking.types +++ b/tests/baselines/reference/arraySigChecking.types @@ -52,7 +52,7 @@ myArray = [[1, 2]]; >2 : 2 function isEmpty(l: { length: number }) { ->isEmpty : (l: { length: number;}) => boolean +>isEmpty : (l: { length: number; }) => boolean >l : { length: number; } >length : number diff --git a/tests/baselines/reference/assignmentCompatBug5.types b/tests/baselines/reference/assignmentCompatBug5.types index e2703de4e59d6..1c1035c5db89e 100644 --- a/tests/baselines/reference/assignmentCompatBug5.types +++ b/tests/baselines/reference/assignmentCompatBug5.types @@ -2,7 +2,7 @@ === assignmentCompatBug5.ts === function foo1(x: { a: number; }) { } ->foo1 : (x: { a: number;}) => void +>foo1 : (x: { a: number; }) => void >x : { a: number; } >a : number diff --git a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.types b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.types index a86aed10bb821..4c404293ccfbc 100644 --- a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.types +++ b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.types @@ -2,7 +2,7 @@ === assignmentCompatFunctionsWithOptionalArgs.ts === function foo(x: { id: number; name?: string; }): void; ->foo : (x: { id: number; name?: string;}) => void +>foo : (x: { id: number; name?: string; }) => void >x : { id: number; name?: string; } >id : number >name : string diff --git a/tests/baselines/reference/assignmentCompatOnNew.types b/tests/baselines/reference/assignmentCompatOnNew.types index 2982bd7e03286..7e5cc3a44b1dc 100644 --- a/tests/baselines/reference/assignmentCompatOnNew.types +++ b/tests/baselines/reference/assignmentCompatOnNew.types @@ -5,7 +5,7 @@ class Foo{}; >Foo : Foo function bar(x: {new(): Foo;}){} ->bar : (x: { new (): Foo;}) => void +>bar : (x: { new (): Foo; }) => void >x : new () => Foo bar(Foo); // Error, but should be allowed diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.types b/tests/baselines/reference/assignmentCompatWithCallSignatures3.types index 62cb6fadbe7de..4897e7a9ff40b 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.types +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.types @@ -76,7 +76,7 @@ var a10: (...x: Derived[]) => Derived; >x : Derived[] var a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base; ->a11 : (x: { foo: string;}, y: { foo: string; bar: string;}) => Base +>a11 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base >x : { foo: string; } >foo : string >y : { foo: string; bar: string; } @@ -94,7 +94,7 @@ var a13: (x: Array, y: Array) => Array; >y : Derived[] var a14: (x: { a: string; b: number }) => Object; ->a14 : (x: { a: string; b: number;}) => Object +>a14 : (x: { a: string; b: number; }) => Object >x : { a: string; b: number; } >a : string >b : number @@ -130,7 +130,7 @@ var a17: { }; var a18: { ->a18 : { (x: { (a: number): number; (a: string): string;}): any[]; (x: { (a: boolean): boolean; (a: Date): Date;}): any[]; } +>a18 : { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; } (x: { >x : { (a: number): number; (a: string): string; } @@ -276,10 +276,10 @@ b8 = a8; // ok >a8 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived var b9: (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; ->b9 : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number;}) => U) => (r: T) => U +>b9 : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U >x : (arg: T) => U >arg : T ->y : (arg2: { foo: string; bing: number;}) => U +>y : (arg2: { foo: string; bing: number; }) => U >arg2 : { foo: string; bing: number; } >foo : string >bing : number @@ -355,7 +355,7 @@ b13 = a13; // ok >a13 : (x: Base[], y: Derived[]) => Derived[] var b14: (x: { a: T; b: T }) => T; ->b14 : (x: { a: T; b: T;}) => T +>b14 : (x: { a: T; b: T; }) => T >x : { a: T; b: T; } >a : T >b : T diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.types b/tests/baselines/reference/assignmentCompatWithCallSignatures4.types index ec644d70aa889..9403061bf2771 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.types +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.types @@ -52,7 +52,7 @@ module Errors { >x : Base[] var a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base; ->a11 : (x: { foo: string;}, y: { foo: string; bar: string;}) => Base +>a11 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base >x : { foo: string; } >foo : string >y : { foo: string; bar: string; } @@ -75,13 +75,13 @@ module Errors { }; var a15: (x: { a: string; b: number }) => number; ->a15 : (x: { a: string; b: number;}) => number +>a15 : (x: { a: string; b: number; }) => number >x : { a: string; b: number; } >a : string >b : number var a16: { ->a16 : { (x: { (a: number): number; (a?: number): number;}): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean;}): boolean[]; } +>a16 : { (x: { (a: number): number; (a?: number): number; }): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean; }): boolean[]; } (x: { >x : { (a: number): number; (a?: number): number; } @@ -160,10 +160,10 @@ module Errors { >a7 : (x: (arg: Base) => Derived) => (r: Base) => Derived2 var b8: (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; ->b8 : (x: (arg: T) => U, y: (arg2: { foo: number;}) => U) => (r: T) => U +>b8 : (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U >x : (arg: T) => U >arg : T ->y : (arg2: { foo: number;}) => U +>y : (arg2: { foo: number; }) => U >arg2 : { foo: number; } >foo : number >r : T @@ -224,7 +224,7 @@ module Errors { >a12 : (x: Base[], y: Derived2[]) => Derived[] var b15: (x: { a: T; b: T }) => T; ->b15 : (x: { a: T; b: T;}) => T +>b15 : (x: { a: T; b: T; }) => T >x : { a: T; b: T; } >a : T >b : T @@ -240,7 +240,7 @@ module Errors { >a15 : (x: { a: string; b: number; }) => number var b15a: (x: { a: T; b: T }) => number; ->b15a : (x: { a: T; b: T;}) => number +>b15a : (x: { a: T; b: T; }) => number >x : { a: T; b: T; } >a : T >b : T diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures5.types b/tests/baselines/reference/assignmentCompatWithCallSignatures5.types index 09484fb912718..3ec7b4b221f7a 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures5.types +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures5.types @@ -50,7 +50,7 @@ var a6: (x: (arg: T) => Derived) => T; >arg : T var a11: (x: { foo: T }, y: { foo: T; bar: T }) => Base; ->a11 : (x: { foo: T;}, y: { foo: T; bar: T;}) => Base +>a11 : (x: { foo: T; }, y: { foo: T; bar: T; }) => Base >x : { foo: T; } >foo : T >y : { foo: T; bar: T; } @@ -58,13 +58,13 @@ var a11: (x: { foo: T }, y: { foo: T; bar: T }) => Base; >bar : T var a15: (x: { a: T; b: T }) => T[]; ->a15 : (x: { a: T; b: T;}) => T[] +>a15 : (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T var a16: (x: { a: T; b: T }) => T[]; ->a16 : (x: { a: T; b: T;}) => T[] +>a16 : (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T @@ -194,7 +194,7 @@ b6 = a6; // ok >a6 : (x: (arg: T) => Derived) => T var b11: (x: { foo: T }, y: { foo: U; bar: U }) => Base; ->b11 : (x: { foo: T;}, y: { foo: U; bar: U;}) => Base +>b11 : (x: { foo: T; }, y: { foo: U; bar: U; }) => Base >x : { foo: T; } >foo : T >y : { foo: U; bar: U; } @@ -212,7 +212,7 @@ b11 = a11; // ok >a11 : (x: { foo: T; }, y: { foo: T; bar: T; }) => Base var b15: (x: { a: U; b: V; }) => U[]; ->b15 : (x: { a: U; b: V;}) => U[] +>b15 : (x: { a: U; b: V; }) => U[] >x : { a: U; b: V; } >a : U >b : V @@ -228,7 +228,7 @@ b15 = a15; // ok >a15 : (x: { a: T; b: T; }) => T[] var b16: (x: { a: T; b: T }) => T[]; ->b16 : (x: { a: T; b: T;}) => T[] +>b16 : (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures6.types b/tests/baselines/reference/assignmentCompatWithCallSignatures6.types index bf438aba65cd1..23f7daaf22374 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures6.types +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures6.types @@ -51,7 +51,7 @@ interface A { >arg : T a11: (x: { foo: T }, y: { foo: T; bar: T }) => Base; ->a11 : (x: { foo: T;}, y: { foo: T; bar: T;}) => Base +>a11 : (x: { foo: T; }, y: { foo: T; bar: T; }) => Base >x : { foo: T; } >foo : T >y : { foo: T; bar: T; } @@ -59,13 +59,13 @@ interface A { >bar : T a15: (x: { a: T; b: T }) => T[]; ->a15 : (x: { a: T; b: T;}) => T[] +>a15 : (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T a16: (x: { a: T; b: T }) => T[]; ->a16 : (x: { a: T; b: T;}) => T[] +>a16 : (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T @@ -167,7 +167,7 @@ b5 = x.a5; >a5 : (x: (arg: T) => U) => T var b11: (x: { foo: T }, y: { foo: U; bar: U }) => Base; ->b11 : (x: { foo: T;}, y: { foo: U; bar: U;}) => Base +>b11 : (x: { foo: T; }, y: { foo: U; bar: U; }) => Base >x : { foo: T; } >foo : T >y : { foo: U; bar: U; } @@ -189,7 +189,7 @@ b11 = x.a11; >a11 : (x: { foo: T; }, y: { foo: T; bar: T; }) => Base var b16: (x: { a: T; b: T }) => T[]; ->b16 : (x: { a: T; b: T;}) => T[] +>b16 : (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.types b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.types index 02c9dddbcc30f..380cf283f4c78 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.types +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.types @@ -76,7 +76,7 @@ var a10: new (...x: Derived[]) => Derived; >x : Derived[] var a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; ->a11 : new (x: { foo: string;}, y: { foo: string; bar: string;}) => Base +>a11 : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base >x : { foo: string; } >foo : string >y : { foo: string; bar: string; } @@ -94,7 +94,7 @@ var a13: new (x: Array, y: Array) => Array; >y : Derived[] var a14: new (x: { a: string; b: number }) => Object; ->a14 : new (x: { a: string; b: number;}) => Object +>a14 : new (x: { a: string; b: number; }) => Object >x : { a: string; b: number; } >a : string >b : number @@ -130,7 +130,7 @@ var a17: { }; var a18: { ->a18 : { new (x: { new (a: number): number; new (a: string): string;}): any[]; new (x: { new (a: boolean): boolean; new (a: Date): Date;}): any[]; } +>a18 : { new (x: { new (a: number): number; new (a: string): string; }): any[]; new (x: { new (a: boolean): boolean; new (a: Date): Date; }): any[]; } new (x: { >x : { new (a: number): number; new (a: string): string; } @@ -276,10 +276,10 @@ b8 = a8; // ok >a8 : new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived var b9: new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; ->b9 : new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number;}) => U) => (r: T) => U +>b9 : new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U >x : (arg: T) => U >arg : T ->y : (arg2: { foo: string; bing: number;}) => U +>y : (arg2: { foo: string; bing: number; }) => U >arg2 : { foo: string; bing: number; } >foo : string >bing : number @@ -355,7 +355,7 @@ b13 = a13; // ok >a13 : new (x: Base[], y: Derived[]) => Derived[] var b14: new (x: { a: T; b: T }) => T; ->b14 : new (x: { a: T; b: T;}) => T +>b14 : new (x: { a: T; b: T; }) => T >x : { a: T; b: T; } >a : T >b : T diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.types b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.types index d58c6ad783bdd..e066fe2d64f06 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.types +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.types @@ -52,7 +52,7 @@ module Errors { >x : Base[] var a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; ->a11 : new (x: { foo: string;}, y: { foo: string; bar: string;}) => Base +>a11 : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base >x : { foo: string; } >foo : string >y : { foo: string; bar: string; } @@ -75,13 +75,13 @@ module Errors { }; var a15: new (x: { a: string; b: number }) => number; ->a15 : new (x: { a: string; b: number;}) => number +>a15 : new (x: { a: string; b: number; }) => number >x : { a: string; b: number; } >a : string >b : number var a16: { ->a16 : { new (x: { new (a: number): number; new (a?: number): number;}): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean;}): boolean[]; } +>a16 : { new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; } new (x: { >x : { new (a: number): number; new (a?: number): number; } @@ -160,10 +160,10 @@ module Errors { >a7 : new (x: (arg: Base) => Derived) => (r: Base) => Derived2 var b8: new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; ->b8 : new (x: (arg: T) => U, y: (arg2: { foo: number;}) => U) => (r: T) => U +>b8 : new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U >x : (arg: T) => U >arg : T ->y : (arg2: { foo: number;}) => U +>y : (arg2: { foo: number; }) => U >arg2 : { foo: number; } >foo : number >r : T @@ -224,7 +224,7 @@ module Errors { >a12 : new (x: Base[], y: Derived2[]) => Derived[] var b15: new (x: { a: T; b: T }) => T; ->b15 : new (x: { a: T; b: T;}) => T +>b15 : new (x: { a: T; b: T; }) => T >x : { a: T; b: T; } >a : T >b : T @@ -240,7 +240,7 @@ module Errors { >a15 : new (x: { a: string; b: number; }) => number var b15a: new (x: { a: T; b: T }) => number; ->b15a : new (x: { a: T; b: T;}) => number +>b15a : new (x: { a: T; b: T; }) => number >x : { a: T; b: T; } >a : T >b : T diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.types b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.types index bdc3a654cf402..6e208fadc12a1 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.types +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.types @@ -50,7 +50,7 @@ var a6: new (x: new (arg: T) => Derived) => T; >arg : T var a11: new (x: { foo: T }, y: { foo: T; bar: T }) => Base; ->a11 : new (x: { foo: T;}, y: { foo: T; bar: T;}) => Base +>a11 : new (x: { foo: T; }, y: { foo: T; bar: T; }) => Base >x : { foo: T; } >foo : T >y : { foo: T; bar: T; } @@ -58,13 +58,13 @@ var a11: new (x: { foo: T }, y: { foo: T; bar: T }) => Base; >bar : T var a15: new (x: { a: T; b: T }) => T[]; ->a15 : new (x: { a: T; b: T;}) => T[] +>a15 : new (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T var a16: new (x: { a: T; b: T }) => T[]; ->a16 : new (x: { a: T; b: T;}) => T[] +>a16 : new (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T @@ -194,7 +194,7 @@ b6 = a6; // ok >a6 : new (x: new (arg: T) => Derived) => T var b11: new (x: { foo: T }, y: { foo: U; bar: U }) => Base; ->b11 : new (x: { foo: T;}, y: { foo: U; bar: U;}) => Base +>b11 : new (x: { foo: T; }, y: { foo: U; bar: U; }) => Base >x : { foo: T; } >foo : T >y : { foo: U; bar: U; } @@ -212,7 +212,7 @@ b11 = a11; // ok >a11 : new (x: { foo: T; }, y: { foo: T; bar: T; }) => Base var b15: new (x: { a: U; b: V; }) => U[]; ->b15 : new (x: { a: U; b: V;}) => U[] +>b15 : new (x: { a: U; b: V; }) => U[] >x : { a: U; b: V; } >a : U >b : V @@ -228,7 +228,7 @@ b15 = a15; // ok >a15 : new (x: { a: T; b: T; }) => T[] var b16: new (x: { a: T; b: T }) => T[]; ->b16 : new (x: { a: T; b: T;}) => T[] +>b16 : new (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.types b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.types index 34d3518a3b1d3..5c1b806659a56 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.types +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.types @@ -51,7 +51,7 @@ interface A { >arg : T a11: new (x: { foo: T }, y: { foo: T; bar: T }) => Base; ->a11 : new (x: { foo: T;}, y: { foo: T; bar: T;}) => Base +>a11 : new (x: { foo: T; }, y: { foo: T; bar: T; }) => Base >x : { foo: T; } >foo : T >y : { foo: T; bar: T; } @@ -59,13 +59,13 @@ interface A { >bar : T a15: new (x: { a: T; b: T }) => T[]; ->a15 : new (x: { a: T; b: T;}) => T[] +>a15 : new (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T a16: new (x: { a: T; b: T }) => T[]; ->a16 : new (x: { a: T; b: T;}) => T[] +>a16 : new (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T @@ -167,7 +167,7 @@ b5 = x.a5; >a5 : new (x: (arg: T) => U) => T var b11: new (x: { foo: T }, y: { foo: U; bar: U }) => Base; ->b11 : new (x: { foo: T;}, y: { foo: U; bar: U;}) => Base +>b11 : new (x: { foo: T; }, y: { foo: U; bar: U; }) => Base >x : { foo: T; } >foo : T >y : { foo: U; bar: U; } @@ -189,7 +189,7 @@ b11 = x.a11; >a11 : new (x: { foo: T; }, y: { foo: T; bar: T; }) => Base var b16: new (x: { a: T; b: T }) => T[]; ->b16 : new (x: { a: T; b: T;}) => T[] +>b16 : new (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T diff --git a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.types b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.types index 9e4ac0ffb949c..d0239ece68bf1 100644 --- a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.types +++ b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.types @@ -186,7 +186,7 @@ fn = () => 3; // Bug 823548: Should be error (fn is not a reference) >3 : 3 function fn2(x: number, y: { t: number }) { ->fn2 : (x: number, y: { t: number;}) => void +>fn2 : (x: number, y: { t: number; }) => void >x : number >y : { t: number; } >t : number diff --git a/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.types b/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.types index c27188b2d2ee7..40097f5204b33 100644 --- a/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.types +++ b/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.types @@ -3,10 +3,10 @@ === asyncFunctionReturnExpressionErrorSpans.ts === interface Foo { bar: { ->bar : { baz: { inner: { thing: string; };}; } +>bar : { baz: { inner: { thing: string; }; }; } baz: { ->baz : { inner: { thing: string;}; } +>baz : { inner: { thing: string; }; } inner: { >inner : { thing: string; } diff --git a/tests/baselines/reference/avoidNarrowingUsingConstVariableFromBindingElementWithLiteralInitializer.types b/tests/baselines/reference/avoidNarrowingUsingConstVariableFromBindingElementWithLiteralInitializer.types index 649ba1345430e..6856d9ae98680 100644 --- a/tests/baselines/reference/avoidNarrowingUsingConstVariableFromBindingElementWithLiteralInitializer.types +++ b/tests/baselines/reference/avoidNarrowingUsingConstVariableFromBindingElementWithLiteralInitializer.types @@ -5,7 +5,7 @@ declare const foo: ["a", string, number] | ["b", string, boolean]; >foo : ["a", string, number] | ["b", string, boolean] export function test(arg: { index?: number }) { ->test : (arg: { index?: number;}) => void +>test : (arg: { index?: number; }) => void >arg : { index?: number | undefined; } >index : number | undefined diff --git a/tests/baselines/reference/awaitUnionPromise.types b/tests/baselines/reference/awaitUnionPromise.types index 14c95ffdb4585..f5e99c33b690c 100644 --- a/tests/baselines/reference/awaitUnionPromise.types +++ b/tests/baselines/reference/awaitUnionPromise.types @@ -17,7 +17,7 @@ interface IAsyncEnumerator { >next3 : () => Promise next4(): Promise; ->next4 : () => Promise +>next4 : () => Promise >x : string } diff --git a/tests/baselines/reference/awaitedTypeStrictNull.types b/tests/baselines/reference/awaitedTypeStrictNull.types index 4c794d3bcbc87..3aab16f161bfb 100644 --- a/tests/baselines/reference/awaitedTypeStrictNull.types +++ b/tests/baselines/reference/awaitedTypeStrictNull.types @@ -175,7 +175,7 @@ interface Obj { x: number } >x : number async function fn(): Promise { ->fn : () => Promise +>fn : () => Promise // Per #45924, this was failing due to incorrect inference both above and here. // Should not error. diff --git a/tests/baselines/reference/callChain.2.types b/tests/baselines/reference/callChain.2.types index 845e3dfea5848..a23a131657a0b 100644 --- a/tests/baselines/reference/callChain.2.types +++ b/tests/baselines/reference/callChain.2.types @@ -19,8 +19,8 @@ o2?.b(); >b : () => number declare const o3: { b: (() => { c: string }) | undefined }; ->o3 : { b: (() => { c: string;}) | undefined; } ->b : () => { c: string;} +>o3 : { b: (() => { c: string; }) | undefined; } +>b : () => { c: string; } >c : string o3.b?.().c; diff --git a/tests/baselines/reference/callChain.3.types b/tests/baselines/reference/callChain.3.types index feee4365c3f6a..8d6cc701e61c3 100644 --- a/tests/baselines/reference/callChain.3.types +++ b/tests/baselines/reference/callChain.3.types @@ -5,8 +5,8 @@ declare function absorb(): T; >absorb : () => T declare const a: { m?(obj: {x: T}): T } | undefined; ->a : { m?(obj: { x: T;}): T; } | undefined ->m : ((obj: { x: T;}) => T) | undefined +>a : { m?(obj: { x: T; }): T; } | undefined +>m : ((obj: { x: T; }) => T) | undefined >obj : { x: T; } >x : T diff --git a/tests/baselines/reference/callChain.types b/tests/baselines/reference/callChain.types index aafdc88d22f5d..0b327b0adb557 100644 --- a/tests/baselines/reference/callChain.types +++ b/tests/baselines/reference/callChain.types @@ -108,8 +108,8 @@ o2?.["b"](1, ...[2, 3], 4); >4 : 4 declare const o3: { b: ((...args: any[]) => { c: string }) | undefined }; ->o3 : { b: ((...args: any[]) => { c: string;}) | undefined; } ->b : ((...args: any[]) => { c: string;}) | undefined +>o3 : { b: ((...args: any[]) => { c: string; }) | undefined; } +>b : ((...args: any[]) => { c: string; }) | undefined >args : any[] >c : string diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.types b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.types index 65468978985a7..35ee53fd23f48 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.types +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.types @@ -78,7 +78,7 @@ interface A { // T >x : Derived[] a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base; ->a11 : (x: { foo: string;}, y: { foo: string; bar: string;}) => Base +>a11 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base >x : { foo: string; } >foo : string >y : { foo: string; bar: string; } @@ -96,7 +96,7 @@ interface A { // T >y : Derived[] a14: (x: { a: string; b: number }) => Object; ->a14 : (x: { a: string; b: number;}) => Object +>a14 : (x: { a: string; b: number; }) => Object >x : { a: string; b: number; } >a : string >b : number @@ -134,7 +134,7 @@ interface A { // T }; a18: { ->a18 : { (x: { (a: number): number; (a: string): string;}): any[]; (x: { (a: boolean): boolean; (a: Date): Date;}): any[]; } +>a18 : { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; } (x: { >x : { (a: number): number; (a: string): string; } @@ -204,10 +204,10 @@ interface I extends A { >r : T a9: (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; // ok, same as a8 with compatible object literal ->a9 : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number;}) => U) => (r: T) => U +>a9 : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U >x : (arg: T) => U >arg : T ->y : (arg2: { foo: string; bing: number;}) => U +>y : (arg2: { foo: string; bing: number; }) => U >arg2 : { foo: string; bing: number; } >foo : string >bing : number @@ -233,7 +233,7 @@ interface I extends A { >y : T a14: (x: { a: T; b: U }) => T; // ok ->a14 : (x: { a: T; b: U;}) => T +>a14 : (x: { a: T; b: U; }) => T >x : { a: T; b: U; } >a : T >b : U diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.types b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.types index 33b648a0d18cb..fba93e4b9aaf1 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.types +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.types @@ -52,7 +52,7 @@ module Errors { >x : Base[] a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base; ->a11 : (x: { foo: string;}, y: { foo: string; bar: string;}) => Base +>a11 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base >x : { foo: string; } >foo : string >y : { foo: string; bar: string; } @@ -75,13 +75,13 @@ module Errors { }; a15: (x: { a: string; b: number }) => number; ->a15 : (x: { a: string; b: number;}) => number +>a15 : (x: { a: string; b: number; }) => number >x : { a: string; b: number; } >a : string >b : number a16: { ->a16 : { (x: { (a: number): number; (a?: number): number;}): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean;}): boolean[]; } +>a16 : { (x: { (a: number): number; (a?: number): number; }): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean; }): boolean[]; } // type of parameter is overload set which means we can't do inference based on this type (x: { @@ -154,10 +154,10 @@ module Errors { interface I4 extends A { a8: (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; // error, type mismatch ->a8 : (x: (arg: T) => U, y: (arg2: { foo: number;}) => U) => (r: T) => U +>a8 : (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U >x : (arg: T) => U >arg : T ->y : (arg2: { foo: number;}) => U +>y : (arg2: { foo: number; }) => U >arg2 : { foo: number; } >foo : number >r : T @@ -185,7 +185,7 @@ module Errors { interface I6 extends A { a15: (x: { a: T; b: T }) => T; // error, T is {} which isn't an acceptable return type ->a15 : (x: { a: T; b: T;}) => T +>a15 : (x: { a: T; b: T; }) => T >x : { a: T; b: T; } >a : T >b : T @@ -193,7 +193,7 @@ module Errors { interface I7 extends A { a15: (x: { a: T; b: T }) => number; // error, T defaults to Base, which is not compatible with number or string ->a15 : (x: { a: T; b: T;}) => number +>a15 : (x: { a: T; b: T; }) => number >x : { a: T; b: T; } >a : T >b : T diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.types b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.types index 2d5836fedf90a..bc30e2f3fcaf0 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.types +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.types @@ -52,7 +52,7 @@ interface A { // T >arg : T a11: (x: { foo: T }, y: { foo: T; bar: T }) => Base; ->a11 : (x: { foo: T;}, y: { foo: T; bar: T;}) => Base +>a11 : (x: { foo: T; }, y: { foo: T; bar: T; }) => Base >x : { foo: T; } >foo : T >y : { foo: T; bar: T; } @@ -60,13 +60,13 @@ interface A { // T >bar : T a15: (x: { a: T; b: T }) => T[]; ->a15 : (x: { a: T; b: T;}) => T[] +>a15 : (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T a16: (x: { a: T; b: T }) => T[]; ->a16 : (x: { a: T; b: T;}) => T[] +>a16 : (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T @@ -140,7 +140,7 @@ interface I extends A { >arg : T a11: (x: { foo: T }, y: { foo: U; bar: U }) => Base; // ok ->a11 : (x: { foo: T;}, y: { foo: U; bar: U;}) => Base +>a11 : (x: { foo: T; }, y: { foo: U; bar: U; }) => Base >x : { foo: T; } >foo : T >y : { foo: U; bar: U; } @@ -148,13 +148,13 @@ interface I extends A { >bar : U a15: (x: { a: U; b: V; }) => U[]; // ok, T = U, T = V ->a15 : (x: { a: U; b: V;}) => U[] +>a15 : (x: { a: U; b: V; }) => U[] >x : { a: U; b: V; } >a : U >b : V a16: (x: { a: T; b: T }) => T[]; // ok, more general parameter type ->a16 : (x: { a: T; b: T;}) => T[] +>a16 : (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.types b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.types index bb866c1b5abb2..645f8d5da0c6a 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.types +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.types @@ -79,7 +79,7 @@ interface A { // T >x : Derived[] a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base; ->a11 : (x: { foo: string;}, y: { foo: string; bar: string;}) => Base +>a11 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base >x : { foo: string; } >foo : string >y : { foo: string; bar: string; } @@ -97,7 +97,7 @@ interface A { // T >y : Derived[] a14: (x: { a: string; b: number }) => Object; ->a14 : (x: { a: string; b: number;}) => Object +>a14 : (x: { a: string; b: number; }) => Object >x : { a: string; b: number; } >a : string >b : number @@ -154,10 +154,10 @@ interface I extends B { >r : T a9: (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; // ok, same as a8 with compatible object literal ->a9 : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number;}) => U) => (r: T) => U +>a9 : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U >x : (arg: T) => U >arg : T ->y : (arg2: { foo: string; bing: number;}) => U +>y : (arg2: { foo: string; bing: number; }) => U >arg2 : { foo: string; bing: number; } >foo : string >bing : number @@ -183,7 +183,7 @@ interface I extends B { >y : T a14: (x: { a: T; b: U }) => T; // ok ->a14 : (x: { a: T; b: U;}) => T +>a14 : (x: { a: T; b: U; }) => T >x : { a: T; b: U; } >a : T >b : U diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.types b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.types index ac83097c9d5d5..22784d283b5b7 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.types +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.types @@ -54,7 +54,7 @@ interface A { // T >arg : T a11: (x: { foo: T }, y: { foo: T; bar: T }) => Base; ->a11 : (x: { foo: T;}, y: { foo: T; bar: T;}) => Base +>a11 : (x: { foo: T; }, y: { foo: T; bar: T; }) => Base >x : { foo: T; } >foo : T >y : { foo: T; bar: T; } @@ -62,13 +62,13 @@ interface A { // T >bar : T a15: (x: { a: T; b: T }) => T[]; ->a15 : (x: { a: T; b: T;}) => T[] +>a15 : (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T a16: (x: { a: T; b: T }) => T[]; ->a16 : (x: { a: T; b: T;}) => T[] +>a16 : (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T @@ -109,7 +109,7 @@ interface I5 extends A { interface I7 extends A { a11: (x: { foo: T }, y: { foo: U; bar: U }) => Base; ->a11 : (x: { foo: T;}, y: { foo: U; bar: U;}) => Base +>a11 : (x: { foo: T; }, y: { foo: U; bar: U; }) => Base >x : { foo: T; } >foo : T >y : { foo: U; bar: U; } @@ -119,7 +119,7 @@ interface I7 extends A { interface I9 extends A { a16: (x: { a: T; b: T }) => T[]; ->a16 : (x: { a: T; b: T;}) => T[] +>a16 : (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T diff --git a/tests/baselines/reference/callsOnComplexSignatures.types b/tests/baselines/reference/callsOnComplexSignatures.types index d28003ca6a253..f04658a7771e4 100644 --- a/tests/baselines/reference/callsOnComplexSignatures.types +++ b/tests/baselines/reference/callsOnComplexSignatures.types @@ -53,13 +53,13 @@ function test2() { interface Messages { readonly foo: (options: { [key: string]: any, b: number }) => string; ->foo : (options: { [key: string]: any; b: number;}) => string +>foo : (options: { [key: string]: any; b: number; }) => string >options : { [key: string]: any; b: number; } >key : string >b : number readonly bar: (options: { [key: string]: any, a: string }) => string; ->bar : (options: { [key: string]: any; a: string;}) => string +>bar : (options: { [key: string]: any; a: string; }) => string >options : { [key: string]: any; a: string; } >key : string >a : string @@ -119,17 +119,17 @@ function test3(items: string[] | number[]) { } function test4( ->test4 : (arg1: ((...objs: { x: number;}[]) => number) | ((...objs: { y: number;}[]) => number), arg2: ((a: { x: number;}, b: object) => number) | ((a: object, b: { x: number;}) => number), arg3: ((a: { x: number;}, ...objs: { y: number;}[]) => number) | ((...objs: { x: number;}[]) => number), arg4: ((a?: { x: number;}, b?: { x: number;}) => number) | ((a?: { y: number;}) => number), arg5: ((a?: { x: number;}, ...b: { x: number;}[]) => number) | ((a?: { y: number;}) => number), arg6: ((a?: { x: number;}, b?: { x: number;}) => number) | ((...a: { y: number;}[]) => number)) => void +>test4 : (arg1: ((...objs: { x: number; }[]) => number) | ((...objs: { y: number; }[]) => number), arg2: ((a: { x: number; }, b: object) => number) | ((a: object, b: { x: number; }) => number), arg3: ((a: { x: number; }, ...objs: { y: number; }[]) => number) | ((...objs: { x: number; }[]) => number), arg4: ((a?: { x: number; }, b?: { x: number; }) => number) | ((a?: { y: number; }) => number), arg5: ((a?: { x: number; }, ...b: { x: number; }[]) => number) | ((a?: { y: number; }) => number), arg6: ((a?: { x: number; }, b?: { x: number; }) => number) | ((...a: { y: number; }[]) => number)) => void arg1: ((...objs: {x: number}[]) => number) | ((...objs: {y: number}[]) => number), ->arg1 : ((...objs: { x: number;}[]) => number) | ((...objs: { y: number;}[]) => number) +>arg1 : ((...objs: { x: number; }[]) => number) | ((...objs: { y: number; }[]) => number) >objs : { x: number; }[] >x : number >objs : { y: number; }[] >y : number arg2: ((a: {x: number}, b: object) => number) | ((a: object, b: {x: number}) => number), ->arg2 : ((a: { x: number;}, b: object) => number) | ((a: object, b: { x: number;}) => number) +>arg2 : ((a: { x: number; }, b: object) => number) | ((a: object, b: { x: number; }) => number) >a : { x: number; } >x : number >b : object @@ -138,7 +138,7 @@ function test4( >x : number arg3: ((a: {x: number}, ...objs: {y: number}[]) => number) | ((...objs: {x: number}[]) => number), ->arg3 : ((a: { x: number;}, ...objs: { y: number;}[]) => number) | ((...objs: { x: number;}[]) => number) +>arg3 : ((a: { x: number; }, ...objs: { y: number; }[]) => number) | ((...objs: { x: number; }[]) => number) >a : { x: number; } >x : number >objs : { y: number; }[] @@ -147,7 +147,7 @@ function test4( >x : number arg4: ((a?: {x: number}, b?: {x: number}) => number) | ((a?: {y: number}) => number), ->arg4 : ((a?: { x: number;}, b?: { x: number;}) => number) | ((a?: { y: number;}) => number) +>arg4 : ((a?: { x: number; }, b?: { x: number; }) => number) | ((a?: { y: number; }) => number) >a : { x: number; } | undefined >x : number >b : { x: number; } | undefined @@ -156,7 +156,7 @@ function test4( >y : number arg5: ((a?: {x: number}, ...b: {x: number}[]) => number) | ((a?: {y: number}) => number), ->arg5 : ((a?: { x: number;}, ...b: { x: number;}[]) => number) | ((a?: { y: number;}) => number) +>arg5 : ((a?: { x: number; }, ...b: { x: number; }[]) => number) | ((a?: { y: number; }) => number) >a : { x: number; } | undefined >x : number >b : { x: number; }[] @@ -165,7 +165,7 @@ function test4( >y : number arg6: ((a?: {x: number}, b?: {x: number}) => number) | ((...a: {y: number}[]) => number), ->arg6 : ((a?: { x: number;}, b?: { x: number;}) => number) | ((...a: { y: number;}[]) => number) +>arg6 : ((a?: { x: number; }, b?: { x: number; }) => number) | ((...a: { y: number; }[]) => number) >a : { x: number; } | undefined >x : number >b : { x: number; } | undefined @@ -367,7 +367,7 @@ function test5() { // Union of all intrinsics and components of `any` function App(props: { component:React.ReactType }) { ->App : (props: { component: React.ReactType;}) => JSX.Element +>App : (props: { component: React.ReactType; }) => JSX.Element >props : { component: React.ReactType; } >component : React.ReactType >React : any diff --git a/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.types b/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.types index 9db7bc6e47c21..362b4f00ac197 100644 --- a/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.types +++ b/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.types @@ -18,7 +18,7 @@ interface Sequence { >value : T groupBy(keySelector: (value: T) => K): Sequence<{ key: K; items: T[]; }>; ->groupBy : (keySelector: (value: T) => K) => Sequence<{ key: K; items: T[];}> +>groupBy : (keySelector: (value: T) => K) => Sequence<{ key: K; items: T[]; }> >keySelector : (value: T) => K >value : T >key : K diff --git a/tests/baselines/reference/checkJsxSubtleSkipContextSensitiveBug.types b/tests/baselines/reference/checkJsxSubtleSkipContextSensitiveBug.types index 49fe7334025d6..f12cdff628fa5 100644 --- a/tests/baselines/reference/checkJsxSubtleSkipContextSensitiveBug.types +++ b/tests/baselines/reference/checkJsxSubtleSkipContextSensitiveBug.types @@ -29,7 +29,7 @@ class AsyncLoader extends React.Component> { } async function load(): Promise<{ success: true } | ErrorResult> { ->load : () => Promise<{ success: true;} | ErrorResult> +>load : () => Promise<{ success: true; } | ErrorResult> >success : true >true : true diff --git a/tests/baselines/reference/checkObjectDefineProperty.types b/tests/baselines/reference/checkObjectDefineProperty.types index db1a1e7954504..9c07d8e0339ef 100644 --- a/tests/baselines/reference/checkObjectDefineProperty.types +++ b/tests/baselines/reference/checkObjectDefineProperty.types @@ -179,7 +179,7 @@ Object.defineProperty(x, "zipStr", { * @param {{name: string}} named */ function takeName(named) { return named.name; } ->takeName : (named: { name: string;}) => string +>takeName : (named: { name: string; }) => string >named : { name: string; } >named.name : string >named : { name: string; } diff --git a/tests/baselines/reference/circularReferenceInReturnType2.types b/tests/baselines/reference/circularReferenceInReturnType2.types index de202f7c8cad9..772dcff83167f 100644 --- a/tests/baselines/reference/circularReferenceInReturnType2.types +++ b/tests/baselines/reference/circularReferenceInReturnType2.types @@ -27,7 +27,7 @@ type Field = { }; declare const object: () => < ->object : () => ; }>(config: { name: string; fields: Fields | (() => Fields);}) => ObjectType +>object : () => ; }>(config: { name: string; fields: Fields | (() => Fields); }) => ObjectType Fields extends { [Key in keyof Fields]: Field; diff --git a/tests/baselines/reference/classExtendsInterfaceInExpression.types b/tests/baselines/reference/classExtendsInterfaceInExpression.types index c2c2c9fb7f4e5..c6b12b5a462af 100644 --- a/tests/baselines/reference/classExtendsInterfaceInExpression.types +++ b/tests/baselines/reference/classExtendsInterfaceInExpression.types @@ -4,7 +4,7 @@ interface A {} function factory(a: any): {new(): Object} { ->factory : (a: any) => { new (): Object;} +>factory : (a: any) => { new (): Object; } >a : any return null; diff --git a/tests/baselines/reference/coAndContraVariantInferences.types b/tests/baselines/reference/coAndContraVariantInferences.types index a0d29dc0e80e7..ae64219b63c54 100644 --- a/tests/baselines/reference/coAndContraVariantInferences.types +++ b/tests/baselines/reference/coAndContraVariantInferences.types @@ -20,10 +20,10 @@ declare function fab(arg: A | B): void; >arg : A | B declare function foo(x: { kind: T }, f: (arg: { kind: T }) => void): void; ->foo : (x: { kind: T;}, f: (arg: { kind: T;}) => void) => void +>foo : (x: { kind: T; }, f: (arg: { kind: T; }) => void) => void >x : { kind: T; } >kind : T ->f : (arg: { kind: T;}) => void +>f : (arg: { kind: T; }) => void >arg : { kind: T; } >kind : T diff --git a/tests/baselines/reference/complexRecursiveCollections.types b/tests/baselines/reference/complexRecursiveCollections.types index f9c8f5d01e1b2..ec18e6371008f 100644 --- a/tests/baselines/reference/complexRecursiveCollections.types +++ b/tests/baselines/reference/complexRecursiveCollections.types @@ -425,12 +425,12 @@ declare module Immutable { >value : this merge(...collections: Array | {[key: string]: V}>): this; ->merge : (...collections: Array | { [key: string]: V;}>) => this +>merge : (...collections: Array | { [key: string]: V; }>) => this >collections : (Collection | { [key: string]: V; })[] >key : string mergeWith(merger: (oldVal: V, newVal: V, key: K) => V, ...collections: Array | {[key: string]: V}>): this; ->mergeWith : (merger: (oldVal: V, newVal: V, key: K) => V, ...collections: Array | { [key: string]: V;}>) => this +>mergeWith : (merger: (oldVal: V, newVal: V, key: K) => V, ...collections: Array | { [key: string]: V; }>) => this >merger : (oldVal: V, newVal: V, key: K) => V >oldVal : V >newVal : V @@ -439,12 +439,12 @@ declare module Immutable { >key : string mergeDeep(...collections: Array | {[key: string]: V}>): this; ->mergeDeep : (...collections: Array | { [key: string]: V;}>) => this +>mergeDeep : (...collections: Array | { [key: string]: V; }>) => this >collections : (Collection | { [key: string]: V; })[] >key : string mergeDeepWith(merger: (oldVal: V, newVal: V, key: K) => V, ...collections: Array | {[key: string]: V}>): this; ->mergeDeepWith : (merger: (oldVal: V, newVal: V, key: K) => V, ...collections: Array | { [key: string]: V;}>) => this +>mergeDeepWith : (merger: (oldVal: V, newVal: V, key: K) => V, ...collections: Array | { [key: string]: V; }>) => this >merger : (oldVal: V, newVal: V, key: K) => V >oldVal : V >newVal : V @@ -507,7 +507,7 @@ declare module Immutable { >collections : Iterable<[KC, VC]>[] concat(...collections: Array<{[key: string]: C}>): Map; ->concat : { (...collections: Iterable<[KC, VC]>[]): Map; (...collections: Array<{ [key: string]: C;}>): Map; } +>concat : { (...collections: Iterable<[KC, VC]>[]): Map; (...collections: Array<{ [key: string]: C; }>): Map; } >collections : { [key: string]: C; }[] >key : string @@ -592,7 +592,7 @@ declare module Immutable { >collections : Iterable<[KC, VC]>[] concat(...collections: Array<{[key: string]: C}>): OrderedMap; ->concat : { (...collections: Iterable<[KC, VC]>[]): OrderedMap; (...collections: Array<{ [key: string]: C;}>): OrderedMap; } +>concat : { (...collections: Iterable<[KC, VC]>[]): OrderedMap; (...collections: Array<{ [key: string]: C; }>): OrderedMap; } >collections : { [key: string]: C; }[] >key : string @@ -660,7 +660,7 @@ declare module Immutable { >iter : Collection function fromKeys(obj: {[key: string]: any}): Set; ->fromKeys : { (iter: Collection): Set; (obj: { [key: string]: any;}): Set; } +>fromKeys : { (iter: Collection): Set; (obj: { [key: string]: any; }): Set; } >obj : { [key: string]: any; } >key : string @@ -782,7 +782,7 @@ declare module Immutable { >iter : Collection function fromKeys(obj: {[key: string]: any}): OrderedSet; ->fromKeys : { (iter: Collection): OrderedSet; (obj: { [key: string]: any;}): OrderedSet; } +>fromKeys : { (iter: Collection): OrderedSet; (obj: { [key: string]: any; }): OrderedSet; } >obj : { [key: string]: any; } >key : string } @@ -1104,7 +1104,7 @@ declare module Immutable { // Conversion to JavaScript types toJS(): { [K in keyof T]: any }; ->toJS : () => { [K in keyof T]: any;} +>toJS : () => { [K in keyof T]: any; } toJSON(): T; >toJSON : () => T @@ -1163,7 +1163,7 @@ declare module Immutable { >Seq : any export function Keyed(obj: {[key: string]: V}): Seq.Keyed; ->Keyed : { (collection: Iterable<[K, V_1]>): Keyed; (obj: { [key: string]: V;}): Seq.Keyed; (): Keyed; (): Keyed; } +>Keyed : { (collection: Iterable<[K, V_1]>): Keyed; (obj: { [key: string]: V; }): Seq.Keyed; (): Keyed; (): Keyed; } >obj : { [key: string]: V; } >key : string >Seq : any @@ -1183,7 +1183,7 @@ declare module Immutable { >toJS : () => Object toJSON(): { [key: string]: V }; ->toJSON : () => { [key: string]: V;} +>toJSON : () => { [key: string]: V; } >key : string toSeq(): this; @@ -1195,7 +1195,7 @@ declare module Immutable { >Seq : any concat(...collections: Array<{[key: string]: C}>): Seq.Keyed; ->concat : { (...collections: Iterable<[KC, VC]>[]): Keyed; (...collections: Array<{ [key: string]: C;}>): Seq.Keyed; } +>concat : { (...collections: Iterable<[KC, VC]>[]): Keyed; (...collections: Array<{ [key: string]: C; }>): Seq.Keyed; } >collections : { [key: string]: C; }[] >key : string >Seq : any @@ -1507,7 +1507,7 @@ declare module Immutable { >Collection : any export function Keyed(obj: {[key: string]: V}): Collection.Keyed; ->Keyed : { (collection: Iterable<[K, V_1]>): Keyed; (obj: { [key: string]: V;}): Collection.Keyed; } +>Keyed : { (collection: Iterable<[K, V_1]>): Keyed; (obj: { [key: string]: V; }): Collection.Keyed; } >obj : { [key: string]: V; } >key : string >Collection : any @@ -1517,7 +1517,7 @@ declare module Immutable { >toJS : () => Object toJSON(): { [key: string]: V }; ->toJSON : () => { [key: string]: V;} +>toJSON : () => { [key: string]: V; } >key : string toSeq(): Seq.Keyed; @@ -1534,7 +1534,7 @@ declare module Immutable { >Collection : any concat(...collections: Array<{[key: string]: C}>): Collection.Keyed; ->concat : { (...collections: Iterable<[KC, VC]>[]): Keyed; (...collections: Array<{ [key: string]: C;}>): Collection.Keyed; } +>concat : { (...collections: Iterable<[KC, VC]>[]): Keyed; (...collections: Array<{ [key: string]: C; }>): Collection.Keyed; } >collections : { [key: string]: C; }[] >key : string >Collection : any @@ -1882,18 +1882,18 @@ declare module Immutable { // Conversion to JavaScript types toJS(): Array | { [key: string]: any }; ->toJS : () => Array | { [key: string]: any;} +>toJS : () => Array | { [key: string]: any; } >key : string toJSON(): Array | { [key: string]: V }; ->toJSON : () => Array | { [key: string]: V;} +>toJSON : () => Array | { [key: string]: V; } >key : string toArray(): Array; >toArray : () => Array toObject(): { [key: string]: V }; ->toObject : () => { [key: string]: V;} +>toObject : () => { [key: string]: V; } >key : string // Conversion to Collections diff --git a/tests/baselines/reference/complicatedPrivacy.types b/tests/baselines/reference/complicatedPrivacy.types index c8e8e522759a5..2479c42a44a95 100644 --- a/tests/baselines/reference/complicatedPrivacy.types +++ b/tests/baselines/reference/complicatedPrivacy.types @@ -45,14 +45,14 @@ module m1 { } export function f2(arg1: { x?: C1, y: number }) { ->f2 : (arg1: { x?: C1; y: number;}) => void +>f2 : (arg1: { x?: C1; y: number; }) => void >arg1 : { x?: C1; y: number; } >x : C1 >y : number } export function f3(): { ->f3 : () => { (a: number): C1;} +>f3 : () => { (a: number): C1; } (a: number) : C1; >a : number @@ -62,7 +62,7 @@ module m1 { } export function f4(arg1: ->f4 : (arg1: { [number]: C1;}) => void +>f4 : (arg1: { [number]: C1; }) => void >arg1 : {} { [number]: C1; // Used to be indexer, now it is a computed property @@ -74,7 +74,7 @@ module m1 { export function f5(arg2: { ->f5 : (arg2: { new (arg1: C1): C1;}) => void +>f5 : (arg2: { new (arg1: C1): C1; }) => void >arg2 : new (arg1: C1) => C1 new (arg1: C1) : C1 diff --git a/tests/baselines/reference/computedPropertiesInDestructuring1.types b/tests/baselines/reference/computedPropertiesInDestructuring1.types index a6066cec239cb..96cad0f5eb296 100644 --- a/tests/baselines/reference/computedPropertiesInDestructuring1.types +++ b/tests/baselines/reference/computedPropertiesInDestructuring1.types @@ -51,32 +51,32 @@ let [{[foo2()]: bar5}] = [{bar: "bar"}]; >"bar" : "bar" function f1({["bar"]: x}: { bar: number }) {} ->f1 : ({ ["bar"]: x }: { bar: number;}) => void +>f1 : ({ ["bar"]: x }: { bar: number; }) => void >"bar" : "bar" >x : number >bar : number function f2({[foo]: x}: { bar: number }) {} ->f2 : ({ [foo]: x }: { bar: number;}) => void +>f2 : ({ [foo]: x }: { bar: number; }) => void >foo : string >x : any >bar : number function f3({[foo2()]: x}: { bar: number }) {} ->f3 : ({ [foo2()]: x }: { bar: number;}) => void +>f3 : ({ [foo2()]: x }: { bar: number; }) => void >foo2() : string >foo2 : () => string >x : any >bar : number function f4([{[foo]: x}]: [{ bar: number }]) {} ->f4 : ([{ [foo]: x }]: [{ bar: number;}]) => void +>f4 : ([{ [foo]: x }]: [{ bar: number; }]) => void >foo : string >x : any >bar : number function f5([{[foo2()]: x}]: [{ bar: number }]) {} ->f5 : ([{ [foo2()]: x }]: [{ bar: number;}]) => void +>f5 : ([{ [foo2()]: x }]: [{ bar: number; }]) => void >foo2() : string >foo2 : () => string >x : any diff --git a/tests/baselines/reference/computedPropertiesInDestructuring1_ES6.types b/tests/baselines/reference/computedPropertiesInDestructuring1_ES6.types index c5843ca11604d..2a68a23345e6b 100644 --- a/tests/baselines/reference/computedPropertiesInDestructuring1_ES6.types +++ b/tests/baselines/reference/computedPropertiesInDestructuring1_ES6.types @@ -58,32 +58,32 @@ let [{[foo2()]: bar5}] = [{bar: "bar"}]; >"bar" : "bar" function f1({["bar"]: x}: { bar: number }) {} ->f1 : ({ ["bar"]: x }: { bar: number;}) => void +>f1 : ({ ["bar"]: x }: { bar: number; }) => void >"bar" : "bar" >x : number >bar : number function f2({[foo]: x}: { bar: number }) {} ->f2 : ({ [foo]: x }: { bar: number;}) => void +>f2 : ({ [foo]: x }: { bar: number; }) => void >foo : string >x : any >bar : number function f3({[foo2()]: x}: { bar: number }) {} ->f3 : ({ [foo2()]: x }: { bar: number;}) => void +>f3 : ({ [foo2()]: x }: { bar: number; }) => void >foo2() : string >foo2 : () => string >x : any >bar : number function f4([{[foo]: x}]: [{ bar: number }]) {} ->f4 : ([{ [foo]: x }]: [{ bar: number;}]) => void +>f4 : ([{ [foo]: x }]: [{ bar: number; }]) => void >foo : string >x : any >bar : number function f5([{[foo2()]: x}]: [{ bar: number }]) {} ->f5 : ([{ [foo2()]: x }]: [{ bar: number;}]) => void +>f5 : ([{ [foo2()]: x }]: [{ bar: number; }]) => void >foo2() : string >foo2 : () => string >x : any diff --git a/tests/baselines/reference/computedPropertyNames48_ES5.types b/tests/baselines/reference/computedPropertyNames48_ES5.types index 2d34a248f4268..a55489c7bda34 100644 --- a/tests/baselines/reference/computedPropertyNames48_ES5.types +++ b/tests/baselines/reference/computedPropertyNames48_ES5.types @@ -2,7 +2,7 @@ === computedPropertyNames48_ES5.ts === declare function extractIndexer(p: { [n: number]: T }): T; ->extractIndexer : (p: { [n: number]: T;}) => T +>extractIndexer : (p: { [n: number]: T; }) => T >p : { [n: number]: T; } >n : number diff --git a/tests/baselines/reference/computedPropertyNames48_ES6.types b/tests/baselines/reference/computedPropertyNames48_ES6.types index db27fafd2664f..d34121937baff 100644 --- a/tests/baselines/reference/computedPropertyNames48_ES6.types +++ b/tests/baselines/reference/computedPropertyNames48_ES6.types @@ -2,7 +2,7 @@ === computedPropertyNames48_ES6.ts === declare function extractIndexer(p: { [n: number]: T }): T; ->extractIndexer : (p: { [n: number]: T;}) => T +>extractIndexer : (p: { [n: number]: T; }) => T >p : { [n: number]: T; } >n : number diff --git a/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.types b/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.types index 384597cd4baca..a41a067df7452 100644 --- a/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.types +++ b/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.types @@ -19,7 +19,7 @@ function select< >valueProp : TValueProp export function func(x: XX, tipos: { value: XX }[]) { ->func : (x: XX, tipos: { value: XX;}[]) => void +>func : (x: XX, tipos: { value: XX; }[]) => void >x : XX >tipos : { value: XX; }[] >value : XX @@ -100,7 +100,7 @@ function f(t: T) { } function f2(t1: { x: T; y: T }, t2: T extends T ? { x: T; y: T } : never) { ->f2 : (t1: { x: T; y: T;}, t2: T extends T ? { x: T; y: T;} : never) => void +>f2 : (t1: { x: T; y: T; }, t2: T extends T ? { x: T; y: T; } : never) => void >t1 : { x: T; y: T; } >x : T >y : T diff --git a/tests/baselines/reference/conditionalTypeDoesntSpinForever.types b/tests/baselines/reference/conditionalTypeDoesntSpinForever.types index 5b8cb933f3e99..2b1133e98d974 100644 --- a/tests/baselines/reference/conditionalTypeDoesntSpinForever.types +++ b/tests/baselines/reference/conditionalTypeDoesntSpinForever.types @@ -46,7 +46,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >name : any name: (t?: TYPE) => BuildPubSubRecordType ->name : (t?: TYPE) => BuildPubSubRecordType +>name : (t?: TYPE) => BuildPubSubRecordType >t : TYPE >name : TYPE } @@ -98,12 +98,12 @@ export enum PubSubRecordIsStoredInRedisAsA { >storedAs : any storedAsJsonEncodedRedisString: () => BuildPubSubRecordType; ->storedAsJsonEncodedRedisString : () => BuildPubSubRecordType +>storedAsJsonEncodedRedisString : () => BuildPubSubRecordType >storedAs : PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString >PubSubRecordIsStoredInRedisAsA : any storedRedisHash: () => BuildPubSubRecordType; ->storedRedisHash : () => BuildPubSubRecordType +>storedRedisHash : () => BuildPubSubRecordType >storedAs : PubSubRecordIsStoredInRedisAsA.redisHash >PubSubRecordIsStoredInRedisAsA : any } @@ -182,7 +182,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >record : any identifier: >(t?: TYPE) => BuildPubSubRecordType ->identifier : >(t?: TYPE) => BuildPubSubRecordType +>identifier : >(t?: TYPE) => BuildPubSubRecordType >t : TYPE >identifier : TYPE @@ -242,7 +242,7 @@ export enum PubSubRecordIsStoredInRedisAsA { >record : any record: (t?: TYPE) => BuildPubSubRecordType ->record : (t?: TYPE) => BuildPubSubRecordType +>record : (t?: TYPE) => BuildPubSubRecordType >t : TYPE >record : TYPE } @@ -294,12 +294,12 @@ export enum PubSubRecordIsStoredInRedisAsA { >maxMsToWaitBeforePublishing : any maxMsToWaitBeforePublishing: (t: number) => BuildPubSubRecordType, ->maxMsToWaitBeforePublishing : (t: number) => BuildPubSubRecordType +>maxMsToWaitBeforePublishing : (t: number) => BuildPubSubRecordType >t : number >maxMsToWaitBeforePublishing : number neverDelayPublishing: () => BuildPubSubRecordType, ->neverDelayPublishing : () => BuildPubSubRecordType +>neverDelayPublishing : () => BuildPubSubRecordType >maxMsToWaitBeforePublishing : 0 } diff --git a/tests/baselines/reference/conditionalTypes1.types b/tests/baselines/reference/conditionalTypes1.types index e70d972059adc..d591a71b0c7df 100644 --- a/tests/baselines/reference/conditionalTypes1.types +++ b/tests/baselines/reference/conditionalTypes1.types @@ -142,7 +142,7 @@ type T15 = Extract; // never >q : "a" declare function f5(p: K): Extract; ->f5 : (p: K) => Extract +>f5 : (p: K) => Extract >p : K >k : K diff --git a/tests/baselines/reference/conditionalTypes2.types b/tests/baselines/reference/conditionalTypes2.types index e4050b0a0b939..020cd34b10709 100644 --- a/tests/baselines/reference/conditionalTypes2.types +++ b/tests/baselines/reference/conditionalTypes2.types @@ -151,13 +151,13 @@ type Bar = { bar: string }; >bar : string declare function fooBar(x: { foo: string, bar: string }): void; ->fooBar : (x: { foo: string; bar: string;}) => void +>fooBar : (x: { foo: string; bar: string; }) => void >x : { foo: string; bar: string; } >foo : string >bar : string declare function fooBat(x: { foo: string, bat: string }): void; ->fooBat : (x: { foo: string; bat: string;}) => void +>fooBat : (x: { foo: string; bat: string; }) => void >x : { foo: string; bat: string; } >foo : string >bat : string diff --git a/tests/baselines/reference/constraintWithIndexedAccess.types b/tests/baselines/reference/constraintWithIndexedAccess.types index e3f595d5095ed..c448e08e22320 100644 --- a/tests/baselines/reference/constraintWithIndexedAccess.types +++ b/tests/baselines/reference/constraintWithIndexedAccess.types @@ -3,7 +3,7 @@ === constraintWithIndexedAccess.ts === // #52399 type DataFetchFns = { ->DataFetchFns : { Boat: { requiresLicense: (id: string) => boolean; maxGroundSpeed: (id: string) => number; description: (id: string) => string; displacement: (id: string) => number; name: (id: string) => string;}; Plane: { requiresLicense: (id: string) => boolean; maxGroundSpeed: (id: string) => number; maxTakeoffWeight: (id: string) => number; maxCruisingAltitude: (id: string) => number; name: (id: string) => string;}; } +>DataFetchFns : { Boat: { requiresLicense: (id: string) => boolean; maxGroundSpeed: (id: string) => number; description: (id: string) => string; displacement: (id: string) => number; name: (id: string) => string; }; Plane: { requiresLicense: (id: string) => boolean; maxGroundSpeed: (id: string) => number; maxTakeoffWeight: (id: string) => number; maxCruisingAltitude: (id: string) => number; name: (id: string) => string; }; } Boat: { >Boat : { requiresLicense: (id: string) => boolean; maxGroundSpeed: (id: string) => number; description: (id: string) => string; displacement: (id: string) => number; name: (id: string) => string; } diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.types b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.types index 53d47fecbc1a2..839871188fc3f 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.types +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.types @@ -78,7 +78,7 @@ interface A { // T >x : Derived[] a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; ->a11 : new (x: { foo: string;}, y: { foo: string; bar: string;}) => Base +>a11 : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base >x : { foo: string; } >foo : string >y : { foo: string; bar: string; } @@ -96,7 +96,7 @@ interface A { // T >y : Derived[] a14: new (x: { a: string; b: number }) => Object; ->a14 : new (x: { a: string; b: number;}) => Object +>a14 : new (x: { a: string; b: number; }) => Object >x : { a: string; b: number; } >a : string >b : number @@ -134,7 +134,7 @@ interface A { // T }; a18: { ->a18 : { new (x: { new (a: number): number; new (a: string): string;}): any[]; new (x: { new (a: boolean): boolean; new (a: Date): Date;}): any[]; } +>a18 : { new (x: { new (a: number): number; new (a: string): string; }): any[]; new (x: { new (a: boolean): boolean; new (a: Date): Date; }): any[]; } new (x: { >x : { new (a: number): number; new (a: string): string; } @@ -204,10 +204,10 @@ interface I extends A { >r : T a9: new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; // ok, same as a8 with compatible object literal ->a9 : new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number;}) => U) => (r: T) => U +>a9 : new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U >x : (arg: T) => U >arg : T ->y : (arg2: { foo: string; bing: number;}) => U +>y : (arg2: { foo: string; bing: number; }) => U >arg2 : { foo: string; bing: number; } >foo : string >bing : number @@ -233,7 +233,7 @@ interface I extends A { >y : T a14: new (x: { a: T; b: U }) => T; // ok ->a14 : new (x: { a: T; b: U;}) => T +>a14 : new (x: { a: T; b: U; }) => T >x : { a: T; b: U; } >a : T >b : U diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.types b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.types index a97e1f409ea18..694d652e967c0 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.types +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.types @@ -52,7 +52,7 @@ module Errors { >x : Base[] a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; ->a11 : new (x: { foo: string;}, y: { foo: string; bar: string;}) => Base +>a11 : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base >x : { foo: string; } >foo : string >y : { foo: string; bar: string; } @@ -75,13 +75,13 @@ module Errors { }; a15: new (x: { a: string; b: number }) => number; ->a15 : new (x: { a: string; b: number;}) => number +>a15 : new (x: { a: string; b: number; }) => number >x : { a: string; b: number; } >a : string >b : number a16: { ->a16 : { new (x: { new (a: number): number; new (a?: number): number;}): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean;}): boolean[]; } +>a16 : { new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; } // type of parameter is overload set which means we can't do inference based on this type new (x: { @@ -130,10 +130,10 @@ module Errors { interface I4 extends A { a8: new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; // error, type mismatch ->a8 : new (x: (arg: T) => U, y: (arg2: { foo: number;}) => U) => (r: T) => U +>a8 : new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U >x : (arg: T) => U >arg : T ->y : (arg2: { foo: number;}) => U +>y : (arg2: { foo: number; }) => U >arg2 : { foo: number; } >foo : number >r : T @@ -161,7 +161,7 @@ module Errors { interface I6 extends A { a15: new (x: { a: T; b: T }) => T; // error, T is {} which isn't an acceptable return type ->a15 : new (x: { a: T; b: T;}) => T +>a15 : new (x: { a: T; b: T; }) => T >x : { a: T; b: T; } >a : T >b : T @@ -169,7 +169,7 @@ module Errors { interface I7 extends A { a15: new (x: { a: T; b: T }) => number; // error, T defaults to Base, which is not compatible with number or string ->a15 : new (x: { a: T; b: T;}) => number +>a15 : new (x: { a: T; b: T; }) => number >x : { a: T; b: T; } >a : T >b : T diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.types b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.types index ba6eafba0e9ad..34f2ba81784c6 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.types +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.types @@ -52,7 +52,7 @@ interface A { // T >arg : T a11: new (x: { foo: T }, y: { foo: T; bar: T }) => Base; ->a11 : new (x: { foo: T;}, y: { foo: T; bar: T;}) => Base +>a11 : new (x: { foo: T; }, y: { foo: T; bar: T; }) => Base >x : { foo: T; } >foo : T >y : { foo: T; bar: T; } @@ -60,13 +60,13 @@ interface A { // T >bar : T a15: new (x: { a: T; b: T }) => T[]; ->a15 : new (x: { a: T; b: T;}) => T[] +>a15 : new (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T a16: new (x: { a: T; b: T }) => T[]; ->a16 : new (x: { a: T; b: T;}) => T[] +>a16 : new (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T @@ -160,7 +160,7 @@ interface I extends A { >arg : T a11: new (x: { foo: T }, y: { foo: U; bar: U }) => Base; // ok ->a11 : new (x: { foo: T;}, y: { foo: U; bar: U;}) => Base +>a11 : new (x: { foo: T; }, y: { foo: U; bar: U; }) => Base >x : { foo: T; } >foo : T >y : { foo: U; bar: U; } @@ -168,13 +168,13 @@ interface I extends A { >bar : U a15: new (x: { a: U; b: V; }) => U[]; // ok, T = U, T = V ->a15 : new (x: { a: U; b: V;}) => U[] +>a15 : new (x: { a: U; b: V; }) => U[] >x : { a: U; b: V; } >a : U >b : V a16: new (x: { a: T; b: T }) => T[]; // ok, more general parameter type ->a16 : new (x: { a: T; b: T;}) => T[] +>a16 : new (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.types b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.types index 8a9c1737fc4c0..a8fddee385ca4 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.types +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.types @@ -79,7 +79,7 @@ interface A { // T >x : Derived[] a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; ->a11 : new (x: { foo: string;}, y: { foo: string; bar: string;}) => Base +>a11 : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base >x : { foo: string; } >foo : string >y : { foo: string; bar: string; } @@ -97,7 +97,7 @@ interface A { // T >y : Derived[] a14: new (x: { a: string; b: number }) => Object; ->a14 : new (x: { a: string; b: number;}) => Object +>a14 : new (x: { a: string; b: number; }) => Object >x : { a: string; b: number; } >a : string >b : number @@ -154,10 +154,10 @@ interface I extends B { >r : T a9: new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; // ok, same as a8 with compatible object literal ->a9 : new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number;}) => U) => (r: T) => U +>a9 : new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U >x : (arg: T) => U >arg : T ->y : (arg2: { foo: string; bing: number;}) => U +>y : (arg2: { foo: string; bing: number; }) => U >arg2 : { foo: string; bing: number; } >foo : string >bing : number @@ -183,7 +183,7 @@ interface I extends B { >y : T a14: new (x: { a: T; b: U }) => T; // ok ->a14 : new (x: { a: T; b: U;}) => T +>a14 : new (x: { a: T; b: U; }) => T >x : { a: T; b: U; } >a : T >b : U diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.types b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.types index 7477c180797a4..623aa21226b8f 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.types +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.types @@ -54,7 +54,7 @@ interface A { // T >arg : T a11: new (x: { foo: T }, y: { foo: T; bar: T }) => Base; ->a11 : new (x: { foo: T;}, y: { foo: T; bar: T;}) => Base +>a11 : new (x: { foo: T; }, y: { foo: T; bar: T; }) => Base >x : { foo: T; } >foo : T >y : { foo: T; bar: T; } @@ -62,13 +62,13 @@ interface A { // T >bar : T a15: new (x: { a: T; b: T }) => T[]; ->a15 : new (x: { a: T; b: T;}) => T[] +>a15 : new (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T a16: new (x: { a: T; b: T }) => T[]; ->a16 : new (x: { a: T; b: T;}) => T[] +>a16 : new (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T @@ -109,7 +109,7 @@ interface I5 extends A { interface I7 extends A { a11: new (x: { foo: T }, y: { foo: U; bar: U }) => Base; ->a11 : new (x: { foo: T;}, y: { foo: U; bar: U;}) => Base +>a11 : new (x: { foo: T; }, y: { foo: U; bar: U; }) => Base >x : { foo: T; } >foo : T >y : { foo: U; bar: U; } @@ -119,7 +119,7 @@ interface I7 extends A { interface I9 extends A { a16: new (x: { a: T; b: T }) => T[]; ->a16 : new (x: { a: T; b: T;}) => T[] +>a16 : new (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T diff --git a/tests/baselines/reference/constructorAsType.types b/tests/baselines/reference/constructorAsType.types index 9fdba02dc2587..f80999fef081f 100644 --- a/tests/baselines/reference/constructorAsType.types +++ b/tests/baselines/reference/constructorAsType.types @@ -2,7 +2,7 @@ === constructorAsType.ts === var Person:new () => {name: string;} = function () {return {name:"joe"};}; ->Person : new () => { name: string;} +>Person : new () => { name: string; } >name : string >function () {return {name:"joe"};} : () => { name: string; } >{name:"joe"} : { name: string; } @@ -10,7 +10,7 @@ var Person:new () => {name: string;} = function () {return {name:"joe"};}; >"joe" : "joe" var Person2:{new() : {name:string;};}; ->Person2 : new () => { name: string;} +>Person2 : new () => { name: string; } >name : string Person = Person2; diff --git a/tests/baselines/reference/contextualOverloadListFromUnionWithPrimitiveNoImplicitAny.types b/tests/baselines/reference/contextualOverloadListFromUnionWithPrimitiveNoImplicitAny.types index 39334a18c70f7..639b462729297 100644 --- a/tests/baselines/reference/contextualOverloadListFromUnionWithPrimitiveNoImplicitAny.types +++ b/tests/baselines/reference/contextualOverloadListFromUnionWithPrimitiveNoImplicitAny.types @@ -13,7 +13,7 @@ interface FullRule { >validate : string | RegExp | Validate normalize?: (match: {x: string}) => void; ->normalize : ((match: { x: string;}) => void) | undefined +>normalize : ((match: { x: string; }) => void) | undefined >match : { x: string; } >x : string } diff --git a/tests/baselines/reference/contextualReturnTypeOfIIFE3.types b/tests/baselines/reference/contextualReturnTypeOfIIFE3.types index 93ebf51cc6a53..002881a35da44 100644 --- a/tests/baselines/reference/contextualReturnTypeOfIIFE3.types +++ b/tests/baselines/reference/contextualReturnTypeOfIIFE3.types @@ -5,7 +5,7 @@ declare namespace app { >app : typeof app var foo: { ->foo : { bar: { someFun: (arg: number) => void;}; } +>foo : { bar: { someFun: (arg: number) => void; }; } bar: { >bar : { someFun: (arg: number) => void; } diff --git a/tests/baselines/reference/contextualSignatureConditionalTypeInstantiationUsingDefault.types b/tests/baselines/reference/contextualSignatureConditionalTypeInstantiationUsingDefault.types index 8c6780bfae1a0..45716ed622b06 100644 --- a/tests/baselines/reference/contextualSignatureConditionalTypeInstantiationUsingDefault.types +++ b/tests/baselines/reference/contextualSignatureConditionalTypeInstantiationUsingDefault.types @@ -20,7 +20,7 @@ type ActionFunction = (event: TEvent) => void; >event : TEvent declare function createMachine< ->createMachine : (config: { types?: TTypesMeta;}, implementations: TTypesMeta extends TypegenEnabled ? ActionFunction<{ type: "test";}> : ActionFunction<{ type: string;}>) => void +>createMachine : (config: { types?: TTypesMeta; }, implementations: TTypesMeta extends TypegenEnabled ? ActionFunction<{ type: "test"; }> : ActionFunction<{ type: string; }>) => void TTypesMeta extends TypegenEnabled | TypegenDisabled = TypegenDisabled >( diff --git a/tests/baselines/reference/contextualTypeFromJSDoc.types b/tests/baselines/reference/contextualTypeFromJSDoc.types index 5230872e2f30b..a023f8621fca6 100644 --- a/tests/baselines/reference/contextualTypeFromJSDoc.types +++ b/tests/baselines/reference/contextualTypeFromJSDoc.types @@ -24,7 +24,7 @@ const arr = [ /** @return {Array<[string, {x?:number, y?:number}]>} */ function f() { ->f : () => Array<[string, { x?: number; y?: number;}]> +>f : () => Array<[string, { x?: number; y?: number; }]> return [ >[ ['a', { x: 1 }], ['b', { y: 2 }] ] : ([string, { x: number; }] | [string, { y: number; }])[] diff --git a/tests/baselines/reference/contextualTypeOfIndexedAccessParameter.types b/tests/baselines/reference/contextualTypeOfIndexedAccessParameter.types index 7b6ea19ac5998..11a17613871c8 100644 --- a/tests/baselines/reference/contextualTypeOfIndexedAccessParameter.types +++ b/tests/baselines/reference/contextualTypeOfIndexedAccessParameter.types @@ -5,7 +5,7 @@ type Keys = "a" | "b"; >Keys : "a" | "b" type OptionsForKey = { a: { cb: (p: number) => number } } & { b: {} }; ->OptionsForKey : { a: { cb: (p: number) => number;}; } & { b: {}; } +>OptionsForKey : { a: { cb: (p: number) => number; }; } & { b: {}; } >a : { cb: (p: number) => number; } >cb : (p: number) => number >p : number @@ -31,7 +31,7 @@ f("a", { }); function g< ->g : (x: ({ a: string;} & { b: string;})[K], y: string) => void +>g : (x: ({ a: string; } & { b: string; })[K], y: string) => void K extends "a" | "b">(x: ({ a: string } & { b: string })[K], y: string) { >x : ({ a: string; } & { b: string; })[K] diff --git a/tests/baselines/reference/contextualTyping.types b/tests/baselines/reference/contextualTyping.types index 3da7f32f34479..a6f0d2579cb43 100644 --- a/tests/baselines/reference/contextualTyping.types +++ b/tests/baselines/reference/contextualTyping.types @@ -327,7 +327,7 @@ interface IPlaceHolder { } var objc8: { ->objc8 : { t1: (s: string) => string; t2: IFoo; t3: number[]; t4: () => IFoo; t5: (n: number) => IFoo; t6: (n: number, s: string) => IFoo; t7: { (n: number, s: string): number;}; t8: (n: number, s: string) => number; t9: number[][]; t10: IFoo[]; t11: { (n: number, s: string): string;}[]; t12: IBar; t13: IFoo; t14: IFoo; } +>objc8 : { t1: (s: string) => string; t2: IFoo; t3: number[]; t4: () => IFoo; t5: (n: number) => IFoo; t6: (n: number, s: string) => IFoo; t7: { (n: number, s: string): number; }; t8: (n: number, s: string) => number; t9: number[][]; t10: IFoo[]; t11: { (n: number, s: string): string; }[]; t12: IBar; t13: IFoo; t14: IFoo; } t1: (s: string) => string; >t1 : (s: string) => string diff --git a/tests/baselines/reference/contextualTyping23.types b/tests/baselines/reference/contextualTyping23.types index 6909452a3b648..2aa3139ae530e 100644 --- a/tests/baselines/reference/contextualTyping23.types +++ b/tests/baselines/reference/contextualTyping23.types @@ -2,7 +2,7 @@ === contextualTyping23.ts === var foo:(a:{():number; (i:number):number; })=>number; foo = function(a){return 5}; ->foo : (a: { (): number; (i: number): number;}) => number +>foo : (a: { (): number; (i: number): number; }) => number >a : { (): number; (i: number): number; } >i : number >foo = function(a){return 5} : (a: { (): number; (i: number): number; }) => number diff --git a/tests/baselines/reference/contextualTyping24.types b/tests/baselines/reference/contextualTyping24.types index e00365599babd..8e4b45d78565a 100644 --- a/tests/baselines/reference/contextualTyping24.types +++ b/tests/baselines/reference/contextualTyping24.types @@ -2,7 +2,7 @@ === contextualTyping24.ts === var foo:(a:{():number; (i:number):number; })=>number; foo = function(this: void, a:string){return 5}; ->foo : (a: { (): number; (i: number): number;}) => number +>foo : (a: { (): number; (i: number): number; }) => number >a : { (): number; (i: number): number; } >i : number >foo = function(this: void, a:string){return 5} : (this: void, a: string) => number diff --git a/tests/baselines/reference/contextualTyping25.types b/tests/baselines/reference/contextualTyping25.types index 93e0c92bfc600..4198bccfa836e 100644 --- a/tests/baselines/reference/contextualTyping25.types +++ b/tests/baselines/reference/contextualTyping25.types @@ -2,7 +2,7 @@ === contextualTyping25.ts === function foo(param:{id:number;}){}; foo(<{id:number;}>({})); ->foo : (param: { id: number;}) => void +>foo : (param: { id: number; }) => void >param : { id: number; } >id : number >foo(<{id:number;}>({})) : void diff --git a/tests/baselines/reference/contextualTyping26.types b/tests/baselines/reference/contextualTyping26.types index cf7bd395409eb..17e1797ffa3c1 100644 --- a/tests/baselines/reference/contextualTyping26.types +++ b/tests/baselines/reference/contextualTyping26.types @@ -2,7 +2,7 @@ === contextualTyping26.ts === function foo(param:{id:number;}){}; foo(<{id:number;}>({})); ->foo : (param: { id: number;}) => void +>foo : (param: { id: number; }) => void >param : { id: number; } >id : number >foo(<{id:number;}>({})) : void diff --git a/tests/baselines/reference/contextualTyping27.types b/tests/baselines/reference/contextualTyping27.types index 6a7a85d8c0242..6d40ba5cbc63b 100644 --- a/tests/baselines/reference/contextualTyping27.types +++ b/tests/baselines/reference/contextualTyping27.types @@ -2,7 +2,7 @@ === contextualTyping27.ts === function foo(param:{id:number;}){}; foo(<{id:number;}>({})); ->foo : (param: { id: number;}) => void +>foo : (param: { id: number; }) => void >param : { id: number; } >id : number >foo(<{id:number;}>({})) : void diff --git a/tests/baselines/reference/contextualTyping32.types b/tests/baselines/reference/contextualTyping32.types index 666cec7af547d..00e0c8821b8cb 100644 --- a/tests/baselines/reference/contextualTyping32.types +++ b/tests/baselines/reference/contextualTyping32.types @@ -2,7 +2,7 @@ === contextualTyping32.ts === function foo(param: {():number; (i:number):number; }[]) { }; foo([function(){return 1;}, function(){return 4}]); ->foo : (param: { (): number; (i: number): number;}[]) => void +>foo : (param: { (): number; (i: number): number; }[]) => void >param : { (): number; (i: number): number; }[] >i : number >foo([function(){return 1;}, function(){return 4}]) : void diff --git a/tests/baselines/reference/contextualTyping33.types b/tests/baselines/reference/contextualTyping33.types index c4ca89867a8ef..e575ca6d232da 100644 --- a/tests/baselines/reference/contextualTyping33.types +++ b/tests/baselines/reference/contextualTyping33.types @@ -2,7 +2,7 @@ === contextualTyping33.ts === function foo(param: {():number; (i:number):number; }[]) { }; foo([function(){return 1;}, function(){return "foo"}]); ->foo : (param: { (): number; (i: number): number;}[]) => void +>foo : (param: { (): number; (i: number): number; }[]) => void >param : { (): number; (i: number): number; }[] >i : number >foo([function(){return 1;}, function(){return "foo"}]) : void diff --git a/tests/baselines/reference/contextualTypingOfObjectLiterals.types b/tests/baselines/reference/contextualTypingOfObjectLiterals.types index 732562feed36c..a27bfba1cc990 100644 --- a/tests/baselines/reference/contextualTypingOfObjectLiterals.types +++ b/tests/baselines/reference/contextualTypingOfObjectLiterals.types @@ -22,7 +22,7 @@ obj1 = obj2; // Error - indexer doesn't match >obj2 : { x: string; } function f(x: { [s: string]: string }) { } ->f : (x: { [s: string]: string;}) => void +>f : (x: { [s: string]: string; }) => void >x : { [s: string]: string; } >s : string diff --git a/tests/baselines/reference/contextualTypingOfOptionalMembers.types b/tests/baselines/reference/contextualTypingOfOptionalMembers.types index c6a325dafc27a..07b389f0b244a 100644 --- a/tests/baselines/reference/contextualTypingOfOptionalMembers.types +++ b/tests/baselines/reference/contextualTypingOfOptionalMembers.types @@ -174,7 +174,7 @@ interface ActionsObjectOr { } declare function App4>(props: Options["actions"] & { state: State }): JSX.Element; ->App4 : >(props: Options["actions"] & { state: State;}) => JSX.Element +>App4 : >(props: Options["actions"] & { state: State; }) => JSX.Element >props : (string | Actions) & { state: State; } >state : State >JSX : any diff --git a/tests/baselines/reference/contextuallyTypeAsyncFunctionReturnTypeFromUnion.types b/tests/baselines/reference/contextuallyTypeAsyncFunctionReturnTypeFromUnion.types index b66474c20ec53..d2d049bb447fe 100644 --- a/tests/baselines/reference/contextuallyTypeAsyncFunctionReturnTypeFromUnion.types +++ b/tests/baselines/reference/contextuallyTypeAsyncFunctionReturnTypeFromUnion.types @@ -12,7 +12,7 @@ declare class StateMachine { } declare function createMachine(implementations: { ->createMachine : (implementations: { services: Record Promise | StateMachine>;}) => void +>createMachine : (implementations: { services: Record Promise | StateMachine>; }) => void >implementations : { services: Record Promise | StateMachine>; } services: Record Promise | StateMachine>; @@ -54,7 +54,7 @@ createMachine<{ count: number }>({ }); function fn1(): () => Promise<{ count: number }> | StateMachine<{ count: number }> { ->fn1 : () => () => Promise<{ count: number;}> | StateMachine<{ count: number;}> +>fn1 : () => () => Promise<{ count: number; }> | StateMachine<{ count: number; }> >count : number >count : number diff --git a/tests/baselines/reference/contextuallyTypedJsxChildren.types b/tests/baselines/reference/contextuallyTypedJsxChildren.types index 8bfb038b72fab..3d5cc40424a2c 100644 --- a/tests/baselines/reference/contextuallyTypedJsxChildren.types +++ b/tests/baselines/reference/contextuallyTypedJsxChildren.types @@ -23,7 +23,7 @@ declare namespace DropdownMenu { } interface PropsWithChildren extends BaseProps { children(props: { onClose: () => void }): JSX.Element; ->children : (props: { onClose: () => void;}) => JSX.Element +>children : (props: { onClose: () => void; }) => JSX.Element >props : { onClose: () => void; } >onClose : () => void >JSX : any diff --git a/tests/baselines/reference/contextuallyTypedOptionalProperty(exactoptionalpropertytypes=false).types b/tests/baselines/reference/contextuallyTypedOptionalProperty(exactoptionalpropertytypes=false).types index f54c06194349f..674270763dac4 100644 --- a/tests/baselines/reference/contextuallyTypedOptionalProperty(exactoptionalpropertytypes=false).types +++ b/tests/baselines/reference/contextuallyTypedOptionalProperty(exactoptionalpropertytypes=false).types @@ -9,7 +9,7 @@ declare function match(cb: (value: T) => boolean): T; >value : T declare function foo(pos: { x?: number; y?: number }): boolean; ->foo : (pos: { x?: number; y?: number;}) => boolean +>foo : (pos: { x?: number; y?: number; }) => boolean >pos : { x?: number | undefined; y?: number | undefined; } >x : number | undefined >y : number | undefined diff --git a/tests/baselines/reference/contextuallyTypedOptionalProperty(exactoptionalpropertytypes=true).types b/tests/baselines/reference/contextuallyTypedOptionalProperty(exactoptionalpropertytypes=true).types index df0a98863d77e..da82a6d39556c 100644 --- a/tests/baselines/reference/contextuallyTypedOptionalProperty(exactoptionalpropertytypes=true).types +++ b/tests/baselines/reference/contextuallyTypedOptionalProperty(exactoptionalpropertytypes=true).types @@ -9,7 +9,7 @@ declare function match(cb: (value: T) => boolean): T; >value : T declare function foo(pos: { x?: number; y?: number }): boolean; ->foo : (pos: { x?: number; y?: number;}) => boolean +>foo : (pos: { x?: number; y?: number; }) => boolean >pos : { x?: number; y?: number; } >x : number | undefined >y : number | undefined diff --git a/tests/baselines/reference/contextuallyTypedParametersWithInitializers1.types b/tests/baselines/reference/contextuallyTypedParametersWithInitializers1.types index 5a178b7bb7efb..212d31ca13599 100644 --- a/tests/baselines/reference/contextuallyTypedParametersWithInitializers1.types +++ b/tests/baselines/reference/contextuallyTypedParametersWithInitializers1.types @@ -11,13 +11,13 @@ declare function id2 any>(input: T): T; >input : T declare function id3 any>(input: T): T; ->id3 : any>(input: T) => T +>id3 : any>(input: T) => T >x : { foo: any; } >foo : any >input : T declare function id4 any>(input: T): T; ->id4 : any>(input: T) => T +>id4 : any>(input: T) => T >x : { foo?: number | undefined; } >foo : number | undefined >input : T diff --git a/tests/baselines/reference/contextuallyTypedParametersWithInitializers2.types b/tests/baselines/reference/contextuallyTypedParametersWithInitializers2.types index cc18f89dd35f9..79855f1d25e3e 100644 --- a/tests/baselines/reference/contextuallyTypedParametersWithInitializers2.types +++ b/tests/baselines/reference/contextuallyTypedParametersWithInitializers2.types @@ -25,7 +25,7 @@ test1( }, { ->{ checkLimit: (ctx, max = 500) => {}, hasAccess: (ctx, user: { name: string }) => {}, } : { checkLimit: (ctx: { count: number; }, max?: number) => void; hasAccess: (ctx: { count: number; }, user: { name: string;}) => void; } +>{ checkLimit: (ctx, max = 500) => {}, hasAccess: (ctx, user: { name: string }) => {}, } : { checkLimit: (ctx: { count: number; }, max?: number) => void; hasAccess: (ctx: { count: number; }, user: { name: string; }) => void; } checkLimit: (ctx, max = 500) => {}, >checkLimit : (ctx: { count: number; }, max?: number) => void @@ -35,8 +35,8 @@ test1( >500 : 500 hasAccess: (ctx, user: { name: string }) => {}, ->hasAccess : (ctx: { count: number; }, user: { name: string;}) => void ->(ctx, user: { name: string }) => {} : (ctx: { count: number; }, user: { name: string;}) => void +>hasAccess : (ctx: { count: number; }, user: { name: string; }) => void +>(ctx, user: { name: string }) => {} : (ctx: { count: number; }, user: { name: string; }) => void >ctx : { count: number; } >user : { name: string; } >name : string diff --git a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes01.types b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes01.types index 382b8592ff7c3..785f69db001a4 100644 --- a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes01.types +++ b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes01.types @@ -13,8 +13,8 @@ namespace JSX { } const FooComponent = (props: { foo: "A" | "B" | "C" }) => {props.foo}; ->FooComponent : (props: { foo: "A" | "B" | "C";}) => JSX.Element ->(props: { foo: "A" | "B" | "C" }) => {props.foo} : (props: { foo: "A" | "B" | "C";}) => JSX.Element +>FooComponent : (props: { foo: "A" | "B" | "C"; }) => JSX.Element +>(props: { foo: "A" | "B" | "C" }) => {props.foo} : (props: { foo: "A" | "B" | "C"; }) => JSX.Element >props : { foo: "A" | "B" | "C"; } >foo : "A" | "B" | "C" >{props.foo} : JSX.Element diff --git a/tests/baselines/reference/controlFlowAliasedDiscriminants.types b/tests/baselines/reference/controlFlowAliasedDiscriminants.types index a22e71c309a38..0f1c87b5b077d 100644 --- a/tests/baselines/reference/controlFlowAliasedDiscriminants.types +++ b/tests/baselines/reference/controlFlowAliasedDiscriminants.types @@ -279,7 +279,7 @@ declare function getArrayResult(): [true, number] | [false, undefined]; } type Nested = { ->Nested : { type: 'string'; resp: { data: string;}; } | { type: 'number'; resp: { data: number;}; } +>Nested : { type: 'string'; resp: { data: string; }; } | { type: 'number'; resp: { data: number; }; } type: 'string'; >type : "string" diff --git a/tests/baselines/reference/controlFlowAliasing.types b/tests/baselines/reference/controlFlowAliasing.types index 502041f2fedb8..37a21cc54f25c 100644 --- a/tests/baselines/reference/controlFlowAliasing.types +++ b/tests/baselines/reference/controlFlowAliasing.types @@ -138,7 +138,7 @@ function f14(x: number | null | undefined): number | null { } function f15(obj: { readonly x: string | number }) { ->f15 : (obj: { readonly x: string | number;}) => void +>f15 : (obj: { readonly x: string | number; }) => void >obj : { readonly x: string | number; } >x : string | number @@ -163,7 +163,7 @@ function f15(obj: { readonly x: string | number }) { } function f16(obj: { readonly x: string | number }) { ->f16 : (obj: { readonly x: string | number;}) => void +>f16 : (obj: { readonly x: string | number; }) => void >obj : { readonly x: string | number; } >x : string | number @@ -249,7 +249,7 @@ function f18(obj: readonly [string | number]) { } function f20(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f20 : (obj: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}) => void +>f20 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void >obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } >kind : "foo" >foo : string @@ -281,7 +281,7 @@ function f20(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f21(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f21 : (obj: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}) => void +>f21 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void >obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } >kind : "foo" >foo : string @@ -313,7 +313,7 @@ function f21(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f22(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f22 : (obj: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}) => void +>f22 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void >obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } >kind : "foo" >foo : string @@ -345,7 +345,7 @@ function f22(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f23(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f23 : (obj: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}) => void +>f23 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void >obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } >kind : "foo" >foo : string @@ -382,7 +382,7 @@ function f23(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f24(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f24 : (arg: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}) => void +>f24 : (arg: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void >arg : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } >kind : "foo" >foo : string @@ -418,7 +418,7 @@ function f24(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f25(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f25 : (arg: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}) => void +>f25 : (arg: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void >arg : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } >kind : "foo" >foo : string @@ -454,8 +454,8 @@ function f25(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f26(outer: { readonly obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number } }) { ->f26 : (outer: { readonly obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; };}) => void ->outer : { readonly obj: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}; } +>f26 : (outer: { readonly obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; }) => void +>outer : { readonly obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } >obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } >kind : "foo" >foo : string @@ -493,8 +493,8 @@ function f26(outer: { readonly obj: { kind: 'foo', foo: string } | { kind: 'bar' } function f27(outer: { obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number } }) { ->f27 : (outer: { obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; };}) => void ->outer : { obj: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}; } +>f27 : (outer: { obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; }) => void +>outer : { obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; } >obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } >kind : "foo" >foo : string @@ -532,7 +532,7 @@ function f27(outer: { obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: nu } function f28(obj?: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f28 : (obj?: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}) => void +>f28 : (obj?: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void >obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } | undefined >kind : "foo" >foo : string @@ -580,7 +580,7 @@ function f28(obj?: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) // Narrowing by aliased discriminant property access function f30(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f30 : (obj: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}) => void +>f30 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void >obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } >kind : "foo" >foo : string @@ -612,7 +612,7 @@ function f30(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f31(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f31 : (obj: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}) => void +>f31 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void >obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } >kind : "foo" >foo : string @@ -642,7 +642,7 @@ function f31(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f32(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f32 : (obj: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}) => void +>f32 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void >obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } >kind : "foo" >foo : string @@ -673,7 +673,7 @@ function f32(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f33(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f33 : (obj: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}) => void +>f33 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void >obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } >kind : "foo" >foo : string @@ -809,7 +809,7 @@ class C11 { // Mixing of aliased discriminants and conditionals function f40(obj: { kind: 'foo', foo?: string } | { kind: 'bar', bar?: number }) { ->f40 : (obj: { kind: 'foo'; foo?: string;} | { kind: 'bar'; bar?: number;}) => void +>f40 : (obj: { kind: 'foo'; foo?: string; } | { kind: 'bar'; bar?: number; }) => void >obj : { kind: 'foo'; foo?: string | undefined; } | { kind: 'bar'; bar?: number | undefined; } >kind : "foo" >foo : string | undefined diff --git a/tests/baselines/reference/controlFlowArrays.types b/tests/baselines/reference/controlFlowArrays.types index cdd4cd00b570c..980c9d8bd09c0 100644 --- a/tests/baselines/reference/controlFlowArrays.types +++ b/tests/baselines/reference/controlFlowArrays.types @@ -617,7 +617,7 @@ function f18() { // Repro from #39470 declare function foo(arg: { val: number }[]): void; ->foo : (arg: { val: number;}[]) => void +>foo : (arg: { val: number; }[]) => void >arg : { val: number; }[] >val : number diff --git a/tests/baselines/reference/controlFlowDestructuringVariablesInTryCatch.types b/tests/baselines/reference/controlFlowDestructuringVariablesInTryCatch.types index 8198939b7e78b..e8c8848631f79 100644 --- a/tests/baselines/reference/controlFlowDestructuringVariablesInTryCatch.types +++ b/tests/baselines/reference/controlFlowDestructuringVariablesInTryCatch.types @@ -8,7 +8,7 @@ declare function f2(): [b: string]; >f2 : () => [b: string] declare function f3(): { c: string }; ->f3 : () => { c: string;} +>f3 : () => { c: string; } >c : string try { diff --git a/tests/baselines/reference/controlFlowGenericTypes.types b/tests/baselines/reference/controlFlowGenericTypes.types index b76216b121e9a..280ed74afddb1 100644 --- a/tests/baselines/reference/controlFlowGenericTypes.types +++ b/tests/baselines/reference/controlFlowGenericTypes.types @@ -2,7 +2,7 @@ === controlFlowGenericTypes.ts === function f1(x: T, y: { a: T }, z: [T]): string { ->f1 : (x: T, y: { a: T;}, z: [T]) => string +>f1 : (x: T, y: { a: T; }, z: [T]) => string >x : T >y : { a: T; } >a : T diff --git a/tests/baselines/reference/controlFlowInOperator.types b/tests/baselines/reference/controlFlowInOperator.types index 30cc52d710ee0..7ef3c0fbd807e 100644 --- a/tests/baselines/reference/controlFlowInOperator.types +++ b/tests/baselines/reference/controlFlowInOperator.types @@ -75,7 +75,7 @@ if (d in c) { // repro from https://github.com/microsoft/TypeScript/issues/54790 function uniqueID_54790( ->uniqueID_54790 : (id: string | undefined, seenIDs: { [key: string]: string;}) => string +>uniqueID_54790 : (id: string | undefined, seenIDs: { [key: string]: string; }) => string id: string | undefined, >id : string diff --git a/tests/baselines/reference/controlFlowIterationErrorsAsync.types b/tests/baselines/reference/controlFlowIterationErrorsAsync.types index eea08303e00e0..927e48e502602 100644 --- a/tests/baselines/reference/controlFlowIterationErrorsAsync.types +++ b/tests/baselines/reference/controlFlowIterationErrorsAsync.types @@ -348,7 +348,7 @@ async () => { // repro #43047#issuecomment-874221939 declare function myQuery(input: { lastId: number | undefined }): Promise<{ entities: number[] }>; ->myQuery : (input: { lastId: number | undefined;}) => Promise<{ entities: number[];}> +>myQuery : (input: { lastId: number | undefined; }) => Promise<{ entities: number[]; }> >input : { lastId: number | undefined; } >lastId : number | undefined >entities : number[] diff --git a/tests/baselines/reference/controlFlowOptionalChain.types b/tests/baselines/reference/controlFlowOptionalChain.types index 2df13c173365a..065598377320d 100644 --- a/tests/baselines/reference/controlFlowOptionalChain.types +++ b/tests/baselines/reference/controlFlowOptionalChain.types @@ -321,8 +321,8 @@ o4.x.y; >y : boolean declare const o5: { x?: { y: { z?: { w: boolean } } } }; ->o5 : { x?: { y: { z?: { w: boolean; };}; } | undefined; } ->x : { y: { z?: { w: boolean; };}; } | undefined +>o5 : { x?: { y: { z?: { w: boolean; }; }; } | undefined; } +>x : { y: { z?: { w: boolean; }; }; } | undefined >y : { z?: { w: boolean; } | undefined; } >z : { w: boolean; } | undefined >w : boolean diff --git a/tests/baselines/reference/controlFlowOptionalChain3.types b/tests/baselines/reference/controlFlowOptionalChain3.types index 94bc8222ab525..2df5efdfb0222 100644 --- a/tests/baselines/reference/controlFlowOptionalChain3.types +++ b/tests/baselines/reference/controlFlowOptionalChain3.types @@ -58,7 +58,7 @@ function test2(foo: Foo | undefined) { } function Test3({ foo }: { foo: Foo | undefined }) { ->Test3 : ({ foo }: { foo: Foo | undefined;}) => JSX.Element +>Test3 : ({ foo }: { foo: Foo | undefined; }) => JSX.Element >foo : Foo | undefined >foo : Foo | undefined @@ -93,7 +93,7 @@ function Test3({ foo }: { foo: Foo | undefined }) { } function test4(options?: { a?: boolean; b?: boolean }) { ->test4 : (options?: { a?: boolean; b?: boolean;}) => void +>test4 : (options?: { a?: boolean; b?: boolean; }) => void >options : { a?: boolean | undefined; b?: boolean | undefined; } | undefined >a : boolean | undefined >b : boolean | undefined diff --git a/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.types b/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.types index f52a372b4119c..617affbf0d562 100644 --- a/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.types +++ b/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.types @@ -11,7 +11,7 @@ function f2(x: (...args) => void) { } >args : any[] function f3(x: { (...args): void }) { } ->f3 : (x: { (...args: any): void;}) => void +>f3 : (x: { (...args: any): void; }) => void >x : (...args: any[]) => void >args : any[] diff --git a/tests/baselines/reference/declarationEmitAliasFromIndirectFile.types b/tests/baselines/reference/declarationEmitAliasFromIndirectFile.types index 42423a730db8c..a3fc8a5898e5f 100644 --- a/tests/baselines/reference/declarationEmitAliasFromIndirectFile.types +++ b/tests/baselines/reference/declarationEmitAliasFromIndirectFile.types @@ -2,7 +2,7 @@ === locale.d.ts === export type Locale = { ->Locale : { weekdays: { shorthand: [string, string, string, string, string, string, string]; longhand: [string, string, string, string, string, string, string];}; } +>Locale : { weekdays: { shorthand: [string, string, string, string, string, string, string]; longhand: [string, string, string, string, string, string, string]; }; } weekdays: { >weekdays : { shorthand: [string, string, string, string, string, string, string]; longhand: [string, string, string, string, string, string, string]; } @@ -16,7 +16,7 @@ export type Locale = { }; }; export type CustomLocale = { ->CustomLocale : { weekdays: { shorthand: [string, string, string, string, string, string, string]; longhand: [string, string, string, string, string, string, string];}; } +>CustomLocale : { weekdays: { shorthand: [string, string, string, string, string, string, string]; longhand: [string, string, string, string, string, string, string]; }; } weekdays: { >weekdays : { shorthand: [string, string, string, string, string, string, string]; longhand: [string, string, string, string, string, string, string]; } diff --git a/tests/baselines/reference/declarationEmitArrowFunctionNoRenaming.types b/tests/baselines/reference/declarationEmitArrowFunctionNoRenaming.types index a115515dccb2b..b99296dbdfb40 100644 --- a/tests/baselines/reference/declarationEmitArrowFunctionNoRenaming.types +++ b/tests/baselines/reference/declarationEmitArrowFunctionNoRenaming.types @@ -18,10 +18,10 @@ export type BoundedInteger< > = Brand; export const toBoundedInteger = ->toBoundedInteger : (bounds: { lowerBound: LowerBound; upperBound: UpperBound;}) => (n: number) => BoundedInteger +>toBoundedInteger : (bounds: { lowerBound: LowerBound; upperBound: UpperBound; }) => (n: number) => BoundedInteger (bounds: { ->(bounds: { lowerBound: LowerBound; upperBound: UpperBound; }) => ( n: number ): BoundedInteger => // Implementation doesn't matter here ({} as any) : (bounds: { lowerBound: LowerBound; upperBound: UpperBound;}) => (n: number) => BoundedInteger +>(bounds: { lowerBound: LowerBound; upperBound: UpperBound; }) => ( n: number ): BoundedInteger => // Implementation doesn't matter here ({} as any) : (bounds: { lowerBound: LowerBound; upperBound: UpperBound; }) => (n: number) => BoundedInteger >bounds : { lowerBound: LowerBound; upperBound: UpperBound; } lowerBound: LowerBound; diff --git a/tests/baselines/reference/declarationEmitBindingPatternsFunctionExpr.types b/tests/baselines/reference/declarationEmitBindingPatternsFunctionExpr.types index aae3e8a40a4e1..6358d18464e09 100644 --- a/tests/baselines/reference/declarationEmitBindingPatternsFunctionExpr.types +++ b/tests/baselines/reference/declarationEmitBindingPatternsFunctionExpr.types @@ -44,8 +44,8 @@ let value = ""; // 2.Can change in meaning for typeof value if we remove alias const shadowedVariable = ({ value: alias }: { value: string }): typeof value => value; ->shadowedVariable : ({ value: alias }: { value: string;}) => typeof value ->({ value: alias }: { value: string }): typeof value => value : ({ value: alias }: { value: string;}) => typeof value +>shadowedVariable : ({ value: alias }: { value: string; }) => typeof value +>({ value: alias }: { value: string }): typeof value => value : ({ value: alias }: { value: string; }) => typeof value >value : any >alias : string >value : string diff --git a/tests/baselines/reference/declarationEmitBindingPatternsUnused.types b/tests/baselines/reference/declarationEmitBindingPatternsUnused.types index 292ed8b260f86..09cb3ce6f7d6d 100644 --- a/tests/baselines/reference/declarationEmitBindingPatternsUnused.types +++ b/tests/baselines/reference/declarationEmitBindingPatternsUnused.types @@ -34,7 +34,7 @@ let value = ""; // 2.Can change in meaning for typeof value if we remove alias function shadowedVariable({ value: alias }: { value: string }): typeof value { return value } ->shadowedVariable : ({ value: alias }: { value: string;}) => typeof value +>shadowedVariable : ({ value: alias }: { value: string; }) => typeof value >value : any >alias : string >value : string @@ -48,7 +48,7 @@ function notReferenced({ name: alias }: Named) { } function notReferencedNestedAlias({ p: { name: alias } }: { p: Named }) { ->notReferencedNestedAlias : ({ p: { name: alias } }: { p: Named;}) => void +>notReferencedNestedAlias : ({ p: { name: alias } }: { p: Named; }) => void >p : any >name : any >alias : string @@ -82,7 +82,7 @@ function referencedInSignarture({ name: alias }: Named): typeof alias { } function referencedInSignartureKeyword({ function: alias }: { function: string }): typeof alias { ->referencedInSignartureKeyword : ({ function: alias }: { function: string;}) => typeof alias +>referencedInSignartureKeyword : ({ function: alias }: { function: string; }) => typeof alias >function : any >alias : string >function : string @@ -121,7 +121,7 @@ function referencedInNestedFunction({ name: alias }: Named) { } function referencedNestedAlias({ p: { name: alias } }: { p: Named }): typeof alias { ->referencedNestedAlias : ({ p: { name: alias } }: { p: Named;}) => typeof alias +>referencedNestedAlias : ({ p: { name: alias } }: { p: Named; }) => typeof alias >p : any >name : any >alias : string diff --git a/tests/baselines/reference/declarationEmitDestructuring1.types b/tests/baselines/reference/declarationEmitDestructuring1.types index 6c0947bf70628..d01785433f65c 100644 --- a/tests/baselines/reference/declarationEmitDestructuring1.types +++ b/tests/baselines/reference/declarationEmitDestructuring1.types @@ -14,7 +14,7 @@ function far([a, [b], [[c]]]: [number, boolean[], string[][]]): void { } >c : string function bar({a1, b1, c1}: { a1: number, b1: boolean, c1: string }): void { } ->bar : ({ a1, b1, c1 }: { a1: number; b1: boolean; c1: string;}) => void +>bar : ({ a1, b1, c1 }: { a1: number; b1: boolean; c1: string; }) => void >a1 : number >b1 : boolean >c1 : string @@ -23,7 +23,7 @@ function bar({a1, b1, c1}: { a1: number, b1: boolean, c1: string }): void { } >c1 : string function baz({a2, b2: {b1, c1}}: { a2: number, b2: { b1: boolean, c1: string } }): void { } ->baz : ({ a2, b2: { b1, c1 } }: { a2: number; b2: { b1: boolean; c1: string; };}) => void +>baz : ({ a2, b2: { b1, c1 } }: { a2: number; b2: { b1: boolean; c1: string; }; }) => void >a2 : number >b2 : any >b1 : boolean diff --git a/tests/baselines/reference/declarationEmitDestructuringOptionalBindingParametersInOverloads.types b/tests/baselines/reference/declarationEmitDestructuringOptionalBindingParametersInOverloads.types index 7e957edd1194d..0998f1a5536d9 100644 --- a/tests/baselines/reference/declarationEmitDestructuringOptionalBindingParametersInOverloads.types +++ b/tests/baselines/reference/declarationEmitDestructuringOptionalBindingParametersInOverloads.types @@ -13,7 +13,7 @@ function foo(...rest: any[]) { } function foo2( { x, y, z }?: { x: string; y: number; z: boolean }); ->foo2 : ({ x, y, z }?: { x: string; y: number; z: boolean;}) => any +>foo2 : ({ x, y, z }?: { x: string; y: number; z: boolean; }) => any >x : string >y : number >z : boolean diff --git a/tests/baselines/reference/declarationEmitDestructuringWithOptionalBindingParameters.types b/tests/baselines/reference/declarationEmitDestructuringWithOptionalBindingParameters.types index db4441e8afd5e..029e8942c49a9 100644 --- a/tests/baselines/reference/declarationEmitDestructuringWithOptionalBindingParameters.types +++ b/tests/baselines/reference/declarationEmitDestructuringWithOptionalBindingParameters.types @@ -8,7 +8,7 @@ function foo([x,y,z]?: [string, number, boolean]) { >z : boolean } function foo1( { x, y, z }?: { x: string; y: number; z: boolean }) { ->foo1 : ({ x, y, z }?: { x: string; y: number; z: boolean;}) => void +>foo1 : ({ x, y, z }?: { x: string; y: number; z: boolean; }) => void >x : string >y : number >z : boolean diff --git a/tests/baselines/reference/declarationEmitDuplicateParameterDestructuring.types b/tests/baselines/reference/declarationEmitDuplicateParameterDestructuring.types index 2bdaf6c1a885f..f0fe0fac673af 100644 --- a/tests/baselines/reference/declarationEmitDuplicateParameterDestructuring.types +++ b/tests/baselines/reference/declarationEmitDuplicateParameterDestructuring.types @@ -2,8 +2,8 @@ === declarationEmitDuplicateParameterDestructuring.ts === export const fn1 = ({ prop: a, prop: b }: { prop: number }) => a + b; ->fn1 : ({ prop: a, prop: b }: { prop: number;}) => number ->({ prop: a, prop: b }: { prop: number }) => a + b : ({ prop: a, prop: b }: { prop: number;}) => number +>fn1 : ({ prop: a, prop: b }: { prop: number; }) => number +>({ prop: a, prop: b }: { prop: number }) => a + b : ({ prop: a, prop: b }: { prop: number; }) => number >prop : any >a : number >prop : any @@ -14,8 +14,8 @@ export const fn1 = ({ prop: a, prop: b }: { prop: number }) => a + b; >b : number export const fn2 = ({ prop: a }: { prop: number }, { prop: b }: { prop: number }) => a + b; ->fn2 : ({ prop: a }: { prop: number;}, { prop: b }: { prop: number;}) => number ->({ prop: a }: { prop: number }, { prop: b }: { prop: number }) => a + b : ({ prop: a }: { prop: number;}, { prop: b }: { prop: number;}) => number +>fn2 : ({ prop: a }: { prop: number; }, { prop: b }: { prop: number; }) => number +>({ prop: a }: { prop: number }, { prop: b }: { prop: number }) => a + b : ({ prop: a }: { prop: number; }, { prop: b }: { prop: number; }) => number >prop : any >a : number >prop : number diff --git a/tests/baselines/reference/declarationEmitOptionalMethod.types b/tests/baselines/reference/declarationEmitOptionalMethod.types index 695cd13177e22..3eb1e4af8f985 100644 --- a/tests/baselines/reference/declarationEmitOptionalMethod.types +++ b/tests/baselines/reference/declarationEmitOptionalMethod.types @@ -2,8 +2,8 @@ === declarationEmitOptionalMethod.ts === export const Foo = (opts: { ->Foo : (opts: { a?(): void; b?: () => void;}) => { c?(): void; d?: () => void;} ->(opts: { a?(): void, b?: () => void,}): { c?(): void, d?: () => void,} => ({ }) : (opts: { a?(): void; b?: () => void;}) => { c?(): void; d?: () => void;} +>Foo : (opts: { a?(): void; b?: () => void; }) => { c?(): void; d?: () => void; } +>(opts: { a?(): void, b?: () => void,}): { c?(): void, d?: () => void,} => ({ }) : (opts: { a?(): void; b?: () => void; }) => { c?(): void; d?: () => void; } >opts : { a?(): void; b?: (() => void) | undefined; } a?(): void, diff --git a/tests/baselines/reference/declarationMapsMultifile.types b/tests/baselines/reference/declarationMapsMultifile.types index 8e902195ab313..5bc70643f5a82 100644 --- a/tests/baselines/reference/declarationMapsMultifile.types +++ b/tests/baselines/reference/declarationMapsMultifile.types @@ -5,7 +5,7 @@ export class Foo { >Foo : Foo doThing(x: {a: number}) { ->doThing : (x: { a: number;}) => { b: number; } +>doThing : (x: { a: number; }) => { b: number; } >x : { a: number; } >a : number diff --git a/tests/baselines/reference/declarationMapsOutFile.types b/tests/baselines/reference/declarationMapsOutFile.types index 31219b4e592f2..1250fd5e13cd4 100644 --- a/tests/baselines/reference/declarationMapsOutFile.types +++ b/tests/baselines/reference/declarationMapsOutFile.types @@ -5,7 +5,7 @@ export class Foo { >Foo : Foo doThing(x: {a: number}) { ->doThing : (x: { a: number;}) => { b: number; } +>doThing : (x: { a: number; }) => { b: number; } >x : { a: number; } >a : number diff --git a/tests/baselines/reference/declarationMapsOutFile2.types b/tests/baselines/reference/declarationMapsOutFile2.types index 54dd35fec5ee8..d739e4cbb4992 100644 --- a/tests/baselines/reference/declarationMapsOutFile2.types +++ b/tests/baselines/reference/declarationMapsOutFile2.types @@ -5,7 +5,7 @@ class Foo { >Foo : Foo doThing(x: {a: number}) { ->doThing : (x: { a: number;}) => { b: number; } +>doThing : (x: { a: number; }) => { b: number; } >x : { a: number; } >a : number diff --git a/tests/baselines/reference/declarationMapsWithSourceMap.types b/tests/baselines/reference/declarationMapsWithSourceMap.types index db8edd0c39a14..c98f45dde6b23 100644 --- a/tests/baselines/reference/declarationMapsWithSourceMap.types +++ b/tests/baselines/reference/declarationMapsWithSourceMap.types @@ -5,7 +5,7 @@ class Foo { >Foo : Foo doThing(x: {a: number}) { ->doThing : (x: { a: number;}) => { b: number; } +>doThing : (x: { a: number; }) => { b: number; } >x : { a: number; } >a : number diff --git a/tests/baselines/reference/deepExcessPropertyCheckingWhenTargetIsIntersection.types b/tests/baselines/reference/deepExcessPropertyCheckingWhenTargetIsIntersection.types index f2bc7a815e25d..80068bcfe31d1 100644 --- a/tests/baselines/reference/deepExcessPropertyCheckingWhenTargetIsIntersection.types +++ b/tests/baselines/reference/deepExcessPropertyCheckingWhenTargetIsIntersection.types @@ -45,10 +45,10 @@ TestComponent({icon: { props: { INVALID_PROP_NAME: 'share', ariaLabel: 'test lab >'test label' : "test label" const TestComponent2: StatelessComponent = (props) => { ->TestComponent2 : StatelessComponent +>TestComponent2 : StatelessComponent >props2 : { x: number; } >x : number ->(props) => { return null;} : (props: (TestProps | { props2: { x: number;}; }) & { children?: number; }) => any +>(props) => { return null;} : (props: (TestProps | { props2: { x: number; }; }) & { children?: number; }) => any >props : (TestProps | { props2: { x: number; }; }) & { children?: number; } return null; diff --git a/tests/baselines/reference/deeplyNestedAssignabilityIssue.types b/tests/baselines/reference/deeplyNestedAssignabilityIssue.types index 092cb28e88ba3..d14c73f8fb488 100644 --- a/tests/baselines/reference/deeplyNestedAssignabilityIssue.types +++ b/tests/baselines/reference/deeplyNestedAssignabilityIssue.types @@ -8,10 +8,10 @@ interface A { interface Large { something: { ->something : { another: { more: { thing: A; }; yetstill: { another: A; };}; } +>something : { another: { more: { thing: A; }; yetstill: { another: A; }; }; } another: { ->another : { more: { thing: A;}; yetstill: { another: A;}; } +>another : { more: { thing: A; }; yetstill: { another: A; }; } more: { >more : { thing: A; } diff --git a/tests/baselines/reference/deeplyNestedMappedTypes.types b/tests/baselines/reference/deeplyNestedMappedTypes.types index 4b4cd3cea917b..132a06bb789e2 100644 --- a/tests/baselines/reference/deeplyNestedMappedTypes.types +++ b/tests/baselines/reference/deeplyNestedMappedTypes.types @@ -13,20 +13,20 @@ type Id = { [K in keyof T]: Id }; >Id : Id type Foo1 = Id<{ x: { y: { z: { a: { b: { c: number } } } } } }>; ->Foo1 : Id<{ x: { y: { z: { a: { b: { c: number; }; }; }; };}; }> ->x : { y: { z: { a: { b: { c: number; }; }; };}; } ->y : { z: { a: { b: { c: number; }; };}; } ->z : { a: { b: { c: number; };}; } ->a : { b: { c: number;}; } +>Foo1 : Id<{ x: { y: { z: { a: { b: { c: number; }; }; }; }; }; }> +>x : { y: { z: { a: { b: { c: number; }; }; }; }; } +>y : { z: { a: { b: { c: number; }; }; }; } +>z : { a: { b: { c: number; }; }; } +>a : { b: { c: number; }; } >b : { c: number; } >c : number type Foo2 = Id<{ x: { y: { z: { a: { b: { c: string } } } } } }>; ->Foo2 : Id<{ x: { y: { z: { a: { b: { c: string; }; }; }; };}; }> ->x : { y: { z: { a: { b: { c: string; }; }; };}; } ->y : { z: { a: { b: { c: string; }; };}; } ->z : { a: { b: { c: string; };}; } ->a : { b: { c: string;}; } +>Foo2 : Id<{ x: { y: { z: { a: { b: { c: string; }; }; }; }; }; }> +>x : { y: { z: { a: { b: { c: string; }; }; }; }; } +>y : { z: { a: { b: { c: string; }; }; }; } +>z : { a: { b: { c: string; }; }; } +>a : { b: { c: string; }; } >b : { c: string; } >c : string @@ -41,20 +41,20 @@ type Id2 = { [K in keyof T]: Id2> }; >Id2 : Id2 type Foo3 = Id2<{ x: { y: { z: { a: { b: { c: number } } } } } }>; ->Foo3 : Id2<{ x: { y: { z: { a: { b: { c: number; }; }; }; };}; }> ->x : { y: { z: { a: { b: { c: number; }; }; };}; } ->y : { z: { a: { b: { c: number; }; };}; } ->z : { a: { b: { c: number; };}; } ->a : { b: { c: number;}; } +>Foo3 : Id2<{ x: { y: { z: { a: { b: { c: number; }; }; }; }; }; }> +>x : { y: { z: { a: { b: { c: number; }; }; }; }; } +>y : { z: { a: { b: { c: number; }; }; }; } +>z : { a: { b: { c: number; }; }; } +>a : { b: { c: number; }; } >b : { c: number; } >c : number type Foo4 = Id2<{ x: { y: { z: { a: { b: { c: string } } } } } }>; ->Foo4 : Id2<{ x: { y: { z: { a: { b: { c: string; }; }; }; };}; }> ->x : { y: { z: { a: { b: { c: string; }; }; };}; } ->y : { z: { a: { b: { c: string; }; };}; } ->z : { a: { b: { c: string; };}; } ->a : { b: { c: string;}; } +>Foo4 : Id2<{ x: { y: { z: { a: { b: { c: string; }; }; }; }; }; }> +>x : { y: { z: { a: { b: { c: string; }; }; }; }; } +>y : { z: { a: { b: { c: string; }; }; }; } +>z : { a: { b: { c: string; }; }; } +>a : { b: { c: string; }; } >b : { c: string; } >c : string @@ -71,19 +71,19 @@ type RequiredDeep = { [K in keyof T]-?: RequiredDeep }; >RequiredDeep : RequiredDeep type A = { a?: { b: { c: 1 | { d: 2000 } }}} ->A : { a?: { b: { c: 1 | { d: 2000; };}; } | undefined; } ->a : { b: { c: 1 | { d: 2000; };}; } | undefined ->b : { c: 1 | { d: 2000;}; } +>A : { a?: { b: { c: 1 | { d: 2000; }; }; } | undefined; } +>a : { b: { c: 1 | { d: 2000; }; }; } | undefined +>b : { c: 1 | { d: 2000; }; } >c : { d: 2000; } | 1 >d : 2000 type B = { a?: { b: { c: { d: { e: { f: { g: 2 }}}}, x: 1000 }}} ->B : { a?: { b: { c: { d: { e: { f: { g: 2; }; }; }; }; x: 1000;}; } | undefined; } ->a : { b: { c: { d: { e: { f: { g: 2; }; }; }; }; x: 1000;}; } | undefined ->b : { c: { d: { e: { f: { g: 2; }; }; };}; x: 1000; } ->c : { d: { e: { f: { g: 2; }; };}; } ->d : { e: { f: { g: 2; };}; } ->e : { f: { g: 2;}; } +>B : { a?: { b: { c: { d: { e: { f: { g: 2; }; }; }; }; x: 1000; }; } | undefined; } +>a : { b: { c: { d: { e: { f: { g: 2; }; }; }; }; x: 1000; }; } | undefined +>b : { c: { d: { e: { f: { g: 2; }; }; }; }; x: 1000; } +>c : { d: { e: { f: { g: 2; }; }; }; } +>d : { e: { f: { g: 2; }; }; } +>e : { f: { g: 2; }; } >f : { g: 2; } >g : 2 >x : 1000 diff --git a/tests/baselines/reference/defaultDeclarationEmitNamedCorrectly.types b/tests/baselines/reference/defaultDeclarationEmitNamedCorrectly.types index b93dd4ce38cc6..f3dedc2b4b1f2 100644 --- a/tests/baselines/reference/defaultDeclarationEmitNamedCorrectly.types +++ b/tests/baselines/reference/defaultDeclarationEmitNamedCorrectly.types @@ -9,8 +9,8 @@ export interface Things { >t : T } export function make(x: { new (): CTor & {props: P} }): Things { ->make : (x: { new (): CTor & { props: P; };}) => Things ->x : new () => CTor & { props: P;} +>make : (x: { new (): CTor & { props: P; }; }) => Things +>x : new () => CTor & { props: P; } >props : P return null as any; diff --git a/tests/baselines/reference/defaultDeclarationEmitShadowedNamedCorrectly.types b/tests/baselines/reference/defaultDeclarationEmitShadowedNamedCorrectly.types index d2243994e32bc..6bf713d3b78c9 100644 --- a/tests/baselines/reference/defaultDeclarationEmitShadowedNamedCorrectly.types +++ b/tests/baselines/reference/defaultDeclarationEmitShadowedNamedCorrectly.types @@ -12,8 +12,8 @@ export interface Things { >t : T } export function make(x: { new (): CTor & {props: P} }): Things { ->make : (x: { new (): CTor & { props: P; };}) => Things ->x : new () => CTor & { props: P;} +>make : (x: { new (): CTor & { props: P; }; }) => Things +>x : new () => CTor & { props: P; } >props : P return null as any; diff --git a/tests/baselines/reference/defaultValueInFunctionTypes.types b/tests/baselines/reference/defaultValueInFunctionTypes.types index 50060f43ed68f..38e4e17edacad 100644 --- a/tests/baselines/reference/defaultValueInFunctionTypes.types +++ b/tests/baselines/reference/defaultValueInFunctionTypes.types @@ -2,7 +2,7 @@ === defaultValueInFunctionTypes.ts === type Foo = ({ first = 0 }: { first?: number }) => unknown; ->Foo : ({ first }: { first?: number;}) => unknown +>Foo : ({ first }: { first?: number; }) => unknown >first : number >0 : 0 >first : number diff --git a/tests/baselines/reference/deferredLookupTypeResolution.types b/tests/baselines/reference/deferredLookupTypeResolution.types index df90e3626548f..2d8ef11ae7796 100644 --- a/tests/baselines/reference/deferredLookupTypeResolution.types +++ b/tests/baselines/reference/deferredLookupTypeResolution.types @@ -29,7 +29,7 @@ type T2 = ObjectHasKey<{ a: string }, 'b'>; // 'false' // Verify that mapped type isn't eagerly resolved in type-to-string operation declare function f1(a: A, b: B): { [P in A | B]: any }; ->f1 : (a: A, b: B) => { [P in A | B]: any;} +>f1 : (a: A, b: B) => { [P in A | B]: any; } >a : A >b : B diff --git a/tests/baselines/reference/deleteChain.types b/tests/baselines/reference/deleteChain.types index c15cf113a8b28..a082784376ee7 100644 --- a/tests/baselines/reference/deleteChain.types +++ b/tests/baselines/reference/deleteChain.types @@ -19,7 +19,7 @@ delete (o1?.b); >b : string | undefined declare const o2: undefined | { b: { c: string } }; ->o2 : { b: { c: string;}; } | undefined +>o2 : { b: { c: string; }; } | undefined >b : { c: string; } >c : string @@ -41,7 +41,7 @@ delete (o2?.b.c); >c : string | undefined declare const o3: { b: undefined | { c: string } }; ->o3 : { b: undefined | { c: string;}; } +>o3 : { b: undefined | { c: string; }; } >b : { c: string; } | undefined >c : string @@ -63,8 +63,8 @@ delete (o3.b?.c); >c : string | undefined declare const o4: { b?: { c: { d?: { e: string } } } }; ->o4 : { b?: { c: { d?: { e: string; };}; } | undefined; } ->b : { c: { d?: { e: string; };}; } | undefined +>o4 : { b?: { c: { d?: { e: string; }; }; } | undefined; } +>b : { c: { d?: { e: string; }; }; } | undefined >c : { d?: { e: string; } | undefined; } >d : { e: string; } | undefined >e : string @@ -108,8 +108,8 @@ delete (o4.b?.c.d?.e); >e : string | undefined declare const o5: { b?(): { c: { d?: { e: string } } } }; ->o5 : { b?(): { c: { d?: { e: string; }; };}; } ->b : (() => { c: { d?: { e: string; }; };}) | undefined +>o5 : { b?(): { c: { d?: { e: string; }; }; }; } +>b : (() => { c: { d?: { e: string; }; }; }) | undefined >c : { d?: { e: string; } | undefined; } >d : { e: string; } | undefined >e : string @@ -142,8 +142,8 @@ delete (o5.b?.().c.d?.e); >e : string | undefined declare const o6: { b?: { c: { d?: { e: string } } } }; ->o6 : { b?: { c: { d?: { e: string; };}; } | undefined; } ->b : { c: { d?: { e: string; };}; } | undefined +>o6 : { b?: { c: { d?: { e: string; }; }; } | undefined; } +>b : { c: { d?: { e: string; }; }; } | undefined >c : { d?: { e: string; } | undefined; } >d : { e: string; } | undefined >e : string diff --git a/tests/baselines/reference/dependentDestructuredVariables.types b/tests/baselines/reference/dependentDestructuredVariables.types index f1a20a753460a..092d75c2f614e 100644 --- a/tests/baselines/reference/dependentDestructuredVariables.types +++ b/tests/baselines/reference/dependentDestructuredVariables.types @@ -477,7 +477,7 @@ function unrefined1(ab: AB): void { // Repro from #38020 type Action3 = ->Action3 : { type: 'add'; payload: { toAdd: number;}; } | { type: 'remove'; payload: { toRemove: number;}; } +>Action3 : { type: 'add'; payload: { toAdd: number; }; } | { type: 'remove'; payload: { toRemove: number; }; } | {type: 'add', payload: { toAdd: number } } >type : "add" @@ -749,10 +749,10 @@ reducer("concat", { firstArr: [1, 2], secondArr: [3, 4] }); // repro from https://github.com/microsoft/TypeScript/pull/47190#issuecomment-1057603588 type FooMethod = { ->FooMethod : { method(...args: [ type: "str", cb: (e: string) => void] | [ type: "num", cb: (e: number) => void]): void; } +>FooMethod : { method(...args: [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void]): void; } method(...args: ->method : (...args: [ type: "str", cb: (e: string) => void] | [ type: "num", cb: (e: number) => void]) => void +>method : (...args: [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void]) => void >args : [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void] [type: "str", cb: (e: string) => void] | @@ -793,10 +793,10 @@ let fooM: FooMethod = { }; type FooAsyncMethod = { ->FooAsyncMethod : { method(...args: [ type: "str", cb: (e: string) => void] | [ type: "num", cb: (e: number) => void]): Promise; } +>FooAsyncMethod : { method(...args: [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void]): Promise; } method(...args: ->method : (...args: [ type: "str", cb: (e: string) => void] | [ type: "num", cb: (e: number) => void]) => Promise +>method : (...args: [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void]) => Promise >args : [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void] [type: "str", cb: (e: string) => void] | @@ -837,10 +837,10 @@ let fooAsyncM: FooAsyncMethod = { }; type FooGenMethod = { ->FooGenMethod : { method(...args: [ type: "str", cb: (e: string) => void] | [ type: "num", cb: (e: number) => void]): Generator; } +>FooGenMethod : { method(...args: [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void]): Generator; } method(...args: ->method : (...args: [ type: "str", cb: (e: string) => void] | [ type: "num", cb: (e: number) => void]) => Generator +>method : (...args: [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void]) => Generator >args : [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void] [type: "str", cb: (e: string) => void] | @@ -881,10 +881,10 @@ let fooGenM: FooGenMethod = { }; type FooAsyncGenMethod = { ->FooAsyncGenMethod : { method(...args: [ type: "str", cb: (e: string) => void] | [ type: "num", cb: (e: number) => void]): AsyncGenerator; } +>FooAsyncGenMethod : { method(...args: [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void]): AsyncGenerator; } method(...args: ->method : (...args: [ type: "str", cb: (e: string) => void] | [ type: "num", cb: (e: number) => void]) => AsyncGenerator +>method : (...args: [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void]) => AsyncGenerator >args : [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void] [type: "str", cb: (e: string) => void] | @@ -1058,7 +1058,7 @@ function fa1(x: [true, number] | [false, string]) { } function fa2(x: { guard: true, value: number } | { guard: false, value: string }) { ->fa2 : (x: { guard: true; value: number;} | { guard: false; value: string;}) => void +>fa2 : (x: { guard: true; value: number; } | { guard: false; value: string; }) => void >x : { guard: true; value: number; } | { guard: false; value: string; } >guard : true >true : true diff --git a/tests/baselines/reference/derivedInterfaceIncompatibleWithBaseIndexer.types b/tests/baselines/reference/derivedInterfaceIncompatibleWithBaseIndexer.types index c2a3daf98a82c..9320e49b0d707 100644 --- a/tests/baselines/reference/derivedInterfaceIncompatibleWithBaseIndexer.types +++ b/tests/baselines/reference/derivedInterfaceIncompatibleWithBaseIndexer.types @@ -32,7 +32,7 @@ interface Derived3 extends Base { interface Derived4 extends Base { foo(): { x: number } // error ->foo : () => { x: number;} +>foo : () => { x: number; } >x : number } diff --git a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.types b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.types index a0f1618637893..b3a1057f1ef16 100644 --- a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.types +++ b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.types @@ -5,7 +5,7 @@ class Base { >Base : Base foo(x: { a: number }): { a: number } { ->foo : (x: { a: number;}) => { a: number;} +>foo : (x: { a: number; }) => { a: number; } >x : { a: number; } >a : number >a : number @@ -19,7 +19,7 @@ class Derived extends Base { >Base : Base foo(x: { a: number; b: number }): { a: number; b: number } { ->foo : (x: { a: number; b: number;}) => { a: number; b: number;} +>foo : (x: { a: number; b: number; }) => { a: number; b: number; } >x : { a: number; b: number; } >a : number >b : number diff --git a/tests/baselines/reference/destructionAssignmentError.types b/tests/baselines/reference/destructionAssignmentError.types index 2602c85a325f9..371b43afb7aed 100644 --- a/tests/baselines/reference/destructionAssignmentError.types +++ b/tests/baselines/reference/destructionAssignmentError.types @@ -2,7 +2,7 @@ === destructionAssignmentError.ts === declare function fn(): { a: 1, b: 2 } ->fn : () => { a: 1; b: 2;} +>fn : () => { a: 1; b: 2; } >a : 1 >b : 2 diff --git a/tests/baselines/reference/destructureOptionalParameter.types b/tests/baselines/reference/destructureOptionalParameter.types index 05b900317f1b3..e2c5f481613bf 100644 --- a/tests/baselines/reference/destructureOptionalParameter.types +++ b/tests/baselines/reference/destructureOptionalParameter.types @@ -2,14 +2,14 @@ === destructureOptionalParameter.ts === declare function f1({ a, b }?: { a: number, b: string }): void; ->f1 : ({ a, b }?: { a: number; b: string;}) => void +>f1 : ({ a, b }?: { a: number; b: string; }) => void >a : number >b : string >a : number >b : string function f2({ a, b }: { a: number, b: number } = { a: 0, b: 0 }) { ->f2 : ({ a, b }?: { a: number; b: number;}) => void +>f2 : ({ a, b }?: { a: number; b: number; }) => void >a : number >b : number >a : number diff --git a/tests/baselines/reference/destructuredMaappedTypeIsNotImplicitlyAny.types b/tests/baselines/reference/destructuredMaappedTypeIsNotImplicitlyAny.types index f1229421e02d1..da04f08674beb 100644 --- a/tests/baselines/reference/destructuredMaappedTypeIsNotImplicitlyAny.types +++ b/tests/baselines/reference/destructuredMaappedTypeIsNotImplicitlyAny.types @@ -2,7 +2,7 @@ === destructuredMaappedTypeIsNotImplicitlyAny.ts === function foo(key: T, obj: { [_ in T]: number }) { ->foo : (key: T, obj: { [_ in T]: number;}) => void +>foo : (key: T, obj: { [_ in T]: number; }) => void >key : T >obj : { [_ in T]: number; } diff --git a/tests/baselines/reference/destructuringAssignmentWithDefault.types b/tests/baselines/reference/destructuringAssignmentWithDefault.types index e53d6c735e332..73eb31022bcdd 100644 --- a/tests/baselines/reference/destructuringAssignmentWithDefault.types +++ b/tests/baselines/reference/destructuringAssignmentWithDefault.types @@ -21,7 +21,7 @@ let x = 0; // Repro from #26235 function f1(options?: { color?: string, width?: number }) { ->f1 : (options?: { color?: string; width?: number;}) => void +>f1 : (options?: { color?: string; width?: number; }) => void >options : { color?: string | undefined; width?: number | undefined; } | undefined >color : string | undefined >width : number | undefined @@ -93,7 +93,7 @@ function f2(options?: [string?, number?]) { } function f3(options?: { color: string, width: number }) { ->f3 : (options?: { color: string; width: number;}) => void +>f3 : (options?: { color: string; width: number; }) => void >options : { color: string; width: number; } | undefined >color : string >width : number diff --git a/tests/baselines/reference/destructuringControlFlow.types b/tests/baselines/reference/destructuringControlFlow.types index 311d55bf1b4bf..093a204a73bec 100644 --- a/tests/baselines/reference/destructuringControlFlow.types +++ b/tests/baselines/reference/destructuringControlFlow.types @@ -2,7 +2,7 @@ === destructuringControlFlow.ts === function f1(obj: { a?: string }) { ->f1 : (obj: { a?: string;}) => void +>f1 : (obj: { a?: string; }) => void >obj : { a?: string | undefined; } >a : string | undefined @@ -96,7 +96,7 @@ function f2(obj: [number, string] | null[]) { } function f3(obj: { a?: number, b?: string }) { ->f3 : (obj: { a?: number; b?: string;}) => void +>f3 : (obj: { a?: number; b?: string; }) => void >obj : { a?: number | undefined; b?: string | undefined; } >a : number | undefined >b : string | undefined diff --git a/tests/baselines/reference/destructuringParameterDeclaration1ES5.types b/tests/baselines/reference/destructuringParameterDeclaration1ES5.types index 8784c8800f40c..a9b69a0db9322 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration1ES5.types +++ b/tests/baselines/reference/destructuringParameterDeclaration1ES5.types @@ -13,13 +13,13 @@ function a1([a, b, [[c]]]: [number, number, string[][]]) { } >c : string function a2(o: { x: number, a: number }) { } ->a2 : (o: { x: number; a: number;}) => void +>a2 : (o: { x: number; a: number; }) => void >o : { x: number; a: number; } >x : number >a : number function a3({j, k, l: {m, n}, q: [a, b, c]}: { j: number, k: string, l: { m: boolean, n: number }, q: (number|string)[] }) { }; ->a3 : ({ j, k, l: { m, n }, q: [a, b, c] }: { j: number; k: string; l: { m: boolean; n: number; }; q: (number | string)[];}) => void +>a3 : ({ j, k, l: { m, n }, q: [a, b, c] }: { j: number; k: string; l: { m: boolean; n: number; }; q: (number | string)[]; }) => void >j : number >k : string >l : any @@ -37,7 +37,7 @@ function a3({j, k, l: {m, n}, q: [a, b, c]}: { j: number, k: string, l: { m: boo >q : (string | number)[] function a4({x, a}: { x: number, a: number }) { } ->a4 : ({ x, a }: { x: number; a: number;}) => void +>a4 : ({ x, a }: { x: number; a: number; }) => void >x : number >a : number >x : number @@ -212,7 +212,7 @@ function c2({z = 10}) { } >10 : 10 function c3({b}: { b: number|string} = { b: "hello" }) { } ->c3 : ({ b }?: { b: number | string;}) => void +>c3 : ({ b }?: { b: number | string; }) => void >b : string | number >b : string | number >{ b: "hello" } : { b: string; } @@ -406,12 +406,12 @@ function e1({x: number}) { } // x has type any NOT number >number : any function e2({x}: { x: number }) { } // x is type number ->e2 : ({ x }: { x: number;}) => void +>e2 : ({ x }: { x: number; }) => void >x : number >x : number function e3({x}: { x?: number }) { } // x is an optional with type number ->e3 : ({ x }: { x?: number;}) => void +>e3 : ({ x }: { x?: number; }) => void >x : number >x : number @@ -423,7 +423,7 @@ function e4({x: [number,string,any] }) { } // x has type [any, any, any] >any : any function e5({x: [a, b, c]}: { x: [number, number, number] }) { } // x has type [any, any, any] ->e5 : ({ x: [a, b, c] }: { x: [number, number, number];}) => void +>e5 : ({ x: [a, b, c] }: { x: [number, number, number]; }) => void >x : any >a : number >b : number diff --git a/tests/baselines/reference/destructuringParameterDeclaration1ES5iterable.types b/tests/baselines/reference/destructuringParameterDeclaration1ES5iterable.types index e8b41e412adb0..5056985ac45c6 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration1ES5iterable.types +++ b/tests/baselines/reference/destructuringParameterDeclaration1ES5iterable.types @@ -13,13 +13,13 @@ function a1([a, b, [[c]]]: [number, number, string[][]]) { } >c : string function a2(o: { x: number, a: number }) { } ->a2 : (o: { x: number; a: number;}) => void +>a2 : (o: { x: number; a: number; }) => void >o : { x: number; a: number; } >x : number >a : number function a3({j, k, l: {m, n}, q: [a, b, c]}: { j: number, k: string, l: { m: boolean, n: number }, q: (number|string)[] }) { }; ->a3 : ({ j, k, l: { m, n }, q: [a, b, c] }: { j: number; k: string; l: { m: boolean; n: number; }; q: (number | string)[];}) => void +>a3 : ({ j, k, l: { m, n }, q: [a, b, c] }: { j: number; k: string; l: { m: boolean; n: number; }; q: (number | string)[]; }) => void >j : number >k : string >l : any @@ -37,7 +37,7 @@ function a3({j, k, l: {m, n}, q: [a, b, c]}: { j: number, k: string, l: { m: boo >q : (string | number)[] function a4({x, a}: { x: number, a: number }) { } ->a4 : ({ x, a }: { x: number; a: number;}) => void +>a4 : ({ x, a }: { x: number; a: number; }) => void >x : number >a : number >x : number @@ -212,7 +212,7 @@ function c2({z = 10}) { } >10 : 10 function c3({b}: { b: number|string} = { b: "hello" }) { } ->c3 : ({ b }?: { b: number | string;}) => void +>c3 : ({ b }?: { b: number | string; }) => void >b : string | number >b : string | number >{ b: "hello" } : { b: string; } @@ -406,12 +406,12 @@ function e1({x: number}) { } // x has type any NOT number >number : any function e2({x}: { x: number }) { } // x is type number ->e2 : ({ x }: { x: number;}) => void +>e2 : ({ x }: { x: number; }) => void >x : number >x : number function e3({x}: { x?: number }) { } // x is an optional with type number ->e3 : ({ x }: { x?: number;}) => void +>e3 : ({ x }: { x?: number; }) => void >x : number >x : number @@ -423,7 +423,7 @@ function e4({x: [number,string,any] }) { } // x has type [any, any, any] >any : any function e5({x: [a, b, c]}: { x: [number, number, number] }) { } // x has type [any, any, any] ->e5 : ({ x: [a, b, c] }: { x: [number, number, number];}) => void +>e5 : ({ x: [a, b, c] }: { x: [number, number, number]; }) => void >x : any >a : number >b : number diff --git a/tests/baselines/reference/destructuringParameterDeclaration1ES6.types b/tests/baselines/reference/destructuringParameterDeclaration1ES6.types index 13fb73fd0bbbc..8b9160b8c951f 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration1ES6.types +++ b/tests/baselines/reference/destructuringParameterDeclaration1ES6.types @@ -15,13 +15,13 @@ function a1([a, b, [[c]]]: [number, number, string[][]]) { } >c : string function a2(o: { x: number, a: number }) { } ->a2 : (o: { x: number; a: number;}) => void +>a2 : (o: { x: number; a: number; }) => void >o : { x: number; a: number; } >x : number >a : number function a3({j, k, l: {m, n}, q: [a, b, c]}: { j: number, k: string, l: { m: boolean, n: number }, q: (number|string)[] }) { }; ->a3 : ({ j, k, l: { m, n }, q: [a, b, c] }: { j: number; k: string; l: { m: boolean; n: number; }; q: (number | string)[];}) => void +>a3 : ({ j, k, l: { m, n }, q: [a, b, c] }: { j: number; k: string; l: { m: boolean; n: number; }; q: (number | string)[]; }) => void >j : number >k : string >l : any @@ -39,7 +39,7 @@ function a3({j, k, l: {m, n}, q: [a, b, c]}: { j: number, k: string, l: { m: boo >q : (string | number)[] function a4({x, a}: { x: number, a: number }) { } ->a4 : ({ x, a }: { x: number; a: number;}) => void +>a4 : ({ x, a }: { x: number; a: number; }) => void >x : number >a : number >x : number @@ -195,7 +195,7 @@ function c2({z = 10}) { } >10 : 10 function c3({b}: { b: number|string} = { b: "hello" }) { } ->c3 : ({ b }?: { b: number | string;}) => void +>c3 : ({ b }?: { b: number | string; }) => void >b : string | number >b : string | number >{ b: "hello" } : { b: string; } @@ -380,12 +380,12 @@ function e1({x: number}) { } // x has type any NOT number >number : any function e2({x}: { x: number }) { } // x is type number ->e2 : ({ x }: { x: number;}) => void +>e2 : ({ x }: { x: number; }) => void >x : number >x : number function e3({x}: { x?: number }) { } // x is an optional with type number ->e3 : ({ x }: { x?: number;}) => void +>e3 : ({ x }: { x?: number; }) => void >x : number >x : number @@ -397,7 +397,7 @@ function e4({x: [number,string,any] }) { } // x has type [any, any, any] >any : any function e5({x: [a, b, c]}: { x: [number, number, number] }) { } // x has type [any, any, any] ->e5 : ({ x: [a, b, c] }: { x: [number, number, number];}) => void +>e5 : ({ x: [a, b, c] }: { x: [number, number, number]; }) => void >x : any >a : number >b : number diff --git a/tests/baselines/reference/destructuringParameterDeclaration2.types b/tests/baselines/reference/destructuringParameterDeclaration2.types index 26ea92777f715..4952b0a01edc4 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration2.types +++ b/tests/baselines/reference/destructuringParameterDeclaration2.types @@ -122,7 +122,7 @@ function c2({z = 10}) { } >10 : 10 function c3({b}: { b: number|string } = { b: "hello" }) { } ->c3 : ({ b }?: { b: number | string;}) => void +>c3 : ({ b }?: { b: number | string; }) => void >b : string | number >b : string | number >{ b: "hello" } : { b: string; } diff --git a/tests/baselines/reference/destructuringParameterDeclaration5.types b/tests/baselines/reference/destructuringParameterDeclaration5.types index 8f60076e303f2..c765e198f0b1c 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration5.types +++ b/tests/baselines/reference/destructuringParameterDeclaration5.types @@ -55,17 +55,17 @@ function d0({x} = { x: new Class() }) { } >Class : typeof Class function d1({x}: { x: F }) { } ->d1 : ({ x }: { x: F;}) => void +>d1 : ({ x }: { x: F; }) => void >x : F >x : F function d2({x}: { x: Class }) { } ->d2 : ({ x }: { x: Class;}) => void +>d2 : ({ x }: { x: Class; }) => void >x : Class >x : Class function d3({y}: { y: D }) { } ->d3 : ({ y }: { y: D;}) => void +>d3 : ({ y }: { y: D; }) => void >y : D >y : D diff --git a/tests/baselines/reference/destructuringParameterDeclaration8.types b/tests/baselines/reference/destructuringParameterDeclaration8.types index 89481ce08277b..7bd5f0cc7a3dd 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration8.types +++ b/tests/baselines/reference/destructuringParameterDeclaration8.types @@ -4,7 +4,7 @@ // explicit type annotation should cause `method` to have type 'x' | 'y' // both inside and outside `test`. function test({ ->test : ({ method, nested: { p } }: { method?: 'x' | 'y'; nested?: { p: 'a' | 'b'; };}) => void +>test : ({ method, nested: { p } }: { method?: 'x' | 'y'; nested?: { p: 'a' | 'b'; }; }) => void method = 'z', >method : "x" | "y" diff --git a/tests/baselines/reference/destructuringPropertyAssignmentNameIsNotAssignmentTarget.types b/tests/baselines/reference/destructuringPropertyAssignmentNameIsNotAssignmentTarget.types index 929ecda8eded7..26e70158bc53f 100644 --- a/tests/baselines/reference/destructuringPropertyAssignmentNameIsNotAssignmentTarget.types +++ b/tests/baselines/reference/destructuringPropertyAssignmentNameIsNotAssignmentTarget.types @@ -3,7 +3,7 @@ === destructuringPropertyAssignmentNameIsNotAssignmentTarget.ts === // test for #10668 function qux(bar: { value: number }) { ->qux : (bar: { value: number;}) => void +>qux : (bar: { value: number; }) => void >bar : { value: number; } >value : number diff --git a/tests/baselines/reference/destructuringTypeGuardFlow.types b/tests/baselines/reference/destructuringTypeGuardFlow.types index 4c8daa368af3c..396b74d3ed13e 100644 --- a/tests/baselines/reference/destructuringTypeGuardFlow.types +++ b/tests/baselines/reference/destructuringTypeGuardFlow.types @@ -2,7 +2,7 @@ === destructuringTypeGuardFlow.ts === type foo = { ->foo : { bar: number | null; baz: string; nested: { a: number; b: string | null;}; } +>foo : { bar: number | null; baz: string; nested: { a: number; b: string | null; }; } bar: number | null; >bar : number | null diff --git a/tests/baselines/reference/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.types b/tests/baselines/reference/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.types index a3a15b7ddbf3b..9c6cd4d2dbd28 100644 --- a/tests/baselines/reference/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.types +++ b/tests/baselines/reference/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.types @@ -12,7 +12,7 @@ declare function getNum(): number; >getNum : () => number declare function foo(arg: { x: Bar, y: Date }, item: number, items?: [number, number, number]): void; ->foo : (arg: { x: Bar; y: Date;}, item: number, items?: [number, number, number]) => void +>foo : (arg: { x: Bar; y: Date; }, item: number, items?: [number, number, number]) => void >arg : { x: Bar; y: Date; } >x : Bar >y : Date diff --git a/tests/baselines/reference/discriminateWithOptionalProperty3(exactoptionalpropertytypes=false).types b/tests/baselines/reference/discriminateWithOptionalProperty3(exactoptionalpropertytypes=false).types index f16f9997e9df7..8557468ab571e 100644 --- a/tests/baselines/reference/discriminateWithOptionalProperty3(exactoptionalpropertytypes=false).types +++ b/tests/baselines/reference/discriminateWithOptionalProperty3(exactoptionalpropertytypes=false).types @@ -27,7 +27,7 @@ interface ExecutionContext { } type CoercedVariableValues = ->CoercedVariableValues : { errors: ReadonlyArray; coerced?: undefined; } | { coerced: { [variable: string]: unknown;}; errors?: undefined; } +>CoercedVariableValues : { errors: ReadonlyArray; coerced?: undefined; } | { coerced: { [variable: string]: unknown; }; errors?: undefined; } | { errors: ReadonlyArray; coerced?: never } >errors : readonly GraphQLError[] @@ -39,7 +39,7 @@ type CoercedVariableValues = >errors : undefined declare function getVariableValues(inputs: { ->getVariableValues : (inputs: { readonly [variable: string]: unknown;}) => CoercedVariableValues +>getVariableValues : (inputs: { readonly [variable: string]: unknown; }) => CoercedVariableValues >inputs : { readonly [variable: string]: unknown; } readonly [variable: string]: unknown; diff --git a/tests/baselines/reference/discriminateWithOptionalProperty3(exactoptionalpropertytypes=true).types b/tests/baselines/reference/discriminateWithOptionalProperty3(exactoptionalpropertytypes=true).types index d81d2d67fc27c..cb2203fa0ad1d 100644 --- a/tests/baselines/reference/discriminateWithOptionalProperty3(exactoptionalpropertytypes=true).types +++ b/tests/baselines/reference/discriminateWithOptionalProperty3(exactoptionalpropertytypes=true).types @@ -27,7 +27,7 @@ interface ExecutionContext { } type CoercedVariableValues = ->CoercedVariableValues : { errors: ReadonlyArray; coerced?: never; } | { coerced: { [variable: string]: unknown;}; errors?: never; } +>CoercedVariableValues : { errors: ReadonlyArray; coerced?: never; } | { coerced: { [variable: string]: unknown; }; errors?: never; } | { errors: ReadonlyArray; coerced?: never } >errors : readonly GraphQLError[] @@ -39,7 +39,7 @@ type CoercedVariableValues = >errors : undefined declare function getVariableValues(inputs: { ->getVariableValues : (inputs: { readonly [variable: string]: unknown;}) => CoercedVariableValues +>getVariableValues : (inputs: { readonly [variable: string]: unknown; }) => CoercedVariableValues >inputs : { readonly [variable: string]: unknown; } readonly [variable: string]: unknown; diff --git a/tests/baselines/reference/discriminatedUnionTypes2.types b/tests/baselines/reference/discriminatedUnionTypes2.types index e58eae29afeb9..596e79eeee759 100644 --- a/tests/baselines/reference/discriminatedUnionTypes2.types +++ b/tests/baselines/reference/discriminatedUnionTypes2.types @@ -2,7 +2,7 @@ === discriminatedUnionTypes2.ts === function f10(x : { kind: false, a: string } | { kind: true, b: string } | { kind: string, c: string }) { ->f10 : (x: { kind: false; a: string;} | { kind: true; b: string;} | { kind: string; c: string;}) => void +>f10 : (x: { kind: false; a: string; } | { kind: true; b: string; } | { kind: string; c: string; }) => void >x : { kind: false; a: string; } | { kind: true; b: string; } | { kind: string; c: string; } >kind : false >false : false @@ -46,7 +46,7 @@ function f10(x : { kind: false, a: string } | { kind: true, b: string } | { kind } function f11(x : { kind: false, a: string } | { kind: true, b: string } | { kind: string, c: string }) { ->f11 : (x: { kind: false; a: string;} | { kind: true; b: string;} | { kind: string; c: string;}) => void +>f11 : (x: { kind: false; a: string; } | { kind: true; b: string; } | { kind: string; c: string; }) => void >x : { kind: false; a: string; } | { kind: true; b: string; } | { kind: string; c: string; } >kind : false >false : false @@ -89,7 +89,7 @@ function f11(x : { kind: false, a: string } | { kind: true, b: string } | { kind } function f13(x: { a: null; b: string } | { a: string, c: number }) { ->f13 : (x: { a: null; b: string;} | { a: string; c: number;}) => void +>f13 : (x: { a: null; b: string; } | { a: string; c: number; }) => void >x : { a: null; b: string; } | { a: string; c: number; } >a : null >b : string @@ -108,7 +108,7 @@ function f13(x: { a: null; b: string } | { a: string, c: number }) { } function f14(x: { a: 0; b: string } | { a: T, c: number }) { ->f14 : (x: { a: 0; b: string;} | { a: T; c: number;}) => void +>f14 : (x: { a: 0; b: string; } | { a: T; c: number; }) => void >x : { a: 0; b: string; } | { a: T; c: number; } >a : 0 >b : string @@ -357,7 +357,7 @@ type RuntimeValue = >value : boolean function foo1(x: RuntimeValue & { type: 'number' }) { ->foo1 : (x: RuntimeValue & { type: 'number';}) => void +>foo1 : (x: RuntimeValue & { type: 'number'; }) => void >x : { type: "number"; value: number; } & { type: 'number'; } >type : "number" @@ -382,7 +382,7 @@ function foo1(x: RuntimeValue & { type: 'number' }) { } function foo2(x: RuntimeValue & ({ type: 'number' } | { type: 'string' })) { ->foo2 : (x: RuntimeValue & ({ type: 'number';} | { type: 'string';})) => void +>foo2 : (x: RuntimeValue & ({ type: 'number'; } | { type: 'string'; })) => void >x : ({ type: "number"; value: number; } & { type: 'number'; }) | ({ type: "string"; value: string; } & { type: 'string'; }) >type : "number" >type : "string" diff --git a/tests/baselines/reference/duplicateObjectLiteralProperty_computedNameNegative1.types b/tests/baselines/reference/duplicateObjectLiteralProperty_computedNameNegative1.types index 4a8627ca3562b..4603be310d44a 100644 --- a/tests/baselines/reference/duplicateObjectLiteralProperty_computedNameNegative1.types +++ b/tests/baselines/reference/duplicateObjectLiteralProperty_computedNameNegative1.types @@ -4,7 +4,7 @@ // repro from https://github.com/microsoft/TypeScript/issues/56341 function bar(props: { x?: string; y?: string }) { ->bar : (props: { x?: string; y?: string;}) => { [x: string]: number; } +>bar : (props: { x?: string; y?: string; }) => { [x: string]: number; } >props : { x?: string | undefined; y?: string | undefined; } >x : string | undefined >y : string | undefined @@ -33,7 +33,7 @@ function bar(props: { x?: string; y?: string }) { } function foo({ x = "", y = "" }: { x?: string; y?: string }) { ->foo : ({ x, y }: { x?: string; y?: string;}) => { [x: string]: number; } +>foo : ({ x, y }: { x?: string; y?: string; }) => { [x: string]: number; } >x : string >"" : "" >y : string diff --git a/tests/baselines/reference/elaboratedErrorsOnNullableTargets01.types b/tests/baselines/reference/elaboratedErrorsOnNullableTargets01.types index d000e19c9ad02..fea71db693bfa 100644 --- a/tests/baselines/reference/elaboratedErrorsOnNullableTargets01.types +++ b/tests/baselines/reference/elaboratedErrorsOnNullableTargets01.types @@ -2,12 +2,12 @@ === elaboratedErrorsOnNullableTargets01.ts === export declare let x: null | { foo: { bar: string | null } | undefined } | undefined; ->x : { foo: { bar: string | null;} | undefined; } | null | undefined +>x : { foo: { bar: string | null; } | undefined; } | null | undefined >foo : { bar: string | null; } | undefined >bar : string | null export declare let y: { foo: { bar: number | undefined } }; ->y : { foo: { bar: number | undefined;}; } +>y : { foo: { bar: number | undefined; }; } >foo : { bar: number | undefined; } >bar : number | undefined diff --git a/tests/baselines/reference/elementAccessChain.2.types b/tests/baselines/reference/elementAccessChain.2.types index 59d68efa049f1..79fd3a3584635 100644 --- a/tests/baselines/reference/elementAccessChain.2.types +++ b/tests/baselines/reference/elementAccessChain.2.types @@ -11,7 +11,7 @@ o1?.["b"]; >"b" : "b" declare const o2: undefined | { b: { c: string } }; ->o2 : { b: { c: string;}; } +>o2 : { b: { c: string; }; } >b : { c: string; } >c : string @@ -30,7 +30,7 @@ o2?.b["c"]; >"c" : "c" declare const o3: { b: undefined | { c: string } }; ->o3 : { b: undefined | { c: string;}; } +>o3 : { b: undefined | { c: string; }; } >b : { c: string; } >c : string diff --git a/tests/baselines/reference/elementAccessChain.types b/tests/baselines/reference/elementAccessChain.types index 8b6b2caec3ec3..6b9652b6a720a 100644 --- a/tests/baselines/reference/elementAccessChain.types +++ b/tests/baselines/reference/elementAccessChain.types @@ -11,7 +11,7 @@ o1?.["b"]; >"b" : "b" declare const o2: undefined | { b: { c: string } }; ->o2 : { b: { c: string;}; } | undefined +>o2 : { b: { c: string; }; } | undefined >b : { c: string; } >c : string @@ -30,7 +30,7 @@ o2?.b["c"]; >"c" : "c" declare const o3: { b: undefined | { c: string } }; ->o3 : { b: undefined | { c: string;}; } +>o3 : { b: undefined | { c: string; }; } >b : { c: string; } | undefined >c : string @@ -49,8 +49,8 @@ o3.b?.["c"]; >"c" : "c" declare const o4: { b?: { c: { d?: { e: string } } } }; ->o4 : { b?: { c: { d?: { e: string; };}; } | undefined; } ->b : { c: { d?: { e: string; };}; } | undefined +>o4 : { b?: { c: { d?: { e: string; }; }; } | undefined; } +>b : { c: { d?: { e: string; }; }; } | undefined >c : { d?: { e: string; } | undefined; } >d : { e: string; } | undefined >e : string @@ -78,8 +78,8 @@ o4.b?.["c"].d?.["e"]; >"e" : "e" declare const o5: { b?(): { c: { d?: { e: string } } } }; ->o5 : { b?(): { c: { d?: { e: string; }; };}; } ->b : (() => { c: { d?: { e: string; }; };}) | undefined +>o5 : { b?(): { c: { d?: { e: string; }; }; }; } +>b : (() => { c: { d?: { e: string; }; }; }) | undefined >c : { d?: { e: string; } | undefined; } >d : { e: string; } | undefined >e : string @@ -134,7 +134,7 @@ o5["b"]?.()["c"].d?.["e"]; // GH#33744 declare const o6: () => undefined | ({ x: number }); ->o6 : () => undefined | ({ x: number;}) +>o6 : () => undefined | ({ x: number; }) >x : number o6()?.["x"]; diff --git a/tests/baselines/reference/emptyOptionalBindingPatternInDeclarationSignature.types b/tests/baselines/reference/emptyOptionalBindingPatternInDeclarationSignature.types index 481befe63000b..65c5f3c0bdf85 100644 --- a/tests/baselines/reference/emptyOptionalBindingPatternInDeclarationSignature.types +++ b/tests/baselines/reference/emptyOptionalBindingPatternInDeclarationSignature.types @@ -4,11 +4,11 @@ // #50791 declare function fn1({}?: { x: string }): void; ->fn1 : ({}?: { x: string;}) => void +>fn1 : ({}?: { x: string; }) => void >x : string declare function fn2({ x }?: { x: string }): void; ->fn2 : ({ x }?: { x: string;}) => void +>fn2 : ({ x }?: { x: string; }) => void >x : string >x : string @@ -23,61 +23,61 @@ declare class C1 { >C1 : C1 method({}?: { x: string }): void ->method : ({}?: { x: string;}) => void +>method : ({}?: { x: string; }) => void >x : string static method2({}?: { x: string }): void ->method2 : ({}?: { x: string;}) => void +>method2 : ({}?: { x: string; }) => void >x : string static field: ({}?: { x: string }) => void ->field : ({}?: { x: string;}) => void +>field : ({}?: { x: string; }) => void >x : string static field2: ({}?: { x: string }) => void ->field2 : ({}?: { x: string;}) => void +>field2 : ({}?: { x: string; }) => void >x : string } interface I1 { method({}?: { x: string }): void ->method : ({}?: { x: string;}) => void +>method : ({}?: { x: string; }) => void >x : string method2: ({}?: { x: string }) => void ->method2 : ({}?: { x: string;}) => void +>method2 : ({}?: { x: string; }) => void >x : string } type T1 = ({}?: { x: string }) => void ->T1 : ({}?: { x: string;}) => void +>T1 : ({}?: { x: string; }) => void >x : string type T2 = { ->T2 : { method({}?: { x: string;}): void; method2: ({}?: { x: string;}) => void; } +>T2 : { method({}?: { x: string; }): void; method2: ({}?: { x: string; }) => void; } method({}?: { x: string }): void ->method : ({}?: { x: string;}) => void +>method : ({}?: { x: string; }) => void >x : string method2: ({}?: { x: string }) => void ->method2 : ({}?: { x: string;}) => void +>method2 : ({}?: { x: string; }) => void >x : string } declare const val1: ({}?: { x: string }) => void ->val1 : ({}?: { x: string;}) => void +>val1 : ({}?: { x: string; }) => void >x : string declare const val2: { ->val2 : { method({}?: { x: string;}): void; method2: ({}?: { x: string;}) => void; } +>val2 : { method({}?: { x: string; }): void; method2: ({}?: { x: string; }) => void; } method({}?: { x: string }): void ->method : ({}?: { x: string;}) => void +>method : ({}?: { x: string; }) => void >x : string method2: ({}?: { x: string }) => void ->method2 : ({}?: { x: string;}) => void +>method2 : ({}?: { x: string; }) => void >x : string } diff --git a/tests/baselines/reference/enumAssignabilityInInheritance.types b/tests/baselines/reference/enumAssignabilityInInheritance.types index f1bbea0277f17..f9306cd7d6ae0 100644 --- a/tests/baselines/reference/enumAssignabilityInInheritance.types +++ b/tests/baselines/reference/enumAssignabilityInInheritance.types @@ -114,7 +114,7 @@ var r4 = foo5(E.A); >A : E declare function foo6(x: { bar: number }): { bar: number }; ->foo6 : { (x: { bar: number;}): { bar: number;}; (x: E): E; } +>foo6 : { (x: { bar: number; }): { bar: number; }; (x: E): E; } >x : { bar: number; } >bar : number >bar : number diff --git a/tests/baselines/reference/equalityStrictNulls.types b/tests/baselines/reference/equalityStrictNulls.types index 2b1c794ff27b2..a36ad9ba21b2c 100644 --- a/tests/baselines/reference/equalityStrictNulls.types +++ b/tests/baselines/reference/equalityStrictNulls.types @@ -101,7 +101,7 @@ function f2() { } function f3(a: number, b: boolean, c: { x: number }, d: number | string) { ->f3 : (a: number, b: boolean, c: { x: number;}, d: number | string) => void +>f3 : (a: number, b: boolean, c: { x: number; }, d: number | string) => void >a : number >b : boolean >c : { x: number; } diff --git a/tests/baselines/reference/errorsInGenericTypeReference.types b/tests/baselines/reference/errorsInGenericTypeReference.types index af8f36b68bef7..a6dc9d0843de5 100644 --- a/tests/baselines/reference/errorsInGenericTypeReference.types +++ b/tests/baselines/reference/errorsInGenericTypeReference.types @@ -43,11 +43,11 @@ class testClass3 { >testClass3 : testClass3 testMethod1(): Foo<{ x: V }> { return null; } // error: could not find symbol V ->testMethod1 : () => Foo<{ x: V;}> +>testMethod1 : () => Foo<{ x: V; }> >x : V static testMethod2(): Foo<{ x: V }> { return null } // error: could not find symbol V ->testMethod2 : () => Foo<{ x: V;}> +>testMethod2 : () => Foo<{ x: V; }> >x : V set a(value: Foo<{ x: V }>) { } // error: could not find symbol V @@ -63,13 +63,13 @@ class testClass3 { // in function return type annotation function testFunction1(): Foo<{ x: V }> { return null; } // error: could not find symbol V ->testFunction1 : () => Foo<{ x: V;}> +>testFunction1 : () => Foo<{ x: V; }> >x : V // in paramter types function testFunction2(p: Foo<{ x: V }>) { }// error: could not find symbol V ->testFunction2 : (p: Foo<{ x: V;}>) => void +>testFunction2 : (p: Foo<{ x: V; }>) => void >p : Foo<{ x: V; }> >x : V @@ -128,7 +128,7 @@ interface testInterface2 { >x : V method(a: Foo<{ x: V }>): Foo<{ x: V }>; //2x: error: could not find symbol V ->method : (a: Foo<{ x: V;}>) => Foo<{ x: V;}> +>method : (a: Foo<{ x: V; }>) => Foo<{ x: V; }> >a : Foo<{ x: V; }> >x : V >x : V diff --git a/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.types b/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.types index f01353028c5c0..e1c63b94db34a 100644 --- a/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.types +++ b/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.types @@ -3,8 +3,8 @@ === esNextWeakRefs_IterableWeakMap.ts === /** `static #cleanup` */ const IterableWeakMap_cleanup = ({ ref, set }: { ->IterableWeakMap_cleanup : ({ ref, set }: { readonly ref: WeakRef; readonly set: Set>;}) => void ->({ ref, set }: { readonly ref: WeakRef; readonly set: Set>;}) => { set.delete(ref);} : ({ ref, set }: { readonly ref: WeakRef; readonly set: Set>;}) => void +>IterableWeakMap_cleanup : ({ ref, set }: { readonly ref: WeakRef; readonly set: Set>; }) => void +>({ ref, set }: { readonly ref: WeakRef; readonly set: Set>;}) => { set.delete(ref);} : ({ ref, set }: { readonly ref: WeakRef; readonly set: Set>; }) => void >ref : WeakRef >set : Set> diff --git a/tests/baselines/reference/excessPropertiesInOverloads.types b/tests/baselines/reference/excessPropertiesInOverloads.types index 5e2e31562ff85..a5247e23b5de6 100644 --- a/tests/baselines/reference/excessPropertiesInOverloads.types +++ b/tests/baselines/reference/excessPropertiesInOverloads.types @@ -2,12 +2,12 @@ === excessPropertiesInOverloads.ts === declare function fn(a: { x: string }): void; ->fn : { (a: { x: string;}): void; (a: { y: string; }): void; } +>fn : { (a: { x: string; }): void; (a: { y: string; }): void; } >a : { x: string; } >x : string declare function fn(a: { y: string }): void; ->fn : { (a: { x: string; }): void; (a: { y: string;}): void; } +>fn : { (a: { x: string; }): void; (a: { y: string; }): void; } >a : { y: string; } >y : string diff --git a/tests/baselines/reference/excessPropertyCheckIntersectionWithRecursiveType.types b/tests/baselines/reference/excessPropertyCheckIntersectionWithRecursiveType.types index fa4aa4a937156..62ee064bbc303 100644 --- a/tests/baselines/reference/excessPropertyCheckIntersectionWithRecursiveType.types +++ b/tests/baselines/reference/excessPropertyCheckIntersectionWithRecursiveType.types @@ -4,7 +4,7 @@ // repro from #44750 type Request = { l1: { l2: boolean } }; ->Request : { l1: { l2: boolean;}; } +>Request : { l1: { l2: boolean; }; } >l1 : { l2: boolean; } >l2 : boolean diff --git a/tests/baselines/reference/excessPropertyCheckWithUnions.types b/tests/baselines/reference/excessPropertyCheckWithUnions.types index a2f2ae775c80a..9e90d92f9d3a0 100644 --- a/tests/baselines/reference/excessPropertyCheckWithUnions.types +++ b/tests/baselines/reference/excessPropertyCheckWithUnions.types @@ -399,7 +399,7 @@ declare const prop2: string | undefined; >prop2 : string | undefined function F1(_arg: { props: Properties }) { } ->F1 : (_arg: { props: Properties;}) => void +>F1 : (_arg: { props: Properties; }) => void >_arg : { props: Properties; } >props : Properties diff --git a/tests/baselines/reference/excessPropertyCheckingIntersectionWithConditional.types b/tests/baselines/reference/excessPropertyCheckingIntersectionWithConditional.types index 22810225c66d3..5e2a24c01df20 100644 --- a/tests/baselines/reference/excessPropertyCheckingIntersectionWithConditional.types +++ b/tests/baselines/reference/excessPropertyCheckingIntersectionWithConditional.types @@ -6,8 +6,8 @@ type Foo = K extends unknown ? { a: number } : unknown >a : number const createDefaultExample = (x: K): Foo & { x: K; } => { ->createDefaultExample : (x: K) => Foo & { x: K;} ->(x: K): Foo & { x: K; } => { return { a: 1, x: x }; // okay in TS 4.7.4, error in TS 4.8.2} : (x: K) => Foo & { x: K;} +>createDefaultExample : (x: K) => Foo & { x: K; } +>(x: K): Foo & { x: K; } => { return { a: 1, x: x }; // okay in TS 4.7.4, error in TS 4.8.2} : (x: K) => Foo & { x: K; } >x : K >x : K diff --git a/tests/baselines/reference/excessPropertyChecksWithNestedIntersections.types b/tests/baselines/reference/excessPropertyChecksWithNestedIntersections.types index 4a561620cbd04..455bf9c53a25c 100644 --- a/tests/baselines/reference/excessPropertyChecksWithNestedIntersections.types +++ b/tests/baselines/reference/excessPropertyChecksWithNestedIntersections.types @@ -82,7 +82,7 @@ let f: D = { a: { x: 'hello', y: 2 }, c: 5 }; // error - y does not exist in typ // https://github.com/Microsoft/TypeScript/issues/18075 export type MyType = { id: number; } & { name: string; } & { photo: { id: number; } & { url: string; } } ->MyType : { id: number; } & { name: string; } & { photo: { id: number;} & { url: string;}; } +>MyType : { id: number; } & { name: string; } & { photo: { id: number; } & { url: string; }; } >id : number >name : string >photo : { id: number; } & { url: string; } diff --git a/tests/baselines/reference/excessiveStackDepthFlatArray.types b/tests/baselines/reference/excessiveStackDepthFlatArray.types index 87a296cc068ad..2d8c4957fc632 100644 --- a/tests/baselines/reference/excessiveStackDepthFlatArray.types +++ b/tests/baselines/reference/excessiveStackDepthFlatArray.types @@ -9,7 +9,7 @@ Symbol count: 28,000 / 28,000 (nearest 500) === index.tsx === interface MiddlewareArray extends Array {} declare function configureStore(options: { middleware: MiddlewareArray }): void; ->configureStore : (options: { middleware: MiddlewareArray;}) => void +>configureStore : (options: { middleware: MiddlewareArray; }) => void >options : { middleware: MiddlewareArray; } >middleware : MiddlewareArray diff --git a/tests/baselines/reference/expandoFunctionContextualTypesJs.types b/tests/baselines/reference/expandoFunctionContextualTypesJs.types index 56a880dec37d8..6af5163b9f084 100644 --- a/tests/baselines/reference/expandoFunctionContextualTypesJs.types +++ b/tests/baselines/reference/expandoFunctionContextualTypesJs.types @@ -59,7 +59,7 @@ const check = MyComponent2; * @param {{ props: MyComponentProps }} p */ function expectLiteral(p) {} ->expectLiteral : (p: { props: MyComponentProps;}) => void +>expectLiteral : (p: { props: MyComponentProps; }) => void >p : { props: MyComponentProps; } function foo() { diff --git a/tests/baselines/reference/forInStrictNullChecksNoError.types b/tests/baselines/reference/forInStrictNullChecksNoError.types index 3baf3da546d91..24d5586144add 100644 --- a/tests/baselines/reference/forInStrictNullChecksNoError.types +++ b/tests/baselines/reference/forInStrictNullChecksNoError.types @@ -2,7 +2,7 @@ === forInStrictNullChecksNoError.ts === function f(x: { [key: string]: number; } | null | undefined) { ->f : (x: { [key: string]: number;} | null | undefined) => void +>f : (x: { [key: string]: number; } | null | undefined) => void >x : { [key: string]: number; } | null | undefined >key : string diff --git a/tests/baselines/reference/freshLiteralInference.types b/tests/baselines/reference/freshLiteralInference.types index 365dea9e86ba1..ca0a44b24a7c5 100644 --- a/tests/baselines/reference/freshLiteralInference.types +++ b/tests/baselines/reference/freshLiteralInference.types @@ -16,7 +16,7 @@ let x1 = value; // regular "1" >value : "1" declare function f2(x: { value: T }): { value: T }; ->f2 : (x: { value: T;}) => { value: T;} +>f2 : (x: { value: T; }) => { value: T; } >x : { value: T; } >value : T >value : T diff --git a/tests/baselines/reference/functionAssignment.types b/tests/baselines/reference/functionAssignment.types index 1737c4bd3afad..c6a0cd7227e86 100644 --- a/tests/baselines/reference/functionAssignment.types +++ b/tests/baselines/reference/functionAssignment.types @@ -68,7 +68,7 @@ f2(() => { }); function f3(a: { a: number; b: number; }) { } ->f3 : (a: { a: number; b: number;}) => void +>f3 : (a: { a: number; b: number; }) => void >a : { a: number; b: number; } >a : number >b : number diff --git a/tests/baselines/reference/functionDeclarationWithArgumentOfTypeFunctionTypeArray.types b/tests/baselines/reference/functionDeclarationWithArgumentOfTypeFunctionTypeArray.types index e3f79afbfd0ee..700eb4d69c063 100644 --- a/tests/baselines/reference/functionDeclarationWithArgumentOfTypeFunctionTypeArray.types +++ b/tests/baselines/reference/functionDeclarationWithArgumentOfTypeFunctionTypeArray.types @@ -2,7 +2,7 @@ === functionDeclarationWithArgumentOfTypeFunctionTypeArray.ts === function foo(args: { (x): number }[]) { ->foo : (args: { (x: any): number;}[]) => number +>foo : (args: { (x: any): number; }[]) => number >args : ((x: any) => number)[] >x : any diff --git a/tests/baselines/reference/functionLiterals.types b/tests/baselines/reference/functionLiterals.types index 29a49ab24fc6e..4386b232a8435 100644 --- a/tests/baselines/reference/functionLiterals.types +++ b/tests/baselines/reference/functionLiterals.types @@ -4,7 +4,7 @@ // PropName(ParamList):ReturnType is equivalent to PropName: { (ParamList): ReturnType } var b: { ->b : { func1(x: number): number; func2: (x: number) => number; func3: { (x: number): number;}; } +>b : { func1(x: number): number; func2: (x: number) => number; func3: { (x: number): number; }; } func1(x: number): number; // Method signature >func1 : (x: number) => number @@ -75,7 +75,7 @@ b.func3 = b.func2; >func2 : (x: number) => number var c: { ->c : { func4(x: number): number; func4(s: string): string; func5: { (x: number): number; (s: string): string;}; } +>c : { func4(x: number): number; func4(s: string): string; func5: { (x: number): number; (s: string): string; }; } func4(x: number): number; >func4 : { (x: number): number; (s: string): string; } diff --git a/tests/baselines/reference/functionOverloads14.types b/tests/baselines/reference/functionOverloads14.types index 1e8c867549f79..32e09375b83bd 100644 --- a/tests/baselines/reference/functionOverloads14.types +++ b/tests/baselines/reference/functionOverloads14.types @@ -2,11 +2,11 @@ === functionOverloads14.ts === function foo():{a:number;} ->foo : { (): { a: number;}; (): { a: string; }; } +>foo : { (): { a: number; }; (): { a: string; }; } >a : number function foo():{a:string;} ->foo : { (): { a: number; }; (): { a: string;}; } +>foo : { (): { a: number; }; (): { a: string; }; } >a : string function foo():{a:any;} { return {a:1} } diff --git a/tests/baselines/reference/functionOverloads15.types b/tests/baselines/reference/functionOverloads15.types index fbe9c82966714..9698d52455fea 100644 --- a/tests/baselines/reference/functionOverloads15.types +++ b/tests/baselines/reference/functionOverloads15.types @@ -2,13 +2,13 @@ === functionOverloads15.ts === function foo(foo:{a:string; b:number;}):string; ->foo : { (foo: { a: string; b: number;}): string; (foo: { a: string; b: number; }): number; } +>foo : { (foo: { a: string; b: number; }): string; (foo: { a: string; b: number; }): number; } >foo : { a: string; b: number; } >a : string >b : number function foo(foo:{a:string; b:number;}):number; ->foo : { (foo: { a: string; b: number; }): string; (foo: { a: string; b: number;}): number; } +>foo : { (foo: { a: string; b: number; }): string; (foo: { a: string; b: number; }): number; } >foo : { a: string; b: number; } >a : string >b : number diff --git a/tests/baselines/reference/functionOverloads16.types b/tests/baselines/reference/functionOverloads16.types index abc5249168f7d..13f223181b60d 100644 --- a/tests/baselines/reference/functionOverloads16.types +++ b/tests/baselines/reference/functionOverloads16.types @@ -2,12 +2,12 @@ === functionOverloads16.ts === function foo(foo:{a:string;}):string; ->foo : { (foo: { a: string;}): string; (foo: { a: string; }): number; } +>foo : { (foo: { a: string; }): string; (foo: { a: string; }): number; } >foo : { a: string; } >a : string function foo(foo:{a:string;}):number; ->foo : { (foo: { a: string; }): string; (foo: { a: string;}): number; } +>foo : { (foo: { a: string; }): string; (foo: { a: string; }): number; } >foo : { a: string; } >a : string diff --git a/tests/baselines/reference/functionOverloads17.types b/tests/baselines/reference/functionOverloads17.types index 4c3b5c4b2f79f..1e619a733d9f3 100644 --- a/tests/baselines/reference/functionOverloads17.types +++ b/tests/baselines/reference/functionOverloads17.types @@ -2,7 +2,7 @@ === functionOverloads17.ts === function foo():{a:number;} ->foo : () => { a: number;} +>foo : () => { a: number; } >a : number function foo():{a:string;} { return {a:""} } diff --git a/tests/baselines/reference/functionOverloads18.types b/tests/baselines/reference/functionOverloads18.types index 3844e612f30cc..1a3e5a34ad5cd 100644 --- a/tests/baselines/reference/functionOverloads18.types +++ b/tests/baselines/reference/functionOverloads18.types @@ -2,7 +2,7 @@ === functionOverloads18.ts === function foo(bar:{a:number;}); ->foo : (bar: { a: number;}) => any +>foo : (bar: { a: number; }) => any >bar : { a: number; } >a : number diff --git a/tests/baselines/reference/functionOverloads19.types b/tests/baselines/reference/functionOverloads19.types index e25fdf523422a..c45cae553e94d 100644 --- a/tests/baselines/reference/functionOverloads19.types +++ b/tests/baselines/reference/functionOverloads19.types @@ -2,12 +2,12 @@ === functionOverloads19.ts === function foo(bar:{b:string;}); ->foo : { (bar: { b: string;}): any; (bar: { a: string; }): any; } +>foo : { (bar: { b: string; }): any; (bar: { a: string; }): any; } >bar : { b: string; } >b : string function foo(bar:{a:string;}); ->foo : { (bar: { b: string; }): any; (bar: { a: string;}): any; } +>foo : { (bar: { b: string; }): any; (bar: { a: string; }): any; } >bar : { a: string; } >a : string diff --git a/tests/baselines/reference/functionOverloads20.types b/tests/baselines/reference/functionOverloads20.types index 88674a4f131c0..81cc0dd8a0b0f 100644 --- a/tests/baselines/reference/functionOverloads20.types +++ b/tests/baselines/reference/functionOverloads20.types @@ -2,12 +2,12 @@ === functionOverloads20.ts === function foo(bar:{a:number;}): number; ->foo : { (bar: { a: number;}): number; (bar: { a: string; }): string; } +>foo : { (bar: { a: number; }): number; (bar: { a: string; }): string; } >bar : { a: number; } >a : number function foo(bar:{a:string;}): string; ->foo : { (bar: { a: number; }): number; (bar: { a: string;}): string; } +>foo : { (bar: { a: number; }): number; (bar: { a: string; }): string; } >bar : { a: string; } >a : string diff --git a/tests/baselines/reference/functionOverloads21.types b/tests/baselines/reference/functionOverloads21.types index 34a3e59c52eeb..993e15172a215 100644 --- a/tests/baselines/reference/functionOverloads21.types +++ b/tests/baselines/reference/functionOverloads21.types @@ -2,12 +2,12 @@ === functionOverloads21.ts === function foo(bar:{a:number;}[]); ->foo : { (bar: { a: number;}[]): any; (bar: { a: number; b: string; }[]): any; } +>foo : { (bar: { a: number; }[]): any; (bar: { a: number; b: string; }[]): any; } >bar : { a: number; }[] >a : number function foo(bar:{a:number; b:string;}[]); ->foo : { (bar: { a: number; }[]): any; (bar: { a: number; b: string;}[]): any; } +>foo : { (bar: { a: number; }[]): any; (bar: { a: number; b: string; }[]): any; } >bar : { a: number; b: string; }[] >a : number >b : string diff --git a/tests/baselines/reference/functionOverloads22.types b/tests/baselines/reference/functionOverloads22.types index 737fe6a7bfec8..fa82e125deb2a 100644 --- a/tests/baselines/reference/functionOverloads22.types +++ b/tests/baselines/reference/functionOverloads22.types @@ -2,12 +2,12 @@ === functionOverloads22.ts === function foo(bar:number):{a:number;}[]; ->foo : { (bar: number): { a: number;}[]; (bar: string): { a: number; b: string; }[]; } +>foo : { (bar: number): { a: number; }[]; (bar: string): { a: number; b: string; }[]; } >bar : number >a : number function foo(bar:string):{a:number; b:string;}[]; ->foo : { (bar: number): { a: number; }[]; (bar: string): { a: number; b: string;}[]; } +>foo : { (bar: number): { a: number; }[]; (bar: string): { a: number; b: string; }[]; } >bar : string >a : number >b : string diff --git a/tests/baselines/reference/functionOverloads34.types b/tests/baselines/reference/functionOverloads34.types index 08f7a9f0a9026..26ae2a7193030 100644 --- a/tests/baselines/reference/functionOverloads34.types +++ b/tests/baselines/reference/functionOverloads34.types @@ -2,12 +2,12 @@ === functionOverloads34.ts === function foo(bar:{a:number;}):string; ->foo : { (bar: { a: number;}): string; (bar: { a: boolean; }): number; } +>foo : { (bar: { a: number; }): string; (bar: { a: boolean; }): number; } >bar : { a: number; } >a : number function foo(bar:{a:boolean;}):number; ->foo : { (bar: { a: number; }): string; (bar: { a: boolean;}): number; } +>foo : { (bar: { a: number; }): string; (bar: { a: boolean; }): number; } >bar : { a: boolean; } >a : boolean diff --git a/tests/baselines/reference/functionOverloads35.types b/tests/baselines/reference/functionOverloads35.types index 4435b6cfd2be0..831354a0e9f04 100644 --- a/tests/baselines/reference/functionOverloads35.types +++ b/tests/baselines/reference/functionOverloads35.types @@ -2,12 +2,12 @@ === functionOverloads35.ts === function foo(bar:{a:number;}):number; ->foo : { (bar: { a: number;}): number; (bar: { a: string; }): string; } +>foo : { (bar: { a: number; }): number; (bar: { a: string; }): string; } >bar : { a: number; } >a : number function foo(bar:{a:string;}):string; ->foo : { (bar: { a: number; }): number; (bar: { a: string;}): string; } +>foo : { (bar: { a: number; }): number; (bar: { a: string; }): string; } >bar : { a: string; } >a : string diff --git a/tests/baselines/reference/functionOverloads36.types b/tests/baselines/reference/functionOverloads36.types index b2f81ba8d4ce6..33a89a8605efe 100644 --- a/tests/baselines/reference/functionOverloads36.types +++ b/tests/baselines/reference/functionOverloads36.types @@ -2,12 +2,12 @@ === functionOverloads36.ts === function foo(bar:{a:number;}):number; ->foo : { (bar: { a: number;}): number; (bar: { a: string; }): string; } +>foo : { (bar: { a: number; }): number; (bar: { a: string; }): string; } >bar : { a: number; } >a : number function foo(bar:{a:string;}):string; ->foo : { (bar: { a: number; }): number; (bar: { a: string;}): string; } +>foo : { (bar: { a: number; }): number; (bar: { a: string; }): string; } >bar : { a: string; } >a : string diff --git a/tests/baselines/reference/functionOverloads37.types b/tests/baselines/reference/functionOverloads37.types index 5958a86bc4616..df1c19170b098 100644 --- a/tests/baselines/reference/functionOverloads37.types +++ b/tests/baselines/reference/functionOverloads37.types @@ -2,12 +2,12 @@ === functionOverloads37.ts === function foo(bar:{a:number;}[]):string; ->foo : { (bar: { a: number;}[]): string; (bar: { a: boolean; }[]): number; } +>foo : { (bar: { a: number; }[]): string; (bar: { a: boolean; }[]): number; } >bar : { a: number; }[] >a : number function foo(bar:{a:boolean;}[]):number; ->foo : { (bar: { a: number; }[]): string; (bar: { a: boolean;}[]): number; } +>foo : { (bar: { a: number; }[]): string; (bar: { a: boolean; }[]): number; } >bar : { a: boolean; }[] >a : boolean diff --git a/tests/baselines/reference/functionOverloads38.types b/tests/baselines/reference/functionOverloads38.types index 8b685467f1b29..c500b8a4485de 100644 --- a/tests/baselines/reference/functionOverloads38.types +++ b/tests/baselines/reference/functionOverloads38.types @@ -2,12 +2,12 @@ === functionOverloads38.ts === function foo(bar:{a:number;}[]):string; ->foo : { (bar: { a: number;}[]): string; (bar: { a: boolean; }[]): number; } +>foo : { (bar: { a: number; }[]): string; (bar: { a: boolean; }[]): number; } >bar : { a: number; }[] >a : number function foo(bar:{a:boolean;}[]):number; ->foo : { (bar: { a: number; }[]): string; (bar: { a: boolean;}[]): number; } +>foo : { (bar: { a: number; }[]): string; (bar: { a: boolean; }[]): number; } >bar : { a: boolean; }[] >a : boolean diff --git a/tests/baselines/reference/functionOverloads39.types b/tests/baselines/reference/functionOverloads39.types index ba7cc32fb6d72..34ba50346a608 100644 --- a/tests/baselines/reference/functionOverloads39.types +++ b/tests/baselines/reference/functionOverloads39.types @@ -2,12 +2,12 @@ === functionOverloads39.ts === function foo(bar:{a:number;}[]):string; ->foo : { (bar: { a: number;}[]): string; (bar: { a: boolean; }[]): number; } +>foo : { (bar: { a: number; }[]): string; (bar: { a: boolean; }[]): number; } >bar : { a: number; }[] >a : number function foo(bar:{a:boolean;}[]):number; ->foo : { (bar: { a: number; }[]): string; (bar: { a: boolean;}[]): number; } +>foo : { (bar: { a: number; }[]): string; (bar: { a: boolean; }[]): number; } >bar : { a: boolean; }[] >a : boolean diff --git a/tests/baselines/reference/functionOverloads40.types b/tests/baselines/reference/functionOverloads40.types index caa3a5f4b1a13..8578dfef7c9dc 100644 --- a/tests/baselines/reference/functionOverloads40.types +++ b/tests/baselines/reference/functionOverloads40.types @@ -2,12 +2,12 @@ === functionOverloads40.ts === function foo(bar:{a:number;}[]):string; ->foo : { (bar: { a: number;}[]): string; (bar: { a: boolean; }[]): number; } +>foo : { (bar: { a: number; }[]): string; (bar: { a: boolean; }[]): number; } >bar : { a: number; }[] >a : number function foo(bar:{a:boolean;}[]):number; ->foo : { (bar: { a: number; }[]): string; (bar: { a: boolean;}[]): number; } +>foo : { (bar: { a: number; }[]): string; (bar: { a: boolean; }[]): number; } >bar : { a: boolean; }[] >a : boolean diff --git a/tests/baselines/reference/functionOverloads41.types b/tests/baselines/reference/functionOverloads41.types index a8d5734a58d6c..a51a22ee63cfb 100644 --- a/tests/baselines/reference/functionOverloads41.types +++ b/tests/baselines/reference/functionOverloads41.types @@ -2,12 +2,12 @@ === functionOverloads41.ts === function foo(bar:{a:number;}[]):string; ->foo : { (bar: { a: number;}[]): string; (bar: { a: boolean; }[]): number; } +>foo : { (bar: { a: number; }[]): string; (bar: { a: boolean; }[]): number; } >bar : { a: number; }[] >a : number function foo(bar:{a:boolean;}[]):number; ->foo : { (bar: { a: number; }[]): string; (bar: { a: boolean;}[]): number; } +>foo : { (bar: { a: number; }[]): string; (bar: { a: boolean; }[]): number; } >bar : { a: boolean; }[] >a : boolean diff --git a/tests/baselines/reference/functionOverloads42.types b/tests/baselines/reference/functionOverloads42.types index 62ad724dbb97e..e0fcef3622ecf 100644 --- a/tests/baselines/reference/functionOverloads42.types +++ b/tests/baselines/reference/functionOverloads42.types @@ -2,12 +2,12 @@ === functionOverloads42.ts === function foo(bar:{a:number;}[]):string; ->foo : { (bar: { a: number;}[]): string; (bar: { a: any; }[]): number; } +>foo : { (bar: { a: number; }[]): string; (bar: { a: any; }[]): number; } >bar : { a: number; }[] >a : number function foo(bar:{a:any;}[]):number; ->foo : { (bar: { a: number; }[]): string; (bar: { a: any;}[]): number; } +>foo : { (bar: { a: number; }[]): string; (bar: { a: any; }[]): number; } >bar : { a: any; }[] >a : any diff --git a/tests/baselines/reference/functionOverloads43.types b/tests/baselines/reference/functionOverloads43.types index 08b28b369706c..72ccf994f01dc 100644 --- a/tests/baselines/reference/functionOverloads43.types +++ b/tests/baselines/reference/functionOverloads43.types @@ -2,12 +2,12 @@ === functionOverloads43.ts === function foo(bar: { a:number }[]): number; ->foo : { (bar: { a: number;}[]): number; (bar: { a: string; }[]): string; } +>foo : { (bar: { a: number; }[]): number; (bar: { a: string; }[]): string; } >bar : { a: number; }[] >a : number function foo(bar: { a:string }[]): string; ->foo : { (bar: { a: number; }[]): number; (bar: { a: string;}[]): string; } +>foo : { (bar: { a: number; }[]): number; (bar: { a: string; }[]): string; } >bar : { a: string; }[] >a : string diff --git a/tests/baselines/reference/functionOverloads44.types b/tests/baselines/reference/functionOverloads44.types index 18244e203c940..22fa644211ce4 100644 --- a/tests/baselines/reference/functionOverloads44.types +++ b/tests/baselines/reference/functionOverloads44.types @@ -11,12 +11,12 @@ interface Cat extends Animal { cat } >cat : any function foo1(bar: { a:number }[]): Dog; ->foo1 : { (bar: { a: number;}[]): Dog; (bar: { a: string; }[]): Animal; } +>foo1 : { (bar: { a: number; }[]): Dog; (bar: { a: string; }[]): Animal; } >bar : { a: number; }[] >a : number function foo1(bar: { a:string }[]): Animal; ->foo1 : { (bar: { a: number; }[]): Dog; (bar: { a: string;}[]): Animal; } +>foo1 : { (bar: { a: number; }[]): Dog; (bar: { a: string; }[]): Animal; } >bar : { a: string; }[] >a : string @@ -30,12 +30,12 @@ function foo1([x]: { a:number | string }[]): Dog { } function foo2(bar: { a:number }[]): Cat; ->foo2 : { (bar: { a: number;}[]): Cat; (bar: { a: string; }[]): Dog | Cat; } +>foo2 : { (bar: { a: number; }[]): Cat; (bar: { a: string; }[]): Dog | Cat; } >bar : { a: number; }[] >a : number function foo2(bar: { a:string }[]): Cat | Dog; ->foo2 : { (bar: { a: number; }[]): Cat; (bar: { a: string;}[]): Cat | Dog; } +>foo2 : { (bar: { a: number; }[]): Cat; (bar: { a: string; }[]): Cat | Dog; } >bar : { a: string; }[] >a : string diff --git a/tests/baselines/reference/functionOverloads45.types b/tests/baselines/reference/functionOverloads45.types index 29f2ce227c28d..92c44b224a23a 100644 --- a/tests/baselines/reference/functionOverloads45.types +++ b/tests/baselines/reference/functionOverloads45.types @@ -11,12 +11,12 @@ interface Cat extends Animal { cat } >cat : any function foo1(bar: { a:number }[]): Cat; ->foo1 : { (bar: { a: number;}[]): Cat; (bar: { a: string; }[]): Dog; } +>foo1 : { (bar: { a: number; }[]): Cat; (bar: { a: string; }[]): Dog; } >bar : { a: number; }[] >a : number function foo1(bar: { a:string }[]): Dog; ->foo1 : { (bar: { a: number; }[]): Cat; (bar: { a: string;}[]): Dog; } +>foo1 : { (bar: { a: number; }[]): Cat; (bar: { a: string; }[]): Dog; } >bar : { a: string; }[] >a : string @@ -30,12 +30,12 @@ function foo1([x]: { a:number | string }[]): Animal { } function foo2(bar: { a:number }[]): Cat; ->foo2 : { (bar: { a: number;}[]): Cat; (bar: { a: string; }[]): Dog; } +>foo2 : { (bar: { a: number; }[]): Cat; (bar: { a: string; }[]): Dog; } >bar : { a: number; }[] >a : number function foo2(bar: { a:string }[]): Dog; ->foo2 : { (bar: { a: number; }[]): Cat; (bar: { a: string;}[]): Dog; } +>foo2 : { (bar: { a: number; }[]): Cat; (bar: { a: string; }[]): Dog; } >bar : { a: string; }[] >a : string diff --git a/tests/baselines/reference/functionReturnTypeQuery.types b/tests/baselines/reference/functionReturnTypeQuery.types index 8d16355fdcc70..37ceb306f6510 100644 --- a/tests/baselines/reference/functionReturnTypeQuery.types +++ b/tests/baselines/reference/functionReturnTypeQuery.types @@ -12,7 +12,7 @@ declare function test1(foo: string, bar: typeof foo): typeof foo; >foo : string declare function test2({foo}: {foo: string}, bar: typeof foo): typeof foo; ->test2 : ({ foo }: { foo: string;}, bar: typeof foo) => typeof foo +>test2 : ({ foo }: { foo: string; }, bar: typeof foo) => typeof foo >foo : string >foo : string >bar : string diff --git a/tests/baselines/reference/generatedContextualTyping.types b/tests/baselines/reference/generatedContextualTyping.types index 94213048e6ca5..4bbab1341d255 100644 --- a/tests/baselines/reference/generatedContextualTyping.types +++ b/tests/baselines/reference/generatedContextualTyping.types @@ -1059,7 +1059,7 @@ function x123(parm: () => Base[] = function named() { return [d1, d2] }) { } >d2 : Derived2 function x124(parm: { (): Base[]; } = () => [d1, d2]) { } ->x124 : (parm?: { (): Base[];}) => void +>x124 : (parm?: { (): Base[]; }) => void >parm : () => Base[] >() => [d1, d2] : () => (Derived1 | Derived2)[] >[d1, d2] : (Derived1 | Derived2)[] @@ -1067,7 +1067,7 @@ function x124(parm: { (): Base[]; } = () => [d1, d2]) { } >d2 : Derived2 function x125(parm: { (): Base[]; } = function() { return [d1, d2] }) { } ->x125 : (parm?: { (): Base[];}) => void +>x125 : (parm?: { (): Base[]; }) => void >parm : () => Base[] >function() { return [d1, d2] } : () => (Derived1 | Derived2)[] >[d1, d2] : (Derived1 | Derived2)[] @@ -1075,7 +1075,7 @@ function x125(parm: { (): Base[]; } = function() { return [d1, d2] }) { } >d2 : Derived2 function x126(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } ->x126 : (parm?: { (): Base[];}) => void +>x126 : (parm?: { (): Base[]; }) => void >parm : () => Base[] >function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] >named : () => (Derived1 | Derived2)[] @@ -1098,7 +1098,7 @@ function x128(parm: Array = [d1, d2]) { } >d2 : Derived2 function x129(parm: { [n: number]: Base; } = [d1, d2]) { } ->x129 : (parm?: { [n: number]: Base;}) => void +>x129 : (parm?: { [n: number]: Base; }) => void >parm : { [n: number]: Base; } >n : number >[d1, d2] : (Derived1 | Derived2)[] @@ -1106,7 +1106,7 @@ function x129(parm: { [n: number]: Base; } = [d1, d2]) { } >d2 : Derived2 function x130(parm: {n: Base[]; } = { n: [d1, d2] }) { } ->x130 : (parm?: { n: Base[];}) => void +>x130 : (parm?: { n: Base[]; }) => void >parm : { n: Base[]; } >n : Base[] >{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } @@ -1157,21 +1157,21 @@ function x135(): () => Base[] { return function named() { return [d1, d2] }; } >d2 : Derived2 function x136(): { (): Base[]; } { return () => [d1, d2]; } ->x136 : () => { (): Base[];} +>x136 : () => { (): Base[]; } >() => [d1, d2] : () => (Derived1 | Derived2)[] >[d1, d2] : (Derived1 | Derived2)[] >d1 : Derived1 >d2 : Derived2 function x137(): { (): Base[]; } { return function() { return [d1, d2] }; } ->x137 : () => { (): Base[];} +>x137 : () => { (): Base[]; } >function() { return [d1, d2] } : () => (Derived1 | Derived2)[] >[d1, d2] : (Derived1 | Derived2)[] >d1 : Derived1 >d2 : Derived2 function x138(): { (): Base[]; } { return function named() { return [d1, d2] }; } ->x138 : () => { (): Base[];} +>x138 : () => { (): Base[]; } >function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] >named : () => (Derived1 | Derived2)[] >[d1, d2] : (Derived1 | Derived2)[] @@ -1191,14 +1191,14 @@ function x140(): Array { return [d1, d2]; } >d2 : Derived2 function x141(): { [n: number]: Base; } { return [d1, d2]; } ->x141 : () => { [n: number]: Base;} +>x141 : () => { [n: number]: Base; } >n : number >[d1, d2] : (Derived1 | Derived2)[] >d1 : Derived1 >d2 : Derived2 function x142(): {n: Base[]; } { return { n: [d1, d2] }; } ->x142 : () => { n: Base[];} +>x142 : () => { n: Base[]; } >n : Base[] >{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } >n : (Derived1 | Derived2)[] @@ -1259,7 +1259,7 @@ function x147(): () => Base[] { return function named() { return [d1, d2] }; ret >d2 : Derived2 function x148(): { (): Base[]; } { return () => [d1, d2]; return () => [d1, d2]; } ->x148 : () => { (): Base[];} +>x148 : () => { (): Base[]; } >() => [d1, d2] : () => (Derived1 | Derived2)[] >[d1, d2] : (Derived1 | Derived2)[] >d1 : Derived1 @@ -1270,7 +1270,7 @@ function x148(): { (): Base[]; } { return () => [d1, d2]; return () => [d1, d2]; >d2 : Derived2 function x149(): { (): Base[]; } { return function() { return [d1, d2] }; return function() { return [d1, d2] }; } ->x149 : () => { (): Base[];} +>x149 : () => { (): Base[]; } >function() { return [d1, d2] } : () => (Derived1 | Derived2)[] >[d1, d2] : (Derived1 | Derived2)[] >d1 : Derived1 @@ -1281,7 +1281,7 @@ function x149(): { (): Base[]; } { return function() { return [d1, d2] }; return >d2 : Derived2 function x150(): { (): Base[]; } { return function named() { return [d1, d2] }; return function named() { return [d1, d2] }; } ->x150 : () => { (): Base[];} +>x150 : () => { (): Base[]; } >function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] >named : () => (Derived1 | Derived2)[] >[d1, d2] : (Derived1 | Derived2)[] @@ -1312,7 +1312,7 @@ function x152(): Array { return [d1, d2]; return [d1, d2]; } >d2 : Derived2 function x153(): { [n: number]: Base; } { return [d1, d2]; return [d1, d2]; } ->x153 : () => { [n: number]: Base;} +>x153 : () => { [n: number]: Base; } >n : number >[d1, d2] : (Derived1 | Derived2)[] >d1 : Derived1 @@ -1322,7 +1322,7 @@ function x153(): { [n: number]: Base; } { return [d1, d2]; return [d1, d2]; } >d2 : Derived2 function x154(): {n: Base[]; } { return { n: [d1, d2] }; return { n: [d1, d2] }; } ->x154 : () => { n: Base[];} +>x154 : () => { n: Base[]; } >n : Base[] >{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } >n : (Derived1 | Derived2)[] @@ -1388,7 +1388,7 @@ var x159: () => () => Base[] = () => { return function named() { return [d1, d2] >d2 : Derived2 var x160: () => { (): Base[]; } = () => { return () => [d1, d2]; }; ->x160 : () => { (): Base[];} +>x160 : () => { (): Base[]; } >() => { return () => [d1, d2]; } : () => () => (Derived1 | Derived2)[] >() => [d1, d2] : () => (Derived1 | Derived2)[] >[d1, d2] : (Derived1 | Derived2)[] @@ -1396,7 +1396,7 @@ var x160: () => { (): Base[]; } = () => { return () => [d1, d2]; }; >d2 : Derived2 var x161: () => { (): Base[]; } = () => { return function() { return [d1, d2] }; }; ->x161 : () => { (): Base[];} +>x161 : () => { (): Base[]; } >() => { return function() { return [d1, d2] }; } : () => () => (Derived1 | Derived2)[] >function() { return [d1, d2] } : () => (Derived1 | Derived2)[] >[d1, d2] : (Derived1 | Derived2)[] @@ -1404,7 +1404,7 @@ var x161: () => { (): Base[]; } = () => { return function() { return [d1, d2] }; >d2 : Derived2 var x162: () => { (): Base[]; } = () => { return function named() { return [d1, d2] }; }; ->x162 : () => { (): Base[];} +>x162 : () => { (): Base[]; } >() => { return function named() { return [d1, d2] }; } : () => () => (Derived1 | Derived2)[] >function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] >named : () => (Derived1 | Derived2)[] @@ -1427,7 +1427,7 @@ var x164: () => Array = () => { return [d1, d2]; }; >d2 : Derived2 var x165: () => { [n: number]: Base; } = () => { return [d1, d2]; }; ->x165 : () => { [n: number]: Base;} +>x165 : () => { [n: number]: Base; } >n : number >() => { return [d1, d2]; } : () => (Derived1 | Derived2)[] >[d1, d2] : (Derived1 | Derived2)[] @@ -1435,7 +1435,7 @@ var x165: () => { [n: number]: Base; } = () => { return [d1, d2]; }; >d2 : Derived2 var x166: () => {n: Base[]; } = () => { return { n: [d1, d2] }; }; ->x166 : () => { n: Base[];} +>x166 : () => { n: Base[]; } >n : Base[] >() => { return { n: [d1, d2] }; } : () => { n: (Derived1 | Derived2)[]; } >{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } @@ -1489,7 +1489,7 @@ var x171: () => () => Base[] = function() { return function named() { return [d1 >d2 : Derived2 var x172: () => { (): Base[]; } = function() { return () => [d1, d2]; }; ->x172 : () => { (): Base[];} +>x172 : () => { (): Base[]; } >function() { return () => [d1, d2]; } : () => () => (Derived1 | Derived2)[] >() => [d1, d2] : () => (Derived1 | Derived2)[] >[d1, d2] : (Derived1 | Derived2)[] @@ -1497,7 +1497,7 @@ var x172: () => { (): Base[]; } = function() { return () => [d1, d2]; }; >d2 : Derived2 var x173: () => { (): Base[]; } = function() { return function() { return [d1, d2] }; }; ->x173 : () => { (): Base[];} +>x173 : () => { (): Base[]; } >function() { return function() { return [d1, d2] }; } : () => () => (Derived1 | Derived2)[] >function() { return [d1, d2] } : () => (Derived1 | Derived2)[] >[d1, d2] : (Derived1 | Derived2)[] @@ -1505,7 +1505,7 @@ var x173: () => { (): Base[]; } = function() { return function() { return [d1, d >d2 : Derived2 var x174: () => { (): Base[]; } = function() { return function named() { return [d1, d2] }; }; ->x174 : () => { (): Base[];} +>x174 : () => { (): Base[]; } >function() { return function named() { return [d1, d2] }; } : () => () => (Derived1 | Derived2)[] >function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] >named : () => (Derived1 | Derived2)[] @@ -1528,7 +1528,7 @@ var x176: () => Array = function() { return [d1, d2]; }; >d2 : Derived2 var x177: () => { [n: number]: Base; } = function() { return [d1, d2]; }; ->x177 : () => { [n: number]: Base;} +>x177 : () => { [n: number]: Base; } >n : number >function() { return [d1, d2]; } : () => (Derived1 | Derived2)[] >[d1, d2] : (Derived1 | Derived2)[] @@ -1536,7 +1536,7 @@ var x177: () => { [n: number]: Base; } = function() { return [d1, d2]; }; >d2 : Derived2 var x178: () => {n: Base[]; } = function() { return { n: [d1, d2] }; }; ->x178 : () => { n: Base[];} +>x178 : () => { n: Base[]; } >n : Base[] >function() { return { n: [d1, d2] }; } : () => { n: (Derived1 | Derived2)[]; } >{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } @@ -2078,7 +2078,7 @@ var x239: { n: () => Base[]; } = { n: function named() { return [d1, d2] } }; >d2 : Derived2 var x240: { n: { (): Base[]; }; } = { n: () => [d1, d2] }; ->x240 : { n: { (): Base[];}; } +>x240 : { n: { (): Base[]; }; } >n : () => Base[] >{ n: () => [d1, d2] } : { n: () => (Derived1 | Derived2)[]; } >n : () => (Derived1 | Derived2)[] @@ -2088,7 +2088,7 @@ var x240: { n: { (): Base[]; }; } = { n: () => [d1, d2] }; >d2 : Derived2 var x241: { n: { (): Base[]; }; } = { n: function() { return [d1, d2] } }; ->x241 : { n: { (): Base[];}; } +>x241 : { n: { (): Base[]; }; } >n : () => Base[] >{ n: function() { return [d1, d2] } } : { n: () => (Derived1 | Derived2)[]; } >n : () => (Derived1 | Derived2)[] @@ -2098,7 +2098,7 @@ var x241: { n: { (): Base[]; }; } = { n: function() { return [d1, d2] } }; >d2 : Derived2 var x242: { n: { (): Base[]; }; } = { n: function named() { return [d1, d2] } }; ->x242 : { n: { (): Base[];}; } +>x242 : { n: { (): Base[]; }; } >n : () => Base[] >{ n: function named() { return [d1, d2] } } : { n: () => (Derived1 | Derived2)[]; } >n : () => (Derived1 | Derived2)[] @@ -2127,7 +2127,7 @@ var x244: { n: Array; } = { n: [d1, d2] }; >d2 : Derived2 var x245: { n: { [n: number]: Base; }; } = { n: [d1, d2] }; ->x245 : { n: { [n: number]: Base;}; } +>x245 : { n: { [n: number]: Base; }; } >n : { [n: number]: Base; } >n : number >{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } @@ -2137,7 +2137,7 @@ var x245: { n: { [n: number]: Base; }; } = { n: [d1, d2] }; >d2 : Derived2 var x246: { n: {n: Base[]; } ; } = { n: { n: [d1, d2] } }; ->x246 : { n: { n: Base[];}; } +>x246 : { n: { n: Base[]; }; } >n : { n: Base[]; } >n : Base[] >{ n: { n: [d1, d2] } } : { n: { n: (Derived1 | Derived2)[]; }; } @@ -2930,7 +2930,7 @@ function x323(n: () => Base[]) { }; x323(function named() { return [d1, d2] }); >d2 : Derived2 function x324(n: { (): Base[]; }) { }; x324(() => [d1, d2]); ->x324 : (n: { (): Base[];}) => void +>x324 : (n: { (): Base[]; }) => void >n : () => Base[] >x324(() => [d1, d2]) : void >x324 : (n: () => Base[]) => void @@ -2940,7 +2940,7 @@ function x324(n: { (): Base[]; }) { }; x324(() => [d1, d2]); >d2 : Derived2 function x325(n: { (): Base[]; }) { }; x325(function() { return [d1, d2] }); ->x325 : (n: { (): Base[];}) => void +>x325 : (n: { (): Base[]; }) => void >n : () => Base[] >x325(function() { return [d1, d2] }) : void >x325 : (n: () => Base[]) => void @@ -2950,7 +2950,7 @@ function x325(n: { (): Base[]; }) { }; x325(function() { return [d1, d2] }); >d2 : Derived2 function x326(n: { (): Base[]; }) { }; x326(function named() { return [d1, d2] }); ->x326 : (n: { (): Base[];}) => void +>x326 : (n: { (): Base[]; }) => void >n : () => Base[] >x326(function named() { return [d1, d2] }) : void >x326 : (n: () => Base[]) => void @@ -2979,7 +2979,7 @@ function x328(n: Array) { }; x328([d1, d2]); >d2 : Derived2 function x329(n: { [n: number]: Base; }) { }; x329([d1, d2]); ->x329 : (n: { [n: number]: Base;}) => void +>x329 : (n: { [n: number]: Base; }) => void >n : { [n: number]: Base; } >n : number >x329([d1, d2]) : void @@ -2989,7 +2989,7 @@ function x329(n: { [n: number]: Base; }) { }; x329([d1, d2]); >d2 : Derived2 function x330(n: {n: Base[]; } ) { }; x330({ n: [d1, d2] }); ->x330 : (n: { n: Base[];}) => void +>x330 : (n: { n: Base[]; }) => void >n : { n: Base[]; } >n : Base[] >x330({ n: [d1, d2] }) : void @@ -3061,8 +3061,8 @@ var x335 = (n: () => Base[]) => n; x335(function named() { return [d1, d2] }); >d2 : Derived2 var x336 = (n: { (): Base[]; }) => n; x336(() => [d1, d2]); ->x336 : (n: { (): Base[];}) => () => Base[] ->(n: { (): Base[]; }) => n : (n: { (): Base[];}) => () => Base[] +>x336 : (n: { (): Base[]; }) => () => Base[] +>(n: { (): Base[]; }) => n : (n: { (): Base[]; }) => () => Base[] >n : () => Base[] >n : () => Base[] >x336(() => [d1, d2]) : () => Base[] @@ -3073,8 +3073,8 @@ var x336 = (n: { (): Base[]; }) => n; x336(() => [d1, d2]); >d2 : Derived2 var x337 = (n: { (): Base[]; }) => n; x337(function() { return [d1, d2] }); ->x337 : (n: { (): Base[];}) => () => Base[] ->(n: { (): Base[]; }) => n : (n: { (): Base[];}) => () => Base[] +>x337 : (n: { (): Base[]; }) => () => Base[] +>(n: { (): Base[]; }) => n : (n: { (): Base[]; }) => () => Base[] >n : () => Base[] >n : () => Base[] >x337(function() { return [d1, d2] }) : () => Base[] @@ -3085,8 +3085,8 @@ var x337 = (n: { (): Base[]; }) => n; x337(function() { return [d1, d2] }); >d2 : Derived2 var x338 = (n: { (): Base[]; }) => n; x338(function named() { return [d1, d2] }); ->x338 : (n: { (): Base[];}) => () => Base[] ->(n: { (): Base[]; }) => n : (n: { (): Base[];}) => () => Base[] +>x338 : (n: { (): Base[]; }) => () => Base[] +>(n: { (): Base[]; }) => n : (n: { (): Base[]; }) => () => Base[] >n : () => Base[] >n : () => Base[] >x338(function named() { return [d1, d2] }) : () => Base[] @@ -3120,8 +3120,8 @@ var x340 = (n: Array) => n; x340([d1, d2]); >d2 : Derived2 var x341 = (n: { [n: number]: Base; }) => n; x341([d1, d2]); ->x341 : (n: { [n: number]: Base;}) => { [n: number]: Base; } ->(n: { [n: number]: Base; }) => n : (n: { [n: number]: Base;}) => { [n: number]: Base; } +>x341 : (n: { [n: number]: Base; }) => { [n: number]: Base; } +>(n: { [n: number]: Base; }) => n : (n: { [n: number]: Base; }) => { [n: number]: Base; } >n : { [n: number]: Base; } >n : number >n : { [n: number]: Base; } @@ -3132,8 +3132,8 @@ var x341 = (n: { [n: number]: Base; }) => n; x341([d1, d2]); >d2 : Derived2 var x342 = (n: {n: Base[]; } ) => n; x342({ n: [d1, d2] }); ->x342 : (n: { n: Base[];}) => { n: Base[]; } ->(n: {n: Base[]; } ) => n : (n: { n: Base[];}) => { n: Base[]; } +>x342 : (n: { n: Base[]; }) => { n: Base[]; } +>(n: {n: Base[]; } ) => n : (n: { n: Base[]; }) => { n: Base[]; } >n : { n: Base[]; } >n : Base[] >n : { n: Base[]; } @@ -3207,8 +3207,8 @@ var x347 = function(n: () => Base[]) { }; x347(function named() { return [d1, d2 >d2 : Derived2 var x348 = function(n: { (): Base[]; }) { }; x348(() => [d1, d2]); ->x348 : (n: { (): Base[];}) => void ->function(n: { (): Base[]; }) { } : (n: { (): Base[];}) => void +>x348 : (n: { (): Base[]; }) => void +>function(n: { (): Base[]; }) { } : (n: { (): Base[]; }) => void >n : () => Base[] >x348(() => [d1, d2]) : void >x348 : (n: () => Base[]) => void @@ -3218,8 +3218,8 @@ var x348 = function(n: { (): Base[]; }) { }; x348(() => [d1, d2]); >d2 : Derived2 var x349 = function(n: { (): Base[]; }) { }; x349(function() { return [d1, d2] }); ->x349 : (n: { (): Base[];}) => void ->function(n: { (): Base[]; }) { } : (n: { (): Base[];}) => void +>x349 : (n: { (): Base[]; }) => void +>function(n: { (): Base[]; }) { } : (n: { (): Base[]; }) => void >n : () => Base[] >x349(function() { return [d1, d2] }) : void >x349 : (n: () => Base[]) => void @@ -3229,8 +3229,8 @@ var x349 = function(n: { (): Base[]; }) { }; x349(function() { return [d1, d2] } >d2 : Derived2 var x350 = function(n: { (): Base[]; }) { }; x350(function named() { return [d1, d2] }); ->x350 : (n: { (): Base[];}) => void ->function(n: { (): Base[]; }) { } : (n: { (): Base[];}) => void +>x350 : (n: { (): Base[]; }) => void +>function(n: { (): Base[]; }) { } : (n: { (): Base[]; }) => void >n : () => Base[] >x350(function named() { return [d1, d2] }) : void >x350 : (n: () => Base[]) => void @@ -3261,8 +3261,8 @@ var x352 = function(n: Array) { }; x352([d1, d2]); >d2 : Derived2 var x353 = function(n: { [n: number]: Base; }) { }; x353([d1, d2]); ->x353 : (n: { [n: number]: Base;}) => void ->function(n: { [n: number]: Base; }) { } : (n: { [n: number]: Base;}) => void +>x353 : (n: { [n: number]: Base; }) => void +>function(n: { [n: number]: Base; }) { } : (n: { [n: number]: Base; }) => void >n : { [n: number]: Base; } >n : number >x353([d1, d2]) : void @@ -3272,8 +3272,8 @@ var x353 = function(n: { [n: number]: Base; }) { }; x353([d1, d2]); >d2 : Derived2 var x354 = function(n: {n: Base[]; } ) { }; x354({ n: [d1, d2] }); ->x354 : (n: { n: Base[];}) => void ->function(n: {n: Base[]; } ) { } : (n: { n: Base[];}) => void +>x354 : (n: { n: Base[]; }) => void +>function(n: {n: Base[]; } ) { } : (n: { n: Base[]; }) => void >n : { n: Base[]; } >n : Base[] >x354({ n: [d1, d2] }) : void diff --git a/tests/baselines/reference/generatorReturnContextualType.types b/tests/baselines/reference/generatorReturnContextualType.types index e79fb4a548b7d..6b721f2627aad 100644 --- a/tests/baselines/reference/generatorReturnContextualType.types +++ b/tests/baselines/reference/generatorReturnContextualType.types @@ -4,7 +4,7 @@ // #35995 function* f1(): Generator { ->f1 : () => Generator +>f1 : () => Generator >x : "x" return { x: 'x' }; @@ -14,7 +14,7 @@ function* f1(): Generator { } function* g1(): Iterator { ->g1 : () => Iterator +>g1 : () => Iterator >x : "x" return { x: 'x' }; @@ -24,7 +24,7 @@ function* g1(): Iterator { } async function* f2(): AsyncGenerator { ->f2 : () => AsyncGenerator +>f2 : () => AsyncGenerator >x : "x" return { x: 'x' }; @@ -34,7 +34,7 @@ async function* f2(): AsyncGenerator { } async function* g2(): AsyncIterator { ->g2 : () => AsyncIterator +>g2 : () => AsyncIterator >x : "x" return { x: 'x' }; @@ -44,7 +44,7 @@ async function* g2(): AsyncIterator { } async function* f3(): AsyncGenerator { ->f3 : () => AsyncGenerator +>f3 : () => AsyncGenerator >x : "x" return Promise.resolve({ x: 'x' }); @@ -58,7 +58,7 @@ async function* f3(): AsyncGenerator { } async function* g3(): AsyncIterator { ->g3 : () => AsyncIterator +>g3 : () => AsyncIterator >x : "x" return Promise.resolve({ x: 'x' }); @@ -72,7 +72,7 @@ async function* g3(): AsyncIterator { } async function* f4(): AsyncGenerator { ->f4 : () => AsyncGenerator +>f4 : () => AsyncGenerator >x : "x" const ret = { x: 'x' }; @@ -90,7 +90,7 @@ async function* f4(): AsyncGenerator { } async function* g4(): AsyncIterator { ->g4 : () => AsyncIterator +>g4 : () => AsyncIterator >x : "x" const ret = { x: 'x' }; diff --git a/tests/baselines/reference/genericArrayPropertyAssignment.types b/tests/baselines/reference/genericArrayPropertyAssignment.types index 675d867219c3f..310399a0aefbd 100644 --- a/tests/baselines/reference/genericArrayPropertyAssignment.types +++ b/tests/baselines/reference/genericArrayPropertyAssignment.types @@ -2,7 +2,7 @@ === genericArrayPropertyAssignment.ts === function isEmpty(list: {length:number;}) ->isEmpty : (list: { length: number;}) => boolean +>isEmpty : (list: { length: number; }) => boolean >list : { length: number; } >length : number { diff --git a/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.types b/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.types index 9c8d2dc925a28..a32aeeb34efd4 100644 --- a/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.types +++ b/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.types @@ -37,7 +37,7 @@ var a1: I = { x: new A() }; var a2: I = function (): { x: A } { >a2 : I >function (): { x: A } { var z = { x: new A() }; return z;} () : { x: A; } ->function (): { x: A } { var z = { x: new A() }; return z;} : () => { x: A;} +>function (): { x: A } { var z = { x: new A() }; return z;} : () => { x: A; } >x : A var z = { x: new A() }; return z; diff --git a/tests/baselines/reference/genericCallWithConstructorTypedArguments5.types b/tests/baselines/reference/genericCallWithConstructorTypedArguments5.types index e6d18ddadbe67..47bff51439e16 100644 --- a/tests/baselines/reference/genericCallWithConstructorTypedArguments5.types +++ b/tests/baselines/reference/genericCallWithConstructorTypedArguments5.types @@ -4,7 +4,7 @@ // Generic call with parameter of object type with member of function type of n args passed object whose associated member is call signature with n+1 args function foo(arg: { cb: new(t: T) => U }) { ->foo : (arg: { cb: new (t: T) => U;}) => U +>foo : (arg: { cb: new (t: T) => U; }) => U >arg : { cb: new (t: T) => U; } >cb : new (t: T) => U >t : T @@ -53,7 +53,7 @@ var r3 = foo(arg3); // error >arg3 : { cb: new (x: string, y: number) => string; } function foo2(arg: { cb: new(t: T, t2: T) => U }) { ->foo2 : (arg: { cb: new (t: T, t2: T) => U;}) => U +>foo2 : (arg: { cb: new (t: T, t2: T) => U; }) => U >arg : { cb: new (t: T, t2: T) => U; } >cb : new (t: T, t2: T) => U >t : T diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments5.types b/tests/baselines/reference/genericCallWithFunctionTypedArguments5.types index a2a0146cc95f7..aa75032d49894 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments5.types +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments5.types @@ -4,7 +4,7 @@ // Generic call with parameter of object type with member of function type of n args passed object whose associated member is call signature with n+1 args function foo(arg: { cb: (t: T) => U }) { ->foo : (arg: { cb: (t: T) => U;}) => U +>foo : (arg: { cb: (t: T) => U; }) => U >arg : { cb: (t: T) => U; } >cb : (t: T) => U >t : T @@ -54,7 +54,7 @@ var r3 = foo({ cb: (x: string, y: number) => '' }); // error >'' : "" function foo2(arg: { cb: (t: T, t2: T) => U }) { ->foo2 : (arg: { cb: (t: T, t2: T) => U;}) => U +>foo2 : (arg: { cb: (t: T, t2: T) => U; }) => U >arg : { cb: (t: T, t2: T) => U; } >cb : (t: T, t2: T) => U >t : T diff --git a/tests/baselines/reference/genericCallWithObjectLiteralArgs.types b/tests/baselines/reference/genericCallWithObjectLiteralArgs.types index 521d88264fd22..a36ecb727d98b 100644 --- a/tests/baselines/reference/genericCallWithObjectLiteralArgs.types +++ b/tests/baselines/reference/genericCallWithObjectLiteralArgs.types @@ -2,7 +2,7 @@ === genericCallWithObjectLiteralArgs.ts === function foo(x: { bar: T; baz: T }) { ->foo : (x: { bar: T; baz: T;}) => { bar: T; baz: T; } +>foo : (x: { bar: T; baz: T; }) => { bar: T; baz: T; } >x : { bar: T; baz: T; } >bar : T >baz : T diff --git a/tests/baselines/reference/genericCallWithObjectLiteralArguments1.types b/tests/baselines/reference/genericCallWithObjectLiteralArguments1.types index 9e634c0a6cf95..8a7c874e85a64 100644 --- a/tests/baselines/reference/genericCallWithObjectLiteralArguments1.types +++ b/tests/baselines/reference/genericCallWithObjectLiteralArguments1.types @@ -2,7 +2,7 @@ === genericCallWithObjectLiteralArguments1.ts === function foo(n: { x: T; y: T }, m: T) { return m; } ->foo : (n: { x: T; y: T;}, m: T) => T +>foo : (n: { x: T; y: T; }, m: T) => T >n : { x: T; y: T; } >x : T >y : T diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgs2.types b/tests/baselines/reference/genericCallWithObjectTypeArgs2.types index c73a25bab32b7..6ee7848b345e9 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgs2.types +++ b/tests/baselines/reference/genericCallWithObjectTypeArgs2.types @@ -24,7 +24,7 @@ class Derived2 extends Base { // returns {}[] function f(a: { x: T; y: U }) { ->f : (a: { x: T; y: U;}) => (T | U)[] +>f : (a: { x: T; y: U; }) => (T | U)[] >a : { x: T; y: U; } >x : T >y : U @@ -65,7 +65,7 @@ var r2 = f({ x: new Base(), y: new Derived2() }); // {}[] function f2(a: { x: T; y: U }) { ->f2 : (a: { x: T; y: U;}) => (x: T) => U +>f2 : (a: { x: T; y: U; }) => (x: T) => U >a : { x: T; y: U; } >x : T >y : U diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.types b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.types index 0e33d1fce8908..fe1f7f381b431 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.types +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.types @@ -19,7 +19,7 @@ class Derived extends Base { } function f(x: { foo: T; bar: T }) { ->f : (x: { foo: T; bar: T;}) => T +>f : (x: { foo: T; bar: T; }) => T >x : { foo: T; bar: T; } >foo : T >bar : T diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.types b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.types index efcebeffe0a98..0779ed056bcf5 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.types +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.types @@ -25,7 +25,7 @@ class Derived2 extends Base { } function f(a: { x: T; y: T }) { ->f : (a: { x: T; y: T;}) => T +>f : (a: { x: T; y: T; }) => T >a : { x: T; y: T; } >x : T >y : T diff --git a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.types b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.types index d45d0d8172ed4..94df87dabc2eb 100644 --- a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.types +++ b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.types @@ -48,7 +48,7 @@ module GenericParameter { >GenericParameter : typeof GenericParameter function foo5(cb: { new(x: T): string; new(x: number): T }) { ->foo5 : (cb: { new (x: T): string; new (x: number): T;}) => { new (x: T): string; new (x: number): T; } +>foo5 : (cb: { new (x: T): string; new (x: number): T; }) => { new (x: T): string; new (x: number): T; } >cb : { new (x: T): string; new (x: number): T; } >x : T >x : number @@ -84,7 +84,7 @@ module GenericParameter { >b : { new (x: T): string; new (x: number): T_1; } function foo6(cb: { new(x: T): string; new(x: T, y?: T): string }) { ->foo6 : (cb: { new (x: T): string; new (x: T, y?: T): string;}) => { new (x: T): string; new (x: T, y?: T): string; } +>foo6 : (cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; } >cb : { new (x: T): string; new (x: T, y?: T): string; } >x : T >x : T @@ -107,7 +107,7 @@ module GenericParameter { >b : { new (x: T): string; new (x: number): T_1; } function foo7(x:T, cb: { new(x: T): string; new(x: T, y?: T): string }) { ->foo7 : (x: T, cb: { new (x: T): string; new (x: T, y?: T): string;}) => { new (x: T): string; new (x: T, y?: T): string; } +>foo7 : (x: T, cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; } >x : T >cb : { new (x: T): string; new (x: T, y?: T): string; } >x : T diff --git a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.types b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.types index b59731ed5482b..791ce86fc9574 100644 --- a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.types +++ b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.types @@ -41,7 +41,7 @@ module GenericParameter { >GenericParameter : typeof GenericParameter function foo5(cb: { new(x: T): string; new(x: number): T }) { ->foo5 : (cb: { new (x: T): string; new (x: number): T;}) => { new (x: T): string; new (x: number): T; } +>foo5 : (cb: { new (x: T): string; new (x: number): T; }) => { new (x: T): string; new (x: number): T; } >cb : { new (x: T): string; new (x: number): T; } >x : T >x : number @@ -61,7 +61,7 @@ module GenericParameter { >a : new (x: T) => T function foo6(cb: { new(x: T): string; new(x: T, y?: T): string }) { ->foo6 : (cb: { new (x: T): string; new (x: T, y?: T): string;}) => { new (x: T): string; new (x: T, y?: T): string; } +>foo6 : (cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; } >cb : { new (x: T): string; new (x: T, y?: T): string; } >x : T >x : T @@ -83,7 +83,7 @@ module GenericParameter { >b : new (x: T, y: T) => string function foo7(x:T, cb: { new(x: T): string; new(x: T, y?: T): string }) { ->foo7 : (x: T, cb: { new (x: T): string; new (x: T, y?: T): string;}) => { new (x: T): string; new (x: T, y?: T): string; } +>foo7 : (x: T, cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; } >x : T >cb : { new (x: T): string; new (x: T, y?: T): string; } >x : T diff --git a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.types b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.types index 8c9fe30bd83e3..bb7832a8e3a99 100644 --- a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.types +++ b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.types @@ -53,7 +53,7 @@ module GenericParameter { >GenericParameter : typeof GenericParameter function foo5(cb: { (x: T): string; (x: number): T }) { ->foo5 : (cb: { (x: T): string; (x: number): T;}) => { (x: T): string; (x: number): T; } +>foo5 : (cb: { (x: T): string; (x: number): T; }) => { (x: T): string; (x: number): T; } >cb : { (x: T): string; (x: number): T; } >x : T >x : number @@ -82,7 +82,7 @@ module GenericParameter { >a : { (x: T): string; (x: number): T_1; } function foo6(cb: { (x: T): string; (x: T, y?: T): string }) { ->foo6 : (cb: { (x: T): string; (x: T, y?: T): string;}) => { (x: T): string; (x: T, y?: T): string; } +>foo6 : (cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; } >cb : { (x: T): string; (x: T, y?: T): string; } >x : T >x : T @@ -118,7 +118,7 @@ module GenericParameter { >'' : "" function foo7(x:T, cb: { (x: T): string; (x: T, y?: T): string }) { ->foo7 : (x: T, cb: { (x: T): string; (x: T, y?: T): string;}) => { (x: T): string; (x: T, y?: T): string; } +>foo7 : (x: T, cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; } >x : T >cb : { (x: T): string; (x: T, y?: T): string; } >x : T diff --git a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.types b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.types index 7d894ea158fd6..af5874bcd73b5 100644 --- a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.types +++ b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.types @@ -40,7 +40,7 @@ module GenericParameter { >GenericParameter : typeof GenericParameter function foo5(cb: { (x: T): string; (x: number): T }) { ->foo5 : (cb: { (x: T): string; (x: number): T;}) => { (x: T): string; (x: number): T; } +>foo5 : (cb: { (x: T): string; (x: number): T; }) => { (x: T): string; (x: number): T; } >cb : { (x: T): string; (x: number): T; } >x : T >x : number @@ -58,7 +58,7 @@ module GenericParameter { >x : T function foo6(cb: { (x: T): string; (x: T, y?: T): string }) { ->foo6 : (cb: { (x: T): string; (x: T, y?: T): string;}) => { (x: T): string; (x: T, y?: T): string; } +>foo6 : (cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; } >cb : { (x: T): string; (x: T, y?: T): string; } >x : T >x : T @@ -78,7 +78,7 @@ module GenericParameter { >'' : "" function foo7(x:T, cb: { (x: T): string; (x: T, y?: T): string }) { ->foo7 : (x: T, cb: { (x: T): string; (x: T, y?: T): string;}) => { (x: T): string; (x: T, y?: T): string; } +>foo7 : (x: T, cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; } >x : T >cb : { (x: T): string; (x: T, y?: T): string; } >x : T diff --git a/tests/baselines/reference/genericContextualTypes2.types b/tests/baselines/reference/genericContextualTypes2.types index a3a2944fcadfd..501cb8951ec6b 100644 --- a/tests/baselines/reference/genericContextualTypes2.types +++ b/tests/baselines/reference/genericContextualTypes2.types @@ -78,11 +78,11 @@ createMachine<{ count: number }>({ >entry : AssignAction<{ count: number; }> >assign({ count: (ctx: { count: number }) => ++ctx.count, }) : AssignAction<{ count: number; }> >assign : (assignment: PropertyAssigner>) => AssignAction ->{ count: (ctx: { count: number }) => ++ctx.count, } : { count: (ctx: { count: number;}) => number; } +>{ count: (ctx: { count: number }) => ++ctx.count, } : { count: (ctx: { count: number; }) => number; } count: (ctx: { count: number }) => ++ctx.count, ->count : (ctx: { count: number;}) => number ->(ctx: { count: number }) => ++ctx.count : (ctx: { count: number;}) => number +>count : (ctx: { count: number; }) => number +>(ctx: { count: number }) => ++ctx.count : (ctx: { count: number; }) => number >ctx : { count: number; } >count : number >++ctx.count : number diff --git a/tests/baselines/reference/genericContextualTypes3.types b/tests/baselines/reference/genericContextualTypes3.types index 92834b360e5d9..90ab3b6b03bfd 100644 --- a/tests/baselines/reference/genericContextualTypes3.types +++ b/tests/baselines/reference/genericContextualTypes3.types @@ -77,11 +77,11 @@ createMachine<{ count: number }>({ >entry : AssignAction<{ count: number; }> >assign({ count: (ctx: { count: number }) => ++ctx.count, }) : AssignAction<{ count: number; }> >assign : (assignment: PropertyAssigner>) => AssignAction ->{ count: (ctx: { count: number }) => ++ctx.count, } : { count: (ctx: { count: number;}) => number; } +>{ count: (ctx: { count: number }) => ++ctx.count, } : { count: (ctx: { count: number; }) => number; } count: (ctx: { count: number }) => ++ctx.count, ->count : (ctx: { count: number;}) => number ->(ctx: { count: number }) => ++ctx.count : (ctx: { count: number;}) => number +>count : (ctx: { count: number; }) => number +>(ctx: { count: number }) => ++ctx.count : (ctx: { count: number; }) => number >ctx : { count: number; } >count : number >++ctx.count : number diff --git a/tests/baselines/reference/genericFunctionInference1.types b/tests/baselines/reference/genericFunctionInference1.types index 69e6b7cc5a140..8e39d557b32cd 100644 --- a/tests/baselines/reference/genericFunctionInference1.types +++ b/tests/baselines/reference/genericFunctionInference1.types @@ -37,7 +37,7 @@ declare function list(a: T): T[]; >a : T declare function box(x: V): { value: V }; ->box : (x: V) => { value: V;} +>box : (x: V) => { value: V; } >x : V >value : V @@ -174,7 +174,7 @@ const g00: (x: T) => T[] = pipe(list); >list : (a: T) => T[] const g01: (x: T) => { value: T[] } = pipe(list, box); ->g01 : (x: T) => { value: T[];} +>g01 : (x: T) => { value: T[]; } >x : T >value : T[] >pipe(list, box) : (a: T) => { value: T[]; } @@ -183,7 +183,7 @@ const g01: (x: T) => { value: T[] } = pipe(list, box); >box : (x: V) => { value: V; } const g02: (x: T) => { value: T }[] = pipe(box, list); ->g02 : (x: T) => { value: T;}[] +>g02 : (x: T) => { value: T; }[] >x : T >value : T >pipe(box, list) : (x: T) => { value: T; }[] @@ -192,7 +192,7 @@ const g02: (x: T) => { value: T }[] = pipe(box, list); >list : (a: T) => T[] const g03: (x: T) => { value: T[] } = pipe(x => list(x), box); ->g03 : (x: T) => { value: T[];} +>g03 : (x: T) => { value: T[]; } >x : T >value : T[] >pipe(x => list(x), box) : (x: T) => { value: T[]; } @@ -205,7 +205,7 @@ const g03: (x: T) => { value: T[] } = pipe(x => list(x), box); >box : (x: V) => { value: V; } const g04: (x: T) => { value: T[] } = pipe(list, x => box(x)); ->g04 : (x: T) => { value: T[];} +>g04 : (x: T) => { value: T[]; } >x : T >value : T[] >pipe(list, x => box(x)) : (a: T) => { value: T[]; } @@ -218,7 +218,7 @@ const g04: (x: T) => { value: T[] } = pipe(list, x => box(x)); >x : T[] const g05: (x: T) => { value: T[] } = pipe(x => list(x), x => box(x)) ->g05 : (x: T) => { value: T[];} +>g05 : (x: T) => { value: T[]; } >x : T >value : T[] >pipe(x => list(x), x => box(x)) : (x: T) => { value: T[]; } @@ -235,7 +235,7 @@ const g05: (x: T) => { value: T[] } = pipe(x => list(x), x => box(x)) >x : T[] const g06: (x: T) => { value: T[] } = pipe(list, pipe(box)); ->g06 : (x: T) => { value: T[];} +>g06 : (x: T) => { value: T[]; } >x : T >value : T[] >pipe(list, pipe(box)) : (a: T) => { value: T[]; } @@ -246,7 +246,7 @@ const g06: (x: T) => { value: T[] } = pipe(list, pipe(box)); >box : (x: V) => { value: V; } const g07: (x: T) => { value: T[] } = pipe(x => list(x), pipe(box)); ->g07 : (x: T) => { value: T[];} +>g07 : (x: T) => { value: T[]; } >x : T >value : T[] >pipe(x => list(x), pipe(box)) : (x: T) => { value: T[]; } @@ -261,7 +261,7 @@ const g07: (x: T) => { value: T[] } = pipe(x => list(x), pipe(box)); >box : (x: V) => { value: V; } const g08: (x: T) => { value: T[] } = pipe(x => list(x), pipe(x => box(x))); ->g08 : (x: T) => { value: T[];} +>g08 : (x: T) => { value: T[]; } >x : T >value : T[] >pipe(x => list(x), pipe(x => box(x))) : (x: T) => { value: T[]; } @@ -418,7 +418,7 @@ const f41 = pipe4([box, list]); >list : (a: T) => T[] declare function pipe5(f: (a: A) => B): { f: (a: A) => B }; ->pipe5 : (f: (a: A) => B) => { f: (a: A) => B;} +>pipe5 : (f: (a: A) => B) => { f: (a: A) => B; } >f : (a: A) => B >a : A >f : (a: A) => B @@ -630,7 +630,7 @@ var z = identityM(x); // #3038 export function keyOf(value: { key: a; }): a { ->keyOf : (value: { key: a;}) => a +>keyOf : (value: { key: a; }) => a >value : { key: a; } >key : a diff --git a/tests/baselines/reference/genericFunctionInference2.types b/tests/baselines/reference/genericFunctionInference2.types index fd42eeb0e3ac5..d8e613ad13ddb 100644 --- a/tests/baselines/reference/genericFunctionInference2.types +++ b/tests/baselines/reference/genericFunctionInference2.types @@ -12,7 +12,7 @@ declare function combineReducers(reducers: { [K in keyof S]: Reducer }) >reducers : { [K in keyof S]: Reducer; } type MyState = { combined: { foo: number } }; ->MyState : { combined: { foo: number;}; } +>MyState : { combined: { foo: number; }; } >combined : { foo: number; } >foo : number diff --git a/tests/baselines/reference/genericFunctionParameters.types b/tests/baselines/reference/genericFunctionParameters.types index e2549fac1199b..769eb8dfc73b6 100644 --- a/tests/baselines/reference/genericFunctionParameters.types +++ b/tests/baselines/reference/genericFunctionParameters.types @@ -44,7 +44,7 @@ let x3 = f3(x => x); // Array declare const s: (go: (ops: { init(): S; }) => R) => R; >s : (go: (ops: { init(): S; }) => R) => R ->go : (ops: { init(): S;}) => R +>go : (ops: { init(): S; }) => R >ops : { init(): S; } >init : () => S diff --git a/tests/baselines/reference/genericFunctionsAndConditionalInference.types b/tests/baselines/reference/genericFunctionsAndConditionalInference.types index 8cdfc41e883fb..bdf62b66cf80e 100644 --- a/tests/baselines/reference/genericFunctionsAndConditionalInference.types +++ b/tests/baselines/reference/genericFunctionsAndConditionalInference.types @@ -10,8 +10,8 @@ declare function unboxify(obj: Boxified): T; >obj : Boxified function foo(obj: { u: { value: U }, v: { value: V } }) { ->foo : (obj: { u: { value: U; }; v: { value: V; };}) => { u: U; v: V; } ->obj : { u: { value: U;}; v: { value: V;}; } +>foo : (obj: { u: { value: U; }; v: { value: V; }; }) => { u: U; v: V; } +>obj : { u: { value: U; }; v: { value: V; }; } >u : { value: U; } >value : U >v : { value: V; } diff --git a/tests/baselines/reference/genericInstantiationEquivalentToObjectLiteral.types b/tests/baselines/reference/genericInstantiationEquivalentToObjectLiteral.types index e8bc368c543fb..1344930dbcef3 100644 --- a/tests/baselines/reference/genericInstantiationEquivalentToObjectLiteral.types +++ b/tests/baselines/reference/genericInstantiationEquivalentToObjectLiteral.types @@ -28,7 +28,7 @@ declare function f(x: Pair); >x : Pair declare function f2(x: { first: T; second: U; }); ->f2 : (x: { first: T; second: U;}) => any +>f2 : (x: { first: T; second: U; }) => any >x : { first: T; second: U; } >first : T >second : U diff --git a/tests/baselines/reference/genericInterfaceTypeCall.types b/tests/baselines/reference/genericInterfaceTypeCall.types index 0d7c655bb6fb7..5aebc69e82a82 100644 --- a/tests/baselines/reference/genericInterfaceTypeCall.types +++ b/tests/baselines/reference/genericInterfaceTypeCall.types @@ -16,7 +16,7 @@ interface bar { >arg : T fail2(func2: { (arg: T): void; }): void; ->fail2 : (func2: { (arg: T): void;}) => void +>fail2 : (func2: { (arg: T): void; }) => void >func2 : (arg: T) => void >arg : T } diff --git a/tests/baselines/reference/genericRestTypes.types b/tests/baselines/reference/genericRestTypes.types index c797411e0ad7d..0f16c5f5394fb 100644 --- a/tests/baselines/reference/genericRestTypes.types +++ b/tests/baselines/reference/genericRestTypes.types @@ -78,7 +78,7 @@ function assignmentWithComplexRest3() { >x : string const fn2: (...args: {x: "a"} & {x: "b"}) => void = fn1; ->fn2 : (...args: { x: "a";} & { x: "b";}) => void +>fn2 : (...args: { x: "a"; } & { x: "b"; }) => void >args : never >x : "a" >x : "b" diff --git a/tests/baselines/reference/genericSpecializationToTypeLiteral1.types b/tests/baselines/reference/genericSpecializationToTypeLiteral1.types index 29aef5e1af890..b7fa066e61627 100644 --- a/tests/baselines/reference/genericSpecializationToTypeLiteral1.types +++ b/tests/baselines/reference/genericSpecializationToTypeLiteral1.types @@ -89,7 +89,7 @@ interface IEnumerable { interface IDictionary { toEnumerable(): IEnumerable<{ key: TKey; value: TValue }>; ->toEnumerable : () => IEnumerable<{ key: TKey; value: TValue;}> +>toEnumerable : () => IEnumerable<{ key: TKey; value: TValue; }> >key : TKey >value : TValue } diff --git a/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.types b/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.types index 6d3f0fe040945..3dca31fec454d 100644 --- a/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.types +++ b/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.types @@ -3,7 +3,7 @@ === genericTypeWithNonGenericBaseMisMatch.ts === interface I { f: (a: { a: number }) => void ->f : (a: { a: number;}) => void +>f : (a: { a: number; }) => void >a : { a: number; } >a : number } diff --git a/tests/baselines/reference/generics2.types b/tests/baselines/reference/generics2.types index 6ec42e345e5ad..3663274459992 100644 --- a/tests/baselines/reference/generics2.types +++ b/tests/baselines/reference/generics2.types @@ -20,7 +20,7 @@ interface G { var v1: { ->v1 : { x: { a: string;}; y: { a: string; b: string; c: string;}; } +>v1 : { x: { a: string; }; y: { a: string; b: string; c: string; }; } x: { a: string; } >x : { a: string; } diff --git a/tests/baselines/reference/generics2NoError.types b/tests/baselines/reference/generics2NoError.types index 8e3aa5d7b44fb..9767df28587f5 100644 --- a/tests/baselines/reference/generics2NoError.types +++ b/tests/baselines/reference/generics2NoError.types @@ -20,7 +20,7 @@ interface G { var v1: { ->v1 : { x: { a: string;}; y: { a: string; b: string; c: string;}; } +>v1 : { x: { a: string; }; y: { a: string; b: string; c: string; }; } x: { a: string; } >x : { a: string; } diff --git a/tests/baselines/reference/homomorphicMappedTypeIntersectionAssignability.types b/tests/baselines/reference/homomorphicMappedTypeIntersectionAssignability.types index ef3c855812267..03d3b36dd2e28 100644 --- a/tests/baselines/reference/homomorphicMappedTypeIntersectionAssignability.types +++ b/tests/baselines/reference/homomorphicMappedTypeIntersectionAssignability.types @@ -2,7 +2,7 @@ === homomorphicMappedTypeIntersectionAssignability.ts === function f( ->f : (a: { weak?: string;} & Readonly & { name: "ok";}, b: Readonly, c: Readonly & { name: string;}) => void +>f : (a: { weak?: string; } & Readonly & { name: "ok"; }, b: Readonly, c: Readonly & { name: string; }) => void a: { weak?: string } & Readonly & { name: "ok" }, >a : { weak?: string | undefined; } & Readonly & { name: "ok"; } diff --git a/tests/baselines/reference/identityAndDivergentNormalizedTypes.types b/tests/baselines/reference/identityAndDivergentNormalizedTypes.types index ae62486c370fe..54b77510f25d3 100644 --- a/tests/baselines/reference/identityAndDivergentNormalizedTypes.types +++ b/tests/baselines/reference/identityAndDivergentNormalizedTypes.types @@ -4,7 +4,7 @@ // Repros from #53998 type ApiPost = ->ApiPost : { path: "/login"; body: {}; } | { path: "/user"; body: { name: string;}; } +>ApiPost : { path: "/login"; body: {}; } | { path: "/user"; body: { name: string; }; } | { path: "/login"; @@ -30,8 +30,8 @@ type PostBody = Extract["body"]; >path : PATH const post = ( ->post : (path: PATH, { body, ...options }: Omit & { body: PostBody;}) => void ->( path: PATH, {body, ...options}: Omit & {body: PostBody}) => {} : (path: PATH, { body, ...options }: Omit & { body: PostBody;}) => void +>post : (path: PATH, { body, ...options }: Omit & { body: PostBody; }) => void +>( path: PATH, {body, ...options}: Omit & {body: PostBody}) => {} : (path: PATH, { body, ...options }: Omit & { body: PostBody; }) => void path: PATH, >path : PATH @@ -64,7 +64,7 @@ const tmp = ( } function fx1

(x: { body: PostBody

}, y: { body: PostBody

}) { ->fx1 :

(x: { body: PostBody

;}, y: { body: PostBody

;}) => void +>fx1 :

(x: { body: PostBody

; }, y: { body: PostBody

; }) => void >x : { body: PostBody

; } >body : PostBody

>y : { body: PostBody

; } diff --git a/tests/baselines/reference/identityRelationNeverTypes.types b/tests/baselines/reference/identityRelationNeverTypes.types index 0d8222adc7349..acd34c2c96388 100644 --- a/tests/baselines/reference/identityRelationNeverTypes.types +++ b/tests/baselines/reference/identityRelationNeverTypes.types @@ -24,7 +24,7 @@ declare class State { } function f1(state: State<{ foo: number }>) { ->f1 : (state: State<{ foo: number;}>) => void +>f1 : (state: State<{ foo: number; }>) => void >state : State<{ foo: number; }> >foo : number diff --git a/tests/baselines/reference/illegalGenericWrapping1.types b/tests/baselines/reference/illegalGenericWrapping1.types index d15935bef60bb..771809d739640 100644 --- a/tests/baselines/reference/illegalGenericWrapping1.types +++ b/tests/baselines/reference/illegalGenericWrapping1.types @@ -18,7 +18,7 @@ interface Sequence { >value : T groupBy(keySelector: (value: T) => K): Sequence<{ key: K; items: Sequence; }>; ->groupBy : (keySelector: (value: T) => K) => Sequence<{ key: K; items: Sequence;}> +>groupBy : (keySelector: (value: T) => K) => Sequence<{ key: K; items: Sequence; }> >keySelector : (value: T) => K >value : T >key : K diff --git a/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.types b/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.types index 4492651611974..af8df155cf68d 100644 --- a/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.types +++ b/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.types @@ -36,7 +36,7 @@ function testFunctionExprC2(eq: (v1: any, v2: any) => number) { }; >v2 : any function testObjLiteral(objLit: { v: any; w: any }) { }; ->testObjLiteral : (objLit: { v: any; w: any;}) => void +>testObjLiteral : (objLit: { v: any; w: any; }) => void >objLit : { v: any; w: any; } >v : any >w : any diff --git a/tests/baselines/reference/implicitIndexSignatures.types b/tests/baselines/reference/implicitIndexSignatures.types index 52e94ad84278b..f0a157ae69c76 100644 --- a/tests/baselines/reference/implicitIndexSignatures.types +++ b/tests/baselines/reference/implicitIndexSignatures.types @@ -58,12 +58,12 @@ map = names2; >names2 : { a: string; b: string; } declare function getStringIndexValue(map: { [x: string]: T }): T; ->getStringIndexValue : (map: { [x: string]: T;}) => T +>getStringIndexValue : (map: { [x: string]: T; }) => T >map : { [x: string]: T; } >x : string declare function getNumberIndexValue(map: { [x: number]: T }): T; ->getNumberIndexValue : (map: { [x: number]: T;}) => T +>getNumberIndexValue : (map: { [x: number]: T; }) => T >map : { [x: number]: T; } >x : number diff --git a/tests/baselines/reference/inKeywordAndIntersection.types b/tests/baselines/reference/inKeywordAndIntersection.types index 826b26714a36f..5eb3098022eb9 100644 --- a/tests/baselines/reference/inKeywordAndIntersection.types +++ b/tests/baselines/reference/inKeywordAndIntersection.types @@ -12,7 +12,7 @@ class B { b = 0 } >0 : 0 function f10(obj: A & { x: string } | B) { ->f10 : (obj: (A & { x: string;}) | B) => void +>f10 : (obj: (A & { x: string; }) | B) => void >obj : B | (A & { x: string; }) >x : string diff --git a/tests/baselines/reference/inKeywordTypeguard(strict=false).types b/tests/baselines/reference/inKeywordTypeguard(strict=false).types index 2caf941dedaac..4e45d54f6feee 100644 --- a/tests/baselines/reference/inKeywordTypeguard(strict=false).types +++ b/tests/baselines/reference/inKeywordTypeguard(strict=false).types @@ -301,7 +301,7 @@ class UnreachableCodeDetection { } function positiveIntersectionTest(x: { a: string } & { b: string }) { ->positiveIntersectionTest : (x: { a: string;} & { b: string;}) => void +>positiveIntersectionTest : (x: { a: string; } & { b: string; }) => void >x : { a: string; } & { b: string; } >a : string >b : string @@ -342,7 +342,7 @@ if ('extra' in error) { } function narrowsToNever(x: { l: number } | { r: number }) { ->narrowsToNever : (x: { l: number;} | { r: number;}) => number +>narrowsToNever : (x: { l: number; } | { r: number; }) => number >x : { l: number; } | { r: number; } >l : number >r : number @@ -659,7 +659,7 @@ function f3(x: T) { } function f4(x: { a: string }) { ->f4 : (x: { a: string;}) => void +>f4 : (x: { a: string; }) => void >x : { a: string; } >a : string @@ -704,7 +704,7 @@ function f4(x: { a: string }) { } function f5(x: { a: string } | { b: string }) { ->f5 : (x: { a: string;} | { b: string;}) => void +>f5 : (x: { a: string; } | { b: string; }) => void >x : { a: string; } | { b: string; } >a : string >b : string @@ -732,7 +732,7 @@ function f5(x: { a: string } | { b: string }) { } function f6(x: { a: string } | { b: string }) { ->f6 : (x: { a: string;} | { b: string;}) => void +>f6 : (x: { a: string; } | { b: string; }) => void >x : { a: string; } | { b: string; } >a : string >b : string @@ -762,7 +762,7 @@ function f6(x: { a: string } | { b: string }) { // Object and corresponding intersection should narrow the same function f7(x: { a: string, b: number }, y: { a: string } & { b: number }) { ->f7 : (x: { a: string; b: number;}, y: { a: string;} & { b: number;}) => void +>f7 : (x: { a: string; b: number; }, y: { a: string; } & { b: number; }) => void >x : { a: string; b: number; } >a : string >b : number @@ -890,7 +890,7 @@ function f9(x: object) { } function f10(x: { a: unknown }) { ->f10 : (x: { a: unknown;}) => void +>f10 : (x: { a: unknown; }) => void >x : { a: unknown; } >a : unknown @@ -909,7 +909,7 @@ function f10(x: { a: unknown }) { } function f11(x: { a: any }) { ->f11 : (x: { a: any;}) => void +>f11 : (x: { a: any; }) => void >x : { a: any; } >a : any @@ -928,7 +928,7 @@ function f11(x: { a: any }) { } function f12(x: { a: string }) { ->f12 : (x: { a: string;}) => void +>f12 : (x: { a: string; }) => void >x : { a: string; } >a : string @@ -947,7 +947,7 @@ function f12(x: { a: string }) { } function f13(x: { a?: string }) { ->f13 : (x: { a?: string;}) => void +>f13 : (x: { a?: string; }) => void >x : { a?: string; } >a : string @@ -966,7 +966,7 @@ function f13(x: { a?: string }) { } function f14(x: { a: string | undefined }) { ->f14 : (x: { a: string | undefined;}) => void +>f14 : (x: { a: string | undefined; }) => void >x : { a: string | undefined; } >a : string @@ -985,7 +985,7 @@ function f14(x: { a: string | undefined }) { } function f15(x: { a?: string | undefined }) { ->f15 : (x: { a?: string | undefined;}) => void +>f15 : (x: { a?: string | undefined; }) => void >x : { a?: string | undefined; } >a : string diff --git a/tests/baselines/reference/inKeywordTypeguard(strict=true).types b/tests/baselines/reference/inKeywordTypeguard(strict=true).types index 09f2a5099fefb..374a82f140f4c 100644 --- a/tests/baselines/reference/inKeywordTypeguard(strict=true).types +++ b/tests/baselines/reference/inKeywordTypeguard(strict=true).types @@ -306,7 +306,7 @@ class UnreachableCodeDetection { } function positiveIntersectionTest(x: { a: string } & { b: string }) { ->positiveIntersectionTest : (x: { a: string;} & { b: string;}) => void +>positiveIntersectionTest : (x: { a: string; } & { b: string; }) => void >x : { a: string; } & { b: string; } >a : string >b : string @@ -347,7 +347,7 @@ if ('extra' in error) { } function narrowsToNever(x: { l: number } | { r: number }) { ->narrowsToNever : (x: { l: number;} | { r: number;}) => number +>narrowsToNever : (x: { l: number; } | { r: number; }) => number >x : { l: number; } | { r: number; } >l : number >r : number @@ -664,7 +664,7 @@ function f3(x: T) { } function f4(x: { a: string }) { ->f4 : (x: { a: string;}) => void +>f4 : (x: { a: string; }) => void >x : { a: string; } >a : string @@ -709,7 +709,7 @@ function f4(x: { a: string }) { } function f5(x: { a: string } | { b: string }) { ->f5 : (x: { a: string;} | { b: string;}) => void +>f5 : (x: { a: string; } | { b: string; }) => void >x : { a: string; } | { b: string; } >a : string >b : string @@ -737,7 +737,7 @@ function f5(x: { a: string } | { b: string }) { } function f6(x: { a: string } | { b: string }) { ->f6 : (x: { a: string;} | { b: string;}) => void +>f6 : (x: { a: string; } | { b: string; }) => void >x : { a: string; } | { b: string; } >a : string >b : string @@ -767,7 +767,7 @@ function f6(x: { a: string } | { b: string }) { // Object and corresponding intersection should narrow the same function f7(x: { a: string, b: number }, y: { a: string } & { b: number }) { ->f7 : (x: { a: string; b: number;}, y: { a: string;} & { b: number;}) => void +>f7 : (x: { a: string; b: number; }, y: { a: string; } & { b: number; }) => void >x : { a: string; b: number; } >a : string >b : number @@ -895,7 +895,7 @@ function f9(x: object) { } function f10(x: { a: unknown }) { ->f10 : (x: { a: unknown;}) => void +>f10 : (x: { a: unknown; }) => void >x : { a: unknown; } >a : unknown @@ -914,7 +914,7 @@ function f10(x: { a: unknown }) { } function f11(x: { a: any }) { ->f11 : (x: { a: any;}) => void +>f11 : (x: { a: any; }) => void >x : { a: any; } >a : any @@ -933,7 +933,7 @@ function f11(x: { a: any }) { } function f12(x: { a: string }) { ->f12 : (x: { a: string;}) => void +>f12 : (x: { a: string; }) => void >x : { a: string; } >a : string @@ -952,7 +952,7 @@ function f12(x: { a: string }) { } function f13(x: { a?: string }) { ->f13 : (x: { a?: string;}) => void +>f13 : (x: { a?: string; }) => void >x : { a?: string | undefined; } >a : string | undefined @@ -971,7 +971,7 @@ function f13(x: { a?: string }) { } function f14(x: { a: string | undefined }) { ->f14 : (x: { a: string | undefined;}) => void +>f14 : (x: { a: string | undefined; }) => void >x : { a: string | undefined; } >a : string | undefined @@ -990,7 +990,7 @@ function f14(x: { a: string | undefined }) { } function f15(x: { a?: string | undefined }) { ->f15 : (x: { a?: string | undefined;}) => void +>f15 : (x: { a?: string | undefined; }) => void >x : { a?: string | undefined; } >a : string | undefined diff --git a/tests/baselines/reference/incompatibleTypes.types b/tests/baselines/reference/incompatibleTypes.types index d6d115d5d9dd5..1069ddd88d0a3 100644 --- a/tests/baselines/reference/incompatibleTypes.types +++ b/tests/baselines/reference/incompatibleTypes.types @@ -49,7 +49,7 @@ class C3 implements IFoo3 { // incompatible on the property type interface IFoo4 { p1: { a: { a: string; }; b: string; }; ->p1 : { a: { a: string;}; b: string; } +>p1 : { a: { a: string; }; b: string; } >a : { a: string; } >a : string >b : string @@ -59,7 +59,7 @@ class C4 implements IFoo4 { // incompatible on the property type >C4 : C4 public p1: { c: { b: string; }; d: string; }; ->p1 : { c: { b: string;}; d: string; } +>p1 : { c: { b: string; }; d: string; } >c : { b: string; } >b : string >d : string @@ -90,15 +90,15 @@ if1(c1); function of1(n: { a: { a: string; }; b: string; }): number; ->of1 : { (n: { a: { a: string; }; b: string;}): number; (s: { c: { b: string; }; d: string; }): string; } ->n : { a: { a: string;}; b: string; } +>of1 : { (n: { a: { a: string; }; b: string; }): number; (s: { c: { b: string; }; d: string; }): string; } +>n : { a: { a: string; }; b: string; } >a : { a: string; } >a : string >b : string function of1(s: { c: { b: string; }; d: string; }): string; ->of1 : { (n: { a: { a: string; }; b: string; }): number; (s: { c: { b: string; }; d: string;}): string; } ->s : { c: { b: string;}; d: string; } +>of1 : { (n: { a: { a: string; }; b: string; }): number; (s: { c: { b: string; }; d: string; }): string; } +>s : { c: { b: string; }; d: string; } >c : { b: string; } >b : string >d : string @@ -147,7 +147,7 @@ function bar() { } var o1: { a: { a: string; }; b: string; } = { e: 0, f: 0 }; ->o1 : { a: { a: string;}; b: string; } +>o1 : { a: { a: string; }; b: string; } >a : { a: string; } >a : string >b : string diff --git a/tests/baselines/reference/indexSignatureAndMappedType.types b/tests/baselines/reference/indexSignatureAndMappedType.types index 6532f35075005..68995d70c54d5 100644 --- a/tests/baselines/reference/indexSignatureAndMappedType.types +++ b/tests/baselines/reference/indexSignatureAndMappedType.types @@ -5,7 +5,7 @@ // { [key: string]: Y } if X is related to Y. function f1(x: { [key: string]: T }, y: Record) { ->f1 : (x: { [key: string]: T;}, y: Record) => void +>f1 : (x: { [key: string]: T; }, y: Record) => void >x : { [key: string]: T; } >key : string >y : Record @@ -22,7 +22,7 @@ function f1(x: { [key: string]: T }, y: Record) { } function f2(x: { [key: string]: T }, y: Record) { ->f2 : (x: { [key: string]: T;}, y: Record) => void +>f2 : (x: { [key: string]: T; }, y: Record) => void >x : { [key: string]: T; } >key : string >y : Record @@ -39,7 +39,7 @@ function f2(x: { [key: string]: T }, y: Record) { } function f3(x: { [key: string]: T }, y: Record) { ->f3 : (x: { [key: string]: T;}, y: Record) => void +>f3 : (x: { [key: string]: T; }, y: Record) => void >x : { [key: string]: T; } >key : string >y : Record diff --git a/tests/baselines/reference/indexSignatureInOtherFile.types b/tests/baselines/reference/indexSignatureInOtherFile.types index ab455c9d99a84..60c37b32c897a 100644 --- a/tests/baselines/reference/indexSignatureInOtherFile.types +++ b/tests/baselines/reference/indexSignatureInOtherFile.types @@ -42,7 +42,7 @@ interface Array1 { * when they will be absent when used in a 'with' statement. */ [Symbol.unscopables](): { ->[Symbol.unscopables] : () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean;} +>[Symbol.unscopables] : () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; } >Symbol.unscopables : unique symbol >Symbol : SymbolConstructor >unscopables : unique symbol diff --git a/tests/baselines/reference/indexSignatureInOtherFile1.types b/tests/baselines/reference/indexSignatureInOtherFile1.types index 07348e7f37f74..1682f2752fb12 100644 --- a/tests/baselines/reference/indexSignatureInOtherFile1.types +++ b/tests/baselines/reference/indexSignatureInOtherFile1.types @@ -33,7 +33,7 @@ interface Array1 { * when they will be absent when used in a 'with' statement. */ [Symbol.unscopables](): { ->[Symbol.unscopables] : () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean;} +>[Symbol.unscopables] : () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; } >Symbol.unscopables : unique symbol >Symbol : SymbolConstructor >unscopables : unique symbol diff --git a/tests/baselines/reference/indexSignatureOfTypeUnknownStillRequiresIndexSignature.types b/tests/baselines/reference/indexSignatureOfTypeUnknownStillRequiresIndexSignature.types index 29879fc79cf3e..4761d930a15b0 100644 --- a/tests/baselines/reference/indexSignatureOfTypeUnknownStillRequiresIndexSignature.types +++ b/tests/baselines/reference/indexSignatureOfTypeUnknownStillRequiresIndexSignature.types @@ -2,7 +2,7 @@ === indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts === declare function f(x: { [x: string]: T }): T; ->f : (x: { [x: string]: T;}) => T +>f : (x: { [x: string]: T; }) => T >x : { [x: string]: T; } >x : string diff --git a/tests/baselines/reference/indexSignatures1.types b/tests/baselines/reference/indexSignatures1.types index fbc2477613b44..c5b8a0ea19b28 100644 --- a/tests/baselines/reference/indexSignatures1.types +++ b/tests/baselines/reference/indexSignatures1.types @@ -9,7 +9,7 @@ const sym = Symbol(); >Symbol : SymbolConstructor function gg3(x: { [key: string]: string }, y: { [key: symbol]: string }, z: { [sym]: number }) { ->gg3 : (x: { [key: string]: string;}, y: { [key: symbol]: string;}, z: { [sym]: number;}) => void +>gg3 : (x: { [key: string]: string; }, y: { [key: symbol]: string; }, z: { [sym]: number; }) => void >x : { [key: string]: string; } >key : string >y : { [key: symbol]: string; } @@ -32,7 +32,7 @@ function gg3(x: { [key: string]: string }, y: { [key: symbol]: string }, z: { [s // Overlapping index signatures function gg1(x: { [key: `a${string}`]: string, [key: `${string}a`]: string }, y: { [key: `a${string}a`]: string }) { ->gg1 : (x: { [key: `a${string}`]: string; [key: `${string}a`]: string;}, y: { [key: `a${string}a`]: string;}) => void +>gg1 : (x: { [key: `a${string}`]: string; [key: `${string}a`]: string; }, y: { [key: `a${string}a`]: string; }) => void >x : { [key: `a${string}`]: string; [key: `${string}a`]: string; } >key : `a${string}` >key : `${string}a` @@ -849,7 +849,7 @@ const directive = Symbol('directive'); >'directive' : "directive" declare function foo(options: { [x in string]: (arg: TArg) => TRet } & { [directive]?: TDir }): void; ->foo : (options: { [x in string]: (arg: TArg) => TRet;} & { [directive]?: TDir;}) => void +>foo : (options: { [x in string]: (arg: TArg) => TRet; } & { [directive]?: TDir; }) => void >options : { [x: string]: (arg: TArg) => TRet; } & { [directive]?: TDir | undefined; } >arg : TArg >[directive] : TDir | undefined diff --git a/tests/baselines/reference/indexSignaturesInferentialTyping.types b/tests/baselines/reference/indexSignaturesInferentialTyping.types index f853b4490ddbf..9d5d0be42c466 100644 --- a/tests/baselines/reference/indexSignaturesInferentialTyping.types +++ b/tests/baselines/reference/indexSignaturesInferentialTyping.types @@ -2,13 +2,13 @@ === indexSignaturesInferentialTyping.ts === function foo(items: { [index: number]: T }): T { return undefined; } ->foo : (items: { [index: number]: T;}) => T +>foo : (items: { [index: number]: T; }) => T >items : { [index: number]: T; } >index : number >undefined : undefined function bar(items: { [index: string]: T }): T { return undefined; } ->bar : (items: { [index: string]: T;}) => T +>bar : (items: { [index: string]: T; }) => T >items : { [index: string]: T; } >index : string >undefined : undefined diff --git a/tests/baselines/reference/indexedAccessNormalization.types b/tests/baselines/reference/indexedAccessNormalization.types index 2f193ea948877..92ab8918290d4 100644 --- a/tests/baselines/reference/indexedAccessNormalization.types +++ b/tests/baselines/reference/indexedAccessNormalization.types @@ -34,7 +34,7 @@ function f1(mymap: MyMap, k: keyof M) { } function f2(mymap: MyMap, k: keyof M, z: { x: number }) { ->f2 : (mymap: MyMap, k: keyof M, z: { x: number;}) => void +>f2 : (mymap: MyMap, k: keyof M, z: { x: number; }) => void >mymap : MyMap >k : keyof M >z : { x: number; } diff --git a/tests/baselines/reference/indexerReturningTypeParameter1.types b/tests/baselines/reference/indexerReturningTypeParameter1.types index ddc46141f0611..d691d27c4dd43 100644 --- a/tests/baselines/reference/indexerReturningTypeParameter1.types +++ b/tests/baselines/reference/indexerReturningTypeParameter1.types @@ -3,7 +3,7 @@ === indexerReturningTypeParameter1.ts === interface f { groupBy(): { [key: string]: T[]; }; ->groupBy : () => { [key: string]: T[];} +>groupBy : () => { [key: string]: T[]; } >key : string } var a: f; @@ -20,7 +20,7 @@ class c { >c : c groupBy(): { [key: string]: T[]; } { ->groupBy : () => { [key: string]: T[];} +>groupBy : () => { [key: string]: T[]; } >key : string return null; diff --git a/tests/baselines/reference/indirectTypeParameterReferences.types b/tests/baselines/reference/indirectTypeParameterReferences.types index fbe1810e9b8d4..b4766ff8ba1e5 100644 --- a/tests/baselines/reference/indirectTypeParameterReferences.types +++ b/tests/baselines/reference/indirectTypeParameterReferences.types @@ -82,7 +82,7 @@ combined(comb => { // Repro from #19091 declare function f(a: T): { a: typeof a }; ->f : (a: T) => { a: typeof a;} +>f : (a: T) => { a: typeof a; } >a : T >a : T >a : T diff --git a/tests/baselines/reference/inferFromBindingPattern.types b/tests/baselines/reference/inferFromBindingPattern.types index f26a23bdb21e5..561eab8669347 100644 --- a/tests/baselines/reference/inferFromBindingPattern.types +++ b/tests/baselines/reference/inferFromBindingPattern.types @@ -8,7 +8,7 @@ declare function f2(): [T]; >f2 : () => [T] declare function f3(): { x: T }; ->f3 : () => { x: T;} +>f3 : () => { x: T; } >x : T let x1 = f1(); // string diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types b/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types index 5d84cf56eae6f..7d001af103620 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types @@ -522,7 +522,7 @@ class ClassWithConvert { >val : T convert(converter: { to: (v: T) => T; }) { } ->convert : (converter: { to: (v: T) => T;}) => void +>convert : (converter: { to: (v: T) => T; }) => void >converter : { to: (v: T) => T; } >to : (v: T) => T >v : T diff --git a/tests/baselines/reference/inferPropertyWithContextSensitiveReturnStatement.types b/tests/baselines/reference/inferPropertyWithContextSensitiveReturnStatement.types index 2a4fe954e188e..fdf38766558b9 100644 --- a/tests/baselines/reference/inferPropertyWithContextSensitiveReturnStatement.types +++ b/tests/baselines/reference/inferPropertyWithContextSensitiveReturnStatement.types @@ -4,7 +4,7 @@ // repro #50687 declare function repro(config: { ->repro : (config: { params: T; callback: () => (params: T) => number;}) => void +>repro : (config: { params: T; callback: () => (params: T) => number; }) => void >config : { params: T; callback: () => (params: T) => number; } params: T; diff --git a/tests/baselines/reference/inferStringLiteralUnionForBindingElement.types b/tests/baselines/reference/inferStringLiteralUnionForBindingElement.types index 4e464967370f8..62791e24a6d52 100644 --- a/tests/baselines/reference/inferStringLiteralUnionForBindingElement.types +++ b/tests/baselines/reference/inferStringLiteralUnionForBindingElement.types @@ -2,7 +2,7 @@ === inferStringLiteralUnionForBindingElement.ts === declare function func(arg: { keys: T[] }): { readonly keys: T[]; readonly firstKey: T; }; ->func : (arg: { keys: T[];}) => { readonly keys: T[]; readonly firstKey: T;} +>func : (arg: { keys: T[]; }) => { readonly keys: T[]; readonly firstKey: T; } >arg : { keys: T[]; } >keys : T[] >keys : T[] diff --git a/tests/baselines/reference/inferTypePredicates.types b/tests/baselines/reference/inferTypePredicates.types index 13431aa13037d..1d02f077921bc 100644 --- a/tests/baselines/reference/inferTypePredicates.types +++ b/tests/baselines/reference/inferTypePredicates.types @@ -778,7 +778,7 @@ if (c.isC2()) { } function doNotRefineDestructuredParam({x, y}: {x: number | null, y: number}) { ->doNotRefineDestructuredParam : ({ x, y }: { x: number | null; y: number;}) => boolean +>doNotRefineDestructuredParam : ({ x, y }: { x: number | null; y: number; }) => boolean >x : number | null >y : number >x : number | null diff --git a/tests/baselines/reference/inferTypes1.types b/tests/baselines/reference/inferTypes1.types index 3ce2bf2dd5011..e6c6e495bb9a3 100644 --- a/tests/baselines/reference/inferTypes1.types +++ b/tests/baselines/reference/inferTypes1.types @@ -335,7 +335,7 @@ type Jsonified = : "what is this"; type Example = { ->Example : { str: "literalstring"; fn: () => void; date: Date; customClass: MyClass; obj: { prop: "property"; clz: MyClass; nested: { attr: Date; };}; } +>Example : { str: "literalstring"; fn: () => void; date: Date; customClass: MyClass; obj: { prop: "property"; clz: MyClass; nested: { attr: Date; }; }; } str: "literalstring", >str : "literalstring" @@ -350,7 +350,7 @@ type Example = { >customClass : MyClass obj: { ->obj : { prop: "property"; clz: MyClass; nested: { attr: Date;}; } +>obj : { prop: "property"; clz: MyClass; nested: { attr: Date; }; } prop: "property", >prop : "property" diff --git a/tests/baselines/reference/inferenceOptionalProperties.types b/tests/baselines/reference/inferenceOptionalProperties.types index 23c6edc450770..a31c9c350bf7c 100644 --- a/tests/baselines/reference/inferenceOptionalProperties.types +++ b/tests/baselines/reference/inferenceOptionalProperties.types @@ -2,7 +2,7 @@ === inferenceOptionalProperties.ts === declare function test(x: { [key: string]: T }): T; ->test : (x: { [key: string]: T;}) => T +>test : (x: { [key: string]: T; }) => T >x : { [key: string]: T; } >key : string diff --git a/tests/baselines/reference/inferenceOptionalPropertiesStrict.types b/tests/baselines/reference/inferenceOptionalPropertiesStrict.types index 01cca0a641f6b..0e42a10b2a432 100644 --- a/tests/baselines/reference/inferenceOptionalPropertiesStrict.types +++ b/tests/baselines/reference/inferenceOptionalPropertiesStrict.types @@ -2,7 +2,7 @@ === inferenceOptionalPropertiesStrict.ts === declare function test(x: { [key: string]: T }): T; ->test : (x: { [key: string]: T;}) => T +>test : (x: { [key: string]: T; }) => T >x : { [key: string]: T; } >key : string diff --git a/tests/baselines/reference/inferenceOptionalPropertiesToIndexSignatures.types b/tests/baselines/reference/inferenceOptionalPropertiesToIndexSignatures.types index e018bf014d15f..d882f908a34b2 100644 --- a/tests/baselines/reference/inferenceOptionalPropertiesToIndexSignatures.types +++ b/tests/baselines/reference/inferenceOptionalPropertiesToIndexSignatures.types @@ -2,7 +2,7 @@ === inferenceOptionalPropertiesToIndexSignatures.ts === declare function foo(obj: { [x: string]: T }): T; ->foo : (obj: { [x: string]: T;}) => T +>foo : (obj: { [x: string]: T; }) => T >obj : { [x: string]: T; } >x : string diff --git a/tests/baselines/reference/inferenceShouldFailOnEvolvingArrays.types b/tests/baselines/reference/inferenceShouldFailOnEvolvingArrays.types index 8414f53f51e91..f49245a49e12b 100644 --- a/tests/baselines/reference/inferenceShouldFailOnEvolvingArrays.types +++ b/tests/baselines/reference/inferenceShouldFailOnEvolvingArrays.types @@ -4,7 +4,7 @@ // repro from https://github.com/Microsoft/TypeScript/issues/25675 // The type of `arg` blocks inference but simplifies to T. function logLength(arg: { [K in U]: T }[U]): T { ->logLength : (arg: { [K in U]: T;}[U]) => T +>logLength : (arg: { [K in U]: T; }[U]) => T >arg : { [K in U]: T; }[U] console.log(arg.length); @@ -35,7 +35,7 @@ z = logLength(42); // no error; T is inferred as `any` >42 : 42 function logFirstLength(arg: { [K in U]: T }[U]): T { ->logFirstLength : (arg: { [K in U]: T;}[U]) => T +>logFirstLength : (arg: { [K in U]: T; }[U]) => T >arg : { [K in U]: T; }[U] console.log(arg[0].length); diff --git a/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.types b/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.types index 22f16e3857501..a6f8ee49178b9 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.types +++ b/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.types @@ -2,9 +2,9 @@ === inferentialTypingWithFunctionTypeNested.ts === declare function map(x: T, f: () => { x: (s: T) => U }): U; ->map : (x: T, f: () => { x: (s: T) => U;}) => U +>map : (x: T, f: () => { x: (s: T) => U; }) => U >x : T ->f : () => { x: (s: T) => U;} +>f : () => { x: (s: T) => U; } >x : (s: T) => U >s : T diff --git a/tests/baselines/reference/inferentialTypingWithFunctionTypeZip.types b/tests/baselines/reference/inferentialTypingWithFunctionTypeZip.types index b3f36c1eb9ae2..6f6794341460c 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionTypeZip.types +++ b/tests/baselines/reference/inferentialTypingWithFunctionTypeZip.types @@ -2,7 +2,7 @@ === inferentialTypingWithFunctionTypeZip.ts === var pair: (x: T) => (y: S) => { x: T; y: S; } ->pair : (x: T) => (y: S) => { x: T; y: S;} +>pair : (x: T) => (y: S) => { x: T; y: S; } >x : T >y : S >x : T diff --git a/tests/baselines/reference/inferingFromAny.types b/tests/baselines/reference/inferingFromAny.types index 83c1e675d8b80..25865a3c71bc7 100644 --- a/tests/baselines/reference/inferingFromAny.types +++ b/tests/baselines/reference/inferingFromAny.types @@ -20,7 +20,7 @@ declare function f3(t: [T, U]): [T, U]; >t : [T, U] declare function f4(x: { bar: T; baz: T }): T; ->f4 : (x: { bar: T; baz: T;}) => T +>f4 : (x: { bar: T; baz: T; }) => T >x : { bar: T; baz: T; } >bar : T >baz : T @@ -49,12 +49,12 @@ declare function f9(x: new () => T): T; >x : new () => T declare function f10(x: { [x: string]: T }): T; ->f10 : (x: { [x: string]: T;}) => T +>f10 : (x: { [x: string]: T; }) => T >x : { [x: string]: T; } >x : string declare function f11(x: { [x: number]: T }): T; ->f11 : (x: { [x: number]: T;}) => T +>f11 : (x: { [x: number]: T; }) => T >x : { [x: number]: T; } >x : number @@ -67,7 +67,7 @@ declare function f13(x: T & U): [T, U]; >x : T & U declare function f14(x: { a: T | U, b: U & T }): [T, U]; ->f14 : (x: { a: T | U; b: U & T;}) => [T, U] +>f14 : (x: { a: T | U; b: U & T; }) => [T, U] >x : { a: T | U; b: U & T; } >a : T | U >b : U & T @@ -82,7 +82,7 @@ declare function f16(x: Partial): T; >x : Partial declare function f17(x: {[P in keyof T]: K}): T; ->f17 : (x: { [P in keyof T]: K;}) => T +>f17 : (x: { [P in keyof T]: K; }) => T >x : { [P in keyof T]: K; } declare function f18(x: {[P in K]: T[P]}): T; diff --git a/tests/baselines/reference/inferredIndexerOnNamespaceImport.types b/tests/baselines/reference/inferredIndexerOnNamespaceImport.types index 61f3989968ca6..1935a3a7c1f3e 100644 --- a/tests/baselines/reference/inferredIndexerOnNamespaceImport.types +++ b/tests/baselines/reference/inferredIndexerOnNamespaceImport.types @@ -14,7 +14,7 @@ import * as foo from "./foo"; >foo : typeof foo function f(map: { [k: string]: number }) { ->f : (map: { [k: string]: number;}) => void +>f : (map: { [k: string]: number; }) => void >map : { [k: string]: number; } >k : string diff --git a/tests/baselines/reference/inferrenceInfiniteLoopWithSubtyping.types b/tests/baselines/reference/inferrenceInfiniteLoopWithSubtyping.types index 3bb85736896c4..641d13a295c3e 100644 --- a/tests/baselines/reference/inferrenceInfiniteLoopWithSubtyping.types +++ b/tests/baselines/reference/inferrenceInfiniteLoopWithSubtyping.types @@ -15,7 +15,7 @@ export class EnumTypeComposer { >EnumTypeComposer : EnumTypeComposer public setFields(fields: { [name: string]: { [key: string]: any } }): this; ->setFields : (fields: { [name: string]: { [key: string]: any; };}) => this +>setFields : (fields: { [name: string]: { [key: string]: any; }; }) => this >fields : { [name: string]: { [key: string]: any; }; } >name : string >key : string @@ -29,7 +29,7 @@ export class ObjectTypeComposer { >fields : Readonly<{ [key: string]: Readonly; }> public addResolver(opts: { type?: Thunk }): this; ->addResolver : (opts: { type?: Thunk;}) => this +>addResolver : (opts: { type?: Thunk; }) => this >opts : { type?: Thunk; } >type : Thunk } @@ -38,10 +38,10 @@ export class Resolver { >Resolver : Resolver public wrapArgs( ->wrapArgs : (cb: () => { [argName: string]: Thunk>;}) => void +>wrapArgs : (cb: () => { [argName: string]: Thunk>; }) => void cb: () => { ->cb : () => { [argName: string]: Thunk>;} +>cb : () => { [argName: string]: Thunk>; } [argName: string]: Thunk>; >argName : string diff --git a/tests/baselines/reference/infinitelyGenerativeInheritance1.types b/tests/baselines/reference/infinitelyGenerativeInheritance1.types index d5648736876e9..6edb4c4dd71ae 100644 --- a/tests/baselines/reference/infinitelyGenerativeInheritance1.types +++ b/tests/baselines/reference/infinitelyGenerativeInheritance1.types @@ -6,7 +6,7 @@ interface Stack { >pop : () => T zip(a: Stack): Stack<{ x: T; y: S }> ->zip : (a: Stack) => Stack<{ x: T; y: S;}> +>zip : (a: Stack) => Stack<{ x: T; y: S; }> >a : Stack >x : T >y : S @@ -14,7 +14,7 @@ interface Stack { interface MyStack extends Stack { zip(a: Stack): Stack<{ x: T; y: S }> ->zip : (a: Stack) => Stack<{ x: T; y: S;}> +>zip : (a: Stack) => Stack<{ x: T; y: S; }> >a : Stack >x : T >y : S diff --git a/tests/baselines/reference/initializedParameterBeforeNonoptionalNotOptional.types b/tests/baselines/reference/initializedParameterBeforeNonoptionalNotOptional.types index 9ff3182564335..c799bb6099262 100644 --- a/tests/baselines/reference/initializedParameterBeforeNonoptionalNotOptional.types +++ b/tests/baselines/reference/initializedParameterBeforeNonoptionalNotOptional.types @@ -2,7 +2,7 @@ === index.d.ts === export declare function foo({a}?: { ->foo : ({ a }?: { a?: string;}) => void +>foo : ({ a }?: { a?: string; }) => void >a : string | undefined a?: string; @@ -10,7 +10,7 @@ export declare function foo({a}?: { }): void; export declare function foo2({a}: { ->foo2 : ({ a }: { a?: string | undefined;} | undefined, b: string) => void +>foo2 : ({ a }: { a?: string | undefined; } | undefined, b: string) => void >a : string | undefined a?: string | undefined; @@ -20,7 +20,7 @@ export declare function foo2({a}: { >b : string export declare function foo3({a, b: {c}}: { ->foo3 : ({ a, b: { c } }: { a?: string | undefined; b?: { c?: string | undefined; } | undefined;} | undefined, b: string) => void +>foo3 : ({ a, b: { c } }: { a?: string | undefined; b?: { c?: string | undefined; } | undefined; } | undefined, b: string) => void >a : string | undefined >b : any >c : string | undefined diff --git a/tests/baselines/reference/inlineJsxFactoryDeclarationsLocalTypes.types b/tests/baselines/reference/inlineJsxFactoryDeclarationsLocalTypes.types index ab6f30848c0fd..45ab5b84efd02 100644 --- a/tests/baselines/reference/inlineJsxFactoryDeclarationsLocalTypes.types +++ b/tests/baselines/reference/inlineJsxFactoryDeclarationsLocalTypes.types @@ -76,8 +76,8 @@ import { predom } from "./renderer2" >predom : () => predom.JSX.Element export const MySFC = (props: {x: number, y: number, children?: predom.JSX.Element[]}) =>

{props.x} + {props.y} = {props.x + props.y}{...this.props.children}

; ->MySFC : (props: { x: number; y: number; children?: predom.JSX.Element[];}) => predom.JSX.Element ->(props: {x: number, y: number, children?: predom.JSX.Element[]}) =>

{props.x} + {props.y} = {props.x + props.y}{...this.props.children}

: (props: { x: number; y: number; children?: predom.JSX.Element[];}) => predom.JSX.Element +>MySFC : (props: { x: number; y: number; children?: predom.JSX.Element[]; }) => predom.JSX.Element +>(props: {x: number, y: number, children?: predom.JSX.Element[]}) =>

{props.x} + {props.y} = {props.x + props.y}{...this.props.children}

: (props: { x: number; y: number; children?: predom.JSX.Element[]; }) => predom.JSX.Element >props : { x: number; y: number; children?: predom.JSX.Element[]; } >x : number >y : number @@ -214,8 +214,8 @@ elem = ; // Expect assignability error here >h : any const DOMSFC = (props: {x: number, y: number, children?: dom.JSX.Element[]}) =>

{props.x} + {props.y} = {props.x + props.y}{props.children}

; ->DOMSFC : (props: { x: number; y: number; children?: dom.JSX.Element[];}) => dom.JSX.Element ->(props: {x: number, y: number, children?: dom.JSX.Element[]}) =>

{props.x} + {props.y} = {props.x + props.y}{props.children}

: (props: { x: number; y: number; children?: dom.JSX.Element[];}) => dom.JSX.Element +>DOMSFC : (props: { x: number; y: number; children?: dom.JSX.Element[]; }) => dom.JSX.Element +>(props: {x: number, y: number, children?: dom.JSX.Element[]}) =>

{props.x} + {props.y} = {props.x + props.y}{props.children}

: (props: { x: number; y: number; children?: dom.JSX.Element[]; }) => dom.JSX.Element >props : { x: number; y: number; children?: dom.JSX.Element[]; } >x : number >y : number diff --git a/tests/baselines/reference/instanceofOperatorWithInvalidOperands.es2015.types b/tests/baselines/reference/instanceofOperatorWithInvalidOperands.es2015.types index 480c5e6f1f182..0a4a7eb374d33 100644 --- a/tests/baselines/reference/instanceofOperatorWithInvalidOperands.es2015.types +++ b/tests/baselines/reference/instanceofOperatorWithInvalidOperands.es2015.types @@ -170,8 +170,8 @@ var rc1 = '' instanceof {}; // @@hasInstance restricts LHS var o4: {[Symbol.hasInstance](value: { x: number }): boolean;}; ->o4 : { [Symbol.hasInstance](value: { x: number;}): boolean; } ->[Symbol.hasInstance] : (value: { x: number;}) => boolean +>o4 : { [Symbol.hasInstance](value: { x: number; }): boolean; } +>[Symbol.hasInstance] : (value: { x: number; }) => boolean >Symbol.hasInstance : unique symbol >Symbol : SymbolConstructor >hasInstance : unique symbol diff --git a/tests/baselines/reference/instantiationExpressions.types b/tests/baselines/reference/instantiationExpressions.types index 33c9224acc42b..e4173daa21660 100644 --- a/tests/baselines/reference/instantiationExpressions.types +++ b/tests/baselines/reference/instantiationExpressions.types @@ -151,7 +151,7 @@ function f12(f: { (a: T): T, x: string }) { } function f13(f: { x: string, y: string }) { ->f13 : (f: { x: string; y: string;}) => void +>f13 : (f: { x: string; y: string; }) => void >f : { x: string; y: string; } >x : string >y : string @@ -253,7 +253,7 @@ function f22(f: ((a: T) => T) & { x: string }) { } function f23(f: { x: string } & { y: string }) { ->f23 : (f: { x: string;} & { y: string;}) => void +>f23 : (f: { x: string; } & { y: string; }) => void >f : { x: string; } & { y: string; } >x : string >y : string @@ -355,7 +355,7 @@ function f32(f: ((a: T) => T) | { x: string }) { } function f33(f: { x: string } | { y: string }) { ->f33 : (f: { x: string;} | { y: string;}) => void +>f33 : (f: { x: string; } | { y: string; }) => void >f : { x: string; } | { y: string; } >x : string >y : string @@ -459,7 +459,7 @@ type A = InstanceType>; // U[] >Array : ArrayConstructor declare const g1: { ->g1 : { (a: T): { a: T;}; new (b: U): { b: U;}; } +>g1 : { (a: T): { a: T; }; new (b: U): { b: U; }; } (a: T): { a: T }; >a : T diff --git a/tests/baselines/reference/interfaceExtendsObjectIntersection.types b/tests/baselines/reference/interfaceExtendsObjectIntersection.types index c9aafc87a2100..4a22f4495681a 100644 --- a/tests/baselines/reference/interfaceExtendsObjectIntersection.types +++ b/tests/baselines/reference/interfaceExtendsObjectIntersection.types @@ -13,7 +13,7 @@ type T3 = () => void; >T3 : () => void type T4 = new () => { a: number }; ->T4 : new () => { a: number;} +>T4 : new () => { a: number; } >a : number type T5 = number[]; diff --git a/tests/baselines/reference/interfaceImplementation7.types b/tests/baselines/reference/interfaceImplementation7.types index b066ef8420272..c2ed1ac87c81a 100644 --- a/tests/baselines/reference/interfaceImplementation7.types +++ b/tests/baselines/reference/interfaceImplementation7.types @@ -2,16 +2,16 @@ === interfaceImplementation7.ts === interface i1{ name(): { s: string; }; } ->name : () => { s: string;} +>name : () => { s: string; } >s : string interface i2{ name(): { n: number; }; } ->name : () => { n: number;} +>name : () => { n: number; } >n : number interface i3 extends i1, i2 { } interface i4 extends i1, i2 { name(): { s: string; n: number; }; } ->name : () => { s: string; n: number;} +>name : () => { s: string; n: number; } >s : string >n : number diff --git a/tests/baselines/reference/interfacePropertiesWithSameName1.types b/tests/baselines/reference/interfacePropertiesWithSameName1.types index ddd240c27afc6..7fffcce7a4d16 100644 --- a/tests/baselines/reference/interfacePropertiesWithSameName1.types +++ b/tests/baselines/reference/interfacePropertiesWithSameName1.types @@ -6,7 +6,7 @@ interface Mover { >move : () => void getStatus(): { speed: number; }; ->getStatus : () => { speed: number;} +>getStatus : () => { speed: number; } >speed : number } interface Shaker { @@ -14,13 +14,13 @@ interface Shaker { >shake : () => void getStatus(): { frequency: number; }; ->getStatus : () => { frequency: number;} +>getStatus : () => { frequency: number; } >frequency : number } interface MoverShaker extends Mover, Shaker { getStatus(): { speed: number; frequency: number; }; ->getStatus : () => { speed: number; frequency: number;} +>getStatus : () => { speed: number; frequency: number; } >speed : number >frequency : number } diff --git a/tests/baselines/reference/interfacePropertiesWithSameName2.types b/tests/baselines/reference/interfacePropertiesWithSameName2.types index 5eaffb4b5a625..aed46bf9b66fc 100644 --- a/tests/baselines/reference/interfacePropertiesWithSameName2.types +++ b/tests/baselines/reference/interfacePropertiesWithSameName2.types @@ -6,7 +6,7 @@ interface Mover { >move : () => void getStatus(): { speed: number; }; ->getStatus : () => { speed: number;} +>getStatus : () => { speed: number; } >speed : number } interface Shaker { @@ -14,7 +14,7 @@ interface Shaker { >shake : () => void getStatus(): { frequency: number; }; ->getStatus : () => { frequency: number;} +>getStatus : () => { frequency: number; } >frequency : number } @@ -33,7 +33,7 @@ declare module MoversAndShakers { >move : () => void getStatus(): { speed: number; }; ->getStatus : () => { speed: number;} +>getStatus : () => { speed: number; } >speed : number } export interface Shaker { @@ -41,7 +41,7 @@ declare module MoversAndShakers { >shake : () => void getStatus(): { frequency: number; }; ->getStatus : () => { frequency: number;} +>getStatus : () => { frequency: number; } >frequency : number } } @@ -55,7 +55,7 @@ interface MoverShaker3 extends MoversAndShakers.Mover, MoversAndShakers.Shaker { >MoversAndShakers : typeof MoversAndShakers getStatus(): { speed: number; frequency: number; }; // ok because this getStatus overrides the conflicting ones above ->getStatus : () => { speed: number; frequency: number;} +>getStatus : () => { speed: number; frequency: number; } >speed : number >frequency : number } diff --git a/tests/baselines/reference/intersectionOfTypeVariableHasApparentSignatures.types b/tests/baselines/reference/intersectionOfTypeVariableHasApparentSignatures.types index 10dfc1475f8be..eac90849028e0 100644 --- a/tests/baselines/reference/intersectionOfTypeVariableHasApparentSignatures.types +++ b/tests/baselines/reference/intersectionOfTypeVariableHasApparentSignatures.types @@ -9,7 +9,7 @@ interface Component

{ interface Props { children?: (items: {x: number}) => void ->children : ((items: { x: number;}) => void) | undefined +>children : ((items: { x: number; }) => void) | undefined >items : { x: number; } >x : number } diff --git a/tests/baselines/reference/intersectionPropertyCheck.types b/tests/baselines/reference/intersectionPropertyCheck.types index a1a5a810641ea..11141b0a6e6d8 100644 --- a/tests/baselines/reference/intersectionPropertyCheck.types +++ b/tests/baselines/reference/intersectionPropertyCheck.types @@ -2,7 +2,7 @@ === intersectionPropertyCheck.ts === let obj: { a: { x: string } } & { c: number } = { a: { x: 'hello', y: 2 }, c: 5 }; // Nested excess property ->obj : { a: { x: string;}; } & { c: number; } +>obj : { a: { x: string; }; } & { c: number; } >a : { x: string; } >x : string >c : number @@ -17,7 +17,7 @@ let obj: { a: { x: string } } & { c: number } = { a: { x: 'hello', y: 2 }, c: 5 >5 : 5 declare let wrong: { a: { y: string } }; ->wrong : { a: { y: string;}; } +>wrong : { a: { y: string; }; } >a : { y: string; } >y : string @@ -29,7 +29,7 @@ let weak: { a?: { x?: number } } & { c?: string } = wrong; // Nested weak objec >wrong : { a: { y: string; }; } function foo(x: { a?: string }, y: T & { a: boolean }) { ->foo : (x: { a?: string;}, y: T & { a: boolean;}) => void +>foo : (x: { a?: string; }, y: T & { a: boolean; }) => void >x : { a?: string | undefined; } >a : string | undefined >y : T & { a: boolean; } diff --git a/tests/baselines/reference/intersectionReduction.types b/tests/baselines/reference/intersectionReduction.types index 826520f232e1f..bd7ca085be0e0 100644 --- a/tests/baselines/reference/intersectionReduction.types +++ b/tests/baselines/reference/intersectionReduction.types @@ -183,7 +183,7 @@ type E = { kind: 'e', foo: unknown }; >foo : unknown declare function f10(x: { foo: T }): T; ->f10 : (x: { foo: T;}) => T +>f10 : (x: { foo: T; }) => T >x : { foo: T; } >foo : T @@ -302,15 +302,15 @@ const f2 = (t: Container<"a"> | (Container<"b"> & Container<"c">)): Container<"a >t : Container<"a"> const f3 = (t: Container<"a"> | (Container<"b"> & { dataB: boolean } & Container<"a">)): Container<"a"> => t; ->f3 : (t: Container<"a"> | (Container<"b"> & { dataB: boolean;} & Container<"a">)) => Container<"a"> ->(t: Container<"a"> | (Container<"b"> & { dataB: boolean } & Container<"a">)): Container<"a"> => t : (t: Container<"a"> | (Container<"b"> & { dataB: boolean;} & Container<"a">)) => Container<"a"> +>f3 : (t: Container<"a"> | (Container<"b"> & { dataB: boolean; } & Container<"a">)) => Container<"a"> +>(t: Container<"a"> | (Container<"b"> & { dataB: boolean } & Container<"a">)): Container<"a"> => t : (t: Container<"a"> | (Container<"b"> & { dataB: boolean; } & Container<"a">)) => Container<"a"> >t : Container<"a"> >dataB : boolean >t : Container<"a"> const f4 = (t: number | (Container<"b"> & { dataB: boolean } & Container<"a">)): number => t; ->f4 : (t: number | (Container<"b"> & { dataB: boolean;} & Container<"a">)) => number ->(t: number | (Container<"b"> & { dataB: boolean } & Container<"a">)): number => t : (t: number | (Container<"b"> & { dataB: boolean;} & Container<"a">)) => number +>f4 : (t: number | (Container<"b"> & { dataB: boolean; } & Container<"a">)) => number +>(t: number | (Container<"b"> & { dataB: boolean } & Container<"a">)): number => t : (t: number | (Container<"b"> & { dataB: boolean; } & Container<"a">)) => number >t : number >dataB : boolean >t : number diff --git a/tests/baselines/reference/intersectionReductionStrict.types b/tests/baselines/reference/intersectionReductionStrict.types index 08f6c45beed79..63a313a7357d9 100644 --- a/tests/baselines/reference/intersectionReductionStrict.types +++ b/tests/baselines/reference/intersectionReductionStrict.types @@ -269,15 +269,15 @@ const f2 = (t: Container<"a"> | (Container<"b"> & Container<"c">)): Container<"a >t : Container<"a"> const f3 = (t: Container<"a"> | (Container<"b"> & { dataB: boolean } & Container<"a">)): Container<"a"> => t; ->f3 : (t: Container<"a"> | (Container<"b"> & { dataB: boolean;} & Container<"a">)) => Container<"a"> ->(t: Container<"a"> | (Container<"b"> & { dataB: boolean } & Container<"a">)): Container<"a"> => t : (t: Container<"a"> | (Container<"b"> & { dataB: boolean;} & Container<"a">)) => Container<"a"> +>f3 : (t: Container<"a"> | (Container<"b"> & { dataB: boolean; } & Container<"a">)) => Container<"a"> +>(t: Container<"a"> | (Container<"b"> & { dataB: boolean } & Container<"a">)): Container<"a"> => t : (t: Container<"a"> | (Container<"b"> & { dataB: boolean; } & Container<"a">)) => Container<"a"> >t : Container<"a"> >dataB : boolean >t : Container<"a"> const f4 = (t: number | (Container<"b"> & { dataB: boolean } & Container<"a">)): number => t; ->f4 : (t: number | (Container<"b"> & { dataB: boolean;} & Container<"a">)) => number ->(t: number | (Container<"b"> & { dataB: boolean } & Container<"a">)): number => t : (t: number | (Container<"b"> & { dataB: boolean;} & Container<"a">)) => number +>f4 : (t: number | (Container<"b"> & { dataB: boolean; } & Container<"a">)) => number +>(t: number | (Container<"b"> & { dataB: boolean } & Container<"a">)): number => t : (t: number | (Container<"b"> & { dataB: boolean; } & Container<"a">)) => number >t : number >dataB : boolean >t : number diff --git a/tests/baselines/reference/intersectionTypeInference1.types b/tests/baselines/reference/intersectionTypeInference1.types index 096be34a8b5e8..9e7218e3f361e 100644 --- a/tests/baselines/reference/intersectionTypeInference1.types +++ b/tests/baselines/reference/intersectionTypeInference1.types @@ -8,8 +8,8 @@ function alert(s: string) {} >s : string const parameterFn = (props:{store:string}) => alert(props.store) ->parameterFn : (props: { store: string;}) => void ->(props:{store:string}) => alert(props.store) : (props: { store: string;}) => void +>parameterFn : (props: { store: string; }) => void +>(props:{store:string}) => alert(props.store) : (props: { store: string; }) => void >props : { store: string; } >store : string >alert(props.store) : void @@ -19,9 +19,9 @@ const parameterFn = (props:{store:string}) => alert(props.store) >store : string const brokenFunction = (f: (p: {dispatch: number} & OwnProps) => void) => (o: OwnProps) => o ->brokenFunction : (f: (p: { dispatch: number;} & OwnProps) => void) => (o: OwnProps) => OwnProps ->(f: (p: {dispatch: number} & OwnProps) => void) => (o: OwnProps) => o : (f: (p: { dispatch: number;} & OwnProps) => void) => (o: OwnProps) => OwnProps ->f : (p: { dispatch: number;} & OwnProps) => void +>brokenFunction : (f: (p: { dispatch: number; } & OwnProps) => void) => (o: OwnProps) => OwnProps +>(f: (p: {dispatch: number} & OwnProps) => void) => (o: OwnProps) => o : (f: (p: { dispatch: number; } & OwnProps) => void) => (o: OwnProps) => OwnProps +>f : (p: { dispatch: number; } & OwnProps) => void >p : { dispatch: number; } & OwnProps >dispatch : number >(o: OwnProps) => o : (o: OwnProps) => OwnProps diff --git a/tests/baselines/reference/intersectionTypeInference2.types b/tests/baselines/reference/intersectionTypeInference2.types index 294910513bf50..13c14da655254 100644 --- a/tests/baselines/reference/intersectionTypeInference2.types +++ b/tests/baselines/reference/intersectionTypeInference2.types @@ -2,7 +2,7 @@ === intersectionTypeInference2.ts === declare function f(x: { prop: T }): T; ->f : (x: { prop: T;}) => T +>f : (x: { prop: T; }) => T >x : { prop: T; } >prop : T diff --git a/tests/baselines/reference/intersectionTypeMembers.types b/tests/baselines/reference/intersectionTypeMembers.types index 285ef5664fb6b..966f7ac1ef18e 100644 --- a/tests/baselines/reference/intersectionTypeMembers.types +++ b/tests/baselines/reference/intersectionTypeMembers.types @@ -101,7 +101,7 @@ var n = f(42); interface D { nested: { doublyNested: { d: string; }, different: { e: number } }; ->nested : { doublyNested: { d: string;}; different: { e: number;}; } +>nested : { doublyNested: { d: string; }; different: { e: number; }; } >doublyNested : { d: string; } >d : string >different : { e: number; } @@ -109,7 +109,7 @@ interface D { } interface E { nested: { doublyNested: { f: string; }, other: {g: number } }; ->nested : { doublyNested: { f: string;}; other: { g: number;}; } +>nested : { doublyNested: { f: string; }; other: { g: number; }; } >doublyNested : { f: string; } >f : string >other : { g: number; } @@ -153,14 +153,14 @@ const de: D & E = { // Additional test case with >2 doubly nested members so fix for #31441 is tested w/ excess props interface F { nested: { doublyNested: { g: string; } } ->nested : { doublyNested: { g: string;}; } +>nested : { doublyNested: { g: string; }; } >doublyNested : { g: string; } >g : string } interface G { nested: { doublyNested: { h: string; } } ->nested : { doublyNested: { h: string;}; } +>nested : { doublyNested: { h: string; }; } >doublyNested : { h: string; } >h : string } diff --git a/tests/baselines/reference/intersectionType_useDefineForClassFields.types b/tests/baselines/reference/intersectionType_useDefineForClassFields.types index b1436cf60dd42..f0180a7961641 100644 --- a/tests/baselines/reference/intersectionType_useDefineForClassFields.types +++ b/tests/baselines/reference/intersectionType_useDefineForClassFields.types @@ -8,7 +8,7 @@ type Foo = { } function bar(_p: T): { new(): Foo } { ->bar : (_p: T) => { new (): Foo;} +>bar : (_p: T) => { new (): Foo; } >_p : T return null as any; diff --git a/tests/baselines/reference/intersectionWithConstructSignaturePrototypeResult.types b/tests/baselines/reference/intersectionWithConstructSignaturePrototypeResult.types index 1284561880a6d..e45a60d0b341c 100644 --- a/tests/baselines/reference/intersectionWithConstructSignaturePrototypeResult.types +++ b/tests/baselines/reference/intersectionWithConstructSignaturePrototypeResult.types @@ -5,7 +5,7 @@ declare class EmberObject {} >EmberObject : EmberObject type PersonType = Readonly & ->PersonType : Readonly & (new (properties?: object) => { firstName: string; lastName: string;} & EmberObject) & (new (...args: any[]) => { firstName: string; lastName: string;} & EmberObject) +>PersonType : Readonly & (new (properties?: object) => { firstName: string; lastName: string; } & EmberObject) & (new (...args: any[]) => { firstName: string; lastName: string; } & EmberObject) >EmberObject : typeof EmberObject (new (properties?: object) => { diff --git a/tests/baselines/reference/intraExpressionInferences.types b/tests/baselines/reference/intraExpressionInferences.types index fecbbbba069de..e2becbc3251fb 100644 --- a/tests/baselines/reference/intraExpressionInferences.types +++ b/tests/baselines/reference/intraExpressionInferences.types @@ -4,7 +4,7 @@ // Repros from #47599 declare function callIt(obj: { ->callIt : (obj: { produce: (n: number) => T; consume: (x: T) => void;}) => void +>callIt : (obj: { produce: (n: number) => T; consume: (x: T) => void; }) => void >obj : { produce: (n: number) => T; consume: (x: T) => void; } produce: (n: number) => T, @@ -160,7 +160,7 @@ const myGeneric = inferTypeFn({ // Repro #38623 function make(o: { mutations: M, action: (m: M) => void }) { } ->make : (o: { mutations: M; action: (m: M) => void;}) => void +>make : (o: { mutations: M; action: (m: M) => void; }) => void >o : { mutations: M; action: (m: M) => void; } >mutations : M >action : (m: M) => void @@ -193,7 +193,7 @@ make({ // Repro from #38845 declare function foo(options: { a: A, b: (a: A) => void }): void; ->foo : (options: { a: A; b: (a: A) => void;}) => void +>foo : (options: { a: A; b: (a: A) => void; }) => void >options : { a: A; b: (a: A) => void; } >a : A >b : (a: A) => void @@ -344,7 +344,7 @@ type MappingComponent = { >MappingComponent : MappingComponent setup(): { inputs: I; outputs: O }; ->setup : () => { inputs: I; outputs: O;} +>setup : () => { inputs: I; outputs: O; } >inputs : I >outputs : O @@ -425,14 +425,14 @@ createMappingComponent({ // Repro from #48279 function simplified(props: { generator: () => T, receiver: (t: T) => any }) {} ->simplified : (props: { generator: () => T; receiver: (t: T) => any;}) => void +>simplified : (props: { generator: () => T; receiver: (t: T) => any; }) => void >props : { generator: () => T; receiver: (t: T) => any; } >generator : () => T >receiver : (t: T) => any >t : T function whatIWant(props: { generator: (bob: any) => T, receiver: (t: T) => any }) {} ->whatIWant : (props: { generator: (bob: any) => T; receiver: (t: T) => any;}) => void +>whatIWant : (props: { generator: (bob: any) => T; receiver: (t: T) => any; }) => void >props : { generator: (bob: any) => T; receiver: (t: T) => any; } >generator : (bob: any) => T >bob : any @@ -620,7 +620,7 @@ example({ // Repro from #45255 declare const branch: ->branch : (_: { test: T; if: (t: T) => t is U; then: (u: U) => void;}) => void +>branch : (_: { test: T; if: (t: T) => t is U; then: (u: U) => void; }) => void (_: { test: T, if: (t: T) => t is U, then: (u: U) => void }) => void >_ : { test: T; if: (t: T) => t is U; then: (u: U) => void; } @@ -705,8 +705,8 @@ Foo({ }); declare function nested(arg: { ->nested : (arg: { prop: { produce: (arg1: number) => T; consume: (arg2: T) => void; };}) => T ->arg : { prop: { produce: (arg1: number) => T; consume: (arg2: T) => void;}; } +>nested : (arg: { prop: { produce: (arg1: number) => T; consume: (arg2: T) => void; }; }) => T +>arg : { prop: { produce: (arg1: number) => T; consume: (arg2: T) => void; }; } prop: { >prop : { produce: (arg1: number) => T; consume: (arg2: T) => void; } @@ -753,7 +753,7 @@ const resNested = nested({ }); declare function twoConsumers(arg: { ->twoConsumers : (arg: { a: (arg: string) => T; consume1: (arg1: T) => void; consume2: (arg2: T) => void;}) => T +>twoConsumers : (arg: { a: (arg: string) => T; consume1: (arg1: T) => void; consume2: (arg2: T) => void; }) => T >arg : { a: (arg: string) => T; consume1: (arg1: T) => void; consume2: (arg2: T) => void; } a: (arg: string) => T; @@ -796,7 +796,7 @@ const resTwoConsumers = twoConsumers({ }); declare function multipleProducersBeforeConsumers(arg: { ->multipleProducersBeforeConsumers : (arg: { a: (arg: string) => T; b: (arg: string) => T2; consume1: (arg1: T) => void; consume2: (arg2: T2) => void;}) => [T, T2] +>multipleProducersBeforeConsumers : (arg: { a: (arg: string) => T; b: (arg: string) => T2; consume1: (arg1: T) => void; consume2: (arg2: T2) => void; }) => [T, T2] >arg : { a: (arg: string) => T; b: (arg: string) => T2; consume1: (arg1: T) => void; consume2: (arg2: T2) => void; } a: (arg: string) => T; @@ -851,7 +851,7 @@ const resMultipleProducersBeforeConsumers = multipleProducersBeforeConsumers({ }); declare function withConditionalExpression(arg: { ->withConditionalExpression : (arg: { a: (arg1: string) => T; b: (arg2: T) => T2; c: (arg2: T2) => T3;}) => [T, T2, T3] +>withConditionalExpression : (arg: { a: (arg1: string) => T; b: (arg2: T) => T2; c: (arg2: T2) => T3; }) => [T, T2, T3] >arg : { a: (arg1: string) => T; b: (arg2: T) => T2; c: (arg2: T2) => T3; } a: (arg1: string) => T; @@ -908,15 +908,15 @@ const resWithConditionalExpression = withConditionalExpression({ }); declare function onion(arg: { ->onion : (arg: { a: (arg1: string) => T; nested: { b: (arg2: T) => T2; nested2: { c: (arg2: T2) => T3; }; };}) => [T, T2, T3] ->arg : { a: (arg1: string) => T; nested: { b: (arg2: T) => T2; nested2: { c: (arg2: T2) => T3; };}; } +>onion : (arg: { a: (arg1: string) => T; nested: { b: (arg2: T) => T2; nested2: { c: (arg2: T2) => T3; }; }; }) => [T, T2, T3] +>arg : { a: (arg1: string) => T; nested: { b: (arg2: T) => T2; nested2: { c: (arg2: T2) => T3; }; }; } a: (arg1: string) => T; >a : (arg1: string) => T >arg1 : string nested: { ->nested : { b: (arg2: T) => T2; nested2: { c: (arg2: T2) => T3;}; } +>nested : { b: (arg2: T) => T2; nested2: { c: (arg2: T2) => T3; }; } b: (arg2: T) => T2; >b : (arg2: T) => T2 @@ -977,15 +977,15 @@ const resOnion = onion({ }); declare function onion2(arg: { ->onion2 : (arg: { a: (arg1: string) => T; nested: { b: (arg2: T) => T2; c: (arg3: T) => T3; nested2: { d: (arg4: T3) => T4; }; };}) => [T, T2, T3, T4] ->arg : { a: (arg1: string) => T; nested: { b: (arg2: T) => T2; c: (arg3: T) => T3; nested2: { d: (arg4: T3) => T4; };}; } +>onion2 : (arg: { a: (arg1: string) => T; nested: { b: (arg2: T) => T2; c: (arg3: T) => T3; nested2: { d: (arg4: T3) => T4; }; }; }) => [T, T2, T3, T4] +>arg : { a: (arg1: string) => T; nested: { b: (arg2: T) => T2; c: (arg3: T) => T3; nested2: { d: (arg4: T3) => T4; }; }; } a: (arg1: string) => T; >a : (arg1: string) => T >arg1 : string nested: { ->nested : { b: (arg2: T) => T2; c: (arg3: T) => T3; nested2: { d: (arg4: T3) => T4;}; } +>nested : { b: (arg2: T) => T2; c: (arg3: T) => T3; nested2: { d: (arg4: T3) => T4; }; } b: (arg2: T) => T2; >b : (arg2: T) => T2 @@ -1058,14 +1058,14 @@ const resOnion2 = onion2({ }); declare function distant(args: { ->distant : (args: { foo: { bar: { baz: { producer: (arg: string) => T; }; }; }; consumer: (val: T) => unknown;}) => T ->args : { foo: { bar: { baz: { producer: (arg: string) => T; }; };}; consumer: (val: T) => unknown; } +>distant : (args: { foo: { bar: { baz: { producer: (arg: string) => T; }; }; }; consumer: (val: T) => unknown; }) => T +>args : { foo: { bar: { baz: { producer: (arg: string) => T; }; }; }; consumer: (val: T) => unknown; } foo: { ->foo : { bar: { baz: { producer: (arg: string) => T; };}; } +>foo : { bar: { baz: { producer: (arg: string) => T; }; }; } bar: { ->bar : { baz: { producer: (arg: string) => T;}; } +>bar : { baz: { producer: (arg: string) => T; }; } baz: { >baz : { producer: (arg: string) => T; } diff --git a/tests/baselines/reference/isomorphicMappedTypeInference.types b/tests/baselines/reference/isomorphicMappedTypeInference.types index 861506eb9b788..60ff2845704d7 100644 --- a/tests/baselines/reference/isomorphicMappedTypeInference.types +++ b/tests/baselines/reference/isomorphicMappedTypeInference.types @@ -273,7 +273,7 @@ function f4() { } function makeRecord(obj: { [P in K]: T }) { ->makeRecord : (obj: { [P in K]: T;}) => { [P in K]: T; } +>makeRecord : (obj: { [P in K]: T; }) => { [P in K]: T; } >obj : { [P in K]: T; } return obj; @@ -323,7 +323,7 @@ function f5(s: string) { } function makeDictionary(obj: { [x: string]: T }) { ->makeDictionary : (obj: { [x: string]: T;}) => { [x: string]: T; } +>makeDictionary : (obj: { [x: string]: T; }) => { [x: string]: T; } >obj : { [x: string]: T; } >x : string diff --git a/tests/baselines/reference/jsDeclarationsExportDefinePropertyEmit.types b/tests/baselines/reference/jsDeclarationsExportDefinePropertyEmit.types index 063701cfe2aa2..ac9ed71340b30 100644 --- a/tests/baselines/reference/jsDeclarationsExportDefinePropertyEmit.types +++ b/tests/baselines/reference/jsDeclarationsExportDefinePropertyEmit.types @@ -142,7 +142,7 @@ Object.defineProperty(module.exports.f, "self", { value: module.exports.f }); * @param {{y: typeof module.exports.b}} b */ function g(a, b) { ->g : (a: { x: string;}, b: { y: () => void; }) => void +>g : (a: { x: string; }, b: { y: () => void; }) => void >a : { x: string; } >b : { y: () => void; } @@ -175,7 +175,7 @@ Object.defineProperty(module.exports, "g", { value: g }); * @param {{y: typeof module.exports.b}} b */ function hh(a, b) { ->hh : (a: { x: string;}, b: { y: () => void; }) => void +>hh : (a: { x: string; }, b: { y: () => void; }) => void >a : { x: string; } >b : { y: () => void; } diff --git a/tests/baselines/reference/jsDeclarationsFunctions.types b/tests/baselines/reference/jsDeclarationsFunctions.types index 2dd35c6be4d28..fcdb16f1efbf4 100644 --- a/tests/baselines/reference/jsDeclarationsFunctions.types +++ b/tests/baselines/reference/jsDeclarationsFunctions.types @@ -70,7 +70,7 @@ f.self = f; * @param {{y: typeof b}} b */ function g(a, b) { ->g : (a: { x: string;}, b: { y: typeof import("index").b; }) => void +>g : (a: { x: string; }, b: { y: typeof import("index").b; }) => void >a : { x: string; } >b : { y: typeof import("index").b; } @@ -93,7 +93,7 @@ export { g }; * @param {{y: typeof b}} b */ function hh(a, b) { ->hh : (a: { x: string;}, b: { y: typeof import("index").b; }) => void +>hh : (a: { x: string; }, b: { y: typeof import("index").b; }) => void >a : { x: string; } >b : { y: typeof import("index").b; } diff --git a/tests/baselines/reference/jsDeclarationsFunctionsCjs.types b/tests/baselines/reference/jsDeclarationsFunctionsCjs.types index 7b43796b8ec88..54ec640502e47 100644 --- a/tests/baselines/reference/jsDeclarationsFunctionsCjs.types +++ b/tests/baselines/reference/jsDeclarationsFunctionsCjs.types @@ -128,7 +128,7 @@ module.exports.f.self = module.exports.f; * @param {{y: typeof module.exports.b}} b */ function g(a, b) { ->g : (a: { x: string;}, b: { y: { (): void; cat: string; }; }) => void +>g : (a: { x: string; }, b: { y: { (): void; cat: string; }; }) => void >a : { x: string; } >b : { y: { (): void; cat: string; }; } @@ -157,7 +157,7 @@ module.exports.g = g; * @param {{y: typeof module.exports.b}} b */ function hh(a, b) { ->hh : (a: { x: string;}, b: { y: { (): void; cat: string; }; }) => void +>hh : (a: { x: string; }, b: { y: { (): void; cat: string; }; }) => void >a : { x: string; } >b : { y: { (): void; cat: string; }; } diff --git a/tests/baselines/reference/jsDeclarationsReactComponents.types b/tests/baselines/reference/jsDeclarationsReactComponents.types index f800282877220..a49b4bb3dafe0 100644 --- a/tests/baselines/reference/jsDeclarationsReactComponents.types +++ b/tests/baselines/reference/jsDeclarationsReactComponents.types @@ -151,8 +151,8 @@ import React from "react"; >React : typeof React const TabbedShowLayout = (/** @type {{className: string}}*/prop) => { ->TabbedShowLayout : { (prop: { className: string;}): JSX.Element; defaultProps: { tabs: string; }; } ->(/** @type {{className: string}}*/prop) => { return (

);} : { (prop: { className: string;}): JSX.Element; defaultProps: { tabs: string; }; } +>TabbedShowLayout : { (prop: { className: string; }): JSX.Element; defaultProps: { tabs: string; }; } +>(/** @type {{className: string}}*/prop) => { return (
ok
);} : { (prop: { className: string; }): JSX.Element; defaultProps: { tabs: string; }; } >prop : { className: string; } return ( diff --git a/tests/baselines/reference/jsFileImportPreservedWhenUsed.types b/tests/baselines/reference/jsFileImportPreservedWhenUsed.types index 7e58a48ed40e1..7323354b91eef 100644 --- a/tests/baselines/reference/jsFileImportPreservedWhenUsed.types +++ b/tests/baselines/reference/jsFileImportPreservedWhenUsed.types @@ -9,7 +9,7 @@ type ObjectIterator = (value: TObject[keyof TObject], key: str interface LoDashStatic { mapValues(obj: T | null | undefined, callback: ObjectIterator): { [P in keyof T]: TResult }; ->mapValues : (obj: T | null | undefined, callback: ObjectIterator) => { [P in keyof T]: TResult;} +>mapValues : (obj: T | null | undefined, callback: ObjectIterator) => { [P in keyof T]: TResult; } >obj : T | null | undefined >callback : ObjectIterator } diff --git a/tests/baselines/reference/jsdocFunctionType.types b/tests/baselines/reference/jsdocFunctionType.types index 4b70876ebe202..6be16f445ca08 100644 --- a/tests/baselines/reference/jsdocFunctionType.types +++ b/tests/baselines/reference/jsdocFunctionType.types @@ -30,7 +30,7 @@ var x = id1(function (n) { return this.length + n }); * @return {function(new: { length: number }, number): number} */ function id2(c) { ->id2 : (c: new (arg1: number) => { length: number;}) => new (arg1: number) => { length: number;} +>id2 : (c: new (arg1: number) => { length: number; }) => new (arg1: number) => { length: number; } >c : new (arg1: number) => { length: number; } return c diff --git a/tests/baselines/reference/jsdocParamTag2.types b/tests/baselines/reference/jsdocParamTag2.types index 685620c2531c5..77e84f4ff90d4 100644 --- a/tests/baselines/reference/jsdocParamTag2.types +++ b/tests/baselines/reference/jsdocParamTag2.types @@ -7,7 +7,7 @@ * @param {string} x */ function good1({a, b}, x) {} ->good1 : ({ a, b }: { a: string; b: string;}, x: string) => void +>good1 : ({ a, b }: { a: string; b: string; }, x: string) => void >a : string >b : string >x : string @@ -17,7 +17,7 @@ function good1({a, b}, x) {} * @param {{c: number, d: number}} OBJECTION */ function good2({a, b}, {c, d}) {} ->good2 : ({ a, b }: { a: string; b: string;}, { c, d }: { c: number; d: number;}) => void +>good2 : ({ a, b }: { a: string; b: string; }, { c, d }: { c: number; d: number; }) => void >a : string >b : string >c : number @@ -29,7 +29,7 @@ function good2({a, b}, {c, d}) {} * @param {string} y */ function good3(x, {a, b}, y) {} ->good3 : (x: number, { a, b }: { a: string; b: string;}, y: string) => void +>good3 : (x: number, { a, b }: { a: string; b: string; }, y: string) => void >x : number >a : string >b : string @@ -39,7 +39,7 @@ function good3(x, {a, b}, y) {} * @param {{a: string, b: string}} obj */ function good4({a, b}) {} ->good4 : ({ a, b }: { a: string; b: string;}) => void +>good4 : ({ a, b }: { a: string; b: string; }) => void >a : string >b : string @@ -99,7 +99,7 @@ function good8({a, b}) {} * @param {{ a: string }} argument */ function good9({ a }) { ->good9 : ({ a }: { a: string;}, ...args: any[]) => void +>good9 : ({ a }: { a: string; }, ...args: any[]) => void >a : string console.log(arguments, a); @@ -128,7 +128,7 @@ function bad1(x, {a, b}) {} * @param {{a: string, b: string}} obj */ function bad2(x, {a, b}) {} ->bad2 : (x: any, { a, b }: { a: string; b: string;}) => void +>bad2 : (x: any, { a, b }: { a: string; b: string; }) => void >x : any >a : string >b : string diff --git a/tests/baselines/reference/jsdocTemplateTag6.types b/tests/baselines/reference/jsdocTemplateTag6.types index 2ba325b685609..c19a90f954271 100644 --- a/tests/baselines/reference/jsdocTemplateTag6.types +++ b/tests/baselines/reference/jsdocTemplateTag6.types @@ -167,7 +167,7 @@ const t10 = f4([{ a: 1, b: "x" }, { a: 2, b: "y" }]); * @returns {T} */ function f5(obj) { ->f5 : (obj: { x: T; y: T;}) => T +>f5 : (obj: { x: T; y: T; }) => T >obj : { x: T; y: T; } return obj.x; diff --git a/tests/baselines/reference/jsxCallbackWithDestructuring.types b/tests/baselines/reference/jsxCallbackWithDestructuring.types index a0eda75eb6b6d..a6ea643279cf3 100644 --- a/tests/baselines/reference/jsxCallbackWithDestructuring.types +++ b/tests/baselines/reference/jsxCallbackWithDestructuring.types @@ -40,7 +40,7 @@ declare global { export interface RouteProps { children?: (props: { x: number }) => any; ->children : ((props: { x: number;}) => any) | undefined +>children : ((props: { x: number; }) => any) | undefined >props : { x: number; } >x : number } diff --git a/tests/baselines/reference/jsxChildrenGenericContextualTypes.types b/tests/baselines/reference/jsxChildrenGenericContextualTypes.types index ceb6da2de0364..01bf65beb0045 100644 --- a/tests/baselines/reference/jsxChildrenGenericContextualTypes.types +++ b/tests/baselines/reference/jsxChildrenGenericContextualTypes.types @@ -14,8 +14,8 @@ namespace JSX { >key : string } const Elem = (p: { prop: T, children: (t: T) => T }) =>
; ->Elem : (p: { prop: T; children: (t: T) => T;}) => JSX.Element ->(p: { prop: T, children: (t: T) => T }) =>
: (p: { prop: T; children: (t: T) => T;}) => JSX.Element +>Elem : (p: { prop: T; children: (t: T) => T; }) => JSX.Element +>(p: { prop: T, children: (t: T) => T }) =>
: (p: { prop: T; children: (t: T) => T; }) => JSX.Element >p : { prop: T; children: (t: T) => T; } >prop : T >children : (t: T) => T diff --git a/tests/baselines/reference/jsxComplexSignatureHasApplicabilityError.types b/tests/baselines/reference/jsxComplexSignatureHasApplicabilityError.types index f4469f2d90538..b6d771193127e 100644 --- a/tests/baselines/reference/jsxComplexSignatureHasApplicabilityError.types +++ b/tests/baselines/reference/jsxComplexSignatureHasApplicabilityError.types @@ -165,7 +165,7 @@ export type FilterOptionsHandler = (options: OptionscurrentValues : Options export type InputRendererHandler = (props: { [key: string]: any }) => HandlerRendererResult; ->InputRendererHandler : (props: { [key: string]: any;}) => HandlerRendererResult +>InputRendererHandler : (props: { [key: string]: any; }) => HandlerRendererResult >props : { [key: string]: any; } >key : string @@ -222,7 +222,7 @@ export type IsOptionUniqueHandler = (arg: { option: Optio >valueKey : string export type IsValidNewOptionHandler = (arg: { label: string }) => boolean; ->IsValidNewOptionHandler : (arg: { label: string;}) => boolean +>IsValidNewOptionHandler : (arg: { label: string; }) => boolean >arg : { label: string; } >label : string @@ -238,7 +238,7 @@ export type PromptTextCreatorHandler = (filterText: string) => string; >filterText : string export type ShouldKeyDownEventCreateNewOptionHandler = (arg: { keyCode: number }) => boolean; ->ShouldKeyDownEventCreateNewOptionHandler : (arg: { keyCode: number;}) => boolean +>ShouldKeyDownEventCreateNewOptionHandler : (arg: { keyCode: number; }) => boolean >arg : { keyCode: number; } >keyCode : number diff --git a/tests/baselines/reference/jsxElementType.types b/tests/baselines/reference/jsxElementType.types index affea4c2f8f54..a66a2d0234b0c 100644 --- a/tests/baselines/reference/jsxElementType.types +++ b/tests/baselines/reference/jsxElementType.types @@ -63,8 +63,8 @@ let Component: NewReactJSXElementConstructor<{ title: string }>; >title : string const RenderElement = ({ title }: { title: string }) =>
{title}
; ->RenderElement : ({ title }: { title: string;}) => JSX.Element ->({ title }: { title: string }) =>
{title}
: ({ title }: { title: string;}) => JSX.Element +>RenderElement : ({ title }: { title: string; }) => JSX.Element +>({ title }: { title: string }) =>
{title}
: ({ title }: { title: string; }) => JSX.Element >title : string >title : string >
{title}
: JSX.Element @@ -92,8 +92,8 @@ Component = RenderElement; >excessProp : true const RenderString = ({ title }: { title: string }) => title; ->RenderString : ({ title }: { title: string;}) => string ->({ title }: { title: string }) => title : ({ title }: { title: string;}) => string +>RenderString : ({ title }: { title: string; }) => string +>({ title }: { title: string }) => title : ({ title }: { title: string; }) => string >title : string >title : string >title : string @@ -118,8 +118,8 @@ Component = RenderString; >excessProp : true const RenderNumber = ({ title }: { title: string }) => title.length; ->RenderNumber : ({ title }: { title: string;}) => number ->({ title }: { title: string }) => title.length : ({ title }: { title: string;}) => number +>RenderNumber : ({ title }: { title: string; }) => number +>({ title }: { title: string }) => title.length : ({ title }: { title: string; }) => number >title : string >title : string >title.length : number @@ -146,8 +146,8 @@ Component = RenderNumber; >excessProp : true const RenderArray = ({ title }: { title: string }) => [title]; ->RenderArray : ({ title }: { title: string;}) => string[] ->({ title }: { title: string }) => [title] : ({ title }: { title: string;}) => string[] +>RenderArray : ({ title }: { title: string; }) => string[] +>({ title }: { title: string }) => [title] : ({ title }: { title: string; }) => string[] >title : string >title : string >[title] : string[] @@ -174,8 +174,8 @@ Component = RenderArray; // React Server Component const RenderPromise = async ({ title }: { title: string }) => "react"; ->RenderPromise : ({ title }: { title: string;}) => Promise ->async ({ title }: { title: string }) => "react" : ({ title }: { title: string;}) => Promise +>RenderPromise : ({ title }: { title: string; }) => Promise +>async ({ title }: { title: string }) => "react" : ({ title }: { title: string; }) => Promise >title : string >title : string >"react" : "react" diff --git a/tests/baselines/reference/jsxEmitWithAttributes.types b/tests/baselines/reference/jsxEmitWithAttributes.types index 450fde058faab..8030a267d11b6 100644 --- a/tests/baselines/reference/jsxEmitWithAttributes.types +++ b/tests/baselines/reference/jsxEmitWithAttributes.types @@ -87,7 +87,7 @@ import { Element} from './Element'; >Element : typeof Element let c: { ->c : { a?: { b: string;}; } +>c : { a?: { b: string; }; } a?: { >a : { b: string; } diff --git a/tests/baselines/reference/jsxFactoryAndReactNamespace.types b/tests/baselines/reference/jsxFactoryAndReactNamespace.types index a0b63e434b97a..7822e187a4b51 100644 --- a/tests/baselines/reference/jsxFactoryAndReactNamespace.types +++ b/tests/baselines/reference/jsxFactoryAndReactNamespace.types @@ -87,7 +87,7 @@ import { Element} from './Element'; >Element : typeof Element let c: { ->c : { a?: { b: string;}; } +>c : { a?: { b: string; }; } a?: { >a : { b: string; } diff --git a/tests/baselines/reference/jsxFactoryIdentifier.types b/tests/baselines/reference/jsxFactoryIdentifier.types index 5b4932e4bb1de..7e5bd265fd5d5 100644 --- a/tests/baselines/reference/jsxFactoryIdentifier.types +++ b/tests/baselines/reference/jsxFactoryIdentifier.types @@ -93,7 +93,7 @@ let createElement = Element.createElement; >createElement : (args: any[]) => {} let c: { ->c : { a?: { b: string;}; } +>c : { a?: { b: string; }; } a?: { >a : { b: string; } diff --git a/tests/baselines/reference/jsxFactoryNotIdentifierOrQualifiedName.types b/tests/baselines/reference/jsxFactoryNotIdentifierOrQualifiedName.types index 014b5b635c37a..ad0223993611d 100644 --- a/tests/baselines/reference/jsxFactoryNotIdentifierOrQualifiedName.types +++ b/tests/baselines/reference/jsxFactoryNotIdentifierOrQualifiedName.types @@ -87,7 +87,7 @@ import { Element} from './Element'; >Element : typeof Element let c: { ->c : { a?: { b: string;}; } +>c : { a?: { b: string; }; } a?: { >a : { b: string; } diff --git a/tests/baselines/reference/jsxFactoryNotIdentifierOrQualifiedName2.types b/tests/baselines/reference/jsxFactoryNotIdentifierOrQualifiedName2.types index 0c4ed0de3d810..9115d791a83a0 100644 --- a/tests/baselines/reference/jsxFactoryNotIdentifierOrQualifiedName2.types +++ b/tests/baselines/reference/jsxFactoryNotIdentifierOrQualifiedName2.types @@ -87,7 +87,7 @@ import { Element} from './Element'; >Element : typeof Element let c: { ->c : { a?: { b: string;}; } +>c : { a?: { b: string; }; } a?: { >a : { b: string; } diff --git a/tests/baselines/reference/jsxFactoryQualifiedName.types b/tests/baselines/reference/jsxFactoryQualifiedName.types index 92013df3e18ba..a5d928610c266 100644 --- a/tests/baselines/reference/jsxFactoryQualifiedName.types +++ b/tests/baselines/reference/jsxFactoryQualifiedName.types @@ -87,7 +87,7 @@ import { Element} from './Element'; >Element : typeof Element let c: { ->c : { a?: { b: string;}; } +>c : { a?: { b: string; }; } a?: { >a : { b: string; } diff --git a/tests/baselines/reference/jsxIntrinsicElementsCompatability.types b/tests/baselines/reference/jsxIntrinsicElementsCompatability.types index 7321534edf3d8..1ca592ceaf3ff 100644 --- a/tests/baselines/reference/jsxIntrinsicElementsCompatability.types +++ b/tests/baselines/reference/jsxIntrinsicElementsCompatability.types @@ -12,7 +12,7 @@ import * as React from "react"; >React : typeof React function SomeComponent(props: { element?: T } & JSX.IntrinsicElements[T]): JSX.Element { ->SomeComponent : (props: { element?: T;} & JSX.IntrinsicElements[T]) => JSX.Element +>SomeComponent : (props: { element?: T; } & JSX.IntrinsicElements[T]) => JSX.Element >props : { element?: T | undefined; } & JSX.IntrinsicElements[T] >element : T | undefined >JSX : any diff --git a/tests/baselines/reference/jsxLibraryManagedAttributesUnusedGeneric.types b/tests/baselines/reference/jsxLibraryManagedAttributesUnusedGeneric.types index 3f7d366108991..380d9ff12dcb2 100644 --- a/tests/baselines/reference/jsxLibraryManagedAttributesUnusedGeneric.types +++ b/tests/baselines/reference/jsxLibraryManagedAttributesUnusedGeneric.types @@ -20,7 +20,7 @@ namespace jsx { export interface IntrinsicAttributes {} export interface IntrinsicClassAttributes {} export type IntrinsicElements = { ->IntrinsicElements : { div: { className: string;}; } +>IntrinsicElements : { div: { className: string; }; } div: { className: string } >div : { className: string; } @@ -41,7 +41,7 @@ namespace jsx { } declare const Comp: (p: { className?: string }) => null ->Comp : (p: { className?: string;}) => null +>Comp : (p: { className?: string; }) => null >p : { className?: string; } >className : string diff --git a/tests/baselines/reference/jsxNamespaceGlobalReexport.types b/tests/baselines/reference/jsxNamespaceGlobalReexport.types index 2cfb44fe74676..8c66ca8cfc6f7 100644 --- a/tests/baselines/reference/jsxNamespaceGlobalReexport.types +++ b/tests/baselines/reference/jsxNamespaceGlobalReexport.types @@ -92,7 +92,7 @@ import { JSXInternal } from '..'; >JSXInternal : any export function jsx( ->jsx : { (type: string, props: JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes & Record & { children?: ComponentChild;}, key?: string): VNode;

(type: ComponentType

, props: P & { children?: ComponentChild | undefined; }, key?: string | undefined): VNode; } +>jsx : { (type: string, props: JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes & Record & { children?: ComponentChild; }, key?: string): VNode;

(type: ComponentType

, props: P & { children?: ComponentChild | undefined; }, key?: string | undefined): VNode; } type: string, >type : string @@ -112,7 +112,7 @@ export function jsx( ): VNode; export function jsx

( ->jsx : { (type: string, props: JSXInternal.HTMLAttributes<{}> & JSXInternal.SVGAttributes<{}> & Record & { children?: ComponentChild | undefined; }, key?: string | undefined): VNode;

(type: ComponentType

, props: Attributes & P & { children?: ComponentChild;}, key?: string): VNode; } +>jsx : { (type: string, props: JSXInternal.HTMLAttributes<{}> & JSXInternal.SVGAttributes<{}> & Record & { children?: ComponentChild | undefined; }, key?: string | undefined): VNode;

(type: ComponentType

, props: Attributes & P & { children?: ComponentChild; }, key?: string): VNode; } type: ComponentType

, >type : ComponentType

@@ -127,7 +127,7 @@ export function jsx

( ): VNode; export function jsxs( ->jsxs : { (type: string, props: JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes & Record & { children?: ComponentChild[];}, key?: string): VNode;

(type: ComponentType

, props: P & { children?: ComponentChild[] | undefined; }, key?: string | undefined): VNode; } +>jsxs : { (type: string, props: JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes & Record & { children?: ComponentChild[]; }, key?: string): VNode;

(type: ComponentType

, props: P & { children?: ComponentChild[] | undefined; }, key?: string | undefined): VNode; } type: string, >type : string @@ -147,7 +147,7 @@ export function jsxs( ): VNode; export function jsxs

( ->jsxs : { (type: string, props: JSXInternal.HTMLAttributes<{}> & JSXInternal.SVGAttributes<{}> & Record & { children?: ComponentChild[] | undefined; }, key?: string | undefined): VNode;

(type: ComponentType

, props: Attributes & P & { children?: ComponentChild[];}, key?: string): VNode; } +>jsxs : { (type: string, props: JSXInternal.HTMLAttributes<{}> & JSXInternal.SVGAttributes<{}> & Record & { children?: ComponentChild[] | undefined; }, key?: string | undefined): VNode;

(type: ComponentType

, props: Attributes & P & { children?: ComponentChild[]; }, key?: string): VNode; } type: ComponentType

, >type : ComponentType

@@ -162,7 +162,7 @@ export function jsxs

( ): VNode; export function jsxDEV( ->jsxDEV : { (type: string, props: JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes & Record & { children?: ComponentChildren;}, key?: string): VNode;

(type: ComponentType

, props: P & { children?: ComponentChildren | undefined; }, key?: string | undefined): VNode; } +>jsxDEV : { (type: string, props: JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes & Record & { children?: ComponentChildren; }, key?: string): VNode;

(type: ComponentType

, props: P & { children?: ComponentChildren | undefined; }, key?: string | undefined): VNode; } type: string, >type : string @@ -182,7 +182,7 @@ export function jsxDEV( ): VNode; export function jsxDEV

( ->jsxDEV : { (type: string, props: JSXInternal.HTMLAttributes<{}> & JSXInternal.SVGAttributes<{}> & Record & { children?: ComponentChildren | undefined; }, key?: string | undefined): VNode;

(type: ComponentType

, props: Attributes & P & { children?: ComponentChildren;}, key?: string): VNode; } +>jsxDEV : { (type: string, props: JSXInternal.HTMLAttributes<{}> & JSXInternal.SVGAttributes<{}> & Record & { children?: ComponentChildren | undefined; }, key?: string | undefined): VNode;

(type: ComponentType

, props: Attributes & P & { children?: ComponentChildren; }, key?: string): VNode; } type: ComponentType

, >type : ComponentType

diff --git a/tests/baselines/reference/jsxNamespaceGlobalReexportMissingAliasTarget.types b/tests/baselines/reference/jsxNamespaceGlobalReexportMissingAliasTarget.types index ec727a6a4ce00..bbd7d7178ccf1 100644 --- a/tests/baselines/reference/jsxNamespaceGlobalReexportMissingAliasTarget.types +++ b/tests/baselines/reference/jsxNamespaceGlobalReexportMissingAliasTarget.types @@ -92,7 +92,7 @@ import { JSXInternal } from '..'; >JSXInternal : any export function jsx( ->jsx : { (type: string, props: JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes & Record & { children?: ComponentChild;}, key?: string): VNode;

(type: ComponentType

, props: P & { children?: ComponentChild | undefined; }, key?: string | undefined): VNode; } +>jsx : { (type: string, props: JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes & Record & { children?: ComponentChild; }, key?: string): VNode;

(type: ComponentType

, props: P & { children?: ComponentChild | undefined; }, key?: string | undefined): VNode; } type: string, >type : string @@ -112,7 +112,7 @@ export function jsx( ): VNode; export function jsx

( ->jsx : { (type: string, props: JSXInternal.HTMLAttributes<{}> & JSXInternal.SVGAttributes<{}> & Record & { children?: ComponentChild | undefined; }, key?: string | undefined): VNode;

(type: ComponentType

, props: Attributes & P & { children?: ComponentChild;}, key?: string): VNode; } +>jsx : { (type: string, props: JSXInternal.HTMLAttributes<{}> & JSXInternal.SVGAttributes<{}> & Record & { children?: ComponentChild | undefined; }, key?: string | undefined): VNode;

(type: ComponentType

, props: Attributes & P & { children?: ComponentChild; }, key?: string): VNode; } type: ComponentType

, >type : ComponentType

@@ -127,7 +127,7 @@ export function jsx

( ): VNode; export function jsxs( ->jsxs : { (type: string, props: JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes & Record & { children?: ComponentChild[];}, key?: string): VNode;

(type: ComponentType

, props: P & { children?: ComponentChild[] | undefined; }, key?: string | undefined): VNode; } +>jsxs : { (type: string, props: JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes & Record & { children?: ComponentChild[]; }, key?: string): VNode;

(type: ComponentType

, props: P & { children?: ComponentChild[] | undefined; }, key?: string | undefined): VNode; } type: string, >type : string @@ -147,7 +147,7 @@ export function jsxs( ): VNode; export function jsxs

( ->jsxs : { (type: string, props: JSXInternal.HTMLAttributes<{}> & JSXInternal.SVGAttributes<{}> & Record & { children?: ComponentChild[] | undefined; }, key?: string | undefined): VNode;

(type: ComponentType

, props: Attributes & P & { children?: ComponentChild[];}, key?: string): VNode; } +>jsxs : { (type: string, props: JSXInternal.HTMLAttributes<{}> & JSXInternal.SVGAttributes<{}> & Record & { children?: ComponentChild[] | undefined; }, key?: string | undefined): VNode;

(type: ComponentType

, props: Attributes & P & { children?: ComponentChild[]; }, key?: string): VNode; } type: ComponentType

, >type : ComponentType

@@ -162,7 +162,7 @@ export function jsxs

( ): VNode; export function jsxDEV( ->jsxDEV : { (type: string, props: JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes & Record & { children?: ComponentChildren;}, key?: string): VNode;

(type: ComponentType

, props: P & { children?: ComponentChildren | undefined; }, key?: string | undefined): VNode; } +>jsxDEV : { (type: string, props: JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes & Record & { children?: ComponentChildren; }, key?: string): VNode;

(type: ComponentType

, props: P & { children?: ComponentChildren | undefined; }, key?: string | undefined): VNode; } type: string, >type : string @@ -182,7 +182,7 @@ export function jsxDEV( ): VNode; export function jsxDEV

( ->jsxDEV : { (type: string, props: JSXInternal.HTMLAttributes<{}> & JSXInternal.SVGAttributes<{}> & Record & { children?: ComponentChildren | undefined; }, key?: string | undefined): VNode;

(type: ComponentType

, props: Attributes & P & { children?: ComponentChildren;}, key?: string): VNode; } +>jsxDEV : { (type: string, props: JSXInternal.HTMLAttributes<{}> & JSXInternal.SVGAttributes<{}> & Record & { children?: ComponentChildren | undefined; }, key?: string | undefined): VNode;

(type: ComponentType

, props: Attributes & P & { children?: ComponentChildren; }, key?: string): VNode; } type: ComponentType

, >type : ComponentType

diff --git a/tests/baselines/reference/jsxNamespaceImplicitImportJSXNamespace.types b/tests/baselines/reference/jsxNamespaceImplicitImportJSXNamespace.types index e8d326fbf6cc2..87a8718e7410c 100644 --- a/tests/baselines/reference/jsxNamespaceImplicitImportJSXNamespace.types +++ b/tests/baselines/reference/jsxNamespaceImplicitImportJSXNamespace.types @@ -92,7 +92,7 @@ import { JSXInternal } from '..'; >JSXInternal : any export function jsx( ->jsx : { (type: string, props: JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes & Record & { children?: ComponentChild;}, key?: string): VNode;

(type: ComponentType

, props: P & { children?: ComponentChild | undefined; }, key?: string | undefined): VNode; } +>jsx : { (type: string, props: JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes & Record & { children?: ComponentChild; }, key?: string): VNode;

(type: ComponentType

, props: P & { children?: ComponentChild | undefined; }, key?: string | undefined): VNode; } type: string, >type : string @@ -112,7 +112,7 @@ export function jsx( ): VNode; export function jsx

( ->jsx : { (type: string, props: JSXInternal.HTMLAttributes<{}> & JSXInternal.SVGAttributes<{}> & Record & { children?: ComponentChild | undefined; }, key?: string | undefined): VNode;

(type: ComponentType

, props: Attributes & P & { children?: ComponentChild;}, key?: string): VNode; } +>jsx : { (type: string, props: JSXInternal.HTMLAttributes<{}> & JSXInternal.SVGAttributes<{}> & Record & { children?: ComponentChild | undefined; }, key?: string | undefined): VNode;

(type: ComponentType

, props: Attributes & P & { children?: ComponentChild; }, key?: string): VNode; } type: ComponentType

, >type : ComponentType

@@ -128,7 +128,7 @@ export function jsx

( export function jsxs( ->jsxs : { (type: string, props: JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes & Record & { children?: ComponentChild[];}, key?: string): VNode;

(type: ComponentType

, props: P & { children?: ComponentChild[] | undefined; }, key?: string | undefined): VNode; } +>jsxs : { (type: string, props: JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes & Record & { children?: ComponentChild[]; }, key?: string): VNode;

(type: ComponentType

, props: P & { children?: ComponentChild[] | undefined; }, key?: string | undefined): VNode; } type: string, >type : string @@ -148,7 +148,7 @@ export function jsxs( ): VNode; export function jsxs

( ->jsxs : { (type: string, props: JSXInternal.HTMLAttributes<{}> & JSXInternal.SVGAttributes<{}> & Record & { children?: ComponentChild[] | undefined; }, key?: string | undefined): VNode;

(type: ComponentType

, props: Attributes & P & { children?: ComponentChild[];}, key?: string): VNode; } +>jsxs : { (type: string, props: JSXInternal.HTMLAttributes<{}> & JSXInternal.SVGAttributes<{}> & Record & { children?: ComponentChild[] | undefined; }, key?: string | undefined): VNode;

(type: ComponentType

, props: Attributes & P & { children?: ComponentChild[]; }, key?: string): VNode; } type: ComponentType

, >type : ComponentType

@@ -164,7 +164,7 @@ export function jsxs

( export function jsxDEV( ->jsxDEV : { (type: string, props: JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes & Record & { children?: ComponentChildren;}, key?: string): VNode;

(type: ComponentType

, props: P & { children?: ComponentChildren | undefined; }, key?: string | undefined): VNode; } +>jsxDEV : { (type: string, props: JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes & Record & { children?: ComponentChildren; }, key?: string): VNode;

(type: ComponentType

, props: P & { children?: ComponentChildren | undefined; }, key?: string | undefined): VNode; } type: string, >type : string @@ -184,7 +184,7 @@ export function jsxDEV( ): VNode; export function jsxDEV

( ->jsxDEV : { (type: string, props: JSXInternal.HTMLAttributes<{}> & JSXInternal.SVGAttributes<{}> & Record & { children?: ComponentChildren | undefined; }, key?: string | undefined): VNode;

(type: ComponentType

, props: Attributes & P & { children?: ComponentChildren;}, key?: string): VNode; } +>jsxDEV : { (type: string, props: JSXInternal.HTMLAttributes<{}> & JSXInternal.SVGAttributes<{}> & Record & { children?: ComponentChildren | undefined; }, key?: string | undefined): VNode;

(type: ComponentType

, props: Attributes & P & { children?: ComponentChildren; }, key?: string): VNode; } type: ComponentType

, >type : ComponentType

diff --git a/tests/baselines/reference/jsxPartialSpread.types b/tests/baselines/reference/jsxPartialSpread.types index c1646b3de6e58..15769d1e391d0 100644 --- a/tests/baselines/reference/jsxPartialSpread.types +++ b/tests/baselines/reference/jsxPartialSpread.types @@ -9,8 +9,8 @@ Symbol count: 66,500 / 66,500 (nearest 500) === jsxPartialSpread.tsx === /// const Select = (p: {value?: unknown}) =>

; ->Select : (p: { value?: unknown;}) => JSX.Element ->(p: {value?: unknown}) =>

: (p: { value?: unknown;}) => JSX.Element +>Select : (p: { value?: unknown; }) => JSX.Element +>(p: {value?: unknown}) =>

: (p: { value?: unknown; }) => JSX.Element >p : { value?: unknown; } >value : unknown >

: JSX.Element @@ -21,7 +21,7 @@ import React from 'react'; >React : typeof React export function Repro({ SelectProps = {} }: { SelectProps?: Partial[0]> }) { ->Repro : ({ SelectProps }: { SelectProps?: Partial[0]>;}) => JSX.Element +>Repro : ({ SelectProps }: { SelectProps?: Partial[0]>; }) => JSX.Element >SelectProps : Partial<{ value?: unknown; }> >{} : {} >SelectProps : Partial<{ value?: unknown; }> | undefined diff --git a/tests/baselines/reference/keyofAndForIn.types b/tests/baselines/reference/keyofAndForIn.types index fd7d6728ad909..96411eb419438 100644 --- a/tests/baselines/reference/keyofAndForIn.types +++ b/tests/baselines/reference/keyofAndForIn.types @@ -4,7 +4,7 @@ // Repro from #12513 function f1(obj: { [P in K]: T }, k: K) { ->f1 : (obj: { [P in K]: T;}, k: K) => void +>f1 : (obj: { [P in K]: T; }, k: K) => void >obj : { [P in K]: T; } >k : K diff --git a/tests/baselines/reference/keyofAndIndexedAccess.types b/tests/baselines/reference/keyofAndIndexedAccess.types index 724877840e23a..4b0e357ed37ba 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.types +++ b/tests/baselines/reference/keyofAndIndexedAccess.types @@ -657,7 +657,7 @@ function f51(k: K, s: string) { } function f52(obj: { [x: string]: boolean }, k: Exclude, s: string, n: number) { ->f52 : (obj: { [x: string]: boolean;}, k: Exclude, s: string, n: number) => void +>f52 : (obj: { [x: string]: boolean; }, k: Exclude, s: string, n: number) => void >obj : { [x: string]: boolean; } >x : string >k : Exclude @@ -684,7 +684,7 @@ function f52(obj: { [x: string]: boolean }, k: Exclude, s: s } function f53>(obj: { [x: string]: boolean }, k: K, s: string, n: number) { ->f53 : >(obj: { [x: string]: boolean;}, k: K, s: string, n: number) => void +>f53 : >(obj: { [x: string]: boolean; }, k: K, s: string, n: number) => void >obj : { [x: string]: boolean; } >x : string >k : K @@ -983,7 +983,7 @@ function f74(func: (x: T, y: U, k: K) => (T | U)[ } function f80(obj: T) { ->f80 : (obj: T) => void +>f80 : (obj: T) => void >a : { x: any; } >x : any >obj : T @@ -1034,7 +1034,7 @@ function f80(obj: T) { } function f81(obj: T) { ->f81 : (obj: T) => T["a"]["x"] +>f81 : (obj: T) => T["a"]["x"] >a : { x: any; } >x : any >obj : T @@ -1454,7 +1454,7 @@ function path(obj: any, ...keys: (string | number)[]): any { } type Thing = { ->Thing : { a: { x: number; y: string;}; b: boolean; } +>Thing : { a: { x: number; y: string; }; b: boolean; } a: { x: number, y: string }, >a : { x: number; y: string; } @@ -1725,7 +1725,7 @@ type Handler = { }; function onChangeGenericFunction(handler: Handler) { ->onChangeGenericFunction : (handler: Handler) => void +>onChangeGenericFunction : (handler: Handler) => void >handler : Handler >preset : number @@ -1782,7 +1782,7 @@ function updateIds, K extends string>( // Repro from #13285 function updateIds2( ->updateIds2 : (obj: T, key: K, stringMap: { [oldId: string]: string;}) => void +>updateIds2 : (obj: T, key: K, stringMap: { [oldId: string]: string; }) => void >x : string obj: T, @@ -1979,7 +1979,7 @@ type Example = { [K in keyof T]: T[ >prop : any type Result = Example<{ a: { prop: string }; b: { prop: number } }>; ->Result : Example<{ a: { prop: string;}; b: { prop: number;}; }> +>Result : Example<{ a: { prop: string; }; b: { prop: number; }; }> >a : { prop: string; } >prop : string >b : { prop: number; } @@ -1993,7 +1993,7 @@ type Example2 = { [K in keyof Helper2]: Helper2[K]["prop"] }; >Example2 : Example2 type Result2 = Example2<{ 1: { prop: string }; 2: { prop: number } }>; ->Result2 : Example2<{ 1: { prop: string;}; 2: { prop: number;}; }> +>Result2 : Example2<{ 1: { prop: string; }; 2: { prop: number; }; }> >1 : { prop: string; } >prop : string >2 : { prop: number; } diff --git a/tests/baselines/reference/keyofAndIndexedAccess2.types b/tests/baselines/reference/keyofAndIndexedAccess2.types index 75f8fa87095d5..e2ea8142d30c7 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess2.types +++ b/tests/baselines/reference/keyofAndIndexedAccess2.types @@ -7,7 +7,7 @@ Symbol count: 30,000 / 30,000 (nearest 500) === keyofAndIndexedAccess2.ts === function f1(obj: { a: number, b: 0 | 1, c: string }, k0: 'a', k1: 'a' | 'b', k2: 'a' | 'b' | 'c') { ->f1 : (obj: { a: number; b: 0 | 1; c: string;}, k0: 'a', k1: 'a' | 'b', k2: 'a' | 'b' | 'c') => void +>f1 : (obj: { a: number; b: 0 | 1; c: string; }, k0: 'a', k1: 'a' | 'b', k2: 'a' | 'b' | 'c') => void >obj : { a: number; b: 0 | 1; c: string; } >a : number >b : 0 | 1 @@ -81,7 +81,7 @@ function f1(obj: { a: number, b: 0 | 1, c: string }, k0: 'a', k1: 'a' | 'b', k2: } function f2(a: { x: number, y: number }, b: { [key: string]: number }, c: T, k: keyof T) { ->f2 : (a: { x: number; y: number;}, b: { [key: string]: number;}, c: T, k: keyof T) => void +>f2 : (a: { x: number; y: number; }, b: { [key: string]: number; }, c: T, k: keyof T) => void >key : string >a : { x: number; y: number; } >x : number @@ -171,7 +171,7 @@ function f2(a: { x: number, y: number }, b: } function f3(a: { [P in K]: number }, b: { [key: string]: number }, k: K) { ->f3 : (a: { [P in K]: number;}, b: { [key: string]: number;}, k: K) => void +>f3 : (a: { [P in K]: number; }, b: { [key: string]: number; }, k: K) => void >a : { [P in K]: number; } >b : { [key: string]: number; } >key : string @@ -201,7 +201,7 @@ function f3(a: { [P in K]: number }, b: { [key: string]: numbe } function f3b(a: { [P in K]: number }, b: { [P in string]: number }, k: K) { ->f3b : (a: { [P in K]: number;}, b: { [P_1 in string]: number;}, k: K) => void +>f3b : (a: { [P in K]: number; }, b: { [P_1 in string]: number; }, k: K) => void >a : { [P in K]: number; } >b : { [x: string]: number; } >k : K @@ -218,7 +218,7 @@ function f3b(a: { [P in K]: number }, b: { [P in string]: numb } function f4(a: { [key: string]: number }[K], b: number) { ->f4 : (a: { [key: string]: number;}[K], b: number) => void +>f4 : (a: { [key: string]: number; }[K], b: number) => void >a : number >key : string >b : number diff --git a/tests/baselines/reference/logicalAssignment2(target=es2015).types b/tests/baselines/reference/logicalAssignment2(target=es2015).types index 118ccaf02bbda..b3f777caebe8d 100644 --- a/tests/baselines/reference/logicalAssignment2(target=es2015).types +++ b/tests/baselines/reference/logicalAssignment2(target=es2015).types @@ -3,10 +3,10 @@ === logicalAssignment2.ts === interface A { foo: { ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | '';}; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } bar(): { ->bar : () => { baz: 0 | 1 | 42 | undefined | '';} +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } baz: 0 | 1 | 42 | undefined | '' >baz : "" | 0 | 1 | 42 | undefined diff --git a/tests/baselines/reference/logicalAssignment2(target=es2020).types b/tests/baselines/reference/logicalAssignment2(target=es2020).types index 118ccaf02bbda..b3f777caebe8d 100644 --- a/tests/baselines/reference/logicalAssignment2(target=es2020).types +++ b/tests/baselines/reference/logicalAssignment2(target=es2020).types @@ -3,10 +3,10 @@ === logicalAssignment2.ts === interface A { foo: { ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | '';}; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } bar(): { ->bar : () => { baz: 0 | 1 | 42 | undefined | '';} +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } baz: 0 | 1 | 42 | undefined | '' >baz : "" | 0 | 1 | 42 | undefined diff --git a/tests/baselines/reference/logicalAssignment2(target=es2021).types b/tests/baselines/reference/logicalAssignment2(target=es2021).types index 118ccaf02bbda..b3f777caebe8d 100644 --- a/tests/baselines/reference/logicalAssignment2(target=es2021).types +++ b/tests/baselines/reference/logicalAssignment2(target=es2021).types @@ -3,10 +3,10 @@ === logicalAssignment2.ts === interface A { foo: { ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | '';}; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } bar(): { ->bar : () => { baz: 0 | 1 | 42 | undefined | '';} +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } baz: 0 | 1 | 42 | undefined | '' >baz : "" | 0 | 1 | 42 | undefined diff --git a/tests/baselines/reference/logicalAssignment2(target=esnext).types b/tests/baselines/reference/logicalAssignment2(target=esnext).types index 118ccaf02bbda..b3f777caebe8d 100644 --- a/tests/baselines/reference/logicalAssignment2(target=esnext).types +++ b/tests/baselines/reference/logicalAssignment2(target=esnext).types @@ -3,10 +3,10 @@ === logicalAssignment2.ts === interface A { foo: { ->foo : { bar(): { baz: 0 | 1 | 42 | undefined | '';}; baz: 0 | 1 | 42 | undefined | ''; } +>foo : { bar(): { baz: 0 | 1 | 42 | undefined | ''; }; baz: 0 | 1 | 42 | undefined | ''; } bar(): { ->bar : () => { baz: 0 | 1 | 42 | undefined | '';} +>bar : () => { baz: 0 | 1 | 42 | undefined | ''; } baz: 0 | 1 | 42 | undefined | '' >baz : "" | 0 | 1 | 42 | undefined diff --git a/tests/baselines/reference/mappedToToIndexSignatureInference.types b/tests/baselines/reference/mappedToToIndexSignatureInference.types index 85f550d455aff..004dbab92f3a1 100644 --- a/tests/baselines/reference/mappedToToIndexSignatureInference.types +++ b/tests/baselines/reference/mappedToToIndexSignatureInference.types @@ -2,7 +2,7 @@ === mappedToToIndexSignatureInference.ts === declare const fn: (object: { [Key in K]: V }) => object; ->fn : (object: { [Key in K]: V;}) => object +>fn : (object: { [Key in K]: V; }) => object >object : { [Key in K]: V; } declare const a: { [index: string]: number }; diff --git a/tests/baselines/reference/mappedTypeAsClauses.types b/tests/baselines/reference/mappedTypeAsClauses.types index 2e967a73667fc..ccfb0786345e0 100644 --- a/tests/baselines/reference/mappedTypeAsClauses.types +++ b/tests/baselines/reference/mappedTypeAsClauses.types @@ -213,7 +213,7 @@ type Task = { }; type Schema = { ->Schema : { root: { title: string; task: Task;}; Task: Task; } +>Schema : { root: { title: string; task: Task; }; Task: Task; } root: { >root : { title: string; task: Task; } diff --git a/tests/baselines/reference/mappedTypeContextualTypesApplied.types b/tests/baselines/reference/mappedTypeContextualTypesApplied.types index d07a6e6678a27..1eae71605fb49 100644 --- a/tests/baselines/reference/mappedTypeContextualTypesApplied.types +++ b/tests/baselines/reference/mappedTypeContextualTypesApplied.types @@ -20,27 +20,27 @@ declare function mapped3(obj: T): void >obj : T declare function mapped4(obj: T & {[P in keyof T]: TakeString}): void; ->mapped4 : (obj: T & { [P in keyof T]: TakeString;}) => void +>mapped4 : (obj: T & { [P in keyof T]: TakeString; }) => void >obj : T & { [P in keyof T]: TakeString; } declare function mapped5(obj: T & {[P in K]: TakeString}): void; ->mapped5 : (obj: T & { [P in K]: TakeString;}) => void +>mapped5 : (obj: T & { [P in K]: TakeString; }) => void >obj : T & { [P in K]: TakeString; } declare function mapped6(obj: {[P in K]: TakeString}): void; ->mapped6 : (obj: { [P in K]: TakeString;}) => void +>mapped6 : (obj: { [P in K]: TakeString; }) => void >obj : { [P in K]: TakeString; } declare function mapped7(obj: {[P in K]: TakeString}): void; ->mapped7 : (obj: { [P in K]: TakeString;}) => void +>mapped7 : (obj: { [P in K]: TakeString; }) => void >obj : { [P in K]: TakeString; } declare function mapped8(obj: {[P in K]: TakeString}): void; ->mapped8 : (obj: { [P in K]: TakeString;}) => void +>mapped8 : (obj: { [P in K]: TakeString; }) => void >obj : { [P in K]: TakeString; } declare function mapped9(obj: {[P in K]: TakeString}): void; ->mapped9 : (obj: { [P in K]: TakeString;}) => void +>mapped9 : (obj: { [P in K]: TakeString; }) => void >obj : { [P in K]: TakeString; } mapped1({foo: s => 42}); diff --git a/tests/baselines/reference/mappedTypeGenericIndexedAccess.types b/tests/baselines/reference/mappedTypeGenericIndexedAccess.types index cb4107f6d38a3..f4f83ea50a545 100644 --- a/tests/baselines/reference/mappedTypeGenericIndexedAccess.types +++ b/tests/baselines/reference/mappedTypeGenericIndexedAccess.types @@ -4,7 +4,7 @@ // Repro from #49242 type Types = { ->Types : { first: { a1: true;}; second: { a2: true;}; third: { a3: true;}; } +>Types : { first: { a1: true; }; second: { a2: true; }; third: { a3: true; }; } first: { a1: true }; >first : { a1: true; } @@ -75,7 +75,7 @@ class Test { // Repro from #49338 type TypesMap = { ->TypesMap : { 0: { foo: 'bar';}; 1: { a: 'b';}; } +>TypesMap : { 0: { foo: 'bar'; }; 1: { a: 'b'; }; } [0]: { foo: 'bar'; }; >[0] : { foo: 'bar'; } diff --git a/tests/baselines/reference/mappedTypeInferenceAliasSubstitution.types b/tests/baselines/reference/mappedTypeInferenceAliasSubstitution.types index ed57d3d5168cd..81b8294949d7e 100644 --- a/tests/baselines/reference/mappedTypeInferenceAliasSubstitution.types +++ b/tests/baselines/reference/mappedTypeInferenceAliasSubstitution.types @@ -15,8 +15,8 @@ type Field
= { [K in A]: R } >Field : Field const f = (x: { [K in A]: Field }): R => ({} as any); ->f : (x: { [K in A]: Field;}) => R ->(x: { [K in A]: Field }): R => ({} as any) : (x: { [K in A]: Field;}) => R +>f : (x: { [K in A]: Field; }) => R +>(x: { [K in A]: Field }): R => ({} as any) : (x: { [K in A]: Field; }) => R >x : { [K in A]: Field; } >({} as any) : any >{} as any : any diff --git a/tests/baselines/reference/mappedTypeInferenceErrors.types b/tests/baselines/reference/mappedTypeInferenceErrors.types index 353799fa8baaf..77783bbedabd1 100644 --- a/tests/baselines/reference/mappedTypeInferenceErrors.types +++ b/tests/baselines/reference/mappedTypeInferenceErrors.types @@ -10,7 +10,7 @@ type ComputedOf = { } declare function foo(options: { props: P, computed: ComputedOf } & ThisType

): void; ->foo : (options: { props: P; computed: ComputedOf;} & ThisType

) => void +>foo : (options: { props: P; computed: ComputedOf; } & ThisType

) => void >options : { props: P; computed: ComputedOf; } & ThisType

>props : P >computed : ComputedOf diff --git a/tests/baselines/reference/mappedTypeModifiers.types b/tests/baselines/reference/mappedTypeModifiers.types index 02623db4bf35d..c716dae8c14ce 100644 --- a/tests/baselines/reference/mappedTypeModifiers.types +++ b/tests/baselines/reference/mappedTypeModifiers.types @@ -107,7 +107,7 @@ type Boxified = { [P in keyof T]: { x: T[P] } }; >x : T[P] type B = { a: { x: number }, b: { x: string } }; ->B : { a: { x: number;}; b: { x: string;}; } +>B : { a: { x: number; }; b: { x: string; }; } >a : { x: number; } >x : number >b : { x: string; } @@ -121,7 +121,7 @@ type BP = { a?: { x: number }, b?: { x: string } }; >x : string type BR = { readonly a: { x: number }, readonly b: { x: string } }; ->BR : { readonly a: { x: number;}; readonly b: { x: string;}; } +>BR : { readonly a: { x: number; }; readonly b: { x: string; }; } >a : { x: number; } >x : number >b : { x: string; } diff --git a/tests/baselines/reference/mappedTypeMultiInference.types b/tests/baselines/reference/mappedTypeMultiInference.types index c8661f2a38514..97491773a8ba3 100644 --- a/tests/baselines/reference/mappedTypeMultiInference.types +++ b/tests/baselines/reference/mappedTypeMultiInference.types @@ -7,7 +7,7 @@ interface Style { } declare function mergeStyleSets( ->mergeStyleSets : (...cssSets: { [P in K]?: Style;}[]) => { [P_1 in K]: Style;} +>mergeStyleSets : (...cssSets: { [P in K]?: Style; }[]) => { [P_1 in K]: Style; } ...cssSets: { [P in K]?: Style }[]): { [P in K]: Style }; >cssSets : { [P in K]?: Style; }[] diff --git a/tests/baselines/reference/mappedTypeNestedGenericInstantiation.types b/tests/baselines/reference/mappedTypeNestedGenericInstantiation.types index beb32798d42a3..5ac316f60845d 100644 --- a/tests/baselines/reference/mappedTypeNestedGenericInstantiation.types +++ b/tests/baselines/reference/mappedTypeNestedGenericInstantiation.types @@ -8,7 +8,7 @@ interface Chainable { >value : () => T mapValues(func: (v: T[keyof T]) => U): Chainable<{[k in keyof T]: U}>; ->mapValues : (func: (v: T[keyof T]) => U) => Chainable<{ [k in keyof T]: U;}> +>mapValues : (func: (v: T[keyof T]) => U) => Chainable<{ [k in keyof T]: U; }> >func : (v: T[keyof T]) => U >v : T[keyof T] } diff --git a/tests/baselines/reference/mappedTypeWithAny.types b/tests/baselines/reference/mappedTypeWithAny.types index 5d0c563123063..c68bfd2ec981b 100644 --- a/tests/baselines/reference/mappedTypeWithAny.types +++ b/tests/baselines/reference/mappedTypeWithAny.types @@ -104,7 +104,7 @@ function bar(arrayish: Arrayish, objectish: Objectish, indirectArrayis } declare function stringifyArray(arr: T): { -readonly [K in keyof T]: string }; ->stringifyArray : (arr: T) => { -readonly [K in keyof T]: string;} +>stringifyArray : (arr: T) => { -readonly [K in keyof T]: string; } >arr : T let abc: any[] = stringifyArray(void 0 as any); @@ -116,7 +116,7 @@ let abc: any[] = stringifyArray(void 0 as any); >0 : 0 declare function stringifyPair(arr: T): { -readonly [K in keyof T]: string }; ->stringifyPair : (arr: T) => { -readonly [K in keyof T]: string;} +>stringifyPair : (arr: T) => { -readonly [K in keyof T]: string; } >arr : T let def: [any, any] = stringifyPair(void 0 as any); diff --git a/tests/baselines/reference/mappedTypes1.types b/tests/baselines/reference/mappedTypes1.types index eb2e2bfdc16f4..84073bfacda57 100644 --- a/tests/baselines/reference/mappedTypes1.types +++ b/tests/baselines/reference/mappedTypes1.types @@ -77,16 +77,16 @@ type T47 = { [P in string | "a" | "b" | "0" | "1"]: void }; >T47 : { [x: string]: void; } declare function f1(): { [P in keyof T1]: void }; ->f1 : () => { [P in keyof T1]: void;} +>f1 : () => { [P in keyof T1]: void; } declare function f2(): { [P in keyof T1]: void }; ->f2 : () => { [P in keyof T1]: void;} +>f2 : () => { [P in keyof T1]: void; } declare function f3(): { [P in keyof T1]: void }; ->f3 : () => { [P in keyof T1]: void;} +>f3 : () => { [P in keyof T1]: void; } declare function f4(): { [P in keyof T1]: void }; ->f4 : () => { [P in keyof T1]: void;} +>f4 : () => { [P in keyof T1]: void; } let x1 = f1(); >x1 : {} diff --git a/tests/baselines/reference/mappedTypes4.types b/tests/baselines/reference/mappedTypes4.types index d897a9ac17103..c0f49a10d7094 100644 --- a/tests/baselines/reference/mappedTypes4.types +++ b/tests/baselines/reference/mappedTypes4.types @@ -112,7 +112,7 @@ type DeepReadonly = { }; type Foo = { ->Foo : { x: number; y: { a: string; b: number;}; z: boolean; } +>Foo : { x: number; y: { a: string; b: number; }; z: boolean; } x: number; >x : number @@ -128,7 +128,7 @@ type Foo = { }; type DeepReadonlyFoo = { ->DeepReadonlyFoo : { readonly x: number; readonly y: { readonly a: string; readonly b: number;}; readonly z: boolean; } +>DeepReadonlyFoo : { readonly x: number; readonly y: { readonly a: string; readonly b: number; }; readonly z: boolean; } readonly x: number; >x : number diff --git a/tests/baselines/reference/methodSignaturesWithOverloads.types b/tests/baselines/reference/methodSignaturesWithOverloads.types index 91f95a13b31e6..c216519d3a4bf 100644 --- a/tests/baselines/reference/methodSignaturesWithOverloads.types +++ b/tests/baselines/reference/methodSignaturesWithOverloads.types @@ -4,7 +4,7 @@ // Object type literals permit overloads with optionality but they must match var c: { ->c : { func4?(x: number): number; func4?(s: string): string; func5?: { (x: number): number; (s: string): string;}; } +>c : { func4?(x: number): number; func4?(s: string): string; func5?: { (x: number): number; (s: string): string; }; } func4?(x: number): number; >func4 : { (x: number): number; (s: string): string; } diff --git a/tests/baselines/reference/methodSignaturesWithOverloads2.types b/tests/baselines/reference/methodSignaturesWithOverloads2.types index 9ebf4942cef0c..2dead056a2c0a 100644 --- a/tests/baselines/reference/methodSignaturesWithOverloads2.types +++ b/tests/baselines/reference/methodSignaturesWithOverloads2.types @@ -4,7 +4,7 @@ // Object type literals permit overloads with optionality but they must match var c: { ->c : { func4?(x: number): number; func4?(s: string): string; func5?: { (x: number): number; (s: string): string;}; } +>c : { func4?(x: number): number; func4?(s: string): string; func5?: { (x: number): number; (s: string): string; }; } func4?(x: number): number; >func4 : { (x: number): number; (s: string): string; } diff --git a/tests/baselines/reference/mixinAccessModifiers.types b/tests/baselines/reference/mixinAccessModifiers.types index c846e81fe5a5c..86097054f2979 100644 --- a/tests/baselines/reference/mixinAccessModifiers.types +++ b/tests/baselines/reference/mixinAccessModifiers.types @@ -347,7 +347,7 @@ function f7(x: ProtectedGeneric<{}> & ProtectedGeneric<{}>) { } function f8(x: ProtectedGeneric<{a: void;}> & ProtectedGeneric2<{a:void;b:void;}>) { ->f8 : (x: ProtectedGeneric<{ a: void;}> & ProtectedGeneric2<{ a: void; b: void;}>) => void +>f8 : (x: ProtectedGeneric<{ a: void; }> & ProtectedGeneric2<{ a: void; b: void; }>) => void >x : never >a : void >a : void @@ -367,7 +367,7 @@ function f8(x: ProtectedGeneric<{a: void;}> & ProtectedGeneric2<{a:void;b:void;} } function f9(x: ProtectedGeneric<{a: void;}> & ProtectedGeneric<{a:void;b:void;}>) { ->f9 : (x: ProtectedGeneric<{ a: void;}> & ProtectedGeneric<{ a: void; b: void;}>) => void +>f9 : (x: ProtectedGeneric<{ a: void; }> & ProtectedGeneric<{ a: void; b: void; }>) => void >x : ProtectedGeneric<{ a: void; }> & ProtectedGeneric<{ a: void; b: void; }> >a : void >a : void diff --git a/tests/baselines/reference/mixinClassesAnnotated.types b/tests/baselines/reference/mixinClassesAnnotated.types index 4f84de5a7fa25..9126092a44476 100644 --- a/tests/baselines/reference/mixinClassesAnnotated.types +++ b/tests/baselines/reference/mixinClassesAnnotated.types @@ -36,8 +36,8 @@ interface Printable { } const Printable = >(superClass: T): Constructor & { message: string } & T => ->Printable : >(superClass: T) => Constructor & { message: string;} & T ->>(superClass: T): Constructor & { message: string } & T => class extends superClass { static message = "hello"; print() { const output = this.x + "," + this.y; } } : >(superClass: T) => Constructor & { message: string;} & T +>Printable : >(superClass: T) => Constructor & { message: string; } & T +>>(superClass: T): Constructor & { message: string } & T => class extends superClass { static message = "hello"; print() { const output = this.x + "," + this.y; } } : >(superClass: T) => Constructor & { message: string; } & T >superClass : T >message : string diff --git a/tests/baselines/reference/moduleAliasAsFunctionArgument.types b/tests/baselines/reference/moduleAliasAsFunctionArgument.types index 6e858346019db..4f9f176de8219 100644 --- a/tests/baselines/reference/moduleAliasAsFunctionArgument.types +++ b/tests/baselines/reference/moduleAliasAsFunctionArgument.types @@ -6,7 +6,7 @@ import a = require('moduleAliasAsFunctionArgument_0'); >a : typeof a function fn(arg: { x: number }) { ->fn : (arg: { x: number;}) => void +>fn : (arg: { x: number; }) => void >arg : { x: number; } >x : number } diff --git a/tests/baselines/reference/multiLineErrors.types b/tests/baselines/reference/multiLineErrors.types index 3b0c4d7f0b5bd..9dc84d54c2075 100644 --- a/tests/baselines/reference/multiLineErrors.types +++ b/tests/baselines/reference/multiLineErrors.types @@ -6,7 +6,7 @@ var t = 32; >32 : 32 function noReturn(): { ->noReturn : () => { n: string; y: number;} +>noReturn : () => { n: string; y: number; } n: string; >n : string diff --git a/tests/baselines/reference/multiline.types b/tests/baselines/reference/multiline.types index 14a8cc70444fd..dabfa59aacb0e 100644 --- a/tests/baselines/reference/multiline.types +++ b/tests/baselines/reference/multiline.types @@ -43,7 +43,7 @@ import * as React from "react"; >React : typeof React export function MyComponent(props: { foo: string }) { ->MyComponent : (props: { foo: string;}) => JSX.Element +>MyComponent : (props: { foo: string; }) => JSX.Element >props : { foo: string; } >foo : string diff --git a/tests/baselines/reference/narrowRefinedConstLikeParameterBIndingElementNameInInnerScope.types b/tests/baselines/reference/narrowRefinedConstLikeParameterBIndingElementNameInInnerScope.types index 16ddc0c8ad1ab..961fb16564fa5 100644 --- a/tests/baselines/reference/narrowRefinedConstLikeParameterBIndingElementNameInInnerScope.types +++ b/tests/baselines/reference/narrowRefinedConstLikeParameterBIndingElementNameInInnerScope.types @@ -2,7 +2,7 @@ === narrowRefinedConstLikeParameterBIndingElementNameInInnerScope.ts === function ff({ a, b }: { a: string | undefined, b: () => void }) { ->ff : ({ a, b }: { a: string | undefined; b: () => void;}) => void +>ff : ({ a, b }: { a: string | undefined; b: () => void; }) => void >a : string | undefined >b : () => void >a : string | undefined diff --git a/tests/baselines/reference/narrowingConstrainedTypeVariable.types b/tests/baselines/reference/narrowingConstrainedTypeVariable.types index 5552cf4b69d04..1342a335aa229 100644 --- a/tests/baselines/reference/narrowingConstrainedTypeVariable.types +++ b/tests/baselines/reference/narrowingConstrainedTypeVariable.types @@ -54,7 +54,7 @@ class E { x: string | undefined } >x : string | undefined function f3(v: T | { x: string }) { ->f3 : (v: T | { x: string;}) => void +>f3 : (v: T | { x: string; }) => void >v : T | { x: string; } >x : string diff --git a/tests/baselines/reference/narrowingDestructuring.types b/tests/baselines/reference/narrowingDestructuring.types index ed0001633944e..5e9d72dde8555 100644 --- a/tests/baselines/reference/narrowingDestructuring.types +++ b/tests/baselines/reference/narrowingDestructuring.types @@ -41,7 +41,7 @@ function func(value: T) { } type Z = { kind: "f", f: { a: number, b: string, c: number } } ->Z : { kind: "f"; f: { a: number; b: string; c: number;}; } | { kind: "g"; g: { a: string; b: number; c: string;}; } +>Z : { kind: "f"; f: { a: number; b: string; c: number; }; } | { kind: "g"; g: { a: string; b: number; c: string; }; } >kind : "f" >f : { a: number; b: string; c: number; } >a : number diff --git a/tests/baselines/reference/narrowingInCaseClauseAfterCaseClauseWithReturn.types b/tests/baselines/reference/narrowingInCaseClauseAfterCaseClauseWithReturn.types index 56380c70586ab..b91b42fa24ed9 100644 --- a/tests/baselines/reference/narrowingInCaseClauseAfterCaseClauseWithReturn.types +++ b/tests/baselines/reference/narrowingInCaseClauseAfterCaseClauseWithReturn.types @@ -116,7 +116,7 @@ function test2(arg: string | undefined) { } function test3( ->test3 : (foo: { kind: "a"; prop: string;} | { kind: "b"; prop: number;} | { kind: "c"; prop: boolean;}, bar?: { type: "b";}) => void +>test3 : (foo: { kind: "a"; prop: string; } | { kind: "b"; prop: number; } | { kind: "c"; prop: boolean; }, bar?: { type: "b"; }) => void foo: >foo : { kind: "a"; prop: string; } | { kind: "b"; prop: number; } | { kind: "c"; prop: boolean; } diff --git a/tests/baselines/reference/narrowingTypeofDiscriminant.types b/tests/baselines/reference/narrowingTypeofDiscriminant.types index d53a8c6201f8e..1ae648764521f 100644 --- a/tests/baselines/reference/narrowingTypeofDiscriminant.types +++ b/tests/baselines/reference/narrowingTypeofDiscriminant.types @@ -2,7 +2,7 @@ === narrowingTypeofDiscriminant.ts === function f1(obj: { kind: 'a', data: string } | { kind: 1, data: number }) { ->f1 : (obj: { kind: 'a'; data: string;} | { kind: 1; data: number;}) => void +>f1 : (obj: { kind: 'a'; data: string; } | { kind: 1; data: number; }) => void >obj : { kind: 'a'; data: string; } | { kind: 1; data: number; } >kind : "a" >data : string @@ -27,7 +27,7 @@ function f1(obj: { kind: 'a', data: string } | { kind: 1, data: number }) { } function f2(obj: { kind: 'a', data: string } | { kind: 1, data: number } | undefined) { ->f2 : (obj: { kind: 'a'; data: string;} | { kind: 1; data: number;} | undefined) => void +>f2 : (obj: { kind: 'a'; data: string; } | { kind: 1; data: number; } | undefined) => void >obj : { kind: 'a'; data: string; } | { kind: 1; data: number; } | undefined >kind : "a" >data : string diff --git a/tests/baselines/reference/narrowingTypeofFunction.types b/tests/baselines/reference/narrowingTypeofFunction.types index a617ee86153f0..29dd3b328efca 100644 --- a/tests/baselines/reference/narrowingTypeofFunction.types +++ b/tests/baselines/reference/narrowingTypeofFunction.types @@ -46,7 +46,7 @@ function f2(x: (T & F) | T & string) { } function f3(x: { _foo: number } & number) { ->f3 : (x: { _foo: number;} & number) => void +>f3 : (x: { _foo: number; } & number) => void >x : { _foo: number; } & number >_foo : number diff --git a/tests/baselines/reference/narrowingTypeofObject.types b/tests/baselines/reference/narrowingTypeofObject.types index 5d63781938b88..68856ab98adfd 100644 --- a/tests/baselines/reference/narrowingTypeofObject.types +++ b/tests/baselines/reference/narrowingTypeofObject.types @@ -4,7 +4,7 @@ interface F { (): string } function test(x: number & { _foo: string }) { ->test : (x: number & { _foo: string;}) => void +>test : (x: number & { _foo: string; }) => void >x : number & { _foo: string; } >_foo : string @@ -20,7 +20,7 @@ function test(x: number & { _foo: string }) { } function f1(x: F & { foo: number }) { ->f1 : (x: F & { foo: number;}) => void +>f1 : (x: F & { foo: number; }) => void >x : F & { foo: number; } >foo : number diff --git a/tests/baselines/reference/narrowingTypeofUndefined1.types b/tests/baselines/reference/narrowingTypeofUndefined1.types index 679f10ed0958d..fe100b2fb3d0c 100644 --- a/tests/baselines/reference/narrowingTypeofUndefined1.types +++ b/tests/baselines/reference/narrowingTypeofUndefined1.types @@ -2,7 +2,7 @@ === narrowingTypeofUndefined1.ts === declare const a: { error: { prop: string }, result: undefined } | { error: undefined, result: { prop: number } } ->a : { error: { prop: string;}; result: undefined; } | { error: undefined; result: { prop: number;}; } +>a : { error: { prop: string; }; result: undefined; } | { error: undefined; result: { prop: number; }; } >error : { prop: string; } >prop : string >result : undefined diff --git a/tests/baselines/reference/narrowingUnionToUnion.types b/tests/baselines/reference/narrowingUnionToUnion.types index 07ecb01d82220..1e000775e67b1 100644 --- a/tests/baselines/reference/narrowingUnionToUnion.types +++ b/tests/baselines/reference/narrowingUnionToUnion.types @@ -59,7 +59,7 @@ declare function isA(obj: unknown): obj is { a: false } | { b: 0 }; >b : 0 function fx4(obj: { b: number }) { ->fx4 : (obj: { b: number;}) => void +>fx4 : (obj: { b: number; }) => void >obj : { b: number; } >b : number @@ -591,7 +591,7 @@ type Union = >type : "b" function example1(value: Union): { type: 'a'; variant: 2 } | null { ->example1 : (value: Union) => { type: 'a'; variant: 2;} | null +>example1 : (value: Union) => { type: 'a'; variant: 2; } | null >value : Union >type : "a" >variant : 2 @@ -619,7 +619,7 @@ function example1(value: Union): { type: 'a'; variant: 2 } | null { } function example2(value: Union): { type: 'a'; variant: 2 } | null { ->example2 : (value: Union) => { type: 'a'; variant: 2;} | null +>example2 : (value: Union) => { type: 'a'; variant: 2; } | null >value : Union >type : "a" >variant : 2 @@ -653,7 +653,7 @@ function example2(value: Union): { type: 'a'; variant: 2 } | null { } function example3(value: Union): { type: 'a'; variant: 2 } | null { ->example3 : (value: Union) => { type: 'a'; variant: 2;} | null +>example3 : (value: Union) => { type: 'a'; variant: 2; } | null >value : Union >type : "a" >variant : 2 diff --git a/tests/baselines/reference/nearbyIdenticalGenericLambdasAssignable.types b/tests/baselines/reference/nearbyIdenticalGenericLambdasAssignable.types index f4b4b02016d9e..701903f38cfc4 100644 --- a/tests/baselines/reference/nearbyIdenticalGenericLambdasAssignable.types +++ b/tests/baselines/reference/nearbyIdenticalGenericLambdasAssignable.types @@ -2,7 +2,7 @@ === nearbyIdenticalGenericLambdasAssignable.ts === declare const fA: () => { v: T }; ->fA : () => { v: T;} +>fA : () => { v: T; } >v : T const fB = () => { @@ -43,7 +43,7 @@ type TC = typeof fC; >fC : () => { v: T; } type TL = () => { v: T }; ->TL : () => { v: T;} +>TL : () => { v: T; } >v : T declare function accA(x: TA): void; diff --git a/tests/baselines/reference/nestedExcessPropertyChecking.types b/tests/baselines/reference/nestedExcessPropertyChecking.types index f5f74489d2259..453ed6a5a4e7b 100644 --- a/tests/baselines/reference/nestedExcessPropertyChecking.types +++ b/tests/baselines/reference/nestedExcessPropertyChecking.types @@ -2,17 +2,17 @@ === nestedExcessPropertyChecking.ts === type A1 = { x: { a?: string } }; ->A1 : { x: { a?: string;}; } +>A1 : { x: { a?: string; }; } >x : { a?: string | undefined; } >a : string | undefined type B1 = { x: { b?: string } }; ->B1 : { x: { b?: string;}; } +>B1 : { x: { b?: string; }; } >x : { b?: string | undefined; } >b : string | undefined type C1 = { x: { c: string } }; ->C1 : { x: { c: string;}; } +>C1 : { x: { c: string; }; } >x : { c: string; } >c : string @@ -65,7 +65,7 @@ type OverridesInput = { } const foo1: Partial<{ something: any }> & { variables: { ->foo1 : Partial<{ something: any; }> & { variables: { overrides?: OverridesInput;} & Partial<{ overrides?: OverridesInput;}>; } +>foo1 : Partial<{ something: any; }> & { variables: { overrides?: OverridesInput; } & Partial<{ overrides?: OverridesInput; }>; } >something : any >variables : { overrides?: OverridesInput | undefined; } & Partial<{ overrides?: OverridesInput | undefined; }> @@ -111,10 +111,10 @@ const foo2: Unrelated & { variables: VariablesA & VariablesB } = { // Simplified repro from #52252 type T1 = { ->T1 : { primary: { __typename?: 'Feature';} & { colors: { light: number; dark: number; };}; } +>T1 : { primary: { __typename?: 'Feature'; } & { colors: { light: number; dark: number; }; }; } primary: { __typename?: 'Feature' } & { colors: { light: number, dark: number } }, ->primary : { __typename?: "Feature" | undefined; } & { colors: { light: number; dark: number;}; } +>primary : { __typename?: "Feature" | undefined; } & { colors: { light: number; dark: number; }; } >__typename : "Feature" | undefined >colors : { light: number; dark: number; } >light : number @@ -123,10 +123,10 @@ type T1 = { }; type T2 = { ->T2 : { primary: { __typename?: 'Feature';} & { colors: { light: number; };}; } +>T2 : { primary: { __typename?: 'Feature'; } & { colors: { light: number; }; }; } primary: { __typename?: 'Feature' } & { colors: { light: number } }, ->primary : { __typename?: "Feature" | undefined; } & { colors: { light: number;}; } +>primary : { __typename?: "Feature" | undefined; } & { colors: { light: number; }; } >__typename : "Feature" | undefined >colors : { light: number; } >light : number diff --git a/tests/baselines/reference/nestedTypeVariableInfersLiteral.types b/tests/baselines/reference/nestedTypeVariableInfersLiteral.types index 8a6b731287081..58d1ee291ca91 100644 --- a/tests/baselines/reference/nestedTypeVariableInfersLiteral.types +++ b/tests/baselines/reference/nestedTypeVariableInfersLiteral.types @@ -7,12 +7,12 @@ declare function direct(a: A | A[]): Record >a : A | A[] declare function nested(a: { fields: A }): Record ->nested : (a: { fields: A;}) => Record +>nested : (a: { fields: A; }) => Record >a : { fields: A; } >fields : A declare function nestedUnion(a: { fields: A | A[] }): Record ->nestedUnion : (a: { fields: A | A[];}) => Record +>nestedUnion : (a: { fields: A | A[]; }) => Record >a : { fields: A | A[]; } >fields : A | A[] @@ -57,7 +57,7 @@ const nestedUnionArray = nestedUnion({fields: ["z", "y"]}) >"y" : "y" declare function hasZField(arg: { z: string }): void ->hasZField : (arg: { z: string;}) => void +>hasZField : (arg: { z: string; }) => void >arg : { z: string; } >z : string diff --git a/tests/baselines/reference/neverAsDiscriminantType(strict=false).types b/tests/baselines/reference/neverAsDiscriminantType(strict=false).types index 65eecd6c64f48..6511b272dd0bc 100644 --- a/tests/baselines/reference/neverAsDiscriminantType(strict=false).types +++ b/tests/baselines/reference/neverAsDiscriminantType(strict=false).types @@ -153,7 +153,7 @@ export interface GatewayEvents { } function assertMessage(event: { a: 1 }) { } ->assertMessage : (event: { a: 1;}) => void +>assertMessage : (event: { a: 1; }) => void >event : { a: 1; } >a : 1 diff --git a/tests/baselines/reference/neverAsDiscriminantType(strict=true).types b/tests/baselines/reference/neverAsDiscriminantType(strict=true).types index 72521cdb8b6f5..e20cff8356d18 100644 --- a/tests/baselines/reference/neverAsDiscriminantType(strict=true).types +++ b/tests/baselines/reference/neverAsDiscriminantType(strict=true).types @@ -153,7 +153,7 @@ export interface GatewayEvents { } function assertMessage(event: { a: 1 }) { } ->assertMessage : (event: { a: 1;}) => void +>assertMessage : (event: { a: 1; }) => void >event : { a: 1; } >a : 1 diff --git a/tests/baselines/reference/neverReturningFunctions1.types b/tests/baselines/reference/neverReturningFunctions1.types index 50b9df518efa4..73baa98983661 100644 --- a/tests/baselines/reference/neverReturningFunctions1.types +++ b/tests/baselines/reference/neverReturningFunctions1.types @@ -330,7 +330,7 @@ function f30(x: string | number | undefined) { } function f31(x: { a: string | number }) { ->f31 : (x: { a: string | number;}) => void +>f31 : (x: { a: string | number; }) => void >x : { a: string | number; } >a : string | number diff --git a/tests/baselines/reference/neverTypeErrors1.types b/tests/baselines/reference/neverTypeErrors1.types index 30303f7a89268..d4bb134cffbd0 100644 --- a/tests/baselines/reference/neverTypeErrors1.types +++ b/tests/baselines/reference/neverTypeErrors1.types @@ -92,7 +92,7 @@ type Union = A & B; >Union : never function func(): { value: Union[] } { ->func : () => { value: Union[];} +>func : () => { value: Union[]; } >value : never[] return { diff --git a/tests/baselines/reference/neverTypeErrors2.types b/tests/baselines/reference/neverTypeErrors2.types index ddcb728af34a5..d88956bbf35ee 100644 --- a/tests/baselines/reference/neverTypeErrors2.types +++ b/tests/baselines/reference/neverTypeErrors2.types @@ -92,7 +92,7 @@ type Union = A & B; >Union : never function func(): { value: Union[] } { ->func : () => { value: Union[];} +>func : () => { value: Union[]; } >value : never[] return { diff --git a/tests/baselines/reference/noImplicitAnyDestructuringParameterDeclaration.types b/tests/baselines/reference/noImplicitAnyDestructuringParameterDeclaration.types index d396f867a1bde..8ada168de08bf 100644 --- a/tests/baselines/reference/noImplicitAnyDestructuringParameterDeclaration.types +++ b/tests/baselines/reference/noImplicitAnyDestructuringParameterDeclaration.types @@ -18,7 +18,7 @@ function f2([a = undefined], {b = null}, c = undefined, d = null) { // error >d : any } function f3([a]: [any], {b}: { b: any }, c: any, d: any) { ->f3 : ([a]: [any], { b }: { b: any;}, c: any, d: any) => void +>f3 : ([a]: [any], { b }: { b: any; }, c: any, d: any) => void >a : any >b : any >b : any @@ -26,7 +26,7 @@ function f3([a]: [any], {b}: { b: any }, c: any, d: any) { >d : any } function f4({b}: { b }, x: { b }) { // error in type instead ->f4 : ({ b }: { b: any;}, x: { b: any;}) => void +>f4 : ({ b }: { b: any; }, x: { b: any; }) => void >b : any >b : any >x : { b: any; } diff --git a/tests/baselines/reference/noImplicitReturnsExclusions.types b/tests/baselines/reference/noImplicitReturnsExclusions.types index 06d9bfa7d3731..5bb0fd997b8bc 100644 --- a/tests/baselines/reference/noImplicitReturnsExclusions.types +++ b/tests/baselines/reference/noImplicitReturnsExclusions.types @@ -133,7 +133,7 @@ declare class HistoryItem { >HistoryItem : HistoryItem input: { ->input : { location: { uri: string;}; } +>input : { location: { uri: string; }; } location: { >location : { uri: string; } diff --git a/tests/baselines/reference/noInfer.types b/tests/baselines/reference/noInfer.types index 0b747c064a450..a1cad7850a109 100644 --- a/tests/baselines/reference/noInfer.types +++ b/tests/baselines/reference/noInfer.types @@ -75,13 +75,13 @@ declare function foo3(a: T, b: NoInfer): void >b : NoInfer declare function foo4(a: T, b: { x: NoInfer }): void ->foo4 : (a: T, b: { x: NoInfer;}) => void +>foo4 : (a: T, b: { x: NoInfer; }) => void >a : T >b : { x: NoInfer; } >x : NoInfer declare function foo5(a: T, b: NoInfer<{ x: T }>): void ->foo5 : (a: T, b: NoInfer<{ x: T;}>) => void +>foo5 : (a: T, b: NoInfer<{ x: T; }>) => void >a : T >b : NoInfer<{ x: T; }> >x : T @@ -207,7 +207,7 @@ declare function invoke(func: (value: T) => R, value: NoInfer): R; >value : NoInfer declare function test(value: { x: number; }): number; ->test : (value: { x: number;}) => number +>test : (value: { x: number; }) => number >value : { x: number; } >x : number diff --git a/tests/baselines/reference/nodeModuleReexportFromDottedPath.types b/tests/baselines/reference/nodeModuleReexportFromDottedPath.types index 34f6e20889611..ad3363dc2b126 100644 --- a/tests/baselines/reference/nodeModuleReexportFromDottedPath.types +++ b/tests/baselines/reference/nodeModuleReexportFromDottedPath.types @@ -22,7 +22,7 @@ import { PrismaClient } from "@prisma/client"; >PrismaClient : typeof PrismaClient declare const enhancePrisma: (client: TPrismaClientCtor) => TPrismaClientCtor & { enhanced: unknown }; ->enhancePrisma : (client: TPrismaClientCtor) => TPrismaClientCtor & { enhanced: unknown;} +>enhancePrisma : (client: TPrismaClientCtor) => TPrismaClientCtor & { enhanced: unknown; } >client : TPrismaClientCtor >enhanced : unknown diff --git a/tests/baselines/reference/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=node16).types b/tests/baselines/reference/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=node16).types index fb98c821d00cd..50e64e53d4115 100644 --- a/tests/baselines/reference/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=node16).types +++ b/tests/baselines/reference/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=node16).types @@ -126,12 +126,12 @@ export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ] === /other4.ts === // Indirected attribute objecty-thing - not allowed type Attribute1 = { with: {"resolution-mode": "require"} }; ->Attribute1 : { with: { "resolution-mode": "require";}; } +>Attribute1 : { with: { "resolution-mode": "require"; }; } >with : { "resolution-mode": "require"; } >"resolution-mode" : "require" type Attribute2 = { with: {"resolution-mode": "import"} }; ->Attribute2 : { with: { "resolution-mode": "import";}; } +>Attribute2 : { with: { "resolution-mode": "import"; }; } >with : { "resolution-mode": "import"; } >"resolution-mode" : "import" diff --git a/tests/baselines/reference/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=nodenext).types b/tests/baselines/reference/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=nodenext).types index fb98c821d00cd..50e64e53d4115 100644 --- a/tests/baselines/reference/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=nodenext).types +++ b/tests/baselines/reference/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=nodenext).types @@ -126,12 +126,12 @@ export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ] === /other4.ts === // Indirected attribute objecty-thing - not allowed type Attribute1 = { with: {"resolution-mode": "require"} }; ->Attribute1 : { with: { "resolution-mode": "require";}; } +>Attribute1 : { with: { "resolution-mode": "require"; }; } >with : { "resolution-mode": "require"; } >"resolution-mode" : "require" type Attribute2 = { with: {"resolution-mode": "import"} }; ->Attribute2 : { with: { "resolution-mode": "import";}; } +>Attribute2 : { with: { "resolution-mode": "import"; }; } >with : { "resolution-mode": "import"; } >"resolution-mode" : "import" diff --git a/tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).types b/tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).types index 5e914a7c5ed02..72f68fbbd0759 100644 --- a/tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).types +++ b/tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).types @@ -124,12 +124,12 @@ export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ] === /other4.ts === // Indirected assertion objecty-thing - not allowed type Asserts1 = { assert: {"resolution-mode": "require"} }; ->Asserts1 : { assert: { "resolution-mode": "require";}; } +>Asserts1 : { assert: { "resolution-mode": "require"; }; } >assert : { "resolution-mode": "require"; } >"resolution-mode" : "require" type Asserts2 = { assert: {"resolution-mode": "import"} }; ->Asserts2 : { assert: { "resolution-mode": "import";}; } +>Asserts2 : { assert: { "resolution-mode": "import"; }; } >assert : { "resolution-mode": "import"; } >"resolution-mode" : "import" diff --git a/tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmitErrors1(module=nodenext).types b/tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmitErrors1(module=nodenext).types index 5e914a7c5ed02..72f68fbbd0759 100644 --- a/tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmitErrors1(module=nodenext).types +++ b/tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmitErrors1(module=nodenext).types @@ -124,12 +124,12 @@ export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ] === /other4.ts === // Indirected assertion objecty-thing - not allowed type Asserts1 = { assert: {"resolution-mode": "require"} }; ->Asserts1 : { assert: { "resolution-mode": "require";}; } +>Asserts1 : { assert: { "resolution-mode": "require"; }; } >assert : { "resolution-mode": "require"; } >"resolution-mode" : "require" type Asserts2 = { assert: {"resolution-mode": "import"} }; ->Asserts2 : { assert: { "resolution-mode": "import";}; } +>Asserts2 : { assert: { "resolution-mode": "import"; }; } >assert : { "resolution-mode": "import"; } >"resolution-mode" : "import" diff --git a/tests/baselines/reference/nonInstantiatedModule.types b/tests/baselines/reference/nonInstantiatedModule.types index a5d260ee8cb8e..8a5f45af7a231 100644 --- a/tests/baselines/reference/nonInstantiatedModule.types +++ b/tests/baselines/reference/nonInstantiatedModule.types @@ -77,8 +77,8 @@ var p: M2.Point; >M2 : any var p2: { Origin() : { x: number; y: number; } }; ->p2 : { Origin(): { x: number; y: number;}; } ->Origin : () => { x: number; y: number;} +>p2 : { Origin(): { x: number; y: number; }; } +>Origin : () => { x: number; y: number; } >x : number >y : number diff --git a/tests/baselines/reference/nonNullMappedType.types b/tests/baselines/reference/nonNullMappedType.types index 68daef4d785ef..029edf764b34c 100644 --- a/tests/baselines/reference/nonNullMappedType.types +++ b/tests/baselines/reference/nonNullMappedType.types @@ -2,7 +2,7 @@ === nonNullMappedType.ts === function f(p0: { [key in A]: {} | undefined }, p1: A) { ->f : (p0: { [key in A]: {} | undefined;}, p1: A) => void +>f : (p0: { [key in A]: {} | undefined; }, p1: A) => void >p0 : { [key in A]: {} | undefined; } >p1 : A diff --git a/tests/baselines/reference/objectLitTargetTypeCallSite.types b/tests/baselines/reference/objectLitTargetTypeCallSite.types index 9306fd4e2b11d..1715b893231c4 100644 --- a/tests/baselines/reference/objectLitTargetTypeCallSite.types +++ b/tests/baselines/reference/objectLitTargetTypeCallSite.types @@ -2,7 +2,7 @@ === objectLitTargetTypeCallSite.ts === function process( x: {a:number; b:string;}) { ->process : (x: { a: number; b: string;}) => number +>process : (x: { a: number; b: string; }) => number >x : { a: number; b: string; } >a : number >b : string diff --git a/tests/baselines/reference/objectLiteralContextualTyping.types b/tests/baselines/reference/objectLiteralContextualTyping.types index f4660ad8863b0..9438580da2470 100644 --- a/tests/baselines/reference/objectLiteralContextualTyping.types +++ b/tests/baselines/reference/objectLiteralContextualTyping.types @@ -71,7 +71,7 @@ var w: number; >w : number declare function bar(param: { x?: T }): T; ->bar : (param: { x?: T;}) => T +>bar : (param: { x?: T; }) => T >param : { x?: T; } >x : T diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.types b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.types index 2e198937cd484..195608a688eec 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.types +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.types @@ -18,7 +18,7 @@ var person: { name: string; id: number } = { name, id }; >id : number function foo( obj:{ name: string }): void { }; ->foo : (obj: { name: string;}) => void +>foo : (obj: { name: string; }) => void >obj : { name: string; } >name : string @@ -38,7 +38,7 @@ function bar1(name: string, id: number) { return { name }; } >name : string function baz(name: string, id: number): { name: string; id: number } { return { name, id }; } ->baz : (name: string, id: number) => { name: string; id: number;} +>baz : (name: string, id: number) => { name: string; id: number; } >name : string >id : number >name : string diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.types b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.types index 1a78c36dfb663..94f61adb39cdd 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.types +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.types @@ -18,7 +18,7 @@ var person: { name: string; id: number } = { name, id }; >id : number function foo(obj: { name: string }): void { }; ->foo : (obj: { name: string;}) => void +>foo : (obj: { name: string; }) => void >obj : { name: string; } >name : string @@ -38,7 +38,7 @@ function bar1(name: string, id: number) { return { name }; } >name : string function baz(name: string, id: number): { name: string; id: number } { return { name, id }; } ->baz : (name: string, id: number) => { name: string; id: number;} +>baz : (name: string, id: number) => { name: string; id: number; } >name : string >id : number >name : string diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.types b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.types index 6bc9502a494fe..a7bedbe7e94d9 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.types +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.types @@ -23,7 +23,7 @@ var person1: { name, id }; // ok >id : any function foo(name: string, id: number): { id: string, name: number } { return { name, id }; } // error ->foo : (name: string, id: number) => { id: string; name: number;} +>foo : (name: string, id: number) => { id: string; name: number; } >name : string >id : number >id : string @@ -33,7 +33,7 @@ function foo(name: string, id: number): { id: string, name: number } { return { >id : number function bar(obj: { name: string; id: boolean }) { } ->bar : (obj: { name: string; id: boolean;}) => void +>bar : (obj: { name: string; id: boolean; }) => void >obj : { name: string; id: boolean; } >name : string >id : boolean diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.types b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.types index 21bf2328bd27f..02f082fe98d3d 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.types +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.types @@ -18,7 +18,7 @@ var person: { b: string; id: number } = { name, id }; // error >id : number function bar(name: string, id: number): { name: number, id: string } { return { name, id }; } // error ->bar : (name: string, id: number) => { name: number; id: string;} +>bar : (name: string, id: number) => { name: number; id: string; } >name : string >id : number >name : number @@ -28,7 +28,7 @@ function bar(name: string, id: number): { name: number, id: string } { return { >id : number function foo(name: string, id: number): { name: string, id: number } { return { name, id }; } // error ->foo : (name: string, id: number) => { name: string; id: number;} +>foo : (name: string, id: number) => { name: string; id: number; } >name : string >id : number >name : string diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.types b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.types index 14ff1a5d3b86b..1af5e8ad7c279 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.types +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.types @@ -16,7 +16,7 @@ var person = { name, id }; >id : number function foo(p: { name: string; id: number }) { } ->foo : (p: { name: string; id: number;}) => void +>foo : (p: { name: string; id: number; }) => void >p : { name: string; id: number; } >name : string >id : number diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.types b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.types index 9cacfce6a94f6..68ce32813d588 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.types +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.types @@ -16,7 +16,7 @@ var person = { name, id }; >id : number function foo(p: { a: string; id: number }) { } ->foo : (p: { a: string; id: number;}) => void +>foo : (p: { a: string; id: number; }) => void >p : { a: string; id: number; } >a : string >id : number diff --git a/tests/baselines/reference/objectRest.types b/tests/baselines/reference/objectRest.types index 2bc4d9b52e516..13962f87f1ff7 100644 --- a/tests/baselines/reference/objectRest.types +++ b/tests/baselines/reference/objectRest.types @@ -58,11 +58,11 @@ var { d: renamed, ...d } = o2; >o2 : { c: string; d: string; } let nestedrest: { x: number, n1: { y: number, n2: { z: number, n3: { n4: number } } }, rest: number, restrest: number }; ->nestedrest : { x: number; n1: { y: number; n2: { z: number; n3: { n4: number; }; };}; rest: number; restrest: number; } +>nestedrest : { x: number; n1: { y: number; n2: { z: number; n3: { n4: number; }; }; }; rest: number; restrest: number; } >x : number ->n1 : { y: number; n2: { z: number; n3: { n4: number; };}; } +>n1 : { y: number; n2: { z: number; n3: { n4: number; }; }; } >y : number ->n2 : { z: number; n3: { n4: number;}; } +>n2 : { z: number; n3: { n4: number; }; } >z : number >n3 : { n4: number; } >n4 : number @@ -81,7 +81,7 @@ var { x, n1: { y, n2: { z, n3: { ...nr } } }, ...restrest } = nestedrest; >nestedrest : { x: number; n1: { y: number; n2: { z: number; n3: { n4: number; }; }; }; rest: number; restrest: number; } let complex: { x: { ka, ki }, y: number }; ->complex : { x: { ka: any; ki: any;}; y: number; } +>complex : { x: { ka: any; ki: any; }; y: number; } >x : { ka: any; ki: any; } >ka : any >ki : any diff --git a/tests/baselines/reference/objectRestAssignment.types b/tests/baselines/reference/objectRestAssignment.types index a249433db17bb..ca52bef799640 100644 --- a/tests/baselines/reference/objectRestAssignment.types +++ b/tests/baselines/reference/objectRestAssignment.types @@ -15,7 +15,7 @@ let rest: { }; >rest : {} let complex: { x: { ka, ki }, y: number }; ->complex : { x: { ka: any; ki: any;}; y: number; } +>complex : { x: { ka: any; ki: any; }; y: number; } >x : { ka: any; ki: any; } >ka : any >ki : any @@ -36,7 +36,7 @@ let complex: { x: { ka, ki }, y: number }; // should be: let overEmit: { a: { ka: string, x: string }[], b: { z: string, ki: string, ku: string }, ke: string, ko: string }; ->overEmit : { a: { ka: string; x: string;}[]; b: { z: string; ki: string; ku: string;}; ke: string; ko: string; } +>overEmit : { a: { ka: string; x: string; }[]; b: { z: string; ki: string; ku: string; }; ke: string; ko: string; } >a : { ka: string; x: string; }[] >ka : string >x : string diff --git a/tests/baselines/reference/objectRestBindingContextualInference.types b/tests/baselines/reference/objectRestBindingContextualInference.types index da614babdacad..7c7cf53be6ca8 100644 --- a/tests/baselines/reference/objectRestBindingContextualInference.types +++ b/tests/baselines/reference/objectRestBindingContextualInference.types @@ -19,7 +19,7 @@ type SetupImages = SetupImageRefs & { >SetupImages : SetupImages prepare: () => { type: K }; ->prepare : () => { type: K;} +>prepare : () => { type: K; } >type : K }; diff --git a/tests/baselines/reference/objectRestNegative.types b/tests/baselines/reference/objectRestNegative.types index e07673746fa4d..2f8f8037eaf6b 100644 --- a/tests/baselines/reference/objectRestNegative.types +++ b/tests/baselines/reference/objectRestNegative.types @@ -31,7 +31,7 @@ let notAssignable: { a: string }; function stillMustBeLast({ ...mustBeLast, a }: { a: number, b: string }): void { ->stillMustBeLast : ({ ...mustBeLast, a }: { a: number; b: string;}) => void +>stillMustBeLast : ({ ...mustBeLast, a }: { a: number; b: string; }) => void >mustBeLast : { b: string; } >a : number >a : number diff --git a/tests/baselines/reference/objectRestParameter.types b/tests/baselines/reference/objectRestParameter.types index f032216be5dac..78b299c51f4c7 100644 --- a/tests/baselines/reference/objectRestParameter.types +++ b/tests/baselines/reference/objectRestParameter.types @@ -2,7 +2,7 @@ === objectRestParameter.ts === function cloneAgain({ a, ...clone }: { a: number, b: string }): void { ->cloneAgain : ({ a, ...clone }: { a: number; b: string;}) => void +>cloneAgain : ({ a, ...clone }: { a: number; b: string; }) => void >a : number >clone : { b: string; } >a : number @@ -10,9 +10,9 @@ function cloneAgain({ a, ...clone }: { a: number, b: string }): void { } declare function suddenly(f: (a: { x: { z, ka }, y: string }) => void); ->suddenly : (f: (a: { x: { z: any; ka: any; }; y: string;}) => void) => any ->f : (a: { x: { z: any; ka: any; }; y: string;}) => void ->a : { x: { z: any; ka: any;}; y: string; } +>suddenly : (f: (a: { x: { z: any; ka: any; }; y: string; }) => void) => any +>f : (a: { x: { z: any; ka: any; }; y: string; }) => void +>a : { x: { z: any; ka: any; }; y: string; } >x : { z: any; ka: any; } >z : any >ka : any @@ -59,7 +59,7 @@ class C { >C : C m({ a, ...clone }: { a: number, b: string}): void { ->m : ({ a, ...clone }: { a: number; b: string;}) => void +>m : ({ a, ...clone }: { a: number; b: string; }) => void >a : number >clone : { b: string; } >a : number diff --git a/tests/baselines/reference/objectRestParameterES5.types b/tests/baselines/reference/objectRestParameterES5.types index 7a8c185ced5a8..fbf42584daca4 100644 --- a/tests/baselines/reference/objectRestParameterES5.types +++ b/tests/baselines/reference/objectRestParameterES5.types @@ -2,7 +2,7 @@ === objectRestParameterES5.ts === function cloneAgain({ a, ...clone }: { a: number, b: string }): void { ->cloneAgain : ({ a, ...clone }: { a: number; b: string;}) => void +>cloneAgain : ({ a, ...clone }: { a: number; b: string; }) => void >a : number >clone : { b: string; } >a : number @@ -10,9 +10,9 @@ function cloneAgain({ a, ...clone }: { a: number, b: string }): void { } declare function suddenly(f: (a: { x: { z, ka }, y: string }) => void); ->suddenly : (f: (a: { x: { z: any; ka: any; }; y: string;}) => void) => any ->f : (a: { x: { z: any; ka: any; }; y: string;}) => void ->a : { x: { z: any; ka: any;}; y: string; } +>suddenly : (f: (a: { x: { z: any; ka: any; }; y: string; }) => void) => any +>f : (a: { x: { z: any; ka: any; }; y: string; }) => void +>a : { x: { z: any; ka: any; }; y: string; } >x : { z: any; ka: any; } >z : any >ka : any @@ -59,7 +59,7 @@ class C { >C : C m({ a, ...clone }: { a: number, b: string}): void { ->m : ({ a, ...clone }: { a: number; b: string;}) => void +>m : ({ a, ...clone }: { a: number; b: string; }) => void >a : number >clone : { b: string; } >a : number diff --git a/tests/baselines/reference/objectSpread.types b/tests/baselines/reference/objectSpread.types index bdbb500e22704..2056132471e50 100644 --- a/tests/baselines/reference/objectSpread.types +++ b/tests/baselines/reference/objectSpread.types @@ -125,7 +125,7 @@ let combinedNestedChangeType: { a: number, b: boolean, c: number } = >1 : 1 let propertyNested: { a: { a: number, b: string } } = ->propertyNested : { a: { a: number; b: string;}; } +>propertyNested : { a: { a: number; b: string; }; } >a : { a: number; b: string; } >a : number >b : string @@ -176,7 +176,7 @@ type Header = { head: string, body: string, authToken: string } >authToken : string function from16326(this: { header: Header }, header: Header, authToken: string): Header { ->from16326 : (this: { header: Header;}, header: Header, authToken: string) => Header +>from16326 : (this: { header: Header; }, header: Header, authToken: string) => Header >this : { header: Header; } >header : Header >header : Header @@ -202,7 +202,7 @@ function from16326(this: { header: Header }, header: Header, authToken: string): } // boolean && T results in Partial function conditionalSpreadBoolean(b: boolean) : { x: number, y: number } { ->conditionalSpreadBoolean : (b: boolean) => { x: number; y: number;} +>conditionalSpreadBoolean : (b: boolean) => { x: number; y: number; } >b : boolean >x : number >y : number @@ -243,7 +243,7 @@ function conditionalSpreadBoolean(b: boolean) : { x: number, y: number } { >o : { x: number; y: number; } } function conditionalSpreadNumber(nt: number): { x: number, y: number } { ->conditionalSpreadNumber : (nt: number) => { x: number; y: number;} +>conditionalSpreadNumber : (nt: number) => { x: number; y: number; } >nt : number >x : number >y : number @@ -284,7 +284,7 @@ function conditionalSpreadNumber(nt: number): { x: number, y: number } { >o : { x: number; y: number; } } function conditionalSpreadString(st: string): { x: string, y: number } { ->conditionalSpreadString : (st: string) => { x: string; y: number;} +>conditionalSpreadString : (st: string) => { x: string; y: number; } >st : string >x : string >y : number @@ -396,7 +396,7 @@ let changeTypeBoth: { a: string, b: number } = // optional function container( ->container : (definiteBoolean: { sn: boolean;}, definiteString: { sn: string;}, optionalString: { sn?: string;}, optionalNumber: { sn?: number;}) => void +>container : (definiteBoolean: { sn: boolean; }, definiteString: { sn: string; }, optionalString: { sn?: string; }, optionalNumber: { sn?: number; }) => void definiteBoolean: { sn: boolean }, >definiteBoolean : { sn: boolean; } @@ -581,7 +581,7 @@ let overwriteId: { id: string, a: number, c: number, d: string } = >'no' : "no" function genericSpread(t: T, u: U, v: T | U, w: T | { s: string }, obj: { x: number }) { ->genericSpread : (t: T, u: U, v: T | U, w: T | { s: string;}, obj: { x: number;}) => void +>genericSpread : (t: T, u: U, v: T | U, w: T | { s: string; }, obj: { x: number; }) => void >t : T >u : U >v : T | U diff --git a/tests/baselines/reference/objectSpreadStrictNull.types b/tests/baselines/reference/objectSpreadStrictNull.types index eaf86742d2f2b..df703d7eaf262 100644 --- a/tests/baselines/reference/objectSpreadStrictNull.types +++ b/tests/baselines/reference/objectSpreadStrictNull.types @@ -2,7 +2,7 @@ === objectSpreadStrictNull.ts === function f( ->f : (definiteBoolean: { sn: boolean;}, definiteString: { sn: string;}, optionalString: { sn?: string;}, optionalNumber: { sn?: number;}, undefinedString: { sn: string | undefined;}, undefinedNumber: { sn: number | undefined;}) => void +>f : (definiteBoolean: { sn: boolean; }, definiteString: { sn: string; }, optionalString: { sn?: string; }, optionalNumber: { sn?: number; }, undefinedString: { sn: string | undefined; }, undefinedNumber: { sn: number | undefined; }) => void definiteBoolean: { sn: boolean }, >definiteBoolean : { sn: boolean; } diff --git a/tests/baselines/reference/operationsAvailableOnPromisedType.types b/tests/baselines/reference/operationsAvailableOnPromisedType.types index e7103e9d3eae5..2d07284266d8b 100644 --- a/tests/baselines/reference/operationsAvailableOnPromisedType.types +++ b/tests/baselines/reference/operationsAvailableOnPromisedType.types @@ -2,7 +2,7 @@ === operationsAvailableOnPromisedType.ts === async function fn( ->fn : (a: number, b: Promise, c: Promise, d: Promise<{ prop: string;}>, e: Promise<() => void>, f: Promise<() => void> | (() => void), g: Promise<{ new (): any;}>) => Promise +>fn : (a: number, b: Promise, c: Promise, d: Promise<{ prop: string; }>, e: Promise<() => void>, f: Promise<() => void> | (() => void), g: Promise<{ new (): any; }>) => Promise a: number, >a : number diff --git a/tests/baselines/reference/optionalBindingParameters2.types b/tests/baselines/reference/optionalBindingParameters2.types index 5cb87ff4686fd..0ea09ec41f767 100644 --- a/tests/baselines/reference/optionalBindingParameters2.types +++ b/tests/baselines/reference/optionalBindingParameters2.types @@ -2,7 +2,7 @@ === optionalBindingParameters2.ts === function foo({ x, y, z }?: { x: string; y: number; z: boolean }) { ->foo : ({ x, y, z }?: { x: string; y: number; z: boolean;}) => void +>foo : ({ x, y, z }?: { x: string; y: number; z: boolean; }) => void >x : string >y : number >z : boolean diff --git a/tests/baselines/reference/optionalBindingParameters4.types b/tests/baselines/reference/optionalBindingParameters4.types index 4cbc93ac73e09..12012d1d6d926 100644 --- a/tests/baselines/reference/optionalBindingParameters4.types +++ b/tests/baselines/reference/optionalBindingParameters4.types @@ -5,7 +5,7 @@ * @param {{ cause?: string }} [options] */ function foo({ cause } = {}) { ->foo : ({ cause }?: { cause?: string;}) => string +>foo : ({ cause }?: { cause?: string; }) => string >cause : string >{} : {} diff --git a/tests/baselines/reference/optionalBindingParametersInOverloads2.types b/tests/baselines/reference/optionalBindingParametersInOverloads2.types index 4201d26ee1d01..ce56071ad6092 100644 --- a/tests/baselines/reference/optionalBindingParametersInOverloads2.types +++ b/tests/baselines/reference/optionalBindingParametersInOverloads2.types @@ -2,7 +2,7 @@ === optionalBindingParametersInOverloads2.ts === function foo({ x, y, z }?: { x: string; y: number; z: boolean }); ->foo : ({ x, y, z }?: { x: string; y: number; z: boolean;}) => any +>foo : ({ x, y, z }?: { x: string; y: number; z: boolean; }) => any >x : string >y : number >z : boolean diff --git a/tests/baselines/reference/optionalChainingInference.types b/tests/baselines/reference/optionalChainingInference.types index 3d7eab09edf14..6dcd491e8a80e 100644 --- a/tests/baselines/reference/optionalChainingInference.types +++ b/tests/baselines/reference/optionalChainingInference.types @@ -3,7 +3,7 @@ === optionalChainingInference.ts === // https://github.com/microsoft/TypeScript/issues/34579 declare function unbox(box: { value: T | undefined }): T; ->unbox : (box: { value: T | undefined;}) => T +>unbox : (box: { value: T | undefined; }) => T >box : { value: T | undefined; } >value : T diff --git a/tests/baselines/reference/optionalParameterInDestructuringWithInitializer.types b/tests/baselines/reference/optionalParameterInDestructuringWithInitializer.types index 4bc4d36133a16..201ced8dd9861 100644 --- a/tests/baselines/reference/optionalParameterInDestructuringWithInitializer.types +++ b/tests/baselines/reference/optionalParameterInDestructuringWithInitializer.types @@ -9,7 +9,7 @@ declare function f(a:number,b:number): void; >b : number function func1( {a, b}: {a: number, b?: number} = {a: 1, b: 2} ) { ->func1 : ({ a, b }?: { a: number; b?: number;}) => void +>func1 : ({ a, b }?: { a: number; b?: number; }) => void >a : number >b : number | undefined >a : number @@ -30,7 +30,7 @@ function func1( {a, b}: {a: number, b?: number} = {a: 1, b: 2} ) { } function func2( {a, b = 3}: {a: number, b?:number} = {a: 1,b: 2} ) { ->func2 : ({ a, b }?: { a: number; b?: number;}) => void +>func2 : ({ a, b }?: { a: number; b?: number; }) => void >a : number >b : number >3 : 3 @@ -52,7 +52,7 @@ function func2( {a, b = 3}: {a: number, b?:number} = {a: 1,b: 2} ) { } function func3( {a, b}: {a: number, b?: number} = {a: 1} ) { ->func3 : ({ a, b }?: { a: number; b?: number;}) => void +>func3 : ({ a, b }?: { a: number; b?: number; }) => void >a : number >b : number | undefined >a : number @@ -71,7 +71,7 @@ function func3( {a, b}: {a: number, b?: number} = {a: 1} ) { } function func4( {a: {b, c}, d}: {a: {b: number,c?: number},d: number} = {a: {b: 1,c: 2},d: 3} ) { ->func4 : ({ a: { b, c }, d }?: { a: { b: number; c?: number; }; d: number;}) => void +>func4 : ({ a: { b, c }, d }?: { a: { b: number; c?: number; }; d: number; }) => void >a : any >b : number >c : number | undefined @@ -100,7 +100,7 @@ function func4( {a: {b, c}, d}: {a: {b: number,c?: number},d: number} = {a: {b: } function func5({a: {b, c = 4}, d}: {a: {b: number,c?: number},d: number} = {a: {b: 1,c: 2},d: 3} ) { ->func5 : ({ a: { b, c }, d }?: { a: { b: number; c?: number; }; d: number;}) => void +>func5 : ({ a: { b, c }, d }?: { a: { b: number; c?: number; }; d: number; }) => void >a : any >b : number >c : number @@ -130,7 +130,7 @@ function func5({a: {b, c = 4}, d}: {a: {b: number,c?: number},d: number} = {a: { } function func6( {a: {b, c} = {b: 4, c: 5}, d}: {a: {b: number, c?: number}, d: number} = {a: {b: 1,c: 2}, d: 3} ) { ->func6 : ({ a: { b, c }, d }?: { a: { b: number; c?: number; }; d: number;}) => void +>func6 : ({ a: { b, c }, d }?: { a: { b: number; c?: number; }; d: number; }) => void >a : any >b : number >c : number | undefined @@ -164,7 +164,7 @@ function func6( {a: {b, c} = {b: 4, c: 5}, d}: {a: {b: number, c?: number}, d: n } function func7( {a: {b, c = 6} = {b: 4, c: 5}, d}: {a: {b: number, c?: number}, d: number} = {a: {b: 1, c: 2}, d: 3} ) { ->func7 : ({ a: { b, c }, d }?: { a: { b: number; c?: number; }; d: number;}) => void +>func7 : ({ a: { b, c }, d }?: { a: { b: number; c?: number; }; d: number; }) => void >a : any >b : number >c : number diff --git a/tests/baselines/reference/optionalPropertiesTest.types b/tests/baselines/reference/optionalPropertiesTest.types index b77f072901808..05668b0232326 100644 --- a/tests/baselines/reference/optionalPropertiesTest.types +++ b/tests/baselines/reference/optionalPropertiesTest.types @@ -2,7 +2,7 @@ === optionalPropertiesTest.ts === var x: {p1:number; p2?:string; p3?:{():number;};}; ->x : { p1: number; p2?: string; p3?: { (): number;}; } +>x : { p1: number; p2?: string; p3?: { (): number; }; } >p1 : number >p2 : string >p3 : () => number diff --git a/tests/baselines/reference/overloadResolutionTest1.types b/tests/baselines/reference/overloadResolutionTest1.types index c3932cb7a5d54..f5ff747854c9d 100644 --- a/tests/baselines/reference/overloadResolutionTest1.types +++ b/tests/baselines/reference/overloadResolutionTest1.types @@ -2,12 +2,12 @@ === overloadResolutionTest1.ts === function foo(bar:{a:number;}[]):string; ->foo : { (bar: { a: number;}[]): string; (bar: { a: boolean; }[]): number; } +>foo : { (bar: { a: number; }[]): string; (bar: { a: boolean; }[]): number; } >bar : { a: number; }[] >a : number function foo(bar:{a:boolean;}[]):number; ->foo : { (bar: { a: number; }[]): string; (bar: { a: boolean;}[]): number; } +>foo : { (bar: { a: number; }[]): string; (bar: { a: boolean; }[]): number; } >bar : { a: boolean; }[] >a : boolean @@ -55,12 +55,12 @@ var x1111 = foo([{a:null}]); // works - ambiguous call is resolved to be the fir function foo2(bar:{a:number;}):string; ->foo2 : { (bar: { a: number;}): string; (bar: { a: boolean; }): number; } +>foo2 : { (bar: { a: number; }): string; (bar: { a: boolean; }): number; } >bar : { a: number; } >a : number function foo2(bar:{a:boolean;}):number; ->foo2 : { (bar: { a: number; }): string; (bar: { a: boolean;}): number; } +>foo2 : { (bar: { a: number; }): string; (bar: { a: boolean; }): number; } >bar : { a: boolean; } >a : boolean @@ -96,12 +96,12 @@ var x4 = foo2({a:"s"}); // error function foo4(bar:{a:number;}):number; ->foo4 : { (bar: { a: number;}): number; (bar: { a: string; }): string; } +>foo4 : { (bar: { a: number; }): number; (bar: { a: string; }): string; } >bar : { a: number; } >a : number function foo4(bar:{a:string;}):string; ->foo4 : { (bar: { a: number; }): number; (bar: { a: string;}): string; } +>foo4 : { (bar: { a: number; }): number; (bar: { a: string; }): string; } >bar : { a: string; } >a : string diff --git a/tests/baselines/reference/overloadedConstructorFixesInferencesAppropriately.types b/tests/baselines/reference/overloadedConstructorFixesInferencesAppropriately.types index 29ab9ea9b9b9b..357464ffb574d 100644 --- a/tests/baselines/reference/overloadedConstructorFixesInferencesAppropriately.types +++ b/tests/baselines/reference/overloadedConstructorFixesInferencesAppropriately.types @@ -36,7 +36,7 @@ class AsyncLoader { } function load(): Box<{ success: true } | ErrorResult> { ->load : () => Box<{ success: true;} | ErrorResult> +>load : () => Box<{ success: true; } | ErrorResult> >success : true >true : true diff --git a/tests/baselines/reference/overloadsWithProvisionalErrors.types b/tests/baselines/reference/overloadsWithProvisionalErrors.types index 2a14c1ebc497e..1f6836db17c12 100644 --- a/tests/baselines/reference/overloadsWithProvisionalErrors.types +++ b/tests/baselines/reference/overloadsWithProvisionalErrors.types @@ -2,13 +2,13 @@ === overloadsWithProvisionalErrors.ts === var func: { ->func : { (s: string): number; (lambda: (s: string) => { a: number; b: number;}): string; } +>func : { (s: string): number; (lambda: (s: string) => { a: number; b: number; }): string; } (s: string): number; >s : string (lambda: (s: string) => { a: number; b: number }): string; ->lambda : (s: string) => { a: number; b: number;} +>lambda : (s: string) => { a: number; b: number; } >s : string >a : number >b : number diff --git a/tests/baselines/reference/override19.types b/tests/baselines/reference/override19.types index 12a116f046b63..65c3dd87e8edb 100644 --- a/tests/baselines/reference/override19.types +++ b/tests/baselines/reference/override19.types @@ -6,7 +6,7 @@ type Foo = abstract new(...args: any) => any; >args : any declare function CreateMixin(Context: C, Base: T): T & { ->CreateMixin : (Context: C, Base: T) => T & { new (...args: any[]): { context: InstanceType; };} +>CreateMixin : (Context: C, Base: T) => T & { new (...args: any[]): { context: InstanceType; }; } >Context : C >Base : T diff --git a/tests/baselines/reference/parameterDestructuringObjectLiteral.types b/tests/baselines/reference/parameterDestructuringObjectLiteral.types index 1e6d378b652b3..1dc67d7524306 100644 --- a/tests/baselines/reference/parameterDestructuringObjectLiteral.types +++ b/tests/baselines/reference/parameterDestructuringObjectLiteral.types @@ -4,8 +4,8 @@ // Repro from #22644 const fn1 = (options: { headers?: {} }) => { }; ->fn1 : (options: { headers?: {};}) => void ->(options: { headers?: {} }) => { } : (options: { headers?: {};}) => void +>fn1 : (options: { headers?: {}; }) => void +>(options: { headers?: {} }) => { } : (options: { headers?: {}; }) => void >options : { headers?: {}; } >headers : {} diff --git a/tests/baselines/reference/parameterNamesInTypeParameterList.types b/tests/baselines/reference/parameterNamesInTypeParameterList.types index 4ec1e0dcbd70e..a6d7ff34b4351 100644 --- a/tests/baselines/reference/parameterNamesInTypeParameterList.types +++ b/tests/baselines/reference/parameterNamesInTypeParameterList.types @@ -13,7 +13,7 @@ function f0(a: T) { } function f1({a}: {a:T}) { ->f1 : ({ a }: { a: T;}) => void +>f1 : ({ a }: { a: T; }) => void >a : any >a : T >a : T @@ -49,7 +49,7 @@ class A { >b : any } m1({a}: {a:T}) { ->m1 : ({ a }: { a: T;}) => void +>m1 : ({ a }: { a: T; }) => void >a : any >a : T >a : T diff --git a/tests/baselines/reference/paramsOnlyHaveLiteralTypesWhenAppropriatelyContextualized.types b/tests/baselines/reference/paramsOnlyHaveLiteralTypesWhenAppropriatelyContextualized.types index fa2fc418d9c95..7683fd4f0f9ff 100644 --- a/tests/baselines/reference/paramsOnlyHaveLiteralTypesWhenAppropriatelyContextualized.types +++ b/tests/baselines/reference/paramsOnlyHaveLiteralTypesWhenAppropriatelyContextualized.types @@ -9,7 +9,7 @@ type Lower = { [K in keyof T]: T[K] }; >Lower : Lower export function appendToOptionalArray< ->appendToOptionalArray : (object: { [x in K]?: Lower[];}, key: K, value: T) => void +>appendToOptionalArray : (object: { [x in K]?: Lower[]; }, key: K, value: T) => void K extends string | number | symbol, T diff --git a/tests/baselines/reference/parserShorthandPropertyAssignment1.types b/tests/baselines/reference/parserShorthandPropertyAssignment1.types index 7016f3a1103f2..3abe0b9d04896 100644 --- a/tests/baselines/reference/parserShorthandPropertyAssignment1.types +++ b/tests/baselines/reference/parserShorthandPropertyAssignment1.types @@ -2,7 +2,7 @@ === parserShorthandPropertyAssignment1.ts === function foo(obj: { name?: string; id: number }) { } ->foo : (obj: { name?: string; id: number;}) => void +>foo : (obj: { name?: string; id: number; }) => void >obj : { name?: string; id: number; } >name : string >id : number diff --git a/tests/baselines/reference/parserharness.types b/tests/baselines/reference/parserharness.types index ff43b96823419..d1be097c9cdf7 100644 --- a/tests/baselines/reference/parserharness.types +++ b/tests/baselines/reference/parserharness.types @@ -2260,7 +2260,7 @@ module Harness { >[] : undefined[] var timeFunction: ( ->timeFunction : (benchmark: Benchmark, description?: string, name?: string, f?: (bench?: { (): void;}) => void) => void +>timeFunction : (benchmark: Benchmark, description?: string, name?: string, f?: (bench?: { (): void; }) => void) => void benchmark: Benchmark, >benchmark : Benchmark @@ -2272,7 +2272,7 @@ module Harness { >name : string f?: (bench?: { (): void; }) => void ->f : (bench?: { (): void;}) => void +>f : (bench?: { (): void; }) => void >bench : () => void ) => void; @@ -2727,7 +2727,7 @@ module Harness { >{} : {} public toArray(): { filename: string; file: WriterAggregator; }[] { ->toArray : () => { filename: string; file: WriterAggregator;}[] +>toArray : () => { filename: string; file: WriterAggregator; }[] >filename : string >file : WriterAggregator @@ -5872,7 +5872,7 @@ module Harness { /** Given a test file containing // @Filename directives, return an array of named units of code to be added to an existing compiler instance */ export function makeUnitsFromTest(code: string, filename: string): { settings: CompilerSetting[]; testUnitData: TestUnitData[]; } { ->makeUnitsFromTest : (code: string, filename: string) => { settings: CompilerSetting[]; testUnitData: TestUnitData[];} +>makeUnitsFromTest : (code: string, filename: string) => { settings: CompilerSetting[]; testUnitData: TestUnitData[]; } >code : string >filename : string >settings : CompilerSetting[] @@ -7330,7 +7330,7 @@ module Harness { >[] : undefined[] function mapEdits(edits: Services.TextEdit[]): { edit: Services.TextEdit; index: number; }[] { ->mapEdits : (edits: Services.TextEdit[]) => { edit: Services.TextEdit; index: number;}[] +>mapEdits : (edits: Services.TextEdit[]) => { edit: Services.TextEdit; index: number; }[] >edits : Services.TextEdit[] >Services : any >edit : Services.TextEdit diff --git a/tests/baselines/reference/primitiveUnionDetection.types b/tests/baselines/reference/primitiveUnionDetection.types index d51a4d85e43b2..9fee80db19e17 100644 --- a/tests/baselines/reference/primitiveUnionDetection.types +++ b/tests/baselines/reference/primitiveUnionDetection.types @@ -7,7 +7,7 @@ type Kind = "one" | "two" | "three"; >Kind : "one" | "two" | "three" declare function getInterfaceFromString(options?: { type?: T } & { type?: Kind }): T; ->getInterfaceFromString : (options?: { type?: T;} & { type?: Kind;}) => T +>getInterfaceFromString : (options?: { type?: T; } & { type?: Kind; }) => T >options : ({ type?: T | undefined; } & { type?: Kind | undefined; }) | undefined >type : T | undefined >type : Kind | undefined diff --git a/tests/baselines/reference/privateNameAndPropertySignature.types b/tests/baselines/reference/privateNameAndPropertySignature.types index 407afa6299569..b2c219d5ec55b 100644 --- a/tests/baselines/reference/privateNameAndPropertySignature.types +++ b/tests/baselines/reference/privateNameAndPropertySignature.types @@ -20,7 +20,7 @@ interface B { } declare const x: { ->x : { bar: { #baz: string; #taz(): string;}; } +>x : { bar: { #baz: string; #taz(): string; }; } #foo: number; >#foo : number @@ -40,7 +40,7 @@ declare const x: { }; declare const y: [{ qux: { #quux: 3 } }]; ->y : [{ qux: { #quux: 3;}; }] +>y : [{ qux: { #quux: 3; }; }] >qux : {} >#quux : 3 diff --git a/tests/baselines/reference/privateNameInLhsReceiverExpression.types b/tests/baselines/reference/privateNameInLhsReceiverExpression.types index 68300b742b0a4..550cf97a76157 100644 --- a/tests/baselines/reference/privateNameInLhsReceiverExpression.types +++ b/tests/baselines/reference/privateNameInLhsReceiverExpression.types @@ -9,7 +9,7 @@ class Test { >123 : 123 static something(obj: { [key: string]: Test }) { ->something : (obj: { [key: string]: Test;}) => void +>something : (obj: { [key: string]: Test; }) => void >obj : { [key: string]: Test; } >key : string diff --git a/tests/baselines/reference/privateWriteOnlyAccessorRead.types b/tests/baselines/reference/privateWriteOnlyAccessorRead.types index 4a06eaf2fb0d0..4119fe079c3d6 100644 --- a/tests/baselines/reference/privateWriteOnlyAccessorRead.types +++ b/tests/baselines/reference/privateWriteOnlyAccessorRead.types @@ -5,8 +5,8 @@ class Test { >Test : Test set #value(v: { foo: { bar: number } }) {} ->#value : { foo: { bar: number;}; } ->v : { foo: { bar: number;}; } +>#value : { foo: { bar: number; }; } +>v : { foo: { bar: number; }; } >foo : { bar: number; } >bar : number diff --git a/tests/baselines/reference/promisePermutations.types b/tests/baselines/reference/promisePermutations.types index c6285ce98e789..67be609460fec 100644 --- a/tests/baselines/reference/promisePermutations.types +++ b/tests/baselines/reference/promisePermutations.types @@ -109,11 +109,11 @@ declare function testFunctionP(): Promise; >testFunctionP : () => Promise declare function testFunction2(): IPromise<{ x: number }>; ->testFunction2 : () => IPromise<{ x: number;}> +>testFunction2 : () => IPromise<{ x: number; }> >x : number declare function testFunction2P(): Promise<{ x: number }>; ->testFunction2P : () => Promise<{ x: number;}> +>testFunction2P : () => Promise<{ x: number; }> >x : number declare function testFunction3(x: number): IPromise; diff --git a/tests/baselines/reference/promisePermutations2.types b/tests/baselines/reference/promisePermutations2.types index 034f4f1913ae2..90f0c2e65f5ce 100644 --- a/tests/baselines/reference/promisePermutations2.types +++ b/tests/baselines/reference/promisePermutations2.types @@ -84,11 +84,11 @@ declare function testFunctionP(): Promise; >testFunctionP : () => Promise declare function testFunction2(): IPromise<{ x: number }>; ->testFunction2 : () => IPromise<{ x: number;}> +>testFunction2 : () => IPromise<{ x: number; }> >x : number declare function testFunction2P(): Promise<{ x: number }>; ->testFunction2P : () => Promise<{ x: number;}> +>testFunction2P : () => Promise<{ x: number; }> >x : number declare function testFunction3(x: number): IPromise; diff --git a/tests/baselines/reference/promisePermutations3.types b/tests/baselines/reference/promisePermutations3.types index ac2d8a3ed83d1..e648a4f5c1e9b 100644 --- a/tests/baselines/reference/promisePermutations3.types +++ b/tests/baselines/reference/promisePermutations3.types @@ -84,11 +84,11 @@ declare function testFunctionP(): Promise; >testFunctionP : () => Promise declare function testFunction2(): IPromise<{ x: number }>; ->testFunction2 : () => IPromise<{ x: number;}> +>testFunction2 : () => IPromise<{ x: number; }> >x : number declare function testFunction2P(): Promise<{ x: number }>; ->testFunction2P : () => Promise<{ x: number;}> +>testFunction2P : () => Promise<{ x: number; }> >x : number declare function testFunction3(x: number): IPromise; diff --git a/tests/baselines/reference/propertyAccessChain.2.types b/tests/baselines/reference/propertyAccessChain.2.types index df69f1eaa584c..d53471cb65558 100644 --- a/tests/baselines/reference/propertyAccessChain.2.types +++ b/tests/baselines/reference/propertyAccessChain.2.types @@ -11,7 +11,7 @@ o1?.b; >b : string declare const o2: undefined | { b: { c: string } }; ->o2 : { b: { c: string;}; } +>o2 : { b: { c: string; }; } >b : { c: string; } >c : string @@ -23,7 +23,7 @@ o2?.b.c; >c : string declare const o3: { b: undefined | { c: string } }; ->o3 : { b: undefined | { c: string;}; } +>o3 : { b: undefined | { c: string; }; } >b : { c: string; } >c : string diff --git a/tests/baselines/reference/propertyAccessChain.types b/tests/baselines/reference/propertyAccessChain.types index c951fcc920c8f..d3abc74c21557 100644 --- a/tests/baselines/reference/propertyAccessChain.types +++ b/tests/baselines/reference/propertyAccessChain.types @@ -11,7 +11,7 @@ o1?.b; >b : string | undefined declare const o2: undefined | { b: { c: string } }; ->o2 : { b: { c: string;}; } | undefined +>o2 : { b: { c: string; }; } | undefined >b : { c: string; } >c : string @@ -23,7 +23,7 @@ o2?.b.c; >c : string | undefined declare const o3: { b: undefined | { c: string } }; ->o3 : { b: undefined | { c: string;}; } +>o3 : { b: undefined | { c: string; }; } >b : { c: string; } | undefined >c : string @@ -35,8 +35,8 @@ o3.b?.c; >c : string | undefined declare const o4: { b?: { c: { d?: { e: string } } } }; ->o4 : { b?: { c: { d?: { e: string; };}; } | undefined; } ->b : { c: { d?: { e: string; };}; } | undefined +>o4 : { b?: { c: { d?: { e: string; }; }; } | undefined; } +>b : { c: { d?: { e: string; }; }; } | undefined >c : { d?: { e: string; } | undefined; } >d : { e: string; } | undefined >e : string @@ -53,8 +53,8 @@ o4.b?.c.d?.e; >e : string | undefined declare const o5: { b?(): { c: { d?: { e: string } } } }; ->o5 : { b?(): { c: { d?: { e: string; }; };}; } ->b : (() => { c: { d?: { e: string; }; };}) | undefined +>o5 : { b?(): { c: { d?: { e: string; }; }; }; } +>b : (() => { c: { d?: { e: string; }; }; }) | undefined >c : { d?: { e: string; } | undefined; } >d : { e: string; } | undefined >e : string @@ -73,7 +73,7 @@ o5.b?.().c.d?.e; // GH#33744 declare const o6: () => undefined | ({ x: number }); ->o6 : () => undefined | ({ x: number;}) +>o6 : () => undefined | ({ x: number; }) >x : number o6()?.x; diff --git a/tests/baselines/reference/propertyAccessWidening.types b/tests/baselines/reference/propertyAccessWidening.types index c5f329ffffa65..cabba91b9edd7 100644 --- a/tests/baselines/reference/propertyAccessWidening.types +++ b/tests/baselines/reference/propertyAccessWidening.types @@ -56,7 +56,7 @@ function g2(headerNames: any) { // Object in property or element access is widened when target of assignment function foo(options?: { a: string, b: number }) { ->foo : (options?: { a: string; b: number;}) => void +>foo : (options?: { a: string; b: number; }) => void >options : { a: string; b: number; } | undefined >a : string >b : number diff --git a/tests/baselines/reference/ramdaToolsNoInfinite2.types b/tests/baselines/reference/ramdaToolsNoInfinite2.types index 59fe8478f7c40..efa2e2f807280 100644 --- a/tests/baselines/reference/ramdaToolsNoInfinite2.types +++ b/tests/baselines/reference/ramdaToolsNoInfinite2.types @@ -428,7 +428,7 @@ declare module "Number/_Internal" { >NegativeIterationKeys : "-40" | "-39" | "-38" | "-37" | "-36" | "-35" | "-34" | "-33" | "-32" | "-31" | "-30" | "-29" | "-28" | "-27" | "-26" | "-25" | "-24" | "-23" | "-22" | "-21" | "-20" | "-19" | "-18" | "-17" | "-16" | "-15" | "-14" | "-13" | "-12" | "-11" | "-10" | "-9" | "-8" | "-7" | "-6" | "-5" | "-4" | "-3" | "-2" | "-1" export type Numbers = { ->Numbers : { string: { 'all': Format; '+': Format; '-': Format; '0': Format;}; number: { 'all': Format; '+': Format; '-': Format; '0': Format;}; } +>Numbers : { string: { 'all': Format; '+': Format; '-': Format; '0': Format; }; number: { 'all': Format; '+': Format; '-': Format; '0': Format; }; } 'string': { >'string' : { all: Format; '+': Format; '-': Format; '0': Format; } diff --git a/tests/baselines/reference/reactReadonlyHOCAssignabilityReal.types b/tests/baselines/reference/reactReadonlyHOCAssignabilityReal.types index d4567d80252c0..4c0d6901972af 100644 --- a/tests/baselines/reference/reactReadonlyHOCAssignabilityReal.types +++ b/tests/baselines/reference/reactReadonlyHOCAssignabilityReal.types @@ -12,7 +12,7 @@ import * as React from "react"; >React : typeof React function myHigherOrderComponent

(Inner: React.ComponentClass

): React.ComponentClass

{ ->myHigherOrderComponent :

(Inner: React.ComponentClass

) => React.ComponentClass

+>myHigherOrderComponent :

(Inner: React.ComponentClass

) => React.ComponentClass

>Inner : React.ComponentClass

>React : any >name : string diff --git a/tests/baselines/reference/readonlyAssignmentInSubclassOfClassExpression.types b/tests/baselines/reference/readonlyAssignmentInSubclassOfClassExpression.types index a423b23f3b2ab..d17d413d3b159 100644 --- a/tests/baselines/reference/readonlyAssignmentInSubclassOfClassExpression.types +++ b/tests/baselines/reference/readonlyAssignmentInSubclassOfClassExpression.types @@ -4,7 +4,7 @@ class C extends (class {} as new () => Readonly<{ attrib: number }>) { >C : C >(class {} as new () => Readonly<{ attrib: number }>) : Readonly<{ attrib: number; }> ->class {} as new () => Readonly<{ attrib: number }> : new () => Readonly<{ attrib: number;}> +>class {} as new () => Readonly<{ attrib: number }> : new () => Readonly<{ attrib: number; }> >class {} : typeof (Anonymous class) >attrib : number diff --git a/tests/baselines/reference/recursiveClassBaseType.types b/tests/baselines/reference/recursiveClassBaseType.types index e32597c4977fa..47ee66380958f 100644 --- a/tests/baselines/reference/recursiveClassBaseType.types +++ b/tests/baselines/reference/recursiveClassBaseType.types @@ -8,7 +8,7 @@ declare const p: (fn: () => T) => T; >fn : () => T declare const Base: (val: T) => { new(): T }; ->Base : (val: T) => { new (): T;} +>Base : (val: T) => { new (): T; } >val : T class C extends Base({ x: p(() => []) }) { } diff --git a/tests/baselines/reference/recursiveConditionalEvaluationNonInfinite.types b/tests/baselines/reference/recursiveConditionalEvaluationNonInfinite.types index e52471ec61316..5463193c612b3 100644 --- a/tests/baselines/reference/recursiveConditionalEvaluationNonInfinite.types +++ b/tests/baselines/reference/recursiveConditionalEvaluationNonInfinite.types @@ -10,7 +10,7 @@ declare const x: Test; >x : { array: { notArray: number; }; } const y: { array: { notArray: number } } = x; // Error ->y : { array: { notArray: number;}; } +>y : { array: { notArray: number; }; } >array : { notArray: number; } >notArray : number >x : { array: { notArray: number; }; } diff --git a/tests/baselines/reference/recursiveConditionalTypes.types b/tests/baselines/reference/recursiveConditionalTypes.types index 23921e4713aaf..fbf35f1102ab5 100644 --- a/tests/baselines/reference/recursiveConditionalTypes.types +++ b/tests/baselines/reference/recursiveConditionalTypes.types @@ -186,8 +186,8 @@ declare let b3: InfBox; >b3 : InfBox declare let b4: { value: { value: { value: typeof b4 }}}; ->b4 : { value: { value: { value: typeof b4; };}; } ->value : { value: { value: typeof b4;}; } +>b4 : { value: { value: { value: typeof b4; }; }; } +>value : { value: { value: typeof b4; }; } >value : { value: typeof b4; } >value : { value: { value: { value: typeof b4; }; }; } >b4 : { value: { value: { value: any; }; }; } diff --git a/tests/baselines/reference/returnTypeTypeArguments.types b/tests/baselines/reference/returnTypeTypeArguments.types index d1f68991fc63d..78c518550bd07 100644 --- a/tests/baselines/reference/returnTypeTypeArguments.types +++ b/tests/baselines/reference/returnTypeTypeArguments.types @@ -137,7 +137,7 @@ class X } declare var a: { ->a : { p1: () => X; p2: { [idx: number]: X;}; p3: X[]; p4: I; p5: any; p6: () => Y; p7: { [idx: number]: Y;}; p8: Y[]; p9: I; pa: any; } +>a : { p1: () => X; p2: { [idx: number]: X; }; p3: X[]; p4: I; p5: any; p6: () => Y; p7: { [idx: number]: Y; }; p8: Y[]; p9: I; pa: any; } p1: () => X; >p1 : () => any diff --git a/tests/baselines/reference/reverseMappedPartiallyInferableTypes.types b/tests/baselines/reference/reverseMappedPartiallyInferableTypes.types index aa0aa474b269a..eac9cbd9b1c25 100644 --- a/tests/baselines/reference/reverseMappedPartiallyInferableTypes.types +++ b/tests/baselines/reference/reverseMappedPartiallyInferableTypes.types @@ -47,7 +47,7 @@ export type PropsDefinition = RecordPropsDefinition; declare function extend({ props }: { props: PropsDefinition }): PropsDefinition; ->extend : ({ props }: { props: PropsDefinition;}) => PropsDefinition +>extend : ({ props }: { props: PropsDefinition; }) => PropsDefinition >props : RecordPropsDefinition >props : RecordPropsDefinition diff --git a/tests/baselines/reference/reverseMappedTypeAssignableToIndex.types b/tests/baselines/reference/reverseMappedTypeAssignableToIndex.types index fef68cb2482e3..31eb0b385d2fd 100644 --- a/tests/baselines/reference/reverseMappedTypeAssignableToIndex.types +++ b/tests/baselines/reference/reverseMappedTypeAssignableToIndex.types @@ -21,7 +21,7 @@ type LiteralType = { >second : "second" } type MappedLiteralType = { ->MappedLiteralType : { first: { name: "first";}; second: { name: "second";}; } +>MappedLiteralType : { first: { name: "first"; }; second: { name: "second"; }; } first: { name: "first" }, >first : { name: "first"; } diff --git a/tests/baselines/reference/reverseMappedTypeIntersectionConstraint.types b/tests/baselines/reference/reverseMappedTypeIntersectionConstraint.types index b1a4b68905b2b..24db633ad1be1 100644 --- a/tests/baselines/reference/reverseMappedTypeIntersectionConstraint.types +++ b/tests/baselines/reference/reverseMappedTypeIntersectionConstraint.types @@ -217,7 +217,7 @@ declare function foo(props: {[K in keyof T & keyof XNumber]: >props : { [K in keyof T & "x"]: T[K]; } function bar(props: {x: number, y: string}) { ->bar : (props: { x: number; y: string;}) => void +>bar : (props: { x: number; y: string; }) => void >props : { x: number; y: string; } >x : number >y : string @@ -381,7 +381,7 @@ type NoExtra = { } declare function createXMachine< ->createXMachine : , TActor extends ProvidedActor = TConfig extends { types: { actors: ProvidedActor;}; } ? TConfig["types"]["actors"] : ProvidedActor>(config: { [K in keyof MachineConfig & keyof TConfig]: TConfig[K]; }) => TConfig +>createXMachine : , TActor extends ProvidedActor = TConfig extends { types: { actors: ProvidedActor; }; } ? TConfig["types"]["actors"] : ProvidedActor>(config: { [K in keyof MachineConfig & keyof TConfig]: TConfig[K]; }) => TConfig const TConfig extends MachineConfig, TActor extends ProvidedActor = TConfig extends { types: { actors: ProvidedActor} } ? TConfig["types"]["actors"] : ProvidedActor, @@ -401,14 +401,14 @@ const child = () => Promise.resolve("foo"); >"foo" : "foo" const config = createXMachine({ ->config : { types: { actors: { src: "str"; logic: typeof child; };}; invoke: { readonly src: "str"; }; } ->createXMachine({ types: {} as { actors: { src: "str"; logic: typeof child; }; }, invoke: { src: "str", }, extra: 10}) : { types: { actors: { src: "str"; logic: typeof child; };}; invoke: { readonly src: "str"; }; } +>config : { types: { actors: { src: "str"; logic: typeof child; }; }; invoke: { readonly src: "str"; }; } +>createXMachine({ types: {} as { actors: { src: "str"; logic: typeof child; }; }, invoke: { src: "str", }, extra: 10}) : { types: { actors: { src: "str"; logic: typeof child; }; }; invoke: { readonly src: "str"; }; } >createXMachine : , TActor extends ProvidedActor = TConfig extends { types: { actors: ProvidedActor; }; } ? TConfig["types"]["actors"] : ProvidedActor>(config: { [K in keyof MachineConfig & keyof TConfig]: TConfig[K]; }) => TConfig ->{ types: {} as { actors: { src: "str"; logic: typeof child; }; }, invoke: { src: "str", }, extra: 10} : { types: { actors: { src: "str"; logic: typeof child; };}; invoke: { src: "str"; }; extra: number; } +>{ types: {} as { actors: { src: "str"; logic: typeof child; }; }, invoke: { src: "str", }, extra: 10} : { types: { actors: { src: "str"; logic: typeof child; }; }; invoke: { src: "str"; }; extra: number; } types: {} as { ->types : { actors: { src: "str"; logic: typeof child;}; } ->{} as { actors: { src: "str"; logic: typeof child; }; } : { actors: { src: "str"; logic: typeof child;}; } +>types : { actors: { src: "str"; logic: typeof child; }; } +>{} as { actors: { src: "str"; logic: typeof child; }; } : { actors: { src: "str"; logic: typeof child; }; } >{} : {} actors: { diff --git a/tests/baselines/reference/reverseMappedTypePrimitiveConstraintProperty.types b/tests/baselines/reference/reverseMappedTypePrimitiveConstraintProperty.types index 00b671a8a748b..cdeaf08e4e3b8 100644 --- a/tests/baselines/reference/reverseMappedTypePrimitiveConstraintProperty.types +++ b/tests/baselines/reference/reverseMappedTypePrimitiveConstraintProperty.types @@ -2,7 +2,7 @@ === reverseMappedTypePrimitiveConstraintProperty.ts === declare function test< ->test : (obj: { [K in keyof T]: T[K]; }) => T +>test : (obj: { [K in keyof T]: T[K]; }) => T T extends { prop: string; nested: { nestedProp: string } }, >prop : string diff --git a/tests/baselines/reference/reverseMappedUnionInference.types b/tests/baselines/reference/reverseMappedUnionInference.types index c2614e63d5593..6eb20a8c8ce1d 100644 --- a/tests/baselines/reference/reverseMappedUnionInference.types +++ b/tests/baselines/reference/reverseMappedUnionInference.types @@ -22,7 +22,7 @@ interface Extractor { } declare function createExtractor(params: { ->createExtractor : (params: { matcher: (node: unknown) => node is T; extract: (node: T) => Result;}) => Extractor +>createExtractor : (params: { matcher: (node: unknown) => node is T; extract: (node: T) => Result; }) => Extractor >params : { matcher: (node: unknown) => node is T; extract: (node: T) => Result; } matcher: (node: unknown) => node is T; diff --git a/tests/baselines/reference/slightlyIndirectedDeepObjectLiteralElaborations.types b/tests/baselines/reference/slightlyIndirectedDeepObjectLiteralElaborations.types index c646f9ff828ef..1f7fd07a4e721 100644 --- a/tests/baselines/reference/slightlyIndirectedDeepObjectLiteralElaborations.types +++ b/tests/baselines/reference/slightlyIndirectedDeepObjectLiteralElaborations.types @@ -3,10 +3,10 @@ === slightlyIndirectedDeepObjectLiteralElaborations.ts === interface Foo { a: { ->a : { b: { c: { d: string; };}; } +>a : { b: { c: { d: string; }; }; } b: { ->b : { c: { d: string;}; } +>b : { c: { d: string; }; } c: { >c : { d: string; } diff --git a/tests/baselines/reference/specializedSignatureOverloadReturnTypeWithIndexers.types b/tests/baselines/reference/specializedSignatureOverloadReturnTypeWithIndexers.types index f6643f5281bf2..2a798477a1880 100644 --- a/tests/baselines/reference/specializedSignatureOverloadReturnTypeWithIndexers.types +++ b/tests/baselines/reference/specializedSignatureOverloadReturnTypeWithIndexers.types @@ -3,45 +3,45 @@ === specializedSignatureOverloadReturnTypeWithIndexers.ts === interface A { f(p: string): { [p: string]: string; }; ->f : { (p: string): { [p: string]: string;}; (p: "spec"): { [p: string]: any; }; } +>f : { (p: string): { [p: string]: string; }; (p: "spec"): { [p: string]: any; }; } >p : string >p : string f(p: "spec"): { [p: string]: any; } // Should be ok ->f : { (p: string): { [p: string]: string; }; (p: "spec"): { [p: string]: any;}; } +>f : { (p: string): { [p: string]: string; }; (p: "spec"): { [p: string]: any; }; } >p : "spec" >p : string } interface B { f(p: string): { [p: number]: string; }; ->f : { (p: string): { [p: number]: string;}; (p: "spec"): { [p: string]: any; }; } +>f : { (p: string): { [p: number]: string; }; (p: "spec"): { [p: string]: any; }; } >p : string >p : number f(p: "spec"): { [p: string]: any; } // Should be ok ->f : { (p: string): { [p: number]: string; }; (p: "spec"): { [p: string]: any;}; } +>f : { (p: string): { [p: number]: string; }; (p: "spec"): { [p: string]: any; }; } >p : "spec" >p : string } interface C { f(p: string): { [p: number]: string; }; ->f : { (p: string): { [p: number]: string;}; (p: "spec"): { [p: number]: any; }; } +>f : { (p: string): { [p: number]: string; }; (p: "spec"): { [p: number]: any; }; } >p : string >p : number f(p: "spec"): { [p: number]: any; } // Should be ok ->f : { (p: string): { [p: number]: string; }; (p: "spec"): { [p: number]: any;}; } +>f : { (p: string): { [p: number]: string; }; (p: "spec"): { [p: number]: any; }; } >p : "spec" >p : number } interface D { f(p: string): { [p: string]: string; }; ->f : { (p: string): { [p: string]: string;}; (p: "spec"): { [p: number]: any; }; } +>f : { (p: string): { [p: string]: string; }; (p: "spec"): { [p: number]: any; }; } >p : string >p : string f(p: "spec"): { [p: number]: any; } // Should be error ->f : { (p: string): { [p: string]: string; }; (p: "spec"): { [p: number]: any;}; } +>f : { (p: string): { [p: string]: string; }; (p: "spec"): { [p: number]: any; }; } >p : "spec" >p : number } diff --git a/tests/baselines/reference/spellingSuggestionJSXAttribute.types b/tests/baselines/reference/spellingSuggestionJSXAttribute.types index 1b1e90b784cb4..9338b2b7e9331 100644 --- a/tests/baselines/reference/spellingSuggestionJSXAttribute.types +++ b/tests/baselines/reference/spellingSuggestionJSXAttribute.types @@ -12,7 +12,7 @@ import * as React from "react"; >React : typeof React function MyComp2(props: { className?: string, htmlFor?: string }) { ->MyComp2 : (props: { className?: string; htmlFor?: string;}) => any +>MyComp2 : (props: { className?: string; htmlFor?: string; }) => any >props : { className?: string; htmlFor?: string; } >className : string >htmlFor : string diff --git a/tests/baselines/reference/spreadOverwritesProperty.types b/tests/baselines/reference/spreadOverwritesProperty.types index 6e4cb3ce89a2e..843e6562741ef 100644 --- a/tests/baselines/reference/spreadOverwritesProperty.types +++ b/tests/baselines/reference/spreadOverwritesProperty.types @@ -33,7 +33,7 @@ var unused3 = { b: 1, ...abq } >abq : { a: number; b?: number; } function g(obj: { x: number | undefined }) { ->g : (obj: { x: number | undefined;}) => { x: number | undefined; } +>g : (obj: { x: number | undefined; }) => { x: number | undefined; } >obj : { x: number | undefined; } >x : number @@ -44,7 +44,7 @@ function g(obj: { x: number | undefined }) { >obj : { x: number; } } function h(obj: { x: number }) { ->h : (obj: { x: number;}) => { x: number; } +>h : (obj: { x: number; }) => { x: number; } >obj : { x: number; } >x : number diff --git a/tests/baselines/reference/spreadOverwritesPropertyStrict.types b/tests/baselines/reference/spreadOverwritesPropertyStrict.types index bdc7fdabad8a9..7e6d894f002b7 100644 --- a/tests/baselines/reference/spreadOverwritesPropertyStrict.types +++ b/tests/baselines/reference/spreadOverwritesPropertyStrict.types @@ -46,7 +46,7 @@ var unused5 = { ...abq, b: 1 } // ok >1 : 1 function g(obj: { x: number | undefined }) { ->g : (obj: { x: number | undefined;}) => { x: number | undefined; } +>g : (obj: { x: number | undefined; }) => { x: number | undefined; } >obj : { x: number | undefined; } >x : number | undefined @@ -57,7 +57,7 @@ function g(obj: { x: number | undefined }) { >obj : { x: number | undefined; } } function f(obj: { x: number } | undefined) { ->f : (obj: { x: number;} | undefined) => { x: number; } +>f : (obj: { x: number; } | undefined) => { x: number; } >obj : { x: number; } | undefined >x : number @@ -68,7 +68,7 @@ function f(obj: { x: number } | undefined) { >obj : { x: number; } | undefined } function h(obj: { x: number } | { x: string }) { ->h : (obj: { x: number;} | { x: string;}) => { x: number; } | { x: string; } +>h : (obj: { x: number; } | { x: string; }) => { x: number; } | { x: string; } >obj : { x: number; } | { x: string; } >x : number >x : string @@ -80,7 +80,7 @@ function h(obj: { x: number } | { x: string }) { >obj : { x: number; } | { x: string; } } function i(b: boolean, t: { command: string, ok: string }) { ->i : (b: boolean, t: { command: string; ok: string;}) => { command: string; ok?: string | undefined; } +>i : (b: boolean, t: { command: string; ok: string; }) => { command: string; ok?: string | undefined; } >b : boolean >t : { command: string; ok: string; } >command : string @@ -109,7 +109,7 @@ function j() { >"bye" : "bye" } function k(t: { command: string, ok: string }) { ->k : (t: { command: string; ok: string;}) => { command: string; ok: string; spoiler2: boolean; spoiler: boolean; } +>k : (t: { command: string; ok: string; }) => { command: string; ok: string; spoiler2: boolean; spoiler: boolean; } >t : { command: string; ok: string; } >command : string >ok : string @@ -127,7 +127,7 @@ function k(t: { command: string, ok: string }) { } function l(anyrequired: { a: any }) { ->l : (anyrequired: { a: any;}) => { a: any; } +>l : (anyrequired: { a: any; }) => { a: any; } >anyrequired : { a: any; } >a : any @@ -138,7 +138,7 @@ function l(anyrequired: { a: any }) { >anyrequired : { a: any; } } function m(anyoptional: { a?: any }) { ->m : (anyoptional: { a?: any;}) => { a: any; } +>m : (anyoptional: { a?: any; }) => { a: any; } >anyoptional : { a?: any; } >a : any diff --git a/tests/baselines/reference/spreadUnion3.types b/tests/baselines/reference/spreadUnion3.types index e239c402c2be8..a644aeeb59aa3 100644 --- a/tests/baselines/reference/spreadUnion3.types +++ b/tests/baselines/reference/spreadUnion3.types @@ -2,7 +2,7 @@ === spreadUnion3.ts === function f(x: { y: string } | undefined): { y: string } { ->f : (x: { y: string;} | undefined) => { y: string;} +>f : (x: { y: string; } | undefined) => { y: string; } >x : { y: string; } | undefined >y : string >y : string @@ -20,7 +20,7 @@ f(undefined) function g(t?: { a: number } | null): void { ->g : (t?: { a: number;} | null) => void +>g : (t?: { a: number; } | null) => void >t : { a: number; } | null | undefined >a : number diff --git a/tests/baselines/reference/staticInheritance.types b/tests/baselines/reference/staticInheritance.types index d261d17ef23b8..c3e21ad611672 100644 --- a/tests/baselines/reference/staticInheritance.types +++ b/tests/baselines/reference/staticInheritance.types @@ -2,7 +2,7 @@ === staticInheritance.ts === function doThing(x: { n: string }) { } ->doThing : (x: { n: string;}) => void +>doThing : (x: { n: string; }) => void >x : { n: string; } >n : string diff --git a/tests/baselines/reference/strictOptionalProperties1.types b/tests/baselines/reference/strictOptionalProperties1.types index aa439d7d64a25..eeb1c881ce511 100644 --- a/tests/baselines/reference/strictOptionalProperties1.types +++ b/tests/baselines/reference/strictOptionalProperties1.types @@ -2,7 +2,7 @@ === strictOptionalProperties1.ts === function f1(obj: { a?: string, b?: string | undefined }) { ->f1 : (obj: { a?: string; b?: string | undefined;}) => void +>f1 : (obj: { a?: string; b?: string | undefined; }) => void >obj : { a?: string; b?: string | undefined; } >a : string | undefined >b : string | undefined @@ -49,7 +49,7 @@ function f1(obj: { a?: string, b?: string | undefined }) { } function f2(obj: { a?: string, b?: string | undefined }) { ->f2 : (obj: { a?: string; b?: string | undefined;}) => void +>f2 : (obj: { a?: string; b?: string | undefined; }) => void >obj : { a?: string; b?: string | undefined; } >a : string | undefined >b : string | undefined @@ -220,7 +220,7 @@ function f2(obj: { a?: string, b?: string | undefined }) { } function f3(obj: Partial<{ a: string, b: string | undefined }>) { ->f3 : (obj: Partial<{ a: string; b: string | undefined;}>) => void +>f3 : (obj: Partial<{ a: string; b: string | undefined; }>) => void >obj : Partial<{ a: string; b: string | undefined; }> >a : string >b : string | undefined @@ -543,7 +543,7 @@ declare let tx4: [(string | undefined)?]; >tx4 : [(string | undefined)?] declare function f11(x: { p?: T }): T; ->f11 : (x: { p?: T;}) => T +>f11 : (x: { p?: T; }) => T >x : { p?: T; } >p : T | undefined diff --git a/tests/baselines/reference/strictSubtypeAndNarrowing.types b/tests/baselines/reference/strictSubtypeAndNarrowing.types index a1f440b17a109..410abd6b6ddc2 100644 --- a/tests/baselines/reference/strictSubtypeAndNarrowing.types +++ b/tests/baselines/reference/strictSubtypeAndNarrowing.types @@ -279,7 +279,7 @@ function checkD(f: FnTypes) { // Type of x = y is y with freshness preserved function fx10(obj1: { x?: number }, obj2: { x?: number, y?: number }) { ->fx10 : (obj1: { x?: number;}, obj2: { x?: number; y?: number;}) => void +>fx10 : (obj1: { x?: number; }, obj2: { x?: number; y?: number; }) => void >obj1 : { x?: number | undefined; } >x : number | undefined >obj2 : { x?: number | undefined; y?: number | undefined; } @@ -310,7 +310,7 @@ function fx10(obj1: { x?: number }, obj2: { x?: number, y?: number }) { } function fx11(): { x?: number } { ->fx11 : () => { x?: number;} +>fx11 : () => { x?: number; } >x : number | undefined let obj: { x?: number, y?: number }; @@ -336,7 +336,7 @@ declare function isArrayLike(value: any): value is { length: number }; >length : number function ff1(value: { [index: number]: boolean, length: number } | undefined) { ->ff1 : (value: { [index: number]: boolean; length: number;} | undefined) => void +>ff1 : (value: { [index: number]: boolean; length: number; } | undefined) => void >value : { [index: number]: boolean; length: number; } | undefined >index : number >length : number @@ -358,7 +358,7 @@ function ff1(value: { [index: number]: boolean, length: number } | undefined) { } function ff2(value: { [index: number]: boolean, length: number } | string) { ->ff2 : (value: { [index: number]: boolean; length: number;} | string) => void +>ff2 : (value: { [index: number]: boolean; length: number; } | string) => void >value : string | { [index: number]: boolean; length: number; } >index : number >length : number @@ -380,7 +380,7 @@ function ff2(value: { [index: number]: boolean, length: number } | string) { } function ff3(value: string | string[] | { [index: number]: boolean, length: number } | [number, boolean] | number | { length: string } | { a: string } | null | undefined) { ->ff3 : (value: string | string[] | { [index: number]: boolean; length: number;} | [number, boolean] | number | { length: string;} | { a: string;} | null | undefined) => void +>ff3 : (value: string | string[] | { [index: number]: boolean; length: number; } | [number, boolean] | number | { length: string; } | { a: string; } | null | undefined) => void >value : string | number | { [index: number]: boolean; length: number; } | [number, boolean] | { length: string; } | { a: string; } | string[] | null | undefined >index : number >length : number @@ -450,7 +450,7 @@ declare function doesValueAtDeepPathSatisfy< type Foo = {value: {type: 'A'}; a?: number} | {value: {type: 'B'}; b?: number}; ->Foo : { value: { type: 'A';}; a?: number | undefined; } | { value: { type: 'B';}; b?: number | undefined; } +>Foo : { value: { type: 'A'; }; a?: number | undefined; } | { value: { type: 'B'; }; b?: number | undefined; } >value : { type: 'A'; } >type : "A" >a : number | undefined @@ -471,7 +471,7 @@ declare function assert(condition: boolean): asserts condition; >condition : boolean function test1(foo: Foo): {value: {type: 'A'}; a?: number} { ->test1 : (foo: Foo) => { value: { type: 'A'; }; a?: number;} +>test1 : (foo: Foo) => { value: { type: 'A'; }; a?: number; } >foo : Foo >value : { type: 'A'; } >type : "A" @@ -493,7 +493,7 @@ function test1(foo: Foo): {value: {type: 'A'}; a?: number} { } function test2(foo: Foo): {value: {type: 'A'}; a?: number} { ->test2 : (foo: Foo) => { value: { type: 'A'; }; a?: number;} +>test2 : (foo: Foo) => { value: { type: 'A'; }; a?: number; } >foo : Foo >value : { type: 'A'; } >type : "A" diff --git a/tests/baselines/reference/strictTypeofUnionNarrowing.types b/tests/baselines/reference/strictTypeofUnionNarrowing.types index c7b21596bb0ee..b5bcda9750296 100644 --- a/tests/baselines/reference/strictTypeofUnionNarrowing.types +++ b/tests/baselines/reference/strictTypeofUnionNarrowing.types @@ -2,7 +2,7 @@ === strictTypeofUnionNarrowing.ts === function stringify1(anything: { toString(): string } | undefined): string { ->stringify1 : (anything: { toString(): string;} | undefined) => string +>stringify1 : (anything: { toString(): string; } | undefined) => string >anything : { toString(): string; } | undefined >toString : () => string @@ -54,7 +54,7 @@ function stringify3(anything: unknown | undefined): string { // should simplify } function stringify4(anything: { toString?(): string } | undefined): string { ->stringify4 : (anything: { toString?(): string;} | undefined) => string +>stringify4 : (anything: { toString?(): string; } | undefined) => string >anything : { toString?(): string; } | undefined >toString : (() => string) | undefined diff --git a/tests/baselines/reference/subtypingWithCallSignatures2.types b/tests/baselines/reference/subtypingWithCallSignatures2.types index 0c16bdef45100..eb1be75888835 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures2.types +++ b/tests/baselines/reference/subtypingWithCallSignatures2.types @@ -136,8 +136,8 @@ declare function foo10(a: any): any; >a : any declare function foo11(a: (x: { foo: string }, y: { foo: string; bar: string }) => Base): typeof a; ->foo11 : { (a: (x: { foo: string;}, y: { foo: string; bar: string;}) => Base): typeof a; (a: any): any; } ->a : (x: { foo: string;}, y: { foo: string; bar: string;}) => Base +>foo11 : { (a: (x: { foo: string; }, y: { foo: string; bar: string; }) => Base): typeof a; (a: any): any; } +>a : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base >x : { foo: string; } >foo : string >y : { foo: string; bar: string; } @@ -172,8 +172,8 @@ declare function foo13(a: any): any; >a : any declare function foo14(a: (x: { a: string; b: number }) => Object): typeof a; ->foo14 : { (a: (x: { a: string; b: number;}) => Object): typeof a; (a: any): any; } ->a : (x: { a: string; b: number;}) => Object +>foo14 : { (a: (x: { a: string; b: number; }) => Object): typeof a; (a: any): any; } +>a : (x: { a: string; b: number; }) => Object >x : { a: string; b: number; } >a : string >b : number @@ -184,7 +184,7 @@ declare function foo14(a: any): any; >a : any declare function foo15(a: { ->foo15 : { (a: { (x: number): number[]; (x: string): string[];}): typeof a; (a: any): any; } +>foo15 : { (a: { (x: number): number[]; (x: string): string[]; }): typeof a; (a: any): any; } >a : { (x: number): number[]; (x: string): string[]; } (x: number): number[]; @@ -218,7 +218,7 @@ declare function foo16(a: any): any; >a : any declare function foo17(a: { ->foo17 : { (a: { (x: (a: number) => number): number[]; (x: (a: string) => string): string[];}): typeof a; (a: any): any; } +>foo17 : { (a: { (x: (a: number) => number): number[]; (x: (a: string) => string): string[]; }): typeof a; (a: any): any; } >a : { (x: (a: number) => number): number[]; (x: (a: string) => string): string[]; } (x: (a: number) => number): number[]; @@ -237,8 +237,8 @@ declare function foo17(a: any): any; >a : any declare function foo18(a: { ->foo18 : { (a: { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[];}): typeof a; (a: any): any; } ->a : { (x: { (a: number): number; (a: string): string;}): any[]; (x: { (a: boolean): boolean; (a: Date): Date;}): any[]; } +>foo18 : { (a: { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; }): typeof a; (a: any): any; } +>a : { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; } (x: { >x : { (a: number): number; (a: string): string; } @@ -533,11 +533,11 @@ var r8b = [r8arg2, r8arg1]; >r8arg1 : (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U var r9arg1 = (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => null; ->r9arg1 : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number;}) => U) => (r: T) => U ->(x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => null : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number;}) => U) => (r: T) => U +>r9arg1 : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U +>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => null : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U >x : (arg: T) => U >arg : T ->y : (arg2: { foo: string; bing: number;}) => U +>y : (arg2: { foo: string; bing: number; }) => U >arg2 : { foo: string; bing: number; } >foo : string >bing : number @@ -614,8 +614,8 @@ var r11arg1 = (x: T, y: T) => x; >x : T var r11arg2 = (x: { foo: string }, y: { foo: string; bar: string }) => null; ->r11arg2 : (x: { foo: string;}, y: { foo: string; bar: string;}) => Base ->(x: { foo: string }, y: { foo: string; bar: string }) => null : (x: { foo: string;}, y: { foo: string; bar: string;}) => Base +>r11arg2 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base +>(x: { foo: string }, y: { foo: string; bar: string }) => null : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base >x : { foo: string; } >foo : string >y : { foo: string; bar: string; } @@ -706,8 +706,8 @@ var r13b = [r13arg2, r13arg1]; >r13arg1 : (x: Base[], y: T) => T var r14arg1 = (x: { a: T; b: T }) => x.a; ->r14arg1 : (x: { a: T; b: T;}) => T ->(x: { a: T; b: T }) => x.a : (x: { a: T; b: T;}) => T +>r14arg1 : (x: { a: T; b: T; }) => T +>(x: { a: T; b: T }) => x.a : (x: { a: T; b: T; }) => T >x : { a: T; b: T; } >a : T >b : T @@ -716,8 +716,8 @@ var r14arg1 = (x: { a: T; b: T }) => x.a; >a : T var r14arg2 = (x: { a: string; b: number }) => null; ->r14arg2 : (x: { a: string; b: number;}) => Object ->(x: { a: string; b: number }) => null : (x: { a: string; b: number;}) => Object +>r14arg2 : (x: { a: string; b: number; }) => Object +>(x: { a: string; b: number }) => null : (x: { a: string; b: number; }) => Object >x : { a: string; b: number; } >a : string >b : number diff --git a/tests/baselines/reference/subtypingWithCallSignatures3.types b/tests/baselines/reference/subtypingWithCallSignatures3.types index d878133bde703..76fc65ebdc342 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures3.types +++ b/tests/baselines/reference/subtypingWithCallSignatures3.types @@ -73,8 +73,8 @@ module Errors { >a2 : any declare function foo11(a2: (x: { foo: string }, y: { foo: string; bar: string }) => Base): typeof a2; ->foo11 : { (a2: (x: { foo: string;}, y: { foo: string; bar: string;}) => Base): (x: { foo: string;}, y: { foo: string; bar: string;}) => Base; (a2: any): any; } ->a2 : (x: { foo: string;}, y: { foo: string; bar: string;}) => Base +>foo11 : { (a2: (x: { foo: string; }, y: { foo: string; bar: string; }) => Base): (x: { foo: string; }, y: { foo: string; bar: string; }) => Base; (a2: any): any; } +>a2 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base >x : { foo: string; } >foo : string >y : { foo: string; bar: string; } @@ -98,8 +98,8 @@ module Errors { >a2 : any declare function foo15(a2: (x: { a: string; b: number }) => number): typeof a2; ->foo15 : { (a2: (x: { a: string; b: number;}) => number): (x: { a: string; b: number;}) => number; (a2: any): any; } ->a2 : (x: { a: string; b: number;}) => number +>foo15 : { (a2: (x: { a: string; b: number; }) => number): (x: { a: string; b: number; }) => number; (a2: any): any; } +>a2 : (x: { a: string; b: number; }) => number >x : { a: string; b: number; } >a : string >b : number @@ -110,8 +110,8 @@ module Errors { >a2 : any declare function foo16(a2: { ->foo16 : { (a2: { (x: { (a: number): number; (a?: number): number; }): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean; }): boolean[];}): { (x: { (a: number): number; (a?: number): number;}): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean;}): boolean[]; }; (a2: any): any; } ->a2 : { (x: { (a: number): number; (a?: number): number;}): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean;}): boolean[]; } +>foo16 : { (a2: { (x: { (a: number): number; (a?: number): number; }): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean; }): boolean[]; }): { (x: { (a: number): number; (a?: number): number; }): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean; }): boolean[]; }; (a2: any): any; } +>a2 : { (x: { (a: number): number; (a?: number): number; }): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean; }): boolean[]; } // type of parameter is overload set which means we can't do inference based on this type (x: { @@ -239,11 +239,11 @@ module Errors { >r2arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived2 var r3arg = (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => null; ->r3arg : (x: (arg: T) => U, y: (arg2: { foo: number;}) => U) => (r: T) => U ->(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => null : (x: (arg: T) => U, y: (arg2: { foo: number;}) => U) => (r: T) => U +>r3arg : (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U +>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => null : (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U >x : (arg: T) => U >arg : T ->y : (arg2: { foo: number;}) => U +>y : (arg2: { foo: number; }) => U >arg2 : { foo: number; } >foo : number >(r: T) => null : (r: T) => U @@ -317,8 +317,8 @@ module Errors { >null : T var r5arg2 = (x: { foo: string }, y: { foo: string; bar: string }) => null; ->r5arg2 : (x: { foo: string;}, y: { foo: string; bar: string;}) => Base ->(x: { foo: string }, y: { foo: string; bar: string }) => null : (x: { foo: string;}, y: { foo: string; bar: string;}) => Base +>r5arg2 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base +>(x: { foo: string }, y: { foo: string; bar: string }) => null : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base >x : { foo: string; } >foo : string >y : { foo: string; bar: string; } @@ -377,16 +377,16 @@ module Errors { >r6arg2 : (x: Base[], y: Base[]) => T var r7arg = (x: { a: T; b: T }) => null; ->r7arg : (x: { a: T; b: T;}) => T ->(x: { a: T; b: T }) => null : (x: { a: T; b: T;}) => T +>r7arg : (x: { a: T; b: T; }) => T +>(x: { a: T; b: T }) => null : (x: { a: T; b: T; }) => T >x : { a: T; b: T; } >a : T >b : T >null : T var r7arg2 = (x: { a: string; b: number }) => 1; ->r7arg2 : (x: { a: string; b: number;}) => number ->(x: { a: string; b: number }) => 1 : (x: { a: string; b: number;}) => number +>r7arg2 : (x: { a: string; b: number; }) => number +>(x: { a: string; b: number }) => 1 : (x: { a: string; b: number; }) => number >x : { a: string; b: number; } >a : string >b : number @@ -411,8 +411,8 @@ module Errors { >r7arg2 : (x: { a: string; b: number; }) => number var r7arg3 = (x: { a: T; b: T }) => 1; ->r7arg3 : (x: { a: T; b: T;}) => number ->(x: { a: T; b: T }) => 1 : (x: { a: T; b: T;}) => number +>r7arg3 : (x: { a: T; b: T; }) => number +>(x: { a: T; b: T }) => 1 : (x: { a: T; b: T; }) => number >x : { a: T; b: T; } >a : T >b : T diff --git a/tests/baselines/reference/subtypingWithCallSignatures4.types b/tests/baselines/reference/subtypingWithCallSignatures4.types index c5a74c6ba43fc..536f6fa021650 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures4.types +++ b/tests/baselines/reference/subtypingWithCallSignatures4.types @@ -80,8 +80,8 @@ declare function foo6(a: any): any; >a : any declare function foo11(a11: (x: { foo: T }, y: { foo: T; bar: T }) => Base); ->foo11 : { (a11: (x: { foo: T;}, y: { foo: T; bar: T;}) => Base): any; (a: any): any; } ->a11 : (x: { foo: T;}, y: { foo: T; bar: T;}) => Base +>foo11 : { (a11: (x: { foo: T; }, y: { foo: T; bar: T; }) => Base): any; (a: any): any; } +>a11 : (x: { foo: T; }, y: { foo: T; bar: T; }) => Base >x : { foo: T; } >foo : T >y : { foo: T; bar: T; } @@ -93,8 +93,8 @@ declare function foo11(a: any): any; >a : any declare function foo15(a15: (x: { a: T; b: T }) => T[]); ->foo15 : { (a15: (x: { a: T; b: T;}) => T[]): any; (a: any): any; } ->a15 : (x: { a: T; b: T;}) => T[] +>foo15 : { (a15: (x: { a: T; b: T; }) => T[]): any; (a: any): any; } +>a15 : (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T @@ -104,8 +104,8 @@ declare function foo15(a: any): any; >a : any declare function foo16(a16: (x: { a: T; b: T }) => T[]); ->foo16 : { (a16: (x: { a: T; b: T;}) => T[]): any; (a: any): any; } ->a16 : (x: { a: T; b: T;}) => T[] +>foo16 : { (a16: (x: { a: T; b: T; }) => T[]): any; (a: any): any; } +>a16 : (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T @@ -348,8 +348,8 @@ var r6b = [r6arg2, r6arg]; >r6arg : (x: (arg: T) => U) => T var r11arg = (x: { foo: T }, y: { foo: U; bar: U }) => null; ->r11arg : (x: { foo: T;}, y: { foo: U; bar: U;}) => Base ->(x: { foo: T }, y: { foo: U; bar: U }) => null : (x: { foo: T;}, y: { foo: U; bar: U;}) => Base +>r11arg : (x: { foo: T; }, y: { foo: U; bar: U; }) => Base +>(x: { foo: T }, y: { foo: U; bar: U }) => null : (x: { foo: T; }, y: { foo: U; bar: U; }) => Base >x : { foo: T; } >foo : T >y : { foo: U; bar: U; } @@ -358,8 +358,8 @@ var r11arg = (x: { foo: T }, y: { foo: U; bar: U }) => null; >null : Base var r11arg2 = (x: { foo: T }, y: { foo: T; bar: T }) => null; ->r11arg2 : (x: { foo: T;}, y: { foo: T; bar: T;}) => Base ->(x: { foo: T }, y: { foo: T; bar: T }) => null : (x: { foo: T;}, y: { foo: T; bar: T;}) => Base +>r11arg2 : (x: { foo: T; }, y: { foo: T; bar: T; }) => Base +>(x: { foo: T }, y: { foo: T; bar: T }) => null : (x: { foo: T; }, y: { foo: T; bar: T; }) => Base >x : { foo: T; } >foo : T >y : { foo: T; bar: T; } @@ -386,16 +386,16 @@ var r11b = [r11arg2, r11arg]; >r11arg : (x: { foo: T; }, y: { foo: U; bar: U; }) => Base var r15arg = (x: { a: U; b: V; }) => null; ->r15arg : (x: { a: U; b: V;}) => U[] ->(x: { a: U; b: V; }) => null : (x: { a: U; b: V;}) => U[] +>r15arg : (x: { a: U; b: V; }) => U[] +>(x: { a: U; b: V; }) => null : (x: { a: U; b: V; }) => U[] >x : { a: U; b: V; } >a : U >b : V >null : U[] var r15arg2 = (x: { a: T; b: T }) => null; ->r15arg2 : (x: { a: T; b: T;}) => T[] ->(x: { a: T; b: T }) => null : (x: { a: T; b: T;}) => T[] +>r15arg2 : (x: { a: T; b: T; }) => T[] +>(x: { a: T; b: T }) => null : (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T @@ -420,16 +420,16 @@ var r15b = [r15arg2, r15arg]; >r15arg : (x: { a: U; b: V; }) => U[] var r16arg = (x: { a: T; b: T }) => null; ->r16arg : (x: { a: T; b: T;}) => T[] ->(x: { a: T; b: T }) => null : (x: { a: T; b: T;}) => T[] +>r16arg : (x: { a: T; b: T; }) => T[] +>(x: { a: T; b: T }) => null : (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T >null : T[] var r16arg2 = (x: { a: T; b: T }) => null; ->r16arg2 : (x: { a: T; b: T;}) => T[] ->(x: { a: T; b: T }) => null : (x: { a: T; b: T;}) => T[] +>r16arg2 : (x: { a: T; b: T; }) => T[] +>(x: { a: T; b: T }) => null : (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T diff --git a/tests/baselines/reference/subtypingWithConstructSignatures2.types b/tests/baselines/reference/subtypingWithConstructSignatures2.types index 84bd8c69e54f9..361204a57b18d 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures2.types +++ b/tests/baselines/reference/subtypingWithConstructSignatures2.types @@ -136,8 +136,8 @@ declare function foo10(a: any): any; >a : any declare function foo11(a: new (x: { foo: string }, y: { foo: string; bar: string }) => Base): typeof a; ->foo11 : { (a: new (x: { foo: string;}, y: { foo: string; bar: string;}) => Base): typeof a; (a: any): any; } ->a : new (x: { foo: string;}, y: { foo: string; bar: string;}) => Base +>foo11 : { (a: new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base): typeof a; (a: any): any; } +>a : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base >x : { foo: string; } >foo : string >y : { foo: string; bar: string; } @@ -172,8 +172,8 @@ declare function foo13(a: any): any; >a : any declare function foo14(a: new (x: { a: string; b: number }) => Object): typeof a; ->foo14 : { (a: new (x: { a: string; b: number;}) => Object): typeof a; (a: any): any; } ->a : new (x: { a: string; b: number;}) => Object +>foo14 : { (a: new (x: { a: string; b: number; }) => Object): typeof a; (a: any): any; } +>a : new (x: { a: string; b: number; }) => Object >x : { a: string; b: number; } >a : string >b : number @@ -184,7 +184,7 @@ declare function foo14(a: any): any; >a : any declare function foo15(a: { ->foo15 : { (a: { new (x: number): number[]; new (x: string): string[];}): typeof a; (a: any): any; } +>foo15 : { (a: { new (x: number): number[]; new (x: string): string[]; }): typeof a; (a: any): any; } >a : { new (x: number): number[]; new (x: string): string[]; } new (x: number): number[]; @@ -218,7 +218,7 @@ declare function foo16(a: any): any; >a : any declare function foo17(a: { ->foo17 : { (a: { new (x: (a: number) => number): number[]; new (x: (a: string) => string): string[];}): typeof a; (a: any): any; } +>foo17 : { (a: { new (x: (a: number) => number): number[]; new (x: (a: string) => string): string[]; }): typeof a; (a: any): any; } >a : { new (x: (a: number) => number): number[]; new (x: (a: string) => string): string[]; } new (x: (a: number) => number): number[]; @@ -237,8 +237,8 @@ declare function foo17(a: any): any; >a : any declare function foo18(a: { ->foo18 : { (a: { new (x: { new (a: number): number; new (a: string): string; }): any[]; new (x: { new (a: boolean): boolean; new (a: Date): Date; }): any[];}): typeof a; (a: any): any; } ->a : { new (x: { new (a: number): number; new (a: string): string;}): any[]; new (x: { new (a: boolean): boolean; new (a: Date): Date;}): any[]; } +>foo18 : { (a: { new (x: { new (a: number): number; new (a: string): string; }): any[]; new (x: { new (a: boolean): boolean; new (a: Date): Date; }): any[]; }): typeof a; (a: any): any; } +>a : { new (x: { new (a: number): number; new (a: string): string; }): any[]; new (x: { new (a: boolean): boolean; new (a: Date): Date; }): any[]; } new (x: { >x : { new (a: number): number; new (a: string): string; } @@ -494,10 +494,10 @@ var r8b = [r8arg2, r8arg1]; >r8arg1 : new (x: new (arg: T) => U, y: new (arg2: T) => U) => new (r: T) => U var r9arg1: new (x: new (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => new (r: T) => U; ->r9arg1 : new (x: new (arg: T) => U, y: (arg2: { foo: string; bing: number;}) => U) => new (r: T) => U +>r9arg1 : new (x: new (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => new (r: T) => U >x : new (arg: T) => U >arg : T ->y : (arg2: { foo: string; bing: number;}) => U +>y : (arg2: { foo: string; bing: number; }) => U >arg2 : { foo: string; bing: number; } >foo : string >bing : number @@ -561,7 +561,7 @@ var r11arg1: new (x: T, y: T) => T; >y : T var r11arg2: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; ->r11arg2 : new (x: { foo: string;}, y: { foo: string; bar: string;}) => Base +>r11arg2 : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base >x : { foo: string; } >foo : string >y : { foo: string; bar: string; } @@ -643,13 +643,13 @@ var r13b = [r13arg2, r13arg1]; >r13arg1 : new (x: Base[], y: T) => T var r14arg1: new (x: { a: T; b: T }) => T; ->r14arg1 : new (x: { a: T; b: T;}) => T +>r14arg1 : new (x: { a: T; b: T; }) => T >x : { a: T; b: T; } >a : T >b : T var r14arg2: new (x: { a: string; b: number }) => Object; ->r14arg2 : new (x: { a: string; b: number;}) => Object +>r14arg2 : new (x: { a: string; b: number; }) => Object >x : { a: string; b: number; } >a : string >b : number diff --git a/tests/baselines/reference/subtypingWithConstructSignatures3.types b/tests/baselines/reference/subtypingWithConstructSignatures3.types index 38983724c5cc2..4a46c2f66522b 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures3.types +++ b/tests/baselines/reference/subtypingWithConstructSignatures3.types @@ -73,8 +73,8 @@ module Errors { >a2 : any declare function foo11(a2: new (x: { foo: string }, y: { foo: string; bar: string }) => Base): typeof a2; ->foo11 : { (a2: new (x: { foo: string;}, y: { foo: string; bar: string;}) => Base): new (x: { foo: string;}, y: { foo: string; bar: string;}) => Base; (a2: any): any; } ->a2 : new (x: { foo: string;}, y: { foo: string; bar: string;}) => Base +>foo11 : { (a2: new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base): new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base; (a2: any): any; } +>a2 : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base >x : { foo: string; } >foo : string >y : { foo: string; bar: string; } @@ -98,8 +98,8 @@ module Errors { >a2 : any declare function foo15(a2: new (x: { a: string; b: number }) => number): typeof a2; ->foo15 : { (a2: new (x: { a: string; b: number;}) => number): new (x: { a: string; b: number;}) => number; (a2: any): any; } ->a2 : new (x: { a: string; b: number;}) => number +>foo15 : { (a2: new (x: { a: string; b: number; }) => number): new (x: { a: string; b: number; }) => number; (a2: any): any; } +>a2 : new (x: { a: string; b: number; }) => number >x : { a: string; b: number; } >a : string >b : number @@ -110,8 +110,8 @@ module Errors { >a2 : any declare function foo16(a2: { ->foo16 : { (a2: { new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[];}): { new (x: { new (a: number): number; new (a?: number): number;}): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean;}): boolean[]; }; (a2: any): any; } ->a2 : { new (x: { new (a: number): number; new (a?: number): number;}): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean;}): boolean[]; } +>foo16 : { (a2: { new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }): { new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }; (a2: any): any; } +>a2 : { new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; } // type of parameter is overload set which means we can't do inference based on this type new (x: { @@ -229,10 +229,10 @@ module Errors { >r2arg2 : new (x: new (arg: Base) => Derived) => new (r: Base) => Derived2 var r3arg1: new (x: new (arg: T) => U, y: (arg2: { foo: number; }) => U) => new (r: T) => U; ->r3arg1 : new (x: new (arg: T) => U, y: (arg2: { foo: number;}) => U) => new (r: T) => U +>r3arg1 : new (x: new (arg: T) => U, y: (arg2: { foo: number; }) => U) => new (r: T) => U >x : new (arg: T) => U >arg : T ->y : (arg2: { foo: number;}) => U +>y : (arg2: { foo: number; }) => U >arg2 : { foo: number; } >foo : number >r : T @@ -295,7 +295,7 @@ module Errors { >y : T var r5arg2: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; ->r5arg2 : new (x: { foo: string;}, y: { foo: string; bar: string;}) => Base +>r5arg2 : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base >x : { foo: string; } >foo : string >y : { foo: string; bar: string; } @@ -349,13 +349,13 @@ module Errors { >r6arg2 : new (x: Base[], y: Base[]) => T var r7arg1: new (x: { a: T; b: T }) => T; ->r7arg1 : new (x: { a: T; b: T;}) => T +>r7arg1 : new (x: { a: T; b: T; }) => T >x : { a: T; b: T; } >a : T >b : T var r7arg2: new (x: { a: string; b: number }) => number; ->r7arg2 : new (x: { a: string; b: number;}) => number +>r7arg2 : new (x: { a: string; b: number; }) => number >x : { a: string; b: number; } >a : string >b : number @@ -379,7 +379,7 @@ module Errors { >r7arg2 : new (x: { a: string; b: number; }) => number var r7arg3: new (x: { a: T; b: T }) => number; ->r7arg3 : new (x: { a: T; b: T;}) => number +>r7arg3 : new (x: { a: T; b: T; }) => number >x : { a: T; b: T; } >a : T >b : T diff --git a/tests/baselines/reference/subtypingWithConstructSignatures4.types b/tests/baselines/reference/subtypingWithConstructSignatures4.types index fafea41492305..f85e667bb1b6f 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures4.types +++ b/tests/baselines/reference/subtypingWithConstructSignatures4.types @@ -80,8 +80,8 @@ declare function foo6(a: any): any; >a : any declare function foo11(a11: new (x: { foo: T }, y: { foo: T; bar: T }) => Base); ->foo11 : { (a11: new (x: { foo: T;}, y: { foo: T; bar: T;}) => Base): any; (a: any): any; } ->a11 : new (x: { foo: T;}, y: { foo: T; bar: T;}) => Base +>foo11 : { (a11: new (x: { foo: T; }, y: { foo: T; bar: T; }) => Base): any; (a: any): any; } +>a11 : new (x: { foo: T; }, y: { foo: T; bar: T; }) => Base >x : { foo: T; } >foo : T >y : { foo: T; bar: T; } @@ -93,8 +93,8 @@ declare function foo11(a: any): any; >a : any declare function foo15(a15: new (x: { a: T; b: T }) => T[]); ->foo15 : { (a15: new (x: { a: T; b: T;}) => T[]): any; (a: any): any; } ->a15 : new (x: { a: T; b: T;}) => T[] +>foo15 : { (a15: new (x: { a: T; b: T; }) => T[]): any; (a: any): any; } +>a15 : new (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T @@ -104,8 +104,8 @@ declare function foo15(a: any): any; >a : any declare function foo16(a16: new (x: { a: T; b: T }) => T[]); ->foo16 : { (a16: new (x: { a: T; b: T;}) => T[]): any; (a: any): any; } ->a16 : new (x: { a: T; b: T;}) => T[] +>foo16 : { (a16: new (x: { a: T; b: T; }) => T[]): any; (a: any): any; } +>a16 : new (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T @@ -323,7 +323,7 @@ var r6b = [r6arg2, r6arg]; >r6arg : new (x: new (arg: T) => U) => T var r11arg: new (x: { foo: T }, y: { foo: U; bar: U }) => Base; ->r11arg : new (x: { foo: T;}, y: { foo: U; bar: U;}) => Base +>r11arg : new (x: { foo: T; }, y: { foo: U; bar: U; }) => Base >x : { foo: T; } >foo : T >y : { foo: U; bar: U; } @@ -331,7 +331,7 @@ var r11arg: new (x: { foo: T }, y: { foo: U; bar: U }) => Base; >bar : U var r11arg2: new (x: { foo: T }, y: { foo: T; bar: T }) => Base; ->r11arg2 : new (x: { foo: T;}, y: { foo: T; bar: T;}) => Base +>r11arg2 : new (x: { foo: T; }, y: { foo: T; bar: T; }) => Base >x : { foo: T; } >foo : T >y : { foo: T; bar: T; } @@ -357,13 +357,13 @@ var r11b = [r11arg2, r11arg]; >r11arg : new (x: { foo: T; }, y: { foo: U; bar: U; }) => Base var r15arg: new (x: { a: U; b: V; }) => U[]; ->r15arg : new (x: { a: U; b: V;}) => U[] +>r15arg : new (x: { a: U; b: V; }) => U[] >x : { a: U; b: V; } >a : U >b : V var r15arg2: new (x: { a: T; b: T }) => T[]; ->r15arg2 : new (x: { a: T; b: T;}) => T[] +>r15arg2 : new (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T @@ -387,13 +387,13 @@ var r15b = [r15arg2, r15arg]; >r15arg : new (x: { a: U; b: V; }) => U[] var r16arg: new (x: { a: T; b: T }) => T[]; ->r16arg : new (x: { a: T; b: T;}) => T[] +>r16arg : new (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T var r16arg2: new (x: { a: T; b: T }) => T[]; ->r16arg2 : new (x: { a: T; b: T;}) => T[] +>r16arg2 : new (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T diff --git a/tests/baselines/reference/subtypingWithConstructSignatures5.types b/tests/baselines/reference/subtypingWithConstructSignatures5.types index 601b34fb700c1..da0960984d3e3 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures5.types +++ b/tests/baselines/reference/subtypingWithConstructSignatures5.types @@ -79,7 +79,7 @@ interface A { // T >x : Derived[] a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; ->a11 : new (x: { foo: string;}, y: { foo: string; bar: string;}) => Base +>a11 : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base >x : { foo: string; } >foo : string >y : { foo: string; bar: string; } @@ -97,7 +97,7 @@ interface A { // T >y : Derived[] a14: new (x: { a: string; b: number }) => Object; ->a14 : new (x: { a: string; b: number;}) => Object +>a14 : new (x: { a: string; b: number; }) => Object >x : { a: string; b: number; } >a : string >b : number @@ -154,10 +154,10 @@ interface I extends B { >r : T a9: new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; // ok, same as a8 with compatible object literal ->a9 : new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number;}) => U) => (r: T) => U +>a9 : new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U >x : (arg: T) => U >arg : T ->y : (arg2: { foo: string; bing: number;}) => U +>y : (arg2: { foo: string; bing: number; }) => U >arg2 : { foo: string; bing: number; } >foo : string >bing : number @@ -183,7 +183,7 @@ interface I extends B { >y : T a14: new (x: { a: T; b: U }) => T; // ok ->a14 : new (x: { a: T; b: U;}) => T +>a14 : new (x: { a: T; b: U; }) => T >x : { a: T; b: U; } >a : T >b : U diff --git a/tests/baselines/reference/subtypingWithConstructSignatures6.types b/tests/baselines/reference/subtypingWithConstructSignatures6.types index b16692c6e3010..61d716a27669f 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures6.types +++ b/tests/baselines/reference/subtypingWithConstructSignatures6.types @@ -54,7 +54,7 @@ interface A { // T >arg : T a11: new (x: { foo: T }, y: { foo: T; bar: T }) => Base; ->a11 : new (x: { foo: T;}, y: { foo: T; bar: T;}) => Base +>a11 : new (x: { foo: T; }, y: { foo: T; bar: T; }) => Base >x : { foo: T; } >foo : T >y : { foo: T; bar: T; } @@ -62,13 +62,13 @@ interface A { // T >bar : T a15: new (x: { a: T; b: T }) => T[]; ->a15 : new (x: { a: T; b: T;}) => T[] +>a15 : new (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T a16: new (x: { a: T; b: T }) => T[]; ->a16 : new (x: { a: T; b: T;}) => T[] +>a16 : new (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T @@ -109,7 +109,7 @@ interface I5 extends A { interface I7 extends A { a11: new (x: { foo: T }, y: { foo: U; bar: U }) => Base; ->a11 : new (x: { foo: T;}, y: { foo: U; bar: U;}) => Base +>a11 : new (x: { foo: T; }, y: { foo: U; bar: U; }) => Base >x : { foo: T; } >foo : T >y : { foo: U; bar: U; } @@ -119,7 +119,7 @@ interface I7 extends A { interface I9 extends A { a16: new (x: { a: T; b: T }) => T[]; ->a16 : new (x: { a: T; b: T;}) => T[] +>a16 : new (x: { a: T; b: T; }) => T[] >x : { a: T; b: T; } >a : T >b : T diff --git a/tests/baselines/reference/switchCaseCircularRefeference.types b/tests/baselines/reference/switchCaseCircularRefeference.types index 28fb1b070ad77..9d5a90aa56812 100644 --- a/tests/baselines/reference/switchCaseCircularRefeference.types +++ b/tests/baselines/reference/switchCaseCircularRefeference.types @@ -4,7 +4,7 @@ // Repro from #9507 function f(x: {a: "A", b} | {a: "C", e}) { ->f : (x: { a: "A"; b: any;} | { a: "C"; e: any;}) => void +>f : (x: { a: "A"; b: any; } | { a: "C"; e: any; }) => void >x : { a: "A"; b: any; } | { a: "C"; e: any; } >a : "A" >b : any diff --git a/tests/baselines/reference/symbolProperty21.types b/tests/baselines/reference/symbolProperty21.types index 7b75128184b3b..7dcc06620ece0 100644 --- a/tests/baselines/reference/symbolProperty21.types +++ b/tests/baselines/reference/symbolProperty21.types @@ -16,7 +16,7 @@ interface I { } declare function foo(p: I): { t: T; u: U }; ->foo : (p: I) => { t: T; u: U;} +>foo : (p: I) => { t: T; u: U; } >p : I >t : T >u : U diff --git a/tests/baselines/reference/symbolProperty35.types b/tests/baselines/reference/symbolProperty35.types index 25e29d06ca6b2..31f59411fa882 100644 --- a/tests/baselines/reference/symbolProperty35.types +++ b/tests/baselines/reference/symbolProperty35.types @@ -3,7 +3,7 @@ === symbolProperty35.ts === interface I1 { [Symbol.toStringTag](): { x: string } ->[Symbol.toStringTag] : () => { x: string;} +>[Symbol.toStringTag] : () => { x: string; } >Symbol.toStringTag : unique symbol >Symbol : SymbolConstructor >toStringTag : unique symbol @@ -11,7 +11,7 @@ interface I1 { } interface I2 { [Symbol.toStringTag](): { x: number } ->[Symbol.toStringTag] : () => { x: number;} +>[Symbol.toStringTag] : () => { x: number; } >Symbol.toStringTag : unique symbol >Symbol : SymbolConstructor >toStringTag : unique symbol diff --git a/tests/baselines/reference/symbolProperty41.types b/tests/baselines/reference/symbolProperty41.types index f7d0a9c845b8b..c8515edf0e109 100644 --- a/tests/baselines/reference/symbolProperty41.types +++ b/tests/baselines/reference/symbolProperty41.types @@ -5,7 +5,7 @@ class C { >C : C [Symbol.iterator](x: string): { x: string }; ->[Symbol.iterator] : { (x: string): { x: string;}; (x: "hello"): { x: string; hello: string; }; } +>[Symbol.iterator] : { (x: string): { x: string; }; (x: "hello"): { x: string; hello: string; }; } >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol @@ -13,7 +13,7 @@ class C { >x : string [Symbol.iterator](x: "hello"): { x: string; hello: string }; ->[Symbol.iterator] : { (x: string): { x: string; }; (x: "hello"): { x: string; hello: string;}; } +>[Symbol.iterator] : { (x: string): { x: string; }; (x: "hello"): { x: string; hello: string; }; } >Symbol.iterator : unique symbol >Symbol : SymbolConstructor >iterator : unique symbol diff --git a/tests/baselines/reference/symbolProperty61.types b/tests/baselines/reference/symbolProperty61.types index 29b7ef6835236..7e6482c2a095c 100644 --- a/tests/baselines/reference/symbolProperty61.types +++ b/tests/baselines/reference/symbolProperty61.types @@ -51,7 +51,7 @@ type InteropObservable = { >InteropObservable : InteropObservable [Symbol.obs]: () => { subscribe(next: (val: T) => void): void } ->[Symbol.obs] : () => { subscribe(next: (val: T) => void): void;} +>[Symbol.obs] : () => { subscribe(next: (val: T) => void): void; } >Symbol.obs : unique symbol >Symbol : SymbolConstructor >obs : unique symbol diff --git a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.types b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.types index c0c2ab9e1073c..33fbaf2ec7ff6 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.types +++ b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.types @@ -7,7 +7,7 @@ interface I { >subs : number[] member: { ->member : new (s: string) => { new (n: number): { new (): boolean; };} +>member : new (s: string) => { new (n: number): { new (): boolean; }; } new (s: string): { >s : string diff --git a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.types b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.types index 85715c5dfc845..fd1b696f4676c 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.types +++ b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.types @@ -7,7 +7,7 @@ interface I { >subs : number[] member: { ->member : new (s: string) => { new (n: number): { new (): boolean; };} +>member : new (s: string) => { new (n: number): { new (): boolean; }; } new (s: string): { >s : string diff --git a/tests/baselines/reference/taggedTemplatesWithTypeArguments1.types b/tests/baselines/reference/taggedTemplatesWithTypeArguments1.types index 3ac9fba42eb3d..33a8afa110de9 100644 --- a/tests/baselines/reference/taggedTemplatesWithTypeArguments1.types +++ b/tests/baselines/reference/taggedTemplatesWithTypeArguments1.types @@ -97,10 +97,10 @@ export const b = g ` `; declare let obj: { ->obj : { prop: (strs: TemplateStringsArray, x: (input: T) => T) => { returnedObjProp: T;}; } +>obj : { prop: (strs: TemplateStringsArray, x: (input: T) => T) => { returnedObjProp: T; }; } prop: (strs: TemplateStringsArray, x: (input: T) => T) => { ->prop : (strs: TemplateStringsArray, x: (input: T) => T) => { returnedObjProp: T;} +>prop : (strs: TemplateStringsArray, x: (input: T) => T) => { returnedObjProp: T; } >strs : TemplateStringsArray >x : (input: T) => T >input : T diff --git a/tests/baselines/reference/targetTypeCastTest.types b/tests/baselines/reference/targetTypeCastTest.types index b1cee9f7b1cd0..f1e20a6b6d7fd 100644 --- a/tests/baselines/reference/targetTypeCastTest.types +++ b/tests/baselines/reference/targetTypeCastTest.types @@ -2,7 +2,7 @@ === targetTypeCastTest.ts === declare var Point: { new(x:number, y:number): {x: number; y: number; }; } ->Point : new (x: number, y: number) => { x: number; y: number;} +>Point : new (x: number, y: number) => { x: number; y: number; } >x : number >y : number >x : number diff --git a/tests/baselines/reference/targetTypeVoidFunc.types b/tests/baselines/reference/targetTypeVoidFunc.types index 159f46bd945e8..fe495f9cab077 100644 --- a/tests/baselines/reference/targetTypeVoidFunc.types +++ b/tests/baselines/reference/targetTypeVoidFunc.types @@ -2,7 +2,7 @@ === targetTypeVoidFunc.ts === function f1(): { new (): number; } { ->f1 : () => { new (): number;} +>f1 : () => { new (): number; } return function () { return; } >function () { return; } : () => void diff --git a/tests/baselines/reference/templateLiteralTypes3.types b/tests/baselines/reference/templateLiteralTypes3.types index 3f7f5f028c707..e5037cbf72a19 100644 --- a/tests/baselines/reference/templateLiteralTypes3.types +++ b/tests/baselines/reference/templateLiteralTypes3.types @@ -384,8 +384,8 @@ interface ITest

> { // Repro from #45906 type Schema = { a: { b: { c: number } } }; ->Schema : { a: { b: { c: number; };}; } ->a : { b: { c: number;}; } +>Schema : { a: { b: { c: number; }; }; } +>a : { b: { c: number; }; } >b : { c: number; } >c : number diff --git a/tests/baselines/reference/templateLiteralTypes4.types b/tests/baselines/reference/templateLiteralTypes4.types index cd070845ed60a..0d745220d769f 100644 --- a/tests/baselines/reference/templateLiteralTypes4.types +++ b/tests/baselines/reference/templateLiteralTypes4.types @@ -474,12 +474,12 @@ type TypedObjectOrdinalMembers = { interface TypedObjectMembers { // get/set a field by name get(key: K): FieldType["type"]>; ->get : (key: K) => FieldType["type"]> +>get : (key: K) => FieldType["type"]> >key : K >name : K set(key: K, value: FieldType["type"]>): void; ->set : (key: K, value: FieldType["type"]>) => void +>set : (key: K, value: FieldType["type"]>) => void >key : K >value : FieldType["type"]> >name : K diff --git a/tests/baselines/reference/templateLiteralTypes6.types b/tests/baselines/reference/templateLiteralTypes6.types index fcfec10f17452..64a499377c262 100644 --- a/tests/baselines/reference/templateLiteralTypes6.types +++ b/tests/baselines/reference/templateLiteralTypes6.types @@ -4,7 +4,7 @@ // https://github.com/microsoft/TypeScript/issues/56659 type Registry = { ->Registry : { a: { a1: {};}; b: { b1: {};}; } +>Registry : { a: { a1: {}; }; b: { b1: {}; }; } a: { a1: {} }; >a : { a1: {}; } diff --git a/tests/baselines/reference/templateLiteralTypesPatterns.types b/tests/baselines/reference/templateLiteralTypesPatterns.types index d63799df57018..3cc429744e27b 100644 --- a/tests/baselines/reference/templateLiteralTypesPatterns.types +++ b/tests/baselines/reference/templateLiteralTypesPatterns.types @@ -637,7 +637,7 @@ export abstract class BB { // repro from https://github.com/microsoft/TypeScript/issues/54177#issuecomment-1538436654 function conversionTest(groupName: | "downcast" | "dataDowncast" | "editingDowncast" | `${string}Downcast` & {}) {} ->conversionTest : (groupName: "downcast" | "dataDowncast" | "editingDowncast" | `${string}Downcast` & {}) => void +>conversionTest : (groupName: "downcast" | "dataDowncast" | "editingDowncast" | (`${string}Downcast` & {})) => void >groupName : (`${string}Downcast` & {}) | "downcast" | "dataDowncast" | "editingDowncast" conversionTest("testDowncast"); @@ -646,7 +646,7 @@ conversionTest("testDowncast"); >"testDowncast" : "testDowncast" function conversionTest2(groupName: | "downcast" | "dataDowncast" | "editingDowncast" | {} & `${string}Downcast`) {} ->conversionTest2 : (groupName: "downcast" | "dataDowncast" | "editingDowncast" | {} & `${string}Downcast`) => void +>conversionTest2 : (groupName: "downcast" | "dataDowncast" | "editingDowncast" | ({} & `${string}Downcast`)) => void >groupName : "downcast" | "dataDowncast" | "editingDowncast" | ({} & `${string}Downcast`) conversionTest2("testDowncast"); diff --git a/tests/baselines/reference/thisInTypeQuery.types b/tests/baselines/reference/thisInTypeQuery.types index 1814f2cb2e62f..b1ace4d42c8c7 100644 --- a/tests/baselines/reference/thisInTypeQuery.types +++ b/tests/baselines/reference/thisInTypeQuery.types @@ -34,8 +34,8 @@ class MyClass { >runTypeFails : () => void const params = null as any as { a: { key: string } } | null; ->params : { a: { key: string;}; } | null ->null as any as { a: { key: string } } | null : { a: { key: string;}; } | null +>params : { a: { key: string; }; } | null +>null as any as { a: { key: string } } | null : { a: { key: string; }; } | null >null as any : any >a : { key: string; } >key : string diff --git a/tests/baselines/reference/thisTypeInFunctions.types b/tests/baselines/reference/thisTypeInFunctions.types index b8a78ff5f3636..f0704e7a9f330 100644 --- a/tests/baselines/reference/thisTypeInFunctions.types +++ b/tests/baselines/reference/thisTypeInFunctions.types @@ -39,7 +39,7 @@ class C { >m : number } explicitProperty(this: {n: number}, m: number): number { ->explicitProperty : (this: { n: number;}, m: number) => number +>explicitProperty : (this: { n: number; }, m: number) => number >this : { n: number; } >n : number >m : number @@ -79,7 +79,7 @@ interface I { >this : void explicitStructural(this: {a: number}): number; ->explicitStructural : (this: { a: number;}) => number +>explicitStructural : (this: { a: number; }) => number >this : { a: number; } >a : number @@ -92,7 +92,7 @@ interface I { >this : this } function explicitStructural(this: { y: number }, x: number): number { ->explicitStructural : (this: { y: number;}, x: number) => number +>explicitStructural : (this: { y: number; }, x: number) => number >this : { y: number; } >y : number >x : number @@ -105,7 +105,7 @@ function explicitStructural(this: { y: number }, x: number): number { >y : number } function justThis(this: { y: number }): number { ->justThis : (this: { y: number;}) => number +>justThis : (this: { y: number; }) => number >this : { y: number; } >y : number @@ -238,9 +238,9 @@ impl.explicitThis = function () { return this.a; }; // parameter checking let ok: {y: number, f: (this: { y: number }, x: number) => number} = { y: 12, f: explicitStructural }; ->ok : { y: number; f: (this: { y: number;}, x: number) => number; } +>ok : { y: number; f: (this: { y: number; }, x: number) => number; } >y : number ->f : (this: { y: number;}, x: number) => number +>f : (this: { y: number; }, x: number) => number >this : { y: number; } >y : number >x : number @@ -339,7 +339,7 @@ d.explicitThis(12); >12 : 12 let reconstructed: { ->reconstructed : { n: number; explicitThis(this: C, m: number): number; explicitC(this: C, m: number): number; explicitProperty: (this: { n: number;}, m: number) => number; explicitVoid(this: void, m: number): number; } +>reconstructed : { n: number; explicitThis(this: C, m: number): number; explicitC(this: C, m: number): number; explicitProperty: (this: { n: number; }, m: number) => number; explicitVoid(this: void, m: number): number; } n: number, >n : number @@ -355,7 +355,7 @@ let reconstructed: { >m : number explicitProperty: (this: {n : number}, m: number) => number, ->explicitProperty : (this: { n: number;}, m: number) => number +>explicitProperty : (this: { n: number; }, m: number) => number >this : { n: number; } >n : number >m : number @@ -424,11 +424,11 @@ explicitVoid(12); // assignment checking let unboundToSpecified: (this: { y: number }, x: number) => number = x => x + this.y; // ok, this:any ->unboundToSpecified : (this: { y: number;}, x: number) => number +>unboundToSpecified : (this: { y: number; }, x: number) => number >this : { y: number; } >y : number >x : number ->x => x + this.y : (this: { y: number;}, x: number) => any +>x => x + this.y : (this: { y: number; }, x: number) => any >x : number >x + this.y : any >x : number @@ -437,18 +437,18 @@ let unboundToSpecified: (this: { y: number }, x: number) => number = x => x + th >y : any let specifiedToSpecified: (this: {y: number}, x: number) => number = explicitStructural; ->specifiedToSpecified : (this: { y: number;}, x: number) => number +>specifiedToSpecified : (this: { y: number; }, x: number) => number >this : { y: number; } >y : number >x : number >explicitStructural : (this: { y: number; }, x: number) => number let anyToSpecified: (this: { y: number }, x: number) => number = function(x: number): number { return x + 12; }; ->anyToSpecified : (this: { y: number;}, x: number) => number +>anyToSpecified : (this: { y: number; }, x: number) => number >this : { y: number; } >y : number >x : number ->function(x: number): number { return x + 12; } : (this: { y: number;}, x: number) => number +>function(x: number): number { return x + 12; } : (this: { y: number; }, x: number) => number >x : number >x + 12 : number >x : number @@ -474,14 +474,14 @@ let specifiedLambda: (this: void, x: number) => number = x => x + 12; >12 : 12 let unspecifiedLambdaToSpecified: (this: {y: number}, x: number) => number = unspecifiedLambda; ->unspecifiedLambdaToSpecified : (this: { y: number;}, x: number) => number +>unspecifiedLambdaToSpecified : (this: { y: number; }, x: number) => number >this : { y: number; } >y : number >x : number >unspecifiedLambda : (x: number) => number let specifiedLambdaToSpecified: (this: {y: number}, x: number) => number = specifiedLambda; ->specifiedLambdaToSpecified : (this: { y: number;}, x: number) => number +>specifiedLambdaToSpecified : (this: { y: number; }, x: number) => number >this : { y: number; } >y : number >x : number @@ -494,7 +494,7 @@ let explicitCFunction: (this: C, m: number) => number; >m : number let explicitPropertyFunction: (this: {n: number}, m: number) => number; ->explicitPropertyFunction : (this: { n: number;}, m: number) => number +>explicitPropertyFunction : (this: { n: number; }, m: number) => number >this : { n: number; } >n : number >m : number @@ -528,11 +528,11 @@ c.explicitProperty = explicitPropertyFunction; >explicitPropertyFunction : (this: { n: number; }, m: number) => number c.explicitProperty = function(this: {n: number}, m: number) { return this.n + m }; ->c.explicitProperty = function(this: {n: number}, m: number) { return this.n + m } : (this: { n: number;}, m: number) => number +>c.explicitProperty = function(this: {n: number}, m: number) { return this.n + m } : (this: { n: number; }, m: number) => number >c.explicitProperty : (this: { n: number; }, m: number) => number >c : C >explicitProperty : (this: { n: number; }, m: number) => number ->function(this: {n: number}, m: number) { return this.n + m } : (this: { n: number;}, m: number) => number +>function(this: {n: number}, m: number) { return this.n + m } : (this: { n: number; }, m: number) => number >this : { n: number; } >n : number >m : number @@ -876,7 +876,7 @@ function InterfaceThis(this: I) { >12 : 12 } function LiteralTypeThis(this: {x: string}) { ->LiteralTypeThis : (this: { x: string;}) => void +>LiteralTypeThis : (this: { x: string; }) => void >this : { x: string; } >x : string diff --git a/tests/baselines/reference/thisTypeInFunctionsNegative.types b/tests/baselines/reference/thisTypeInFunctionsNegative.types index 3b94d6b69f340..79f8a843bc695 100644 --- a/tests/baselines/reference/thisTypeInFunctionsNegative.types +++ b/tests/baselines/reference/thisTypeInFunctionsNegative.types @@ -43,7 +43,7 @@ class C { >m : number } explicitProperty(this: {n: number}, m: number): number { ->explicitProperty : (this: { n: number;}, m: number) => number +>explicitProperty : (this: { n: number; }, m: number) => number >this : { n: number; } >n : number >m : number @@ -112,7 +112,7 @@ interface I { >this : void explicitStructural(this: {a: number}): number; ->explicitStructural : (this: { a: number;}) => number +>explicitStructural : (this: { a: number; }) => number >this : { a: number; } >a : number @@ -189,7 +189,7 @@ implExplicitInterface(); // error, no 'a' in 'void' >implExplicitInterface : (this: I) => number function explicitStructural(this: { y: number }, x: number): number { ->explicitStructural : (this: { y: number;}, x: number) => number +>explicitStructural : (this: { y: number; }, x: number) => number >this : { y: number; } >y : number >x : number @@ -202,7 +202,7 @@ function explicitStructural(this: { y: number }, x: number): number { >y : number } function propertyName(this: { y: number }, x: number): number { ->propertyName : (this: { y: number;}, x: number) => number +>propertyName : (this: { y: number; }, x: number) => number >this : { y: number; } >y : number >x : number @@ -227,9 +227,9 @@ function voidThisSpecified(this: void, x: number): number { >notSpecified : any } let ok: {y: number, f: (this: { y: number }, x: number) => number} = { y: 12, explicitStructural }; ->ok : { y: number; f: (this: { y: number;}, x: number) => number; } +>ok : { y: number; f: (this: { y: number; }, x: number) => number; } >y : number ->f : (this: { y: number;}, x: number) => number +>f : (this: { y: number; }, x: number) => number >this : { y: number; } >y : number >x : number @@ -239,9 +239,9 @@ let ok: {y: number, f: (this: { y: number }, x: number) => number} = { y: 12, ex >explicitStructural : (this: { y: number; }, x: number) => number let wrongPropertyType: {y: string, f: (this: { y: number }, x: number) => number} = { y: 'foo', explicitStructural }; ->wrongPropertyType : { y: string; f: (this: { y: number;}, x: number) => number; } +>wrongPropertyType : { y: string; f: (this: { y: number; }, x: number) => number; } >y : string ->f : (this: { y: number;}, x: number) => number +>f : (this: { y: number; }, x: number) => number >this : { y: number; } >y : number >x : number @@ -251,9 +251,9 @@ let wrongPropertyType: {y: string, f: (this: { y: number }, x: number) => number >explicitStructural : (this: { y: number; }, x: number) => number let wrongPropertyName: {wrongName: number, f: (this: { y: number }, x: number) => number} = { wrongName: 12, explicitStructural }; ->wrongPropertyName : { wrongName: number; f: (this: { y: number;}, x: number) => number; } +>wrongPropertyName : { wrongName: number; f: (this: { y: number; }, x: number) => number; } >wrongName : number ->f : (this: { y: number;}, x: number) => number +>f : (this: { y: number; }, x: number) => number >this : { y: number; } >y : number >x : number @@ -394,7 +394,7 @@ let specifiedToVoid: (this: void, x: number) => number = explicitStructural; >explicitStructural : (this: { y: number; }, x: number) => number let reconstructed: { ->reconstructed : { n: number; explicitThis(this: C, m: number): number; explicitC(this: C, m: number): number; explicitProperty: (this: { n: number;}, m: number) => number; explicitVoid(this: void, m: number): number; } +>reconstructed : { n: number; explicitThis(this: C, m: number): number; explicitC(this: C, m: number): number; explicitProperty: (this: { n: number; }, m: number) => number; explicitVoid(this: void, m: number): number; } n: number, >n : number @@ -410,7 +410,7 @@ let reconstructed: { >m : number explicitProperty: (this: {n : number}, m: number) => number, ->explicitProperty : (this: { n: number;}, m: number) => number +>explicitProperty : (this: { n: number; }, m: number) => number >this : { n: number; } >n : number >m : number @@ -460,7 +460,7 @@ let d = new D(); >D : typeof D let explicitXProperty: (this: { x: number }, m: number) => number; ->explicitXProperty : (this: { x: number;}, m: number) => number +>explicitXProperty : (this: { x: number; }, m: number) => number >this : { x: number; } >x : number >m : number @@ -770,8 +770,8 @@ c.explicitProperty = (this, m) => m + this.n; >n : any const f2 = (this: {n: number}, m: number) => m + this.n; ->f2 : (this: { n: number;}, m: number) => any ->(this: {n: number}, m: number) => m + this.n : (this: { n: number;}, m: number) => any +>f2 : (this: { n: number; }, m: number) => any +>(this: {n: number}, m: number) => m + this.n : (this: { n: number; }, m: number) => any >this : { n: number; } >n : number >m : number @@ -782,8 +782,8 @@ const f2 = (this: {n: number}, m: number) => m + this.n; >n : any const f3 = async (this: {n: number}, m: number) => m + this.n; ->f3 : (this: { n: number;}, m: number) => Promise ->async (this: {n: number}, m: number) => m + this.n : (this: { n: number;}, m: number) => Promise +>f3 : (this: { n: number; }, m: number) => Promise +>async (this: {n: number}, m: number) => m + this.n : (this: { n: number; }, m: number) => Promise >this : { n: number; } >n : number >m : number @@ -794,8 +794,8 @@ const f3 = async (this: {n: number}, m: number) => m + this.n; >n : any const f4 = async (this: {n: number}, m: number) => m + this.n; ->f4 : (this: { n: number;}, m: number) => Promise ->async (this: {n: number}, m: number) => m + this.n : (this: { n: number;}, m: number) => Promise +>f4 : (this: { n: number; }, m: number) => Promise +>async (this: {n: number}, m: number) => m + this.n : (this: { n: number; }, m: number) => Promise >this : { n: number; } >n : number >m : number diff --git a/tests/baselines/reference/thisTypeSyntacticContext.types b/tests/baselines/reference/thisTypeSyntacticContext.types index 6cf06e13a51da..0fc61552703ff 100644 --- a/tests/baselines/reference/thisTypeSyntacticContext.types +++ b/tests/baselines/reference/thisTypeSyntacticContext.types @@ -2,15 +2,15 @@ === thisTypeSyntacticContext.ts === function f(this: { n: number }) { ->f : (this: { n: number;}) => void +>f : (this: { n: number; }) => void >this : { n: number; } >n : number } const o: { n: number, test?: (this: { n: number }) => void } = { n: 1 } ->o : { n: number; test?: (this: { n: number;}) => void; } +>o : { n: number; test?: (this: { n: number; }) => void; } >n : number ->test : (this: { n: number;}) => void +>test : (this: { n: number; }) => void >this : { n: number; } >n : number >{ n: 1 } : { n: number; } diff --git a/tests/baselines/reference/tslibReExportHelpers2.types b/tests/baselines/reference/tslibReExportHelpers2.types index 4ca51dbbcd372..13f70978d4862 100644 --- a/tests/baselines/reference/tslibReExportHelpers2.types +++ b/tests/baselines/reference/tslibReExportHelpers2.types @@ -2,7 +2,7 @@ === /node_modules/tslib/index.d.ts === export declare function __classPrivateFieldGet( ->__classPrivateFieldGet : { (receiver: T, state: { has(o: T): boolean; get(o: T): V | undefined;}, kind?: "f"): V; unknown, V_1>(receiver: T_1, state: T_1, kind: "f", f: { value: V_1; }): V_1; } +>__classPrivateFieldGet : { (receiver: T, state: { has(o: T): boolean; get(o: T): V | undefined; }, kind?: "f"): V; unknown, V_1>(receiver: T_1, state: T_1, kind: "f", f: { value: V_1; }): V_1; } receiver: T, >receiver : T @@ -19,7 +19,7 @@ export declare function __classPrivateFieldGet( ): V; export declare function __classPrivateFieldGet unknown, V>( ->__classPrivateFieldGet : { (receiver: T_1, state: { has(o: T_1): boolean; get(o: T_1): V_1; }, kind?: "f"): V_1; unknown, V>(receiver: T, state: T, kind: "f", f: { value: V;}): V; } +>__classPrivateFieldGet : { (receiver: T_1, state: { has(o: T_1): boolean; get(o: T_1): V_1; }, kind?: "f"): V_1; unknown, V>(receiver: T, state: T, kind: "f", f: { value: V; }): V; } >args : any[] receiver: T, diff --git a/tests/baselines/reference/tsxAttributeQuickinfoTypesSameAsObjectLiteral.types b/tests/baselines/reference/tsxAttributeQuickinfoTypesSameAsObjectLiteral.types index c35eb022b79ec..238db57fb3e47 100644 --- a/tests/baselines/reference/tsxAttributeQuickinfoTypesSameAsObjectLiteral.types +++ b/tests/baselines/reference/tsxAttributeQuickinfoTypesSameAsObjectLiteral.types @@ -13,8 +13,8 @@ namespace JSX { } const Foo = (props: { foo: "A" | "B" | "C" }) => {props.foo}; ->Foo : (props: { foo: "A" | "B" | "C";}) => JSX.Element ->(props: { foo: "A" | "B" | "C" }) => {props.foo} : (props: { foo: "A" | "B" | "C";}) => JSX.Element +>Foo : (props: { foo: "A" | "B" | "C"; }) => JSX.Element +>(props: { foo: "A" | "B" | "C" }) => {props.foo} : (props: { foo: "A" | "B" | "C"; }) => JSX.Element >props : { foo: "A" | "B" | "C"; } >foo : "A" | "B" | "C" >{props.foo} : JSX.Element diff --git a/tests/baselines/reference/tsxSfcReturnNull.types b/tests/baselines/reference/tsxSfcReturnNull.types index bbd033ee45283..ec923c501056f 100644 --- a/tests/baselines/reference/tsxSfcReturnNull.types +++ b/tests/baselines/reference/tsxSfcReturnNull.types @@ -10,7 +10,7 @@ const Foo = (props: any) => null; >props : any function Greet(x: {name?: string}) { ->Greet : (x: { name?: string;}) => any +>Greet : (x: { name?: string; }) => any >x : { name?: string; } >name : string diff --git a/tests/baselines/reference/tsxSfcReturnNullStrictNullChecks.types b/tests/baselines/reference/tsxSfcReturnNullStrictNullChecks.types index 9f38ceba9dcd4..aa44d22e324af 100644 --- a/tests/baselines/reference/tsxSfcReturnNullStrictNullChecks.types +++ b/tests/baselines/reference/tsxSfcReturnNullStrictNullChecks.types @@ -10,7 +10,7 @@ const Foo = (props: any) => null; >props : any function Greet(x: {name?: string}) { ->Greet : (x: { name?: string;}) => null +>Greet : (x: { name?: string; }) => null >x : { name?: string | undefined; } >name : string | undefined diff --git a/tests/baselines/reference/tsxSfcReturnUndefinedStrictNullChecks.types b/tests/baselines/reference/tsxSfcReturnUndefinedStrictNullChecks.types index 7fcb2e7b8fdaa..861a18cdf3c15 100644 --- a/tests/baselines/reference/tsxSfcReturnUndefinedStrictNullChecks.types +++ b/tests/baselines/reference/tsxSfcReturnUndefinedStrictNullChecks.types @@ -11,7 +11,7 @@ const Foo = (props: any) => undefined; >undefined : undefined function Greet(x: {name?: string}) { ->Greet : (x: { name?: string;}) => undefined +>Greet : (x: { name?: string; }) => undefined >x : { name?: string | undefined; } >name : string | undefined diff --git a/tests/baselines/reference/tsxSpreadChildren.types b/tests/baselines/reference/tsxSpreadChildren.types index ab12cf673a31a..1c3f619a4c58c 100644 --- a/tests/baselines/reference/tsxSpreadChildren.types +++ b/tests/baselines/reference/tsxSpreadChildren.types @@ -23,7 +23,7 @@ interface TodoListProps { >todos : TodoProp[] } function Todo(prop: { key: number, todo: string }) { ->Todo : (prop: { key: number; todo: string;}) => JSX.Element +>Todo : (prop: { key: number; todo: string; }) => JSX.Element >prop : { key: number; todo: string; } >key : number >todo : string diff --git a/tests/baselines/reference/tsxSpreadChildrenInvalidType(jsx=react,target=es2015).types b/tests/baselines/reference/tsxSpreadChildrenInvalidType(jsx=react,target=es2015).types index cdaa458897d5c..7dbd49fefa613 100644 --- a/tests/baselines/reference/tsxSpreadChildrenInvalidType(jsx=react,target=es2015).types +++ b/tests/baselines/reference/tsxSpreadChildrenInvalidType(jsx=react,target=es2015).types @@ -23,7 +23,7 @@ interface TodoListProps { >todos : TodoProp[] } function Todo(prop: { key: number, todo: string }) { ->Todo : (prop: { key: number; todo: string;}) => JSX.Element +>Todo : (prop: { key: number; todo: string; }) => JSX.Element >prop : { key: number; todo: string; } >key : number >todo : string diff --git a/tests/baselines/reference/tsxSpreadChildrenInvalidType(jsx=react,target=es5).types b/tests/baselines/reference/tsxSpreadChildrenInvalidType(jsx=react,target=es5).types index cdaa458897d5c..7dbd49fefa613 100644 --- a/tests/baselines/reference/tsxSpreadChildrenInvalidType(jsx=react,target=es5).types +++ b/tests/baselines/reference/tsxSpreadChildrenInvalidType(jsx=react,target=es5).types @@ -23,7 +23,7 @@ interface TodoListProps { >todos : TodoProp[] } function Todo(prop: { key: number, todo: string }) { ->Todo : (prop: { key: number; todo: string;}) => JSX.Element +>Todo : (prop: { key: number; todo: string; }) => JSX.Element >prop : { key: number; todo: string; } >key : number >todo : string diff --git a/tests/baselines/reference/tsxSpreadChildrenInvalidType(jsx=react-jsx,target=es2015).types b/tests/baselines/reference/tsxSpreadChildrenInvalidType(jsx=react-jsx,target=es2015).types index 1110fcf70e5be..09192cfdfa7b2 100644 --- a/tests/baselines/reference/tsxSpreadChildrenInvalidType(jsx=react-jsx,target=es2015).types +++ b/tests/baselines/reference/tsxSpreadChildrenInvalidType(jsx=react-jsx,target=es2015).types @@ -23,7 +23,7 @@ interface TodoListProps { >todos : TodoProp[] } function Todo(prop: { key: number, todo: string }) { ->Todo : (prop: { key: number; todo: string;}) => any +>Todo : (prop: { key: number; todo: string; }) => any >prop : { key: number; todo: string; } >key : number >todo : string diff --git a/tests/baselines/reference/tsxSpreadChildrenInvalidType(jsx=react-jsx,target=es5).types b/tests/baselines/reference/tsxSpreadChildrenInvalidType(jsx=react-jsx,target=es5).types index 1110fcf70e5be..09192cfdfa7b2 100644 --- a/tests/baselines/reference/tsxSpreadChildrenInvalidType(jsx=react-jsx,target=es5).types +++ b/tests/baselines/reference/tsxSpreadChildrenInvalidType(jsx=react-jsx,target=es5).types @@ -23,7 +23,7 @@ interface TodoListProps { >todos : TodoProp[] } function Todo(prop: { key: number, todo: string }) { ->Todo : (prop: { key: number; todo: string;}) => any +>Todo : (prop: { key: number; todo: string; }) => any >prop : { key: number; todo: string; } >key : number >todo : string diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.types b/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.types index a64d8fd618c44..7a346be789ccf 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.types +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.types @@ -5,27 +5,27 @@ import React = require('react') >React : typeof React declare function OneThing(k: {yxx: string}): JSX.Element; ->OneThing : { (k: { yxx: string;}): JSX.Element; (k: { yxx1: string; children: string; }): JSX.Element; (l: { yy: number; yy1: string; }): JSX.Element; (l: { yy: number; yy1: string; yy2: boolean; }): JSX.Element; (l1: { data: string; "data-prop": boolean; }): JSX.Element; } +>OneThing : { (k: { yxx: string; }): JSX.Element; (k: { yxx1: string; children: string; }): JSX.Element; (l: { yy: number; yy1: string; }): JSX.Element; (l: { yy: number; yy1: string; yy2: boolean; }): JSX.Element; (l1: { data: string; "data-prop": boolean; }): JSX.Element; } >k : { yxx: string; } >yxx : string >JSX : any declare function OneThing(k: {yxx1: string, children: string}): JSX.Element; ->OneThing : { (k: { yxx: string; }): JSX.Element; (k: { yxx1: string; children: string;}): JSX.Element; (l: { yy: number; yy1: string; }): JSX.Element; (l: { yy: number; yy1: string; yy2: boolean; }): JSX.Element; (l1: { data: string; "data-prop": boolean; }): JSX.Element; } +>OneThing : { (k: { yxx: string; }): JSX.Element; (k: { yxx1: string; children: string; }): JSX.Element; (l: { yy: number; yy1: string; }): JSX.Element; (l: { yy: number; yy1: string; yy2: boolean; }): JSX.Element; (l1: { data: string; "data-prop": boolean; }): JSX.Element; } >k : { yxx1: string; children: string; } >yxx1 : string >children : string >JSX : any declare function OneThing(l: {yy: number, yy1: string}): JSX.Element; ->OneThing : { (k: { yxx: string; }): JSX.Element; (k: { yxx1: string; children: string; }): JSX.Element; (l: { yy: number; yy1: string;}): JSX.Element; (l: { yy: number; yy1: string; yy2: boolean; }): JSX.Element; (l1: { data: string; "data-prop": boolean; }): JSX.Element; } +>OneThing : { (k: { yxx: string; }): JSX.Element; (k: { yxx1: string; children: string; }): JSX.Element; (l: { yy: number; yy1: string; }): JSX.Element; (l: { yy: number; yy1: string; yy2: boolean; }): JSX.Element; (l1: { data: string; "data-prop": boolean; }): JSX.Element; } >l : { yy: number; yy1: string; } >yy : number >yy1 : string >JSX : any declare function OneThing(l: {yy: number, yy1: string, yy2: boolean}): JSX.Element; ->OneThing : { (k: { yxx: string; }): JSX.Element; (k: { yxx1: string; children: string; }): JSX.Element; (l: { yy: number; yy1: string; }): JSX.Element; (l: { yy: number; yy1: string; yy2: boolean;}): JSX.Element; (l1: { data: string; "data-prop": boolean; }): JSX.Element; } +>OneThing : { (k: { yxx: string; }): JSX.Element; (k: { yxx1: string; children: string; }): JSX.Element; (l: { yy: number; yy1: string; }): JSX.Element; (l: { yy: number; yy1: string; yy2: boolean; }): JSX.Element; (l1: { data: string; "data-prop": boolean; }): JSX.Element; } >l : { yy: number; yy1: string; yy2: boolean; } >yy : number >yy1 : string @@ -33,7 +33,7 @@ declare function OneThing(l: {yy: number, yy1: string, yy2: boolean}): JSX.Eleme >JSX : any declare function OneThing(l1: {data: string, "data-prop": boolean}): JSX.Element; ->OneThing : { (k: { yxx: string; }): JSX.Element; (k: { yxx1: string; children: string; }): JSX.Element; (l: { yy: number; yy1: string; }): JSX.Element; (l: { yy: number; yy1: string; yy2: boolean; }): JSX.Element; (l1: { data: string; "data-prop": boolean;}): JSX.Element; } +>OneThing : { (k: { yxx: string; }): JSX.Element; (k: { yxx1: string; children: string; }): JSX.Element; (l: { yy: number; yy1: string; }): JSX.Element; (l: { yy: number; yy1: string; yy2: boolean; }): JSX.Element; (l1: { data: string; "data-prop": boolean; }): JSX.Element; } >l1 : { data: string; "data-prop": boolean; } >data : string >"data-prop" : boolean @@ -83,21 +83,21 @@ declare function TestingOneThing({y1: string}): JSX.Element; >JSX : any declare function TestingOneThing(j: {"extra-data": string, yy?: string}): JSX.Element; ->TestingOneThing : { ({ y1: string }: { y1: any; }): JSX.Element; (j: { "extra-data": string; yy?: string;}): JSX.Element; (n: { yy: number; direction?: number; }): JSX.Element; (n: { yy: string; name: string; }): JSX.Element; } +>TestingOneThing : { ({ y1: string }: { y1: any; }): JSX.Element; (j: { "extra-data": string; yy?: string; }): JSX.Element; (n: { yy: number; direction?: number; }): JSX.Element; (n: { yy: string; name: string; }): JSX.Element; } >j : { "extra-data": string; yy?: string; } >"extra-data" : string >yy : string >JSX : any declare function TestingOneThing(n: {yy: number, direction?: number}): JSX.Element; ->TestingOneThing : { ({ y1: string }: { y1: any; }): JSX.Element; (j: { "extra-data": string; yy?: string; }): JSX.Element; (n: { yy: number; direction?: number;}): JSX.Element; (n: { yy: string; name: string; }): JSX.Element; } +>TestingOneThing : { ({ y1: string }: { y1: any; }): JSX.Element; (j: { "extra-data": string; yy?: string; }): JSX.Element; (n: { yy: number; direction?: number; }): JSX.Element; (n: { yy: string; name: string; }): JSX.Element; } >n : { yy: number; direction?: number; } >yy : number >direction : number >JSX : any declare function TestingOneThing(n: {yy: string, name: string}): JSX.Element; ->TestingOneThing : { ({ y1: string }: { y1: any; }): JSX.Element; (j: { "extra-data": string; yy?: string; }): JSX.Element; (n: { yy: number; direction?: number; }): JSX.Element; (n: { yy: string; name: string;}): JSX.Element; } +>TestingOneThing : { ({ y1: string }: { y1: any; }): JSX.Element; (j: { "extra-data": string; yy?: string; }): JSX.Element; (n: { yy: number; direction?: number; }): JSX.Element; (n: { yy: string; name: string; }): JSX.Element; } >n : { yy: string; name: string; } >yy : string >name : string @@ -144,14 +144,14 @@ const d5 = ; declare function TestingOptional(a: {y1?: string, y2?: number}): JSX.Element; ->TestingOptional : { (a: { y1?: string; y2?: number;}): JSX.Element; (a: { y1: boolean; y2?: number; y3: boolean; }): JSX.Element; } +>TestingOptional : { (a: { y1?: string; y2?: number; }): JSX.Element; (a: { y1: boolean; y2?: number; y3: boolean; }): JSX.Element; } >a : { y1?: string; y2?: number; } >y1 : string >y2 : number >JSX : any declare function TestingOptional(a: {y1: boolean, y2?: number, y3: boolean}): JSX.Element; ->TestingOptional : { (a: { y1?: string; y2?: number; }): JSX.Element; (a: { y1: boolean; y2?: number; y3: boolean;}): JSX.Element; } +>TestingOptional : { (a: { y1?: string; y2?: number; }): JSX.Element; (a: { y1: boolean; y2?: number; y3: boolean; }): JSX.Element; } >a : { y1: boolean; y2?: number; y3: boolean; } >y1 : boolean >y2 : number diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.types b/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.types index 688cc3e74f3dd..26722b578b134 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.types +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.types @@ -9,7 +9,7 @@ declare function OneThing(): JSX.Element; >JSX : any declare function OneThing(l: {yy: number, yy1: string}): JSX.Element; ->OneThing : { (): JSX.Element; (l: { yy: number; yy1: string;}): JSX.Element; } +>OneThing : { (): JSX.Element; (l: { yy: number; yy1: string; }): JSX.Element; } >l : { yy: number; yy1: string; } >yy : number >yy1 : string diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.types b/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.types index 047a1176785c9..2f6c26e565599 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.types +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.types @@ -10,7 +10,7 @@ declare function ZeroThingOrTwoThing(): JSX.Element; >JSX : any declare function ZeroThingOrTwoThing(l: {yy: number, yy1: string}, context: Context): JSX.Element; ->ZeroThingOrTwoThing : { (): JSX.Element; (l: { yy: number; yy1: string;}, context: Context): JSX.Element; } +>ZeroThingOrTwoThing : { (): JSX.Element; (l: { yy: number; yy1: string; }, context: Context): JSX.Element; } >l : { yy: number; yy1: string; } >yy : number >yy1 : string @@ -57,19 +57,19 @@ const two5 = ; // it is just any so >1000 : 1000 declare function ThreeThing(l: {y1: string}): JSX.Element; ->ThreeThing : { (l: { y1: string;}): JSX.Element; (l: { y2: string; }): JSX.Element; (l: { yy: number; yy1: string; }, context: Context, updater: any): JSX.Element; } +>ThreeThing : { (l: { y1: string; }): JSX.Element; (l: { y2: string; }): JSX.Element; (l: { yy: number; yy1: string; }, context: Context, updater: any): JSX.Element; } >l : { y1: string; } >y1 : string >JSX : any declare function ThreeThing(l: {y2: string}): JSX.Element; ->ThreeThing : { (l: { y1: string; }): JSX.Element; (l: { y2: string;}): JSX.Element; (l: { yy: number; yy1: string; }, context: Context, updater: any): JSX.Element; } +>ThreeThing : { (l: { y1: string; }): JSX.Element; (l: { y2: string; }): JSX.Element; (l: { yy: number; yy1: string; }, context: Context, updater: any): JSX.Element; } >l : { y2: string; } >y2 : string >JSX : any declare function ThreeThing(l: {yy: number, yy1: string}, context: Context, updater: any): JSX.Element; ->ThreeThing : { (l: { y1: string; }): JSX.Element; (l: { y2: string; }): JSX.Element; (l: { yy: number; yy1: string;}, context: Context, updater: any): JSX.Element; } +>ThreeThing : { (l: { y1: string; }): JSX.Element; (l: { y2: string; }): JSX.Element; (l: { yy: number; yy1: string; }, context: Context, updater: any): JSX.Element; } >l : { yy: number; yy1: string; } >yy : number >yy1 : string diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.types b/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.types index 91a851272e50f..2a66538ede36f 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.types +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.types @@ -9,7 +9,7 @@ declare function OneThing(): JSX.Element; >JSX : any declare function OneThing(l: {yy: number, yy1: string}): JSX.Element; ->OneThing : { (): JSX.Element; (l: { yy: number; yy1: string;}): JSX.Element; } +>OneThing : { (): JSX.Element; (l: { yy: number; yy1: string; }): JSX.Element; } >l : { yy: number; yy1: string; } >yy : number >yy1 : string @@ -94,13 +94,13 @@ const c7 = ; // Should error as there is extra attribu >yy : true declare function TestingOneThing(j: {"extra-data": string}): JSX.Element; ->TestingOneThing : { (j: { "extra-data": string;}): JSX.Element; (n: { yy: string; direction?: number; }): JSX.Element; } +>TestingOneThing : { (j: { "extra-data": string; }): JSX.Element; (n: { yy: string; direction?: number; }): JSX.Element; } >j : { "extra-data": string; } >"extra-data" : string >JSX : any declare function TestingOneThing(n: {yy: string, direction?: number}): JSX.Element; ->TestingOneThing : { (j: { "extra-data": string; }): JSX.Element; (n: { yy: string; direction?: number;}): JSX.Element; } +>TestingOneThing : { (j: { "extra-data": string; }): JSX.Element; (n: { yy: string; direction?: number; }): JSX.Element; } >n : { yy: string; direction?: number; } >yy : string >direction : number @@ -121,14 +121,14 @@ const d2 = >direction : string declare function TestingOptional(a: {y1?: string, y2?: number}): JSX.Element; ->TestingOptional : { (a: { y1?: string; y2?: number;}): JSX.Element; (a: { y1?: string; y2?: number; children: JSX.Element; }): JSX.Element; (a: { y1: boolean; y2?: number; y3: boolean; }): JSX.Element; } +>TestingOptional : { (a: { y1?: string; y2?: number; }): JSX.Element; (a: { y1?: string; y2?: number; children: JSX.Element; }): JSX.Element; (a: { y1: boolean; y2?: number; y3: boolean; }): JSX.Element; } >a : { y1?: string; y2?: number; } >y1 : string >y2 : number >JSX : any declare function TestingOptional(a: {y1?: string, y2?: number, children: JSX.Element}): JSX.Element; ->TestingOptional : { (a: { y1?: string; y2?: number; }): JSX.Element; (a: { y1?: string; y2?: number; children: JSX.Element;}): JSX.Element; (a: { y1: boolean; y2?: number; y3: boolean; }): JSX.Element; } +>TestingOptional : { (a: { y1?: string; y2?: number; }): JSX.Element; (a: { y1?: string; y2?: number; children: JSX.Element; }): JSX.Element; (a: { y1: boolean; y2?: number; y3: boolean; }): JSX.Element; } >a : { y1?: string; y2?: number; children: JSX.Element; } >y1 : string >y2 : number @@ -137,7 +137,7 @@ declare function TestingOptional(a: {y1?: string, y2?: number, children: JSX.Ele >JSX : any declare function TestingOptional(a: {y1: boolean, y2?: number, y3: boolean}): JSX.Element; ->TestingOptional : { (a: { y1?: string; y2?: number; }): JSX.Element; (a: { y1?: string; y2?: number; children: JSX.Element; }): JSX.Element; (a: { y1: boolean; y2?: number; y3: boolean;}): JSX.Element; } +>TestingOptional : { (a: { y1?: string; y2?: number; }): JSX.Element; (a: { y1?: string; y2?: number; children: JSX.Element; }): JSX.Element; (a: { y1: boolean; y2?: number; y3: boolean; }): JSX.Element; } >a : { y1: boolean; y2?: number; y3: boolean; } >y1 : boolean >y2 : number diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents1.types b/tests/baselines/reference/tsxStatelessFunctionComponents1.types index 05bf9c6f43e98..1f121ece6a258 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponents1.types +++ b/tests/baselines/reference/tsxStatelessFunctionComponents1.types @@ -11,7 +11,7 @@ function EmptyPropSFC() { } function Greet(x: {name: string}) { ->Greet : (x: { name: string;}) => JSX.Element +>Greet : (x: { name: string; }) => JSX.Element >x : { name: string; } >name : string @@ -33,7 +33,7 @@ function Meet({name = 'world'}) { >div : any } function MeetAndGreet(k: {"prop-name": string}) { ->MeetAndGreet : (k: { "prop-name": string;}) => JSX.Element +>MeetAndGreet : (k: { "prop-name": string; }) => JSX.Element >k : { "prop-name": string; } >"prop-name" : string diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents2.types b/tests/baselines/reference/tsxStatelessFunctionComponents2.types index 79da3ab02b99f..6a65bc562e747 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponents2.types +++ b/tests/baselines/reference/tsxStatelessFunctionComponents2.types @@ -5,7 +5,7 @@ import React = require('react'); >React : typeof React function Greet(x: {name?: string}) { ->Greet : (x: { name?: string;}) => JSX.Element +>Greet : (x: { name?: string; }) => JSX.Element >x : { name?: string; } >name : string diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.types b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.types index ed790c1f91c21..c97c524499e05 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.types +++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.types @@ -5,7 +5,7 @@ import React = require('react') >React : typeof React declare function ComponentWithTwoAttributes(l: {key1: K, value: V}): JSX.Element; ->ComponentWithTwoAttributes : (l: { key1: K; value: V;}) => JSX.Element +>ComponentWithTwoAttributes : (l: { key1: K; value: V; }) => JSX.Element >l : { key1: K; value: V; } >key1 : K >value : V @@ -38,7 +38,7 @@ function Baz(key1: T, value: U) { } declare function Link(l: {func: (arg: U)=>void}): JSX.Element; ->Link : (l: { func: (arg: U) => void;}) => JSX.Element +>Link : (l: { func: (arg: U) => void; }) => JSX.Element >l : { func: (arg: U) => void; } >func : (arg: U) => void >arg : U diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.types b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.types index 1cbca0da3ab32..7ddfaa77d1a83 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.types +++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.types @@ -5,14 +5,14 @@ import React = require('react') >React : typeof React declare function ComponentSpecific1(l: {prop: U, "ignore-prop": string}): JSX.Element; ->ComponentSpecific1 : (l: { prop: U; "ignore-prop": string;}) => JSX.Element +>ComponentSpecific1 : (l: { prop: U; "ignore-prop": string; }) => JSX.Element >l : { prop: U; "ignore-prop": string; } >prop : U >"ignore-prop" : string >JSX : any declare function ComponentSpecific2(l: {prop: U}): JSX.Element; ->ComponentSpecific2 : (l: { prop: U;}) => JSX.Element +>ComponentSpecific2 : (l: { prop: U; }) => JSX.Element >l : { prop: U; } >prop : U >JSX : any @@ -45,7 +45,7 @@ function Baz(arg: T) { } declare function Link(l: {func: (arg: U)=>void}): JSX.Element; ->Link : (l: { func: (arg: U) => void;}) => JSX.Element +>Link : (l: { func: (arg: U) => void; }) => JSX.Element >l : { func: (arg: U) => void; } >func : (arg: U) => void >arg : U diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.types b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.types index 642080fe05e0a..1fa3872d7c6b2 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.types +++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.types @@ -9,7 +9,7 @@ declare function OverloadComponent(): JSX.Element; >JSX : any declare function OverloadComponent(attr: {b: U, a?: string, "ignore-prop": boolean}): JSX.Element; ->OverloadComponent : { (): JSX.Element; (attr: { b: U; a?: string; "ignore-prop": boolean;}): JSX.Element; (attr: { b: U_2; a: T; }): JSX.Element; } +>OverloadComponent : { (): JSX.Element; (attr: { b: U; a?: string; "ignore-prop": boolean; }): JSX.Element; (attr: { b: U_2; a: T; }): JSX.Element; } >attr : { b: U; a?: string; "ignore-prop": boolean; } >b : U >a : string @@ -17,7 +17,7 @@ declare function OverloadComponent(attr: {b: U, a?: string, "ignore-prop": bo >JSX : any declare function OverloadComponent(attr: {b: U, a: T}): JSX.Element; ->OverloadComponent : { (): JSX.Element; (attr: { b: U_2; a?: string; "ignore-prop": boolean; }): JSX.Element; (attr: { b: U; a: T;}): JSX.Element; } +>OverloadComponent : { (): JSX.Element; (attr: { b: U_2; a?: string; "ignore-prop": boolean; }): JSX.Element; (attr: { b: U; a: T; }): JSX.Element; } >attr : { b: U; a: T; } >b : U >a : T @@ -83,14 +83,14 @@ function Baz(arg1: T, a } declare function Link(l: {func: (arg: U)=>void}): JSX.Element; ->Link : { (l: { func: (arg: U) => void;}): JSX.Element; (l: { func: (arg1: U_1, arg2: string) => void; }): JSX.Element; } +>Link : { (l: { func: (arg: U) => void; }): JSX.Element; (l: { func: (arg1: U_1, arg2: string) => void; }): JSX.Element; } >l : { func: (arg: U) => void; } >func : (arg: U) => void >arg : U >JSX : any declare function Link(l: {func: (arg1:U, arg2: string)=>void}): JSX.Element; ->Link : { (l: { func: (arg: U_1) => void; }): JSX.Element; (l: { func: (arg1: U, arg2: string) => void;}): JSX.Element; } +>Link : { (l: { func: (arg: U_1) => void; }): JSX.Element; (l: { func: (arg1: U, arg2: string) => void; }): JSX.Element; } >l : { func: (arg1: U, arg2: string) => void; } >func : (arg1: U, arg2: string) => void >arg1 : U diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.types b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.types index 17e91467582c5..c5a6e7523f084 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.types +++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.types @@ -9,7 +9,7 @@ declare function OverloadComponent(): JSX.Element; >JSX : any declare function OverloadComponent(attr: {b: U, a: string, "ignore-prop": boolean}): JSX.Element; ->OverloadComponent : { (): JSX.Element; (attr: { b: U; a: string; "ignore-prop": boolean;}): JSX.Element; (attr: { b: U_2; a: T; }): JSX.Element; } +>OverloadComponent : { (): JSX.Element; (attr: { b: U; a: string; "ignore-prop": boolean; }): JSX.Element; (attr: { b: U_2; a: T; }): JSX.Element; } >attr : { b: U; a: string; "ignore-prop": boolean; } >b : U >a : string @@ -17,7 +17,7 @@ declare function OverloadComponent(attr: {b: U, a: string, "ignore-prop": boo >JSX : any declare function OverloadComponent(attr: {b: U, a: T}): JSX.Element; ->OverloadComponent : { (): JSX.Element; (attr: { b: U_2; a: string; "ignore-prop": boolean; }): JSX.Element; (attr: { b: U; a: T;}): JSX.Element; } +>OverloadComponent : { (): JSX.Element; (attr: { b: U_2; a: string; "ignore-prop": boolean; }): JSX.Element; (attr: { b: U; a: T; }): JSX.Element; } >attr : { b: U; a: T; } >b : U >a : T diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments5.types b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments5.types index a939b7104c8a6..4f22d6b44ec6e 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments5.types +++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments5.types @@ -29,13 +29,13 @@ function createComponent(arg: T) { } declare function ComponentSpecific(l: { prop: U }): JSX.Element; ->ComponentSpecific : (l: { prop: U;}) => JSX.Element +>ComponentSpecific : (l: { prop: U; }) => JSX.Element >l : { prop: U; } >prop : U >JSX : any declare function ComponentSpecific1(l: { prop: U, "ignore-prop": number }): JSX.Element; ->ComponentSpecific1 : (l: { prop: U; "ignore-prop": number;}) => JSX.Element +>ComponentSpecific1 : (l: { prop: U; "ignore-prop": number; }) => JSX.Element >l : { prop: U; "ignore-prop": number; } >prop : U >"ignore-prop" : number diff --git a/tests/baselines/reference/tsxTypeErrors.types b/tests/baselines/reference/tsxTypeErrors.types index 20244453e28c3..604c12b7ae4d6 100644 --- a/tests/baselines/reference/tsxTypeErrors.types +++ b/tests/baselines/reference/tsxTypeErrors.types @@ -41,7 +41,7 @@ class MyClass { >MyClass : MyClass props: { ->props : { pt?: { x: number; y: number;}; name?: string; reqd: boolean; } +>props : { pt?: { x: number; y: number; }; name?: string; reqd: boolean; } pt?: { x: number; y: number; }; >pt : { x: number; y: number; } diff --git a/tests/baselines/reference/tsxUnionElementType1.types b/tests/baselines/reference/tsxUnionElementType1.types index 7ab77bb3f7acb..4b4eff38e4f6e 100644 --- a/tests/baselines/reference/tsxUnionElementType1.types +++ b/tests/baselines/reference/tsxUnionElementType1.types @@ -5,7 +5,7 @@ import React = require('react'); >React : typeof React function SFC1(prop: { x: number }) { ->SFC1 : (prop: { x: number;}) => JSX.Element +>SFC1 : (prop: { x: number; }) => JSX.Element >prop : { x: number; } >x : number @@ -17,7 +17,7 @@ function SFC1(prop: { x: number }) { }; function SFC2(prop: { x: boolean }) { ->SFC2 : (prop: { x: boolean;}) => JSX.Element +>SFC2 : (prop: { x: boolean; }) => JSX.Element >prop : { x: boolean; } >x : boolean diff --git a/tests/baselines/reference/tsxUnionElementType2.types b/tests/baselines/reference/tsxUnionElementType2.types index d6e00e3d92f99..f1b3790b24b0e 100644 --- a/tests/baselines/reference/tsxUnionElementType2.types +++ b/tests/baselines/reference/tsxUnionElementType2.types @@ -5,7 +5,7 @@ import React = require('react'); >React : typeof React function SFC1(prop: { x: number }) { ->SFC1 : (prop: { x: number;}) => JSX.Element +>SFC1 : (prop: { x: number; }) => JSX.Element >prop : { x: number; } >x : number @@ -17,7 +17,7 @@ function SFC1(prop: { x: number }) { }; function SFC2(prop: { x: boolean }) { ->SFC2 : (prop: { x: boolean;}) => JSX.Element +>SFC2 : (prop: { x: boolean; }) => JSX.Element >prop : { x: boolean; } >x : boolean diff --git a/tests/baselines/reference/tsxUnionElementType5.types b/tests/baselines/reference/tsxUnionElementType5.types index 29be7e792ffa6..88f813aa4b167 100644 --- a/tests/baselines/reference/tsxUnionElementType5.types +++ b/tests/baselines/reference/tsxUnionElementType5.types @@ -23,7 +23,7 @@ function EmptySFC2() { } function SFC2(prop: { x: boolean }) { ->SFC2 : (prop: { x: boolean;}) => JSX.Element +>SFC2 : (prop: { x: boolean; }) => JSX.Element >prop : { x: boolean; } >x : boolean diff --git a/tests/baselines/reference/tsxUnionElementType6.types b/tests/baselines/reference/tsxUnionElementType6.types index 1f06872e2712f..533eeca68a1a7 100644 --- a/tests/baselines/reference/tsxUnionElementType6.types +++ b/tests/baselines/reference/tsxUnionElementType6.types @@ -23,7 +23,7 @@ function EmptySFC2() { } function SFC2(prop: { x: boolean }) { ->SFC2 : (prop: { x: boolean;}) => JSX.Element +>SFC2 : (prop: { x: boolean; }) => JSX.Element >prop : { x: boolean; } >x : boolean diff --git a/tests/baselines/reference/tsxUnionMemberChecksFilterDataProps.types b/tests/baselines/reference/tsxUnionMemberChecksFilterDataProps.types index 5ecaa9c35605e..23588f8241ad6 100644 --- a/tests/baselines/reference/tsxUnionMemberChecksFilterDataProps.types +++ b/tests/baselines/reference/tsxUnionMemberChecksFilterDataProps.types @@ -13,13 +13,13 @@ import React, { ReactElement } from "react"; >ReactElement : any declare function NotHappy(props: ({ fixed?: boolean } | { value?: number })): ReactElement; ->NotHappy : (props: ({ fixed?: boolean;} | { value?: number;})) => ReactElement +>NotHappy : (props: ({ fixed?: boolean; } | { value?: number; })) => ReactElement >props : { fixed?: boolean; } | { value?: number; } >fixed : boolean >value : number declare function Happy(props: { fixed?: boolean, value?: number }): ReactElement; ->Happy : (props: { fixed?: boolean; value?: number;}) => ReactElement +>Happy : (props: { fixed?: boolean; value?: number; }) => ReactElement >props : { fixed?: boolean; value?: number; } >fixed : boolean >value : number diff --git a/tests/baselines/reference/typeArgInference.types b/tests/baselines/reference/typeArgInference.types index f3d04ef732929..c37fdffe6263a 100644 --- a/tests/baselines/reference/typeArgInference.types +++ b/tests/baselines/reference/typeArgInference.types @@ -3,7 +3,7 @@ === typeArgInference.ts === interface I { f(a1: { a: T; b: U }[], a2: { a: T; b: U }[]): { c: T; d: U }; ->f : (a1: { a: T; b: U;}[], a2: { a: T; b: U;}[]) => { c: T; d: U;} +>f : (a1: { a: T; b: U; }[], a2: { a: T; b: U; }[]) => { c: T; d: U; } >a1 : { a: T; b: U; }[] >a : T >b : U @@ -14,7 +14,7 @@ interface I { >d : U g(...arg: { a: T; b: U }[][]): { c: T; d: U }; ->g : (...arg: { a: T; b: U;}[][]) => { c: T; d: U;} +>g : (...arg: { a: T; b: U; }[][]) => { c: T; d: U; } >arg : { a: T; b: U; }[][] >a : T >b : U diff --git a/tests/baselines/reference/typeArgumentInferenceOrdering.types b/tests/baselines/reference/typeArgumentInferenceOrdering.types index f03a5e6af842d..ee339d541c3c4 100644 --- a/tests/baselines/reference/typeArgumentInferenceOrdering.types +++ b/tests/baselines/reference/typeArgumentInferenceOrdering.types @@ -19,7 +19,7 @@ interface Goo { } function foo(f: { y: T }): T { return null } ->foo : (f: { y: T;}) => T +>foo : (f: { y: T; }) => T >f : { y: T; } >y : T diff --git a/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.types b/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.types index 29d365030c44b..29c99795bbcf8 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.types +++ b/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.types @@ -68,7 +68,7 @@ enum E2 { X } // Check that we infer from both a.r and b before fixing T in a.w declare function f1(a: { w: (x: T) => U; r: () => T; }, b: T): U; ->f1 : (a: { w: (x: T) => U; r: () => T;}, b: T) => U +>f1 : (a: { w: (x: T) => U; r: () => T; }, b: T) => U >a : { w: (x: T) => U; r: () => T; } >w : (x: T) => U >x : T diff --git a/tests/baselines/reference/typeGuardNarrowsIndexedAccessOfKnownProperty1.types b/tests/baselines/reference/typeGuardNarrowsIndexedAccessOfKnownProperty1.types index a05262b27fa72..ac229989edd4f 100644 --- a/tests/baselines/reference/typeGuardNarrowsIndexedAccessOfKnownProperty1.types +++ b/tests/baselines/reference/typeGuardNarrowsIndexedAccessOfKnownProperty1.types @@ -34,10 +34,10 @@ interface Square { interface Subshape { "0": { ->"0" : { sub: { under: { shape: Shape; };}; } +>"0" : { sub: { under: { shape: Shape; }; }; } sub: { ->sub : { under: { shape: Shape;}; } +>sub : { under: { shape: Shape; }; } under: { >under : { shape: Shape; } diff --git a/tests/baselines/reference/typeGuardNarrowsIndexedAccessOfKnownProperty5.types b/tests/baselines/reference/typeGuardNarrowsIndexedAccessOfKnownProperty5.types index 7fc8d15f7a32e..72f157f75820b 100644 --- a/tests/baselines/reference/typeGuardNarrowsIndexedAccessOfKnownProperty5.types +++ b/tests/baselines/reference/typeGuardNarrowsIndexedAccessOfKnownProperty5.types @@ -31,7 +31,7 @@ if (a[aIndex] && a[aIndex].x) { } const b: { key: { x?: number } } = { key: {} }; ->b : { key: { x?: number;}; } +>b : { key: { x?: number; }; } >key : { x?: number | undefined; } >x : number | undefined >{ key: {} } : { key: {}; } diff --git a/tests/baselines/reference/typeGuardNarrowsIndexedAccessOfKnownProperty6.types b/tests/baselines/reference/typeGuardNarrowsIndexedAccessOfKnownProperty6.types index 5dc808ce84616..3ce0360544cef 100644 --- a/tests/baselines/reference/typeGuardNarrowsIndexedAccessOfKnownProperty6.types +++ b/tests/baselines/reference/typeGuardNarrowsIndexedAccessOfKnownProperty6.types @@ -33,7 +33,7 @@ declare const bIndex: "key"; >bIndex : "key" const b: { key: { x?: number } } = { key: {} }; ->b : { key: { x?: number;}; } +>b : { key: { x?: number; }; } >key : { x?: number | undefined; } >x : number | undefined >{ key: {} } : { key: {}; } diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfFunction.types b/tests/baselines/reference/typeGuardOfFormTypeOfFunction.types index f0d0bf47a6ecb..07ae602a05b3d 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfFunction.types +++ b/tests/baselines/reference/typeGuardOfFormTypeOfFunction.types @@ -62,7 +62,7 @@ function f4(x: T) { } function f5(x: { s: string }) { ->f5 : (x: { s: string;}) => void +>f5 : (x: { s: string; }) => void >x : { s: string; } >s : string @@ -112,7 +112,7 @@ function f10(x: string | (() => string)) { } function f11(x: { s: string } | (() => string)) { ->f11 : (x: { s: string;} | (() => string)) => void +>f11 : (x: { s: string; } | (() => string)) => void >x : { s: string; } | (() => string) >s : string @@ -132,7 +132,7 @@ function f11(x: { s: string } | (() => string)) { } function f12(x: { s: string } | { n: number }) { ->f12 : (x: { s: string;} | { n: number;}) => void +>f12 : (x: { s: string; } | { n: number; }) => void >x : { s: string; } | { n: number; } >s : string >n : number diff --git a/tests/baselines/reference/typeGuardOfFromPropNameInUnionType.types b/tests/baselines/reference/typeGuardOfFromPropNameInUnionType.types index c3dfb49bf2c02..b9de9616b67c5 100644 --- a/tests/baselines/reference/typeGuardOfFromPropNameInUnionType.types +++ b/tests/baselines/reference/typeGuardOfFromPropNameInUnionType.types @@ -68,7 +68,7 @@ function multipleClasses(x: A | B | C | D) { } function anonymousClasses(x: { a: string; } | { b: number; }) { ->anonymousClasses : (x: { a: string;} | { b: number;}) => void +>anonymousClasses : (x: { a: string; } | { b: number; }) => void >x : { a: string; } | { b: number; } >a : string >b : number diff --git a/tests/baselines/reference/typeInferenceWithExcessPropertiesJsx.types b/tests/baselines/reference/typeInferenceWithExcessPropertiesJsx.types index 4ed35053fc870..f7ddb312a8f59 100644 --- a/tests/baselines/reference/typeInferenceWithExcessPropertiesJsx.types +++ b/tests/baselines/reference/typeInferenceWithExcessPropertiesJsx.types @@ -19,7 +19,7 @@ type TranslationEntry = { >args : [] | [unknown] } type Translations = { ->Translations : { a: { args: [string];}; b: { args: [];}; } +>Translations : { a: { args: [string]; }; b: { args: []; }; } a: { args: [string] }, >a : { args: [string]; } diff --git a/tests/baselines/reference/typeLiteralCallback.types b/tests/baselines/reference/typeLiteralCallback.types index c9a6ca48a5cd9..346f89a625107 100644 --- a/tests/baselines/reference/typeLiteralCallback.types +++ b/tests/baselines/reference/typeLiteralCallback.types @@ -16,7 +16,7 @@ interface bar { >arg : T fail2(func: { (arg: T): void ; }): void ; ->fail2 : (func: { (arg: T): void;}) => void +>fail2 : (func: { (arg: T): void; }) => void >func : (arg: T) => void >arg : T } diff --git a/tests/baselines/reference/typeMatch1.types b/tests/baselines/reference/typeMatch1.types index 95f2d2f923dda..a899fa691582b 100644 --- a/tests/baselines/reference/typeMatch1.types +++ b/tests/baselines/reference/typeMatch1.types @@ -16,7 +16,7 @@ var x1: { z: number; f(n: number): string; f(s: string): number; } >s : string var x2: { z:number;f:{(n:number):string;(s:string):number;}; } = x1; ->x2 : { z: number; f: { (n: number): string; (s: string): number;}; } +>x2 : { z: number; f: { (n: number): string; (s: string): number; }; } >z : number >f : { (n: number): string; (s: string): number; } >n : number diff --git a/tests/baselines/reference/typeName1.types b/tests/baselines/reference/typeName1.types index 34fe54eca2e5f..6c9b9f4fdfead 100644 --- a/tests/baselines/reference/typeName1.types +++ b/tests/baselines/reference/typeName1.types @@ -60,7 +60,7 @@ var x5:{ (s:string):number;(n:number):string;x;y;z:number;f(n:number):string;f(s >3 : 3 var x6:{ z:number;f:{(n:number):string;(s:string):number;}; }=3; ->x6 : { z: number; f: { (n: number): string; (s: string): number;}; } +>x6 : { z: number; f: { (n: number): string; (s: string): number; }; } >z : number >f : { (n: number): string; (s: string): number; } >n : number @@ -98,7 +98,7 @@ var x11:{z:I;x:boolean;}[][]=3; >3 : 3 var x12:{z:I;x:boolean;y:(s:string)=>boolean;w:{ z:I;[s:string]:{ x; y; };[n:number]:{x; y;};():boolean; };}[][]=3; ->x12 : { z: I; x: boolean; y: (s: string) => boolean; w: { z: I; [s: string]: { x: any; y: any; }; [n: number]: { x: any; y: any; }; (): boolean;}; }[][] +>x12 : { z: I; x: boolean; y: (s: string) => boolean; w: { z: I; [s: string]: { x: any; y: any; }; [n: number]: { x: any; y: any; }; (): boolean; }; }[][] >z : I >x : boolean >y : (s: string) => boolean @@ -114,7 +114,7 @@ var x12:{z:I;x:boolean;y:(s:string)=>boolean;w:{ z:I;[s:string]:{ x; y; };[n:num >3 : 3 var x13:{ new(): number; new(n:number):number; x: string; w: {y: number;}; (): {}; } = 3; ->x13 : { (): {}; new (): number; new (n: number): number; x: string; w: { y: number;}; } +>x13 : { (): {}; new (): number; new (n: number): number; x: string; w: { y: number; }; } >n : number >x : string >w : { y: number; } diff --git a/tests/baselines/reference/typeParameterConstModifiers.types b/tests/baselines/reference/typeParameterConstModifiers.types index bf3732eb5a64a..855f6cb12693f 100644 --- a/tests/baselines/reference/typeParameterConstModifiers.types +++ b/tests/baselines/reference/typeParameterConstModifiers.types @@ -126,7 +126,7 @@ const x42 = f4([{ a: 1, b: 'x' }, { a: 2, b: 'y' }]); >'y' : "y" declare function f5(obj: { x: T, y: T }): T; ->f5 : (obj: { x: T; y: T;}) => T +>f5 : (obj: { x: T; y: T; }) => T >obj : { x: T; y: T; } >x : T >y : T @@ -308,8 +308,8 @@ type T5 = { new (x: T): T }; // Corrected repro from #51745 type Obj = { a: { b: { c: "123" } } }; ->Obj : { a: { b: { c: "123"; };}; } ->a : { b: { c: "123";}; } +>Obj : { a: { b: { c: "123"; }; }; } +>a : { b: { c: "123"; }; } >b : { c: "123"; } >c : "123" @@ -450,7 +450,7 @@ const t1_55033 = factory_55033((a: { test: number }, b: string) => {})( >factory_55033((a: { test: number }, b: string) => {})( { test: 123 }, "some string") : readonly [{ readonly test: 123; }, "some string"] >factory_55033((a: { test: number }, b: string) => {}) : (...args: K) => K >factory_55033 : (cb: (...args: T) => void) => (...args: K) => K ->(a: { test: number }, b: string) => {} : (a: { test: number;}, b: string) => void +>(a: { test: number }, b: string) => {} : (a: { test: number; }, b: string) => void >a : { test: number; } >test : number >b : string @@ -470,7 +470,7 @@ const t2_55033 = factory_55033((a: { test: number }, b: string) => {})( >factory_55033((a: { test: number }, b: string) => {})( { test: 123 } as const, "some string") : readonly [{ readonly test: 123; }, "some string"] >factory_55033((a: { test: number }, b: string) => {}) : (...args: K) => K >factory_55033 : (cb: (...args: T) => void) => (...args: K) => K ->(a: { test: number }, b: string) => {} : (a: { test: number;}, b: string) => void +>(a: { test: number }, b: string) => {} : (a: { test: number; }, b: string) => void >a : { test: number; } >test : number >b : string @@ -510,7 +510,7 @@ const t1_55033_2 = factory_55033_2((a: { test: number }, b: string) => {})( >factory_55033_2((a: { test: number }, b: string) => {})( { test: 123 }, "some string") : [{ readonly test: 123; }, "some string"] >factory_55033_2((a: { test: number }, b: string) => {}) : (...args: K) => K >factory_55033_2 : (cb: (...args: T) => void) => (...args: K) => K ->(a: { test: number }, b: string) => {} : (a: { test: number;}, b: string) => void +>(a: { test: number }, b: string) => {} : (a: { test: number; }, b: string) => void >a : { test: number; } >test : number >b : string @@ -530,7 +530,7 @@ const t2_55033_2 = factory_55033_2((a: { test: number }, b: string) => {})( >factory_55033_2((a: { test: number }, b: string) => {})( { test: 123 } as const, "some string") : [{ readonly test: 123; }, "some string"] >factory_55033_2((a: { test: number }, b: string) => {}) : (...args: K) => K >factory_55033_2 : (cb: (...args: T) => void) => (...args: K) => K ->(a: { test: number }, b: string) => {} : (a: { test: number;}, b: string) => void +>(a: { test: number }, b: string) => {} : (a: { test: number; }, b: string) => void >a : { test: number; } >test : number >b : string diff --git a/tests/baselines/reference/typeParameterConstModifiersWithIntersection.types b/tests/baselines/reference/typeParameterConstModifiersWithIntersection.types index 6f5e3b436f7b9..b93781454d109 100644 --- a/tests/baselines/reference/typeParameterConstModifiersWithIntersection.types +++ b/tests/baselines/reference/typeParameterConstModifiersWithIntersection.types @@ -11,7 +11,7 @@ interface Config { } declare function test< ->test : >(config: { produceThing: T1;} & TConfig) => TConfig +>test : >(config: { produceThing: T1; } & TConfig) => TConfig T1 extends { type: string }, >type : string @@ -22,10 +22,10 @@ declare function test< >produceThing : T1 const result = test({ ->result : { readonly produceThing: { type: "foo";}; readonly useIt: { readonly type: "foo"; }; readonly extra: 10; } ->test({ produceThing: {} as { type: "foo"; }, useIt: { type: "foo", }, extra: 10,}) : { readonly produceThing: { type: "foo";}; readonly useIt: { readonly type: "foo"; }; readonly extra: 10; } +>result : { readonly produceThing: { type: "foo"; }; readonly useIt: { readonly type: "foo"; }; readonly extra: 10; } +>test({ produceThing: {} as { type: "foo"; }, useIt: { type: "foo", }, extra: 10,}) : { readonly produceThing: { type: "foo"; }; readonly useIt: { readonly type: "foo"; }; readonly extra: 10; } >test : >(config: { produceThing: T1; } & TConfig) => TConfig ->{ produceThing: {} as { type: "foo"; }, useIt: { type: "foo", }, extra: 10,} : { produceThing: { type: "foo";}; useIt: { type: "foo"; }; extra: 10; } +>{ produceThing: {} as { type: "foo"; }, useIt: { type: "foo", }, extra: 10,} : { produceThing: { type: "foo"; }; useIt: { type: "foo"; }; extra: 10; } produceThing: {} as { >produceThing : { type: "foo"; } diff --git a/tests/baselines/reference/typeParametersInStaticMethods.types b/tests/baselines/reference/typeParametersInStaticMethods.types index 5d4a9df05c484..f82994810d67a 100644 --- a/tests/baselines/reference/typeParametersInStaticMethods.types +++ b/tests/baselines/reference/typeParametersInStaticMethods.types @@ -5,8 +5,8 @@ class foo { >foo : foo static M(x: (x: T) => { x: { y: T } }) { ->M : (x: (x: T) => { x: { y: T; };}) => void ->x : (x: T) => { x: { y: T; };} +>M : (x: (x: T) => { x: { y: T; }; }) => void +>x : (x: T) => { x: { y: T; }; } >x : T >x : { y: T; } >y : T diff --git a/tests/baselines/reference/typePredicateStructuralMatch.types b/tests/baselines/reference/typePredicateStructuralMatch.types index 83c9ac06886a3..a2145b714389b 100644 --- a/tests/baselines/reference/typePredicateStructuralMatch.types +++ b/tests/baselines/reference/typePredicateStructuralMatch.types @@ -35,7 +35,7 @@ type Results = Result[]; >Results : Result[] function isResponseInData(value: T | { data: T}): value is { data: T } { ->isResponseInData : (value: T | { data: T;}) => value is { data: T; } +>isResponseInData : (value: T | { data: T; }) => value is { data: T; } >value : T | { data: T; } >data : T >data : T @@ -49,7 +49,7 @@ function isResponseInData(value: T | { data: T}): value is { data: T } { } function getResults1(value: Results | { data: Results }): Results { ->getResults1 : (value: Results | { data: Results;}) => Results +>getResults1 : (value: Results | { data: Results; }) => Results >value : Results | { data: Results; } >data : Results @@ -65,7 +65,7 @@ function getResults1(value: Results | { data: Results }): Results { } function isPlainResponse(value: T | { data: T}): value is T { ->isPlainResponse : (value: T | { data: T;}) => value is T +>isPlainResponse : (value: T | { data: T; }) => value is T >value : T | { data: T; } >data : T @@ -79,7 +79,7 @@ function isPlainResponse(value: T | { data: T}): value is T { } function getResults2(value: Results | { data: Results }): Results { ->getResults2 : (value: Results | { data: Results;}) => Results +>getResults2 : (value: Results | { data: Results; }) => Results >value : Results | { data: Results; } >data : Results diff --git a/tests/baselines/reference/typeSatisfaction_errorLocations1.types b/tests/baselines/reference/typeSatisfaction_errorLocations1.types index e8e6de7184b2f..796fc20f62d35 100644 --- a/tests/baselines/reference/typeSatisfaction_errorLocations1.types +++ b/tests/baselines/reference/typeSatisfaction_errorLocations1.types @@ -8,8 +8,8 @@ const obj1 = { a: 1 }; >1 : 1 const fn1 = (s: { a: true }) => {}; ->fn1 : (s: { a: true;}) => void ->(s: { a: true }) => {} : (s: { a: true;}) => void +>fn1 : (s: { a: true; }) => void +>(s: { a: true }) => {} : (s: { a: true; }) => void >s : { a: true; } >a : true >true : true @@ -198,8 +198,8 @@ function fn6(): number { ((): { a: true } => ({}) satisfies unknown)(); >((): { a: true } => ({}) satisfies unknown)() : { a: true; } ->((): { a: true } => ({}) satisfies unknown) : () => { a: true;} ->(): { a: true } => ({}) satisfies unknown : () => { a: true;} +>((): { a: true } => ({}) satisfies unknown) : () => { a: true; } +>(): { a: true } => ({}) satisfies unknown : () => { a: true; } >a : true >true : true >({}) satisfies unknown : {} @@ -208,8 +208,8 @@ function fn6(): number { ((): { a: true } => ({ a: 1 }) satisfies unknown)(); >((): { a: true } => ({ a: 1 }) satisfies unknown)() : { a: true; } ->((): { a: true } => ({ a: 1 }) satisfies unknown) : () => { a: true;} ->(): { a: true } => ({ a: 1 }) satisfies unknown : () => { a: true;} +>((): { a: true } => ({ a: 1 }) satisfies unknown) : () => { a: true; } +>(): { a: true } => ({ a: 1 }) satisfies unknown : () => { a: true; } >a : true >true : true >({ a: 1 }) satisfies unknown : { a: number; } @@ -220,8 +220,8 @@ function fn6(): number { ((): { a: true } => obj1 satisfies unknown)(); >((): { a: true } => obj1 satisfies unknown)() : { a: true; } ->((): { a: true } => obj1 satisfies unknown) : () => { a: true;} ->(): { a: true } => obj1 satisfies unknown : () => { a: true;} +>((): { a: true } => obj1 satisfies unknown) : () => { a: true; } +>(): { a: true } => obj1 satisfies unknown : () => { a: true; } >a : true >true : true >obj1 satisfies unknown : { a: number; } diff --git a/tests/baselines/reference/typeSatisfaction_propertyValueConformance1(nopropertyaccessfromindexsignature=false).types b/tests/baselines/reference/typeSatisfaction_propertyValueConformance1(nopropertyaccessfromindexsignature=false).types index 60a1e45a330a6..01ded514ad792 100644 --- a/tests/baselines/reference/typeSatisfaction_propertyValueConformance1(nopropertyaccessfromindexsignature=false).types +++ b/tests/baselines/reference/typeSatisfaction_propertyValueConformance1(nopropertyaccessfromindexsignature=false).types @@ -10,7 +10,7 @@ declare function checkTruths(x: Facts): void; >x : Facts declare function checkM(x: { m: boolean }): void; ->checkM : (x: { m: boolean;}) => void +>checkM : (x: { m: boolean; }) => void >x : { m: boolean; } >m : boolean diff --git a/tests/baselines/reference/typeSatisfaction_propertyValueConformance1(nopropertyaccessfromindexsignature=true).types b/tests/baselines/reference/typeSatisfaction_propertyValueConformance1(nopropertyaccessfromindexsignature=true).types index 60a1e45a330a6..01ded514ad792 100644 --- a/tests/baselines/reference/typeSatisfaction_propertyValueConformance1(nopropertyaccessfromindexsignature=true).types +++ b/tests/baselines/reference/typeSatisfaction_propertyValueConformance1(nopropertyaccessfromindexsignature=true).types @@ -10,7 +10,7 @@ declare function checkTruths(x: Facts): void; >x : Facts declare function checkM(x: { m: boolean }): void; ->checkM : (x: { m: boolean;}) => void +>checkM : (x: { m: boolean; }) => void >x : { m: boolean; } >m : boolean diff --git a/tests/baselines/reference/typeSatisfaction_propertyValueConformance2(nouncheckedindexedaccess=false).types b/tests/baselines/reference/typeSatisfaction_propertyValueConformance2(nouncheckedindexedaccess=false).types index 30cd97fb4be63..25235f5b4d720 100644 --- a/tests/baselines/reference/typeSatisfaction_propertyValueConformance2(nouncheckedindexedaccess=false).types +++ b/tests/baselines/reference/typeSatisfaction_propertyValueConformance2(nouncheckedindexedaccess=false).types @@ -10,7 +10,7 @@ declare function checkTruths(x: Facts): void; >x : Facts declare function checkM(x: { m: boolean }): void; ->checkM : (x: { m: boolean;}) => void +>checkM : (x: { m: boolean; }) => void >x : { m: boolean; } >m : boolean diff --git a/tests/baselines/reference/typeSatisfaction_propertyValueConformance2(nouncheckedindexedaccess=true).types b/tests/baselines/reference/typeSatisfaction_propertyValueConformance2(nouncheckedindexedaccess=true).types index 30cd97fb4be63..25235f5b4d720 100644 --- a/tests/baselines/reference/typeSatisfaction_propertyValueConformance2(nouncheckedindexedaccess=true).types +++ b/tests/baselines/reference/typeSatisfaction_propertyValueConformance2(nouncheckedindexedaccess=true).types @@ -10,7 +10,7 @@ declare function checkTruths(x: Facts): void; >x : Facts declare function checkM(x: { m: boolean }): void; ->checkM : (x: { m: boolean;}) => void +>checkM : (x: { m: boolean; }) => void >x : { m: boolean; } >m : boolean diff --git a/tests/baselines/reference/typeVariableConstraintIntersections.types b/tests/baselines/reference/typeVariableConstraintIntersections.types index 1717c85c3048b..6d89a64f8a0b8 100644 --- a/tests/baselines/reference/typeVariableConstraintIntersections.types +++ b/tests/baselines/reference/typeVariableConstraintIntersections.types @@ -233,7 +233,7 @@ const optionHandlers: OptionHandlers = { }; function handleOption(option: Options & { kind: K }): string { ->handleOption : (option: Options & { kind: K;}) => string +>handleOption : (option: Options & { kind: K; }) => string >option : Options & { kind: K; } >kind : K diff --git a/tests/baselines/reference/typeofObjectInference.types b/tests/baselines/reference/typeofObjectInference.types index 0450fa3c98772..9886cf769539e 100644 --- a/tests/baselines/reference/typeofObjectInference.types +++ b/tests/baselines/reference/typeofObjectInference.types @@ -6,8 +6,8 @@ let val = 1 >1 : 1 function decorateA(fn: (first: {value: typeof val}) => O) { ->decorateA : (fn: (first: { value: typeof val;}) => O) => () => O ->fn : (first: { value: typeof val;}) => O +>decorateA : (fn: (first: { value: typeof val; }) => O) => () => O +>fn : (first: { value: typeof val; }) => O >first : { value: typeof val; } >value : number >val : number @@ -49,8 +49,8 @@ let b = decorateB((value) => 5) >5 : 5 function decorateC(fn: (first: {value: number}) => O) { ->decorateC : (fn: (first: { value: number;}) => O) => () => O ->fn : (first: { value: number;}) => O +>decorateC : (fn: (first: { value: number; }) => O) => () => O +>fn : (first: { value: number; }) => O >first : { value: number; } >value : number diff --git a/tests/baselines/reference/typeofThis.types b/tests/baselines/reference/typeofThis.types index d2c4737d42318..9718d431cdd4d 100644 --- a/tests/baselines/reference/typeofThis.types +++ b/tests/baselines/reference/typeofThis.types @@ -83,7 +83,7 @@ function Test2() { } function Test3(this: { no: number }) { ->Test3 : (this: { no: number;}) => void +>Test3 : (this: { no: number; }) => void >this : { no: number; } >no : number @@ -96,7 +96,7 @@ function Test3(this: { no: number }) { } function Test4(this: { no: number } | undefined) { ->Test4 : (this: { no: number;} | undefined) => void +>Test4 : (this: { no: number; } | undefined) => void >this : { no: number; } | undefined >no : number diff --git a/tests/baselines/reference/types.asyncGenerators.es2018.1.types b/tests/baselines/reference/types.asyncGenerators.es2018.1.types index ad815ffa21462..1dab8448cf487 100644 --- a/tests/baselines/reference/types.asyncGenerators.es2018.1.types +++ b/tests/baselines/reference/types.asyncGenerators.es2018.1.types @@ -433,7 +433,7 @@ async function * awaitedType2() { >1 : 1 } async function * nextType1(): { next(...args: [] | [number | PromiseLike]): any } { ->nextType1 : () => { next(...args: [] | [number | PromiseLike]): any;} +>nextType1 : () => { next(...args: [] | [number | PromiseLike]): any; } >next : (...args: [] | [number | PromiseLike]) => any >args : [] | [number | PromiseLike] diff --git a/tests/baselines/reference/undeclaredModuleError.types b/tests/baselines/reference/undeclaredModuleError.types index 4154ca826dfae..c64f33031dc24 100644 --- a/tests/baselines/reference/undeclaredModuleError.types +++ b/tests/baselines/reference/undeclaredModuleError.types @@ -5,13 +5,13 @@ import fs = require('fs'); >fs : any function readdir(path: string, accept: (stat: fs.Stats, name: string) => boolean, callback: (error: Error, results: { name: string; stat: fs.Stats; }[]) => void ) {} ->readdir : (path: string, accept: (stat: fs.Stats, name: string) => boolean, callback: (error: Error, results: { name: string; stat: fs.Stats;}[]) => void) => void +>readdir : (path: string, accept: (stat: fs.Stats, name: string) => boolean, callback: (error: Error, results: { name: string; stat: fs.Stats; }[]) => void) => void >path : string >accept : (stat: fs.Stats, name: string) => boolean >stat : fs.Stats >fs : any >name : string ->callback : (error: Error, results: { name: string; stat: fs.Stats;}[]) => void +>callback : (error: Error, results: { name: string; stat: fs.Stats; }[]) => void >error : Error >results : { name: string; stat: fs.Stats; }[] >name : string diff --git a/tests/baselines/reference/undefinedArgumentInference.types b/tests/baselines/reference/undefinedArgumentInference.types index a4d3e707c3126..9e1abc1f7af5b 100644 --- a/tests/baselines/reference/undefinedArgumentInference.types +++ b/tests/baselines/reference/undefinedArgumentInference.types @@ -2,7 +2,7 @@ === undefinedArgumentInference.ts === function foo1(f1: { x: T; y: T }): T { ->foo1 : (f1: { x: T; y: T;}) => T +>foo1 : (f1: { x: T; y: T; }) => T >f1 : { x: T; y: T; } >x : T >y : T diff --git a/tests/baselines/reference/unicodeEscapesInJsxtags.types b/tests/baselines/reference/unicodeEscapesInJsxtags.types index 2a835986a6f9f..e8439dc05b388 100644 --- a/tests/baselines/reference/unicodeEscapesInJsxtags.types +++ b/tests/baselines/reference/unicodeEscapesInJsxtags.types @@ -18,8 +18,8 @@ declare global { } } const Compa = (x: {x: number}) =>

{"" + x}
; ->Compa : (x: { x: number;}) => JSX.Element ->(x: {x: number}) =>
{"" + x}
: (x: { x: number;}) => JSX.Element +>Compa : (x: { x: number; }) => JSX.Element +>(x: {x: number}) =>
{"" + x}
: (x: { x: number; }) => JSX.Element >x : { x: number; } >x : number >
{"" + x}
: JSX.Element diff --git a/tests/baselines/reference/unionAndIntersectionInference2.types b/tests/baselines/reference/unionAndIntersectionInference2.types index 8340670ba45bc..514e34cc8ca15 100644 --- a/tests/baselines/reference/unionAndIntersectionInference2.types +++ b/tests/baselines/reference/unionAndIntersectionInference2.types @@ -47,7 +47,7 @@ f1(e1); // number | boolean >e1 : string | number | boolean declare function f2(x: T & { name: string }): T; ->f2 : (x: T & { name: string;}) => T +>f2 : (x: T & { name: string; }) => T >x : T & { name: string; } >name : string diff --git a/tests/baselines/reference/unionErrorMessageOnMatchingDiscriminant.types b/tests/baselines/reference/unionErrorMessageOnMatchingDiscriminant.types index 2f9cff48db307..e5688ceb57480 100644 --- a/tests/baselines/reference/unionErrorMessageOnMatchingDiscriminant.types +++ b/tests/baselines/reference/unionErrorMessageOnMatchingDiscriminant.types @@ -2,7 +2,7 @@ === unionErrorMessageOnMatchingDiscriminant.ts === type A = { ->A : { type: 'a'; data: { a: string;}; } +>A : { type: 'a'; data: { a: string; }; } type: 'a', >type : "a" diff --git a/tests/baselines/reference/unionExcessPropertyCheckNoApparentPropTypeMismatchErrors.types b/tests/baselines/reference/unionExcessPropertyCheckNoApparentPropTypeMismatchErrors.types index ebc2f6b0305f0..41955c565bcae 100644 --- a/tests/baselines/reference/unionExcessPropertyCheckNoApparentPropTypeMismatchErrors.types +++ b/tests/baselines/reference/unionExcessPropertyCheckNoApparentPropTypeMismatchErrors.types @@ -11,9 +11,9 @@ interface INumberDictionary { } declare function forEach(from: IStringDictionary | INumberDictionary, callback: (entry: { key: any; value: T; }, remove: () => void) => any); ->forEach : (from: IStringDictionary | INumberDictionary, callback: (entry: { key: any; value: T;}, remove: () => void) => any) => any +>forEach : (from: IStringDictionary | INumberDictionary, callback: (entry: { key: any; value: T; }, remove: () => void) => any) => any >from : IStringDictionary | INumberDictionary ->callback : (entry: { key: any; value: T;}, remove: () => void) => any +>callback : (entry: { key: any; value: T; }, remove: () => void) => any >entry : { key: any; value: T; } >key : any >value : T diff --git a/tests/baselines/reference/unionReductionMutualSubtypes.types b/tests/baselines/reference/unionReductionMutualSubtypes.types index dba96258452ae..2307384f878a1 100644 --- a/tests/baselines/reference/unionReductionMutualSubtypes.types +++ b/tests/baselines/reference/unionReductionMutualSubtypes.types @@ -17,7 +17,7 @@ declare const val: ReturnVal; >val : ReturnVal function run(options: { something?(b?: string): void }) { ->run : (options: { something?(b?: string): void;}) => void +>run : (options: { something?(b?: string): void; }) => void >options : { something?(b?: string): void; } >something : ((b?: string) => void) | undefined >b : string | undefined diff --git a/tests/baselines/reference/unionSignaturesWithThisParameter.types b/tests/baselines/reference/unionSignaturesWithThisParameter.types index 0debb675309a8..da59997272e51 100644 --- a/tests/baselines/reference/unionSignaturesWithThisParameter.types +++ b/tests/baselines/reference/unionSignaturesWithThisParameter.types @@ -4,7 +4,7 @@ // Repro from #20802 function x(ctor: { ->x : (ctor: { (this: {}, v: T): void; new (v: T): void;} | { (v: T): void; new (v: T): void;}, t: T) => void +>x : (ctor: { (this: {}, v: T): void; new (v: T): void; } | { (v: T): void; new (v: T): void; }, t: T) => void >ctor : { (this: {}, v: T): void; new (v: T): void; } | { (v: T): void; new (v: T): void; } (this: {}, v: T): void; diff --git a/tests/baselines/reference/unionTypeReduction2.types b/tests/baselines/reference/unionTypeReduction2.types index cbd4e779044c9..0a82f66161b41 100644 --- a/tests/baselines/reference/unionTypeReduction2.types +++ b/tests/baselines/reference/unionTypeReduction2.types @@ -2,7 +2,7 @@ === unionTypeReduction2.ts === function f1(x: { f(): void }, y: { f(x?: string): void }) { ->f1 : (x: { f(): void;}, y: { f(x?: string): void;}) => void +>f1 : (x: { f(): void; }, y: { f(x?: string): void; }) => void >x : { f(): void; } >f : () => void >y : { f(x?: string): void; } @@ -33,7 +33,7 @@ function f1(x: { f(): void }, y: { f(x?: string): void }) { } function f2(x: { f(x: string | undefined): void }, y: { f(x?: string): void }) { ->f2 : (x: { f(x: string | undefined): void;}, y: { f(x?: string): void;}) => void +>f2 : (x: { f(x: string | undefined): void; }, y: { f(x?: string): void; }) => void >x : { f(x: string | undefined): void; } >f : (x: string | undefined) => void >x : string | undefined @@ -229,7 +229,7 @@ declare const val: ReturnVal; >val : ReturnVal function run(options: { something?(b?: string): void }) { ->run : (options: { something?(b?: string): void;}) => void +>run : (options: { something?(b?: string): void; }) => void >options : { something?(b?: string): void; } >something : ((b?: string) => void) | undefined >b : string | undefined diff --git a/tests/baselines/reference/unionTypeWithIndexSignature.types b/tests/baselines/reference/unionTypeWithIndexSignature.types index 1a9b81b2a9286..4884610a3cd36 100644 --- a/tests/baselines/reference/unionTypeWithIndexSignature.types +++ b/tests/baselines/reference/unionTypeWithIndexSignature.types @@ -2,7 +2,7 @@ === unionTypeWithIndexSignature.ts === type Two = { foo: { bar: true }, baz: true } | { [s: string]: string }; ->Two : { foo: { bar: true;}; baz: true; } | { [s: string]: string; } +>Two : { foo: { bar: true; }; baz: true; } | { [s: string]: string; } >foo : { bar: true; } >bar : true >true : true diff --git a/tests/baselines/reference/uniqueSymbols.types b/tests/baselines/reference/uniqueSymbols.types index 10f462af87b6a..41fcb120c8a74 100644 --- a/tests/baselines/reference/uniqueSymbols.types +++ b/tests/baselines/reference/uniqueSymbols.types @@ -333,7 +333,7 @@ const constInitToIReadonlyTypeWithIndexedAccess: I["readonlyType"] = i.readonlyT // type literals type L = { ->L : { readonly readonlyType: unique symbol; nested: { readonly readonlyNestedType: unique symbol;}; } +>L : { readonly readonlyType: unique symbol; nested: { readonly readonlyNestedType: unique symbol; }; } readonly readonlyType: unique symbol; >readonlyType : unique symbol @@ -912,7 +912,7 @@ const ce0 = class { }; function funcInferredReturnType(obj: { method(p: typeof s): void }) { ->funcInferredReturnType : (obj: { method(p: typeof s): void;}) => { method(p: typeof s): void; } +>funcInferredReturnType : (obj: { method(p: typeof s): void; }) => { method(p: typeof s): void; } >obj : { method(p: typeof s): void; } >method : (p: typeof s) => void >p : unique symbol diff --git a/tests/baselines/reference/uniqueSymbolsDeclarations.types b/tests/baselines/reference/uniqueSymbolsDeclarations.types index 7d9ec469eb1ca..9cecd1e10a5ec 100644 --- a/tests/baselines/reference/uniqueSymbolsDeclarations.types +++ b/tests/baselines/reference/uniqueSymbolsDeclarations.types @@ -326,7 +326,7 @@ const constInitToIReadonlyTypeWithIndexedAccess: I["readonlyType"] = i.readonlyT // type literals type L = { ->L : { readonly readonlyType: unique symbol; nested: { readonly readonlyNestedType: unique symbol;}; } +>L : { readonly readonlyType: unique symbol; nested: { readonly readonlyNestedType: unique symbol; }; } readonly readonlyType: unique symbol; >readonlyType : unique symbol diff --git a/tests/baselines/reference/uniqueSymbolsDeclarationsErrors.types b/tests/baselines/reference/uniqueSymbolsDeclarationsErrors.types index defd18906b902..90d461473f4cc 100644 --- a/tests/baselines/reference/uniqueSymbolsDeclarationsErrors.types +++ b/tests/baselines/reference/uniqueSymbolsDeclarationsErrors.types @@ -55,7 +55,7 @@ export const classExpression = class { }; export function funcInferredReturnType(obj: { method(p: typeof s): void }) { ->funcInferredReturnType : (obj: { method(p: typeof s): void;}) => { method(p: typeof s): void; } +>funcInferredReturnType : (obj: { method(p: typeof s): void; }) => { method(p: typeof s): void; } >obj : { method(p: typeof s): void; } >method : (p: typeof s) => void >p : unique symbol diff --git a/tests/baselines/reference/unknownType1.types b/tests/baselines/reference/unknownType1.types index e3b30a8316194..b929a29d5fdd6 100644 --- a/tests/baselines/reference/unknownType1.types +++ b/tests/baselines/reference/unknownType1.types @@ -342,7 +342,7 @@ function f23(x: T) { // Anything fresh but primitive assignable to { [x: string]: unknown } function f24(x: { [x: string]: unknown }) { ->f24 : (x: { [x: string]: unknown;}) => void +>f24 : (x: { [x: string]: unknown; }) => void >x : { [x: string]: unknown; } >x : string diff --git a/tests/baselines/reference/unknownType2.types b/tests/baselines/reference/unknownType2.types index f87ad3a2c0616..cc9c8dd8723cf 100644 --- a/tests/baselines/reference/unknownType2.types +++ b/tests/baselines/reference/unknownType2.types @@ -520,7 +520,7 @@ function switchTestLiterals(x: unknown) { } function switchTestObjects(x: unknown, y: () => void, z: { prop: number }) { ->switchTestObjects : (x: unknown, y: () => void, z: { prop: number;}) => void +>switchTestObjects : (x: unknown, y: () => void, z: { prop: number; }) => void >x : unknown >y : () => void >z : { prop: number; } diff --git a/tests/baselines/reference/varArgParamTypeCheck.types b/tests/baselines/reference/varArgParamTypeCheck.types index b2c5c3081f125..b58e826f4cf04 100644 --- a/tests/baselines/reference/varArgParamTypeCheck.types +++ b/tests/baselines/reference/varArgParamTypeCheck.types @@ -2,7 +2,7 @@ === varArgParamTypeCheck.ts === function sequence(...sequences:{():void;}[]) { ->sequence : (...sequences: { (): void;}[]) => void +>sequence : (...sequences: { (): void; }[]) => void >sequences : (() => void)[] } diff --git a/tests/baselines/reference/varArgsOnConstructorTypes.types b/tests/baselines/reference/varArgsOnConstructorTypes.types index 71e463d404bd7..447bf83552787 100644 --- a/tests/baselines/reference/varArgsOnConstructorTypes.types +++ b/tests/baselines/reference/varArgsOnConstructorTypes.types @@ -50,7 +50,7 @@ export interface I1 { >params : any[] register(inputClass: { new (...params: any[]): A; }[]); ->register : { (inputClass: new (...params: any[]) => A): any; (inputClass: { new (...params: any[]): A;}[]): any; } +>register : { (inputClass: new (...params: any[]) => A): any; (inputClass: { new (...params: any[]): A; }[]): any; } >inputClass : (new (...params: any[]) => A)[] >params : any[] } diff --git a/tests/baselines/reference/vardecl.types b/tests/baselines/reference/vardecl.types index 1703a6fed1d9a..cae6ffefebd43 100644 --- a/tests/baselines/reference/vardecl.types +++ b/tests/baselines/reference/vardecl.types @@ -73,10 +73,10 @@ var c : { } var d: { ->d : { foo?(): { x: number;}; } +>d : { foo?(): { x: number; }; } foo? (): { ->foo : () => { x: number;} +>foo : () => { x: number; } x: number; >x : number @@ -85,10 +85,10 @@ var d: { } var d3: { ->d3 : { foo(): { x: number; y: number;}; } +>d3 : { foo(): { x: number; y: number; }; } foo(): { ->foo : () => { x: number; y: number;} +>foo : () => { x: number; y: number; } x: number; >x : number @@ -100,10 +100,10 @@ var d3: { } var d2: { ->d2 : { foo(): { x: number;}; } +>d2 : { foo(): { x: number; }; } foo (): { ->foo : () => { x: number;} +>foo : () => { x: number; } x: number; >x : number @@ -123,10 +123,10 @@ var n4: { }[]; var d4: { ->d4 : { foo(n: string, x: { x: number; y: number;}): { x: number; y: number;}; } +>d4 : { foo(n: string, x: { x: number; y: number; }): { x: number; y: number; }; } foo(n: string, x: { x: number; y: number; }): { ->foo : (n: string, x: { x: number; y: number;}) => { x: number; y: number;} +>foo : (n: string, x: { x: number; y: number; }) => { x: number; y: number; } >n : string >x : { x: number; y: number; } >x : number diff --git a/tests/baselines/reference/variableDeclaratorResolvedDuringContextualTyping.types b/tests/baselines/reference/variableDeclaratorResolvedDuringContextualTyping.types index a97d88e44e0b1..fcb1942c1b5f7 100644 --- a/tests/baselines/reference/variableDeclaratorResolvedDuringContextualTyping.types +++ b/tests/baselines/reference/variableDeclaratorResolvedDuringContextualTyping.types @@ -39,7 +39,7 @@ module WinJS { >value : any static join(promises: { [name: string]: Promise; }): Promise; ->join : { (promises: { [name: string]: Promise;}): Promise; (promises: Promise[]): Promise; } +>join : { (promises: { [name: string]: Promise; }): Promise; (promises: Promise[]): Promise; } >promises : { [name: string]: Promise; } >name : string diff --git a/tests/baselines/reference/variadicTuples1.types b/tests/baselines/reference/variadicTuples1.types index 32743a7e21e25..f97fa6af6a56f 100644 --- a/tests/baselines/reference/variadicTuples1.types +++ b/tests/baselines/reference/variadicTuples1.types @@ -1392,13 +1392,13 @@ const b = a.bind("", 1); // Desc<[boolean], object> // Repro from #39607 declare function getUser(id: string, options?: { x?: string }): string; ->getUser : (id: string, options?: { x?: string;}) => string +>getUser : (id: string, options?: { x?: string; }) => string >id : string >options : { x?: string | undefined; } | undefined >x : string | undefined declare function getOrgUser(id: string, orgId: number, options?: { y?: number, z?: boolean }): void; ->getOrgUser : (id: string, orgId: number, options?: { y?: number; z?: boolean;}) => void +>getOrgUser : (id: string, orgId: number, options?: { y?: number; z?: boolean; }) => void >id : string >orgId : number >options : { y?: number | undefined; z?: boolean | undefined; } | undefined diff --git a/tests/baselines/reference/vueLikeDataAndPropsInference.types b/tests/baselines/reference/vueLikeDataAndPropsInference.types index 71b786625cfb9..e1c78ef727ea9 100644 --- a/tests/baselines/reference/vueLikeDataAndPropsInference.types +++ b/tests/baselines/reference/vueLikeDataAndPropsInference.types @@ -54,7 +54,7 @@ declare function test(fn: Options): void; test({ >test({ props: { foo: '' }, data(): { bar: boolean } { return { bar: true } }, watch: { foo(newVal: string, oldVal: string): void { this.bar = false } }}) : void >test : { (fn: ThisTypedOptions): void; (fn: Options<(this: Instance) => object, {}>): void; } ->{ props: { foo: '' }, data(): { bar: boolean } { return { bar: true } }, watch: { foo(newVal: string, oldVal: string): void { this.bar = false } }} : { props: { foo: string; }; data(this: Readonly<{ foo: string; }> & Instance): { bar: boolean;}; watch: { foo(newVal: string, oldVal: string): void; }; } +>{ props: { foo: '' }, data(): { bar: boolean } { return { bar: true } }, watch: { foo(newVal: string, oldVal: string): void { this.bar = false } }} : { props: { foo: string; }; data(this: Readonly<{ foo: string; }> & Instance): { bar: boolean; }; watch: { foo(newVal: string, oldVal: string): void; }; } props: { >props : { foo: string; } @@ -67,7 +67,7 @@ test({ }, data(): { bar: boolean } { ->data : (this: Readonly<{ foo: string; }> & Instance) => { bar: boolean;} +>data : (this: Readonly<{ foo: string; }> & Instance) => { bar: boolean; } >bar : boolean return { diff --git a/tests/baselines/reference/vueLikeDataAndPropsInference2.types b/tests/baselines/reference/vueLikeDataAndPropsInference2.types index 2ec90ed7c132a..857633bb875d1 100644 --- a/tests/baselines/reference/vueLikeDataAndPropsInference2.types +++ b/tests/baselines/reference/vueLikeDataAndPropsInference2.types @@ -55,7 +55,7 @@ declare function test(fn: Options): void; test({ >test({ props: { foo: '' }, data(): { bar: boolean } { return { bar: true } }, watch: { foo(newVal: string, oldVal: string): void { this.bar = false } }}) : void >test : { (fn: ThisTypedOptions): void; (fn: Options object), PropsDefinition>>): void; } ->{ props: { foo: '' }, data(): { bar: boolean } { return { bar: true } }, watch: { foo(newVal: string, oldVal: string): void { this.bar = false } }} : { props: { foo: string; }; data(this: Readonly<{ foo: string; }> & Instance): { bar: boolean;}; watch: { foo(newVal: string, oldVal: string): void; }; } +>{ props: { foo: '' }, data(): { bar: boolean } { return { bar: true } }, watch: { foo(newVal: string, oldVal: string): void { this.bar = false } }} : { props: { foo: string; }; data(this: Readonly<{ foo: string; }> & Instance): { bar: boolean; }; watch: { foo(newVal: string, oldVal: string): void; }; } props: { >props : { foo: string; } @@ -68,7 +68,7 @@ test({ }, data(): { bar: boolean } { ->data : (this: Readonly<{ foo: string; }> & Instance) => { bar: boolean;} +>data : (this: Readonly<{ foo: string; }> & Instance) => { bar: boolean; } >bar : boolean return { diff --git a/tests/baselines/reference/weakType.types b/tests/baselines/reference/weakType.types index 861b1daa591a5..5d788ea781373 100644 --- a/tests/baselines/reference/weakType.types +++ b/tests/baselines/reference/weakType.types @@ -86,7 +86,7 @@ type ChangeOptions = ConfigurableStartEnd & InsertOptions; >ChangeOptions : ConfigurableStart & ConfigurableEnd & InsertOptions function del(options: ConfigurableStartEnd = {}, ->del : (options?: ConfigurableStartEnd, error?: { error?: number;}) => void +>del : (options?: ConfigurableStartEnd, error?: { error?: number; }) => void >options : ConfigurableStartEnd >{} : {} @@ -136,7 +136,7 @@ type Spoiler = { nope?: string } >nope : string type Weak = { ->Weak : { a?: number; properties?: { b?: number;}; } +>Weak : { a?: number; properties?: { b?: number; }; } a?: number >a : number @@ -149,7 +149,7 @@ type Weak = { } } declare let propertiesWrong: { ->propertiesWrong : { properties: { wrong: string;}; } +>propertiesWrong : { properties: { wrong: string; }; } properties: { >properties : { wrong: string; } diff --git a/tests/baselines/reference/widenToAny1.types b/tests/baselines/reference/widenToAny1.types index 892feb9260def..7fe2333316293 100644 --- a/tests/baselines/reference/widenToAny1.types +++ b/tests/baselines/reference/widenToAny1.types @@ -2,7 +2,7 @@ === widenToAny1.ts === function foo1(f1: { x: T; y: T }): T { ->foo1 : (f1: { x: T; y: T;}) => T +>foo1 : (f1: { x: T; y: T; }) => T >f1 : { x: T; y: T; } >x : T >y : T From bc7e5388da0966b22d7c5782ae8b30c42a917624 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Wed, 27 Mar 2024 10:49:15 -0700 Subject: [PATCH 8/9] Fix main baselines. Again. (#57964) --- tests/baselines/reference/nestedGenericSpreadInference.types | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/baselines/reference/nestedGenericSpreadInference.types b/tests/baselines/reference/nestedGenericSpreadInference.types index d290eb064a363..6ffb8af5c48ef 100644 --- a/tests/baselines/reference/nestedGenericSpreadInference.types +++ b/tests/baselines/reference/nestedGenericSpreadInference.types @@ -2,12 +2,12 @@ === nestedGenericSpreadInference.ts === declare function wrap(x: X): { x: X }; ->wrap : (x: X) => { x: X;} +>wrap : (x: X) => { x: X; } >x : X >x : X declare function call(x: { x: (...args: A) => T }, ...args: A): T; ->call : (x: { x: (...args: A) => T;}, ...args: A) => T +>call : (x: { x: (...args: A) => T; }, ...args: A) => T >x : { x: (...args: A) => T; } >x : (...args: A) => T >args : A From fd388f7d009aee4cb42f8c75c2c992da24dfd81e Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 27 Mar 2024 13:56:29 -0400 Subject: [PATCH 9/9] Refactor expression evaluator (#57955) --- src/compiler/checker.ts | 150 ++++++++++---------------------------- src/compiler/types.ts | 6 ++ src/compiler/utilities.ts | 97 ++++++++++++++++++++++++ 3 files changed, 140 insertions(+), 113 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index f8473dfba8b16..53bec2e0935ae 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -109,6 +109,7 @@ import { createDiagnosticForNodeFromMessageChain, createDiagnosticMessageChainFromDiagnostic, createEmptyExports, + createEvaluator, createFileDiagnostic, createGetCanonicalFileName, createGetSymbolWalker, @@ -1477,6 +1478,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { var checkBinaryExpression = createCheckBinaryExpression(); var emitResolver = createResolver(); var nodeBuilder = createNodeBuilder(); + var evaluate = createEvaluator({ + evaluateElementAccessExpression, + evaluateEntityNameExpression, + }); var globals = createSymbolTable(); var undefinedSymbol = createSymbol(SymbolFlags.Property, "undefined" as __String); @@ -39331,7 +39336,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (isConstContext(node) || isTemplateLiteralContext(node) || someType(getContextualType(node, /*contextFlags*/ undefined) || unknownType, isTemplateLiteralContextualType)) { return getTemplateLiteralType(texts, types); } - const evaluated = node.parent.kind !== SyntaxKind.TaggedTemplateExpression && evaluateTemplateExpression(node); + const evaluated = node.parent.kind !== SyntaxKind.TaggedTemplateExpression && evaluate(node); return evaluated ? getFreshTypeOfLiteralType(getStringLiteralType(evaluated)) : stringType; } @@ -45828,108 +45833,40 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return false; } - function evaluate(expr: Expression, location?: Declaration): string | number | undefined { - switch (expr.kind) { - case SyntaxKind.PrefixUnaryExpression: - const value = evaluate((expr as PrefixUnaryExpression).operand, location); - if (typeof value === "number") { - switch ((expr as PrefixUnaryExpression).operator) { - case SyntaxKind.PlusToken: - return value; - case SyntaxKind.MinusToken: - return -value; - case SyntaxKind.TildeToken: - return ~value; - } - } - break; - case SyntaxKind.BinaryExpression: - const left = evaluate((expr as BinaryExpression).left, location); - const right = evaluate((expr as BinaryExpression).right, location); - if (typeof left === "number" && typeof right === "number") { - switch ((expr as BinaryExpression).operatorToken.kind) { - case SyntaxKind.BarToken: - return left | right; - case SyntaxKind.AmpersandToken: - return left & right; - case SyntaxKind.GreaterThanGreaterThanToken: - return left >> right; - case SyntaxKind.GreaterThanGreaterThanGreaterThanToken: - return left >>> right; - case SyntaxKind.LessThanLessThanToken: - return left << right; - case SyntaxKind.CaretToken: - return left ^ right; - case SyntaxKind.AsteriskToken: - return left * right; - case SyntaxKind.SlashToken: - return left / right; - case SyntaxKind.PlusToken: - return left + right; - case SyntaxKind.MinusToken: - return left - right; - case SyntaxKind.PercentToken: - return left % right; - case SyntaxKind.AsteriskAsteriskToken: - return left ** right; - } - } - else if ( - (typeof left === "string" || typeof left === "number") && - (typeof right === "string" || typeof right === "number") && - (expr as BinaryExpression).operatorToken.kind === SyntaxKind.PlusToken - ) { - return "" + left + right; - } - break; - case SyntaxKind.StringLiteral: - case SyntaxKind.NoSubstitutionTemplateLiteral: - return (expr as StringLiteralLike).text; - case SyntaxKind.TemplateExpression: - return evaluateTemplateExpression(expr as TemplateExpression, location); - case SyntaxKind.NumericLiteral: - checkGrammarNumericLiteral(expr as NumericLiteral); - return +(expr as NumericLiteral).text; - case SyntaxKind.ParenthesizedExpression: - return evaluate((expr as ParenthesizedExpression).expression, location); - case SyntaxKind.Identifier: { - const identifier = expr as Identifier; - if (isInfinityOrNaNString(identifier.escapedText) && (resolveEntityName(identifier, SymbolFlags.Value, /*ignoreErrors*/ true) === getGlobalSymbol(identifier.escapedText, SymbolFlags.Value, /*diagnostic*/ undefined))) { - return +(identifier.escapedText); - } - // falls through + function evaluateEntityNameExpression(expr: EntityNameExpression, location?: Declaration) { + const symbol = resolveEntityName(expr, SymbolFlags.Value, /*ignoreErrors*/ true); + if (!symbol) return undefined; + + if (expr.kind === SyntaxKind.Identifier) { + const identifier = expr; + if (isInfinityOrNaNString(identifier.escapedText) && (symbol === getGlobalSymbol(identifier.escapedText, SymbolFlags.Value, /*diagnostic*/ undefined))) { + return +(identifier.escapedText); } - case SyntaxKind.PropertyAccessExpression: - if (isEntityNameExpression(expr)) { - const symbol = resolveEntityName(expr, SymbolFlags.Value, /*ignoreErrors*/ true); - if (symbol) { - if (symbol.flags & SymbolFlags.EnumMember) { - return location ? evaluateEnumMember(expr, symbol, location) : getEnumMemberValue(symbol.valueDeclaration as EnumMember); - } - if (isConstantVariable(symbol)) { - const declaration = symbol.valueDeclaration; - if (declaration && isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && (!location || declaration !== location && isBlockScopedNameDeclaredBeforeUse(declaration, location))) { - return evaluate(declaration.initializer, declaration); - } - } - } - } - break; - case SyntaxKind.ElementAccessExpression: - const root = (expr as ElementAccessExpression).expression; - if (isEntityNameExpression(root) && isStringLiteralLike((expr as ElementAccessExpression).argumentExpression)) { - const rootSymbol = resolveEntityName(root, SymbolFlags.Value, /*ignoreErrors*/ true); - if (rootSymbol && rootSymbol.flags & SymbolFlags.Enum) { - const name = escapeLeadingUnderscores(((expr as ElementAccessExpression).argumentExpression as StringLiteralLike).text); - const member = rootSymbol.exports!.get(name); - if (member) { - return location ? evaluateEnumMember(expr, member, location) : getEnumMemberValue(member.valueDeclaration as EnumMember); - } - } + } + + if (symbol.flags & SymbolFlags.EnumMember) { + return location ? evaluateEnumMember(expr, symbol, location) : getEnumMemberValue(symbol.valueDeclaration as EnumMember); + } + if (isConstantVariable(symbol)) { + const declaration = symbol.valueDeclaration; + if (declaration && isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && (!location || declaration !== location && isBlockScopedNameDeclaredBeforeUse(declaration, location))) { + return evaluate(declaration.initializer, declaration); + } + } + } + + function evaluateElementAccessExpression(expr: ElementAccessExpression, location?: Declaration) { + const root = expr.expression; + if (isEntityNameExpression(root) && isStringLiteralLike(expr.argumentExpression)) { + const rootSymbol = resolveEntityName(root, SymbolFlags.Value, /*ignoreErrors*/ true); + if (rootSymbol && rootSymbol.flags & SymbolFlags.Enum) { + const name = escapeLeadingUnderscores(expr.argumentExpression.text); + const member = rootSymbol.exports!.get(name); + if (member) { + return location ? evaluateEnumMember(expr, member, location) : getEnumMemberValue(member.valueDeclaration as EnumMember); } - break; + } } - return undefined; } function evaluateEnumMember(expr: Expression, symbol: Symbol, location: Declaration) { @@ -45945,19 +45882,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return getEnumMemberValue(declaration as EnumMember); } - function evaluateTemplateExpression(expr: TemplateExpression, location?: Declaration) { - let result = expr.head.text; - for (const span of expr.templateSpans) { - const value = evaluate(span.expression, location); - if (value === undefined) { - return undefined; - } - result += value; - result += span.literal.text; - } - return result; - } - function checkEnumDeclaration(node: EnumDeclaration) { addLazyDiagnostic(() => checkEnumDeclarationWorker(node)); } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 6d948d7d5ce3f..e67537f0bb326 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -10065,3 +10065,9 @@ export interface Queue { dequeue(): T; isEmpty(): boolean; } + +/** @internal */ +export interface EvaluationResolver { + evaluateEntityNameExpression(expr: EntityNameExpression, location: Declaration | undefined): string | number | undefined; + evaluateElementAccessExpression(expr: ElementAccessExpression, location: Declaration | undefined): string | number | undefined; +} diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index cf9c49fa53f83..e664dd5bb838d 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -119,6 +119,7 @@ import { EqualsToken, equateValues, escapeLeadingUnderscores, + EvaluationResolver, every, ExportAssignment, ExportDeclaration, @@ -511,6 +512,7 @@ import { SyntaxKind, SyntaxList, TaggedTemplateExpression, + TemplateExpression, TemplateLiteral, TemplateLiteralLikeNode, TemplateLiteralToken, @@ -10664,3 +10666,98 @@ export function isSyntacticallyString(expr: Expression): boolean { } return false; } + +/** @internal */ +export function createEvaluator({ evaluateElementAccessExpression, evaluateEntityNameExpression }: EvaluationResolver) { + function evaluate(expr: TemplateExpression, location?: Declaration): string; + function evaluate(expr: Expression, location?: Declaration): string | number | undefined; + function evaluate(expr: Expression, location?: Declaration): string | number | undefined { + switch (expr.kind) { + case SyntaxKind.PrefixUnaryExpression: + const value = evaluate((expr as PrefixUnaryExpression).operand, location); + if (typeof value === "number") { + switch ((expr as PrefixUnaryExpression).operator) { + case SyntaxKind.PlusToken: + return value; + case SyntaxKind.MinusToken: + return -value; + case SyntaxKind.TildeToken: + return ~value; + } + } + break; + case SyntaxKind.BinaryExpression: + const left = evaluate((expr as BinaryExpression).left, location); + const right = evaluate((expr as BinaryExpression).right, location); + if (typeof left === "number" && typeof right === "number") { + switch ((expr as BinaryExpression).operatorToken.kind) { + case SyntaxKind.BarToken: + return left | right; + case SyntaxKind.AmpersandToken: + return left & right; + case SyntaxKind.GreaterThanGreaterThanToken: + return left >> right; + case SyntaxKind.GreaterThanGreaterThanGreaterThanToken: + return left >>> right; + case SyntaxKind.LessThanLessThanToken: + return left << right; + case SyntaxKind.CaretToken: + return left ^ right; + case SyntaxKind.AsteriskToken: + return left * right; + case SyntaxKind.SlashToken: + return left / right; + case SyntaxKind.PlusToken: + return left + right; + case SyntaxKind.MinusToken: + return left - right; + case SyntaxKind.PercentToken: + return left % right; + case SyntaxKind.AsteriskAsteriskToken: + return left ** right; + } + } + else if ( + (typeof left === "string" || typeof left === "number") && + (typeof right === "string" || typeof right === "number") && + (expr as BinaryExpression).operatorToken.kind === SyntaxKind.PlusToken + ) { + return "" + left + right; + } + break; + case SyntaxKind.StringLiteral: + case SyntaxKind.NoSubstitutionTemplateLiteral: + return (expr as StringLiteralLike).text; + case SyntaxKind.TemplateExpression: + return evaluateTemplateExpression(expr as TemplateExpression, location); + case SyntaxKind.NumericLiteral: + return +(expr as NumericLiteral).text; + case SyntaxKind.ParenthesizedExpression: + return evaluate((expr as ParenthesizedExpression).expression, location); + case SyntaxKind.Identifier: + return evaluateEntityNameExpression(expr as Identifier, location); + case SyntaxKind.PropertyAccessExpression: + if (isEntityNameExpression(expr)) { + return evaluateEntityNameExpression(expr, location); + } + break; + case SyntaxKind.ElementAccessExpression: + return evaluateElementAccessExpression(expr as ElementAccessExpression, location); + } + return undefined; + } + + function evaluateTemplateExpression(expr: TemplateExpression, location?: Declaration) { + let result = expr.head.text; + for (const span of expr.templateSpans) { + const value = evaluate(span.expression, location); + if (value === undefined) { + return undefined; + } + result += value; + result += span.literal.text; + } + return result; + } + return evaluate; +}