@firebase/database 0.13.5-canary.f88805e48 → 0.13.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -709,8 +709,17 @@ var beingCrawled = function () {
709
709
  */
710
710
  var setTimeoutNonBlocking = function (fn, time) {
711
711
  var timeout = setTimeout(fn, time);
712
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
713
- if (typeof timeout === 'object' && timeout['unref']) {
712
+ // Note: at the time of this comment, unrefTimer is under the unstable set of APIs. Run with --unstable to enable the API.
713
+ if (typeof timeout === 'number' &&
714
+ // @ts-ignore Is only defined in Deno environments.
715
+ typeof Deno !== 'undefined' &&
716
+ // @ts-ignore Deno and unrefTimer are only defined in Deno environments.
717
+ Deno['unrefTimer']) {
718
+ // @ts-ignore Deno and unrefTimer are only defined in Deno environments.
719
+ Deno.unrefTimer(timeout);
720
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
721
+ }
722
+ else if (typeof timeout === 'object' && timeout['unref']) {
714
723
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
715
724
  timeout['unref']();
716
725
  }