2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/classSideInheritance2.ts ===
|
|
|
|
interface IText {
|
|
|
|
>IText : IText
|
|
|
|
|
|
|
|
foo: number;
|
|
|
|
>foo : number
|
|
|
|
}
|
|
|
|
|
|
|
|
interface TextSpan {}
|
|
|
|
>TextSpan : TextSpan
|
|
|
|
|
|
|
|
class SubText extends TextBase {
|
|
|
|
>SubText : SubText
|
|
|
|
>TextBase : TextBase
|
|
|
|
|
|
|
|
constructor(text: IText, span: TextSpan) {
|
|
|
|
>text : IText
|
|
|
|
>IText : IText
|
|
|
|
>span : TextSpan
|
|
|
|
>TextSpan : TextSpan
|
|
|
|
|
|
|
|
super();
|
|
|
|
>super() : void
|
2014-08-28 21:31:37 +02:00
|
|
|
>super : typeof TextBase
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class TextBase implements IText {
|
|
|
|
>TextBase : TextBase
|
|
|
|
>IText : IText
|
|
|
|
|
|
|
|
public foo: number;
|
|
|
|
>foo : number
|
|
|
|
|
|
|
|
public subText(span: TextSpan): IText {
|
|
|
|
>subText : (span: TextSpan) => IText
|
|
|
|
>span : TextSpan
|
|
|
|
>TextSpan : TextSpan
|
|
|
|
>IText : IText
|
|
|
|
|
|
|
|
return new SubText(this, span);
|
|
|
|
>new SubText(this, span) : SubText
|
|
|
|
>SubText : typeof SubText
|
|
|
|
>this : TextBase
|
|
|
|
>span : TextSpan
|
|
|
|
}
|
|
|
|
}
|