[TS] Properly type __vendettaVersion (#78)
This commit is contained in:
parent
0f5dc8e854
commit
277401c752
3 changed files with 3 additions and 3 deletions
2
src/def.d.ts
vendored
2
src/def.d.ts
vendored
|
@ -505,6 +505,8 @@ interface VendettaPluginObject {
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
type React = typeof _React;
|
type React = typeof _React;
|
||||||
|
const __vendettaVersion: string;
|
||||||
|
|
||||||
interface Window {
|
interface Window {
|
||||||
[key: PropertyKey]: any;
|
[key: PropertyKey]: any;
|
||||||
modules: MetroModules;
|
modules: MetroModules;
|
||||||
|
|
|
@ -8,7 +8,6 @@ import(".").then((m) => m.default()).catch((e) => {
|
||||||
alert([
|
alert([
|
||||||
"Failed to load Vendetta!\n",
|
"Failed to load Vendetta!\n",
|
||||||
`Build Number: ${ClientInfoManager.Build}`,
|
`Build Number: ${ClientInfoManager.Build}`,
|
||||||
// @ts-expect-error, replaced in build script
|
|
||||||
`Vendetta: ${__vendettaVersion}`,
|
`Vendetta: ${__vendettaVersion}`,
|
||||||
e?.stack || e.toString(),
|
e?.stack || e.toString(),
|
||||||
].join("\n"));
|
].join("\n"));
|
||||||
|
|
|
@ -59,7 +59,6 @@ export function patchLogHook() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-expect-error
|
|
||||||
export const versionHash: string = __vendettaVersion;
|
export const versionHash: string = __vendettaVersion;
|
||||||
|
|
||||||
export function getDebugInfo() {
|
export function getDebugInfo() {
|
||||||
|
|
Loading…
Reference in a new issue