@formatjs/ecma402-abstract 1.0.3 → 1.2.2

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 (242) hide show
  1. package/262.d.ts +79 -0
  2. package/262.d.ts.map +1 -0
  3. package/262.js +336 -0
  4. package/_validate_dist-base_options.optionsvalid.d.ts +2 -1
  5. package/_validate_dist-esm_options.optionsvalid.d.ts +2 -1
  6. package/index.d.ts +33 -0
  7. package/index.d.ts.map +1 -1
  8. package/index.js +52 -11
  9. package/lib/262.d.ts +79 -0
  10. package/lib/262.d.ts.map +1 -0
  11. package/lib/262.js +312 -0
  12. package/lib/index.d.ts +33 -0
  13. package/lib/index.d.ts.map +1 -1
  14. package/lib/index.js +33 -0
  15. package/lib/src/CanonicalizeLocaleList.d.ts +6 -0
  16. package/lib/src/CanonicalizeLocaleList.d.ts.map +1 -0
  17. package/lib/src/CanonicalizeLocaleList.js +8 -0
  18. package/lib/src/CanonicalizeTimeZoneName.d.ts +9 -0
  19. package/lib/src/CanonicalizeTimeZoneName.d.ts.map +1 -0
  20. package/lib/src/CanonicalizeTimeZoneName.js +17 -0
  21. package/lib/src/DateTimeFormat/BasicFormatMatcher.d.ts +8 -0
  22. package/lib/src/DateTimeFormat/BasicFormatMatcher.d.ts.map +1 -0
  23. package/lib/src/DateTimeFormat/BasicFormatMatcher.js +61 -0
  24. package/lib/src/DateTimeFormat/BestFitFormatMatcher.d.ts +17 -0
  25. package/lib/src/DateTimeFormat/BestFitFormatMatcher.d.ts.map +1 -0
  26. package/lib/src/DateTimeFormat/BestFitFormatMatcher.js +119 -0
  27. package/lib/src/DateTimeFormat/DateTimeStyleFormat.d.ts +3 -0
  28. package/lib/src/DateTimeFormat/DateTimeStyleFormat.d.ts.map +1 -0
  29. package/lib/src/DateTimeFormat/DateTimeStyleFormat.js +50 -0
  30. package/lib/src/DateTimeFormat/FormatDateTime.d.ts +8 -0
  31. package/lib/src/DateTimeFormat/FormatDateTime.d.ts.map +1 -0
  32. package/lib/src/DateTimeFormat/FormatDateTime.js +15 -0
  33. package/lib/src/DateTimeFormat/FormatDateTimeToParts.d.ts +10 -0
  34. package/lib/src/DateTimeFormat/FormatDateTimeToParts.d.ts.map +1 -0
  35. package/lib/src/DateTimeFormat/FormatDateTimeToParts.js +21 -0
  36. package/lib/src/DateTimeFormat/InitializeDateTimeFormat.d.ts +18 -0
  37. package/lib/src/DateTimeFormat/InitializeDateTimeFormat.d.ts.map +1 -0
  38. package/lib/src/DateTimeFormat/InitializeDateTimeFormat.js +163 -0
  39. package/lib/src/DateTimeFormat/PartitionDateTimePattern.d.ts +13 -0
  40. package/lib/src/DateTimeFormat/PartitionDateTimePattern.d.ts.map +1 -0
  41. package/lib/src/DateTimeFormat/PartitionDateTimePattern.js +176 -0
  42. package/lib/src/DateTimeFormat/ToDateTimeOptions.d.ts +9 -0
  43. package/lib/src/DateTimeFormat/ToDateTimeOptions.d.ts.map +1 -0
  44. package/lib/src/DateTimeFormat/ToDateTimeOptions.js +57 -0
  45. package/lib/src/DateTimeFormat/ToLocalTime.d.ts +24 -0
  46. package/lib/src/DateTimeFormat/ToLocalTime.d.ts.map +1 -0
  47. package/lib/src/DateTimeFormat/ToLocalTime.js +49 -0
  48. package/lib/src/DateTimeFormat/skeleton.d.ts +9 -0
  49. package/lib/src/DateTimeFormat/skeleton.d.ts.map +1 -0
  50. package/lib/src/DateTimeFormat/skeleton.js +163 -0
  51. package/lib/src/DateTimeFormat/utils.d.ts +10 -0
  52. package/lib/src/DateTimeFormat/utils.d.ts.map +1 -0
  53. package/lib/src/DateTimeFormat/utils.js +18 -0
  54. package/lib/src/DisplayNames/CanonicalCodeForDisplayNames.d.ts +2 -0
  55. package/lib/src/DisplayNames/CanonicalCodeForDisplayNames.d.ts.map +1 -0
  56. package/lib/src/DisplayNames/CanonicalCodeForDisplayNames.js +33 -0
  57. package/lib/src/GetOption.js +1 -1
  58. package/lib/src/IsValidTimeZoneName.d.ts +10 -0
  59. package/lib/src/IsValidTimeZoneName.d.ts.map +1 -0
  60. package/lib/src/IsValidTimeZoneName.js +11 -0
  61. package/lib/src/NumberFormat/ComputeExponent.d.ts +12 -0
  62. package/lib/src/NumberFormat/ComputeExponent.d.ts.map +1 -0
  63. package/lib/src/NumberFormat/ComputeExponent.js +39 -0
  64. package/lib/src/NumberFormat/ComputeExponentForMagnitude.d.ts +10 -0
  65. package/lib/src/NumberFormat/ComputeExponentForMagnitude.d.ts.map +1 -0
  66. package/lib/src/NumberFormat/ComputeExponentForMagnitude.js +60 -0
  67. package/lib/src/NumberFormat/CurrencyDigits.d.ts +7 -0
  68. package/lib/src/NumberFormat/CurrencyDigits.d.ts.map +1 -0
  69. package/lib/src/NumberFormat/CurrencyDigits.js +10 -0
  70. package/lib/src/NumberFormat/FormatNumericToParts.d.ts +5 -0
  71. package/lib/src/NumberFormat/FormatNumericToParts.d.ts.map +1 -0
  72. package/lib/src/NumberFormat/FormatNumericToParts.js +14 -0
  73. package/lib/src/NumberFormat/FormatNumericToString.js +1 -1
  74. package/lib/src/NumberFormat/InitializeNumberFormat.d.ts +13 -0
  75. package/lib/src/NumberFormat/InitializeNumberFormat.d.ts.map +1 -0
  76. package/lib/src/NumberFormat/InitializeNumberFormat.js +71 -0
  77. package/lib/src/NumberFormat/PartitionNumberPattern.d.ts +8 -0
  78. package/lib/src/NumberFormat/PartitionNumberPattern.d.ts.map +1 -0
  79. package/lib/src/NumberFormat/PartitionNumberPattern.js +74 -0
  80. package/lib/src/NumberFormat/SetNumberFormatUnitOptions.d.ts +8 -0
  81. package/lib/src/NumberFormat/SetNumberFormatUnitOptions.d.ts.map +1 -0
  82. package/lib/src/NumberFormat/SetNumberFormatUnitOptions.js +39 -0
  83. package/lib/src/NumberFormat/digit-mapping.json +1 -0
  84. package/lib/src/NumberFormat/format_to_parts.d.ts +22 -0
  85. package/lib/src/NumberFormat/format_to_parts.d.ts.map +1 -0
  86. package/lib/src/NumberFormat/format_to_parts.js +421 -0
  87. package/lib/src/PluralRules/GetOperands.d.ts +32 -0
  88. package/lib/src/PluralRules/GetOperands.d.ts.map +1 -0
  89. package/lib/src/PluralRules/GetOperands.js +47 -0
  90. package/lib/src/PluralRules/InitializePluralRules.d.ts +9 -0
  91. package/lib/src/PluralRules/InitializePluralRules.d.ts.map +1 -0
  92. package/lib/src/PluralRules/InitializePluralRules.js +20 -0
  93. package/lib/src/PluralRules/ResolvePlural.d.ts +13 -0
  94. package/lib/src/PluralRules/ResolvePlural.d.ts.map +1 -0
  95. package/lib/src/PluralRules/ResolvePlural.js +25 -0
  96. package/lib/src/RelativeTimeFormat/FormatRelativeTime.d.ts +5 -0
  97. package/lib/src/RelativeTimeFormat/FormatRelativeTime.d.ts.map +1 -0
  98. package/lib/src/RelativeTimeFormat/FormatRelativeTime.js +10 -0
  99. package/lib/src/RelativeTimeFormat/FormatRelativeTimeToParts.d.ts +5 -0
  100. package/lib/src/RelativeTimeFormat/FormatRelativeTimeToParts.d.ts.map +1 -0
  101. package/lib/src/RelativeTimeFormat/FormatRelativeTimeToParts.js +18 -0
  102. package/lib/src/RelativeTimeFormat/InitializeRelativeTimeFormat.d.ts +9 -0
  103. package/lib/src/RelativeTimeFormat/InitializeRelativeTimeFormat.d.ts.map +1 -0
  104. package/lib/src/RelativeTimeFormat/InitializeRelativeTimeFormat.js +32 -0
  105. package/lib/src/RelativeTimeFormat/MakePartsList.d.ts +3 -0
  106. package/lib/src/RelativeTimeFormat/MakePartsList.d.ts.map +1 -0
  107. package/lib/src/RelativeTimeFormat/MakePartsList.js +27 -0
  108. package/lib/src/RelativeTimeFormat/PartitionRelativeTimePattern.d.ts +5 -0
  109. package/lib/src/RelativeTimeFormat/PartitionRelativeTimePattern.d.ts.map +1 -0
  110. package/lib/src/RelativeTimeFormat/PartitionRelativeTimePattern.js +54 -0
  111. package/lib/src/RelativeTimeFormat/SingularRelativeTimeUnit.d.ts +7 -0
  112. package/lib/src/RelativeTimeFormat/SingularRelativeTimeUnit.d.ts.map +1 -0
  113. package/lib/src/RelativeTimeFormat/SingularRelativeTimeUnit.js +36 -0
  114. package/lib/src/SupportedLocales.js +1 -1
  115. package/lib/src/data.js +1 -1
  116. package/lib/types/core.js +1 -0
  117. package/lib/types/date-time.d.ts +112 -0
  118. package/lib/types/date-time.d.ts.map +1 -0
  119. package/lib/types/date-time.js +1 -0
  120. package/lib/types/displaynames.js +1 -0
  121. package/lib/types/list.js +1 -0
  122. package/lib/types/number.d.ts +44 -0
  123. package/lib/types/number.d.ts.map +1 -1
  124. package/lib/types/number.js +1 -0
  125. package/lib/types/plural-rules.d.ts +6 -0
  126. package/lib/types/plural-rules.d.ts.map +1 -1
  127. package/lib/types/plural-rules.js +1 -0
  128. package/lib/types/relative-time.d.ts +63 -0
  129. package/lib/types/relative-time.d.ts.map +1 -1
  130. package/lib/types/relative-time.js +1 -0
  131. package/package.json +2 -6
  132. package/src/CanonicalizeLocaleList.d.ts +6 -0
  133. package/src/CanonicalizeLocaleList.d.ts.map +1 -0
  134. package/src/CanonicalizeLocaleList.js +12 -0
  135. package/src/CanonicalizeTimeZoneName.d.ts +9 -0
  136. package/src/CanonicalizeTimeZoneName.d.ts.map +1 -0
  137. package/src/CanonicalizeTimeZoneName.js +21 -0
  138. package/src/DateTimeFormat/BasicFormatMatcher.d.ts +8 -0
  139. package/src/DateTimeFormat/BasicFormatMatcher.d.ts.map +1 -0
  140. package/src/DateTimeFormat/BasicFormatMatcher.js +65 -0
  141. package/src/DateTimeFormat/BestFitFormatMatcher.d.ts +17 -0
  142. package/src/DateTimeFormat/BestFitFormatMatcher.d.ts.map +1 -0
  143. package/src/DateTimeFormat/BestFitFormatMatcher.js +124 -0
  144. package/src/DateTimeFormat/DateTimeStyleFormat.d.ts +3 -0
  145. package/src/DateTimeFormat/DateTimeStyleFormat.d.ts.map +1 -0
  146. package/src/DateTimeFormat/DateTimeStyleFormat.js +54 -0
  147. package/src/DateTimeFormat/FormatDateTime.d.ts +8 -0
  148. package/src/DateTimeFormat/FormatDateTime.d.ts.map +1 -0
  149. package/src/DateTimeFormat/FormatDateTime.js +19 -0
  150. package/src/DateTimeFormat/FormatDateTimeToParts.d.ts +10 -0
  151. package/src/DateTimeFormat/FormatDateTimeToParts.d.ts.map +1 -0
  152. package/src/DateTimeFormat/FormatDateTimeToParts.js +25 -0
  153. package/src/DateTimeFormat/InitializeDateTimeFormat.d.ts +18 -0
  154. package/src/DateTimeFormat/InitializeDateTimeFormat.d.ts.map +1 -0
  155. package/src/DateTimeFormat/InitializeDateTimeFormat.js +167 -0
  156. package/src/DateTimeFormat/PartitionDateTimePattern.d.ts +13 -0
  157. package/src/DateTimeFormat/PartitionDateTimePattern.d.ts.map +1 -0
  158. package/src/DateTimeFormat/PartitionDateTimePattern.js +180 -0
  159. package/src/DateTimeFormat/ToDateTimeOptions.d.ts +9 -0
  160. package/src/DateTimeFormat/ToDateTimeOptions.d.ts.map +1 -0
  161. package/src/DateTimeFormat/ToDateTimeOptions.js +61 -0
  162. package/src/DateTimeFormat/ToLocalTime.d.ts +24 -0
  163. package/src/DateTimeFormat/ToLocalTime.d.ts.map +1 -0
  164. package/src/DateTimeFormat/ToLocalTime.js +53 -0
  165. package/src/DateTimeFormat/skeleton.d.ts +9 -0
  166. package/src/DateTimeFormat/skeleton.d.ts.map +1 -0
  167. package/src/DateTimeFormat/skeleton.js +167 -0
  168. package/src/DateTimeFormat/utils.d.ts +10 -0
  169. package/src/DateTimeFormat/utils.d.ts.map +1 -0
  170. package/src/DateTimeFormat/utils.js +21 -0
  171. package/src/DisplayNames/CanonicalCodeForDisplayNames.d.ts +2 -0
  172. package/src/DisplayNames/CanonicalCodeForDisplayNames.d.ts.map +1 -0
  173. package/src/DisplayNames/CanonicalCodeForDisplayNames.js +37 -0
  174. package/src/GetOption.js +2 -5
  175. package/src/IsValidTimeZoneName.d.ts +10 -0
  176. package/src/IsValidTimeZoneName.d.ts.map +1 -0
  177. package/src/IsValidTimeZoneName.js +15 -0
  178. package/src/NumberFormat/ComputeExponent.d.ts +12 -0
  179. package/src/NumberFormat/ComputeExponent.d.ts.map +1 -0
  180. package/src/NumberFormat/ComputeExponent.js +43 -0
  181. package/src/NumberFormat/ComputeExponentForMagnitude.d.ts +10 -0
  182. package/src/NumberFormat/ComputeExponentForMagnitude.d.ts.map +1 -0
  183. package/src/NumberFormat/ComputeExponentForMagnitude.js +64 -0
  184. package/src/NumberFormat/CurrencyDigits.d.ts +7 -0
  185. package/src/NumberFormat/CurrencyDigits.d.ts.map +1 -0
  186. package/src/NumberFormat/CurrencyDigits.js +14 -0
  187. package/src/NumberFormat/FormatNumericToParts.d.ts +5 -0
  188. package/src/NumberFormat/FormatNumericToParts.d.ts.map +1 -0
  189. package/src/NumberFormat/FormatNumericToParts.js +18 -0
  190. package/src/NumberFormat/FormatNumericToString.js +2 -5
  191. package/src/NumberFormat/InitializeNumberFormat.d.ts +13 -0
  192. package/src/NumberFormat/InitializeNumberFormat.d.ts.map +1 -0
  193. package/src/NumberFormat/InitializeNumberFormat.js +75 -0
  194. package/src/NumberFormat/PartitionNumberPattern.d.ts +8 -0
  195. package/src/NumberFormat/PartitionNumberPattern.d.ts.map +1 -0
  196. package/src/NumberFormat/PartitionNumberPattern.js +81 -0
  197. package/src/NumberFormat/SetNumberFormatUnitOptions.d.ts +8 -0
  198. package/src/NumberFormat/SetNumberFormatUnitOptions.d.ts.map +1 -0
  199. package/src/NumberFormat/SetNumberFormatUnitOptions.js +43 -0
  200. package/src/NumberFormat/digit-mapping.json +1 -0
  201. package/src/NumberFormat/format_to_parts.d.ts +22 -0
  202. package/src/NumberFormat/format_to_parts.d.ts.map +1 -0
  203. package/src/NumberFormat/format_to_parts.js +443 -0
  204. package/src/PluralRules/GetOperands.d.ts +32 -0
  205. package/src/PluralRules/GetOperands.d.ts.map +1 -0
  206. package/src/PluralRules/GetOperands.js +51 -0
  207. package/src/PluralRules/InitializePluralRules.d.ts +9 -0
  208. package/src/PluralRules/InitializePluralRules.d.ts.map +1 -0
  209. package/src/PluralRules/InitializePluralRules.js +24 -0
  210. package/src/PluralRules/ResolvePlural.d.ts +13 -0
  211. package/src/PluralRules/ResolvePlural.d.ts.map +1 -0
  212. package/src/PluralRules/ResolvePlural.js +29 -0
  213. package/src/RelativeTimeFormat/FormatRelativeTime.d.ts +5 -0
  214. package/src/RelativeTimeFormat/FormatRelativeTime.d.ts.map +1 -0
  215. package/src/RelativeTimeFormat/FormatRelativeTime.js +14 -0
  216. package/src/RelativeTimeFormat/FormatRelativeTimeToParts.d.ts +5 -0
  217. package/src/RelativeTimeFormat/FormatRelativeTimeToParts.d.ts.map +1 -0
  218. package/src/RelativeTimeFormat/FormatRelativeTimeToParts.js +22 -0
  219. package/src/RelativeTimeFormat/InitializeRelativeTimeFormat.d.ts +9 -0
  220. package/src/RelativeTimeFormat/InitializeRelativeTimeFormat.d.ts.map +1 -0
  221. package/src/RelativeTimeFormat/InitializeRelativeTimeFormat.js +36 -0
  222. package/src/RelativeTimeFormat/MakePartsList.d.ts +3 -0
  223. package/src/RelativeTimeFormat/MakePartsList.d.ts.map +1 -0
  224. package/src/RelativeTimeFormat/MakePartsList.js +31 -0
  225. package/src/RelativeTimeFormat/PartitionRelativeTimePattern.d.ts +5 -0
  226. package/src/RelativeTimeFormat/PartitionRelativeTimePattern.d.ts.map +1 -0
  227. package/src/RelativeTimeFormat/PartitionRelativeTimePattern.js +58 -0
  228. package/src/RelativeTimeFormat/SingularRelativeTimeUnit.d.ts +7 -0
  229. package/src/RelativeTimeFormat/SingularRelativeTimeUnit.d.ts.map +1 -0
  230. package/src/RelativeTimeFormat/SingularRelativeTimeUnit.js +40 -0
  231. package/src/SupportedLocales.js +2 -5
  232. package/src/data.js +1 -1
  233. package/types/date-time.d.ts +112 -0
  234. package/types/date-time.d.ts.map +1 -0
  235. package/types/date-time.js +2 -0
  236. package/types/number.d.ts +44 -0
  237. package/types/number.d.ts.map +1 -1
  238. package/types/plural-rules.d.ts +6 -0
  239. package/types/plural-rules.d.ts.map +1 -1
  240. package/types/relative-time.d.ts +63 -0
  241. package/types/relative-time.d.ts.map +1 -1
  242. package/types.js +1 -1
