本文整理匯總了TypeScript中rxjs.Subscriber.next方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Subscriber.next方法的具體用法?TypeScript Subscriber.next怎麽用?TypeScript Subscriber.next使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類rxjs.Subscriber
的用法示例。
在下文中一共展示了Subscriber.next方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it('should ignore next messages after unsubscription', () => {
let times = 0;
const sub = new Subscriber({
next() { times += 1; }
});
sub.next();
sub.next();
sub.unsubscribe();
sub.next();
expect(times).to.equal(2);
});
示例2:
changed: (nDoc: T, oDoc: T) => {
observer.next({
changeType: EDocumentChangeType.CHANGED,
newDocument: nDoc,
oldDocument: oDoc
});
},
示例3: DisconnectError
adapter.disconnect(device.instanceId, (err) => {
if (err) {
obs.error(new DisconnectError(err, device));
return;
}
obs.next();
obs.complete();
});
示例4: ReadCharacteristicError
adapter.readCharacteristicValue(characteristic.instanceId, (err, value) => {
if (err) {
obs.error(new ReadCharacteristicError(err, characteristic));
return;
}
obs.next(toHexString(value));
obs.complete();
});
示例5: CharacteristicDiscoveryError
adapter.getCharacteristics(service.instanceId, (err, chars) => {
if (err) {
obs.error(new CharacteristicDiscoveryError(err, service));
return;
}
obs.next(chars);
obs.complete();
});
示例6: ServiceDiscoveryError
adapter.getServices(device.instanceId, (err, services) => {
if (err) {
obs.error(new ServiceDiscoveryError(err, device));
return;
}
obs.next(services);
obs.complete();
});
示例7:
adapter.stopScan((error) => {
if (error) {
obs.error(error);
return;
}
obs.next();
obs.complete();
});