From be8e44e17e6102817bac5c2f2519ab44610525eb Mon Sep 17 00:00:00 2001 From: Florian Duros Date: Tue, 27 Sep 2022 10:58:19 +0200 Subject: [PATCH] Add types for styleElements object --- src/theme.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/theme.ts b/src/theme.ts index 54bc42f807..06267b4a9e 100644 --- a/src/theme.ts +++ b/src/theme.ts @@ -237,8 +237,8 @@ export async function setTheme(theme?: string): Promise { // look for the stylesheet elements. // styleElements is a map from style name to HTMLLinkElement. - const styleElements = Object.create(null); - const themes = Array.from(document.querySelectorAll('[data-mx-theme]')); + const styleElements: Record = Object.create(null); + const themes = Array.from(document.querySelectorAll('[data-mx-theme]')); themes.forEach(theme => { styleElements[theme.attributes['data-mx-theme'].value.toLowerCase()] = theme; });