chore(ts2dart): replace List with Array

Closes #3514
This commit is contained in:
Misko Hevery
2015-08-28 11:29:19 -07:00
committed by Miško Hevery
parent 4415855683
commit e916836261
204 changed files with 815 additions and 947 deletions

View File

@ -16,7 +16,7 @@ class DemoApp {
previousClick: string;
action: string;
clickCount: number;
items: List<number>;
items: number[];
constructor() {
this.previousClick = 'Nothing';

View File

@ -39,7 +39,7 @@ function creditCardValidator(c): StringMap<string, boolean> {
class ShowError {
formDir;
controlPath: string;
errorTypes: List<string>;
errorTypes: string[];
constructor(@Host() formDir: NgFormModel) { this.formDir = formDir; }

View File

@ -197,7 +197,7 @@ class PersonsComponent {
@View({
template: `
<button (click)="switchToEditName()">Edit Full Name</button>
<button (click)="switchToPersonList()">Person List</button>
<button (click)="switchToPersonList()">Person Array</button>
<full-name-cmp *ng-if="mode == 'editName'"></full-name-cmp>
<persons-cmp *ng-if="mode == 'personList'"></persons-cmp>

View File

@ -105,7 +105,7 @@ class InboxDetailCmp {
@Component({selector: 'inbox'})
@View({templateUrl: "inbox.html", directives: [NgFor, RouterLink]})
class InboxCmp {
items: List<InboxRecord> = [];
items: InboxRecord[] = [];
ready: boolean = false;
constructor(public router: Router, db: DbService) {
@ -120,7 +120,7 @@ class InboxCmp {
@Component({selector: 'drafts'})
@View({templateUrl: "drafts.html", directives: [NgFor, RouterLink]})
class DraftsCmp {
items: List<InboxRecord> = [];
items: InboxRecord[] = [];
ready: boolean = false;
constructor(public router: Router, db: DbService) {

View File

@ -73,7 +73,7 @@ class CreditCardValidator {
class ShowError {
formDir;
controlPath: string;
errorTypes: List<string>;
errorTypes: string[];
constructor(@Host() formDir: NgForm) { this.formDir = formDir; }

View File

@ -24,7 +24,7 @@ export class TodoFactory {
// Store manages any generic item that inherits from KeyModel
@Injectable()
export class Store {
list: List<KeyModel> = [];
list: KeyModel[] = [];
add(record: KeyModel): void { this.list.push(record); }

View File

@ -63,7 +63,7 @@ export class BitmapService {
return imageData;
}
private _swap(data: List<any>, index1: number, index2: number) {
private _swap(data: any[], index1: number, index2: number) {
var temp = data[index1];
data[index1] = data[index2];
data[index2] = temp;

View File

@ -28,7 +28,7 @@ export class TodoFactory {
// Store manages any generic item that inherits from KeyModel
@Injectable()
export class Store {
list: List<KeyModel> = [];
list: KeyModel[] = [];
add(record: KeyModel): void { this.list.push(record); }

View File

@ -14,7 +14,7 @@ import {Zippy} from './zippy';
directives: [Zippy, NgFor]
})
class ZippyApp {
logs: Array<string> = [];
logs: string[] = [];
pushLog(log: string) { this.logs.push(log); }
}