Skip to content

'string | number' is not allowed as an index signature parameter type #7666

Closed
@malibuzios

Description

@malibuzios

TypeScript Version:
1.8.7

Code

type StringOrNumberKeys: { [key: string | number]: number };

Expected behavior:
Should work

Actual behavior:

Error: an index signature parameter must be 'string' or 'number'

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions