From 7ab436db8c85964b6cb253c4983fa8edaf8c80cc Mon Sep 17 00:00:00 2001 From: rob Date: Tue, 16 Jan 2024 23:02:25 -0500 Subject: [PATCH 1/2] fix: typos in the bindings for Intl --- src/intl/Core__Intl__DateTimeFormat.res | 2 +- src/intl/Core__Intl__PluralRules.res | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/intl/Core__Intl__DateTimeFormat.res b/src/intl/Core__Intl__DateTimeFormat.res index b81043d4..97a5b158 100644 --- a/src/intl/Core__Intl__DateTimeFormat.res +++ b/src/intl/Core__Intl__DateTimeFormat.res @@ -32,4 +32,4 @@ external formatRangeToParts: ( "type": string, "value": string, "source": string, -}> = "formatRange" +}> = "formatRangeToParts" diff --git a/src/intl/Core__Intl__PluralRules.res b/src/intl/Core__Intl__PluralRules.res index f52e936a..6d71bcbf 100644 --- a/src/intl/Core__Intl__PluralRules.res +++ b/src/intl/Core__Intl__PluralRules.res @@ -16,6 +16,6 @@ external supportedLocalesOfWithOptions: (array, {..}) => t = type rule = [#zero | #one | #two | #few | #many | #other] -@send external select: (t, float) => rule = "format" -@send external selectInt: (t, int) => rule = "format" -@send external selectBigInt: (t, Core__BigInt.t) => rule = "format" +@send external select: (t, float) => rule = "select" +@send external selectInt: (t, int) => rule = "select" +@send external selectBigInt: (t, Core__BigInt.t) => rule = "select" From a89072944591ba87dede56250dea9ceb2c798616 Mon Sep 17 00:00:00 2001 From: rob Date: Tue, 16 Jan 2024 23:06:23 -0500 Subject: [PATCH 2/2] chore: update CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c1e4802..68e6274c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ ## Next version - Add `Dict.getUnsafe` https://github.com/rescript-association/rescript-core/pull/167 +- Fixes mis-bound `Intl` functions https://github.com/rescript-association/rescript-core/pull/180 + - `Intl.DateTimeFormat.formatRangeToParts` was bound to `formatRange` instead of `formatRangeToParts` + - `Intl.PluralRules.select`, `Intl.PluralRules.selectInt`, and `Intl.PluralRules.selectBigInt` were bound to `format` instead of `select` ### Documentation