mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 03:09:39 -06:00
Fully refresh and accept baselines.
This commit is contained in:
parent
c68caa00db
commit
97f1564b9c
@ -1,11 +1,14 @@
|
||||
asiPreventsParsingAsInterface05.ts(3,5): error TS1212: Identifier expected. 'interface' is a reserved word in strict mode.
|
||||
asiPreventsParsingAsInterface05.ts(10,1): error TS1212: Identifier expected. 'interface' is a reserved word in strict mode.
|
||||
asiPreventsParsingAsInterface05.ts(11,1): error TS2304: Cannot find name 'I'.
|
||||
|
||||
|
||||
==== asiPreventsParsingAsInterface05.ts (2 errors) ====
|
||||
==== asiPreventsParsingAsInterface05.ts (3 errors) ====
|
||||
"use strict"
|
||||
|
||||
declare var interface: number;
|
||||
var interface: number = 123;
|
||||
~~~~~~~~~
|
||||
!!! error TS1212: Identifier expected. 'interface' is a reserved word in strict mode.
|
||||
|
||||
// 'interface' is a strict mode reserved word, and so it would be permissible
|
||||
// to allow 'interface' and the name of the interface to be on separate lines;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
//// [asiPreventsParsingAsInterface05.ts]
|
||||
"use strict"
|
||||
|
||||
declare var interface: number;
|
||||
var interface: number = 123;
|
||||
|
||||
// 'interface' is a strict mode reserved word, and so it would be permissible
|
||||
// to allow 'interface' and the name of the interface to be on separate lines;
|
||||
@ -16,6 +16,7 @@ I // This should be the identifier 'I'
|
||||
|
||||
//// [asiPreventsParsingAsInterface05.js]
|
||||
"use strict";
|
||||
var interface = 123;
|
||||
// 'interface' is a strict mode reserved word, and so it would be permissible
|
||||
// to allow 'interface' and the name of the interface to be on separate lines;
|
||||
// however, this complicates things, and so it is preferable to restrict interface
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
=== asiPreventsParsingAsInterface05.ts ===
|
||||
"use strict"
|
||||
|
||||
declare var interface: number;
|
||||
>interface : Symbol(interface, Decl(asiPreventsParsingAsInterface05.ts, 2, 11))
|
||||
var interface: number = 123;
|
||||
>interface : Symbol(interface, Decl(asiPreventsParsingAsInterface05.ts, 2, 3))
|
||||
|
||||
// 'interface' is a strict mode reserved word, and so it would be permissible
|
||||
// to allow 'interface' and the name of the interface to be on separate lines;
|
||||
@ -12,7 +12,7 @@ declare var interface: number;
|
||||
// declarations such that their identifier must follow 'interface' on the same line.
|
||||
|
||||
interface // This should be the identifier 'interface'
|
||||
>interface : Symbol(interface, Decl(asiPreventsParsingAsInterface05.ts, 2, 11))
|
||||
>interface : Symbol(interface, Decl(asiPreventsParsingAsInterface05.ts, 2, 3))
|
||||
|
||||
I // This should be the identifier 'I'
|
||||
{ } // This should be a block body
|
||||
|
||||
@ -5,9 +5,11 @@
|
||||
>"use strict" : "use strict"
|
||||
> : ^^^^^^^^^^^^
|
||||
|
||||
declare var interface: number;
|
||||
var interface: number = 123;
|
||||
>interface : number
|
||||
> : ^^^^^^
|
||||
>123 : 123
|
||||
> : ^^^
|
||||
|
||||
// 'interface' is a strict mode reserved word, and so it would be permissible
|
||||
// to allow 'interface' and the name of the interface to be on separate lines;
|
||||
|
||||
@ -18,7 +18,6 @@ assignmentCompatWithStringIndexer.ts(47,9): error TS2322: Type 'A<T>' is not ass
|
||||
'string' index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base' but required in type 'Derived'.
|
||||
assignmentCompatWithStringIndexer.ts(49,9): error TS1184: Modifiers cannot appear here.
|
||||
assignmentCompatWithStringIndexer.ts(50,9): error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
'string' index signatures are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'T'.
|
||||
@ -27,9 +26,11 @@ assignmentCompatWithStringIndexer.ts(51,9): error TS2322: Type 'A<T>' is not ass
|
||||
'string' index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived2'.
|
||||
Type 'Base' is missing the following properties from type 'Derived2': baz, bar
|
||||
assignmentCompatWithStringIndexer.ts(55,5): error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
assignmentCompatWithStringIndexer.ts(55,6): error TS1263: Declarations with initializers cannot also have definite assignment assertions.
|
||||
|
||||
|
||||
==== assignmentCompatWithStringIndexer.ts (9 errors) ====
|
||||
==== assignmentCompatWithStringIndexer.ts (10 errors) ====
|
||||
// index signatures must be compatible in assignments
|
||||
|
||||
interface Base { foo: string; }
|
||||
@ -107,9 +108,7 @@ assignmentCompatWithStringIndexer.ts(51,9): error TS2322: Type 'A<T>' is not ass
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base' but required in type 'Derived'.
|
||||
!!! related TS2728 assignmentCompatWithStringIndexer.ts:4:34: 'bar' is declared here.
|
||||
|
||||
declare var b4: { [x: string]: Derived2; };
|
||||
~~~~~~~
|
||||
!!! error TS1184: Modifiers cannot appear here.
|
||||
var b4: { [x: string]: Derived2; };
|
||||
a3 = b4; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
@ -123,4 +122,10 @@ assignmentCompatWithStringIndexer.ts(51,9): error TS2322: Type 'A<T>' is not ass
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'Derived2'.
|
||||
!!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': baz, bar
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let x!: string = 123
|
||||
~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
~
|
||||
!!! error TS1263: Declarations with initializers cannot also have definite assignment assertions.
|
||||
@ -49,11 +49,13 @@ namespace Generics {
|
||||
a3 = b3; // error
|
||||
b3 = a3; // error
|
||||
|
||||
declare var b4: { [x: string]: Derived2; };
|
||||
var b4: { [x: string]: Derived2; };
|
||||
a3 = b4; // error
|
||||
b4 = a3; // error
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let x!: string = 123
|
||||
|
||||
//// [assignmentCompatWithStringIndexer.js]
|
||||
// index signatures must be compatible in assignments
|
||||
@ -111,7 +113,9 @@ var Generics;
|
||||
var a3;
|
||||
a3 = b3; // error
|
||||
b3 = a3; // error
|
||||
var b4;
|
||||
a3 = b4; // error
|
||||
b4 = a3; // error
|
||||
}
|
||||
})(Generics || (Generics = {}));
|
||||
var x = 123;
|
||||
|
||||
@ -142,17 +142,21 @@ namespace Generics {
|
||||
>b3 : Symbol(b3, Decl(assignmentCompatWithStringIndexer.ts, 43, 11))
|
||||
>a3 : Symbol(a3, Decl(assignmentCompatWithStringIndexer.ts, 44, 11))
|
||||
|
||||
declare var b4: { [x: string]: Derived2; };
|
||||
>b4 : Symbol(b4, Decl(assignmentCompatWithStringIndexer.ts, 48, 19))
|
||||
>x : Symbol(x, Decl(assignmentCompatWithStringIndexer.ts, 48, 27))
|
||||
var b4: { [x: string]: Derived2; };
|
||||
>b4 : Symbol(b4, Decl(assignmentCompatWithStringIndexer.ts, 48, 11))
|
||||
>x : Symbol(x, Decl(assignmentCompatWithStringIndexer.ts, 48, 19))
|
||||
>Derived2 : Symbol(Derived2, Decl(assignmentCompatWithStringIndexer.ts, 3, 47))
|
||||
|
||||
a3 = b4; // error
|
||||
>a3 : Symbol(a3, Decl(assignmentCompatWithStringIndexer.ts, 44, 11))
|
||||
>b4 : Symbol(b4, Decl(assignmentCompatWithStringIndexer.ts, 48, 19))
|
||||
>b4 : Symbol(b4, Decl(assignmentCompatWithStringIndexer.ts, 48, 11))
|
||||
|
||||
b4 = a3; // error
|
||||
>b4 : Symbol(b4, Decl(assignmentCompatWithStringIndexer.ts, 48, 19))
|
||||
>b4 : Symbol(b4, Decl(assignmentCompatWithStringIndexer.ts, 48, 11))
|
||||
>a3 : Symbol(a3, Decl(assignmentCompatWithStringIndexer.ts, 44, 11))
|
||||
}
|
||||
}
|
||||
|
||||
let x!: string = 123
|
||||
>x : Symbol(x, Decl(assignmentCompatWithStringIndexer.ts, 54, 3))
|
||||
|
||||
|
||||
@ -185,7 +185,7 @@ namespace Generics {
|
||||
>a3 : A<T>
|
||||
> : ^^^^
|
||||
|
||||
declare var b4: { [x: string]: Derived2; };
|
||||
var b4: { [x: string]: Derived2; };
|
||||
>b4 : { [x: string]: Derived2; }
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
>x : string
|
||||
@ -208,3 +208,10 @@ namespace Generics {
|
||||
> : ^^^^
|
||||
}
|
||||
}
|
||||
|
||||
let x!: string = 123
|
||||
>x : string
|
||||
> : ^^^^^^
|
||||
>123 : 123
|
||||
> : ^^^
|
||||
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
capturedLetConstInLoop5.ts(174,13): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap.
|
||||
capturedLetConstInLoop5.ts(229,13): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap.
|
||||
capturedLetConstInLoop5.ts(270,12): error TS1123: Variable declaration list cannot be empty.
|
||||
|
||||
|
||||
==== capturedLetConstInLoop5.ts (3 errors) ====
|
||||
==== capturedLetConstInLoop5.ts (2 errors) ====
|
||||
declare function use(a: any);
|
||||
|
||||
//====let
|
||||
@ -277,9 +276,6 @@ capturedLetConstInLoop5.ts(270,12): error TS1123: Variable declaration list cann
|
||||
function foo8_c(x) {
|
||||
for (const y = 0; y < 1;) {
|
||||
const x = 1;
|
||||
var
|
||||
|
||||
!!! error TS1123: Variable declaration list cannot be empty.
|
||||
var v = x;
|
||||
(function() { return x + y + v });
|
||||
(() => x + y + v);
|
||||
|
||||
@ -270,7 +270,6 @@ function foo7_c(x) {
|
||||
function foo8_c(x) {
|
||||
for (const y = 0; y < 1;) {
|
||||
const x = 1;
|
||||
var
|
||||
var v = x;
|
||||
(function() { return x + y + v });
|
||||
(() => x + y + v);
|
||||
|
||||
@ -657,20 +657,19 @@ function foo8_c(x) {
|
||||
const x = 1;
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop5.ts, 268, 13))
|
||||
|
||||
var
|
||||
var v = x;
|
||||
>v : Symbol(v, Decl(capturedLetConstInLoop5.ts, 270, 11))
|
||||
>v : Symbol(v, Decl(capturedLetConstInLoop5.ts, 269, 11))
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop5.ts, 268, 13))
|
||||
|
||||
(function() { return x + y + v });
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop5.ts, 268, 13))
|
||||
>y : Symbol(y, Decl(capturedLetConstInLoop5.ts, 267, 14))
|
||||
>v : Symbol(v, Decl(capturedLetConstInLoop5.ts, 270, 11))
|
||||
>v : Symbol(v, Decl(capturedLetConstInLoop5.ts, 269, 11))
|
||||
|
||||
(() => x + y + v);
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop5.ts, 268, 13))
|
||||
>y : Symbol(y, Decl(capturedLetConstInLoop5.ts, 267, 14))
|
||||
>v : Symbol(v, Decl(capturedLetConstInLoop5.ts, 270, 11))
|
||||
>v : Symbol(v, Decl(capturedLetConstInLoop5.ts, 269, 11))
|
||||
|
||||
if (x == 1) {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop5.ts, 268, 13))
|
||||
@ -681,5 +680,5 @@ function foo8_c(x) {
|
||||
|
||||
use(v);
|
||||
>use : Symbol(use, Decl(capturedLetConstInLoop5.ts, 0, 0))
|
||||
>v : Symbol(v, Decl(capturedLetConstInLoop5.ts, 270, 11))
|
||||
>v : Symbol(v, Decl(capturedLetConstInLoop5.ts, 269, 11))
|
||||
}
|
||||
|
||||
@ -1436,7 +1436,6 @@ function foo8_c(x) {
|
||||
>1 : 1
|
||||
> : ^
|
||||
|
||||
var
|
||||
var v = x;
|
||||
>v : number
|
||||
> : ^^^^^^
|
||||
|
||||
@ -18,9 +18,11 @@ genericCallWithGenericSignatureArguments2.ts(60,23): error TS2345: Argument of t
|
||||
Types of parameters 'a' and 'x' are incompatible.
|
||||
Type 'Date' is not assignable to type 'T'.
|
||||
'T' could be instantiated with an arbitrary type which could be unrelated to 'Date'.
|
||||
genericCallWithGenericSignatureArguments2.ts(67,51): error TS2304: Cannot find name 'U'.
|
||||
genericCallWithGenericSignatureArguments2.ts(67,57): error TS2304: Cannot find name 'U'.
|
||||
|
||||
|
||||
==== genericCallWithGenericSignatureArguments2.ts (8 errors) ====
|
||||
==== genericCallWithGenericSignatureArguments2.ts (10 errors) ====
|
||||
// When a function expression is inferentially typed (section 4.9.3) and a type assigned to a parameter in that expression references type parameters for which inferences are being made,
|
||||
// the corresponding inferred type arguments to become fixed and no further candidate inferences are made for them.
|
||||
|
||||
@ -116,7 +118,11 @@ genericCallWithGenericSignatureArguments2.ts(60,23): error TS2345: Argument of t
|
||||
enum E { A }
|
||||
enum F { A }
|
||||
|
||||
function foo3<T>(x: T, a: (x: T) => T, b: (x: any) => any) {
|
||||
function foo3<T>(x: T, a: (x: T) => T, b: (x: U) => U) {
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'U'.
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'U'.
|
||||
var r!: (x: T) => T;
|
||||
return r;
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ namespace TU {
|
||||
enum E { A }
|
||||
enum F { A }
|
||||
|
||||
function foo3<T>(x: T, a: (x: T) => T, b: (x: any) => any) {
|
||||
function foo3<T>(x: T, a: (x: T) => T, b: (x: U) => U) {
|
||||
var r!: (x: T) => T;
|
||||
return r;
|
||||
}
|
||||
|
||||
@ -280,7 +280,7 @@ namespace TU {
|
||||
>F : Symbol(F, Decl(genericCallWithGenericSignatureArguments2.ts, 63, 16))
|
||||
>A : Symbol(F.A, Decl(genericCallWithGenericSignatureArguments2.ts, 64, 12))
|
||||
|
||||
function foo3<T>(x: T, a: (x: T) => T, b: (x: any) => any) {
|
||||
function foo3<T>(x: T, a: (x: T) => T, b: (x: U) => U) {
|
||||
>foo3 : Symbol(foo3, Decl(genericCallWithGenericSignatureArguments2.ts, 64, 16))
|
||||
>T : Symbol(T, Decl(genericCallWithGenericSignatureArguments2.ts, 66, 18))
|
||||
>x : Symbol(x, Decl(genericCallWithGenericSignatureArguments2.ts, 66, 21))
|
||||
@ -291,6 +291,8 @@ namespace TU {
|
||||
>T : Symbol(T, Decl(genericCallWithGenericSignatureArguments2.ts, 66, 18))
|
||||
>b : Symbol(b, Decl(genericCallWithGenericSignatureArguments2.ts, 66, 42))
|
||||
>x : Symbol(x, Decl(genericCallWithGenericSignatureArguments2.ts, 66, 47))
|
||||
>U : Symbol(U)
|
||||
>U : Symbol(U)
|
||||
|
||||
var r!: (x: T) => T;
|
||||
>r : Symbol(r, Decl(genericCallWithGenericSignatureArguments2.ts, 67, 11))
|
||||
|
||||
@ -425,19 +425,19 @@ namespace TU {
|
||||
>A : F.A
|
||||
> : ^^^
|
||||
|
||||
function foo3<T>(x: T, a: (x: T) => T, b: (x: any) => any) {
|
||||
>foo3 : <T>(x: T, a: (x: T) => T, b: (x: any) => any) => (x: T) => T
|
||||
> : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
|
||||
function foo3<T>(x: T, a: (x: T) => T, b: (x: U) => U) {
|
||||
>foo3 : <T>(x: T, a: (x: T) => T, b: (x: U) => U) => (x: T) => T
|
||||
> : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
|
||||
>x : T
|
||||
> : ^
|
||||
>a : (x: T) => T
|
||||
> : ^ ^^ ^^^^^
|
||||
>x : T
|
||||
> : ^
|
||||
>b : (x: any) => any
|
||||
> : ^ ^^ ^^^^^
|
||||
>x : any
|
||||
> : ^^^
|
||||
>b : (x: U) => U
|
||||
> : ^ ^^ ^^^^^
|
||||
>x : U
|
||||
> : ^
|
||||
|
||||
var r!: (x: T) => T;
|
||||
>r : (x: T) => T
|
||||
@ -455,8 +455,8 @@ namespace TU {
|
||||
> : ^ ^^^^^^^^^
|
||||
>foo3(E.A, (x) => E.A, (x) => F.A) : (x: E) => E
|
||||
> : ^ ^^^^^^^^^
|
||||
>foo3 : <T>(x: T, a: (x: T) => T, b: (x: any) => any) => (x: T) => T
|
||||
> : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
|
||||
>foo3 : <T>(x: T, a: (x: T) => T, b: (x: U) => U) => (x: T) => T
|
||||
> : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^ ^^ ^^^^^
|
||||
>E.A : E
|
||||
> : ^
|
||||
>E : typeof E
|
||||
@ -473,10 +473,10 @@ namespace TU {
|
||||
> : ^^^^^^^^
|
||||
>A : E
|
||||
> : ^
|
||||
>(x) => F.A : (x: any) => F
|
||||
> : ^ ^^^^^^^^^^^
|
||||
>x : any
|
||||
> : ^^^
|
||||
>(x) => F.A : (x: U) => F
|
||||
> : ^ ^^^^^^^^^
|
||||
>x : U
|
||||
> : ^
|
||||
>F.A : F
|
||||
> : ^
|
||||
>F : typeof F
|
||||
|
||||
@ -5,14 +5,10 @@ objectRestNegative.ts(6,10): error TS2322: Type '{ a: number; }' is not assignab
|
||||
objectRestNegative.ts(9,31): error TS2462: A rest element must be last in a destructuring pattern.
|
||||
objectRestNegative.ts(11,30): error TS7008: Member 'x' implicitly has an 'any' type.
|
||||
objectRestNegative.ts(11,33): error TS7008: Member 'y' implicitly has an 'any' type.
|
||||
objectRestNegative.ts(16,27): error TS2349: This expression is not callable.
|
||||
Type '{ b: string; }' has no call signatures.
|
||||
objectRestNegative.ts(17,9): error TS2448: Block-scoped variable 'rest' used before its declaration.
|
||||
objectRestNegative.ts(17,9): error TS2701: The target of an object rest assignment must be a variable or a property access.
|
||||
objectRestNegative.ts(17,18): error TS2448: Block-scoped variable 'rest' used before its declaration.
|
||||
|
||||
|
||||
==== objectRestNegative.ts (9 errors) ====
|
||||
==== objectRestNegative.ts (6 errors) ====
|
||||
let o = { a: 1, b: 'no' };
|
||||
var { ...mustBeLast, a } = o;
|
||||
~~~~~~~~~~
|
||||
@ -40,18 +36,8 @@ objectRestNegative.ts(17,18): error TS2448: Block-scoped variable 'rest' used be
|
||||
return rest;
|
||||
}
|
||||
|
||||
let rest: { b: string } = { b: "" }
|
||||
~~~~~~~~~
|
||||
!!! error TS2349: This expression is not callable.
|
||||
!!! error TS2349: Type '{ b: string; }' has no call signatures.
|
||||
!!! related TS2734 objectRestNegative.ts:16:27: Are you missing a semicolon?
|
||||
let rest: { b: string } = { b: "" };
|
||||
({a, ...rest.b + rest.b} = o);
|
||||
~~~~
|
||||
!!! error TS2448: Block-scoped variable 'rest' used before its declaration.
|
||||
!!! related TS2728 objectRestNegative.ts:16:5: 'rest' is declared here.
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2701: The target of an object rest assignment must be a variable or a property access.
|
||||
~~~~
|
||||
!!! error TS2448: Block-scoped variable 'rest' used before its declaration.
|
||||
!!! related TS2728 objectRestNegative.ts:16:5: 'rest' is declared here.
|
||||
|
||||
@ -16,7 +16,7 @@ function generic<T extends { x, y }>(t: T) {
|
||||
return rest;
|
||||
}
|
||||
|
||||
let rest: { b: string } = { b: "" }
|
||||
let rest: { b: string } = { b: "" };
|
||||
({a, ...rest.b + rest.b} = o);
|
||||
|
||||
|
||||
@ -44,4 +44,5 @@ function generic(t) {
|
||||
var x = t.x, rest = __rest(t, ["x"]);
|
||||
return rest;
|
||||
}
|
||||
var rest = { b: "" }((a = o.a, rest.b + rest.b = __rest(o, ["a"]), o));
|
||||
var rest = { b: "" };
|
||||
(a = o.a, rest.b + rest.b = __rest(o, ["a"]));
|
||||
|
||||
@ -48,7 +48,7 @@ function generic<T extends { x, y }>(t: T) {
|
||||
>rest : Symbol(rest, Decl(objectRestNegative.ts, 11, 12))
|
||||
}
|
||||
|
||||
let rest: { b: string } = { b: "" }
|
||||
let rest: { b: string } = { b: "" };
|
||||
>rest : Symbol(rest, Decl(objectRestNegative.ts, 15, 3))
|
||||
>b : Symbol(b, Decl(objectRestNegative.ts, 15, 11))
|
||||
>b : Symbol(b, Decl(objectRestNegative.ts, 15, 27))
|
||||
|
||||
@ -83,13 +83,11 @@ function generic<T extends { x, y }>(t: T) {
|
||||
> : ^^^^^^^^^^^^
|
||||
}
|
||||
|
||||
let rest: { b: string } = { b: "" }
|
||||
let rest: { b: string } = { b: "" };
|
||||
>rest : { b: string; }
|
||||
> : ^^^^^ ^^^
|
||||
>b : string
|
||||
> : ^^^^^^
|
||||
>{ b: "" }({a, ...rest.b + rest.b} = o) : any
|
||||
> : ^^^
|
||||
>{ b: "" } : { b: string; }
|
||||
> : ^^^^^^^^^^^^^^
|
||||
>b : string
|
||||
@ -98,6 +96,8 @@ let rest: { b: string } = { b: "" }
|
||||
> : ^^
|
||||
|
||||
({a, ...rest.b + rest.b} = o);
|
||||
>({a, ...rest.b + rest.b} = o) : { a: number; b: string; }
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
>{a, ...rest.b + rest.b} = o : { a: number; b: string; }
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
>{a, ...rest.b + rest.b} : any
|
||||
|
||||
@ -1,18 +0,0 @@
|
||||
propertyAccessStringIndexSignature.ts(10,7): error TS2339: Property 'nope' does not exist on type 'Empty'.
|
||||
|
||||
|
||||
==== propertyAccessStringIndexSignature.ts (1 errors) ====
|
||||
interface Flags { [name: string]: boolean };
|
||||
let flags: Flags;
|
||||
flags.b;
|
||||
flags.f;
|
||||
flags.isNotNecessarilyNeverFalse;
|
||||
flags['this is fine'];
|
||||
|
||||
interface Empty { }
|
||||
let empty: Empty;
|
||||
empty.nope;
|
||||
~~~~
|
||||
!!! error TS2339: Property 'nope' does not exist on type 'Empty'.
|
||||
empty["that's ok"];
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
//// [tests/cases/conformance/expressions/propertyAccess/propertyAccessStringIndexSignature.ts] ////
|
||||
|
||||
//// [propertyAccessStringIndexSignature.ts]
|
||||
interface Flags { [name: string]: boolean };
|
||||
let flags: Flags;
|
||||
flags.b;
|
||||
flags.f;
|
||||
flags.isNotNecessarilyNeverFalse;
|
||||
flags['this is fine'];
|
||||
|
||||
interface Empty { }
|
||||
let empty: Empty;
|
||||
empty.nope;
|
||||
empty["that's ok"];
|
||||
|
||||
|
||||
//// [propertyAccessStringIndexSignature.js]
|
||||
;
|
||||
var flags;
|
||||
flags.b;
|
||||
flags.f;
|
||||
flags.isNotNecessarilyNeverFalse;
|
||||
flags['this is fine'];
|
||||
var empty;
|
||||
empty.nope;
|
||||
empty["that's ok"];
|
||||
@ -1,42 +0,0 @@
|
||||
//// [tests/cases/conformance/expressions/propertyAccess/propertyAccessStringIndexSignature.ts] ////
|
||||
|
||||
=== propertyAccessStringIndexSignature.ts ===
|
||||
interface Flags { [name: string]: boolean };
|
||||
>Flags : Symbol(Flags, Decl(propertyAccessStringIndexSignature.ts, 0, 0))
|
||||
>name : Symbol(name, Decl(propertyAccessStringIndexSignature.ts, 0, 19))
|
||||
|
||||
let flags: Flags;
|
||||
>flags : Symbol(flags, Decl(propertyAccessStringIndexSignature.ts, 1, 3))
|
||||
>Flags : Symbol(Flags, Decl(propertyAccessStringIndexSignature.ts, 0, 0))
|
||||
|
||||
flags.b;
|
||||
>flags.b : Symbol(Flags.__index, Decl(propertyAccessStringIndexSignature.ts, 0, 17))
|
||||
>flags : Symbol(flags, Decl(propertyAccessStringIndexSignature.ts, 1, 3))
|
||||
>b : Symbol(Flags.__index, Decl(propertyAccessStringIndexSignature.ts, 0, 17))
|
||||
|
||||
flags.f;
|
||||
>flags.f : Symbol(Flags.__index, Decl(propertyAccessStringIndexSignature.ts, 0, 17))
|
||||
>flags : Symbol(flags, Decl(propertyAccessStringIndexSignature.ts, 1, 3))
|
||||
>f : Symbol(Flags.__index, Decl(propertyAccessStringIndexSignature.ts, 0, 17))
|
||||
|
||||
flags.isNotNecessarilyNeverFalse;
|
||||
>flags.isNotNecessarilyNeverFalse : Symbol(Flags.__index, Decl(propertyAccessStringIndexSignature.ts, 0, 17))
|
||||
>flags : Symbol(flags, Decl(propertyAccessStringIndexSignature.ts, 1, 3))
|
||||
>isNotNecessarilyNeverFalse : Symbol(Flags.__index, Decl(propertyAccessStringIndexSignature.ts, 0, 17))
|
||||
|
||||
flags['this is fine'];
|
||||
>flags : Symbol(flags, Decl(propertyAccessStringIndexSignature.ts, 1, 3))
|
||||
|
||||
interface Empty { }
|
||||
>Empty : Symbol(Empty, Decl(propertyAccessStringIndexSignature.ts, 5, 22))
|
||||
|
||||
let empty: Empty;
|
||||
>empty : Symbol(empty, Decl(propertyAccessStringIndexSignature.ts, 8, 3))
|
||||
>Empty : Symbol(Empty, Decl(propertyAccessStringIndexSignature.ts, 5, 22))
|
||||
|
||||
empty.nope;
|
||||
>empty : Symbol(empty, Decl(propertyAccessStringIndexSignature.ts, 8, 3))
|
||||
|
||||
empty["that's ok"];
|
||||
>empty : Symbol(empty, Decl(propertyAccessStringIndexSignature.ts, 8, 3))
|
||||
|
||||
@ -1,64 +0,0 @@
|
||||
//// [tests/cases/conformance/expressions/propertyAccess/propertyAccessStringIndexSignature.ts] ////
|
||||
|
||||
=== propertyAccessStringIndexSignature.ts ===
|
||||
interface Flags { [name: string]: boolean };
|
||||
>name : string
|
||||
> : ^^^^^^
|
||||
|
||||
let flags: Flags;
|
||||
>flags : Flags
|
||||
> : ^^^^^
|
||||
|
||||
flags.b;
|
||||
>flags.b : boolean
|
||||
> : ^^^^^^^
|
||||
>flags : Flags
|
||||
> : ^^^^^
|
||||
>b : boolean
|
||||
> : ^^^^^^^
|
||||
|
||||
flags.f;
|
||||
>flags.f : boolean
|
||||
> : ^^^^^^^
|
||||
>flags : Flags
|
||||
> : ^^^^^
|
||||
>f : boolean
|
||||
> : ^^^^^^^
|
||||
|
||||
flags.isNotNecessarilyNeverFalse;
|
||||
>flags.isNotNecessarilyNeverFalse : boolean
|
||||
> : ^^^^^^^
|
||||
>flags : Flags
|
||||
> : ^^^^^
|
||||
>isNotNecessarilyNeverFalse : boolean
|
||||
> : ^^^^^^^
|
||||
|
||||
flags['this is fine'];
|
||||
>flags['this is fine'] : boolean
|
||||
> : ^^^^^^^
|
||||
>flags : Flags
|
||||
> : ^^^^^
|
||||
>'this is fine' : "this is fine"
|
||||
> : ^^^^^^^^^^^^^^
|
||||
|
||||
interface Empty { }
|
||||
let empty: Empty;
|
||||
>empty : Empty
|
||||
> : ^^^^^
|
||||
|
||||
empty.nope;
|
||||
>empty.nope : any
|
||||
> : ^^^
|
||||
>empty : Empty
|
||||
> : ^^^^^
|
||||
>nope : any
|
||||
> : ^^^
|
||||
|
||||
empty["that's ok"];
|
||||
>empty["that's ok"] : any
|
||||
> : ^^^
|
||||
>empty : Empty
|
||||
> : ^^^^^
|
||||
>"that's ok" : "that's ok"
|
||||
> : ^^^^^^^^^^^
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
propertyAccessStringIndexSignatureNoImplicitAny.ts(10,7): error TS2339: Property 'nope' does not exist on type 'Empty'.
|
||||
propertyAccessStringIndexSignatureNoImplicitAny.ts(11,1): error TS7053: Element implicitly has an 'any' type because expression of type '"not allowed either"' can't be used to index type 'Empty'.
|
||||
Property 'not allowed either' does not exist on type 'Empty'.
|
||||
|
||||
|
||||
==== propertyAccessStringIndexSignatureNoImplicitAny.ts (2 errors) ====
|
||||
interface Flags { [name: string]: boolean }
|
||||
let flags: Flags;
|
||||
flags.b;
|
||||
flags.f;
|
||||
flags.isNotNecessarilyNeverFalse;
|
||||
flags['this is fine'];
|
||||
|
||||
interface Empty { }
|
||||
let empty: Empty;
|
||||
empty.nope;
|
||||
~~~~
|
||||
!!! error TS2339: Property 'nope' does not exist on type 'Empty'.
|
||||
empty["not allowed either"];
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS7053: Element implicitly has an 'any' type because expression of type '"not allowed either"' can't be used to index type 'Empty'.
|
||||
!!! error TS7053: Property 'not allowed either' does not exist on type 'Empty'.
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
//// [tests/cases/conformance/expressions/propertyAccess/propertyAccessStringIndexSignatureNoImplicitAny.ts] ////
|
||||
|
||||
//// [propertyAccessStringIndexSignatureNoImplicitAny.ts]
|
||||
interface Flags { [name: string]: boolean }
|
||||
let flags: Flags;
|
||||
flags.b;
|
||||
flags.f;
|
||||
flags.isNotNecessarilyNeverFalse;
|
||||
flags['this is fine'];
|
||||
|
||||
interface Empty { }
|
||||
let empty: Empty;
|
||||
empty.nope;
|
||||
empty["not allowed either"];
|
||||
|
||||
|
||||
//// [propertyAccessStringIndexSignatureNoImplicitAny.js]
|
||||
var flags;
|
||||
flags.b;
|
||||
flags.f;
|
||||
flags.isNotNecessarilyNeverFalse;
|
||||
flags['this is fine'];
|
||||
var empty;
|
||||
empty.nope;
|
||||
empty["not allowed either"];
|
||||
@ -1,42 +0,0 @@
|
||||
//// [tests/cases/conformance/expressions/propertyAccess/propertyAccessStringIndexSignatureNoImplicitAny.ts] ////
|
||||
|
||||
=== propertyAccessStringIndexSignatureNoImplicitAny.ts ===
|
||||
interface Flags { [name: string]: boolean }
|
||||
>Flags : Symbol(Flags, Decl(propertyAccessStringIndexSignatureNoImplicitAny.ts, 0, 0))
|
||||
>name : Symbol(name, Decl(propertyAccessStringIndexSignatureNoImplicitAny.ts, 0, 19))
|
||||
|
||||
let flags: Flags;
|
||||
>flags : Symbol(flags, Decl(propertyAccessStringIndexSignatureNoImplicitAny.ts, 1, 3))
|
||||
>Flags : Symbol(Flags, Decl(propertyAccessStringIndexSignatureNoImplicitAny.ts, 0, 0))
|
||||
|
||||
flags.b;
|
||||
>flags.b : Symbol(Flags.__index, Decl(propertyAccessStringIndexSignatureNoImplicitAny.ts, 0, 17))
|
||||
>flags : Symbol(flags, Decl(propertyAccessStringIndexSignatureNoImplicitAny.ts, 1, 3))
|
||||
>b : Symbol(Flags.__index, Decl(propertyAccessStringIndexSignatureNoImplicitAny.ts, 0, 17))
|
||||
|
||||
flags.f;
|
||||
>flags.f : Symbol(Flags.__index, Decl(propertyAccessStringIndexSignatureNoImplicitAny.ts, 0, 17))
|
||||
>flags : Symbol(flags, Decl(propertyAccessStringIndexSignatureNoImplicitAny.ts, 1, 3))
|
||||
>f : Symbol(Flags.__index, Decl(propertyAccessStringIndexSignatureNoImplicitAny.ts, 0, 17))
|
||||
|
||||
flags.isNotNecessarilyNeverFalse;
|
||||
>flags.isNotNecessarilyNeverFalse : Symbol(Flags.__index, Decl(propertyAccessStringIndexSignatureNoImplicitAny.ts, 0, 17))
|
||||
>flags : Symbol(flags, Decl(propertyAccessStringIndexSignatureNoImplicitAny.ts, 1, 3))
|
||||
>isNotNecessarilyNeverFalse : Symbol(Flags.__index, Decl(propertyAccessStringIndexSignatureNoImplicitAny.ts, 0, 17))
|
||||
|
||||
flags['this is fine'];
|
||||
>flags : Symbol(flags, Decl(propertyAccessStringIndexSignatureNoImplicitAny.ts, 1, 3))
|
||||
|
||||
interface Empty { }
|
||||
>Empty : Symbol(Empty, Decl(propertyAccessStringIndexSignatureNoImplicitAny.ts, 5, 22))
|
||||
|
||||
let empty: Empty;
|
||||
>empty : Symbol(empty, Decl(propertyAccessStringIndexSignatureNoImplicitAny.ts, 8, 3))
|
||||
>Empty : Symbol(Empty, Decl(propertyAccessStringIndexSignatureNoImplicitAny.ts, 5, 22))
|
||||
|
||||
empty.nope;
|
||||
>empty : Symbol(empty, Decl(propertyAccessStringIndexSignatureNoImplicitAny.ts, 8, 3))
|
||||
|
||||
empty["not allowed either"];
|
||||
>empty : Symbol(empty, Decl(propertyAccessStringIndexSignatureNoImplicitAny.ts, 8, 3))
|
||||
|
||||
@ -1,64 +0,0 @@
|
||||
//// [tests/cases/conformance/expressions/propertyAccess/propertyAccessStringIndexSignatureNoImplicitAny.ts] ////
|
||||
|
||||
=== propertyAccessStringIndexSignatureNoImplicitAny.ts ===
|
||||
interface Flags { [name: string]: boolean }
|
||||
>name : string
|
||||
> : ^^^^^^
|
||||
|
||||
let flags: Flags;
|
||||
>flags : Flags
|
||||
> : ^^^^^
|
||||
|
||||
flags.b;
|
||||
>flags.b : boolean
|
||||
> : ^^^^^^^
|
||||
>flags : Flags
|
||||
> : ^^^^^
|
||||
>b : boolean
|
||||
> : ^^^^^^^
|
||||
|
||||
flags.f;
|
||||
>flags.f : boolean
|
||||
> : ^^^^^^^
|
||||
>flags : Flags
|
||||
> : ^^^^^
|
||||
>f : boolean
|
||||
> : ^^^^^^^
|
||||
|
||||
flags.isNotNecessarilyNeverFalse;
|
||||
>flags.isNotNecessarilyNeverFalse : boolean
|
||||
> : ^^^^^^^
|
||||
>flags : Flags
|
||||
> : ^^^^^
|
||||
>isNotNecessarilyNeverFalse : boolean
|
||||
> : ^^^^^^^
|
||||
|
||||
flags['this is fine'];
|
||||
>flags['this is fine'] : boolean
|
||||
> : ^^^^^^^
|
||||
>flags : Flags
|
||||
> : ^^^^^
|
||||
>'this is fine' : "this is fine"
|
||||
> : ^^^^^^^^^^^^^^
|
||||
|
||||
interface Empty { }
|
||||
let empty: Empty;
|
||||
>empty : Empty
|
||||
> : ^^^^^
|
||||
|
||||
empty.nope;
|
||||
>empty.nope : any
|
||||
> : ^^^
|
||||
>empty : Empty
|
||||
> : ^^^^^
|
||||
>nope : any
|
||||
> : ^^^
|
||||
|
||||
empty["not allowed either"];
|
||||
>empty["not allowed either"] : any
|
||||
> : ^^^
|
||||
>empty : Empty
|
||||
> : ^^^^^
|
||||
>"not allowed either" : "not allowed either"
|
||||
> : ^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
protectedMembers.ts(4,24): error TS1255: A definite assignment assertion '!' is not permitted in this context.
|
||||
protectedMembers.ts(26,14): error TS1255: A definite assignment assertion '!' is not permitted in this context.
|
||||
protectedMembers.ts(40,4): error TS2445: Property 'x' is protected and only accessible within class 'C1' and its subclasses.
|
||||
protectedMembers.ts(41,4): error TS2445: Property 'f' is protected and only accessible within class 'C1' and its subclasses.
|
||||
protectedMembers.ts(42,4): error TS2445: Property 'sx' is protected and only accessible within class 'C1' and its subclasses.
|
||||
@ -18,13 +16,11 @@ protectedMembers.ts(111,7): error TS2415: Class 'B3' incorrectly extends base cl
|
||||
Property 'x' is protected in type 'B3' but public in type 'A3'.
|
||||
|
||||
|
||||
==== protectedMembers.ts (15 errors) ====
|
||||
==== protectedMembers.ts (13 errors) ====
|
||||
// Class with protected members
|
||||
class C1 {
|
||||
protected x!: number;
|
||||
protected static sx!: number;
|
||||
~
|
||||
!!! error TS1255: A definite assignment assertion '!' is not permitted in this context.
|
||||
protected static sx: number;
|
||||
protected f() {
|
||||
return this.x;
|
||||
}
|
||||
@ -46,9 +42,7 @@ protectedMembers.ts(111,7): error TS2415: Class 'B3' incorrectly extends base cl
|
||||
// Derived class making protected members public
|
||||
class C3 extends C2 {
|
||||
x!: number;
|
||||
static sx!: number;
|
||||
~
|
||||
!!! error TS1255: A definite assignment assertion '!' is not permitted in this context.
|
||||
static sx: number
|
||||
f() {
|
||||
return super.f();
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
// Class with protected members
|
||||
class C1 {
|
||||
protected x!: number;
|
||||
protected static sx!: number;
|
||||
protected static sx: number;
|
||||
protected f() {
|
||||
return this.x;
|
||||
}
|
||||
@ -26,7 +26,7 @@ class C2 extends C1 {
|
||||
// Derived class making protected members public
|
||||
class C3 extends C2 {
|
||||
x!: number;
|
||||
static sx!: number;
|
||||
static sx: number
|
||||
f() {
|
||||
return super.f();
|
||||
}
|
||||
|
||||
@ -8,11 +8,11 @@ class C1 {
|
||||
protected x!: number;
|
||||
>x : Symbol(C1.x, Decl(protectedMembers.ts, 1, 10))
|
||||
|
||||
protected static sx!: number;
|
||||
protected static sx: number;
|
||||
>sx : Symbol(C1.sx, Decl(protectedMembers.ts, 2, 25))
|
||||
|
||||
protected f() {
|
||||
>f : Symbol(C1.f, Decl(protectedMembers.ts, 3, 33))
|
||||
>f : Symbol(C1.f, Decl(protectedMembers.ts, 3, 32))
|
||||
|
||||
return this.x;
|
||||
>this.x : Symbol(C1.x, Decl(protectedMembers.ts, 1, 10))
|
||||
@ -38,9 +38,9 @@ class C2 extends C1 {
|
||||
>f : Symbol(C2.f, Decl(protectedMembers.ts, 13, 21))
|
||||
|
||||
return super.f() + this.x;
|
||||
>super.f : Symbol(C1.f, Decl(protectedMembers.ts, 3, 33))
|
||||
>super.f : Symbol(C1.f, Decl(protectedMembers.ts, 3, 32))
|
||||
>super : Symbol(C1, Decl(protectedMembers.ts, 0, 0))
|
||||
>f : Symbol(C1.f, Decl(protectedMembers.ts, 3, 33))
|
||||
>f : Symbol(C1.f, Decl(protectedMembers.ts, 3, 32))
|
||||
>this.x : Symbol(C1.x, Decl(protectedMembers.ts, 1, 10))
|
||||
>this : Symbol(C2, Decl(protectedMembers.ts, 10, 1))
|
||||
>x : Symbol(C1.x, Decl(protectedMembers.ts, 1, 10))
|
||||
@ -66,11 +66,11 @@ class C3 extends C2 {
|
||||
x!: number;
|
||||
>x : Symbol(C3.x, Decl(protectedMembers.ts, 23, 21))
|
||||
|
||||
static sx!: number;
|
||||
static sx: number
|
||||
>sx : Symbol(C3.sx, Decl(protectedMembers.ts, 24, 15))
|
||||
|
||||
f() {
|
||||
>f : Symbol(C3.f, Decl(protectedMembers.ts, 25, 23))
|
||||
>f : Symbol(C3.f, Decl(protectedMembers.ts, 25, 21))
|
||||
|
||||
return super.f();
|
||||
>super.f : Symbol(C2.f, Decl(protectedMembers.ts, 13, 21))
|
||||
@ -106,9 +106,9 @@ c1.x;
|
||||
>x : Symbol(C1.x, Decl(protectedMembers.ts, 1, 10))
|
||||
|
||||
c1.f();
|
||||
>c1.f : Symbol(C1.f, Decl(protectedMembers.ts, 3, 33))
|
||||
>c1.f : Symbol(C1.f, Decl(protectedMembers.ts, 3, 32))
|
||||
>c1 : Symbol(c1, Decl(protectedMembers.ts, 34, 11))
|
||||
>f : Symbol(C1.f, Decl(protectedMembers.ts, 3, 33))
|
||||
>f : Symbol(C1.f, Decl(protectedMembers.ts, 3, 32))
|
||||
|
||||
C1.sx;
|
||||
>C1.sx : Symbol(C1.sx, Decl(protectedMembers.ts, 2, 25))
|
||||
@ -148,9 +148,9 @@ c3.x;
|
||||
>x : Symbol(C3.x, Decl(protectedMembers.ts, 23, 21))
|
||||
|
||||
c3.f();
|
||||
>c3.f : Symbol(C3.f, Decl(protectedMembers.ts, 25, 23))
|
||||
>c3.f : Symbol(C3.f, Decl(protectedMembers.ts, 25, 21))
|
||||
>c3 : Symbol(c3, Decl(protectedMembers.ts, 36, 11))
|
||||
>f : Symbol(C3.f, Decl(protectedMembers.ts, 25, 23))
|
||||
>f : Symbol(C3.f, Decl(protectedMembers.ts, 25, 21))
|
||||
|
||||
C3.sx;
|
||||
>C3.sx : Symbol(C3.sx, Decl(protectedMembers.ts, 24, 15))
|
||||
|
||||
@ -10,7 +10,7 @@ class C1 {
|
||||
>x : number
|
||||
> : ^^^^^^
|
||||
|
||||
protected static sx!: number;
|
||||
protected static sx: number;
|
||||
>sx : number
|
||||
> : ^^^^^^
|
||||
|
||||
@ -104,7 +104,7 @@ class C3 extends C2 {
|
||||
>x : number
|
||||
> : ^^^^^^
|
||||
|
||||
static sx!: number;
|
||||
static sx: number
|
||||
>sx : number
|
||||
> : ^^^^^^
|
||||
|
||||
|
||||
@ -8,21 +8,13 @@ typeArgumentInferenceConstructSignatures.ts(71,39): error TS2345: Argument of ty
|
||||
typeArgumentInferenceConstructSignatures.ts(81,45): error TS2345: Argument of type '(n: string) => string' is not assignable to parameter of type '(b: number) => number'.
|
||||
Types of parameters 'n' and 'b' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
typeArgumentInferenceConstructSignatures.ts(98,17): error TS1039: Initializers are not allowed in ambient contexts.
|
||||
typeArgumentInferenceConstructSignatures.ts(106,19): error TS1039: Initializers are not allowed in ambient contexts.
|
||||
typeArgumentInferenceConstructSignatures.ts(106,41): error TS2345: Argument of type '0' is not assignable to parameter of type '""'.
|
||||
typeArgumentInferenceConstructSignatures.ts(106,33): error TS2345: Argument of type '0' is not assignable to parameter of type '""'.
|
||||
typeArgumentInferenceConstructSignatures.ts(107,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'a9a' must be of type 'string', but here has type '{}'.
|
||||
typeArgumentInferenceConstructSignatures.ts(108,19): error TS1039: Initializers are not allowed in ambient contexts.
|
||||
typeArgumentInferenceConstructSignatures.ts(120,19): error TS1039: Initializers are not allowed in ambient contexts.
|
||||
typeArgumentInferenceConstructSignatures.ts(121,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' must be of type '{ x: number; z: Window & typeof globalThis; y?: undefined; } | { x: number; y: string; z?: undefined; }', but here has type '{}'.
|
||||
typeArgumentInferenceConstructSignatures.ts(122,19): error TS1039: Initializers are not allowed in ambient contexts.
|
||||
typeArgumentInferenceConstructSignatures.ts(122,82): error TS2353: Object literal may only specify known properties, and 'y' does not exist in type 'A92'.
|
||||
typeArgumentInferenceConstructSignatures.ts(126,19): error TS1039: Initializers are not allowed in ambient contexts.
|
||||
typeArgumentInferenceConstructSignatures.ts(131,17): error TS1039: Initializers are not allowed in ambient contexts.
|
||||
typeArgumentInferenceConstructSignatures.ts(135,19): error TS1039: Initializers are not allowed in ambient contexts.
|
||||
typeArgumentInferenceConstructSignatures.ts(122,74): error TS2353: Object literal may only specify known properties, and 'y' does not exist in type 'A92'.
|
||||
|
||||
|
||||
==== typeArgumentInferenceConstructSignatures.ts (16 errors) ====
|
||||
==== typeArgumentInferenceConstructSignatures.ts (8 errors) ====
|
||||
// Generic call with no parameters
|
||||
interface NoParams {
|
||||
new <T>();
|
||||
@ -134,9 +126,7 @@ typeArgumentInferenceConstructSignatures.ts(135,19): error TS1039: Initializers
|
||||
new <T>(n: T): T;
|
||||
}
|
||||
declare var someGenerics8: someGenerics8;
|
||||
declare var x = new someGenerics8(someGenerics7);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1039: Initializers are not allowed in ambient contexts.
|
||||
var x = new someGenerics8(someGenerics7);
|
||||
new x<string, string, string>(null, null, null);
|
||||
|
||||
// Generic call with multiple parameters of generic type passed arguments with no best common type
|
||||
@ -144,18 +134,14 @@ typeArgumentInferenceConstructSignatures.ts(135,19): error TS1039: Initializers
|
||||
new <T>(a: T, b: T, c: T): T;
|
||||
}
|
||||
declare var someGenerics9: someGenerics9;
|
||||
declare var a9a = new someGenerics9('', 0, []);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1039: Initializers are not allowed in ambient contexts.
|
||||
~
|
||||
var a9a = new someGenerics9('', 0, []);
|
||||
~
|
||||
!!! error TS2345: Argument of type '0' is not assignable to parameter of type '""'.
|
||||
declare var a9a: {};
|
||||
~~~
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a9a' must be of type 'string', but here has type '{}'.
|
||||
!!! related TS6203 typeArgumentInferenceConstructSignatures.ts:106:13: 'a9a' was also declared here.
|
||||
declare var a9b = new someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1039: Initializers are not allowed in ambient contexts.
|
||||
!!! related TS6203 typeArgumentInferenceConstructSignatures.ts:106:5: 'a9a' was also declared here.
|
||||
var a9b = new someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null);
|
||||
declare var a9b: { a?: number; b?: string; };
|
||||
|
||||
// Generic call with multiple parameters of generic type passed arguments with multiple best common types
|
||||
@ -167,37 +153,27 @@ typeArgumentInferenceConstructSignatures.ts(135,19): error TS1039: Initializers
|
||||
x: number;
|
||||
z?: Window;
|
||||
}
|
||||
declare var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1039: Initializers are not allowed in ambient contexts.
|
||||
var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
declare var a9e: {};
|
||||
~~~
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' must be of type '{ x: number; z: Window & typeof globalThis; y?: undefined; } | { x: number; y: string; z?: undefined; }', but here has type '{}'.
|
||||
!!! related TS6203 typeArgumentInferenceConstructSignatures.ts:120:13: 'a9e' was also declared here.
|
||||
declare var a9f = new someGenerics9<A92>(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1039: Initializers are not allowed in ambient contexts.
|
||||
~
|
||||
!!! related TS6203 typeArgumentInferenceConstructSignatures.ts:120:5: 'a9e' was also declared here.
|
||||
var a9f = new someGenerics9<A92>(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
~
|
||||
!!! error TS2353: Object literal may only specify known properties, and 'y' does not exist in type 'A92'.
|
||||
declare var a9f: A92;
|
||||
|
||||
// Generic call with multiple parameters of generic type passed arguments with a single best common type
|
||||
declare var a9d = new someGenerics9({ x: 3 }, { x: 6 }, { x: 6 });
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1039: Initializers are not allowed in ambient contexts.
|
||||
var a9d = new someGenerics9({ x: 3 }, { x: 6 }, { x: 6 });
|
||||
declare var a9d: { x: number; };
|
||||
|
||||
// Generic call with multiple parameters of generic type where one argument is of type 'any'
|
||||
declare var anyVar: any;
|
||||
declare var a = new someGenerics9(7, anyVar, 4);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1039: Initializers are not allowed in ambient contexts.
|
||||
var a = new someGenerics9(7, anyVar, 4);
|
||||
declare var a: any;
|
||||
|
||||
// Generic call with multiple parameters of generic type where one argument is [] and the other is not 'any'
|
||||
declare var arr = new someGenerics9([], null, undefined);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1039: Initializers are not allowed in ambient contexts.
|
||||
var arr = new someGenerics9([], null, undefined);
|
||||
declare var arr: any[];
|
||||
|
||||
|
||||
@ -98,7 +98,7 @@ interface someGenerics8 {
|
||||
new <T>(n: T): T;
|
||||
}
|
||||
declare var someGenerics8: someGenerics8;
|
||||
declare var x = new someGenerics8(someGenerics7);
|
||||
var x = new someGenerics8(someGenerics7);
|
||||
new x<string, string, string>(null, null, null);
|
||||
|
||||
// Generic call with multiple parameters of generic type passed arguments with no best common type
|
||||
@ -106,9 +106,9 @@ interface someGenerics9 {
|
||||
new <T>(a: T, b: T, c: T): T;
|
||||
}
|
||||
declare var someGenerics9: someGenerics9;
|
||||
declare var a9a = new someGenerics9('', 0, []);
|
||||
var a9a = new someGenerics9('', 0, []);
|
||||
declare var a9a: {};
|
||||
declare var a9b = new someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null);
|
||||
var a9b = new someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null);
|
||||
declare var a9b: { a?: number; b?: string; };
|
||||
|
||||
// Generic call with multiple parameters of generic type passed arguments with multiple best common types
|
||||
@ -120,22 +120,22 @@ interface A92 {
|
||||
x: number;
|
||||
z?: Window;
|
||||
}
|
||||
declare var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
declare var a9e: {};
|
||||
declare var a9f = new someGenerics9<A92>(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
var a9f = new someGenerics9<A92>(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
declare var a9f: A92;
|
||||
|
||||
// Generic call with multiple parameters of generic type passed arguments with a single best common type
|
||||
declare var a9d = new someGenerics9({ x: 3 }, { x: 6 }, { x: 6 });
|
||||
var a9d = new someGenerics9({ x: 3 }, { x: 6 }, { x: 6 });
|
||||
declare var a9d: { x: number; };
|
||||
|
||||
// Generic call with multiple parameters of generic type where one argument is of type 'any'
|
||||
declare var anyVar: any;
|
||||
declare var a = new someGenerics9(7, anyVar, 4);
|
||||
var a = new someGenerics9(7, anyVar, 4);
|
||||
declare var a: any;
|
||||
|
||||
// Generic call with multiple parameters of generic type where one argument is [] and the other is not 'any'
|
||||
declare var arr = new someGenerics9([], null, undefined);
|
||||
var arr = new someGenerics9([], null, undefined);
|
||||
declare var arr: any[];
|
||||
|
||||
|
||||
@ -174,4 +174,14 @@ new someGenerics6(function (n) { return n; }, function (n) { return n; }, functi
|
||||
new someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; });
|
||||
new someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; });
|
||||
new someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; });
|
||||
var x = new someGenerics8(someGenerics7);
|
||||
new x(null, null, null);
|
||||
var a9a = new someGenerics9('', 0, []);
|
||||
var a9b = new someGenerics9({ a: 0 }, { b: '' }, null);
|
||||
var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
var a9f = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
// Generic call with multiple parameters of generic type passed arguments with a single best common type
|
||||
var a9d = new someGenerics9({ x: 3 }, { x: 6 }, { x: 6 });
|
||||
var a = new someGenerics9(7, anyVar, 4);
|
||||
// Generic call with multiple parameters of generic type where one argument is [] and the other is not 'any'
|
||||
var arr = new someGenerics9([], null, undefined);
|
||||
|
||||
@ -344,13 +344,13 @@ declare var someGenerics8: someGenerics8;
|
||||
>someGenerics8 : Symbol(someGenerics8, Decl(typeArgumentInferenceConstructSignatures.ts, 90, 96), Decl(typeArgumentInferenceConstructSignatures.ts, 96, 11))
|
||||
>someGenerics8 : Symbol(someGenerics8, Decl(typeArgumentInferenceConstructSignatures.ts, 90, 96), Decl(typeArgumentInferenceConstructSignatures.ts, 96, 11))
|
||||
|
||||
declare var x = new someGenerics8(someGenerics7);
|
||||
>x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 97, 11))
|
||||
var x = new someGenerics8(someGenerics7);
|
||||
>x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 97, 3))
|
||||
>someGenerics8 : Symbol(someGenerics8, Decl(typeArgumentInferenceConstructSignatures.ts, 90, 96), Decl(typeArgumentInferenceConstructSignatures.ts, 96, 11))
|
||||
>someGenerics7 : Symbol(someGenerics7, Decl(typeArgumentInferenceConstructSignatures.ts, 81, 80), Decl(typeArgumentInferenceConstructSignatures.ts, 87, 11))
|
||||
|
||||
new x<string, string, string>(null, null, null);
|
||||
>x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 97, 11))
|
||||
>x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 97, 3))
|
||||
|
||||
// Generic call with multiple parameters of generic type passed arguments with no best common type
|
||||
interface someGenerics9 {
|
||||
@ -370,23 +370,23 @@ declare var someGenerics9: someGenerics9;
|
||||
>someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 11))
|
||||
>someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 11))
|
||||
|
||||
declare var a9a = new someGenerics9('', 0, []);
|
||||
>a9a : Symbol(a9a, Decl(typeArgumentInferenceConstructSignatures.ts, 105, 11), Decl(typeArgumentInferenceConstructSignatures.ts, 106, 11))
|
||||
var a9a = new someGenerics9('', 0, []);
|
||||
>a9a : Symbol(a9a, Decl(typeArgumentInferenceConstructSignatures.ts, 105, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 106, 11))
|
||||
>someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 11))
|
||||
|
||||
declare var a9a: {};
|
||||
>a9a : Symbol(a9a, Decl(typeArgumentInferenceConstructSignatures.ts, 105, 11), Decl(typeArgumentInferenceConstructSignatures.ts, 106, 11))
|
||||
>a9a : Symbol(a9a, Decl(typeArgumentInferenceConstructSignatures.ts, 105, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 106, 11))
|
||||
|
||||
declare var a9b = new someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null);
|
||||
>a9b : Symbol(a9b, Decl(typeArgumentInferenceConstructSignatures.ts, 107, 11), Decl(typeArgumentInferenceConstructSignatures.ts, 108, 11))
|
||||
var a9b = new someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null);
|
||||
>a9b : Symbol(a9b, Decl(typeArgumentInferenceConstructSignatures.ts, 107, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 108, 11))
|
||||
>someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 11))
|
||||
>a : Symbol(a, Decl(typeArgumentInferenceConstructSignatures.ts, 107, 37))
|
||||
>b : Symbol(b, Decl(typeArgumentInferenceConstructSignatures.ts, 107, 49))
|
||||
>a : Symbol(a, Decl(typeArgumentInferenceConstructSignatures.ts, 107, 66))
|
||||
>b : Symbol(b, Decl(typeArgumentInferenceConstructSignatures.ts, 107, 76))
|
||||
>a : Symbol(a, Decl(typeArgumentInferenceConstructSignatures.ts, 107, 29))
|
||||
>b : Symbol(b, Decl(typeArgumentInferenceConstructSignatures.ts, 107, 41))
|
||||
>a : Symbol(a, Decl(typeArgumentInferenceConstructSignatures.ts, 107, 58))
|
||||
>b : Symbol(b, Decl(typeArgumentInferenceConstructSignatures.ts, 107, 68))
|
||||
|
||||
declare var a9b: { a?: number; b?: string; };
|
||||
>a9b : Symbol(a9b, Decl(typeArgumentInferenceConstructSignatures.ts, 107, 11), Decl(typeArgumentInferenceConstructSignatures.ts, 108, 11))
|
||||
>a9b : Symbol(a9b, Decl(typeArgumentInferenceConstructSignatures.ts, 107, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 108, 11))
|
||||
>a : Symbol(a, Decl(typeArgumentInferenceConstructSignatures.ts, 108, 18))
|
||||
>b : Symbol(b, Decl(typeArgumentInferenceConstructSignatures.ts, 108, 30))
|
||||
|
||||
@ -410,65 +410,65 @@ interface A92 {
|
||||
>z : Symbol(A92.z, Decl(typeArgumentInferenceConstructSignatures.ts, 116, 14))
|
||||
>Window : Symbol(Window, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
}
|
||||
declare var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
>a9e : Symbol(a9e, Decl(typeArgumentInferenceConstructSignatures.ts, 119, 11), Decl(typeArgumentInferenceConstructSignatures.ts, 120, 11))
|
||||
var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
>a9e : Symbol(a9e, Decl(typeArgumentInferenceConstructSignatures.ts, 119, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 120, 11))
|
||||
>someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 11))
|
||||
>undefined : Symbol(undefined)
|
||||
>x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 119, 48))
|
||||
>z : Symbol(z, Decl(typeArgumentInferenceConstructSignatures.ts, 119, 54))
|
||||
>x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 119, 40))
|
||||
>z : Symbol(z, Decl(typeArgumentInferenceConstructSignatures.ts, 119, 46))
|
||||
>window : Symbol(window, Decl(lib.dom.d.ts, --, --))
|
||||
>x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 119, 69))
|
||||
>y : Symbol(y, Decl(typeArgumentInferenceConstructSignatures.ts, 119, 75))
|
||||
>x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 119, 61))
|
||||
>y : Symbol(y, Decl(typeArgumentInferenceConstructSignatures.ts, 119, 67))
|
||||
|
||||
declare var a9e: {};
|
||||
>a9e : Symbol(a9e, Decl(typeArgumentInferenceConstructSignatures.ts, 119, 11), Decl(typeArgumentInferenceConstructSignatures.ts, 120, 11))
|
||||
>a9e : Symbol(a9e, Decl(typeArgumentInferenceConstructSignatures.ts, 119, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 120, 11))
|
||||
|
||||
declare var a9f = new someGenerics9<A92>(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
>a9f : Symbol(a9f, Decl(typeArgumentInferenceConstructSignatures.ts, 121, 11), Decl(typeArgumentInferenceConstructSignatures.ts, 122, 11))
|
||||
var a9f = new someGenerics9<A92>(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
>a9f : Symbol(a9f, Decl(typeArgumentInferenceConstructSignatures.ts, 121, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 122, 11))
|
||||
>someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 11))
|
||||
>A92 : Symbol(A92, Decl(typeArgumentInferenceConstructSignatures.ts, 114, 1))
|
||||
>undefined : Symbol(undefined)
|
||||
>x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 121, 53))
|
||||
>z : Symbol(z, Decl(typeArgumentInferenceConstructSignatures.ts, 121, 59))
|
||||
>x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 121, 45))
|
||||
>z : Symbol(z, Decl(typeArgumentInferenceConstructSignatures.ts, 121, 51))
|
||||
>window : Symbol(window, Decl(lib.dom.d.ts, --, --))
|
||||
>x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 121, 74))
|
||||
>y : Symbol(y, Decl(typeArgumentInferenceConstructSignatures.ts, 121, 80))
|
||||
>x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 121, 66))
|
||||
>y : Symbol(y, Decl(typeArgumentInferenceConstructSignatures.ts, 121, 72))
|
||||
|
||||
declare var a9f: A92;
|
||||
>a9f : Symbol(a9f, Decl(typeArgumentInferenceConstructSignatures.ts, 121, 11), Decl(typeArgumentInferenceConstructSignatures.ts, 122, 11))
|
||||
>a9f : Symbol(a9f, Decl(typeArgumentInferenceConstructSignatures.ts, 121, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 122, 11))
|
||||
>A92 : Symbol(A92, Decl(typeArgumentInferenceConstructSignatures.ts, 114, 1))
|
||||
|
||||
// Generic call with multiple parameters of generic type passed arguments with a single best common type
|
||||
declare var a9d = new someGenerics9({ x: 3 }, { x: 6 }, { x: 6 });
|
||||
>a9d : Symbol(a9d, Decl(typeArgumentInferenceConstructSignatures.ts, 125, 11), Decl(typeArgumentInferenceConstructSignatures.ts, 126, 11))
|
||||
var a9d = new someGenerics9({ x: 3 }, { x: 6 }, { x: 6 });
|
||||
>a9d : Symbol(a9d, Decl(typeArgumentInferenceConstructSignatures.ts, 125, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 126, 11))
|
||||
>someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 11))
|
||||
>x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 125, 37))
|
||||
>x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 125, 47))
|
||||
>x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 125, 57))
|
||||
>x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 125, 29))
|
||||
>x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 125, 39))
|
||||
>x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 125, 49))
|
||||
|
||||
declare var a9d: { x: number; };
|
||||
>a9d : Symbol(a9d, Decl(typeArgumentInferenceConstructSignatures.ts, 125, 11), Decl(typeArgumentInferenceConstructSignatures.ts, 126, 11))
|
||||
>a9d : Symbol(a9d, Decl(typeArgumentInferenceConstructSignatures.ts, 125, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 126, 11))
|
||||
>x : Symbol(x, Decl(typeArgumentInferenceConstructSignatures.ts, 126, 18))
|
||||
|
||||
// Generic call with multiple parameters of generic type where one argument is of type 'any'
|
||||
declare var anyVar: any;
|
||||
>anyVar : Symbol(anyVar, Decl(typeArgumentInferenceConstructSignatures.ts, 129, 11))
|
||||
|
||||
declare var a = new someGenerics9(7, anyVar, 4);
|
||||
>a : Symbol(a, Decl(typeArgumentInferenceConstructSignatures.ts, 130, 11), Decl(typeArgumentInferenceConstructSignatures.ts, 131, 11))
|
||||
var a = new someGenerics9(7, anyVar, 4);
|
||||
>a : Symbol(a, Decl(typeArgumentInferenceConstructSignatures.ts, 130, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 131, 11))
|
||||
>someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 11))
|
||||
>anyVar : Symbol(anyVar, Decl(typeArgumentInferenceConstructSignatures.ts, 129, 11))
|
||||
|
||||
declare var a: any;
|
||||
>a : Symbol(a, Decl(typeArgumentInferenceConstructSignatures.ts, 130, 11), Decl(typeArgumentInferenceConstructSignatures.ts, 131, 11))
|
||||
>a : Symbol(a, Decl(typeArgumentInferenceConstructSignatures.ts, 130, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 131, 11))
|
||||
|
||||
// Generic call with multiple parameters of generic type where one argument is [] and the other is not 'any'
|
||||
declare var arr = new someGenerics9([], null, undefined);
|
||||
>arr : Symbol(arr, Decl(typeArgumentInferenceConstructSignatures.ts, 134, 11), Decl(typeArgumentInferenceConstructSignatures.ts, 135, 11))
|
||||
var arr = new someGenerics9([], null, undefined);
|
||||
>arr : Symbol(arr, Decl(typeArgumentInferenceConstructSignatures.ts, 134, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 135, 11))
|
||||
>someGenerics9 : Symbol(someGenerics9, Decl(typeArgumentInferenceConstructSignatures.ts, 98, 48), Decl(typeArgumentInferenceConstructSignatures.ts, 104, 11))
|
||||
>undefined : Symbol(undefined)
|
||||
|
||||
declare var arr: any[];
|
||||
>arr : Symbol(arr, Decl(typeArgumentInferenceConstructSignatures.ts, 134, 11), Decl(typeArgumentInferenceConstructSignatures.ts, 135, 11))
|
||||
>arr : Symbol(arr, Decl(typeArgumentInferenceConstructSignatures.ts, 134, 3), Decl(typeArgumentInferenceConstructSignatures.ts, 135, 11))
|
||||
|
||||
|
||||
|
||||
@ -596,7 +596,7 @@ declare var someGenerics8: someGenerics8;
|
||||
>someGenerics8 : someGenerics8
|
||||
> : ^^^^^^^^^^^^^
|
||||
|
||||
declare var x = new someGenerics8(someGenerics7);
|
||||
var x = new someGenerics8(someGenerics7);
|
||||
>x : someGenerics7
|
||||
> : ^^^^^^^^^^^^^
|
||||
>new someGenerics8(someGenerics7) : someGenerics7
|
||||
@ -626,7 +626,7 @@ declare var someGenerics9: someGenerics9;
|
||||
>someGenerics9 : someGenerics9
|
||||
> : ^^^^^^^^^^^^^
|
||||
|
||||
declare var a9a = new someGenerics9('', 0, []);
|
||||
var a9a = new someGenerics9('', 0, []);
|
||||
>a9a : string
|
||||
> : ^^^^^^
|
||||
>new someGenerics9('', 0, []) : ""
|
||||
@ -644,7 +644,7 @@ declare var a9a: {};
|
||||
>a9a : string
|
||||
> : ^^^^^^
|
||||
|
||||
declare var a9b = new someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null);
|
||||
var a9b = new someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null);
|
||||
>a9b : { a?: number; b?: string; }
|
||||
> : ^^^^^^ ^^^^^^ ^^^
|
||||
>new someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null) : { a?: number; b?: string; }
|
||||
@ -695,7 +695,7 @@ interface A92 {
|
||||
>z : Window
|
||||
> : ^^^^^^
|
||||
}
|
||||
declare var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
>a9e : { x: number; z: Window & typeof globalThis; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
>new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }) : { x: number; z: Window & typeof globalThis; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
@ -729,7 +729,7 @@ declare var a9e: {};
|
||||
>a9e : { x: number; z: Window & typeof globalThis; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
declare var a9f = new someGenerics9<A92>(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
var a9f = new someGenerics9<A92>(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
>a9f : A92
|
||||
> : ^^^
|
||||
>new someGenerics9<A92>(undefined, { x: 6, z: window }, { x: 6, y: '' }) : A92
|
||||
@ -764,7 +764,7 @@ declare var a9f: A92;
|
||||
> : ^^^
|
||||
|
||||
// Generic call with multiple parameters of generic type passed arguments with a single best common type
|
||||
declare var a9d = new someGenerics9({ x: 3 }, { x: 6 }, { x: 6 });
|
||||
var a9d = new someGenerics9({ x: 3 }, { x: 6 }, { x: 6 });
|
||||
>a9d : { x: number; }
|
||||
> : ^^^^^^^^^^^^^^
|
||||
>new someGenerics9({ x: 3 }, { x: 6 }, { x: 6 }) : { x: number; }
|
||||
@ -801,7 +801,7 @@ declare var anyVar: any;
|
||||
>anyVar : any
|
||||
> : ^^^
|
||||
|
||||
declare var a = new someGenerics9(7, anyVar, 4);
|
||||
var a = new someGenerics9(7, anyVar, 4);
|
||||
>a : any
|
||||
> : ^^^
|
||||
>new someGenerics9(7, anyVar, 4) : any
|
||||
@ -820,7 +820,7 @@ declare var a: any;
|
||||
> : ^^^
|
||||
|
||||
// Generic call with multiple parameters of generic type where one argument is [] and the other is not 'any'
|
||||
declare var arr = new someGenerics9([], null, undefined);
|
||||
var arr = new someGenerics9([], null, undefined);
|
||||
>arr : any[]
|
||||
> : ^^^^^
|
||||
>new someGenerics9([], null, undefined) : any[]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user