mitt icon indicating copy to clipboard operation
mitt copied to clipboard

TypeScript complains when trying the provided typescript example

Open katerlouis opened this issue 5 months ago • 1 comments

Image Image

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

katerlouis avatar Jul 19 '25 20:07 katerlouis

use type instead of interface

type Events = {
  foo: string
  bar: number
}

xiaweiss avatar Jul 23 '25 09:07 xiaweiss