TypeScript/tests/cases/conformance/es6/computedProperties/computedPropertyNames40_ES5.ts
2015-02-03 17:43:31 -08:00

11 lines
192 B
TypeScript

// @target: es5
class Foo { x }
class Foo2 { x; y }
class C {
[s: string]: () => Foo2;
// Computed properties
[""]() { return new Foo }
[""]() { return new Foo2 }
}