本文整理汇总了TypeScript中@angular/facade.PromiseWrapper类的典型用法代码示例。如果您正苦于以下问题:TypeScript PromiseWrapper类的具体用法?TypeScript PromiseWrapper怎么用?TypeScript PromiseWrapper使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PromiseWrapper类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
.toValue((filename, content) => {
loggedFile = {'filename': filename, 'content': content};
return PromiseWrapper.resolve(null);
})
示例2: gc
gc(): Promise<any> {
this._commandLog.push(['gc']);
return PromiseWrapper.resolve(null);
}
示例3: _echo
private _echo(val: string) {
return PromiseWrapper.wrap(() => { return val; });
}
示例4: timeBegin
timeBegin(name): Promise<any> {
this._commandLog.push(['timeBegin', name]);
return PromiseWrapper.resolve(null);
}
示例5: timeEnd
timeEnd(name, restartName): Promise<any> {
this._commandLog.push(['timeEnd', name, restartName]);
return PromiseWrapper.resolve(null);
}
示例6: reportMeasureValues
reportMeasureValues(values: MeasureValues): Promise<any[]> {
return PromiseWrapper.all(
this._reporters.map(reporter => reporter.reportMeasureValues(values)));
}
示例7: reportSample
reportSample(completeSample: MeasureValues[], validSample: MeasureValues[]): Promise<any[]> {
return PromiseWrapper.all(
this._reporters.map(reporter => reporter.reportSample(completeSample, validSample)));
}
示例8: it
it('should throw if there is no match', inject([AsyncTestCompleter], (async) => {
PromiseWrapper.catchError(createExtension(['m1'], {'browser': 'm2'}), (err) => {
expect(isPresent(err)).toBe(true);
async.done();
});
}));
示例9: reportMeasureValues
reportMeasureValues(measureValues: MeasureValues): Promise<any> {
return PromiseWrapper.resolve(null);
}
示例10: beginMeasure
/**
* Starts measuring
*/
beginMeasure(): Promise<any> {
return PromiseWrapper.all(this._metrics.map(metric => metric.beginMeasure()));
}