fix(typings): test our .d.ts with --noImplicitAny

This matches how DefinitelyTyped tests it, so we are
one step closer to publishing the same file we generate.

See #3195
This commit is contained in:
Alex Eagle
2015-07-23 09:03:39 +01:00
parent 345fa521dd
commit 19d8b221b4
12 changed files with 26 additions and 26 deletions

View File

@ -4,32 +4,32 @@
* CHECK_ONCE means that after calling detectChanges the mode of the change detector
* will become CHECKED.
*/
export const CHECK_ONCE = "CHECK_ONCE";
export const CHECK_ONCE: string = "CHECK_ONCE";
/**
* CHECKED means that the change detector should be skipped until its mode changes to
* CHECK_ONCE or CHECK_ALWAYS.
*/
export const CHECKED = "CHECKED";
export const CHECKED: string = "CHECKED";
/**
* CHECK_ALWAYS means that after calling detectChanges the mode of the change detector
* will remain CHECK_ALWAYS.
*/
export const CHECK_ALWAYS = "ALWAYS_CHECK";
export const CHECK_ALWAYS: string = "ALWAYS_CHECK";
/**
* DETACHED means that the change detector sub tree is not a part of the main tree and
* should be skipped.
*/
export const DETACHED = "DETACHED";
export const DETACHED: string = "DETACHED";
/**
* ON_PUSH means that the change detector's mode will be set to CHECK_ONCE during hydration.
*/
export const ON_PUSH = "ON_PUSH";
export const ON_PUSH: string = "ON_PUSH";
/**
* DEFAULT means that the change detector's mode will be set to CHECK_ALWAYS during hydration.
*/
export const DEFAULT = "DEFAULT";
export const DEFAULT: string = "DEFAULT";

View File

@ -278,8 +278,8 @@ export function createNgZone(handler: ExceptionHandler): NgZone {
* Returns a `Promise` of {@link ApplicationRef}.
*/
export function commonBootstrap(
appComponentType: Type, componentInjectableBindings: List<Type | Binding | List<any>> = null):
Promise<ApplicationRef> {
appComponentType: /*Type*/ any,
componentInjectableBindings: List<Type | Binding | List<any>> = null): Promise<ApplicationRef> {
BrowserDomAdapter.makeCurrent();
var bootstrapProcess = PromiseWrapper.completer();

View File

@ -22,4 +22,4 @@ export const appComponentRefPromiseToken = CONST_EXPR(new OpaqueToken('Promise<C
*
* ```
*/
export const appComponentTypeToken = CONST_EXPR(new OpaqueToken('RootComponent'));
export const appComponentTypeToken: OpaqueToken = CONST_EXPR(new OpaqueToken('RootComponent'));

View File

@ -38,7 +38,7 @@ export class QueryList<T> implements IQueryList<T> {
get first(): T { return ListWrapper.first(this._results); }
get last(): T { return ListWrapper.last(this._results); }
map<U>(fn: (T) => U): U[] { return this._results.map(fn); }
map<U>(fn: (item: T) => U): U[] { return this._results.map(fn); }
[Symbol.iterator](): any { return this._results[Symbol.iterator](); }
}

View File

@ -21,11 +21,11 @@ const _notFound = CONST_EXPR(new Object());
// Threshold for the dynamic version
const _MAX_CONSTRUCTION_COUNTER = 10;
export const undefinedValue = CONST_EXPR(new Object());
export const undefinedValue: Object = CONST_EXPR(new Object());
export const PUBLIC = 1;
export const PRIVATE = 2;
export const PUBLIC_AND_PRIVATE = 3;
export const PUBLIC: number = 1;
export const PRIVATE: number = 2;
export const PUBLIC_AND_PRIVATE: number = 3;
export interface ProtoInjectorStrategy {
getBindingAtIndex(index: number): ResolvedBinding;

View File

@ -196,4 +196,5 @@ export class UnboundedMetadata extends VisibilityMetadata {
toString(): string { return `@Unbounded(self: ${this.includeSelf}})`; }
}
export const DEFAULT_VISIBILITY = CONST_EXPR(new UnboundedMetadata({self: true}));
export const DEFAULT_VISIBILITY: VisibilityMetadata =
CONST_EXPR(new UnboundedMetadata({self: true}));

View File

@ -54,6 +54,6 @@ export class CheckboxControlValueAccessor implements ControlValueAccessor {
return isPresent(this.cd.control) ? !this.cd.control.valid : false;
}
registerOnChange(fn: (_) => {}): void { this.onChange = fn; }
registerOnChange(fn: (_: any) => {}): void { this.onChange = fn; }
registerOnTouched(fn: () => {}): void { this.onTouched = fn; }
}

View File

@ -60,7 +60,7 @@ export class DefaultValueAccessor implements ControlValueAccessor {
return isPresent(this.cd.control) ? !this.cd.control.valid : false;
}
registerOnChange(fn: (_) => void): void { this.onChange = fn; }
registerOnChange(fn: (_: any) => void): void { this.onChange = fn; }
registerOnTouched(fn: () => void): void { this.onTouched = fn; }
}

View File

@ -31,10 +31,10 @@ import {
RenderViewWithFragments
} from '../api';
export const DOCUMENT_TOKEN = CONST_EXPR(new OpaqueToken('DocumentToken'));
export const DOM_REFLECT_PROPERTIES_AS_ATTRIBUTES =
export const DOCUMENT_TOKEN: OpaqueToken = CONST_EXPR(new OpaqueToken('DocumentToken'));
export const DOM_REFLECT_PROPERTIES_AS_ATTRIBUTES: OpaqueToken =
CONST_EXPR(new OpaqueToken('DomReflectPropertiesAsAttributes'));
const REFLECT_PREFIX = 'ng-reflect-';
const REFLECT_PREFIX: string = 'ng-reflect-';
@Injectable()
export class DomRenderer extends Renderer {