Closed
Description
TypeScript Version: 3.0.0-dev.20180601
Code
const x: Record<keyof any, string> = {};
x['hello'] = 'world';
const sym: symbol = Symbol('sym');
x[sym] = 'symbol string';
Expected behavior:
No errors. tsc --target es6 symbol-index.ts
works with 2.8.4
.
Actual behavior:
symbol-index.ts(4,3): error TS2538: Type 'symbol' cannot be used as an index type.
when running tsc --pretty false --target es6 symbol-index.ts
with 2.9.1
or next
.