- Updated tsc --declarations option to --declaration.
- Added JSDoc comments to API.
- Reformatted code.