Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

#### :boom: Breaking Change

- Change `Intl.Collator.compare` return type from `int` to `Ordering.t` (`float`). https://github.com/rescript-lang/rescript/pull/8289

#### :eyeglasses: Spec Compliance

#### :rocket: New Feature
Expand Down
4 changes: 2 additions & 2 deletions packages/@rescript/runtime/Stdlib_Intl_Collator.res
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ Intl.Collator.resolvedOptions(collator).locale == "en-US"

```rescript
let collator = Intl.Collator.make(~locales=["en-US"])
collator->Intl.Collator.compare("apple", "banana") < 0
Ordering.isLess(collator->Intl.Collator.compare("apple", "banana"))
```
*/
@send external compare: (t, string, string) => int = "compare"
@send external compare: (t, string, string) => Stdlib_Ordering.t = "compare"

/**
`ignore(collator)` ignores the provided collator and returns unit.
Expand Down
Loading