本文整理汇总了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();
});