mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-07-02 14:48:32 -05:00
Accept new baselines
This commit is contained in:
@@ -4,11 +4,12 @@ tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclarati
|
||||
tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration10_es2017.ts(1,33): error TS2304: Cannot find name 'await'.
|
||||
tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration10_es2017.ts(1,38): error TS1005: ';' expected.
|
||||
tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration10_es2017.ts(1,39): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration10_es2017.ts(1,41): error TS2365: Operator '>' cannot be applied to types 'boolean' and '{}'.
|
||||
tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration10_es2017.ts(1,49): error TS2532: Object is possibly 'undefined'.
|
||||
tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration10_es2017.ts(1,53): error TS1109: Expression expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration10_es2017.ts (8 errors) ====
|
||||
==== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration10_es2017.ts (9 errors) ====
|
||||
async function foo(a = await => await): Promise<void> {
|
||||
~~~~~~~~~
|
||||
!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation.
|
||||
@@ -22,8 +23,11 @@ tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclarati
|
||||
!!! error TS1005: ';' expected.
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
~~~~~~~~~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2532: Object is possibly 'undefined'.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
}
|
||||
}
|
||||
~
|
||||
!!! error TS2365: Operator '>' cannot be applied to types 'boolean' and '{}'.
|
||||
@@ -4,11 +4,12 @@ tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration1
|
||||
tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration10_es5.ts(1,33): error TS2304: Cannot find name 'await'.
|
||||
tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration10_es5.ts(1,38): error TS1005: ';' expected.
|
||||
tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration10_es5.ts(1,39): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration10_es5.ts(1,41): error TS2365: Operator '>' cannot be applied to types 'boolean' and '{}'.
|
||||
tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration10_es5.ts(1,49): error TS2532: Object is possibly 'undefined'.
|
||||
tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration10_es5.ts(1,53): error TS1109: Expression expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration10_es5.ts (8 errors) ====
|
||||
==== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration10_es5.ts (9 errors) ====
|
||||
async function foo(a = await => await): Promise<void> {
|
||||
~~~~~~~~~
|
||||
!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation.
|
||||
@@ -22,8 +23,11 @@ tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration1
|
||||
!!! error TS1005: ';' expected.
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
~~~~~~~~~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2532: Object is possibly 'undefined'.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
}
|
||||
}
|
||||
~
|
||||
!!! error TS2365: Operator '>' cannot be applied to types 'boolean' and '{}'.
|
||||
@@ -4,11 +4,12 @@ tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1
|
||||
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,33): error TS2304: Cannot find name 'await'.
|
||||
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,38): error TS1005: ';' expected.
|
||||
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,39): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,41): error TS2365: Operator '>' cannot be applied to types 'boolean' and '{}'.
|
||||
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,49): error TS2532: Object is possibly 'undefined'.
|
||||
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,53): error TS1109: Expression expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts (8 errors) ====
|
||||
==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts (9 errors) ====
|
||||
async function foo(a = await => await): Promise<void> {
|
||||
~~~~~~~~~
|
||||
!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation.
|
||||
@@ -22,8 +23,11 @@ tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1
|
||||
!!! error TS1005: ';' expected.
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
~~~~~~~~~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2532: Object is possibly 'undefined'.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
}
|
||||
}
|
||||
~
|
||||
!!! error TS2365: Operator '>' cannot be applied to types 'boolean' and '{}'.
|
||||
@@ -2,11 +2,12 @@ tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclarati
|
||||
tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration5_es2017.ts(1,20): error TS2304: Cannot find name 'await'.
|
||||
tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration5_es2017.ts(1,25): error TS1005: ';' expected.
|
||||
tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration5_es2017.ts(1,26): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration5_es2017.ts(1,28): error TS2365: Operator '>' cannot be applied to types 'boolean' and '{}'.
|
||||
tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration5_es2017.ts(1,36): error TS2532: Object is possibly 'undefined'.
|
||||
tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration5_es2017.ts(1,40): error TS1109: Expression expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration5_es2017.ts (6 errors) ====
|
||||
==== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration5_es2017.ts (7 errors) ====
|
||||
async function foo(await): Promise<void> {
|
||||
~~~~~
|
||||
!!! error TS1138: Parameter declaration expected.
|
||||
@@ -16,8 +17,11 @@ tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclarati
|
||||
!!! error TS1005: ';' expected.
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
~~~~~~~~~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2532: Object is possibly 'undefined'.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
}
|
||||
}
|
||||
~
|
||||
!!! error TS2365: Operator '>' cannot be applied to types 'boolean' and '{}'.
|
||||
@@ -2,11 +2,12 @@ tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration5
|
||||
tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration5_es5.ts(1,20): error TS2304: Cannot find name 'await'.
|
||||
tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration5_es5.ts(1,25): error TS1005: ';' expected.
|
||||
tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration5_es5.ts(1,26): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration5_es5.ts(1,28): error TS2365: Operator '>' cannot be applied to types 'boolean' and '{}'.
|
||||
tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration5_es5.ts(1,36): error TS2532: Object is possibly 'undefined'.
|
||||
tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration5_es5.ts(1,40): error TS1109: Expression expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration5_es5.ts (6 errors) ====
|
||||
==== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration5_es5.ts (7 errors) ====
|
||||
async function foo(await): Promise<void> {
|
||||
~~~~~
|
||||
!!! error TS1138: Parameter declaration expected.
|
||||
@@ -16,8 +17,11 @@ tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration5
|
||||
!!! error TS1005: ';' expected.
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
~~~~~~~~~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2532: Object is possibly 'undefined'.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
}
|
||||
}
|
||||
~
|
||||
!!! error TS2365: Operator '>' cannot be applied to types 'boolean' and '{}'.
|
||||
@@ -2,11 +2,12 @@ tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5
|
||||
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts(1,20): error TS2304: Cannot find name 'await'.
|
||||
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts(1,25): error TS1005: ';' expected.
|
||||
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts(1,26): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts(1,28): error TS2365: Operator '>' cannot be applied to types 'boolean' and '{}'.
|
||||
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts(1,36): error TS2532: Object is possibly 'undefined'.
|
||||
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts(1,40): error TS1109: Expression expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts (6 errors) ====
|
||||
==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts (7 errors) ====
|
||||
async function foo(await): Promise<void> {
|
||||
~~~~~
|
||||
!!! error TS1138: Parameter declaration expected.
|
||||
@@ -16,8 +17,11 @@ tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5
|
||||
!!! error TS1005: ';' expected.
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
~~~~~~~~~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2532: Object is possibly 'undefined'.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
}
|
||||
}
|
||||
~
|
||||
!!! error TS2365: Operator '>' cannot be applied to types 'boolean' and '{}'.
|
||||
@@ -46,8 +46,8 @@ var r = true ? 1 : 2;
|
||||
>2 : 2
|
||||
|
||||
var r3 = true ? 1 : {};
|
||||
>r3 : {}
|
||||
>true ? 1 : {} : {}
|
||||
>r3 : number | {}
|
||||
>true ? 1 : {} : 1 | {}
|
||||
>true : true
|
||||
>1 : 1
|
||||
>{} : {}
|
||||
|
||||
@@ -45,7 +45,7 @@ var result1 = true ? x : a;
|
||||
|
||||
//Expr1 and Expr2 are literals
|
||||
true ? {} : 1;
|
||||
>true ? {} : 1 : {}
|
||||
>true ? {} : 1 : 1 | {}
|
||||
>true : true
|
||||
>{} : {}
|
||||
>1 : 1
|
||||
@@ -63,14 +63,14 @@ true ? { a: 1 } : { a: 2, b: 'string' };
|
||||
>'string' : "string"
|
||||
|
||||
var result2 = true ? {} : 1;
|
||||
>result2 : {}
|
||||
>true ? {} : 1 : {}
|
||||
>result2 : number | {}
|
||||
>true ? {} : 1 : 1 | {}
|
||||
>true : true
|
||||
>{} : {}
|
||||
>1 : 1
|
||||
|
||||
var result3 = true ? { a: 1 } : { a: 2, b: 'string' };
|
||||
>result3 : { a: number; } | { a: number; b: string; }
|
||||
>result3 : { a: number; b?: undefined; } | { a: number; b: string; }
|
||||
>true ? { a: 1 } : { a: 2, b: 'string' } : { a: number; } | { a: number; b: string; }
|
||||
>true : true
|
||||
>{ a: 1 } : { a: number; }
|
||||
@@ -125,7 +125,7 @@ var result5 = true ? a : x;
|
||||
|
||||
//Expr1 and Expr2 are literals
|
||||
true ? 1 : {};
|
||||
>true ? 1 : {} : {}
|
||||
>true ? 1 : {} : 1 | {}
|
||||
>true : true
|
||||
>1 : 1
|
||||
>{} : {}
|
||||
@@ -143,14 +143,14 @@ true ? { a: 2, b: 'string' } : { a: 1 };
|
||||
>1 : 1
|
||||
|
||||
var result6 = true ? 1 : {};
|
||||
>result6 : {}
|
||||
>true ? 1 : {} : {}
|
||||
>result6 : number | {}
|
||||
>true ? 1 : {} : 1 | {}
|
||||
>true : true
|
||||
>1 : 1
|
||||
>{} : {}
|
||||
|
||||
var result7 = true ? { a: 2, b: 'string' } : { a: 1 };
|
||||
>result7 : { a: number; b: string; } | { a: number; }
|
||||
>result7 : { a: number; b: string; } | { a: number; b?: undefined; }
|
||||
>true ? { a: 2, b: 'string' } : { a: 1 } : { a: number; b: string; } | { a: number; }
|
||||
>true : true
|
||||
>{ a: 2, b: 'string' } : { a: number; b: string; }
|
||||
|
||||
@@ -21,14 +21,14 @@ var c = [1, '', null]; // {}[]
|
||||
>null : null
|
||||
|
||||
var d = [{}, 1]; // {}[]
|
||||
>d : {}[]
|
||||
>[{}, 1] : {}[]
|
||||
>d : (number | {})[]
|
||||
>[{}, 1] : (number | {})[]
|
||||
>{} : {}
|
||||
>1 : 1
|
||||
|
||||
var e = [{}, Object]; // {}[]
|
||||
>e : {}[]
|
||||
>[{}, Object] : {}[]
|
||||
>e : (ObjectConstructor | {})[]
|
||||
>[{}, Object] : (ObjectConstructor | {})[]
|
||||
>{} : {}
|
||||
>Object : ObjectConstructor
|
||||
|
||||
@@ -48,7 +48,7 @@ var g = [[1], ['']]; // {}[]
|
||||
>'' : ""
|
||||
|
||||
var h = [{ foo: 1, bar: '' }, { foo: 2 }]; // {foo: number}[]
|
||||
>h : ({ foo: number; bar: string; } | { foo: number; })[]
|
||||
>h : ({ foo: number; bar: string; } | { foo: number; bar?: undefined; })[]
|
||||
>[{ foo: 1, bar: '' }, { foo: 2 }] : ({ foo: number; bar: string; } | { foo: number; })[]
|
||||
>{ foo: 1, bar: '' } : { foo: number; bar: string; }
|
||||
>foo : number
|
||||
@@ -60,7 +60,7 @@ var h = [{ foo: 1, bar: '' }, { foo: 2 }]; // {foo: number}[]
|
||||
>2 : 2
|
||||
|
||||
var i = [{ foo: 1, bar: '' }, { foo: '' }]; // {}[]
|
||||
>i : ({ foo: number; bar: string; } | { foo: string; })[]
|
||||
>i : ({ foo: number; bar: string; } | { foo: string; bar?: undefined; })[]
|
||||
>[{ foo: 1, bar: '' }, { foo: '' }] : ({ foo: number; bar: string; } | { foo: string; })[]
|
||||
>{ foo: 1, bar: '' } : { foo: number; bar: string; }
|
||||
>foo : number
|
||||
@@ -145,7 +145,7 @@ module Derived {
|
||||
>Derived : typeof Derived
|
||||
|
||||
var h = [{ foo: base, basear: derived }, { foo: base }]; // {foo: Base}[]
|
||||
>h : ({ foo: Base; basear: Derived; } | { foo: Base; })[]
|
||||
>h : ({ foo: Base; basear: Derived; } | { foo: Base; basear?: undefined; })[]
|
||||
>[{ foo: base, basear: derived }, { foo: base }] : ({ foo: Base; basear: Derived; } | { foo: Base; })[]
|
||||
>{ foo: base, basear: derived } : { foo: Base; basear: Derived; }
|
||||
>foo : Base
|
||||
@@ -157,7 +157,7 @@ module Derived {
|
||||
>base : Base
|
||||
|
||||
var i = [{ foo: base, basear: derived }, { foo: derived }]; // {foo: Derived}[]
|
||||
>i : ({ foo: Base; basear: Derived; } | { foo: Derived; })[]
|
||||
>i : ({ foo: Base; basear: Derived; } | { foo: Derived; basear?: undefined; })[]
|
||||
>[{ foo: base, basear: derived }, { foo: derived }] : ({ foo: Base; basear: Derived; } | { foo: Derived; })[]
|
||||
>{ foo: base, basear: derived } : { foo: Base; basear: Derived; }
|
||||
>foo : Base
|
||||
|
||||
@@ -176,7 +176,7 @@ var o1: { a: { a: string; }; b: string; } = { e: 0, f: 0 };
|
||||
>0 : 0
|
||||
|
||||
var a1 = [{ e: 0, f: 0 }, { e: 0, f: 0 }, { e: 0, g: 0 }];
|
||||
>a1 : ({ e: number; f: number; } | { e: number; g: number; })[]
|
||||
>a1 : ({ e: number; f: number; g?: undefined; } | { e: number; g: number; f?: undefined; })[]
|
||||
>[{ e: 0, f: 0 }, { e: 0, f: 0 }, { e: 0, g: 0 }] : ({ e: number; f: number; } | { e: number; g: number; })[]
|
||||
>{ e: 0, f: 0 } : { e: number; f: number; }
|
||||
>e : number
|
||||
|
||||
@@ -107,8 +107,8 @@ function fn3<T extends { a: string; b: string }, U extends { a: string; b: numbe
|
||||
>u : U
|
||||
|
||||
var r3 = t || { a: '' };
|
||||
>r3 : { a: string; }
|
||||
>t || { a: '' } : { a: string; }
|
||||
>r3 : T | { a: string; }
|
||||
>t || { a: '' } : T | { a: string; }
|
||||
>t : T
|
||||
>{ a: '' } : { a: string; }
|
||||
>a : string
|
||||
|
||||
@@ -77,8 +77,8 @@ var b: Boolean = true;
|
||||
>true : true
|
||||
|
||||
var n3 = 5 || {};
|
||||
>n3 : {}
|
||||
>5 || {} : {}
|
||||
>n3 : number | {}
|
||||
>5 || {} : 5 | {}
|
||||
>5 : 5
|
||||
>{} : {}
|
||||
|
||||
|
||||
@@ -675,15 +675,15 @@ function f21<T extends Number>(x: T) {
|
||||
>T : T
|
||||
|
||||
var r20 = true ? {} : x; // ok
|
||||
>r20 : {}
|
||||
>true ? {} : x : {}
|
||||
>r20 : T | {}
|
||||
>true ? {} : x : T | {}
|
||||
>true : true
|
||||
>{} : {}
|
||||
>x : T
|
||||
|
||||
var r20 = true ? x : {}; // ok
|
||||
>r20 : {}
|
||||
>true ? x : {} : {}
|
||||
>r20 : T | {}
|
||||
>true ? x : {} : T | {}
|
||||
>true : true
|
||||
>x : T
|
||||
>{} : {}
|
||||
|
||||
@@ -13,8 +13,8 @@ Symbol instanceof Symbol();
|
||||
|
||||
(Symbol() || {}) instanceof Object; // This one should be okay, it's a valid way of distinguishing types
|
||||
>(Symbol() || {}) instanceof Object : boolean
|
||||
>(Symbol() || {}) : {}
|
||||
>Symbol() || {} : {}
|
||||
>(Symbol() || {}) : symbol | {}
|
||||
>Symbol() || {} : symbol | {}
|
||||
>Symbol() : symbol
|
||||
>Symbol : SymbolConstructor
|
||||
>{} : {}
|
||||
@@ -23,8 +23,8 @@ Symbol instanceof Symbol();
|
||||
Symbol instanceof (Symbol() || {});
|
||||
>Symbol instanceof (Symbol() || {}) : boolean
|
||||
>Symbol : SymbolConstructor
|
||||
>(Symbol() || {}) : {}
|
||||
>Symbol() || {} : {}
|
||||
>(Symbol() || {}) : symbol | {}
|
||||
>Symbol() || {} : symbol | {}
|
||||
>Symbol() : symbol
|
||||
>Symbol : SymbolConstructor
|
||||
>{} : {}
|
||||
|
||||
@@ -33,7 +33,7 @@ s || 1;
|
||||
>1 : 1
|
||||
|
||||
({}) || s;
|
||||
>({}) || s : {}
|
||||
>({}) || s : symbol | {}
|
||||
>({}) : {}
|
||||
>{} : {}
|
||||
>s : symbol
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference.ts(62,36): error TS2345: Argument of type '0' is not assignable to parameter of type '""'.
|
||||
tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference.ts(75,79): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: number; z: Date; }'.
|
||||
Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: Date; }'.
|
||||
tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference.ts(76,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' has type '{ x: number; z: Date; y?: undefined; } | { x: number; y: string; z?: undefined; }' at tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference.ts 74:4, but here has type '{}'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference.ts (2 errors) ====
|
||||
@@ -81,10 +80,9 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference
|
||||
}
|
||||
|
||||
var a9e = someGenerics9 `${ undefined }${ { x: 6, z: new Date() } }${ { x: 6, y: '' } }`;
|
||||
~~~~~
|
||||
!!! error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: number; z: Date; }'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: Date; }'.
|
||||
var a9e: {};
|
||||
~~~
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' has type '{ x: number; z: Date; y?: undefined; } | { x: number; y: string; z?: undefined; }' at tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference.ts 74:4, but here has type '{}'.
|
||||
|
||||
// Generic tag with multiple parameters of generic type passed arguments with a single best common type
|
||||
var a9d = someGenerics9 `${ { x: 3 }}${ { x: 6 }}${ { x: 6 } }`;
|
||||
|
||||
@@ -395,8 +395,8 @@ interface A92 {
|
||||
}
|
||||
|
||||
var a9e = someGenerics9 `${ undefined }${ { x: 6, z: new Date() } }${ { x: 6, y: '' } }`;
|
||||
>a9e : any
|
||||
>someGenerics9 `${ undefined }${ { x: 6, z: new Date() } }${ { x: 6, y: '' } }` : any
|
||||
>a9e : { x: number; z: Date; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
>someGenerics9 `${ undefined }${ { x: 6, z: new Date() } }${ { x: 6, y: '' } }` : { x: number; z: Date; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
>someGenerics9 : <T>(strs: TemplateStringsArray, a: T, b: T, c: T) => T
|
||||
>`${ undefined }${ { x: 6, z: new Date() } }${ { x: 6, y: '' } }` : string
|
||||
>undefined : undefined
|
||||
@@ -413,7 +413,7 @@ var a9e = someGenerics9 `${ undefined }${ { x: 6, z: new Date() } }${ { x: 6, y:
|
||||
>'' : ""
|
||||
|
||||
var a9e: {};
|
||||
>a9e : any
|
||||
>a9e : { x: number; z: Date; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
|
||||
// Generic tag with multiple parameters of generic type passed arguments with a single best common type
|
||||
var a9d = someGenerics9 `${ { x: 3 }}${ { x: 6 }}${ { x: 6 } }`;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts(62,36): error TS2345: Argument of type '0' is not assignable to parameter of type '""'.
|
||||
tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts(75,79): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: number; z: Date; }'.
|
||||
Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: Date; }'.
|
||||
tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts(76,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' has type '{ x: number; z: Date; y?: undefined; } | { x: number; y: string; z?: undefined; }' at tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts 74:4, but here has type '{}'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts (2 errors) ====
|
||||
@@ -81,10 +80,9 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference
|
||||
}
|
||||
|
||||
var a9e = someGenerics9 `${ undefined }${ { x: 6, z: new Date() } }${ { x: 6, y: '' } }`;
|
||||
~~~~~
|
||||
!!! error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: number; z: Date; }'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: Date; }'.
|
||||
var a9e: {};
|
||||
~~~
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' has type '{ x: number; z: Date; y?: undefined; } | { x: number; y: string; z?: undefined; }' at tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts 74:4, but here has type '{}'.
|
||||
|
||||
// Generic tag with multiple parameters of generic type passed arguments with a single best common type
|
||||
var a9d = someGenerics9 `${ { x: 3 }}${ { x: 6 }}${ { x: 6 } }`;
|
||||
|
||||
@@ -395,8 +395,8 @@ interface A92 {
|
||||
}
|
||||
|
||||
var a9e = someGenerics9 `${ undefined }${ { x: 6, z: new Date() } }${ { x: 6, y: '' } }`;
|
||||
>a9e : any
|
||||
>someGenerics9 `${ undefined }${ { x: 6, z: new Date() } }${ { x: 6, y: '' } }` : any
|
||||
>a9e : { x: number; z: Date; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
>someGenerics9 `${ undefined }${ { x: 6, z: new Date() } }${ { x: 6, y: '' } }` : { x: number; z: Date; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
>someGenerics9 : <T>(strs: TemplateStringsArray, a: T, b: T, c: T) => T
|
||||
>`${ undefined }${ { x: 6, z: new Date() } }${ { x: 6, y: '' } }` : string
|
||||
>undefined : undefined
|
||||
@@ -413,7 +413,7 @@ var a9e = someGenerics9 `${ undefined }${ { x: 6, z: new Date() } }${ { x: 6, y:
|
||||
>'' : ""
|
||||
|
||||
var a9e: {};
|
||||
>a9e : any
|
||||
>a9e : { x: number; z: Date; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
|
||||
// Generic tag with multiple parameters of generic type passed arguments with a single best common type
|
||||
var a9d = someGenerics9 `${ { x: 3 }}${ { x: 6 }}${ { x: 6 } }`;
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
tests/cases/compiler/typeArgInference2.ts(12,52): error TS2345: Argument of type '{ name: string; b: number; }' is not assignable to parameter of type '{ name: string; a: number; }'.
|
||||
Object literal may only specify known properties, and 'b' does not exist in type '{ name: string; a: number; }'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/typeArgInference2.ts (1 errors) ====
|
||||
interface Item {
|
||||
name: string;
|
||||
}
|
||||
|
||||
declare function foo<T extends Item>(x?: T, y?: T): T;
|
||||
|
||||
var z1 = foo(null); // any
|
||||
var z2 = foo(); // Item
|
||||
var z3 = foo({ name: null }); // { name: any }
|
||||
var z4 = foo({ name: "abc" }); // { name: string }
|
||||
var z5 = foo({ name: "abc", a: 5 }); // { name: string; a: number }
|
||||
var z6 = foo({ name: "abc", a: 5 }, { name: "def", b: 5 }); // error
|
||||
~~~~
|
||||
!!! error TS2345: Argument of type '{ name: string; b: number; }' is not assignable to parameter of type '{ name: string; a: number; }'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and 'b' does not exist in type '{ name: string; a: number; }'.
|
||||
@@ -54,8 +54,8 @@ var z5 = foo({ name: "abc", a: 5 }); // { name: string; a: number }
|
||||
>5 : 5
|
||||
|
||||
var z6 = foo({ name: "abc", a: 5 }, { name: "def", b: 5 }); // error
|
||||
>z6 : any
|
||||
>foo({ name: "abc", a: 5 }, { name: "def", b: 5 }) : any
|
||||
>z6 : { name: string; a: number; b?: undefined; } | { name: string; b: number; a?: undefined; }
|
||||
>foo({ name: "abc", a: 5 }, { name: "def", b: 5 }) : { name: string; a: number; b?: undefined; } | { name: string; b: number; a?: undefined; }
|
||||
>foo : <T extends Item>(x?: T, y?: T) => T
|
||||
>{ name: "abc", a: 5 } : { name: string; a: number; }
|
||||
>name : string
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(68,29): error TS2345: Argument of type '0' is not assignable to parameter of type '""'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(82,69): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: number; z: Date; }'.
|
||||
Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: Date; }'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(83,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' has type '{ x: number; z: Date; y?: undefined; } | { x: number; y: string; z?: undefined; }' at tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts 81:4, but here has type '{}'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(84,74): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'.
|
||||
Object literal may only specify known properties, and 'y' does not exist in type 'A92'.
|
||||
|
||||
@@ -90,10 +89,9 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(84,74
|
||||
z?: Date;
|
||||
}
|
||||
var a9e = someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' });
|
||||
~~~~~
|
||||
!!! error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: number; z: Date; }'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: Date; }'.
|
||||
var a9e: {};
|
||||
~~~
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' has type '{ x: number; z: Date; y?: undefined; } | { x: number; y: string; z?: undefined; }' at tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts 81:4, but here has type '{}'.
|
||||
var a9f = someGenerics9<A92>(undefined, { x: 6, z: new Date() }, { x: 6, y: '' });
|
||||
~~~~~
|
||||
!!! error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'.
|
||||
|
||||
@@ -421,8 +421,8 @@ interface A92 {
|
||||
>Date : Date
|
||||
}
|
||||
var a9e = someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' });
|
||||
>a9e : any
|
||||
>someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' }) : any
|
||||
>a9e : { x: number; z: Date; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
>someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' }) : { x: number; z: Date; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
>someGenerics9 : <T>(a: T, b: T, c: T) => T
|
||||
>undefined : undefined
|
||||
>{ x: 6, z: new Date() } : { x: number; z: Date; }
|
||||
@@ -438,7 +438,7 @@ var a9e = someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' });
|
||||
>'' : ""
|
||||
|
||||
var a9e: {};
|
||||
>a9e : any
|
||||
>a9e : { x: number; z: Date; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
|
||||
var a9f = someGenerics9<A92>(undefined, { x: 6, z: new Date() }, { x: 6, y: '' });
|
||||
>a9f : any
|
||||
|
||||
@@ -12,8 +12,7 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstruct
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(106,33): error TS2345: Argument of type '0' is not assignable to parameter of type '""'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(118,9): error TS2304: Cannot find name 'Window'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(120,51): error TS2304: Cannot find name 'window'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(120,69): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: number; z: any; }'.
|
||||
Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: any; }'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(121,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' has type '{ x: number; z: any; y?: undefined; } | { x: number; y: string; z?: undefined; }' at tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts 119:4, but here has type '{}'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(122,56): error TS2304: Cannot find name 'window'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(122,74): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'.
|
||||
Object literal may only specify known properties, and 'y' does not exist in type 'A92'.
|
||||
@@ -162,10 +161,9 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstruct
|
||||
var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'window'.
|
||||
~~~~~
|
||||
!!! error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: number; z: any; }'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: any; }'.
|
||||
var a9e: {};
|
||||
~~~
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' has type '{ x: number; z: any; y?: undefined; } | { x: number; y: string; z?: undefined; }' at tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts 119:4, but here has type '{}'.
|
||||
var a9f = new someGenerics9<A92>(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'window'.
|
||||
|
||||
@@ -524,8 +524,8 @@ interface A92 {
|
||||
>Window : No type information available!
|
||||
}
|
||||
var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
>a9e : any
|
||||
>new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }) : any
|
||||
>a9e : { x: number; z: any; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
>new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }) : { x: number; z: any; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
>someGenerics9 : someGenerics9
|
||||
>undefined : undefined
|
||||
>{ x: 6, z: window } : { x: number; z: any; }
|
||||
@@ -540,7 +540,7 @@ var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
>'' : ""
|
||||
|
||||
var a9e: {};
|
||||
>a9e : any
|
||||
>a9e : { x: number; z: any; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
|
||||
var a9f = new someGenerics9<A92>(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
>a9f : any
|
||||
|
||||
@@ -17,8 +17,7 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConst
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(73,29): error TS2345: Argument of type '0' is not assignable to parameter of type '""'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(85,9): error TS2304: Cannot find name 'Window'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(87,47): error TS2304: Cannot find name 'window'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(87,65): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: number; z: any; }'.
|
||||
Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: any; }'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(88,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' has type '{ x: number; z: any; y?: undefined; } | { x: number; y: string; z?: undefined; }' at tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts 86:4, but here has type '{}'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(89,52): error TS2304: Cannot find name 'window'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(89,70): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'.
|
||||
Object literal may only specify known properties, and 'y' does not exist in type 'A92'.
|
||||
@@ -144,10 +143,9 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConst
|
||||
var a9e = someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'window'.
|
||||
~~~~~
|
||||
!!! error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: number; z: any; }'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: any; }'.
|
||||
var a9e: {};
|
||||
~~~
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' has type '{ x: number; z: any; y?: undefined; } | { x: number; y: string; z?: undefined; }' at tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts 86:4, but here has type '{}'.
|
||||
var a9f = someGenerics9<A92>(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'window'.
|
||||
|
||||
@@ -464,8 +464,8 @@ interface A92 {
|
||||
>Window : No type information available!
|
||||
}
|
||||
var a9e = someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
>a9e : any
|
||||
>someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }) : any
|
||||
>a9e : { x: number; z: any; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
>someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }) : { x: number; z: any; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
>someGenerics9 : <T extends any>(a: T, b: T, c: T) => T
|
||||
>undefined : undefined
|
||||
>{ x: 6, z: window } : { x: number; z: any; }
|
||||
@@ -480,7 +480,7 @@ var a9e = someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
>'' : ""
|
||||
|
||||
var a9e: {};
|
||||
>a9e : any
|
||||
>a9e : { x: number; z: any; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
|
||||
var a9f = someGenerics9<A92>(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
>a9f : any
|
||||
|
||||
Reference in New Issue
Block a user