-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.d.ts
33 lines (25 loc) · 1.21 KB
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
declare module "powercord" {
export const injector: typeof import("powercord/injector");
export const Entities: typeof import("powercord/entities");
export const util: typeof import("powercord/util");
export const webpack: typeof import("powercord/webpack");
}
declare module "powercord/injector" {
export function uninject(caller: string): void;
export function inject(caller: string, module: any, functionName: string, callback: <T>(args: any[], res: T) => T, pre?: boolean): void;
}
declare module "powercord/entities" {
export class Plugin {
public readonly entityID: string;
public error(...message: any[]): void;
}
}
declare module "powercord/util" {
export function wrapInHooks<T extends React.ReactElement<any, any>, C extends React.FC>(functionalComponent: C): () => T;
export function findInReactTree<T extends unknown>(tree: any, filter: (layer: any) => boolean): T;
}
declare module "powercord/webpack" {
export const React: typeof import("react");
export function getModuleByDisplayName<T extends React.FC, W extends boolean>(displayName: string, wait?: W, forever?: boolean):
W extends true ? Promise<T> : T;
}