"use strict";

export function createTimeoutPromise(ms, unsubscribe) {
  const promise = new Promise((_, reject) => {
    setTimeout(() => {
      try {
        if (unsubscribe) {
          unsubscribe();
        }
      } catch (e) {}
      // result and stay silent.
      reject();
    }, ms);
  });
  promise.catch(() => {});
  return promise;
}
//# sourceMappingURL=createTimeoutPromise.xmpp.js.map