mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Accept baselines.
This commit is contained in:
@@ -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];
|
||||
@@ -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.
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user