export var createExternallyResolvablePromise = function () {
    var resolve;
    var reject;
    var promise = new Promise(function (argResolve, argReject) {
        resolve = argResolve;
        reject = argReject;
    });
    var fromPromise = function (targetPromise) {
        targetPromise.then(resolve).catch(reject);
    };
    return {
        resolve: resolve,
        reject: reject,
        promise: promise,
        fromPromise: fromPromise,
    };
};
