Skip to content

Commit 15b0e1e

Browse files
committed
feat(Intl.Locale): strongly typed options
1 parent 5cde497 commit 15b0e1e

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/intl/Core__Intl__Locale.res

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
type t
22

3+
type options = {
4+
language?: string,
5+
script?: string,
6+
region?: string,
7+
calendar?: string,
8+
collation?: string,
9+
numberingSystem?: string,
10+
caseFirst?: [#upper | #lower | #"false"],
11+
hourCycle?: [#h11 | #h12 | #h23 | #h24],
12+
numeric?: bool,
13+
}
14+
315
@new external make: string => t = "Intl.Locale"
4-
@new external makeWithOptions: (string, {..}) => t = "Intl.Locale"
16+
@new external makeWithOptions: (string, options) => t = "Intl.Locale"
517

618
@get external baseName: t => string = "baseName"
719
@get external calendar: t => option<string> = "calendar"

0 commit comments

Comments
 (0)