TypeScript/tests/baselines/reference/interfaceClassMerging2.types
Mohamed Hegazy 8b8d33d8b8 Fix comments
2015-10-16 16:29:11 -07:00

84 lines
1.7 KiB
Plaintext

=== tests/cases/compiler/interfaceClassMerging2.ts ===
interface Foo {
>Foo : Foo
interfaceFooMethod(): this;
>interfaceFooMethod : () => this
interfaceFooProperty: this;
>interfaceFooProperty : this
}
class Foo {
>Foo : Foo
classFooProperty: this;
>classFooProperty : this
classFooMethod(): this {
>classFooMethod : () => this
return this;
>this : this
}
}
interface Bar {
>Bar : Bar
interfaceBarMethod(): this;
>interfaceBarMethod : () => this
interfaceBarProperty: this;
>interfaceBarProperty : this
}
class Bar extends Foo {
>Bar : Bar
>Foo : Foo
classBarProperty: this;
>classBarProperty : this
classBarMethod(): this {
>classBarMethod : () => this
return this;
>this : this
}
}
var bar = new Bar();
>bar : Bar
>new Bar() : Bar
>Bar : typeof Bar
bar.interfaceBarMethod().interfaceFooMethod().classBarMethod().classFooMethod();
>bar.interfaceBarMethod().interfaceFooMethod().classBarMethod().classFooMethod() : Bar
>bar.interfaceBarMethod().interfaceFooMethod().classBarMethod().classFooMethod : () => Bar
>bar.interfaceBarMethod().interfaceFooMethod().classBarMethod() : Bar
>bar.interfaceBarMethod().interfaceFooMethod().classBarMethod : () => Bar
>bar.interfaceBarMethod().interfaceFooMethod() : Bar
>bar.interfaceBarMethod().interfaceFooMethod : () => Bar
>bar.interfaceBarMethod() : Bar
>bar.interfaceBarMethod : () => Bar
>bar : Bar
>interfaceBarMethod : () => Bar
>interfaceFooMethod : () => Bar
>classBarMethod : () => Bar
>classFooMethod : () => Bar
var foo = new Foo();
>foo : Foo
>new Foo() : Foo
>Foo : typeof Foo
foo = bar;
>foo = bar : Bar
>foo : Foo
>bar : Bar