12 lines
No EOL
380 B
Text
12 lines
No EOL
380 B
Text
tests/cases/compiler/extendGenericArray.ts(6,5): error TS2322: Type 'string' is not assignable to type 'number'.
|
|
|
|
|
|
==== tests/cases/compiler/extendGenericArray.ts (1 errors) ====
|
|
interface Array<T> {
|
|
foo(): T;
|
|
}
|
|
|
|
var arr: string[] = [];
|
|
var x: number = arr.foo();
|
|
~
|
|
!!! error TS2322: Type 'string' is not assignable to type 'number'. |