@adyen/adyen-platform-experience-web
Version:

25 lines (24 loc) • 773 B
JavaScript
import { createWatchlist as i } from "../../reactive/watchlist/main.js";
import { createInterval as n } from "../interval/main.js";
import { struct as a } from "../../../utils/struct/main.js";
import { enumerable as r } from "../../../utils/struct/property.js";
const f = (() => {
let e;
const { cancelSubscriptions: o, requestNotification: c, subscribe: s, on: t } = i({
// Use wrapper function instead of direct reference to `Date.now`,
// otherwise, tests will fail since `Date.now` won't be mocked
now: () => Date.now()
});
return t.resume = () => {
e = n(c, 1e3, !1);
}, t.idle = () => {
e == null || e.cancel(), e = void 0;
}, a({
cancelSubscriptions: r(o),
subscribe: r(s)
});
})();
export {
f as clock,
f as default
};