UNPKG

checkscripts

Version:

Inspired by Dan Slimmon's concept of "Do Nothing scripts", this project facilitates incremental automation of repetitive tasks.

19 lines 1.17 kB
declare enum CheckscriptStepType { MANUAL = 0, AUTOMATED = 1 } export interface CheckscriptStep<Context> { name: string | null; type: CheckscriptStepType; action: CheckscriptStepAction<Context>; } export declare function step<Context>(description: TemplateStringsArray): CheckscriptStep<Context>; export declare function step<Context>(name: string, action: ManualCheckscriptStepAction): CheckscriptStep<Context>; export declare function step<Context>(name: string, action: AutomatedCheckscriptStepAction<Context>): CheckscriptStep<Context>; export declare function getDocumentStepHandler<Context>(action: CheckscriptStepAction<Context>): (_context: Context, stepTitle: string) => Promise<void>; export declare function getRunStepHandler<Context>(action: CheckscriptStepAction<Context>): (_context: Context, stepTitle: string) => Promise<void>; type CheckscriptStepAction<Context> = ManualCheckscriptStepAction | AutomatedCheckscriptStepAction<Context>; type AutomatedCheckscriptStepAction<Context> = (context: Context) => string | void | Promise<string | void>; type ManualCheckscriptStepAction = string; export {}; //# sourceMappingURL=step.d.ts.map