Add support for typescript or port the entire library to typescript. As the library is still pretty small, it would make sense to port to typescript at this stage.