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

25 lines
499 B
TypeScript

module EndGate {
export interface ICloneable {
Clone(): any;
}
}
interface Number extends EndGate.ICloneable { }
module EndGate.Tweening {
export class Tween<T extends ICloneable>{
private _from: T;
constructor(from: T) {
this._from = from.Clone();
}
}
}
module EndGate.Tweening {
export class NumberTween extends Tween<Number>{
constructor(from: number) {
super(from);
}
}
}