UNPKG

askeroo

Version:

A modern CLI prompt library with flow control, history navigation, and conditional prompts

16 lines 807 B
import React from "react"; import type { FlowFunction, PluginComponentProps } from "../types/index.js"; /** * Factory function for creating standalone ask functions with custom configurations * All createAsk functions work the same way - they create their own runtime context and execute flows */ export declare function createAsk<T = any, R = any>(config: { type: string; component?: React.ComponentType<PluginComponentProps<T, R>> | ((props: any) => React.ReactElement | null); transform?: (opts: T, context: { currentGroup?: string; }, id: string) => T; onEnter?: (runtime: any, opts: T) => Promise<void> | void; onExit?: (runtime: any, opts: T) => Promise<void> | void; }): (flow: FlowFunction<any>, opts?: T) => Promise<any>; //# sourceMappingURL=ask-factory.d.ts.map