Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
signal.connect((sender: T, args: U) => {
if (!options.find || options.find(sender, args)) {
try {
Signal.disconnectReceiver(object);
if (options.test) {
options.test(sender, args);
}
} catch (e) {
done.reject(e);
}
done.resolve(options.value || undefined);
}
}, object);
return done.promise;
defaultSession.kernelChanged.connect((s, args) => {
called = args;
Signal.disconnectReceiver(object);
}, object);
const previous = defaultSession.kernel;