node-pureimage icon indicating copy to clipboard operation
node-pureimage copied to clipboard

Missing typescript types

Open a7madgamal opened this issue 5 years ago • 7 comments
trafficstars

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

a7madgamal avatar Nov 04 '20 17:11 a7madgamal

I think it's a great idea but I'm not a typescript expert. I'd love to have your contribution, though.

joshmarinacci avatar Nov 09 '20 17:11 joshmarinacci

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.

joshmarinacci avatar Apr 02 '21 18:04 joshmarinacci

I just came here to say that pull request #119 is open since the last two weeks

JeanJPNM avatar Apr 16 '21 11:04 JeanJPNM

@JeanJPNM some typings issues I've noticed so far:

  • The context.font setter's argument expected to be string but currently specified as import("opentype.js").Font class: https://github.com/joshmarinacci/node-pureimage/blob/a83ca6da60ee46668895da8434c6a3bdaa1f426e/src/context.js#L199-L206
  • The registerFont call 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?

vladimiry avatar Jul 23 '21 10:07 vladimiry

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).

CatsMiaow avatar Aug 14 '21 19:08 CatsMiaow

Oh jeez. I totally forgot about that. I'll push out a new release today.

joshmarinacci avatar Aug 18 '21 17:08 joshmarinacci

I just pushed out 0.3.4 which has the types and the new line drawing code

joshmarinacci avatar Aug 18 '21 17:08 joshmarinacci