16 lines
No EOL
799 B
Text
16 lines
No EOL
799 B
Text
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
|
|
}; |