package/262.d.ts ADDED
@@ -0,0 +1,79 @@
1
+ /**
2
+ * https://tc39.es/ecma262/#sec-tostring
3
+ */
4
+ export declare function ToString(o: unknown): string;
5
+ /**
6
+ * https://tc39.es/ecma262/#sec-tonumber
7
+ * @param val
8
+ */
9
+ export declare function ToNumber(val: any): number;
10
+ /**
11
+ * https://tc39.es/ecma262/#sec-timeclip
12
+ * @param time
13
+ */
14
+ export declare function TimeClip(time: number): number;
15
+ /**
16
+ * https://tc39.es/ecma262/#sec-toobject
17
+ * @param arg
18
+ */
19
+ export declare function ToObject<T>(arg: T): T extends null ? never : T extends undefined ? never : T;
20
+ /**
21
+ * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-samevalue
22
+ * @param x
23
+ * @param y
24
+ */
25
+ export declare function SameValue(x: any, y: any): boolean;
26
+ /**
27
+ * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-arraycreate
28
+ * @param len
29
+ */
30
+ export declare function ArrayCreate(len: number): any[];
31
+ /**
32
+ * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-hasownproperty
33
+ * @param o
34
+ * @param prop
35
+ */
36
+ export declare function HasOwnProperty(o: object, prop: string): boolean;
37
+ /**
38
+ * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-type
39
+ * @param x
40
+ */
41
+ export declare function Type(x: any): "Null" | "Undefined" | "Object" | "Number" | "Boolean" | "String" | "Symbol" | "BigInt" | undefined;
42
+ /**
43
+ * https://tc39.es/ecma262/#eqn-Day
44
+ * @param t
45
+ */
46
+ export declare function Day(t: number): number;
47
+ /**
48
+ * https://tc39.es/ecma262/#sec-week-day
49
+ * @param t
50
+ */
51
+ export declare function WeekDay(t: number): number;
52
+ /**
53
+ * https://tc39.es/ecma262/#sec-year-number
54
+ * @param y
55
+ */
56
+ export declare function DayFromYear(y: number): number;
57
+ /**
58
+ * https://tc39.es/ecma262/#sec-year-number
59
+ * @param y
60
+ */
61
+ export declare function TimeFromYear(y: number): number;
62
+ /**
63
+ * https://tc39.es/ecma262/#sec-year-number
64
+ * @param t
65
+ */
66
+ export declare function YearFromTime(t: number): number;
67
+ export declare function DaysInYear(y: number): 365 | 366;
68
+ export declare function DayWithinYear(t: number): number;
69
+ export declare function InLeapYear(t: number): 0 | 1;
70
+ /**
71
+ * https://tc39.es/ecma262/#sec-month-number
72
+ * @param t
73
+ */
74
+ export declare function MonthFromTime(t: number): 1 | 0 | 4 | 7 | 2 | 3 | 5 | 6 | 8 | 9 | 10 | 11;
75
+ export declare function DateFromTime(t: number): number;
76
+ export declare function HourFromTime(t: number): number;
77
+ export declare function MinFromTime(t: number): number;
78
+ export declare function SecFromTime(t: number): number;
79
+ //# sourceMappingURL=262.d.ts.map
package/262.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"262.d.ts","sourceRoot":"","sources":["../../../../../packages/ecma402-abstract/262.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAM3C;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAiBzC;AAwBD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,UAQpC;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EACxB,GAAG,EAAE,CAAC,GACL,CAAC,SAAS,IAAI,GAAG,KAAK,GAAG,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAK1D;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,WAYvC;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,SAEtC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,WAErD;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,GAAG,uGAyB1B;AAcD;;;GAGG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,UAE5B;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,UAEhC;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,UAOpC;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,UAErC;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,UAOrC;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,aAWnC;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,UAEtC;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,GAAG,CAAC,CAE3C;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,mDAwCtC;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,UAyCrC;AASD,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,UAErC;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,UAEpC;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,UAEpC"}
package/262.js ADDED
@@ -0,0 +1,336 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SecFromTime = exports.MinFromTime = exports.HourFromTime = exports.DateFromTime = exports.MonthFromTime = exports.InLeapYear = exports.DayWithinYear = exports.DaysInYear = exports.YearFromTime = exports.TimeFromYear = exports.DayFromYear = exports.WeekDay = exports.Day = exports.Type = exports.HasOwnProperty = exports.ArrayCreate = exports.SameValue = exports.ToObject = exports.TimeClip = exports.ToNumber = exports.ToString = void 0;
4
+ /**
5
+ * https://tc39.es/ecma262/#sec-tostring
6
+ */
7
+ function ToString(o) {
8
+ // Only symbol is irregular...
9
+ if (typeof o === 'symbol') {
10
+ throw TypeError('Cannot convert a Symbol value to a string');
11
+ }
12
+ return String(o);
13
+ }
14
+ exports.ToString = ToString;
15
+ /**
16
+ * https://tc39.es/ecma262/#sec-tonumber
17
+ * @param val
18
+ */
19
+ function ToNumber(val) {
20
+ if (val === undefined) {
21
+ return NaN;
22
+ }
23
+ if (val === null) {
24
+ return +0;
25
+ }
26
+ if (typeof val === 'boolean') {
27
+ return val ? 1 : +0;
28
+ }
29
+ if (typeof val === 'number') {
30
+ return val;
31
+ }
32
+ if (typeof val === 'symbol' || typeof val === 'bigint') {
33
+ throw new TypeError('Cannot convert symbol/bigint to number');
34
+ }
35
+ return Number(val);
36
+ }
37
+ exports.ToNumber = ToNumber;
38
+ /**
39
+ * https://tc39.es/ecma262/#sec-tointeger
40
+ * @param n
41
+ */
42
+ function ToInteger(n) {
43
+ var number = ToNumber(n);
44
+ if (isNaN(number) || SameValue(number, -0)) {
45
+ return 0;
46
+ }
47
+ if (isFinite(number)) {
48
+ return number;
49
+ }
50
+ var integer = Math.floor(Math.abs(number));
51
+ if (number < 0) {
52
+ integer = -integer;
53
+ }
54
+ if (SameValue(integer, -0)) {
55
+ return 0;
56
+ }
57
+ return integer;
58
+ }
59
+ /**
60
+ * https://tc39.es/ecma262/#sec-timeclip
61
+ * @param time
62
+ */
63
+ function TimeClip(time) {
64
+ if (!isFinite(time)) {
65
+ return NaN;
66
+ }
67
+ if (Math.abs(time) > 8.64 * 1e16) {
68
+ return NaN;
69
+ }
70
+ return ToInteger(time);
71
+ }
72
+ exports.TimeClip = TimeClip;
73
+ /**
74
+ * https://tc39.es/ecma262/#sec-toobject
75
+ * @param arg
76
+ */
77
+ function ToObject(arg) {
78
+ if (arg == null) {
79
+ throw new TypeError('undefined/null cannot be converted to object');
80
+ }
81
+ return Object(arg);
82
+ }
83
+ exports.ToObject = ToObject;
84
+ /**
85
+ * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-samevalue
86
+ * @param x
87
+ * @param y
88
+ */
89
+ function SameValue(x, y) {
90
+ if (Object.is) {
91
+ return Object.is(x, y);
92
+ }
93
+ // SameValue algorithm
94
+ if (x === y) {
95
+ // Steps 1-5, 7-10
96
+ // Steps 6.b-6.e: +0 != -0
97
+ return x !== 0 || 1 / x === 1 / y;
98
+ }
99
+ // Step 6.a: NaN == NaN
100
+ return x !== x && y !== y;
101
+ }
102
+ exports.SameValue = SameValue;
103
+ /**
104
+ * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-arraycreate
105
+ * @param len
106
+ */
107
+ function ArrayCreate(len) {
108
+ return new Array(len);
109
+ }
110
+ exports.ArrayCreate = ArrayCreate;
111
+ /**
112
+ * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-hasownproperty
113
+ * @param o
114
+ * @param prop
115
+ */
116
+ function HasOwnProperty(o, prop) {
117
+ return Object.prototype.hasOwnProperty.call(o, prop);
118
+ }
119
+ exports.HasOwnProperty = HasOwnProperty;
120
+ /**
121
+ * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-type
122
+ * @param x
123
+ */
124
+ function Type(x) {
125
+ if (x === null) {
126
+ return 'Null';
127
+ }
128
+ if (typeof x === 'undefined') {
129
+ return 'Undefined';
130
+ }
131
+ if (typeof x === 'function' || typeof x === 'object') {
132
+ return 'Object';
133
+ }
134
+ if (typeof x === 'number') {
135
+ return 'Number';
136
+ }
137
+ if (typeof x === 'boolean') {
138
+ return 'Boolean';
139
+ }
140
+ if (typeof x === 'string') {
141
+ return 'String';
142
+ }
143
+ if (typeof x === 'symbol') {
144
+ return 'Symbol';
145
+ }
146
+ if (typeof x === 'bigint') {
147
+ return 'BigInt';
148
+ }
149
+ }
150
+ exports.Type = Type;
151
+ var MS_PER_DAY = 86400000;
152
+ /**
153
+ * https://www.ecma-international.org/ecma-262/11.0/index.html#eqn-modulo
154
+ * @param x
155
+ * @param y
156
+ * @return k of the same sign as y
157
+ */
158
+ function mod(x, y) {
159
+ return x - Math.floor(x / y) * y;
160
+ }
161
+ /**
162
+ * https://tc39.es/ecma262/#eqn-Day
163
+ * @param t
164
+ */
165
+ function Day(t) {
166
+ return Math.floor(t / MS_PER_DAY);
167
+ }
168
+ exports.Day = Day;
169
+ /**
170
+ * https://tc39.es/ecma262/#sec-week-day
171
+ * @param t
172
+ */
173
+ function WeekDay(t) {
174
+ return mod(Day(t) + 4, 7);
175
+ }
176
+ exports.WeekDay = WeekDay;
177
+ /**
178
+ * https://tc39.es/ecma262/#sec-year-number
179
+ * @param y
180
+ */
181
+ function DayFromYear(y) {
182
+ return (365 * (y - 1970) +
183
+ Math.floor((y - 1969) / 4) -
184
+ Math.floor((y - 1901) / 100) +
185
+ Math.floor((y - 1601) / 400));
186
+ }
187
+ exports.DayFromYear = DayFromYear;
188
+ /**
189
+ * https://tc39.es/ecma262/#sec-year-number
190
+ * @param y
191
+ */
192
+ function TimeFromYear(y) {
193
+ return MS_PER_DAY * DayFromYear(y);
194
+ }
195
+ exports.TimeFromYear = TimeFromYear;
196
+ /**
197
+ * https://tc39.es/ecma262/#sec-year-number
198
+ * @param t
199
+ */
200
+ function YearFromTime(t) {
201
+ var min = Math.ceil(t / MS_PER_DAY / 366);
202
+ var y = min;
203
+ while (TimeFromYear(y) <= t) {
204
+ y++;
205
+ }
206
+ return y - 1;
207
+ }
208
+ exports.YearFromTime = YearFromTime;
209
+ function DaysInYear(y) {
210
+ if (y % 4 !== 0) {
211
+ return 365;
212
+ }
213
+ if (y % 100 !== 0) {
214
+ return 366;
215
+ }
216
+ if (y % 400 !== 0) {
217
+ return 365;
218
+ }
219
+ return 366;
220
+ }
221
+ exports.DaysInYear = DaysInYear;
222
+ function DayWithinYear(t) {
223
+ return Day(t) - DayFromYear(YearFromTime(t));
224
+ }
225
+ exports.DayWithinYear = DayWithinYear;
226
+ function InLeapYear(t) {
227
+ return DaysInYear(YearFromTime(t)) === 365 ? 0 : 1;
228
+ }
229
+ exports.InLeapYear = InLeapYear;
230
+ /**
231
+ * https://tc39.es/ecma262/#sec-month-number
232
+ * @param t
233
+ */
234
+ function MonthFromTime(t) {
235
+ var dwy = DayWithinYear(t);
236
+ var leap = InLeapYear(t);
237
+ if (dwy >= 0 && dwy < 31) {
238
+ return 0;
239
+ }
240
+ if (dwy < 59 + leap) {
241
+ return 1;
242
+ }
243
+ if (dwy < 90 + leap) {
244
+ return 2;
245
+ }
246
+ if (dwy < 120 + leap) {
247
+ return 3;
248
+ }
249
+ if (dwy < 151 + leap) {
250
+ return 4;
251
+ }
252
+ if (dwy < 181 + leap) {
253
+ return 5;
254
+ }
255
+ if (dwy < 212 + leap) {
256
+ return 6;
257
+ }
258
+ if (dwy < 243 + leap) {
259
+ return 7;
260
+ }
261
+ if (dwy < 273 + leap) {
262
+ return 8;
263
+ }
264
+ if (dwy < 304 + leap) {
265
+ return 9;
266
+ }
267
+ if (dwy < 334 + leap) {
268
+ return 10;
269
+ }
270
+ if (dwy < 365 + leap) {
271
+ return 11;
272
+ }
273
+ throw new Error('Invalid time');
274
+ }
275
+ exports.MonthFromTime = MonthFromTime;
276
+ function DateFromTime(t) {
277
+ var dwy = DayWithinYear(t);
278
+ var mft = MonthFromTime(t);
279
+ var leap = InLeapYear(t);
280
+ if (mft === 0) {
281
+ return dwy + 1;
282
+ }
283
+ if (mft === 1) {
284
+ return dwy - 30;
285
+ }
286
+ if (mft === 2) {
287
+ return dwy - 58 - leap;
288
+ }
289
+ if (mft === 3) {
290
+ return dwy - 89 - leap;
291
+ }
292
+ if (mft === 4) {
293
+ return dwy - 119 - leap;
294
+ }
295
+ if (mft === 5) {
296
+ return dwy - 150 - leap;
297
+ }
298
+ if (mft === 6) {
299
+ return dwy - 180 - leap;
300
+ }
301
+ if (mft === 7) {
302
+ return dwy - 211 - leap;
303
+ }
304
+ if (mft === 8) {
305
+ return dwy - 242 - leap;
306
+ }
307
+ if (mft === 9) {
308
+ return dwy - 272 - leap;
309
+ }
310
+ if (mft === 10) {
311
+ return dwy - 303 - leap;
312
+ }
313
+ if (mft === 11) {
314
+ return dwy - 333 - leap;
315
+ }
316
+ throw new Error('Invalid time');
317
+ }
318
+ exports.DateFromTime = DateFromTime;
319
+ var HOURS_PER_DAY = 24;
320
+ var MINUTES_PER_HOUR = 60;
321
+ var SECONDS_PER_MINUTE = 60;
322
+ var MS_PER_SECOND = 1e3;
323
+ var MS_PER_MINUTE = MS_PER_SECOND * SECONDS_PER_MINUTE;
324
+ var MS_PER_HOUR = MS_PER_MINUTE * MINUTES_PER_HOUR;
325
+ function HourFromTime(t) {
326
+ return mod(Math.floor(t / MS_PER_HOUR), HOURS_PER_DAY);
327
+ }
328
+ exports.HourFromTime = HourFromTime;
329
+ function MinFromTime(t) {
330
+ return mod(Math.floor(t / MS_PER_MINUTE), MINUTES_PER_HOUR);
331
+ }
332
+ exports.MinFromTime = MinFromTime;
333
+ function SecFromTime(t) {
334
+ return mod(Math.floor(t / MS_PER_SECOND), SECONDS_PER_MINUTE);
335
+ }
336
+ exports.SecFromTime = SecFromTime;
@@ -1,8 +1,9 @@
1
1
 
