Refactor code to use the new 'id' function

This commit is contained in:
2025-08-26 00:16:38 +03:00
Unverified
parent 909a13eae1
commit 6efb21ff20
12 changed files with 83 additions and 74 deletions
+4
View File
@@ -30,4 +30,8 @@ export function formatTime(dateString: string): string {
*/
export function delay(ms: number): Promise<void> {
return new Promise(resolve => setTimeout(resolve, ms));
}
export function id<T extends Element = HTMLElement>(id: string): T {
return document.getElementById(id) as unknown as T
}