Made every type declaration explicit to prevent compilation errors.

I have explicitly stated every type declaration (mostly :any) in the code so that there are no errors when compiling with --noImplicitAny.