2
- // /home/longlho/.cache/bazel/_bazel_longlho/576c18efaac10246ec115c72af79fca6/sandbox/linux-sandbox/1009/execroot/formatjs/node_modules/@bazel/typescript/internal/ts_project_options_validator.js checked attributes for //packages/ecma402-abstract:dist-base
2
+ // /home/longlho/.cache/bazel/_bazel_longlho/576c18efaac10246ec115c72af79fca6/sandbox/linux-sandbox/2759/execroot/formatjs/node_modules/@bazel/typescript/internal/ts_project_options_validator.js checked attributes for //packages/ecma402-abstract:dist-base
3
3
  // composite: false
4
4
  // declaration: true
5
5
  // declaration_map: true
6
6
  // incremental: false
7
7
  // source_map: false
8
8
  // emit_declaration_only: false
9
+ // ts_build_info_file:
@@ -1,8 +1,9 @@
1
1
 
2
- // /home/longlho/.cache/bazel/_bazel_longlho/576c18efaac10246ec115c72af79fca6/sandbox/linux-sandbox/1008/execroot/formatjs/node_modules/@bazel/typescript/internal/ts_project_options_validator.js checked attributes for //packages/ecma402-abstract:dist-esm
2
+ // /home/longlho/.cache/bazel/_bazel_longlho/576c18efaac10246ec115c72af79fca6/sandbox/linux-sandbox/2765/execroot/formatjs/node_modules/@bazel/typescript/internal/ts_project_options_validator.js checked attributes for //packages/ecma402-abstract:dist-esm
3
3
  // composite: false
