GenerateConfig
Defined in: packages/core/src/types.ts:531
Configuration for screen ID generation in the generate command.
Controls how route parameters like :id are converted to screen IDs.
Example
Section titled “Example”const generate: GenerateConfig = { smartParameterNaming: true, parameterMapping: { ":id": "detail", ":userId": "user" },}Properties
Section titled “Properties”parameterMapping?
Section titled “parameterMapping?”
optionalparameterMapping:Record<`:${string}`,string>
Defined in: packages/core/src/types.ts:549
Custom parameter mappings for screen ID generation.
Maps route parameter names (must start with :) to semantic screen ID segments.
Takes precedence over smart defaults when both are enabled.
Example
Section titled “Example”{ ":id": "detail", ":userId": "user", ":postId": "post" }smartParameterNaming?
Section titled “smartParameterNaming?”
optionalsmartParameterNaming:boolean
Defined in: packages/core/src/types.ts:541
Enable smart parameter inference for screen IDs. When true, applies intelligent defaults:
:idat path end →detail:xxxIdpattern → extracts entity name (e.g.,:userId→user):idbefore action segments (edit/new) → preserved for context
Default
Section titled “Default”false (preserves backward compatibility)Example
Section titled “Example”trueunmappedParameterStrategy?
Section titled “unmappedParameterStrategy?”
optionalunmappedParameterStrategy:"warn"|"preserve"|"detail"
Defined in: packages/core/src/types.ts:559
Strategy for handling parameters not covered by mappings or smart defaults.
- “preserve”: Keep the parameter name as-is (e.g.,
:userId→userId) (default) - “detail”: Convert all unmapped parameters to “detail”
- “warn”: Preserve but add a TODO comment suggesting alternatives
Default
Section titled “Default”"preserve"Example
Section titled “Example”"warn"