How to express in typescript that the key value of an object is symbol type

interface Listeners {
    [propName: symbol]: Listener[];
};

the above code prompts

[ts] Index signature parameter must be of type "string" or "number". [1023]

how to express that the key value of an object is of type symbol


clipboard.png

clipboard.png

.jpeg

issue Github:Allow indexing with symbols 2019open

clipboard.png


same question, have you solved it?

Menu