20 lines
365 B
TypeScript
20 lines
365 B
TypeScript
|
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);
|
||
|
}
|
||
|
}
|