17 lines
799 B
Plaintext
17 lines
799 B
Plaintext
tests/cases/conformance/es6/computedProperties/computedPropertyNames8.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', or 'any'.
|
|
tests/cases/conformance/es6/computedProperties/computedPropertyNames8.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', or 'any'.
|
|
|
|
|
|
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames8.ts (2 errors) ====
|
|
function f<T, U extends string>() {
|
|
var t: T;
|
|
var u: U;
|
|
var v = {
|
|
[t]: 0,
|
|
~~~
|
|
!!! error TS2464: A computed property name must be of type 'string', 'number', or 'any'.
|
|
[u]: 1
|
|
~~~
|
|
!!! error TS2464: A computed property name must be of type 'string', 'number', or 'any'.
|
|
};
|
|
} |