本文整理汇总了TypeScript中@eg/core/event.service.EventService类的典型用法代码示例。如果您正苦于以下问题:TypeScript service.EventService类的具体用法?TypeScript service.EventService怎么用?TypeScript service.EventService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了service.EventService类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
resp => {
let result = resp.result;
const holdResult: HoldRequestResult = {success: true};
// API can return an ID, an array of events, or a hash
// of info.
if (Number(result) > 0) {
// On success, the API returns the hold ID.
holdResult.holdId = result;
console.debug(`Hold successfully placed ${result}`);
} else {
holdResult.success = false;
console.info('Hold request failed: ', result);
if (Array.isArray(result)) { result = result[0]; }
if (this.evt.parse(result)) {
holdResult.evt = this.evt.parse(result);
} else {
holdResult.evt = this.evt.parse(result.last_event);
}
}
request.result = holdResult;
return request;
}
示例2:
).toPromise().then(resp => {
const evt = this.evt.parse(resp);
if (evt) {
this.toast.danger(evt.toString());
} else {
this.close();
}
});
示例3:
).subscribe(resp => {
const evt = this.evt.parse(resp);
if (evt) {
this.toast.danger(evt.toString());
} else {
this.close();
}
});
示例4:
).toPromise().then(async(result) => {
if (Number(result) === 1) {
this.numSucceeded++;
this.toast.success(await this.successMsg.current());
} else {
this.numFailed++;
console.error('Retarget Failed', this.evt.parse(result));
this.toast.warning(await this.errorMsg.current());
}
});
示例5: async
async(result) => {
if (Number(result) === 1) {
this.numSucceeded++;
this.toast.success(await this.successMsg.current());
} else {
this.numFailed++;
console.error(this.evt.parse(result));
this.toast.warning(await this.errorMsg.current());
}
this.cancelNext(ids);
}
示例6:
).toPromise().then(async(result) => {
if (Number(result) === 1) {
this.numSucceeded++;
this.toast.success(await this.successMsg.current());
} else {
this.numFailed++;
console.error('Mark missing failed ', this.evt.parse(result));
this.toast.warning(await this.errorMsg.current());
}
return this.markOneItemMissing(ids);
});
示例7: reject
).subscribe(queue => {
const e = this.evt.parse(queue);
if (e) {
reject(e);
} else {
// createQueue is always called after queues have
// been fetched and cached.
this.allQueues[qType].push(queue);
resolve(queue.id());
}
});