本文整理匯總了TypeScript中@phosphor/signaling.Signal.disconnectReceiver方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Signal.disconnectReceiver方法的具體用法?TypeScript Signal.disconnectReceiver怎麽用?TypeScript Signal.disconnectReceiver使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類@phosphor/signaling.Signal
的用法示例。
在下文中一共展示了Signal.disconnectReceiver方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: expect
session.messageReceived.connect((sender, msg) => {
expect(sender).to.be(session);
if (msg.type === 'stdout') {
Signal.disconnectReceiver(object);
done();
}
}, object);
示例2: catch
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);
示例3: expect
(s, type) => {
expect(defaultSession.path).to.equal(newPath);
expect(type).to.equal('path');
called = true;
Signal.disconnectReceiver(object);
},
示例4:
(s, args) => {
called = args;
Signal.disconnectReceiver(object);
},
示例5:
defaultSession.kernelChanged.connect((s, args) => {
called = args;
Signal.disconnectReceiver(object);
}, object);
示例6: expect
defaultSession.propertyChanged.connect((s, type) => {
expect(defaultSession.path).to.be(newPath);
expect(type).to.be('path');
called = true;
Signal.disconnectReceiver(object);
}, object);
示例7: expect
defaultKernel.iopubMessage.connect((k, msg) => {
expect(msg.header.msg_type).to.be('status');
Signal.disconnectReceiver(object);
called = true;
}, object);
示例8:
defaultKernel.statusChanged.connect(() => {
if (defaultKernel.status === 'busy') {
Signal.disconnectReceiver(object);
called = true;
}
}, object);
示例9: expect
manager.runningChanged.connect((sender, args) => {
expect(sender).to.be(manager);
expect(toArray(args).length).to.be.greaterThan(0);
Signal.disconnectReceiver(object);
done();
}, object);