import type prompts from 'prompts'; import type { Logger } from 'winston'; import type { z } from 'zod'; import type { BizOpsSystem } from './bizOps'; /** * A function that should use the `prompt` parameter passed to build a more * complex option structure, like a nested object, from user input. Returning * an undefined value will cause the program to fall back to the default prompt * interface. * @param onCancel - pass this to `prompt`'s options so that a user * interrupting the prompt can be handled properly */ export type SchemaPromptGenerator = (logger: Logger, prompt: typeof prompts, onCancel: () => void, bizOpsSystem?: BizOpsSystem) => Promise; type InferZodShape = T extends z.ZodObject ? Shape : T extends z.ZodEffects ? InferZodShape : never; export type PromptGenerators = { [option in keyof InferZodShape]?: SchemaPromptGenerator[option]>>; }; export {}; //# sourceMappingURL=prompts.d.ts.map