Closed audiolion closed 5 years ago
Hi. I'm not myself a TypeScript user, the original typings were submitted by contributors. When I'm refactoring something I usually edit the typings but since I don't test them there can be (and often are) some bugs. So, you can modify the typings, test them in your IDE, and then submit a pull request which we then can merge.
Ok I will look into making a PR back for the types, thanks!
Pushed the updated index.d.ts
and custom.d.ts
to the github repo.
@audiolion You can test them if you want by placing them in node_modules/libphonenumber-js
directory.
I didn't test them.
Will be released at some future patch release I guess.
That is spooky, I just updated to 1.7.4 and was trying to figure out why some of the types were missing, you hadn't released them yet ;). I will take a look and see, I am not using a ton of pieces of the api, but definitely using the core ones
@audiolion Yeah, I just thought that I'd wait until you check them out to not confuse other people in case there was some syntax error or something.
I am not using a ton of pieces of the api, but definitely using the core ones
Yeah, no need for the full api testing of course. Just see if it works at all and doesn't break everything and that will be enough. You know, could be a missing bracket or something.
Hey I notice you have been doing some refactoring, as far as I can see the
formatNumber
typings seem to be missing theoptions
that can be passed e.g.{ fromCountry: CountryCode, humanReadable: boolean }
. Am I not understanding something here? Also I used to passIDD: NumberFormat
as the second argument, but the types show it should beCountryCode