@formatjs/ecma402-abstract 3.0.7 → 3.0.8

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.
Files changed (99) hide show
  1. package/262.d.ts +55 -55
  2. package/262.js +322 -327
  3. package/CanonicalizeLocaleList.d.ts +3 -3
  4. package/CanonicalizeLocaleList.js +5 -5
  5. package/CanonicalizeTimeZoneName.d.ts +13 -13
  6. package/CanonicalizeTimeZoneName.js +81 -82
  7. package/CoerceOptionsToObject.d.ts +4 -4
  8. package/CoerceOptionsToObject.js +9 -9
  9. package/DefaultNumberOption.d.ts +6 -6
  10. package/DefaultNumberOption.js +15 -15
  11. package/GetNumberOption.d.ts +5 -9
  12. package/GetNumberOption.js +10 -10
  13. package/GetOption.d.ts +12 -8
  14. package/GetOption.js +28 -28
  15. package/GetOptionsObject.d.ts +4 -4
  16. package/GetOptionsObject.js +11 -11
  17. package/GetStringOrBooleanOption.d.ts +4 -10
  18. package/GetStringOrBooleanOption.js +28 -28
  19. package/IsSanctionedSimpleUnitIdentifier.d.ts +8 -6
  20. package/IsSanctionedSimpleUnitIdentifier.js +53 -53
  21. package/IsValidTimeZoneName.d.ts +15 -15
  22. package/IsValidTimeZoneName.js +65 -66
  23. package/IsWellFormedCurrencyCode.d.ts +2 -2
  24. package/IsWellFormedCurrencyCode.js +15 -15
  25. package/IsWellFormedUnitIdentifier.d.ts +3 -3
  26. package/IsWellFormedUnitIdentifier.js +21 -22
  27. package/NumberFormat/ApplyUnsignedRoundingMode.d.ts +2 -2
  28. package/NumberFormat/ApplyUnsignedRoundingMode.js +31 -31
  29. package/NumberFormat/CollapseNumberRange.d.ts +6 -6
  30. package/NumberFormat/CollapseNumberRange.js +47 -47
  31. package/NumberFormat/ComputeExponent.d.ts +8 -8
  32. package/NumberFormat/ComputeExponent.js +48 -58
  33. package/NumberFormat/ComputeExponentForMagnitude.d.ts +6 -6
  34. package/NumberFormat/ComputeExponentForMagnitude.js +64 -72
  35. package/NumberFormat/CurrencyDigits.d.ts +3 -3
  36. package/NumberFormat/CurrencyDigits.js +5 -8
  37. package/NumberFormat/FormatApproximately.d.ts +3 -3
  38. package/NumberFormat/FormatApproximately.js +10 -6
  39. package/NumberFormat/FormatNumeric.d.ts +2 -2
  40. package/NumberFormat/FormatNumeric.js +4 -3
  41. package/NumberFormat/FormatNumericRange.d.ts +6 -6
  42. package/NumberFormat/FormatNumericRange.js +7 -9
  43. package/NumberFormat/FormatNumericRangeToParts.d.ts +6 -6
  44. package/NumberFormat/FormatNumericRangeToParts.js +12 -14
  45. package/NumberFormat/FormatNumericToParts.d.ts +3 -3
  46. package/NumberFormat/FormatNumericToParts.js +12 -12
  47. package/NumberFormat/FormatNumericToString.d.ts +7 -7
  48. package/NumberFormat/FormatNumericToString.js +79 -81
  49. package/NumberFormat/GetUnsignedRoundingMode.d.ts +1 -1
  50. package/NumberFormat/GetUnsignedRoundingMode.js +25 -24
  51. package/NumberFormat/InitializeNumberFormat.d.ts +10 -10
  52. package/NumberFormat/InitializeNumberFormat.js +83 -64
  53. package/NumberFormat/PartitionNumberPattern.d.ts +4 -4
  54. package/NumberFormat/PartitionNumberPattern.js +112 -123
  55. package/NumberFormat/PartitionNumberRangePattern.d.ts +6 -6
  56. package/NumberFormat/PartitionNumberRangePattern.js +41 -38
  57. package/NumberFormat/SetNumberFormatDigitOptions.d.ts +3 -3
  58. package/NumberFormat/SetNumberFormatDigitOptions.js +185 -174
  59. package/NumberFormat/SetNumberFormatUnitOptions.d.ts +3 -3
  60. package/NumberFormat/SetNumberFormatUnitOptions.js +62 -48
  61. package/NumberFormat/ToRawFixed.d.ts +7 -7
  62. package/NumberFormat/ToRawFixed.js +103 -107
  63. package/NumberFormat/ToRawPrecision.d.ts +7 -7
  64. package/NumberFormat/ToRawPrecision.js +199 -202
  65. package/NumberFormat/decimal-cache.d.ts +10 -10
  66. package/NumberFormat/decimal-cache.js +13 -13
  67. package/NumberFormat/digit-mapping.generated.js +781 -66
  68. package/NumberFormat/format_to_parts.d.ts +24 -20
  69. package/NumberFormat/format_to_parts.js +446 -438
  70. package/PartitionPattern.d.ts +6 -6
  71. package/PartitionPattern.js +33 -33
  72. package/SupportedLocales.d.ts +6 -6
  73. package/SupportedLocales.js +17 -17
  74. package/ToIntlMathematicalValue.d.ts +1 -1
  75. package/ToIntlMathematicalValue.js +24 -25
  76. package/constants.d.ts +1 -1
  77. package/constants.js +4 -4
  78. package/data.d.ts +1 -1
  79. package/data.js +4 -11
  80. package/index.d.ts +47 -47
  81. package/index.js +45 -45
  82. package/package.json +3 -3
  83. package/regex.generated.d.ts +1 -0
  84. package/regex.generated.js +1 -1
  85. package/types/core.d.ts +5 -5
  86. package/types/date-time.d.ts +123 -128
  87. package/types/date-time.js +6 -6
  88. package/types/displaynames.d.ts +55 -55
  89. package/types/displaynames.js +1 -1
  90. package/types/list.d.ts +11 -11
  91. package/types/list.js +1 -1
  92. package/types/number.d.ts +151 -137
  93. package/types/number.js +2 -1
  94. package/types/plural-rules.d.ts +11 -11
  95. package/types/plural-rules.js +2 -1
  96. package/types/relative-time.d.ts +26 -32
  97. package/types/relative-time.js +2 -1
  98. package/utils.d.ts +40 -14
  99. package/utils.js +63 -116
