2a25480272
* expose git sha * move to global.d.ts * fix vercel domain
32 lines
668 B
TypeScript
32 lines
668 B
TypeScript
interface Document {
|
|
fonts?: {
|
|
ready?: Promise<void>;
|
|
addEventListener?(
|
|
type: "loading" | "loadingdone" | "loadingerror",
|
|
listener: (this: Document, ev: Event) => any,
|
|
): void;
|
|
};
|
|
}
|
|
|
|
interface Window {
|
|
ClipboardItem: any;
|
|
__EXCALIDRAW_SHA__: string;
|
|
}
|
|
|
|
interface Clipboard extends EventTarget {
|
|
write(data: any[]): Promise<void>;
|
|
}
|
|
|
|
type Mutable<T> = {
|
|
-readonly [P in keyof T]: T[P];
|
|
};
|
|
|
|
type ResolutionType<T extends (...args: any) => any> = T extends (
|
|
...args: any
|
|
) => Promise<infer R>
|
|
? R
|
|
: any;
|
|
|
|
// https://github.com/krzkaczor/ts-essentials
|
|
type MarkOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|