-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathglobals.d.ts
75 lines (68 loc) · 2.65 KB
/
globals.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/**
* This file is part of Aero, a next-generation Discord mod empowering users and developers alike.
* Copyright (c) 2023 TheCommieAxolotl & contributors.
*
* Aero is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Aero is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Aero. If not, see <https://www.gnu.org/licenses/>.
*/
/* eslint-disable @typescript-eslint/no-explicit-any */
export type AeroNative = typeof import("~/preload/index").aeroNative;
export type Aero = typeof import("~/renderer/aero").default;
export type SourceMap = {
file?: string;
sourceRoot?: string;
version: string;
sources: string[];
names: string[];
sourcesContent?: string[];
mappings: string;
};
type RequireResult<T extends string> = "aero" extends T
? typeof import("~/renderer/aero").default
: "aero/plugin" extends T
? {
remoteImport: typeof import("~/renderer/api/plugins/import").remoteImport;
definePlugin: typeof import("~/renderer/api/plugins/types").definePlugin;
defineVencordPlugin: typeof import("~/renderer/api/plugins/types").defineVencordPlugin;
SettingsItemType: typeof import("~/renderer/api/plugins/types").SettingsItemType;
}
: "aero/theme" extends T
? {
defineTheme: typeof import("~/renderer/api/themes/types").defineTheme;
}
: "aero/webpack" extends T
? typeof import("~/renderer/api/webpack")
: "aero/dom" extends T
? typeof import("~/renderer/api/dom")
: "aero/ui" extends T
? typeof import("~/renderer/ui/components")
: "aero/badges" extends T
? typeof import("~/renderer/api/attachments/badges")
: never;
type InternalModule = "aero" | "aero/plugin" | "aero/theme" | "aero/webpack" | "aero/dom" | "aero/ui" | "aero/badges";
declare global {
interface Window {
/**
* This is not `NodeRequire`, this require function provides access to internal modules via plugins.
*
* *Do not use this explicitly*
*/
require: (<I extends InternalModule>(id: I) => RequireResult<I>) & {
all: InternalModule[];
};
webpackChunkdiscord_app: any;
DiscordNative: any;
aeroNative: AeroNative;
aero: Aero;
}
}