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

@ -52,7 +52,7 @@ export class Animation {
this.startTime = DateWrapper.toMillis(DateWrapper.now());
this._stringPrefix = DOM.getAnimationPrefix();
this.setup();
this.wait(timestamp => this.start());
this.wait((timestamp: any) => this.start());
}
wait(callback: Function) {
@ -97,7 +97,7 @@ export class Animation {
* @param styles
*/
applyStyles(styles: {[key: string]: any}): void {
StringMapWrapper.forEach(styles, (value, key) => {
StringMapWrapper.forEach(styles, (value: any, key: string) => {
var dashCaseKey = camelCaseToDashCase(key);
if (isPresent(DOM.getStyle(this.element, dashCaseKey))) {
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;
height: 1px; transition: all 1ms linear 1ms;`);
// Firefox requires that we wait for 2 frames for some reason
this.raf(timestamp => {
this.raf((timestamp: any) => {
DOM.on(div, 'transitionend', (event: any) => {
var elapsed = Math.round(event.elapsedTime * 1000);
this.elapsedTimeIncludesDelay = elapsed == 2;
@ -37,7 +37,8 @@ class RafQueue {
currentFrameId: number;
constructor(public callback: Function, public frames: number) { this._raf(); }
private _raf() {
this.currentFrameId = DOM.requestAnimationFrame(timestamp => this._nextFrame(timestamp));
this.currentFrameId =
DOM.requestAnimationFrame((timestamp: number) => this._nextFrame(timestamp));
}
private _nextFrame(timestamp: number) {
this.frames--;

View File

@ -10,6 +10,10 @@ import {
TrackByFn
} from 'angular2/core';
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
@ -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
// easier to consume than current.
var recordViewTuples = [];
changes.forEachRemovedItem((removedRecord) =>
var recordViewTuples: RecordViewTuple[] = [];
changes.forEachRemovedItem((removedRecord: CollectionChangeRecord) =>
recordViewTuples.push(new RecordViewTuple(removedRecord, null)));
changes.forEachMovedItem((movedRecord) =>
changes.forEachMovedItem((movedRecord: CollectionChangeRecord) =>
recordViewTuples.push(new RecordViewTuple(movedRecord, null)));
var insertTuples = this._bulkRemove(recordViewTuples);
changes.forEachAddedItem((addedRecord) =>
changes.forEachAddedItem((addedRecord: CollectionChangeRecord) =>
insertTuples.push(new RecordViewTuple(addedRecord, null)));
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('index', record.currentIndex);
view.setLocal('even', (record.currentIndex % 2 == 0));
@ -132,8 +136,9 @@ export class NgFor implements DoCheck {
}
private _bulkRemove(tuples: RecordViewTuple[]): RecordViewTuple[] {
tuples.sort((a, b) => a.record.previousIndex - b.record.previousIndex);
var movedTuples = [];
tuples.sort((a: RecordViewTuple, b: RecordViewTuple) =>
a.record.previousIndex - b.record.previousIndex);
var movedTuples: RecordViewTuple[] = [];
for (var i = tuples.length - 1; i >= 0; i--) {
var tuple = tuples[i];
// separate moved views from removed views.
@ -165,7 +170,7 @@ export class NgFor implements DoCheck {
class RecordViewTuple {
view: EmbeddedViewRef;
record: any;
constructor(record, view) {
constructor(record: any, view: EmbeddedViewRef) {
this.record = record;
this.view = view;
}

View File

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

View File

@ -7,6 +7,7 @@ import {
Renderer
} from 'angular2/core';
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.
@ -62,14 +63,14 @@ import {isPresent, isBlank, print} from 'angular2/src/facade/lang';
@Directive({selector: '[ngStyle]', inputs: ['rawStyle: ngStyle']})
export class NgStyle implements DoCheck {
/** @internal */
_rawStyle;
_rawStyle: {[key: string]: string};
/** @internal */
_differ: KeyValueDiffer;
constructor(private _differs: KeyValueDiffers, private _ngEl: ElementRef,
private _renderer: Renderer) {}
set rawStyle(v) {
set rawStyle(v: {[key: string]: string}) {
this._rawStyle = v;
if (isBlank(this._differ) && isPresent(v)) {
this._differ = this._differs.find(this._rawStyle).create(null);
@ -86,9 +87,11 @@ export class NgStyle implements DoCheck {
}
private _applyChanges(changes: any): void {
changes.forEachAddedItem((record) => { this._setStyle(record.key, record.currentValue); });
changes.forEachChangedItem((record) => { this._setStyle(record.key, record.currentValue); });
changes.forEachRemovedItem((record) => { this._setStyle(record.key, null); });
changes.forEachAddedItem(
(record: KVChangeRecord) => { this._setStyle(record.key, record.currentValue); });
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 {

View File

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

View File

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

View File

@ -1,9 +1,14 @@
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) {
return (c) => (<Validator>validator).validate(c);
return (c: Control) => (<Validator>validator).validate(c);
} 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]
})
export class NumberValueAccessor implements ControlValueAccessor {
onChange = (_) => {};
onChange = (_: any) => {};
onTouched = () => {};
constructor(private _renderer: Renderer, private _elementRef: ElementRef) {}

View File

@ -41,7 +41,7 @@ export class NgSelectOption {
})
export class SelectControlValueAccessor implements ControlValueAccessor {
value: string;
onChange = (_) => {};
onChange = (_: any) => {};
onTouched = () => {};
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);
// view -> model
dir.valueAccessor.registerOnChange(newValue => {
dir.valueAccessor.registerOnChange((newValue: any) => {
dir.viewToModelUpdate(newValue);
control.updateValue(newValue, {emitModelToViewChange: false});
control.markAsDirty();
});
// model -> view
control.registerOnChange(newValue => dir.valueAccessor.writeValue(newValue));
control.registerOnChange((newValue: any) => dir.valueAccessor.writeValue(newValue));
// touched
dir.valueAccessor.registerOnTouched(() => control.markAsTouched());
@ -78,10 +78,10 @@ export function selectValueAccessor(dir: NgControl,
valueAccessors: ControlValueAccessor[]): ControlValueAccessor {
if (isBlank(valueAccessors)) return null;
var defaultAccessor;
var builtinAccessor;
var customAccessor;
valueAccessors.forEach(v => {
var defaultAccessor: ControlValueAccessor;
var builtinAccessor: ControlValueAccessor;
var customAccessor: ControlValueAccessor;
valueAccessors.forEach((v: ControlValueAccessor) => {
if (hasConstructor(v, DefaultValueAccessor)) {
defaultAccessor = v;

View File

@ -80,9 +80,10 @@ export class FormBuilder {
}
/** @internal */
_reduceControls(controlsConfig: any): {[key: string]: modelModule.AbstractControl} {
_reduceControls(controlsConfig: {[k: string]:
any}): {[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);
});
return controls;

View File

@ -62,7 +62,7 @@ export abstract class AbstractControl {
private _pristine: boolean = true;
private _touched: boolean = false;
private _parent: ControlGroup | ControlArray;
private _asyncValidationSubscription;
private _asyncValidationSubscription: any;
constructor(public validator: Function, public asyncValidator: Function) {}
@ -379,7 +379,8 @@ export class ControlGroup extends AbstractControl {
/** @internal */
_setParentForControls() {
StringMapWrapper.forEach(this.controls, (control, name) => { control.setParent(this); });
StringMapWrapper.forEach(
this.controls, (control: AbstractControl, name: string) => { control.setParent(this); });
}
/** @internal */
@ -388,7 +389,7 @@ export class ControlGroup extends AbstractControl {
/** @internal */
_anyControlsHaveStatus(status: string): boolean {
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);
});
return res;
@ -396,16 +397,17 @@ export class ControlGroup extends AbstractControl {
/** @internal */
_reduceValue() {
return this._reduceChildren({}, (acc, control, name) => {
acc[name] = control.value;
return acc;
});
return this._reduceChildren(
{}, (acc: {[k: string]: AbstractControl}, control: AbstractControl, name: string) => {
acc[name] = control.value;
return acc;
});
}
/** @internal */
_reduceChildren(initValue: any, fn: Function) {
var res = initValue;
StringMapWrapper.forEach(this.controls, (control, name) => {
StringMapWrapper.forEach(this.controls, (control: AbstractControl, name: string) => {
if (this._included(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 {
this._obj = obj;
this._strategy = this._selectStrategy(obj);
this._subscription =
this._strategy.createSubscription(obj, value => this._updateLatestValue(obj, value));
this._subscription = this._strategy.createSubscription(
obj, (value: Object) => this._updateLatestValue(obj, value));
}
/** @internal */

View File

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

View File

@ -777,7 +777,26 @@ export class Injector {
var deps = resolvedFactory.dependencies;
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 {
d0 = length > 0 ? this._getByDependency(provider, deps[0], visibility) : null;
d1 = length > 1 ? this._getByDependency(provider, deps[1], visibility) : null;
@ -985,7 +1004,7 @@ export class Injector {
}
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; }

View File

@ -22,60 +22,73 @@ export class ReflectionCapabilities implements PlatformReflectionCapabilities {
case 0:
return () => new t();
case 1:
return (a1) => new t(a1);
return (a1: any) => new t(a1);
case 2:
return (a1, a2) => new t(a1, a2);
return (a1: any, a2: any) => new t(a1, a2);
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:
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:
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:
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:
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:
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:
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:
return (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) =>
new t(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,
a10: any) => new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
case 11:
return (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) =>
new t(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,
a10: any, a11: any) => new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
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);
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);
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);
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);
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);
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,
a17);
case 18:
return (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18) =>
new t(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,
a10: any, a11: any, a12: any, a13: any, a14: any, a15: any, a16: any, a17: any,
a18: any) => new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15,
a16, a17, a18);
case 19:
return (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18,
a19) => new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16,
a17, a18, a19);
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,
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:
return (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18,
a19, a20) => new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15,
a16, a17, a18, a19, a20);
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,
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(

View File

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