fix: Resolve TypeScript errors
Signed-off-by: Hermes Agent <hermes@nosuchhost>
This commit is contained in:
18
client/node_modules/immediate/lib/messageChannel.js
generated
vendored
Normal file
18
client/node_modules/immediate/lib/messageChannel.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
exports.test = function () {
|
||||
if (global.setImmediate) {
|
||||
// we can only get here in IE10
|
||||
// which doesn't handel postMessage well
|
||||
return false;
|
||||
}
|
||||
return typeof global.MessageChannel !== 'undefined';
|
||||
};
|
||||
|
||||
exports.install = function (func) {
|
||||
var channel = new global.MessageChannel();
|
||||
channel.port1.onmessage = func;
|
||||
return function () {
|
||||
channel.port2.postMessage(0);
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user