本文整理匯總了TypeScript中rxjs.Subscriber.complete方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Subscriber.complete方法的具體用法?TypeScript Subscriber.complete怎麽用?TypeScript Subscriber.complete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類rxjs.Subscriber
的用法示例。
在下文中一共展示了Subscriber.complete方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1:
this.import(data, (d, e) => {
if (e) {
sub.error(e);
} else {
sub.next(d);
sub.complete();
}
});
示例2:
adapter.open(openOptions, (error) => {
if (error) {
obs.error(error);
return;
}
obs.next(adapter);
obs.complete();
});
示例3: CharacteristicDiscoveryError
adapter.getCharacteristics(service.instanceId, (err, chars) => {
if (err) {
obs.error(new CharacteristicDiscoveryError(err, service));
return;
}
obs.next(chars);
obs.complete();
});
示例4: DisconnectError
adapter.disconnect(device.instanceId, (err) => {
if (err) {
obs.error(new DisconnectError(err, device));
return;
}
obs.next();
obs.complete();
});
示例5: ReadCharacteristicError
adapter.readCharacteristicValue(characteristic.instanceId, (err, value) => {
if (err) {
obs.error(new ReadCharacteristicError(err, characteristic));
return;
}
obs.next(toHexString(value));
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:
spawn.on("disconnect", () => {
observer.next(
actions.setExecutionState({
kernelStatus: "process disconnected",
kernelRef: action.payload.kernelRef
})
);
observer.complete();
});
示例8: request
request(url, params, (err: Error, response: IncomingMessage, body: any) => {
if (err) {
return subscriber.error(err);
}
Request.recentResponse = response;
subscriber.next(body);
subscriber.complete();
});