本文整理匯總了TypeScript中vs/base/common/winjs.base.Promise類的典型用法代碼示例。如果您正苦於以下問題:TypeScript base.Promise類的具體用法?TypeScript base.Promise怎麽用?TypeScript base.Promise使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了base.Promise類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1:
var factoryFactory = (n: number) => () => {
return Promise.as(n);
};
示例2: Promise
var factory = () => new Promise((c, e, p) => {
Promise.timeout(0).done(() => {
p(order++);
c(true);
});
});
示例3: getParent
getParent(tree: ITree, element: any): Promise {
return Promise.as(null);
}
示例4:
.then(all => Promise.join(all
.filter(filter)
.map(one => pfs.unlink(path.join(cachePath, one)).then(null, () => null))
))
示例5:
zipfile.once('close', () => Promise.join(promises).done(c, e));
示例6: getChildren
getChildren(tree: ITree, element: any): Promise {
const model = this.modelProvider.getModel();
return Promise.as(model === element ? model.entries : []);
}