package/262.d.ts CHANGED
@@ -1,93 +1,93 @@
1
- import { Decimal } from 'decimal.js';
1
+ import { Decimal } from "decimal.js";
2
2
  /**
3
- * https://tc39.es/ecma262/#sec-tostring
4
- */
3
+ * https://tc39.es/ecma262/#sec-tostring
4
+ */
5
5
  export declare function ToString(o: unknown): string;
6
6
  /**
7
- * https://tc39.es/ecma262/#sec-tonumber
8
- * @param val
9
- */
7
+ * https://tc39.es/ecma262/#sec-tonumber
8
+ * @param val
9
+ */
10
10
  export declare function ToNumber(arg: any): Decimal;
11
11
  /**
12
- * https://tc39.es/ecma262/#sec-timeclip
13
- * @param time
14
- */
12
+ * https://tc39.es/ecma262/#sec-timeclip
13
+ * @param time
14
+ */
15
15
  export declare function TimeClip(time: Decimal): Decimal;
16
16
  /**
17
- * https://tc39.es/ecma262/#sec-toobject
18
- * @param arg
19
- */
17
+ * https://tc39.es/ecma262/#sec-toobject
18
+ * @param arg
19
+ */
20
20
  export declare function ToObject<T>(arg: T): T extends null ? never : T extends undefined ? never : T;
21
21
  /**
22
- * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-samevalue
23
- * @param x
24
- * @param y
25
- */
22
+ * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-samevalue
23
+ * @param x
24
+ * @param y
25
+ */
26
26
  export declare function SameValue(x: any, y: any): boolean;
27
27
  /**
28
- * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-arraycreate
29
- * @param len
30
- */
28
+ * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-arraycreate
29
+ * @param len
30
+ */
31
31
  export declare function ArrayCreate<T = any>(len: number): T[];
