From 68777ec421d41be0da27013afd4165ae7d658d26 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Mon, 13 Jul 2026 23:17:25 +0530 Subject: refactor: added linting with esling and also resolved warnings for it --- src/shared/styling.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/shared/styling.ts') diff --git a/src/shared/styling.ts b/src/shared/styling.ts index b19ace4..57a39f6 100644 --- a/src/shared/styling.ts +++ b/src/shared/styling.ts @@ -5,12 +5,12 @@ * @param selector - CSS selector string. * @param styles - A map of CSS property names to values. */ -export function styles(selector: string, styles: Record) { - const elements = Array.from(document.querySelectorAll(selector)) as HTMLElement[]; +export function styles(selector: string, styles: Record): void { + const elements = Array.from(document.querySelectorAll(selector)); for (const element of elements) { for (const styleType in styles) { - element.style[styleType as any] = styles[styleType]; + (element as HTMLElement).style.setProperty(styleType, styles[styleType]); } } }; -- cgit v1.2.3