TypeScript/tests/cases/compiler/constructorArgWithGenericCallSignature.ts

14 lines
296 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
module Test {
export interface MyFunc {
<T>(value1: T): T;
}
export class MyClass {
constructor(func: MyFunc) { }
}
export function F(func: MyFunc) { }
}
var func: Test.MyFunc;
Test.F(func); // OK
var test = new Test.MyClass(func); // Should be OK