javascript icon indicating copy to clipboard operation
javascript copied to clipboard

Type definitions

Open hyanmandian opened this issue 8 years ago • 15 comments

hyanmandian avatar Sep 14 '18 17:09 hyanmandian

I could tackle this! I'm guessing flowtype is the intended solution? Or move to Typescript?

aputhin avatar Sep 17 '18 20:09 aputhin

Maybe we can use just type definitions to avoid rewriting all packages... What do you think about it?

hyanmandian avatar Sep 19 '18 20:09 hyanmandian

Our packages are small pieces of code.

Rewrting them with Typescript is not a bad idea.

andreoav avatar Sep 20 '18 02:09 andreoav

no problems for me :D

hyanmandian avatar Sep 20 '18 18:09 hyanmandian

Cool, TS it is. ;-)

aputhin avatar Sep 21 '18 03:09 aputhin

@aputhin will you rewrite all packages or we can do it one by one? Either way, I would like to help you with it.

VitorLuizC avatar Sep 21 '18 13:09 VitorLuizC

I tried my luck with the Typescript rewrite in #33. Hope it helps!

vhfmag avatar Oct 31 '18 12:10 vhfmag

Can someone help? Even though the whole project is written in TS, when importing a specific package (such as @brazilian-utils/is-valid-cpf), the compiler still complains about not finding a type definitions file. Do I need to do something else than just installing and importing?

Thanks for the amazing work!

matheusgrieger avatar Feb 22 '19 20:02 matheusgrieger

I'm taking a look at it, @matheusgrieger. We're probably either not generating the definitions file or not pointing to it from package.json.

vhfmag avatar Feb 22 '19 20:02 vhfmag

As it turns out, both :neutral_face:

vhfmag avatar Feb 22 '19 20:02 vhfmag

I will be looking at it tomorrow and will send a PR

vhfmag avatar Feb 22 '19 21:02 vhfmag

@matheusgrieger, see #37 and #38

vhfmag avatar Feb 25 '19 11:02 vhfmag

@vhfmag thanks a lot for that!

matheusgrieger avatar Feb 25 '19 11:02 matheusgrieger

@vhfmag some planning to publish new version in the npm?

ramonornela avatar Dec 20 '19 22:12 ramonornela

Yes @ramonornela , in the next release we going to publish next version of brazilian-utils. You can check our work in #63 . Fell free to contribute and help us to migrate all missing packages to new structure.

hyanmandian avatar Dec 20 '19 23:12 hyanmandian