interface Document { fonts?: { ready?: Promise; }; } interface Window { ClipboardItem: any; } interface Clipboard extends EventTarget { write(data: any[]): Promise; } type Mutable = { -readonly [P in keyof T]: T[P]; }; type ResolutionType any> = T extends ( ...args: any ) => Promise ? R : any;