chore(forms): fix implicit any

This commit is contained in:
Kara Erickson
2016-06-08 17:08:59 -07:00
parent 4c39eace52
commit e213939f28
5 changed files with 117 additions and 117 deletions
@@ -17,7 +17,7 @@ export function main() {
function validator(key: string, error: any) {
return function(c: AbstractControl) {
var r = {};
r[key] = error;
(r as any /** TODO #9100 */)[key] = error;
return r;
}
}
@@ -111,8 +111,8 @@ export function main() {
});
describe("composeAsync", () => {
function asyncValidator(expected, response) {
return (c) => {
function asyncValidator(expected: any /** TODO #9100 */, response: any /** TODO #9100 */) {
return (c: any /** TODO #9100 */) => {
var emitter = new EventEmitter();
var res = c.value != expected ? response : null;
@@ -136,7 +136,7 @@ export function main() {
asyncValidator("expected", {"two": true})
]);
var value = null;
var value: any /** TODO #9100 */ = null;
(<Promise<any>>c(new Control("invalid"))).then(v => value = v);
tick(1);
@@ -147,7 +147,7 @@ export function main() {
it("should return null when no errors", fakeAsync(() => {
var c = Validators.composeAsync([asyncValidator("expected", {"one": true})]);
var value = null;
var value: any /** TODO #9100 */ = null;
(<Promise<any>>c(new Control("expected"))).then(v => value = v);
tick(1);
@@ -158,7 +158,7 @@ export function main() {
it("should ignore nulls", fakeAsync(() => {
var c = Validators.composeAsync([asyncValidator("expected", {"one": true}), null]);
var value = null;
var value: any /** TODO #9100 */ = null;
(<Promise<any>>c(new Control("invalid"))).then(v => value = v);
tick(1);