libphonenumber-js 1.12.1 → 1.12.3

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/core/index.d.cts CHANGED
@@ -12,6 +12,8 @@ import {
12
12
  NumberType,
13
13
  NumberFormat,
14
14
  NumberingPlan,
15
+ FormatNumberOptions,
16
+ FormatNumberOptionsWithoutIDD,
15
17
  ValidatePhoneNumberLengthResult
16
18
  } from '../types.d.cjs';
17
19
 
package/core/index.d.ts CHANGED
@@ -12,6 +12,8 @@ import {
12
12
  NumberType,
13
13
  NumberFormat,
14
14
  NumberingPlan,
15
+ FormatNumberOptions,
16
+ FormatNumberOptionsWithoutIDD,
15
17
  ValidatePhoneNumberLengthResult
16
18
  } from '../types.d.js';
17
19
 
package/custom.d.ts CHANGED
@@ -20,6 +20,7 @@ import {
20
20
  import {
21
21
  ParsedNumber,
22
22
  FormatNumberOptions,
23
+ FormatNumberOptionsWithoutIDD,
23
24
  ParseNumberOptions
24
25
  } from './index.d.js';
25
26
 
package/index.d.cts CHANGED
@@ -12,6 +12,8 @@ import {
12
12
  NumberType,
13
13
  NumberFormat,
14
14
  NumberingPlan,
15
+ FormatNumberOptions,
16
+ FormatNumberOptionsWithoutIDD,
15
17
  ValidatePhoneNumberLengthResult
16
18
  } from './types.d.cjs';
17
19
 
package/index.d.ts CHANGED
@@ -12,6 +12,8 @@ import {
12
12
  NumberType,
13
13
  NumberFormat,
14
14
  NumberingPlan,
15
+ FormatNumberOptions,
16
+ FormatNumberOptionsWithoutIDD,
15
17
  ValidatePhoneNumberLengthResult
16
18
  } from './types.d.js';
17
19
 
package/max/index.d.cts CHANGED
@@ -12,6 +12,8 @@ import {
12
12
  NumberType,
13
13
  NumberFormat,
14
14
  NumberingPlan,
15
+ FormatNumberOptions,
16
+ FormatNumberOptionsWithoutIDD,
15
17
  ValidatePhoneNumberLengthResult
16
18
  } from '../types.d.cjs';
17
19
 
package/max/index.d.ts CHANGED
@@ -12,6 +12,8 @@ import {
12
12
  NumberType,
13
13
  NumberFormat,
14
14
  NumberingPlan,
15
+ FormatNumberOptions,
16
+ FormatNumberOptionsWithoutIDD,
15
17
  ValidatePhoneNumberLengthResult
16
18
  } from '../types.d.js';
17
19
 
package/min/index.d.cts CHANGED
@@ -12,6 +12,8 @@ import {
12
12
  NumberType,
13
13
  NumberFormat,
14
14
  NumberingPlan,
15
+ FormatNumberOptions,
16
+ FormatNumberOptionsWithoutIDD,
15
17
  ValidatePhoneNumberLengthResult
16
18
  } from '../types.d.cjs';
17
19
 
package/min/index.d.ts CHANGED
@@ -12,6 +12,8 @@ import {
12
12
  NumberType,
13
13
  NumberFormat,
14
14
  NumberingPlan,
15
+ FormatNumberOptions,
16
+ FormatNumberOptionsWithoutIDD,
15
17
  ValidatePhoneNumberLengthResult
16
18
  } from '../types.d.js';
17
19
 
@@ -12,6 +12,8 @@ import {
12
12
  NumberType,
13
13
  NumberFormat,
14
14
  NumberingPlan,
15
+ FormatNumberOptions,
16
+ FormatNumberOptionsWithoutIDD,
15
17
  ValidatePhoneNumberLengthResult
16
18
  } from '../types.d.cjs';
17
19
 
package/mobile/index.d.ts CHANGED
@@ -12,6 +12,8 @@ import {
12
12
  NumberType,
13
13
  NumberFormat,
14
14
  NumberingPlan,
15
+ FormatNumberOptions,
16
+ FormatNumberOptionsWithoutIDD,
15
17
  ValidatePhoneNumberLengthResult
16
18
  } from '../types.d.js';
17
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libphonenumber-js",
3
- "version": "1.12.1",
3
+ "version": "1.12.3",
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",
package/types.d.cts CHANGED
@@ -91,18 +91,18 @@ export type CountryCallingCode = Tagged<string, "CountryCallingCode">;
91
91
 
92
92
  type FormatExtension = (formattedNumber: string, extension: Extension, metadata: MetadataJson) => string
93
93
 
94
- type FormatNumberOptionsWithoutIDD = {
95
- v2?: boolean;
96
- formatExtension?: FormatExtension;
97
- };
98
-
99
- type FormatNumberOptions = {
94
+ export interface FormatNumberOptions {
100
95
  v2?: boolean;
101
96
  fromCountry?: CountryCode;
102
97
  humanReadable?: boolean;
103
98
  nationalPrefix?: boolean;
104
99
  formatExtension?: FormatExtension;
105
- };
100
+ }
101
+
102
+ export interface FormatNumberOptionsWithoutIDD {
103
+ v2?: boolean;
104
+ formatExtension?: FormatExtension;
105
+ }
106
106
 
107
107
  // // https://stackoverflow.com/a/67026991
108
108
  // type ArrayOfAtLeastOneCountryCode = [CountryCode, ...CountryCode[]];
package/types.d.ts CHANGED
@@ -91,18 +91,18 @@ export type CountryCallingCode = Tagged<string, "CountryCallingCode">;
91
91
 
92
92
  type FormatExtension = (formattedNumber: string, extension: Extension, metadata: MetadataJson) => string
93
93
 
94
- type FormatNumberOptionsWithoutIDD = {
95
- v2?: boolean;
96
- formatExtension?: FormatExtension;
97
- };
98
-
99
- type FormatNumberOptions = {
94
+ export interface FormatNumberOptions {
100
95
  v2?: boolean;
101
96
  fromCountry?: CountryCode;
102
97
  humanReadable?: boolean;
103
98
  nationalPrefix?: boolean;
104
99
  formatExtension?: FormatExtension;
105
- };
100
+ }
101
+
102
+ export interface FormatNumberOptionsWithoutIDD {
103
+ v2?: boolean;
104
+ formatExtension?: FormatExtension;
105
+ }
106
106
 
107
107
  // // https://stackoverflow.com/a/67026991
108
108
  // type ArrayOfAtLeastOneCountryCode = [CountryCode, ...CountryCode[]];