Skip to main content
Deno 2 is finally here 🎉️
Learn more
Extremely Popular
Go to Latest
interface ThemeFunction
import { type ThemeFunction } from "https://deno.land/x/fresh@1.6.1/plugins/twindv1_deps.ts";

Type Parameters

optional
Theme extends BaseTheme = BaseTheme

Call Signatures

(): Theme
<Section extends keyof Theme & string>(section: Section | KebabCase<Section>): Theme[Section]
<Section extends keyof Theme & string, Key extends keyof Theme[Section]>(section: Section | KebabCase<Section>, key: Key): ThemeValue<Theme[Section]> | undefined
<Section extends keyof Theme & string>(section: Section | KebabCase<Section>, key: string): ThemeValue<Theme[Section]> | undefined
<Section extends keyof Theme & string, Key extends keyof Theme[Section]>(
section: Section | KebabCase<Section>,
key: Key,
defaultValue: ThemeValue<Theme[Section]>,
): ThemeValue<Theme[Section]>
<Section extends keyof Theme & string>(
section: Section | KebabCase<Section>,
key: string,
defaultValue: ThemeValue<Theme[Section]>,
): ThemeValue<Theme[Section]>
<Section extends keyof Theme & string>(key: `${Section}.${string}`): ThemeValue<Theme[Section]>
<Section extends keyof Theme & string>(key: `${Section}.${string}`, defaultValue: ThemeValue<Theme[Section]>): ThemeValue<Theme[Section]>
(section: string): unknown | undefined
(section: string, key: string): unknown | string | undefined
<T>(
section: string,
key: string,
defaultValue: T,
): T | string
<T>(key: string, defaultValue: T): T | string