TypeScript/tests/baselines/reference/computedPropertyNames9.errors.txt
2015-01-19 16:37:07 -08:00

16 lines
591 B
Plaintext

tests/cases/conformance/es6/computedProperties/computedPropertyNames9.ts(9,5): error TS2464: A computed property name must be of type 'string', 'number', or 'any'.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames9.ts (1 errors) ====
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
~~~~~~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', or 'any'.
}