mirror of
https://github.com/fromchat-messenger/web.git
synced 2026-09-22 19:15:08 +03:00
Refactor code to use the new 'id' function
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user