export type { KeysOfUnion } from 'type-fest'; export interface Instance { on(type: string, handle: (...args: any[]) => void): void; off(type: string, handle: (...args: any[]) => void): void; [key: string]: any; } export type OptionalId = T extends { id: string } ? Omit & { id?: string } : T; export type OptionalSource = T extends { source: string } ? Omit & { source?: string } : T;