2020-04-03 21:21:40 +02:00
|
|
|
interface Document {
|
|
|
|
fonts?: {
|
|
|
|
ready?: Promise<void>;
|
2020-05-08 10:42:51 +02:00
|
|
|
addEventListener?(
|
|
|
|
type: "loading" | "loadingdone" | "loadingerror",
|
|
|
|
listener: (this: Document, ev: Event) => any,
|
|
|
|
): void;
|
2020-04-03 21:21:40 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-01-09 17:37:08 +01:00
|
|
|
interface Window {
|
|
|
|
ClipboardItem: any;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Clipboard extends EventTarget {
|
|
|
|
write(data: any[]): Promise<void>;
|
|
|
|
}
|
2020-03-17 20:55:40 +01:00
|
|
|
|
|
|
|
type Mutable<T> = {
|
|
|
|
-readonly [P in keyof T]: T[P];
|
|
|
|
};
|
2020-03-26 18:28:26 +01:00
|
|
|
|
|
|
|
type ResolutionType<T extends (...args: any) => any> = T extends (
|
|
|
|
...args: any
|
|
|
|
) => Promise<infer R>
|
|
|
|
? R
|
|
|
|
: any;
|
2020-06-06 13:32:43 +02:00
|
|
|
|
|
|
|
// https://github.com/krzkaczor/ts-essentials
|
|
|
|
type MarkOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|