本文整理汇总了TypeScript中@theintern/common.Task.resolve方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Task.resolve方法的具体用法?TypeScript Task.resolve怎么用?TypeScript Task.resolve使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@theintern/common.Task
的用法示例。
在下文中一共展示了Task.resolve方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: spy
const request = spy((path: string, data: any) => {
if (requestHandler) {
return requestHandler(path, data);
}
const result = requestData && requestData[path];
return Task.resolve(result);
});
示例2: constructor
constructor(options: HttpChannelOptions) {
super(options);
this._sequence = 1;
this._maxPostSize = options.maxPostSize || 100000;
this._messageBuffer = [];
this._lastRequest = Task.resolve();
}
示例3: download
download(forceDownload = false): CancellablePromise<void> {
if (!forceDownload && this.isDownloaded) {
return Task.resolve();
}
return new Task((resolve, reject) => {
exec(
`npm install --no-save cbt_tunnels@${this.cbtVersion}`,
(error, _stdout, stderr) => {
if (error) {
console.error(stderr);
reject(error);
} else {
resolve();
}
}
);
});
}
示例5: sendJobState
sendJobState(): CancellablePromise<void> {
return Task.resolve();
}
示例6: start
start(): CancellablePromise<void> {
this._state = 'running';
return Task.resolve();
}
示例7: download
download(): CancellablePromise<void> {
return Task.resolve();
}
示例8: spy
const request = spy((path: string) => {
const data = requestData && requestData[path];
return Task.resolve(new MockResponse(data));
});