What’s missing?
Methods like .on and .removeListener use event: E | E[], it would be nice to change it to event: E | readonly E[], since it's convenient to have an as const list of event names (which currently get a type error when passing it to an E[] argument).
Why?
Makes TS code better.
Alternatives you tried
const eventNames = [ ... ] as const;
const eventNamesSillyCopy = eventNames.slice(0);
What’s missing?
Methods like
.onand.removeListeneruseevent: E | E[], it would be nice to change it toevent: E | readonly E[], since it's convenient to have anas constlist of event names (which currently get a type error when passing it to anE[]argument).Why?
Makes TS code better.
Alternatives you tried