'use strict';

"use strict";
const delegateBoolean = (fn, callback) => {
  let promise = fn();
  let result = false;
  if (promise instanceof Promise) {
    promise.then((res) => {
      result = true;
    }).catch((err) => {
      result = false;
    }).finally(() => {
      if (callback) {
        callback(result);
      }
    });
  } else {
    result = promise;
    if (callback) {
      callback(result);
    }
  }
};

exports.delegateBoolean = delegateBoolean;
//# sourceMappingURL=types.js.map
