TypeScript/tests/cases/compiler/typeArgInference2WithError.ts
2014-07-12 17:30:19 -07:00

7 lines
126 B
TypeScript

interface Item {
name: string;
}
declare function foo<T extends Item>(x?: T, y?: T): T;
var z7 = foo("abc", 5); // Error