From a89e17a3904cce8b7c9a70519e275fe9364526ae Mon Sep 17 00:00:00 2001 From: Vendicated Date: Sun, 9 Oct 2022 22:58:08 +0200 Subject: Make typescript happy, tsc test run in CI --- src/utils/ChangeList.ts | 2 +- src/utils/misc.tsx | 2 +- src/utils/quickCss.ts | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/utils') diff --git a/src/utils/ChangeList.ts b/src/utils/ChangeList.ts index d8f7449..a0da8f2 100644 --- a/src/utils/ChangeList.ts +++ b/src/utils/ChangeList.ts @@ -1,5 +1,5 @@ export class ChangeList{ - private set = new Set; + private set = new Set(); public get changeCount() { return this.set.size; diff --git a/src/utils/misc.tsx b/src/utils/misc.tsx index a7d781a..7a733ed 100644 --- a/src/utils/misc.tsx +++ b/src/utils/misc.tsx @@ -28,7 +28,7 @@ export function lazyWebpack(filter: FilterFn): T { construct: (_, args, newTarget) => Reflect.construct(getMod(), args, newTarget), deleteProperty: (_, prop) => delete getMod()[prop], defineProperty: (_, property, attributes) => !!Object.defineProperty(getMod(), property, attributes) - }) as T; + }) as any as T; } /** diff --git a/src/utils/quickCss.ts b/src/utils/quickCss.ts index eea44df..785dd71 100644 --- a/src/utils/quickCss.ts +++ b/src/utils/quickCss.ts @@ -12,7 +12,8 @@ export async function toggle(isEnabled: boolean) { VencordNative.ipc.on(IpcEvents.QUICK_CSS_UPDATE, (_, css: string) => style.innerText = css); style.innerText = await VencordNative.ipc.invoke(IpcEvents.GET_QUICK_CSS); } - } else style.disabled = !isEnabled; + } else // @ts-ignore yes typescript, property 'disabled' does exist on type 'HTMLStyleElement' u should try reading the docs some time + style.disabled = !isEnabled; } document.addEventListener("DOMContentLoaded", () => { -- cgit