2022-08-31 02:07:16 +00:00
|
|
|
type Enum<T extends Record<string, string>> = {
|
|
|
|
[k in keyof T]: T[k];
|
|
|
|
} & { [v in keyof T as T[v]]: v; };
|
|
|
|
|
|
|
|
function strEnum<T extends Record<string, string>>(obj: T): T {
|
|
|
|
const o = {} as T;
|
|
|
|
for (const key in obj) {
|
|
|
|
o[key] = obj[key] as any;
|
|
|
|
o[obj[key]] = key as any;
|
2022-10-08 18:36:57 +00:00
|
|
|
}
|
2022-10-01 00:27:28 +00:00
|
|
|
return Object.freeze(o);
|
2022-08-31 02:07:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export default strEnum({
|
|
|
|
QUICK_CSS_UPDATE: "VencordQuickCssUpdate",
|
|
|
|
GET_QUICK_CSS: "VencordGetQuickCss",
|
|
|
|
GET_SETTINGS_DIR: "VencordGetSettingsDir",
|
|
|
|
GET_SETTINGS: "VencordGetSettings",
|
|
|
|
SET_SETTINGS: "VencordSetSettings",
|
|
|
|
OPEN_EXTERNAL: "VencordOpenExternal",
|
2022-10-03 17:17:54 +00:00
|
|
|
OPEN_QUICKCSS: "VencordOpenQuickCss",
|
2022-09-30 22:42:50 +00:00
|
|
|
GET_UPDATES: "VencordGetUpdates",
|
|
|
|
GET_REPO: "VencordGetRepo",
|
|
|
|
GET_HASHES: "VencordGetHashes",
|
|
|
|
UPDATE: "VencordUpdate",
|
2022-10-01 15:05:18 +00:00
|
|
|
BUILD: "VencordBuild",
|
|
|
|
GET_DESKTOP_CAPTURE_SOURCES: "VencordGetDesktopCaptureSources"
|
2022-09-16 20:59:34 +00:00
|
|
|
} as const);
|