28 lines
458 B
Text
28 lines
458 B
Text
=== tests/cases/conformance/es6/computedProperties/computedPropertyNames37_ES5.ts ===
|
|
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 }
|
|
>"get1" : string
|
|
>new Foo : Foo
|
|
>Foo : typeof Foo
|
|
|
|
set ["set1"](p: Foo2) { }
|
|
>"set1" : string
|
|
>p : Foo2
|
|
>Foo2 : Foo2
|
|
}
|