Add back type check

This commit is contained in:
Leonabcd123 2025-12-18 21:46:38 +02:00
parent 48b1af0699
commit 9acadeb1f8
3 changed files with 8 additions and 8 deletions

View file

@ -217,7 +217,7 @@ export const page = new Page({
beforeShow: async (): Promise<void> => {
Skeleton.append("pageLogin", "main");
registerForm = {};
qsa(".pageLogin input")?.setValue("");
qsa<HTMLInputElement>(".pageLogin input")?.setValue("");
qsa(".pageLogin .register .indicator")?.hide();
enableInputs();
disableSignUpButton();

View file

@ -841,7 +841,7 @@ qs(
const didConfigSave = setConfig(
"keymapSize",
parseFloat(
qs(
qs<HTMLInputElement>(
".pageSettings .section[data-config-name='keymapSize'] .inputAndButton input",
)?.getValue() as string,
),
@ -859,7 +859,7 @@ qs(
const didConfigSave = setConfig(
"keymapSize",
parseFloat(
qs(
qs<HTMLInputElement>(
".pageSettings .section[data-config-name='keymapSize'] .inputAndButton input",
)?.getValue() as string,
),
@ -878,7 +878,7 @@ qs(
const didConfigSave = setConfig(
"keymapSize",
parseFloat(
qs(
qs<HTMLInputElement>(
".pageSettings .section[data-config-name='keymapSize'] .inputAndButton input",
)?.getValue() as string,
),

View file

@ -487,7 +487,7 @@ export class ElementWithUtils<T extends HTMLElement = HTMLElement> {
/**
* Set value of input or textarea to a string.
*/
setValue(value: string): this {
setValue(this: ElementWithUtils<ElementWithValue>, value: string): this {
if (this.hasValue()) {
this.native.value = value;
}
@ -498,7 +498,7 @@ export class ElementWithUtils<T extends HTMLElement = HTMLElement> {
* 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<ElementWithValue>): 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<ElementWithValue>, value: string): this {
for (const item of this) {
item.setValue(value);
}
return this;
return this as unknown as this;
}
/**