4
4
  // declaration: true
5
5
  // declaration_map: true
6
6
  // incremental: false
7
7
  // source_map: false
8
8
  // emit_declaration_only: false
9
+ // ts_build_info_file:
package/index.d.ts CHANGED
@@ -1,22 +1,55 @@
1
+ export { BestFitFormatMatcher } from './src/DateTimeFormat/BestFitFormatMatcher';
2
+ export * from './src/CanonicalizeLocaleList';
3
+ export * from './src/CanonicalizeTimeZoneName';
4
+ export * from './src/DateTimeFormat/BasicFormatMatcher';
5
+ export * from './src/DateTimeFormat/DateTimeStyleFormat';
6
+ export * from './src/DateTimeFormat/FormatDateTime';
7
+ export * from './src/DateTimeFormat/FormatDateTimeToParts';
8
+ export * from './src/DateTimeFormat/InitializeDateTimeFormat';
9
+ export * from './src/DateTimeFormat/PartitionDateTimePattern';
10
+ export * from './src/DateTimeFormat/ToDateTimeOptions';
11
+ export * from './src/DisplayNames/CanonicalCodeForDisplayNames';
1
12
  export * from './src/GetNumberOption';
2
13
  export * from './src/GetOption';
3
14
  export * from './src/IsSanctionedSimpleUnitIdentifier';
