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