mitt
mitt copied to clipboard
TypeScript complains when trying the provided typescript example
Type 'Events' does not satisfy the constraint 'Record<EventType, unknown>'. Index signature for type 'string' is missing in type 'Events'.ts(2344)
I have "strict": true in my tsconfig.json; I don't know what else I might be doing wrong
use type instead of interface
type Events = {
foo: string
bar: number
}