15
+ export * from './src/IsValidTimeZoneName';
4
16
  export * from './src/IsWellFormedCurrencyCode';
5
17
  export * from './src/IsWellFormedUnitIdentifier';
18
+ export * from './src/NumberFormat/ComputeExponent';
19
+ export * from './src/NumberFormat/ComputeExponentForMagnitude';
20
+ export * from './src/NumberFormat/CurrencyDigits';
21
+ export * from './src/NumberFormat/FormatNumericToParts';
6
22
  export * from './src/NumberFormat/FormatNumericToString';
23
+ export * from './src/NumberFormat/InitializeNumberFormat';
24
+ export * from './src/NumberFormat/PartitionNumberPattern';
7
25
  export * from './src/NumberFormat/SetNumberFormatDigitOptions';
26
+ export * from './src/NumberFormat/SetNumberFormatUnitOptions';
8
27
  export * from './src/NumberFormat/ToRawFixed';
9
28
  export * from './src/NumberFormat/ToRawPrecision';
10
29
  export * from './src/PartitionPattern';
30
+ export * from './src/PluralRules/GetOperands';
31
+ export * from './src/PluralRules/InitializePluralRules';
32
+ export * from './src/PluralRules/ResolvePlural';
33
+ export * from './src/RelativeTimeFormat/FormatRelativeTime';
34
+ export * from './src/RelativeTimeFormat/FormatRelativeTimeToParts';
35
+ export * from './src/RelativeTimeFormat/InitializeRelativeTimeFormat';
36
+ export * from './src/RelativeTimeFormat/MakePartsList';
37
+ export * from './src/RelativeTimeFormat/PartitionRelativeTimePattern';
38
+ export * from './src/RelativeTimeFormat/SingularRelativeTimeUnit';
11
39
  export * from './src/ResolveLocale';
