2015-02-03 02:36:45 +01:00
|
|
|
=== tests/cases/conformance/es6/computedProperties/computedPropertyNames37_ES6.ts ===
|
2015-01-21 02:07:00 +01:00
|
|
|
class Foo { x }
|
|
|
|
>Foo : Foo
|
|
|
|
>x : any
|
|
|
|
|
|
|
|
class Foo2 { x; y }
|
|
|
|
>Foo2 : Foo2
|
|
|
|
>x : any
|
|
|
|
>y : any
|
|
|
|
|
|
|
|
class C {
|
|
|
|
>C : C
|
|
|
|
|
|
|
|
[s: number]: Foo2;
|
|
|
|
>s : number
|
|
|
|
>Foo2 : Foo2
|
|
|
|
|
|
|
|
// Computed properties
|
|
|
|
get ["get1"]() { return new Foo }
|
|
|
|
>new Foo : Foo
|
|
|
|
>Foo : typeof Foo
|
|
|
|
|
|
|
|
set ["set1"](p: Foo2) { }
|
|
|
|
>p : Foo2
|
|
|
|
>Foo2 : Foo2
|
|
|
|
}
|