TypeScript/tests/baselines/reference/classSideInheritance2.types

48 lines
885 B
Plaintext
Raw Normal View History

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