Tightened up TypeScript definitions so it can compile with noImplicitAny flag

Thanks for providing a .d.ts, saved me a lot of effort. This PR contains some minor fixes that I had to make to the file in order to compile the Todo example with the --noImplicitAny compiler flag.

Separately, would you mind if I added the definitions file to [Definitely Typed](https://github.com/borisyankov/DefinitelyTyped)?