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:
@@ -118,11 +118,11 @@ export class MdDialog {
|
||||
});
|
||||
}
|
||||
|
||||
alert(message: string, okMessage: string): Promise {
|
||||
alert(message: string, okMessage: string): Promise<any> {
|
||||
throw "Not implemented";
|
||||
}
|
||||
|
||||
confirm(message: string, okMessage: string, cancelMessage: string): Promise {
|
||||
confirm(message: string, okMessage: string, cancelMessage: string): Promise<any> {
|
||||
throw "Not implemented";
|
||||
}
|
||||
}
|
||||
@@ -176,7 +176,7 @@ export class MdDialogRef {
|
||||
|
||||
|
||||
/** Gets a promise that is resolved when the dialog is closed. */
|
||||
get whenClosed(): Promise {
|
||||
get whenClosed(): Promise<any> {
|
||||
return this.whenClosedDeferred.promise;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ export class MdGridList {
|
||||
}
|
||||
|
||||
set cols(value) {
|
||||
this._cols = isString(value) ? NumberWrapper.parseInt(value, 10) : value;
|
||||
this._cols = isString(value) ? NumberWrapper.parseInt(value, 10) : <number>value;
|
||||
}
|
||||
|
||||
get cols() {
|
||||
@@ -105,7 +105,7 @@ export class MdGridList {
|
||||
* @param tile
|
||||
*/
|
||||
addTile(tile: MdGridTile) {
|
||||
ListWrapper.push(this.tiles, tile);
|
||||
this.tiles.push(tile);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -253,7 +253,7 @@ export class MdGridTile {
|
||||
}
|
||||
|
||||
set rowspan(value) {
|
||||
this._rowspan = isString(value) ? NumberWrapper.parseInt(value, 10) : value;
|
||||
this._rowspan = isString(value) ? NumberWrapper.parseInt(value, 10) : <number>value;
|
||||
}
|
||||
|
||||
get rowspan() {
|
||||
@@ -261,7 +261,7 @@ export class MdGridTile {
|
||||
}
|
||||
|
||||
set colspan(value) {
|
||||
this._colspan = isString(value) ? NumberWrapper.parseInt(value, 10) : value;
|
||||
this._colspan = isString(value) ? NumberWrapper.parseInt(value, 10) : <number>value;
|
||||
}
|
||||
|
||||
get colspan() {
|
||||
|
||||
@@ -119,7 +119,7 @@ export class MdRadioGroup {
|
||||
|
||||
/** Registers a child radio button with this group. */
|
||||
register(radio: MdRadioButton) {
|
||||
ListWrapper.push(this.radios_, radio);
|
||||
this.radios_.push(radio);
|
||||
}
|
||||
|
||||
/** Handles up and down arrow key presses to change the selected child radio. */
|
||||
|
||||
@@ -19,6 +19,6 @@ export class MdRadioDispatcher {
|
||||
|
||||
/** Listen for future changes to radio button selection. */
|
||||
listen(listener) {
|
||||
ListWrapper.push(this.listeners_, listener);
|
||||
this.listeners_.push(listener);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user