Skip to content

Commit dfcb2cd

Browse files
authored
Merge 2d779da into 1783a45
2 parents 1783a45 + 2d779da commit dfcb2cd

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
#### :boom: Breaking Change
1616

17+
- Change `Intl.Collator.compare` return type from `int` to `Ordering.t` (`float`). https://github.com/rescript-lang/rescript/pull/8289
18+
1719
#### :eyeglasses: Spec Compliance
1820

1921
#### :rocket: New Feature

packages/@rescript/runtime/Stdlib_Intl_Collator.res

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ Intl.Collator.resolvedOptions(collator).locale == "en-US"
7777
7878
```rescript
7979
let collator = Intl.Collator.make(~locales=["en-US"])
80-
collator->Intl.Collator.compare("apple", "banana") < 0
80+
Ordering.isLess(collator->Intl.Collator.compare("apple", "banana"))
8181
```
8282
*/
83-
@send external compare: (t, string, string) => int = "compare"
83+
@send external compare: (t, string, string) => Stdlib_Ordering.t = "compare"
8484

8585
/**
8686
`ignore(collator)` ignores the provided collator and returns unit.

0 commit comments

Comments
 (0)