mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
15 lines
472 B
Plaintext
15 lines
472 B
Plaintext
computedPropertyNames51_ES5.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
|
|
|
|
|
|
==== computedPropertyNames51_ES5.ts (1 errors) ====
|
|
function f<T, K extends keyof T>() {
|
|
var t!: T;
|
|
var k!: K;
|
|
var v = {
|
|
[t]: 0,
|
|
~~~
|
|
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
|
|
[k]: 1
|
|
};
|
|
}
|
|
|