ThemeName
tipo Desde 1.4.0
Nombre de un tema de la aplicación: la unión de los themes de meeko.config.ts cuando
meeko check generó sus tipos (.meeko/types/routes.d.ts); sin ellos, string.
ts
import type { ThemeName } from "@meekojs/meeko/framework";Código fuente src/shared/theme.ts:104
Declaración #
ts
type ThemeName = GeneratedTheme extends { readonly themes: infer Name extends string } ? Name : stringEjemplo #
ts
import type { ThemeName } from "@meekojs/meeko/framework";
const icons: Record<ThemeName, string> = { light: "sol", dark: "luna" };