From 502b5c4f8bdcf450d5129cc6bb9e48e171501491 Mon Sep 17 00:00:00 2001 From: tuhana Date: Fri, 16 Aug 2024 21:41:22 +0300 Subject: [PATCH] Return the function directly instead of assigning first on `_extendTheme` --- src/extend.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/extend.ts b/src/extend.ts index 4f0eac4..e4d38b2 100644 --- a/src/extend.ts +++ b/src/extend.ts @@ -21,7 +21,7 @@ export const _extendTheme = ( //* by UnoCSS. I think we could type-safe the parts we have //* (`ThemeObject` type), but I'm not sure how to do that. // deno-lint-ignore no-explicit-any - const extendTheme = (theme: any): void => { + return (theme: any): void => { theme['colors'] ??= {}; // Determine the target object where the colours will be added @@ -58,6 +58,4 @@ export const _extendTheme = ( } } }; - - return extendTheme; };