Export PhoneNumber class
Hi,
Can we reconsider exporting PhoneNumber class given:
- The typescript types we export says we export a class, but isn't really the case.
import { PhoneNumber } from "libphonenumber-js";
// typechecks but crashes in runtime since PhoneNumber is undefined
console.log("foo" instanceof PhoneNumber);
- We already export other classes such as
PhoneNumberMatcher,AsYouType, etc. - The workaround when this was last visited at #65 (closed) no longer works since we define an "exports" within the package.
Should we prefer not to export the class, it might be best to change the PhoneNumber type export to an interface instead.