Closed szg251 closed 3 years ago
@conorhastings Hi! I by no means want to force TypeScript onto this project, but if you like the idea, could you check my PR? I believe TS typings are almost a requirement for any NPM package these days, and it is easier and safer to maintain, if the project itself is written in TS.
I'm not a big typescript user but I'm not opposed, sorry for the delayed response, can you explain the changes you had to make beffore I merge this in
I migrated the vanilla JS to TypeScript, so the library can be used in both JS and TS. If you don't want to switch to TypeScript, the generated definitions could still be used.
I tried to only add type definitions without changing anything in the code, but in a few places I had to change a few things to satisfy the TS compiler.