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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### API changes

- Map, Set, WeakMap, WeakSet: use the types defined in the Js namespace. https://github.com/rescript-association/rescript-core/pull/143
- `Array` mutable & immutable helper name changed to conform to JS' upcoming APIs [such as `toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toSorted)
- `sort` -> `toSorted`, `sortInPlace` -> `sort`
- `reverse` -> `toReversed`, `reverseInPlace` -> `reverse`
Expand Down
2 changes: 1 addition & 1 deletion src/Core__Map.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type t<'k, 'v>
type t<'k, 'v> = Js.Map.t<'k, 'v>

@new external make: unit => t<'k, 'v> = "Map"
@new external fromArray: array<('k, 'v)> => t<'k, 'v> = "Map"
Expand Down
2 changes: 1 addition & 1 deletion src/Core__Map.resi
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ See [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Gl
/**
Type representing an instance of `Map`.
*/
type t<'k, 'v>
type t<'k, 'v> = Js.Map.t<'k, 'v>

/**
Creates a new, mutable JavaScript `Map`. A `Map` can have any values as both keys and values.
Expand Down
2 changes: 1 addition & 1 deletion src/Core__Set.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type t<'a>
type t<'a> = Js.Set.t<'a>

@new external make: unit => t<'a> = "Set"
@new external fromArray: array<'a> => t<'a> = "Set"
Expand Down
2 changes: 1 addition & 1 deletion src/Core__Set.resi
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ See [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Gl
/**
Type representing an instance of `Set`.
*/
type t<'a>
type t<'a> = Js.Set.t<'a>

/**
Creates a new, mutable JavaScript `Set`. A `Set` is a collection of unique values.
Expand Down
2 changes: 1 addition & 1 deletion src/Core__WeakMap.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type t<'k, 'v>
type t<'k, 'v> = Js.WeakMap.t<'k, 'v>

@new external make: unit => t<'k, 'v> = "WeakMap"

Expand Down
2 changes: 1 addition & 1 deletion src/Core__WeakSet.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type t<'a>
type t<'a> = Js.WeakSet.t<'a>

@new external make: unit => t<'a> = "WeakSet"

Expand Down