This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/rxjs/internal/util/Immediate.js

22 lines
585 B
JavaScript
Raw Normal View History

2019-08-11 18:48:02 +00:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var nextHandle = 1;
var tasksByHandle = {};
function runIfPresent(handle) {
var cb = tasksByHandle[handle];
if (cb) {
cb();
}
}
exports.Immediate = {
setImmediate: function (cb) {
var handle = nextHandle++;
tasksByHandle[handle] = cb;
Promise.resolve().then(function () { return runIfPresent(handle); });
return handle;
},
clearImmediate: function (handle) {
delete tasksByHandle[handle];
},
};
//# sourceMappingURL=Immediate.js.map