TypeScript/tests/baselines/reference/typeArgInference2WithError.js

12 lines
241 B
JavaScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [typeArgInference2WithError.ts]
interface Item {
name: string;
}
declare function foo<T extends Item>(x?: T, y?: T): T;
var z7 = foo("abc", 5); // Error
//// [typeArgInference2WithError.js]
var z7 = foo("abc", 5); // Error