TypeScript/tests/baselines/reference/contextuallyTypingRestParameters.errors.txt

16 lines
799 B
Plaintext
Raw Normal View History

2014-11-05 21:26:03 +01:00
tests/cases/compiler/contextuallyTypingRestParameters.ts(3,9): error TS2322: Type 'string[]' is not assignable to type 'string'.
tests/cases/compiler/contextuallyTypingRestParameters.ts(5,9): error TS2322: Type 'string[]' is not assignable to type 'string'.
==== tests/cases/compiler/contextuallyTypingRestParameters.ts (2 errors) ====
var x: (...y: string[]) => void = function (.../*3*/y) {
var t = y;
var x2: string = t; // This should be error
~~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type 'string[]' is not assignable to type 'string'.
var x3: string[] = t; // No error
var y2: string = y; // This should be error
~~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type 'string[]' is not assignable to type 'string'.
var y3: string[] = y; // No error
};