Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

ThemeFunction

interface ThemeFunction <Theme extends BaseTheme = BaseTheme> {
(): 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;
}

§Type Parameters

§
Theme extends BaseTheme = BaseTheme
[src]

§Call Signatures

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