TypeScript/tests/cases/compiler/classSideInheritance2.ts

20 lines
365 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
interface IText {
foo: number;
}
interface TextSpan {}
class SubText extends TextBase {
constructor(text: IText, span: TextSpan) {
super();
}
}
class TextBase implements IText {
public foo: number;
public subText(span: TextSpan): IText {
return new SubText(this, span);
}
}