當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript facade.PromiseWrapper類代碼示例

本文整理匯總了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);
 })
開發者ID:2blessed2bstressedbythedevilsmess,項目名稱:angular,代碼行數:4,代碼來源:json_file_reporter_spec.ts

示例2: gc

 gc(): Promise<any> {
   this._commandLog.push(['gc']);
   return PromiseWrapper.resolve(null);
 }
開發者ID:2blessed2bstressedbythedevilsmess,項目名稱:angular,代碼行數:4,代碼來源:perflog_metric_spec.ts

示例3: _echo

 private _echo(val: string) {
   return PromiseWrapper.wrap(() => { return val; });
 }
開發者ID:davewragg,項目名稱:angular,代碼行數:3,代碼來源:index_common.ts

示例4: timeBegin

 timeBegin(name): Promise<any> {
   this._commandLog.push(['timeBegin', name]);
   return PromiseWrapper.resolve(null);
 }
開發者ID:2blessed2bstressedbythedevilsmess,項目名稱:angular,代碼行數:4,代碼來源:perflog_metric_spec.ts

示例5: timeEnd

 timeEnd(name, restartName): Promise<any> {
   this._commandLog.push(['timeEnd', name, restartName]);
   return PromiseWrapper.resolve(null);
 }
開發者ID:2blessed2bstressedbythedevilsmess,項目名稱:angular,代碼行數:4,代碼來源:perflog_metric_spec.ts

示例6: reportMeasureValues

 reportMeasureValues(values: MeasureValues): Promise<any[]> {
   return PromiseWrapper.all(
       this._reporters.map(reporter => reporter.reportMeasureValues(values)));
 }
開發者ID:0xJoKe,項目名稱:angular,代碼行數:4,代碼來源:multi_reporter.ts

示例7: reportSample

 reportSample(completeSample: MeasureValues[], validSample: MeasureValues[]): Promise<any[]> {
   return PromiseWrapper.all(
       this._reporters.map(reporter => reporter.reportSample(completeSample, validSample)));
 }
開發者ID:0xJoKe,項目名稱:angular,代碼行數:4,代碼來源:multi_reporter.ts

示例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();
      });
    }));
開發者ID:0xJoKe,項目名稱:angular,代碼行數:6,代碼來源:web_driver_extension_spec.ts

示例9: reportMeasureValues

 reportMeasureValues(measureValues: MeasureValues): Promise<any> {
   return PromiseWrapper.resolve(null);
 }
開發者ID:0xJoKe,項目名稱:angular,代碼行數:3,代碼來源:json_file_reporter.ts

示例10: beginMeasure

 /**
  * Starts measuring
  */
 beginMeasure(): Promise<any> {
   return PromiseWrapper.all(this._metrics.map(metric => metric.beginMeasure()));
 }
開發者ID:0xJoKe,項目名稱:angular,代碼行數:6,代碼來源:multi_metric.ts


注:本文中的@angular/facade.PromiseWrapper類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。