Closed
Description
TypeScript Version:
master
Code
function f<T extends string[] | {}>(a: T) {
if (a instanceof Array) {
a = a;
}
}
Expected behavior:
$ node built/local/tsc.js index.ts
Actual behavior:
$ node built/local/tsc.js index.ts
index.ts(3,5): error TS2322: Type 'any[]' is not assignable to type 'T'.