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