Skip to main content

Function: defineConfig()

function defineConfig<S, G>(config): TakoConfig;

Defined in: packages/config/src/define.ts:18

@kurotako/config — resolve, load and validate tako.config.ts, and the defineConfig helper user config files import. Builds the @kurotako/core ResolvedConfig the CLI hands to run().

See backlog/features/config-system/technical.md.

Type Parameters​

Type Parameter
S extends Record<string, { options?: unknown; use: unknown; }>
G extends readonly { namespaces?: string[]; options?: unknown; use: unknown; }[]

Parameters​

ParameterType
config{ generators: G & { [K in string | number | symbol]: GeneratorEntry<G[K]["use"]> }; hooks?: TakoHooks; outputs: readonly OutputOption[]; sources: S & { [K in string | number | symbol]: SourceEntry<S[K]["use"]> }; }
config.generatorsG & { [K in string | number | symbol]: GeneratorEntry<G[K]["use"]> }
config.hooks?TakoHooks
config.outputsreadonly OutputOption[]
config.sourcesS & { [K in string | number | symbol]: SourceEntry<S[K]["use"]> }

Returns​

TakoConfig