Add type definitions for TypeScript.
Merge pull request #12 from saneyuki/type

Reintroduce type definitions for TypeScript.