node-pureimage
node-pureimage copied to clipboard
Missing typescript types
This is not an actual bug but it's hard to use a library without TS types I see you already have JSdoc comments maybe you can generate types from it or have fun converting the library to TS :D
I think it's a great idea but I'm not a typescript expert. I'd love to have your contribution, though.
I’d love to migrate but I suspect that’s a giant effort and may conflict with the low level bit twiddling code, so I’d just start with the declaration files.
Thanks,
On Apr 2, 2021, at 10:08 AM, JeanJPNM @.***> wrote:
I'm interested in implementing the types, would you like me to migrate the code to typescript or to add declaration files?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/joshmarinacci/node-pureimage/issues/114#issuecomment-812621450, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACDTSRHHAUAYEBJ3534ZDDTGX22XANCNFSM4TKK3UAQ.
I just came here to say that pull request #119 is open since the last two weeks
@JeanJPNM some typings issues I've noticed so far:
- The
context.fontsetter's argument expected to bestringbut currently specified as import("opentype.js").Font class: https://github.com/joshmarinacci/node-pureimage/blob/a83ca6da60ee46668895da8434c6a3bdaa1f426e/src/context.js#L199-L206 - The
registerFontcall in all the examples has only 2 required parameters but being currently typed with 5 required parameters. @joshmarinacci can you clarify which parameters are actually required?
The types folder was added(https://github.com/joshmarinacci/node-pureimage/pull/119) as master 4 months ago, but it was not published to npm, so it is not available in the current version (v0.3.2).
Oh jeez. I totally forgot about that. I'll push out a new release today.
I just pushed out 0.3.4 which has the types and the new line drawing code