12
40
  export * from './src/SupportedLocales';
41
+ export { default as _formatToParts } from './src/NumberFormat/format_to_parts';
42
+ export { DATE_TIME_PROPS } from './src/DateTimeFormat/utils';
43
+ export { parseDateTimeSkeleton } from './src/DateTimeFormat/skeleton';
13
44
  export { getInternalSlot, getMultiInternalSlots, isLiteralPart, LiteralPart, setInternalSlot, setMultiInternalSlots, getMagnitude, defineProperty, } from './src/utils';
14
45
  export { getLocaleHierarchy, unpackData, isMissingLocaleDataError, } from './src/data';
15
46
  export * from './types/relative-time';
47
+ export * from './types/date-time';
16
48
  export * from './types/list';
17
49
  export * from './types/plural-rules';
18
50
  export * from './types/number';
19
51
  export * from './types/displaynames';
20
52
  export { invariant } from './src/utils';
21
53
  export { LocaleData } from './types/core';
54
+ export * from './262';
22
55
  //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/ecma402-abstract/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wCAAwC,CAAC;AACvD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,0CAA0C,CAAC;AACzD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,YAAY,EACZ,cAAc,GACf,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,kBAAkB,EAClB,UAAU,EACV,wBAAwB,GACzB,MAAM,YAAY,CAAC;AACpB,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/ecma402-abstract/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAC,MAAM,2CAA2C,CAAC;AAC/E,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,qCAAqC,CAAC;AACpD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,wCAAwC,CAAC;AACvD,cAAc,iDAAiD,CAAC;AAChE,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wCAAwC,CAAC;AACvD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yCAAyC,CAAC;AACxD,cAAc,iCAAiC,CAAC;AAChD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,oDAAoD,CAAC;AACnE,cAAc,uDAAuD,CAAC;AACtE,cAAc,wCAAwC,CAAC;AACvD,cAAc,uDAAuD,CAAC;AACtE,cAAc,mDAAmD,CAAC;AAClE,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAC,eAAe,EAAC,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAC,qBAAqB,EAAC,MAAM,+BAA+B,CAAC;AACpE,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,YAAY,EACZ,cAAc,GACf,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,kBAAkB,EAClB,UAAU,EACV,wBAAwB,GACzB,MAAM,YAAY,CAAC;AACpB,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,cAAc,OAAO,CAAC"}
