chore: noImplicitAny fixes

This commit is contained in:
Misko Hevery 2016-02-11 17:01:17 -08:00 committed by vsavkin
parent cfc1e56dd8
commit 8bb66a5eb3
38 changed files with 219 additions and 147 deletions

View File

@ -2,7 +2,7 @@ import {provide} from 'angular2/core';
import {bootstrap} from 'angular2/bootstrap'; import {bootstrap} from 'angular2/bootstrap';
import {UrlResolver} from 'angular2/compiler'; import {UrlResolver} from 'angular2/compiler';
var MyApp; var MyApp: any;
// #docregion url_resolver // #docregion url_resolver
class MyUrlResolver extends UrlResolver { class MyUrlResolver extends UrlResolver {

View File

@ -1,7 +1,7 @@
import {DebugElement} from 'angular2/core'; import {DebugElement} from 'angular2/core';
var debugElement: DebugElement; var debugElement: DebugElement;
var predicate; var predicate: any;
// #docregion scope_all // #docregion scope_all
debugElement.query(predicate); debugElement.query(predicate);

View File

@ -2,8 +2,8 @@ import {bootstrap} from 'angular2/bootstrap';
import {NG_VALIDATORS} from 'angular2/common'; import {NG_VALIDATORS} from 'angular2/common';
import {Provider} from 'angular2/core'; import {Provider} from 'angular2/core';
let MyApp = null; let MyApp: Function = null;
let myValidator = null; let myValidator: any = null;
// #docregion ng_validators // #docregion ng_validators
bootstrap(MyApp, [new Provider(NG_VALIDATORS, {useValue: myValidator, multi: true})]); bootstrap(MyApp, [new Provider(NG_VALIDATORS, {useValue: myValidator, multi: true})]);

View File

@ -1,6 +1,6 @@
import {Component, provide} from 'angular2/core'; import {Component, provide} from 'angular2/core';
import {bootstrap} from 'angular2/bootstrap'; import {bootstrap} from 'angular2/bootstrap';
import {Observable} from 'rxjs/Observable'; import {Observable, Subscriber} from 'rxjs/Rx';
// #docregion AsyncPipe // #docregion AsyncPipe
@Component({ @Component({
@ -37,8 +37,9 @@ export class AsyncPipeExample {
// #docregion AsyncPipeObservable // #docregion AsyncPipeObservable
@Component({selector: "task-cmp", template: "Time: {{ time | async }}"}) @Component({selector: "task-cmp", template: "Time: {{ time | async }}"})
class Task { class Task {
time = new Observable<number>( time = new Observable<number>((observer: Subscriber<number>) => {
observer => { setInterval(_ => observer.next(new Date().getTime()), 500); }); setInterval(_ => observer.next(new Date().getTime()), 500);
});
} }
// #enddocregion // #enddocregion

View File

@ -12,7 +12,7 @@ import {bootstrap} from 'angular2/bootstrap';
}) })
export class LowerUpperPipeExample { export class LowerUpperPipeExample {
value: string; value: string;
change(value) { this.value = value; } change(value: string) { this.value = value; }
} }
// #enddocregion // #enddocregion

View File

@ -1,6 +1,6 @@
import {Component, Attribute, Directive, Pipe} from 'angular2/core'; import {Component, Attribute, Directive, Pipe} from 'angular2/core';
var CustomDirective; var CustomDirective: Function;
// #docregion component // #docregion component
@Component({selector: 'greet', template: 'Hello {{name}}!', directives: [CustomDirective]}) @Component({selector: 'greet', template: 'Hello {{name}}!', directives: [CustomDirective]})
@ -20,7 +20,7 @@ class Page {
// #docregion attributeMetadata // #docregion attributeMetadata
@Directive({selector: 'input'}) @Directive({selector: 'input'})
class InputAttrDirective { class InputAttrDirective {
constructor(@Attribute('type') type) { constructor(@Attribute('type') type: string) {
// type would be 'text' in this example // type would be 'text' in this example
} }
} }
@ -38,6 +38,6 @@ class InputDirective {
// #docregion pipe // #docregion pipe
@Pipe({name: 'lowercase'}) @Pipe({name: 'lowercase'})
class Lowercase { class Lowercase {
transform(v, args) { return v.toLowerCase(); } transform(v: string, args: any[]) { return v.toLowerCase(); }
} }
// #enddocregion // #enddocregion

View File

@ -1,7 +1,7 @@
// #docregion enableProdMode // #docregion enableProdMode
import {enableProdMode} from 'angular2/core'; import {enableProdMode} from 'angular2/core';
import {bootstrap} from 'angular2/bootstrap'; import {bootstrap} from 'angular2/bootstrap';
import {MyComponent} from 'my_component'; import {MyComponent} from './my_component';
enableProdMode(); enableProdMode();
bootstrap(MyComponent); bootstrap(MyComponent);

View File

@ -1,6 +1,6 @@
// #docregion Observable // #docregion Observable
import {Observable} from 'rxjs/Observable'; import {Observable, Subscriber} from 'rxjs/Rx';
var obs = new Observable<number>(obs => { var obs = new Observable<number>((obs: Subscriber<number>) => {
var i = 0; var i = 0;
setInterval(_ => { obs.next(++i); }, 1000); setInterval(_ => { obs.next(++i); }, 1000);
}); });

View File

@ -1,10 +1,10 @@
// #docregion Observable // #docregion Observable
import {Observable} from 'rxjs/Observable'; import {Observable, Subscriber} from 'rxjs/Rx';
import 'rxjs/add/operator/map'; import 'rxjs/add/operator/map';
var obs = new Observable(obs => { var obs = new Observable<number>((obs: Subscriber<any>) => {
var i = 0; var i = 0;
setInterval(_ => obs.next(++i), 1000); setInterval(_ => obs.next(++i), 1000);
}); });
obs.map(i => `${i} seconds elapsed`).subscribe(msg => console.log(msg)); obs.map((i: number) => `${i} seconds elapsed`).subscribe(msg => console.log(msg));
// #enddocregion // #enddocregion

View File

@ -1,10 +1,10 @@
// #docregion Observable // #docregion Observable
import {Observable} from 'rxjs/Observable'; import {Observable, Subscriber} from 'rxjs/Rx';
import {map} from 'rxjs/operator/map'; import {map} from 'rxjs/operator/map';
var obs = new Observable(obs => { var obs = new Observable<number>((sub: Subscriber<number>) => {
var i = 0; var i = 0;
setInterval(_ => obs.next(++i), 1000); setInterval(_ => sub.next(++i), 1000);
}); });
map.call(obs, i => `${i} seconds elapsed`).subscribe(msg => console.log(msg)); map.call(obs, (i: number) => `${i} seconds elapsed`).subscribe((msg: string) => console.log(msg));
// #enddocregion // #enddocregion

View File

@ -1,6 +1,6 @@
import {verifyNoBrowserErrors} from 'angular2/src/testing/e2e_util'; import {verifyNoBrowserErrors} from 'angular2/src/testing/e2e_util';
function waitForElement(selector) { function waitForElement(selector: string) {
var EC = (<any>protractor).ExpectedConditions; var EC = (<any>protractor).ExpectedConditions;
// Waits for the element with id 'abc' to be present on the dom. // Waits for the element with id 'abc' to be present on the dom.
browser.wait(EC.presenceOf($(selector)), 20000); browser.wait(EC.presenceOf($(selector)), 20000);

View File

@ -1,6 +1,6 @@
import {verifyNoBrowserErrors} from 'angular2/src/testing/e2e_util'; import {verifyNoBrowserErrors} from 'angular2/src/testing/e2e_util';
function waitForElement(selector) { function waitForElement(selector: string) {
var EC = (<any>protractor).ExpectedConditions; var EC = (<any>protractor).ExpectedConditions;
// Waits for the element with id 'abc' to be present on the dom. // Waits for the element with id 'abc' to be present on the dom.
browser.wait(EC.presenceOf($(selector)), 20000); browser.wait(EC.presenceOf($(selector)), 20000);

View File

@ -1,6 +1,6 @@
import {verifyNoBrowserErrors} from 'angular2/src/testing/e2e_util'; import {verifyNoBrowserErrors} from 'angular2/src/testing/e2e_util';
function waitForElement(selector) { function waitForElement(selector: string) {
var EC = (<any>protractor).ExpectedConditions; var EC = (<any>protractor).ExpectedConditions;
// Waits for the element with id 'abc' to be present on the dom. // Waits for the element with id 'abc' to be present on the dom.
browser.wait(EC.presenceOf($(selector)), 20000); browser.wait(EC.presenceOf($(selector)), 20000);

View File

@ -1,6 +1,6 @@
import {verifyNoBrowserErrors} from 'angular2/src/testing/e2e_util'; import {verifyNoBrowserErrors} from 'angular2/src/testing/e2e_util';
function waitForElement(selector) { function waitForElement(selector: string) {
var EC = (<any>protractor).ExpectedConditions; var EC = (<any>protractor).ExpectedConditions;
// Waits for the element with id 'abc' to be present on the dom. // Waits for the element with id 'abc' to be present on the dom.
browser.wait(EC.presenceOf($(selector)), 20000); browser.wait(EC.presenceOf($(selector)), 20000);

View File

@ -1,6 +1,6 @@
import {verifyNoBrowserErrors} from 'angular2/src/testing/e2e_util'; import {verifyNoBrowserErrors} from 'angular2/src/testing/e2e_util';
function waitForElement(selector) { function waitForElement(selector: string) {
var EC = (<any>protractor).ExpectedConditions; var EC = (<any>protractor).ExpectedConditions;
// Waits for the element with id 'abc' to be present on the dom. // Waits for the element with id 'abc' to be present on the dom.
browser.wait(EC.presenceOf($(selector)), 20000); browser.wait(EC.presenceOf($(selector)), 20000);

View File

@ -73,7 +73,7 @@ describe('some component', () => {
// #docregion beforeEachProviders // #docregion beforeEachProviders
describe('some component', () => { describe('some component', () => {
beforeEachProviders(() => [provide(MyService, {useClass: MyMockService})]); beforeEachProviders(() => [provide(MyService, {useClass: MyMockService})]);
it('uses MyService', inject([MyService], (service) => { it('uses MyService', inject([MyService], (service: MyMockService) => {
// service is an instance of MyMockService. // service is an instance of MyMockService.
})); }));
}); });
@ -81,7 +81,7 @@ describe('some component', () => {
// #docregion afterEach // #docregion afterEach
describe('some component', () => { describe('some component', () => {
afterEach((done) => { db.reset().then((_) => done()); }); afterEach((done: Function) => { db.reset().then((_: any) => done()); });
it('uses the db', () => { it('uses the db', () => {
// This test can leave the database in a dirty state. // This test can leave the database in a dirty state.
// The afterEach will ensure it gets reset. // The afterEach will ensure it gets reset.

View File

@ -52,7 +52,7 @@ export class Animation {
this.startTime = DateWrapper.toMillis(DateWrapper.now()); this.startTime = DateWrapper.toMillis(DateWrapper.now());
this._stringPrefix = DOM.getAnimationPrefix(); this._stringPrefix = DOM.getAnimationPrefix();
this.setup(); this.setup();
this.wait(timestamp => this.start()); this.wait((timestamp: any) => this.start());
} }
wait(callback: Function) { wait(callback: Function) {
@ -97,7 +97,7 @@ export class Animation {
* @param styles * @param styles
*/ */
applyStyles(styles: {[key: string]: any}): void { applyStyles(styles: {[key: string]: any}): void {
StringMapWrapper.forEach(styles, (value, key) => { StringMapWrapper.forEach(styles, (value: any, key: string) => {
var dashCaseKey = camelCaseToDashCase(key); var dashCaseKey = camelCaseToDashCase(key);
if (isPresent(DOM.getStyle(this.element, dashCaseKey))) { if (isPresent(DOM.getStyle(this.element, dashCaseKey))) {
DOM.setStyle(this.element, dashCaseKey, value.toString()); DOM.setStyle(this.element, dashCaseKey, value.toString());

View File

@ -17,7 +17,7 @@ export class BrowserDetails {
DOM.setAttribute(div, 'style', `position: absolute; top: -9999px; left: -9999px; width: 1px; DOM.setAttribute(div, 'style', `position: absolute; top: -9999px; left: -9999px; width: 1px;
height: 1px; transition: all 1ms linear 1ms;`); height: 1px; transition: all 1ms linear 1ms;`);
// Firefox requires that we wait for 2 frames for some reason // Firefox requires that we wait for 2 frames for some reason
this.raf(timestamp => { this.raf((timestamp: any) => {
DOM.on(div, 'transitionend', (event: any) => { DOM.on(div, 'transitionend', (event: any) => {
var elapsed = Math.round(event.elapsedTime * 1000); var elapsed = Math.round(event.elapsedTime * 1000);
this.elapsedTimeIncludesDelay = elapsed == 2; this.elapsedTimeIncludesDelay = elapsed == 2;
@ -37,7 +37,8 @@ class RafQueue {
currentFrameId: number; currentFrameId: number;
constructor(public callback: Function, public frames: number) { this._raf(); } constructor(public callback: Function, public frames: number) { this._raf(); }
private _raf() { private _raf() {
this.currentFrameId = DOM.requestAnimationFrame(timestamp => this._nextFrame(timestamp)); this.currentFrameId =
DOM.requestAnimationFrame((timestamp: number) => this._nextFrame(timestamp));
} }
private _nextFrame(timestamp: number) { private _nextFrame(timestamp: number) {
this.frames--; this.frames--;

View File

@ -10,6 +10,10 @@ import {
TrackByFn TrackByFn
} from 'angular2/core'; } from 'angular2/core';
import {isPresent, isBlank} from 'angular2/src/facade/lang'; import {isPresent, isBlank} from 'angular2/src/facade/lang';
import {
DefaultIterableDiffer,
CollectionChangeRecord
} from "../../core/change_detection/differs/default_iterable_differ";
/** /**
* The `NgFor` directive instantiates a template once per item from an iterable. The context for * The `NgFor` directive instantiates a template once per item from an iterable. The context for
@ -92,19 +96,19 @@ export class NgFor implements DoCheck {
} }
} }
private _applyChanges(changes) { private _applyChanges(changes: DefaultIterableDiffer) {
// TODO(rado): check if change detection can produce a change record that is // TODO(rado): check if change detection can produce a change record that is
// easier to consume than current. // easier to consume than current.
var recordViewTuples = []; var recordViewTuples: RecordViewTuple[] = [];
changes.forEachRemovedItem((removedRecord) => changes.forEachRemovedItem((removedRecord: CollectionChangeRecord) =>
recordViewTuples.push(new RecordViewTuple(removedRecord, null))); recordViewTuples.push(new RecordViewTuple(removedRecord, null)));
changes.forEachMovedItem((movedRecord) => changes.forEachMovedItem((movedRecord: CollectionChangeRecord) =>
recordViewTuples.push(new RecordViewTuple(movedRecord, null))); recordViewTuples.push(new RecordViewTuple(movedRecord, null)));
var insertTuples = this._bulkRemove(recordViewTuples); var insertTuples = this._bulkRemove(recordViewTuples);
changes.forEachAddedItem((addedRecord) => changes.forEachAddedItem((addedRecord: CollectionChangeRecord) =>
insertTuples.push(new RecordViewTuple(addedRecord, null))); insertTuples.push(new RecordViewTuple(addedRecord, null)));
this._bulkInsert(insertTuples); this._bulkInsert(insertTuples);
@ -124,7 +128,7 @@ export class NgFor implements DoCheck {
}); });
} }
private _perViewChange(view, record) { private _perViewChange(view: EmbeddedViewRef, record: CollectionChangeRecord) {
view.setLocal('\$implicit', record.item); view.setLocal('\$implicit', record.item);
view.setLocal('index', record.currentIndex); view.setLocal('index', record.currentIndex);
view.setLocal('even', (record.currentIndex % 2 == 0)); view.setLocal('even', (record.currentIndex % 2 == 0));
@ -132,8 +136,9 @@ export class NgFor implements DoCheck {
} }
private _bulkRemove(tuples: RecordViewTuple[]): RecordViewTuple[] { private _bulkRemove(tuples: RecordViewTuple[]): RecordViewTuple[] {
tuples.sort((a, b) => a.record.previousIndex - b.record.previousIndex); tuples.sort((a: RecordViewTuple, b: RecordViewTuple) =>
var movedTuples = []; a.record.previousIndex - b.record.previousIndex);
var movedTuples: RecordViewTuple[] = [];
for (var i = tuples.length - 1; i >= 0; i--) { for (var i = tuples.length - 1; i >= 0; i--) {
var tuple = tuples[i]; var tuple = tuples[i];
// separate moved views from removed views. // separate moved views from removed views.
@ -165,7 +170,7 @@ export class NgFor implements DoCheck {
class RecordViewTuple { class RecordViewTuple {
view: EmbeddedViewRef; view: EmbeddedViewRef;
record: any; record: any;
constructor(record, view) { constructor(record: any, view: EmbeddedViewRef) {
this.record = record; this.record = record;
this.view = view; this.view = view;
} }

View File

@ -29,7 +29,7 @@ export class NgIf {
constructor(private _viewContainer: ViewContainerRef, private _templateRef: TemplateRef) {} constructor(private _viewContainer: ViewContainerRef, private _templateRef: TemplateRef) {}
set ngIf(newCondition /* boolean */) { set ngIf(newCondition: any /* boolean */) {
if (newCondition && (isBlank(this._prevCondition) || !this._prevCondition)) { if (newCondition && (isBlank(this._prevCondition) || !this._prevCondition)) {
this._prevCondition = true; this._prevCondition = true;
this._viewContainer.createEmbeddedView(this._templateRef); this._viewContainer.createEmbeddedView(this._templateRef);

View File

@ -7,6 +7,7 @@ import {
Renderer Renderer
} from 'angular2/core'; } from 'angular2/core';
import {isPresent, isBlank, print} from 'angular2/src/facade/lang'; import {isPresent, isBlank, print} from 'angular2/src/facade/lang';
import {KVChangeRecord} from "../../core/change_detection/differs/default_keyvalue_differ";
/** /**
* The `NgStyle` directive changes styles based on a result of expression evaluation. * The `NgStyle` directive changes styles based on a result of expression evaluation.
@ -62,14 +63,14 @@ import {isPresent, isBlank, print} from 'angular2/src/facade/lang';
@Directive({selector: '[ngStyle]', inputs: ['rawStyle: ngStyle']}) @Directive({selector: '[ngStyle]', inputs: ['rawStyle: ngStyle']})
export class NgStyle implements DoCheck { export class NgStyle implements DoCheck {
/** @internal */ /** @internal */
_rawStyle; _rawStyle: {[key: string]: string};
/** @internal */ /** @internal */
_differ: KeyValueDiffer; _differ: KeyValueDiffer;
constructor(private _differs: KeyValueDiffers, private _ngEl: ElementRef, constructor(private _differs: KeyValueDiffers, private _ngEl: ElementRef,
private _renderer: Renderer) {} private _renderer: Renderer) {}
set rawStyle(v) { set rawStyle(v: {[key: string]: string}) {
this._rawStyle = v; this._rawStyle = v;
if (isBlank(this._differ) && isPresent(v)) { if (isBlank(this._differ) && isPresent(v)) {
this._differ = this._differs.find(this._rawStyle).create(null); this._differ = this._differs.find(this._rawStyle).create(null);
@ -86,9 +87,11 @@ export class NgStyle implements DoCheck {
} }
private _applyChanges(changes: any): void { private _applyChanges(changes: any): void {
changes.forEachAddedItem((record) => { this._setStyle(record.key, record.currentValue); }); changes.forEachAddedItem(
changes.forEachChangedItem((record) => { this._setStyle(record.key, record.currentValue); }); (record: KVChangeRecord) => { this._setStyle(record.key, record.currentValue); });
changes.forEachRemovedItem((record) => { this._setStyle(record.key, null); }); changes.forEachChangedItem(
(record: KVChangeRecord) => { this._setStyle(record.key, record.currentValue); });
changes.forEachRemovedItem((record: KVChangeRecord) => { this._setStyle(record.key, null); });
} }
private _setStyle(name: string, val: string): void { private _setStyle(name: string, val: string): void {

View File

@ -76,7 +76,7 @@ export class NgSwitch {
private _valueViews = new Map<any, SwitchView[]>(); private _valueViews = new Map<any, SwitchView[]>();
private _activeViews: SwitchView[] = []; private _activeViews: SwitchView[] = [];
set ngSwitch(value) { set ngSwitch(value: any) {
// Empty the currently active ViewContainers // Empty the currently active ViewContainers
this._emptyAllActiveViews(); this._emptyAllActiveViews();
@ -93,7 +93,7 @@ export class NgSwitch {
} }
/** @internal */ /** @internal */
_onWhenValueChanged(oldWhen, newWhen, view: SwitchView): void { _onWhenValueChanged(oldWhen: any, newWhen: any, view: SwitchView): void {
this._deregisterView(oldWhen, view); this._deregisterView(oldWhen, view);
this._registerView(newWhen, view); this._registerView(newWhen, view);
@ -137,7 +137,7 @@ export class NgSwitch {
} }
/** @internal */ /** @internal */
_registerView(value, view: SwitchView): void { _registerView(value: any, view: SwitchView): void {
var views = this._valueViews.get(value); var views = this._valueViews.get(value);
if (isBlank(views)) { if (isBlank(views)) {
views = []; views = [];
@ -147,7 +147,7 @@ export class NgSwitch {
} }
/** @internal */ /** @internal */
_deregisterView(value, view: SwitchView): void { _deregisterView(value: any, view: SwitchView): void {
// `_WHEN_DEFAULT` is used a marker for non-registered whens // `_WHEN_DEFAULT` is used a marker for non-registered whens
if (value === _WHEN_DEFAULT) return; if (value === _WHEN_DEFAULT) return;
var views = this._valueViews.get(value); var views = this._valueViews.get(value);
@ -182,7 +182,7 @@ export class NgSwitchWhen {
this._view = new SwitchView(viewContainer, templateRef); this._view = new SwitchView(viewContainer, templateRef);
} }
set ngSwitchWhen(value) { set ngSwitchWhen(value: any) {
this._switch._onWhenValueChanged(this._value, value, this._view); this._switch._onWhenValueChanged(this._value, value, this._view);
this._value = value; this._value = value;
} }

View File

@ -21,7 +21,7 @@ const CHECKBOX_VALUE_ACCESSOR = CONST_EXPR(new Provider(
providers: [CHECKBOX_VALUE_ACCESSOR] providers: [CHECKBOX_VALUE_ACCESSOR]
}) })
export class CheckboxControlValueAccessor implements ControlValueAccessor { export class CheckboxControlValueAccessor implements ControlValueAccessor {
onChange = (_) => {}; onChange = (_: any) => {};
onTouched = () => {}; onTouched = () => {};
constructor(private _renderer: Renderer, private _elementRef: ElementRef) {} constructor(private _renderer: Renderer, private _elementRef: ElementRef) {}

View File

@ -24,7 +24,7 @@ const DEFAULT_VALUE_ACCESSOR = CONST_EXPR(new Provider(
bindings: [DEFAULT_VALUE_ACCESSOR] bindings: [DEFAULT_VALUE_ACCESSOR]
}) })
export class DefaultValueAccessor implements ControlValueAccessor { export class DefaultValueAccessor implements ControlValueAccessor {
onChange = (_) => {}; onChange = (_: any) => {};
onTouched = () => {}; onTouched = () => {};
constructor(private _renderer: Renderer, private _elementRef: ElementRef) {} constructor(private _renderer: Renderer, private _elementRef: ElementRef) {}

View File

@ -1,9 +1,14 @@
import {Validator} from './validators'; import {Validator} from './validators';
import {Control} from "../model";
export function normalizeValidator(validator: Function | Validator): Function { export type ctrlFunc = ((c: Control) => {
[key: string]: any
});
export function normalizeValidator(validator: (ctrlFunc | Validator)): ctrlFunc {
if ((<Validator>validator).validate !== undefined) { if ((<Validator>validator).validate !== undefined) {
return (c) => (<Validator>validator).validate(c); return (c: Control) => (<Validator>validator).validate(c);
} else { } else {
return <Function>validator; return <ctrlFunc>validator;
} }
} }

View File

@ -25,7 +25,7 @@ const NUMBER_VALUE_ACCESSOR = CONST_EXPR(new Provider(
bindings: [NUMBER_VALUE_ACCESSOR] bindings: [NUMBER_VALUE_ACCESSOR]
}) })
export class NumberValueAccessor implements ControlValueAccessor { export class NumberValueAccessor implements ControlValueAccessor {
onChange = (_) => {}; onChange = (_: any) => {};
onTouched = () => {}; onTouched = () => {};
constructor(private _renderer: Renderer, private _elementRef: ElementRef) {} constructor(private _renderer: Renderer, private _elementRef: ElementRef) {}

View File

@ -41,7 +41,7 @@ export class NgSelectOption {
}) })
export class SelectControlValueAccessor implements ControlValueAccessor { export class SelectControlValueAccessor implements ControlValueAccessor {
value: string; value: string;
onChange = (_) => {}; onChange = (_: any) => {};
onTouched = () => {}; onTouched = () => {};
constructor(private _renderer: Renderer, private _elementRef: ElementRef, constructor(private _renderer: Renderer, private _elementRef: ElementRef,

View File

@ -32,14 +32,14 @@ export function setUpControl(control: Control, dir: NgControl): void {
dir.valueAccessor.writeValue(control.value); dir.valueAccessor.writeValue(control.value);
// view -> model // view -> model
dir.valueAccessor.registerOnChange(newValue => { dir.valueAccessor.registerOnChange((newValue: any) => {
dir.viewToModelUpdate(newValue); dir.viewToModelUpdate(newValue);
control.updateValue(newValue, {emitModelToViewChange: false}); control.updateValue(newValue, {emitModelToViewChange: false});
control.markAsDirty(); control.markAsDirty();
}); });
// model -> view // model -> view
control.registerOnChange(newValue => dir.valueAccessor.writeValue(newValue)); control.registerOnChange((newValue: any) => dir.valueAccessor.writeValue(newValue));
// touched // touched
dir.valueAccessor.registerOnTouched(() => control.markAsTouched()); dir.valueAccessor.registerOnTouched(() => control.markAsTouched());
@ -78,10 +78,10 @@ export function selectValueAccessor(dir: NgControl,
valueAccessors: ControlValueAccessor[]): ControlValueAccessor { valueAccessors: ControlValueAccessor[]): ControlValueAccessor {
if (isBlank(valueAccessors)) return null; if (isBlank(valueAccessors)) return null;
var defaultAccessor; var defaultAccessor: ControlValueAccessor;
var builtinAccessor; var builtinAccessor: ControlValueAccessor;
var customAccessor; var customAccessor: ControlValueAccessor;
valueAccessors.forEach(v => { valueAccessors.forEach((v: ControlValueAccessor) => {
if (hasConstructor(v, DefaultValueAccessor)) { if (hasConstructor(v, DefaultValueAccessor)) {
defaultAccessor = v; defaultAccessor = v;

View File

@ -80,9 +80,10 @@ export class FormBuilder {
} }
/** @internal */ /** @internal */
_reduceControls(controlsConfig: any): {[key: string]: modelModule.AbstractControl} { _reduceControls(controlsConfig: {[k: string]:
any}): {[key: string]: modelModule.AbstractControl} {
var controls: {[key: string]: modelModule.AbstractControl} = {}; var controls: {[key: string]: modelModule.AbstractControl} = {};
StringMapWrapper.forEach(controlsConfig, (controlConfig, controlName) => { StringMapWrapper.forEach(controlsConfig, (controlConfig: any, controlName: string) => {
controls[controlName] = this._createControl(controlConfig); controls[controlName] = this._createControl(controlConfig);
}); });
return controls; return controls;

View File

@ -62,7 +62,7 @@ export abstract class AbstractControl {
private _pristine: boolean = true; private _pristine: boolean = true;
private _touched: boolean = false; private _touched: boolean = false;
private _parent: ControlGroup | ControlArray; private _parent: ControlGroup | ControlArray;
private _asyncValidationSubscription; private _asyncValidationSubscription: any;
constructor(public validator: Function, public asyncValidator: Function) {} constructor(public validator: Function, public asyncValidator: Function) {}
@ -379,7 +379,8 @@ export class ControlGroup extends AbstractControl {
/** @internal */ /** @internal */
_setParentForControls() { _setParentForControls() {
StringMapWrapper.forEach(this.controls, (control, name) => { control.setParent(this); }); StringMapWrapper.forEach(
this.controls, (control: AbstractControl, name: string) => { control.setParent(this); });
} }
/** @internal */ /** @internal */
@ -388,7 +389,7 @@ export class ControlGroup extends AbstractControl {
/** @internal */ /** @internal */
_anyControlsHaveStatus(status: string): boolean { _anyControlsHaveStatus(status: string): boolean {
var res = false; var res = false;
StringMapWrapper.forEach(this.controls, (control, name) => { StringMapWrapper.forEach(this.controls, (control: AbstractControl, name: string) => {
res = res || (this.contains(name) && control.status == status); res = res || (this.contains(name) && control.status == status);
}); });
return res; return res;
@ -396,7 +397,8 @@ export class ControlGroup extends AbstractControl {
/** @internal */ /** @internal */
_reduceValue() { _reduceValue() {
return this._reduceChildren({}, (acc, control, name) => { return this._reduceChildren(
{}, (acc: {[k: string]: AbstractControl}, control: AbstractControl, name: string) => {
acc[name] = control.value; acc[name] = control.value;
return acc; return acc;
}); });
@ -405,7 +407,7 @@ export class ControlGroup extends AbstractControl {
/** @internal */ /** @internal */
_reduceChildren(initValue: any, fn: Function) { _reduceChildren(initValue: any, fn: Function) {
var res = initValue; var res = initValue;
StringMapWrapper.forEach(this.controls, (control, name) => { StringMapWrapper.forEach(this.controls, (control: AbstractControl, name: string) => {
if (this._included(name)) { if (this._included(name)) {
res = fn(res, control, name); res = fn(res, control, name);
} }

View File

@ -102,8 +102,8 @@ export class AsyncPipe implements PipeTransform, OnDestroy {
_subscribe(obj: Observable<any>| Promise<any>| EventEmitter<any>): void { _subscribe(obj: Observable<any>| Promise<any>| EventEmitter<any>): void {
this._obj = obj; this._obj = obj;
this._strategy = this._selectStrategy(obj); this._strategy = this._selectStrategy(obj);
this._subscription = this._subscription = this._strategy.createSubscription(
this._strategy.createSubscription(obj, value => this._updateLatestValue(obj, value)); obj, (value: Object) => this._updateLatestValue(obj, value));
} }
/** @internal */ /** @internal */

View File

@ -250,7 +250,7 @@ export class PlatformRef_ extends PlatformRef {
provide(ApplicationRef, {useFactory: (): ApplicationRef => app, deps: []}) provide(ApplicationRef, {useFactory: (): ApplicationRef => app, deps: []})
]); ]);
var exceptionHandler; var exceptionHandler: Function;
try { try {
injector = this.injector.resolveAndCreateChild(providers); injector = this.injector.resolveAndCreateChild(providers);
exceptionHandler = injector.get(ExceptionHandler); exceptionHandler = injector.get(ExceptionHandler);
@ -427,7 +427,7 @@ export class ApplicationRef_ extends ApplicationRef {
try { try {
var injector: Injector = this._injector.resolveAndCreateChild(componentProviders); var injector: Injector = this._injector.resolveAndCreateChild(componentProviders);
var compRefToken: Promise<ComponentRef> = injector.get(APP_COMPONENT_REF_PROMISE); var compRefToken: Promise<ComponentRef> = injector.get(APP_COMPONENT_REF_PROMISE);
var tick = (componentRef) => { var tick = (componentRef: ComponentRef) => {
this._loadComponent(componentRef); this._loadComponent(componentRef);
completer.resolve(componentRef); completer.resolve(componentRef);
}; };
@ -460,22 +460,23 @@ export class ApplicationRef_ extends ApplicationRef {
} }
/** @internal */ /** @internal */
_loadComponent(ref): void { _loadComponent(componentRef: ComponentRef): void {
var appChangeDetector = (<ElementRef_>ref.location).internalElement.parentView.changeDetector; var appChangeDetector =
(<ElementRef_>componentRef.location).internalElement.parentView.changeDetector;
this._changeDetectorRefs.push(appChangeDetector.ref); this._changeDetectorRefs.push(appChangeDetector.ref);
this.tick(); this.tick();
this._rootComponents.push(ref); this._rootComponents.push(componentRef);
this._bootstrapListeners.forEach((listener) => listener(ref)); this._bootstrapListeners.forEach((listener) => listener(componentRef));
} }
/** @internal */ /** @internal */
_unloadComponent(ref): void { _unloadComponent(componentRef: ComponentRef): void {
if (!ListWrapper.contains(this._rootComponents, ref)) { if (!ListWrapper.contains(this._rootComponents, componentRef)) {
return; return;
} }
this.unregisterChangeDetector( this.unregisterChangeDetector(
(<ElementRef_>ref.location).internalElement.parentView.changeDetector.ref); (<ElementRef_>componentRef.location).internalElement.parentView.changeDetector.ref);
ListWrapper.remove(this._rootComponents, ref); ListWrapper.remove(this._rootComponents, componentRef);
} }
get injector(): Injector { return this._injector; } get injector(): Injector { return this._injector; }

View File

@ -777,7 +777,26 @@ export class Injector {
var deps = resolvedFactory.dependencies; var deps = resolvedFactory.dependencies;
var length = deps.length; var length = deps.length;
var d0, d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15, d16, d17, d18, d19; var d0: any;
var d1: any;
var d2: any;
var d3: any;
var d4: any;
var d5: any;
var d6: any;
var d7: any;
var d8: any;
var d9: any;
var d10: any;
var d11: any;
var d12: any;
var d13: any;
var d14: any;
var d15: any;
var d16: any;
var d17: any;
var d18: any;
var d19: any;
try { try {
d0 = length > 0 ? this._getByDependency(provider, deps[0], visibility) : null; d0 = length > 0 ? this._getByDependency(provider, deps[0], visibility) : null;
d1 = length > 1 ? this._getByDependency(provider, deps[1], visibility) : null; d1 = length > 1 ? this._getByDependency(provider, deps[1], visibility) : null;
@ -985,7 +1004,7 @@ export class Injector {
} }
get displayName(): string { get displayName(): string {
return `Injector(providers: [${_mapProviders(this, b => ` "${b.key.displayName}" `).join(", ")}])`; return `Injector(providers: [${_mapProviders(this, (b: ResolvedProvider) => ` "${b.key.displayName}" `).join(", ")}])`;
} }
toString(): string { return this.displayName; } toString(): string { return this.displayName; }

View File

@ -22,60 +22,73 @@ export class ReflectionCapabilities implements PlatformReflectionCapabilities {
case 0: case 0:
return () => new t(); return () => new t();
case 1: case 1:
return (a1) => new t(a1); return (a1: any) => new t(a1);
case 2: case 2:
return (a1, a2) => new t(a1, a2); return (a1: any, a2: any) => new t(a1, a2);
case 3: case 3:
return (a1, a2, a3) => new t(a1, a2, a3); return (a1: any, a2: any, a3: any) => new t(a1, a2, a3);
case 4: case 4:
return (a1, a2, a3, a4) => new t(a1, a2, a3, a4); return (a1: any, a2: any, a3: any, a4: any) => new t(a1, a2, a3, a4);
case 5: case 5:
return (a1, a2, a3, a4, a5) => new t(a1, a2, a3, a4, a5); return (a1: any, a2: any, a3: any, a4: any, a5: any) => new t(a1, a2, a3, a4, a5);
case 6: case 6:
return (a1, a2, a3, a4, a5, a6) => new t(a1, a2, a3, a4, a5, a6); return (a1: any, a2: any, a3: any, a4: any, a5: any, a6: any) =>
new t(a1, a2, a3, a4, a5, a6);
case 7: case 7:
return (a1, a2, a3, a4, a5, a6, a7) => new t(a1, a2, a3, a4, a5, a6, a7); return (a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any) =>
new t(a1, a2, a3, a4, a5, a6, a7);
case 8: case 8:
return (a1, a2, a3, a4, a5, a6, a7, a8) => new t(a1, a2, a3, a4, a5, a6, a7, a8); return (a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any) =>
new t(a1, a2, a3, a4, a5, a6, a7, a8);
case 9: case 9:
return (a1, a2, a3, a4, a5, a6, a7, a8, a9) => new t(a1, a2, a3, a4, a5, a6, a7, a8, a9); return (a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any, a9: any) =>
new t(a1, a2, a3, a4, a5, a6, a7, a8, a9);
case 10: case 10:
return (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) => return (a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any, a9: any,
new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); a10: any) => new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
case 11: case 11:
return (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) => return (a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any, a9: any,
new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); a10: any, a11: any) => new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
case 12: case 12:
return (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) => return (a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any, a9: any,
a10: any, a11: any, a12: any) =>
new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12);
case 13: case 13:
return (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) => return (a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any, a9: any,
a10: any, a11: any, a12: any, a13: any) =>
new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13);
case 14: case 14:
return (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) => return (a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any, a9: any,
a10: any, a11: any, a12: any, a13: any, a14: any) =>
new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
case 15: case 15:
return (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) => return (a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any, a9: any,
a10: any, a11: any, a12: any, a13: any, a14: any, a15: any) =>
new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15);
case 16: case 16:
return (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) => return (a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any, a9: any,
a10: any, a11: any, a12: any, a13: any, a14: any, a15: any, a16: any) =>
new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16);
case 17: case 17:
return (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17) => return (a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any, a9: any,
a10: any, a11: any, a12: any, a13: any, a14: any, a15: any, a16: any, a17: any) =>
new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16,
a17); a17);
case 18: case 18:
return (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18) => return (a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any, a9: any,
new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a10: any, a11: any, a12: any, a13: any, a14: any, a15: any, a16: any, a17: any,
a18); a18: any) => new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15,
a16, a17, a18);
case 19: case 19:
return (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, return (a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any, a9: any,
a19) => new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a10: any, a11: any, a12: any, a13: any, a14: any, a15: any, a16: any, a17: any,
a17, a18, a19); a18: any, a19: any) => new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13,
a14, a15, a16, a17, a18, a19);
case 20: case 20:
return (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, return (a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any, a9: any,
a19, a20) => new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a10: any, a11: any, a12: any, a13: any, a14: any, a15: any, a16: any, a17: any,
a16, a17, a18, a19, a20); a18: any, a19: any, a20: any) => new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11,
a12, a13, a14, a15, a16, a17, a18, a19, a20);
}; };
throw new Error( throw new Error(

View File

@ -148,7 +148,7 @@ export class Reflector {
} }
/** @internal */ /** @internal */
_getReflectionInfo(typeOrFunc) { _getReflectionInfo(typeOrFunc: any) {
if (isPresent(this._usedKeys)) { if (isPresent(this._usedKeys)) {
this._usedKeys.add(typeOrFunc); this._usedKeys.add(typeOrFunc);
} }
@ -156,11 +156,11 @@ export class Reflector {
} }
/** @internal */ /** @internal */
_containsReflectionInfo(typeOrFunc) { return this._injectableInfo.has(typeOrFunc); } _containsReflectionInfo(typeOrFunc: any) { return this._injectableInfo.has(typeOrFunc); }
importUri(type: Type): string { return this.reflectionCapabilities.importUri(type); } importUri(type: Type): string { return this.reflectionCapabilities.importUri(type); }
} }
function _mergeMaps(target: Map<any, any>, config: {[key: string]: Function}): void { function _mergeMaps(target: Map<string, Function>, config: {[key: string]: Function}): void {
StringMapWrapper.forEach(config, (v, k) => target.set(k, v)); StringMapWrapper.forEach(config, (v: Function, k: string) => target.set(k, v));
} }

View File

@ -13,7 +13,9 @@ export class Log {
add(value): void { this._result.push(value); } add(value): void { this._result.push(value); }
fn(value) { fn(value) {
return (a1 = null, a2 = null, a3 = null, a4 = null, a5 = null) => { this._result.push(value); } return (a1: any = null, a2: any = null, a3: any = null, a4: any = null, a5: any = null) => {
this._result.push(value);
}
} }
clear(): void { this._result = []; } clear(): void { this._result = []; }

View File

@ -279,118 +279,135 @@ class TestObjWith00Args {
class TestObjWith01Args { class TestObjWith01Args {
args: any[]; args: any[];
constructor(a1) { this.args = [a1]; } constructor(a1: any) { this.args = [a1]; }
} }
class TestObjWith02Args { class TestObjWith02Args {
args: any[]; args: any[];
constructor(a1, a2) { this.args = [a1, a2]; } constructor(a1: any, a2: any) { this.args = [a1, a2]; }
} }
class TestObjWith03Args { class TestObjWith03Args {
args: any[]; args: any[];
constructor(a1, a2, a3) { this.args = [a1, a2, a3]; } constructor(a1: any, a2: any, a3: any) { this.args = [a1, a2, a3]; }
} }
class TestObjWith04Args { class TestObjWith04Args {
args: any[]; args: any[];
constructor(a1, a2, a3, a4) { this.args = [a1, a2, a3, a4]; } constructor(a1: any, a2: any, a3: any, a4: any) { this.args = [a1, a2, a3, a4]; }
} }
class TestObjWith05Args { class TestObjWith05Args {
args: any[]; args: any[];
constructor(a1, a2, a3, a4, a5) { this.args = [a1, a2, a3, a4, a5]; } constructor(a1: any, a2: any, a3: any, a4: any, a5: any) { this.args = [a1, a2, a3, a4, a5]; }
} }
class TestObjWith06Args { class TestObjWith06Args {
args: any[]; args: any[];
constructor(a1, a2, a3, a4, a5, a6) { this.args = [a1, a2, a3, a4, a5, a6]; } constructor(a1: any, a2: any, a3: any, a4: any, a5: any, a6: any) {
this.args = [a1, a2, a3, a4, a5, a6];
}
} }
class TestObjWith07Args { class TestObjWith07Args {
args: any[]; args: any[];
constructor(a1, a2, a3, a4, a5, a6, a7) { this.args = [a1, a2, a3, a4, a5, a6, a7]; } constructor(a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any) {
this.args = [a1, a2, a3, a4, a5, a6, a7];
}
} }
class TestObjWith08Args { class TestObjWith08Args {
args: any[]; args: any[];
constructor(a1, a2, a3, a4, a5, a6, a7, a8) { this.args = [a1, a2, a3, a4, a5, a6, a7, a8]; } constructor(a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any) {
this.args = [a1, a2, a3, a4, a5, a6, a7, a8];
}
} }
class TestObjWith09Args { class TestObjWith09Args {
args: any[]; args: any[];
constructor(a1, a2, a3, a4, a5, a6, a7, a8, a9) { constructor(a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any, a9: any) {
this.args = [a1, a2, a3, a4, a5, a6, a7, a8, a9]; this.args = [a1, a2, a3, a4, a5, a6, a7, a8, a9];
} }
} }
class TestObjWith10Args { class TestObjWith10Args {
args: any[]; args: any[];
constructor(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) { constructor(a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any, a9: any,
a10: any) {
this.args = [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10]; this.args = [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10];
} }
} }
class TestObjWith11Args { class TestObjWith11Args {
args: any[]; args: any[];
constructor(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) { constructor(a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any, a9: any,
a10: any, a11: any) {
this.args = [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11]; this.args = [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11];
} }
} }
class TestObjWith12Args { class TestObjWith12Args {
args: any[]; args: any[];
constructor(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) { constructor(a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any, a9: any,
a10: any, a11: any, a12: any) {
this.args = [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12]; this.args = [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12];
} }
} }
class TestObjWith13Args { class TestObjWith13Args {
args: any[]; args: any[];
constructor(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) { constructor(a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any, a9: any,
a10: any, a11: any, a12: any, a13: any) {
this.args = [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13]; this.args = [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13];
} }
} }
class TestObjWith14Args { class TestObjWith14Args {
args: any[]; args: any[];
constructor(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) { constructor(a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any, a9: any,
a10: any, a11: any, a12: any, a13: any, a14: any) {
this.args = [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14]; this.args = [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14];
} }
} }
class TestObjWith15Args { class TestObjWith15Args {
args: any[]; args: any[];
constructor(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) { constructor(a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any, a9: any,
a10: any, a11: any, a12: any, a13: any, a14: any, a15: any) {
this.args = [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15]; this.args = [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15];
} }
} }
class TestObjWith16Args { class TestObjWith16Args {
args: any[]; args: any[];
constructor(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) { constructor(a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any, a9: any,
a10: any, a11: any, a12: any, a13: any, a14: any, a15: any, a16: any) {
this.args = [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16]; this.args = [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16];
} }
} }
class TestObjWith17Args { class TestObjWith17Args {
args: any[]; args: any[];
constructor(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17) { constructor(a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any, a9: any,
a10: any, a11: any, a12: any, a13: any, a14: any, a15: any, a16: any, a17: any) {
this.args = [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17]; this.args = [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17];
} }
} }
class TestObjWith18Args { class TestObjWith18Args {
args: any[]; args: any[];
constructor(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18) { constructor(a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any, a9: any,
a10: any, a11: any, a12: any, a13: any, a14: any, a15: any, a16: any, a17: any,
a18: any) {
this.args = [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18]; this.args = [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18];
} }
} }
class TestObjWith19Args { class TestObjWith19Args {
args: any[]; args: any[];
constructor(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, constructor(a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any, a9: any,
a19) { a10: any, a11: any, a12: any, a13: any, a14: any, a15: any, a16: any, a17: any,
a18: any, a19: any) {
this.args = this.args =
[a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19]; [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19];
} }
@ -398,8 +415,9 @@ class TestObjWith19Args {
class TestObjWith20Args { class TestObjWith20Args {
args: any[]; args: any[];
constructor(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, constructor(a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any, a9: any,
a20) { a10: any, a11: any, a12: any, a13: any, a14: any, a15: any, a16: any, a17: any,
a18: any, a19: any, a20: any) {
this.args = this.args =
[a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20]; [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20];
} }
@ -407,8 +425,9 @@ class TestObjWith20Args {
class TestObjWith21Args { class TestObjWith21Args {
args: any[]; args: any[];
constructor(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, constructor(a1: any, a2: any, a3: any, a4: any, a5: any, a6: any, a7: any, a8: any, a9: any,
a20, a21) { a10: any, a11: any, a12: any, a13: any, a14: any, a15: any, a16: any, a17: any,
a18: any, a19: any, a20: any, a21: any) {
this.args = [ this.args = [
a1, a1,
a2, a2,

View File

@ -763,7 +763,7 @@ const COMMON = [
'NgStyle', 'NgStyle',
'NgStyle.constructor(_differs:KeyValueDiffers, _ngEl:ElementRef, _renderer:Renderer)', 'NgStyle.constructor(_differs:KeyValueDiffers, _ngEl:ElementRef, _renderer:Renderer)',
'NgStyle.ngDoCheck():any', 'NgStyle.ngDoCheck():any',
'NgStyle.rawStyle=(v:any)', 'NgStyle.rawStyle=(v:{[key:string]:string})',
'NgSwitch', 'NgSwitch',
'NgSwitch.ngSwitch=(value:any)', 'NgSwitch.ngSwitch=(value:any)',
'NgSwitchDefault', 'NgSwitchDefault',