From da8bd588d16a1fb3335eca856384531a114a6dae Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 11 Jul 2024 21:00:27 +0000 Subject: [PATCH] Accept baselines. --- ...arationEmitLateBoundAssignments.errors.txt | 30 ------ ...rationEmitLateBoundAssignments2.errors.txt | 101 ------------------ ...ationEmitLateBoundJSAssignments.errors.txt | 35 ------ ...tionExpressionsWithDynamicNames.errors.txt | 19 ---- .../reference/fixSignatureCaching.types | 2 +- ...ndAssignmentDeclarationSupport7.errors.txt | 23 ---- ...ionMemberAssignmentDeclarations.errors.txt | 13 --- 7 files changed, 1 insertion(+), 222 deletions(-) delete mode 100644 tests/baselines/reference/declarationEmitLateBoundAssignments.errors.txt delete mode 100644 tests/baselines/reference/declarationEmitLateBoundAssignments2.errors.txt delete mode 100644 tests/baselines/reference/declarationEmitLateBoundJSAssignments.errors.txt delete mode 100644 tests/baselines/reference/expandoFunctionExpressionsWithDynamicNames.errors.txt delete mode 100644 tests/baselines/reference/lateBoundAssignmentDeclarationSupport7.errors.txt delete mode 100644 tests/baselines/reference/lateBoundFunctionMemberAssignmentDeclarations.errors.txt diff --git a/tests/baselines/reference/declarationEmitLateBoundAssignments.errors.txt b/tests/baselines/reference/declarationEmitLateBoundAssignments.errors.txt deleted file mode 100644 index bbc4d9b5146..00000000000 --- a/tests/baselines/reference/declarationEmitLateBoundAssignments.errors.txt +++ /dev/null @@ -1,30 +0,0 @@ -declarationEmitLateBoundAssignments.ts(4,1): error TS7022: 'foo[_private]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. -declarationEmitLateBoundAssignments.ts(6,1): error TS7022: 'foo[strMem]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. -declarationEmitLateBoundAssignments.ts(8,1): error TS7022: 'foo[dashStrMem]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. -declarationEmitLateBoundAssignments.ts(10,1): error TS7022: 'foo[numMem]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - - -==== declarationEmitLateBoundAssignments.ts (4 errors) ==== - export function foo() {} - foo.bar = 12; - const _private = Symbol(); - foo[_private] = "ok"; - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS7022: 'foo[_private]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - const strMem = "strMemName"; - foo[strMem] = "ok"; - ~~~~~~~~~~~~~~~~~~ -!!! error TS7022: 'foo[strMem]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - const dashStrMem = "dashed-str-mem"; - foo[dashStrMem] = "ok"; - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS7022: 'foo[dashStrMem]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - const numMem = 42; - foo[numMem] = "ok"; - ~~~~~~~~~~~~~~~~~~ -!!! error TS7022: 'foo[numMem]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - - const x: string = foo[_private]; - const y: string = foo[strMem]; - const z: string = foo[numMem]; - const a: string = foo[dashStrMem]; \ No newline at end of file diff --git a/tests/baselines/reference/declarationEmitLateBoundAssignments2.errors.txt b/tests/baselines/reference/declarationEmitLateBoundAssignments2.errors.txt deleted file mode 100644 index 4e4d97ced9a..00000000000 --- a/tests/baselines/reference/declarationEmitLateBoundAssignments2.errors.txt +++ /dev/null @@ -1,101 +0,0 @@ -declarationEmitLateBoundAssignments2.ts(13,1): error TS7022: 'decl2[c]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. -declarationEmitLateBoundAssignments2.ts(19,1): error TS7022: 'decl4[num]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. -declarationEmitLateBoundAssignments2.ts(25,1): error TS7022: 'decl6[numStr]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. -declarationEmitLateBoundAssignments2.ts(31,1): error TS7022: 'decl8[withWhitespace]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. -declarationEmitLateBoundAssignments2.ts(37,1): error TS7022: 'decl10[emoji]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. -declarationEmitLateBoundAssignments2.ts(43,1): error TS7022: 'arrow2[c]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. -declarationEmitLateBoundAssignments2.ts(49,1): error TS7022: 'arrow4[num]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. -declarationEmitLateBoundAssignments2.ts(55,1): error TS7022: 'arrow6[numStr]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. -declarationEmitLateBoundAssignments2.ts(61,1): error TS7022: 'arrow8[withWhitespace]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. -declarationEmitLateBoundAssignments2.ts(67,1): error TS7022: 'arrow10[emoji]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - - -==== declarationEmitLateBoundAssignments2.ts (10 errors) ==== - // https://github.com/microsoft/TypeScript/issues/54811 - - const c = "C" - const num = 1 - const numStr = "10" - const withWhitespace = "foo bar" - const emoji = "🤷‍♂️" - - export function decl() {} - decl["B"] = 'foo' - - export function decl2() {} - decl2[c] = 0 - ~~~~~~~~~~~~ -!!! error TS7022: 'decl2[c]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - - export function decl3() {} - decl3[77] = 0 - - export function decl4() {} - decl4[num] = 0 - ~~~~~~~~~~~~~~ -!!! error TS7022: 'decl4[num]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - - export function decl5() {} - decl5["101"] = 0 - - export function decl6() {} - decl6[numStr] = 0 - ~~~~~~~~~~~~~~~~~ -!!! error TS7022: 'decl6[numStr]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - - export function decl7() {} - decl7["qwe rty"] = 0 - - export function decl8() {} - decl8[withWhitespace] = 0 - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS7022: 'decl8[withWhitespace]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - - export function decl9() {} - decl9["🤪"] = 0 - - export function decl10() {} - decl10[emoji] = 0 - ~~~~~~~~~~~~~~~~~ -!!! error TS7022: 'decl10[emoji]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - - export const arrow = () => {} - arrow["B"] = 'bar' - - export const arrow2 = () => {} - arrow2[c] = 100 - ~~~~~~~~~~~~~~~ -!!! error TS7022: 'arrow2[c]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - - export const arrow3 = () => {} - arrow3[77] = 0 - - export const arrow4 = () => {} - arrow4[num] = 0 - ~~~~~~~~~~~~~~~ -!!! error TS7022: 'arrow4[num]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - - export const arrow5 = () => {} - arrow5["101"] = 0 - - export const arrow6 = () => {} - arrow6[numStr] = 0 - ~~~~~~~~~~~~~~~~~~ -!!! error TS7022: 'arrow6[numStr]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - - export const arrow7 = () => {} - arrow7["qwe rty"] = 0 - - export const arrow8 = () => {} - arrow8[withWhitespace] = 0 - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS7022: 'arrow8[withWhitespace]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - - export const arrow9 = () => {} - arrow9["🤪"] = 0 - - export const arrow10 = () => {} - arrow10[emoji] = 0 - ~~~~~~~~~~~~~~~~~~ -!!! error TS7022: 'arrow10[emoji]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - \ No newline at end of file diff --git a/tests/baselines/reference/declarationEmitLateBoundJSAssignments.errors.txt b/tests/baselines/reference/declarationEmitLateBoundJSAssignments.errors.txt deleted file mode 100644 index a4b40e3a9cf..00000000000 --- a/tests/baselines/reference/declarationEmitLateBoundJSAssignments.errors.txt +++ /dev/null @@ -1,35 +0,0 @@ -file.js(4,1): error TS7022: 'foo[_private]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. -file.js(6,1): error TS7022: 'foo[strMem]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. -file.js(8,1): error TS7022: 'foo[dashStrMem]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. -file.js(10,1): error TS7022: 'foo[numMem]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - - -==== file.js (4 errors) ==== - export function foo() {} - foo.bar = 12; - const _private = Symbol(); - foo[_private] = "ok"; - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS7022: 'foo[_private]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - const strMem = "strMemName"; - foo[strMem] = "ok"; - ~~~~~~~~~~~~~~~~~~ -!!! error TS7022: 'foo[strMem]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - const dashStrMem = "dashed-str-mem"; - foo[dashStrMem] = "ok"; - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS7022: 'foo[dashStrMem]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - const numMem = 42; - foo[numMem] = "ok"; - ~~~~~~~~~~~~~~~~~~ -!!! error TS7022: 'foo[numMem]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - - /** @type {string} */ - const x = foo[_private]; - /** @type {string} */ - const y = foo[strMem]; - /** @type {string} */ - const z = foo[numMem]; - /** @type {string} */ - const a = foo[dashStrMem]; - \ No newline at end of file diff --git a/tests/baselines/reference/expandoFunctionExpressionsWithDynamicNames.errors.txt b/tests/baselines/reference/expandoFunctionExpressionsWithDynamicNames.errors.txt deleted file mode 100644 index 6d223768c78..00000000000 --- a/tests/baselines/reference/expandoFunctionExpressionsWithDynamicNames.errors.txt +++ /dev/null @@ -1,19 +0,0 @@ -expandoFunctionExpressionsWithDynamicNames.ts(6,1): error TS7022: 'expr[s]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. -expandoFunctionExpressionsWithDynamicNames.ts(9,1): error TS7022: 'expr2[s]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - - -==== expandoFunctionExpressionsWithDynamicNames.ts (2 errors) ==== - // https://github.com/microsoft/TypeScript/issues/54809 - - const s = "X"; - - export const expr = () => {} - expr[s] = 0 - ~~~~~~~~~~~ -!!! error TS7022: 'expr[s]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - - export const expr2 = function () {} - expr2[s] = 0 - ~~~~~~~~~~~~ -!!! error TS7022: 'expr2[s]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - \ No newline at end of file diff --git a/tests/baselines/reference/fixSignatureCaching.types b/tests/baselines/reference/fixSignatureCaching.types index 4251529b6a0..761d582ee4b 100644 --- a/tests/baselines/reference/fixSignatureCaching.types +++ b/tests/baselines/reference/fixSignatureCaching.types @@ -1,7 +1,7 @@ //// [tests/cases/conformance/fixSignatureCaching.ts] //// === Performance Stats === -Type Count: 1,000 +Type Count: 1,000 -> 2,500 === fixSignatureCaching.ts === // Repro from #10697 diff --git a/tests/baselines/reference/lateBoundAssignmentDeclarationSupport7.errors.txt b/tests/baselines/reference/lateBoundAssignmentDeclarationSupport7.errors.txt deleted file mode 100644 index 90897b9d991..00000000000 --- a/tests/baselines/reference/lateBoundAssignmentDeclarationSupport7.errors.txt +++ /dev/null @@ -1,23 +0,0 @@ -lateBoundAssignmentDeclarationSupport7.js(6,1): error TS7022: 'F[_sym]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. -lateBoundAssignmentDeclarationSupport7.js(7,1): error TS7022: 'F[_str]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - - -==== usage.js (0 errors) ==== - const x = require("./lateBoundAssignmentDeclarationSupport7.js"); - const y = x.F["my-fake-sym"]; - const z = x.F[x.S]; - -==== lateBoundAssignmentDeclarationSupport7.js (2 errors) ==== - const _sym = Symbol(); - const _str = "my-fake-sym"; - - function F() { - } - F[_sym] = "ok"; - ~~~~~~~~~~~~~~ -!!! error TS7022: 'F[_sym]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - F[_str] = "ok"; - ~~~~~~~~~~~~~~ -!!! error TS7022: 'F[_str]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - module.exports.F = F; - module.exports.S = _sym; \ No newline at end of file diff --git a/tests/baselines/reference/lateBoundFunctionMemberAssignmentDeclarations.errors.txt b/tests/baselines/reference/lateBoundFunctionMemberAssignmentDeclarations.errors.txt deleted file mode 100644 index c956cc8ae0d..00000000000 --- a/tests/baselines/reference/lateBoundFunctionMemberAssignmentDeclarations.errors.txt +++ /dev/null @@ -1,13 +0,0 @@ -index.ts(4,1): error TS7022: 'foo[_private]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - - -==== index.ts (1 errors) ==== - export function foo() {} - foo.bar = 12; - const _private = Symbol(); - foo[_private] = "ok"; - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS7022: 'foo[_private]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. - - const x: string = foo[_private]; - \ No newline at end of file