buildInitialParams function presentation exported
Last updated: 2026-03-04T23:21:38.421Z
Metrics
LOC: 11
Complexity: 3
Params: 3
Signature
buildInitialParams(
defs: readonly GeneratorParamDef[],
existing: GeneratorParams,
): : GeneratorParams
Summary
Builds initial params from param defs, merging existing values.
Source Code
export function buildInitialParams(
defs: readonly GeneratorParamDef[],
existing: GeneratorParams,
): GeneratorParams {
const result: Record<string, unknown> = {};
for (const def of defs) {
const k = def.key as string;
result[k] = k in existing ? existing[k] : def.defaultValue;
}
return result as GeneratorParams;
}
No outgoing dependencies.
Impact (Incoming)
| Source | Type |
|---|---|
| GeneratorOption | calls |
| FormsTabViewCallbacks | calls |
| handleGeneratorTypeChange | calls |