Skip to content

resolvePromptConfig

Generated reference page for the resolvePromptConfig function export.

Signatures

ts
function resolvePromptConfig(config: PromptConfig, enumValues: readonly string[] | undefined): ResolvedPromptConfig;
ParameterTypeDescription
configPromptConfigRaw prompt config from FlagSchema.prompt
enumValuesreadonly string[] | undefinedOptional enum values from FlagSchema.enumValues

Members

Members

resolvePromptConfig

Prepare a ResolvedPromptConfig from a raw PromptConfig and optional enum values from the flag schema.

For select/multiselect prompts without explicit choices, this merges the flag's enum values into the choices list. Throws if no choices are available.

This function is called by the resolution chain (prompt-resolve-1), not by the engine itself — keeping the engine free of schema knowledge.

ts
(config: PromptConfig, enumValues: readonly string[] | undefined): ResolvedPromptConfig;

See Also

Released under the MIT License.