1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
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
};
|