@ -120,9 +120,8 @@ function _mayBeAddRecord(record: ProtoRecord, dstRecords: ProtoRecord[], exclude
|
||||
*/
|
||||
function _findFirstMatch(record: ProtoRecord, dstRecords: ProtoRecord[],
|
||||
excludedIdxs: number[]): ProtoRecord {
|
||||
return ListWrapper.find(
|
||||
dstRecords,
|
||||
// TODO(vicb): optimize notReusableIndexes.indexOf (sorted array)
|
||||
return dstRecords.find(
|
||||
// TODO(vicb): optimize excludedIdxs.indexOf (sorted array)
|
||||
rr => excludedIdxs.indexOf(rr.selfIndex) == -1 && rr.mode !== RecordType.DirectiveLifecycle &&
|
||||
_haveSameDirIndex(rr, record) && rr.mode === record.mode &&
|
||||
looseIdentical(rr.funcOrValue, record.funcOrValue) &&
|
||||
|
@ -180,7 +180,7 @@ export class CodegenNameUtil {
|
||||
* Generates statements destroying all pipe variables.
|
||||
*/
|
||||
genPipeOnDestroy(): string {
|
||||
return ListWrapper.filter(this._records, (r) => { return r.isPipeRecord(); })
|
||||
return this._records.filter(r => r.isPipeRecord())
|
||||
.map(r => `${this._utilName}.callPipeOnDestroy(${this.getPipeName(r.selfIndex)});`)
|
||||
.join('\n');
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ export class IterableDiffers {
|
||||
}
|
||||
|
||||
find(iterable: Object): IterableDifferFactory {
|
||||
var factory = ListWrapper.find(this.factories, f => f.supports(iterable));
|
||||
var factory = this.factories.find(f => f.supports(iterable));
|
||||
if (isPresent(factory)) {
|
||||
return factory;
|
||||
} else {
|
||||
|
@ -71,7 +71,7 @@ export class KeyValueDiffers {
|
||||
}
|
||||
|
||||
find(kv: Object): KeyValueDifferFactory {
|
||||
var factory = ListWrapper.find(this.factories, f => f.supports(kv));
|
||||
var factory = this.factories.find(f => f.supports(kv));
|
||||
if (isPresent(factory)) {
|
||||
return factory;
|
||||
} else {
|
||||
|
@ -101,8 +101,7 @@ export class DynamicChangeDetector extends AbstractChangeDetector<any> {
|
||||
|
||||
/** @internal */
|
||||
_matchingEventBindings(eventName: string, elIndex: number): EventBinding[] {
|
||||
return ListWrapper.filter(this._eventBindings,
|
||||
eb => eb.eventName == eventName && eb.elIndex === elIndex);
|
||||
return this._eventBindings.filter(eb => eb.eventName == eventName && eb.elIndex === elIndex);
|
||||
}
|
||||
|
||||
hydrateDirectives(directives: any): void {
|
||||
|
Reference in New Issue
Block a user