package/index.js CHANGED
@@ -7,37 +7,78 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
7
7
  o[k2] = m[k];
8
8
  }));
9
9
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ var __importDefault = (this && this.__importDefault) || function (mod) {
13
+ return (mod && mod.__esModule) ? mod : { "default": mod };
11
14
  };
12
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.invariant = exports.isMissingLocaleDataError = exports.unpackData = exports.getLocaleHierarchy = exports.defineProperty = exports.getMagnitude = exports.setMultiInternalSlots = exports.setInternalSlot = exports.isLiteralPart = exports.getMultiInternalSlots = exports.getInternalSlot = exports.parseDateTimeSkeleton = exports.DATE_TIME_PROPS = exports._formatToParts = exports.BestFitFormatMatcher = void 0;
17
+ var BestFitFormatMatcher_1 = require("./src/DateTimeFormat/BestFitFormatMatcher");
18
+ Object.defineProperty(exports, "BestFitFormatMatcher", { enumerable: true, get: function () { return BestFitFormatMatcher_1.BestFitFormatMatcher; } });
19
+ __exportStar(require("./src/CanonicalizeLocaleList"), exports);
20
+ __exportStar(require("./src/CanonicalizeTimeZoneName"), exports);
21
+ __exportStar(require("./src/DateTimeFormat/BasicFormatMatcher"), exports);
22
+ __exportStar(require("./src/DateTimeFormat/DateTimeStyleFormat"), exports);
23
+ __exportStar(require("./src/DateTimeFormat/FormatDateTime"), exports);
24
+ __exportStar(require("./src/DateTimeFormat/FormatDateTimeToParts"), exports);
25
+ __exportStar(require("./src/DateTimeFormat/InitializeDateTimeFormat"), exports);
26
+ __exportStar(require("./src/DateTimeFormat/PartitionDateTimePattern"), exports);
27
+ __exportStar(require("./src/DateTimeFormat/ToDateTimeOptions"), exports);
28
+ __exportStar(require("./src/DisplayNames/CanonicalCodeForDisplayNames"), exports);
13
29
  __exportStar(require("./src/GetNumberOption"), exports);
14
30
  __exportStar(require("./src/GetOption"), exports);
