Interface CustomEvent was created due to type error:
Argument of type '(event: { detail: { code: unknown; };}) => void' is not assignable to parameter of type 'EventListener | ((a: Event) => any) | null'.\n Type '(event: { detail: { code: unknown; };}) => void' is not assignable to type 'EventListener'.\n Types of parameters 'event' and 'evt' are incompatible.\n Property 'detail' is missing in type 'Event' but required in type '{ detail: { code: unknown; }; }'.
Interface CustomEvent was created due to type error:
Argument of type '(event: { detail: { code: unknown; };}) => void' is not assignable to parameter of type 'EventListener | ((a: Event) => any) | null'.\n Type '(event: { detail: { code: unknown; };}) => void' is not assignable to type 'EventListener'.\n Types of parameters 'event' and 'evt' are incompatible.\n Property 'detail' is missing in type 'Event' but required in type '{ detail: { code: unknown; }; }'.