1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
=== tests/cases/compiler/super_inside-object-literal-getters-and-setters.ts ===
module ObjectLiteral {
>ObjectLiteral : typeof ObjectLiteral
var ThisInObjectLiteral = {
>ThisInObjectLiteral : { _foo: string; foo: string; test: () => any; }
>{ _foo: '1', get foo(): string { return super._foo; }, set foo(value: string) { super._foo = value; }, test: function () { return super._foo; } } : { _foo: string; foo: string; test: () => any; }
_foo: '1',
>_foo : string
>'1' : "1"
get foo(): string {
>foo : string
return super._foo;
>super._foo : any
>super : any
>_foo : any
},
set foo(value: string) {
>foo : string
>value : string
super._foo = value;
>super._foo = value : string
>super._foo : any
>super : any
>_foo : any
>value : string
},
test: function () {
>test : () => any
>function () { return super._foo; } : () => any
return super._foo;
>super._foo : any
>super : any
>_foo : any
}
}
}
class F { public test(): string { return ""; } }
>F : F
>test : () => string
>"" : ""
class SuperObjectTest extends F {
>SuperObjectTest : SuperObjectTest
>F : F
public testing() {
>testing : () => void
var test = {
>test : { readonly F: any; }
>{ get F() { return super.test(); } } : { readonly F: any; }
get F() {
>F : any
return super.test();
>super.test() : any
>super.test : any
>super : any
>test : any
}
};
}
}
|