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