本文整理汇总了TypeScript中angular2/src/facade/collection.List.forEach方法的典型用法代码示例。如果您正苦于以下问题:TypeScript List.forEach方法的具体用法?TypeScript List.forEach怎么用?TypeScript List.forEach使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类angular2/src/facade/collection.List
的用法示例。
在下文中一共展示了List.forEach方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: getNonNullPipeNames
getNonNullPipeNames(): List<string> {
var pipes = [];
this.records.forEach((r) => {
if (r.mode === RECORD_TYPE_PIPE || r.mode === RECORD_TYPE_BINDING_PIPE) {
pipes.push(this.pipeNames[r.selfIndex]);
}
});
return pipes;
}
示例2: _getNonNullPipeNames
_getNonNullPipeNames(): List<string> {
var pipes = [];
this.records.forEach((r) => {
if (r.isPipeRecord()) {
pipes.push(this._pipeNames[r.selfIndex]);
}
});
return pipes;
}
示例3: _printDescription
_printDescription(sampleDescription) {
this._print(`BENCHMARK ${sampleDescription.id}`);
this._print('Description:');
var props = ConsoleReporter._sortedProps(sampleDescription.description);
props.forEach((prop) => { this._print(`- ${prop}: ${sampleDescription.description[prop]}`); });
this._print('Metrics:');
this._metricNames.forEach((metricName) => {
this._print(`- ${metricName}: ${sampleDescription.metrics[metricName]}`);
});
this._print('');
this._printStringRow(this._metricNames);
this._printStringRow(this._metricNames.map((_) => ''), '-');
}
示例4: notify
/** Notify other nadio buttons that selection for the given name has been set. */
notify(name: string) {
this.listeners_.forEach(listener => listener(name));
}
示例5:
return styles.map(style => {
this.steps.forEach(step => { style = step.processStyle(style); });
return style;
});