2015-02-03 02:36:45 +01:00
tests/cases/conformance/es6/computedProperties/computedPropertyNames9_ES6.ts(9,5): error TS2464: A computed property name must be of type 'string', 'number', or 'any'.
2015-01-12 23:04:34 +01:00
2015-02-03 02:36:45 +01:00
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames9_ES6.ts (1 errors) ====
2015-01-12 23:04:34 +01:00
function f(s: string): string;
function f(n: number): number;
function f<T>(x: T): T;
function f(x): any { }
var v = {
[f("")]: 0,
[f(0)]: 0,
[f(true)]: 0
~~~~~~~~~
2015-01-16 02:54:34 +01:00
!!! error TS2464: A computed property name must be of type 'string', 'number', or 'any'.
2015-01-12 23:04:34 +01:00
}