32
32
  /**
33
- * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-hasownproperty
34
- * @param o
35
- * @param prop
36
- */
33
+ * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-hasownproperty
34
+ * @param o
35
+ * @param prop
36
+ */
37
37
  export declare function HasOwnProperty(o: object, prop: string): boolean;
38
38
  /**
39
- * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-type
40
- * @param x
41
- */
42
- export declare function Type(x: any): 'Null' | 'Undefined' | 'Object' | 'Number' | 'Boolean' | 'String' | 'Symbol' | 'BigInt' | undefined;
39
+ * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-type
40
+ * @param x
41
+ */
42
+ export declare function Type(x: any): "Null" | "Undefined" | "Object" | "Number" | "Boolean" | "String" | "Symbol" | "BigInt" | undefined;
43
43
  /**
44
- * https://tc39.es/ecma262/#eqn-Day
45
- * @param t
46
- */
44
+ * https://tc39.es/ecma262/#eqn-Day
45
+ * @param t
46
+ */
47
47
  export declare function Day(t: number): number;
48
48
  /**
49
- * https://tc39.es/ecma262/#sec-week-day
50
- * @param t
51
- */
49
+ * https://tc39.es/ecma262/#sec-week-day
50
+ * @param t
51
+ */
52
52
  export declare function WeekDay(t: number): number;
53
53
  /**
54
- * https://tc39.es/ecma262/#sec-year-number
55
- * @param y
56
- */
54
+ * https://tc39.es/ecma262/#sec-year-number
55
+ * @param y
56
+ */
57
57
  export declare function DayFromYear(y: number): number;
58
58
  /**
59
- * https://tc39.es/ecma262/#sec-year-number
60
- * @param y
61
- */
59
+ * https://tc39.es/ecma262/#sec-year-number
60
+ * @param y
61
+ */
62
62
  export declare function TimeFromYear(y: number): number;
63
63
  /**
64
- * https://tc39.es/ecma262/#sec-year-number
65
- * @param t
66
- */
64
+ * https://tc39.es/ecma262/#sec-year-number
65
+ * @param t
66
+ */
67
67
  export declare function YearFromTime(t: number): number;
68
68
  export declare function DaysInYear(y: number): 365 | 366;
69
69
  export declare function DayWithinYear(t: number): number;
70
70
  export declare function InLeapYear(t: number): 0 | 1;
71
71
  /**
72
- * https://tc39.es/ecma262/#sec-month-number
73
- * @param t
74
- */
72
+ * https://tc39.es/ecma262/#sec-month-number
73
+ * @param t
74
+ */
75
75
  export declare function MonthFromTime(t: number): 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
76
76
  export declare function DateFromTime(t: number): number;
77
77
  export declare function HourFromTime(t: number): number;
78
78
  export declare function MinFromTime(t: number): number;
79
79
  export declare function SecFromTime(t: number): number;
80
80
  /**
81
- * The abstract operation OrdinaryHasInstance implements
82
- * the default algorithm for determining if an object O
83
- * inherits from the instance object inheritance path
84
- * provided by constructor C.
85
- * @param C class
86
- * @param O object
87
- * @param internalSlots internalSlots
88
- */
81
+ * The abstract operation OrdinaryHasInstance implements
82
+ * the default algorithm for determining if an object O
83
+ * inherits from the instance object inheritance path
84
+ * provided by constructor C.
85
+ * @param C class
86
+ * @param O object
87
+ * @param internalSlots internalSlots
88
+ */
89
89
  export declare function OrdinaryHasInstance(C: object, O: any, internalSlots?: {
90
- boundTargetFunction: any;
90
+ boundTargetFunction: any;
91
91
  }): boolean;
92
92
  export declare function msFromTime(t: number): number;
93
- export declare function ToPrimitive<T extends 'string' | 'number' = 'string' | 'number'>(input: any, preferredType: T): string | number | boolean | undefined | null;
93
+ export declare function ToPrimitive<T extends "string" | "number" = "string" | "number">(input: any, preferredType: T): string | number | boolean | undefined | null;