TypeScript/tests/cases/compiler/newExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts

5 lines
109 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
interface I<T> {
new <U extends T>(u: U): U;
}
var i: I<string>;
var y = new i(""); // y should be string