bezoerb / text-metrics

An efficient text measurement set for the browser
MIT License
64 stars 5 forks source link

TypeScript definitions? #19

Open jhurliman opened 3 years ago

modus-jose commented 1 year ago

@theresasogunle and I are working on a contribution to typescript. We used this repo to test, https://github.com/theresasogunle/react-ts-text-metrics

and are making this fork (not ready yet) https://github.com/modus-jose/DefinitelyTyped

Can someone help us test our definitions??

bezoerb commented 1 year ago

hey @modus-jose :) there's a plan to rewrite this module to typescript but i'm quite busy at the moment.

modus-jose commented 1 year ago

Hey Ben,

I would be happy to contribute rewriting it n typescript if you don't have the time.

We started with definitioms as that seemed simpler and we had already added them yo one of our projects

And btw thanks for the small library, it's awesome!!

El jue., 9 de marzo de 2023 1:02 a. m., Ben Zörb @.***> escribió:

hey @modus-jose https://github.com/modus-jose :) there's a plan to rewrite this module to typescript but i'm quite busy at the moment.

— Reply to this email directly, view it on GitHub https://github.com/bezoerb/text-metrics/issues/19#issuecomment-1461434060, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATQIS6OUQKG75ZVNXGMCZCDW3F6AHANCNFSM435NWP7Q . You are receiving this because you were mentioned.Message ID: @.***>

bezoerb commented 1 year ago

Hey @modus-jose, that would be awesome 😄

modus-jose commented 1 year ago

@bezoerb I know its been a while but our typescript definitions are finally ready to be merged

https://github.com/DefinitelyTyped/DefinitelyTyped/pull/64964

On that link they also provide a playground in case you want to play with it

modus-jose commented 1 year ago

The next steps could be to rewrite to typescript

modus-jose commented 1 year ago

And its been merged! You can now add npm i --save-dev @types/text-metrics