Closed TimLuq closed 6 years ago
Hi TimLuq! Nice to see that there's some attention for this library 😃. At this time, however, the project will not be switching over to TypeScript. I will unfortunately have to close this PR. I do appreciate you putting it together though! 💯
This wasn't a switch to TS, though. The PR is only for accompanying types available to users of the library (using either VS Code or TS) not changes to the library code itself.
Added type definitions in an
index.d.ts
file.To not add a dependency to
@types/node
I simplified allBuffer
references to instead use the superclassUint8Array
. This may may create a warning or error for users using, as aBuffer
without a cast, the resolved value of the promise returned indrawImageFile()
when used in typescript.Additionally some methods technically inherited from
EventEmitter
has been left out. (Among theseonce()
,addEventListener()
.) This is because of the discrepancy of the optional throttling argument and the non-standard void return value ofon()
which makes it somewhat incompatible.