TypeScript/tests/baselines/reference/contextuallyTypingRestParameters.errors.txt
2014-11-05 12:26:03 -08:00

16 lines
799 B
Plaintext

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
~~
!!! error TS2322: Type 'string[]' is not assignable to type 'string'.
var x3: string[] = t; // No error
var y2: string = y; // This should be error
~~
!!! error TS2322: Type 'string[]' is not assignable to type 'string'.
var y3: string[] = y; // No error
};