Closed
Description
Version
$ ./node_modules/typescript/bin/tsc --version
Version 2.4.2
Code
type ClientId = number;
interface Clients {[key:ClientId]:any};
Expected behavior
No compiler errors.
Actual behavior
error TS1023: An index signature parameter type must be 'string' or 'number'.
Comment
ClientId is a number and Typescript is using structural typing - not nominative typing.