15
31
  __exportStar(require("./src/IsSanctionedSimpleUnitIdentifier"), exports);
32
+ __exportStar(require("./src/IsValidTimeZoneName"), exports);
16
33
  __exportStar(require("./src/IsWellFormedCurrencyCode"), exports);
17
34
  __exportStar(require("./src/IsWellFormedUnitIdentifier"), exports);
35
+ __exportStar(require("./src/NumberFormat/ComputeExponent"), exports);
36
+ __exportStar(require("./src/NumberFormat/ComputeExponentForMagnitude"), exports);
37
+ __exportStar(require("./src/NumberFormat/CurrencyDigits"), exports);
38
+ __exportStar(require("./src/NumberFormat/FormatNumericToParts"), exports);
18
39
  __exportStar(require("./src/NumberFormat/FormatNumericToString"), exports);
40
+ __exportStar(require("./src/NumberFormat/InitializeNumberFormat"), exports);
41
+ __exportStar(require("./src/NumberFormat/PartitionNumberPattern"), exports);
19
42
  __exportStar(require("./src/NumberFormat/SetNumberFormatDigitOptions"), exports);
43
+ __exportStar(require("./src/NumberFormat/SetNumberFormatUnitOptions"), exports);
20
44
  __exportStar(require("./src/NumberFormat/ToRawFixed"), exports);
21
45
  __exportStar(require("./src/NumberFormat/ToRawPrecision"), exports);
22
46
  __exportStar(require("./src/PartitionPattern"), exports);
47
+ __exportStar(require("./src/PluralRules/GetOperands"), exports);
48
+ __exportStar(require("./src/PluralRules/InitializePluralRules"), exports);
49
+ __exportStar(require("./src/PluralRules/ResolvePlural"), exports);
50
+ __exportStar(require("./src/RelativeTimeFormat/FormatRelativeTime"), exports);
51
+ __exportStar(require("./src/RelativeTimeFormat/FormatRelativeTimeToParts"), exports);
52
+ __exportStar(require("./src/RelativeTimeFormat/InitializeRelativeTimeFormat"), exports);
53
+ __exportStar(require("./src/RelativeTimeFormat/MakePartsList"), exports);
54
+ __exportStar(require("./src/RelativeTimeFormat/PartitionRelativeTimePattern"), exports);
55
+ __exportStar(require("./src/RelativeTimeFormat/SingularRelativeTimeUnit"), exports);
23
56
  __exportStar(require("./src/ResolveLocale"), exports);
24
57
  __exportStar(require("./src/SupportedLocales"), exports);
25
- var utils_1 = require("./src/utils");
26
- Object.defineProperty(exports, "getInternalSlot", { enumerable: true, get: function () { return utils_1.getInternalSlot; } });
27
- Object.defineProperty(exports, "getMultiInternalSlots", { enumerable: true, get: function () { return utils_1.getMultiInternalSlots; } });
28
- Object.defineProperty(exports, "isLiteralPart", { enumerable: true, get: function () { return utils_1.isLiteralPart; } });
29
- Object.defineProperty(exports, "setInternalSlot", { enumerable: true, get: function () { return utils_1.setInternalSlot; } });
30
- Object.defineProperty(exports, "setMultiInternalSlots", { enumerable: true, get: function () { return utils_1.setMultiInternalSlots; } });
31
- Object.defineProperty(exports, "getMagnitude", { enumerable: true, get: function () { return utils_1.getMagnitude; } });
32
- Object.defineProperty(exports, "defineProperty", { enumerable: true, get: function () { return utils_1.defineProperty; } });
58
+ var format_to_parts_1 = require("./src/NumberFormat/format_to_parts");
59
+ Object.defineProperty(exports, "_formatToParts", { enumerable: true, get: function () { return __importDefault(format_to_parts_1).default; } });
60
+ var utils_1 = require("./src/DateTimeFormat/utils");
61
+ Object.defineProperty(exports, "DATE_TIME_PROPS", { enumerable: true, get: function () { return utils_1.DATE_TIME_PROPS; } });
62
+ var skeleton_1 = require("./src/DateTimeFormat/skeleton");
63
+ Object.defineProperty(exports, "parseDateTimeSkeleton", { enumerable: true, get: function () { return skeleton_1.parseDateTimeSkeleton; } });
64
+ var utils_2 = require("./src/utils");
65
+ Object.defineProperty(exports, "getInternalSlot", { enumerable: true, get: function () { return utils_2.getInternalSlot; } });
66
+ Object.defineProperty(exports, "getMultiInternalSlots", { enumerable: true, get: function () { return utils_2.getMultiInternalSlots; } });
67
+ Object.defineProperty(exports, "isLiteralPart", { enumerable: true, get: function () { return utils_2.isLiteralPart; } });
68
+ Object.defineProperty(exports, "setInternalSlot", { enumerable: true, get: function () { return utils_2.setInternalSlot; } });
69
+ Object.defineProperty(exports, "setMultiInternalSlots", { enumerable: true, get: function () { return utils_2.setMultiInternalSlots; } });
70
+ Object.defineProperty(exports, "getMagnitude", { enumerable: true, get: function () { return utils_2.getMagnitude; } });
71
+ Object.defineProperty(exports, "defineProperty", { enumerable: true, get: function () { return utils_2.defineProperty; } });
33
72
  var data_1 = require("./src/data");
34
73
  Object.defineProperty(exports, "getLocaleHierarchy", { enumerable: true, get: function () { return data_1.getLocaleHierarchy; } });
35
74
  Object.defineProperty(exports, "unpackData", { enumerable: true, get: function () { return data_1.unpackData; } });
36
75
  Object.defineProperty(exports, "isMissingLocaleDataError", { enumerable: true, get: function () { return data_1.isMissingLocaleDataError; } });
37
76
  __exportStar(require("./types/relative-time"), exports);
77
+ __exportStar(require("./types/date-time"), exports);
38
78
  __exportStar(require("./types/list"), exports);
39
79
  __exportStar(require("./types/plural-rules"), exports);
40
80
  __exportStar(require("./types/number"), exports);
41
81
  __exportStar(require("./types/displaynames"), exports);
42
- var utils_2 = require("./src/utils");
43
- Object.defineProperty(exports, "invariant", { enumerable: true, get: function () { return utils_2.invariant; } });
82
+ var utils_3 = require("./src/utils");
83
+ Object.defineProperty(exports, "invariant", { enumerable: true, get: function () { return utils_3.invariant; } });
84
+ __exportStar(require("./262"), exports);