From 9acadeb1f86922927f584aa7b7a89887bb56d7a2 Mon Sep 17 00:00:00 2001 From: Leonabcd123 <156839416+Leonabcd123@users.noreply.github.com> Date: Thu, 18 Dec 2025 21:46:38 +0200 Subject: [PATCH] Add back type check --- frontend/src/ts/pages/login.ts | 2 +- frontend/src/ts/pages/settings.ts | 6 +++--- frontend/src/ts/utils/dom.ts | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/src/ts/pages/login.ts b/frontend/src/ts/pages/login.ts index 8700c1f6a..488da52dc 100644 --- a/frontend/src/ts/pages/login.ts +++ b/frontend/src/ts/pages/login.ts @@ -217,7 +217,7 @@ export const page = new Page({ beforeShow: async (): Promise => { Skeleton.append("pageLogin", "main"); registerForm = {}; - qsa(".pageLogin input")?.setValue(""); + qsa(".pageLogin input")?.setValue(""); qsa(".pageLogin .register .indicator")?.hide(); enableInputs(); disableSignUpButton(); diff --git a/frontend/src/ts/pages/settings.ts b/frontend/src/ts/pages/settings.ts index 6835755dd..622dbb128 100644 --- a/frontend/src/ts/pages/settings.ts +++ b/frontend/src/ts/pages/settings.ts @@ -841,7 +841,7 @@ qs( const didConfigSave = setConfig( "keymapSize", parseFloat( - qs( + qs( ".pageSettings .section[data-config-name='keymapSize'] .inputAndButton input", )?.getValue() as string, ), @@ -859,7 +859,7 @@ qs( const didConfigSave = setConfig( "keymapSize", parseFloat( - qs( + qs( ".pageSettings .section[data-config-name='keymapSize'] .inputAndButton input", )?.getValue() as string, ), @@ -878,7 +878,7 @@ qs( const didConfigSave = setConfig( "keymapSize", parseFloat( - qs( + qs( ".pageSettings .section[data-config-name='keymapSize'] .inputAndButton input", )?.getValue() as string, ), diff --git a/frontend/src/ts/utils/dom.ts b/frontend/src/ts/utils/dom.ts index 1aa2b8b88..db9ebfedc 100644 --- a/frontend/src/ts/utils/dom.ts +++ b/frontend/src/ts/utils/dom.ts @@ -487,7 +487,7 @@ export class ElementWithUtils { /** * Set value of input or textarea to a string. */ - setValue(value: string): this { + setValue(this: ElementWithUtils, value: string): this { if (this.hasValue()) { this.native.value = value; } @@ -498,7 +498,7 @@ export class ElementWithUtils { * Get value of input or textarea * @returns The value of the element, or undefined if the element is not an input or textarea. */ - getValue(): string | undefined { + getValue(this: ElementWithUtils): string | undefined { if (this.hasValue()) { return this.native.value; } @@ -662,12 +662,12 @@ export class ElementsWithUtils< * Set value of all inputs or textareas in the array to a string. */ - setValue(value: string): this { + setValue(this: ElementsWithUtils, value: string): this { for (const item of this) { item.setValue(value); } - return this; + return this as unknown as this; } /**