diff --git a/deno.json b/deno.json index d63b4d2..6eb0dd2 100644 --- a/deno.json +++ b/deno.json @@ -26,9 +26,6 @@ "singleQuote": true }, "lint": { - "rules": { - "exclude": ["no-explicit-any"] - }, "exclude": ["npm/"] } } diff --git a/src/extend.ts b/src/extend.ts index 987108d..72fc2f3 100644 --- a/src/extend.ts +++ b/src/extend.ts @@ -8,11 +8,15 @@ import type { ExtendOptions } from './types.ts'; /** * Extend theme to UnoCSS by using `extendTheme` function. */ -export const _extendTheme = ( +export const _extendTheme = ( options: ExtendOptions = {}, -): (theme: any) => void => { +): (theme: Theme) => void => { const { prefix = 'ctp', defaultFlavour } = options; + //* We don't know what `theme` could be, since it's provided to us + //* 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 => { theme['colors'] ??= {}; diff --git a/src/index.ts b/src/index.ts index df9b0ab..94e1867 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,3 @@ -// TODO: Don't allow `no-explicit-any` after implementing `Theme` type. - import { _extendTheme } from './extend.ts'; import type { Preset } from '@unocss/core';