|
1 | 1 | type t |
2 | 2 |
|
| 3 | +type options = { |
| 4 | + localeMathcer?: [#lookup | #"best fit"], |
| 5 | + @as("type") type_?: [#cardinal | #ordinal], |
| 6 | + roundingMode?: [ |
| 7 | + | #ceil |
| 8 | + | #floot |
| 9 | + | #expand |
| 10 | + | #trunc |
| 11 | + | #halfCeil |
| 12 | + | #halfFloor |
| 13 | + | #haldExpand |
| 14 | + | #halfTrunc |
| 15 | + | #halfEven |
| 16 | + ], |
| 17 | + roundingPriority?: [#auto | #morePrecision | #lessPrecision], |
| 18 | + roundingIncrement?: int, |
| 19 | + minimumIntegerDigits?: int, |
| 20 | + minimumFractionDigits?: int, |
| 21 | + maximumFractionDigits?: int, |
| 22 | + minimumSignificantDigits?: int, |
| 23 | + maximumSignificantDigits?: int, |
| 24 | +} |
| 25 | + |
3 | 26 | @new external make: unit => t = "Intl.PluralRules" |
4 | 27 | @new external makeWithLocale: string => t = "Intl.PluralRules" |
5 | 28 | @new external makeWithLocales: array<string> => t = "Intl.PluralRules" |
6 | | -@new external makeWithLocaleAndOptions: (string, {..}) => t = "Intl.PluralRules" |
7 | | -@new external makeWithLocalesAndOptions: (array<string>, {..}) => t = "Intl.PluralRules" |
8 | | -@new external makeWithOptions: (@as(json`undefined`) _, {..}) => t = "Intl.PluralRules" |
| 29 | +@new external makeWithLocaleAndOptions: (string, options) => t = "Intl.PluralRules" |
| 30 | +@new external makeWithLocalesAndOptions: (array<string>, options) => t = "Intl.PluralRules" |
| 31 | +@new external makeWithOptions: (@as(json`undefined`) _, options) => t = "Intl.PluralRules" |
9 | 32 |
|
10 | 33 | @val external supportedLocalesOf: array<string> => t = "Intl.PluralRules.supportedLocalesOf" |
11 | 34 | @val |
12 | | -external supportedLocalesOfWithOptions: (array<string>, {..}) => t = |
| 35 | +external supportedLocalesOfWithOptions: (array<string>, options) => t = |
13 | 36 | "Intl.PluralRules.supportedLocalesOf" |
14 | 37 |
|
15 | | -@send external resolvedOptions: t => {..} = "resolvedOptions" |
| 38 | +@send external resolvedOptions: t => options = "resolvedOptions" |
16 | 39 |
|
17 | 40 | type rule = [#zero | #one | #two | #few | #many | #other] |
18 | 41 |
|
|
0 commit comments