helpers.js
function createSimplePromiseCompletedAction(resolve, reject) {
    return (err, result) => {
        if (err) {
            if (reject) {
                reject(err);
            }
        }
        else {
            if (resolve) {
                resolve(result);
            }
        }
    };
}
function createSimplePromiseCompletedAction(resolve, reject) {
    return (err, result) => {
        if (err) {
            if (reject) {
                reject(err);
            }
        }
        else {
            if (resolve) {
                resolve(result);
            }
        }
    };
}
function createSimplePromiseCompletedAction ( resolve , reject ) { return ( err , result ) => { if ( err ) { if ( reject ) { reject ( err ) ; } } else { if ( resolve ) { resolve ( result ) ; } } } ; }
Creates a simple 'completed' callback for a promise.

@param {Function} resolve The 'succeeded' callback.
@param {Function} reject The 'error' callback.

@return {SimpleCompletedAction<TResult>} The created action.
Creates a simple completed callback for a promise .