/** * Result of running an action, optionally on a target. * Instances may add further information beyond boolean success or failure. * Useful when promise chaining, to allow results to be included along with the target. */ export interface ActionResult { /** * Target on which we ran the action, if there is one. */ readonly target: T; /** * Whether or not the action succeeded. */ readonly success: boolean; readonly error?: Error; readonly errorStep?: string; } export declare function isActionResult(a: any): a is ActionResult; /** * Convenient implementation of ActionResult */ export declare class SimpleActionResult implements ActionResult { readonly target: T; readonly success: boolean; constructor(target: T, success: boolean); } export declare function successOn(t: T): ActionResult; export declare function failureOn(t: T, err: Error, f?: any): ActionResult; //# sourceMappingURL=ActionResult.d.ts.map