andywer / typed-emitter

🔩 Type-safe event emitter interface for TypeScript
MIT License
268 stars 24 forks source link

Type 'MessageEvents' does not satisfy the constraint 'EventMap'. #26

Closed grunklejp closed 2 years ago

grunklejp commented 2 years ago

Index signature for type 'string' is missing in type 'MessageEvents'.

Works if you switch EventMessage to a type instead of an interface.

Example playground

andywer commented 2 years ago

Thanks for reporting, @johnpaulkiser!

Slipped in with the new release earlier today.