chore: kill ListWrapper.create() and .push().
These wrappers are not natively understood by ts2dart. Removing them will improve Dart2JS compilation due to fewer megamorphic calls to List functions. It also makes Angular code more succinct and improves type safety in Angular due to better type inference of the Array component type. This change exposed several bugs in Angular.
This commit is contained in:
@ -213,15 +213,15 @@ class IgnoreCurrentElementStep implements CompileStep {
|
||||
}
|
||||
}
|
||||
|
||||
function logEntry(log, parent, current) {
|
||||
function logEntry(log: string[], parent, current) {
|
||||
var parentId = '';
|
||||
if (isPresent(parent)) {
|
||||
parentId = DOM.getAttribute(parent.element, 'id') + '<';
|
||||
}
|
||||
ListWrapper.push(log, parentId + DOM.getAttribute(current.element, 'id'));
|
||||
log.push(parentId + DOM.getAttribute(current.element, 'id'));
|
||||
}
|
||||
|
||||
function createLoggerStep(log) {
|
||||
function createLoggerStep(log: string[]) {
|
||||
return new MockStep((parent, current, control) => { logEntry(log, parent, current); });
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user