import Promise = require("bluebird"); import { AbstractSkeletosAction } from "./AbstractSkeletosAction"; /** * This is simply a wrapper for the AbstractSkeletosAction that allows to to wrap * the .execute() function in a promise. This is useful when we which to interpret any callback * errors. * */ export declare abstract class AbstractSkeletosPromiseAction extends AbstractSkeletosAction { protected returnValue: ReturnType; protected _resolve: (value?: ReturnType) => void; protected _reject: (error?: any) => void; /** * Returns the action as a promise using the ReturnType as specified by the subclass. * * Do *not* use this in conjunction with `execute()`. * * @returns {Promise|Promise} */ asPromise(): Promise; /** * We override the doAfterExecute(..) function in order to reject or resolve the promise * * @param err */ protected doAfterExecute(err?: Error): void; }