libphonenumber-js 1.10.42 → 1.10.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.cts CHANGED
@@ -139,7 +139,7 @@ export function getCountryCallingCode(countryCode: CountryCode): CountryCallingC
139
139
  // Deprecated.
140
140
  export function getPhoneCode(countryCode: CountryCode): CountryCallingCode;
141
141
  export function getExtPrefix(countryCode: CountryCode): string;
142
- export function isSupportedCountry(countryCode: string): boolean;
142
+ export function isSupportedCountry(countryCode: string): countryCode is CountryCode;
143
143
 
144
144
  export function formatIncompletePhoneNumber(number: string, countryCode?: CountryCode): string;
145
145
  export function parseIncompletePhoneNumber(text: string): string;
package/index.d.ts CHANGED
@@ -139,7 +139,7 @@ export function getCountryCallingCode(countryCode: CountryCode): CountryCallingC
139
139
  // Deprecated.
140
140
  export function getPhoneCode(countryCode: CountryCode): CountryCallingCode;
141
141
  export function getExtPrefix(countryCode: CountryCode): string;
142
- export function isSupportedCountry(countryCode: string): boolean;
142
+ export function isSupportedCountry(countryCode: string): countryCode is CountryCode;
143
143
 
144
144
  export function formatIncompletePhoneNumber(number: string, countryCode?: CountryCode): string;
145
145
  export function parseIncompletePhoneNumber(text: string): string;
package/max/index.d.cts CHANGED
@@ -68,7 +68,7 @@ export class PhoneNumberMatcher {
68
68
  next(): NumberFound | undefined;
69
69
  }
70
70
 
71
- export function isSupportedCountry(countryCode: CountryCode): boolean;
71
+ export function isSupportedCountry(countryCode: string): countryCode is CountryCode;
72
72
  export function getCountries(): CountryCode[];
73
73
  export function getCountryCallingCode(countryCode: CountryCode): CountryCallingCode;
74
74
  export function getExtPrefix(countryCode: CountryCode): string;
package/max/index.d.ts CHANGED
@@ -68,7 +68,7 @@ export class PhoneNumberMatcher {
68
68
  next(): NumberFound | undefined;
69
69
  }
70
70
 
71
- export function isSupportedCountry(countryCode: CountryCode): boolean;
71
+ export function isSupportedCountry(countryCode: string): countryCode is CountryCode;
72
72
  export function getCountries(): CountryCode[];
73
73
  export function getCountryCallingCode(countryCode: CountryCode): CountryCallingCode;
74
74
  export function getExtPrefix(countryCode: CountryCode): string;
package/min/index.d.cts CHANGED
@@ -68,7 +68,7 @@ export class PhoneNumberMatcher {
68
68
  next(): NumberFound | undefined;
69
69
  }
70
70
 
71
- export function isSupportedCountry(countryCode: CountryCode): boolean;
71
+ export function isSupportedCountry(countryCode: string): countryCode is CountryCode;
72
72
  export function getCountries(): CountryCode[];
73
73
  export function getCountryCallingCode(countryCode: CountryCode): CountryCallingCode;
74
74
  export function getExtPrefix(countryCode: CountryCode): string;
package/min/index.d.ts CHANGED
@@ -68,7 +68,7 @@ export class PhoneNumberMatcher {
68
68
  next(): NumberFound | undefined;
69
69
  }
70
70
 
71
- export function isSupportedCountry(countryCode: CountryCode): boolean;
71
+ export function isSupportedCountry(countryCode: string): countryCode is CountryCode;
72
72
  export function getCountries(): CountryCode[];
73
73
  export function getCountryCallingCode(countryCode: CountryCode): CountryCallingCode;
74
74
  export function getExtPrefix(countryCode: CountryCode): string;
@@ -68,7 +68,7 @@ export class PhoneNumberMatcher {
68
68
  next(): NumberFound | undefined;
69
69
  }
70
70
 
71
- export function isSupportedCountry(countryCode: CountryCode): boolean;
71
+ export function isSupportedCountry(countryCode: string): countryCode is CountryCode;
72
72
  export function getCountries(): CountryCode[];
73
73
  export function getCountryCallingCode(countryCode: CountryCode): CountryCallingCode;
74
74
  export function getExtPrefix(countryCode: CountryCode): string;
package/mobile/index.d.ts CHANGED
@@ -68,7 +68,7 @@ export class PhoneNumberMatcher {
68
68
  next(): NumberFound | undefined;
69
69
  }
70
70
 
71
- export function isSupportedCountry(countryCode: CountryCode): boolean;
71
+ export function isSupportedCountry(countryCode: string): countryCode is CountryCode;
72
72
  export function getCountries(): CountryCode[];
73
73
  export function getCountryCallingCode(countryCode: CountryCode): CountryCallingCode;
74
74
  export function getExtPrefix(countryCode: CountryCode): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libphonenumber-js",
3
- "version": "1.10.42",
3
+ "version": "1.10.43",
4
4
  "description": "A simpler (and smaller) rewrite of Google Android's libphonenumber library in javascript",
5
5
  "main": "index.cjs",
6
6
  "module": "index.js",