[TS] Properly type __vendettaVersion (#78)

This commit is contained in:
V 2023-05-30 20:03:49 +02:00 committed by GitHub
parent 0f5dc8e854
commit 277401c752
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

4
src/def.d.ts vendored
View file

@ -134,7 +134,7 @@ interface ThemeData {
blur?: number;
/**
* The alpha value of the background.
* `CHAT_BACKGROUND` of semanticColors alpha value will be ignored when this is specified
* `CHAT_BACKGROUND` of semanticColors alpha value will be ignored when this is specified
*/
alpha?: number;
}
@ -505,6 +505,8 @@ interface VendettaPluginObject {
declare global {
type React = typeof _React;
const __vendettaVersion: string;
interface Window {
[key: PropertyKey]: any;
modules: MetroModules;

View file

@ -8,7 +8,6 @@ import(".").then((m) => m.default()).catch((e) => {
alert([
"Failed to load Vendetta!\n",
`Build Number: ${ClientInfoManager.Build}`,
// @ts-expect-error, replaced in build script
`Vendetta: ${__vendettaVersion}`,
e?.stack || e.toString(),
].join("\n"));

View file

@ -59,7 +59,6 @@ export function patchLogHook() {
}
}
// @ts-expect-error
export const versionHash: string = __vendettaVersion;
export function getDebugInfo() {