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 @@ -5,6 +5,7 @@
### API changes

- Map, Set, WeakMap, WeakSet: use the types defined in the Js namespace. https://github.com/rescript-association/rescript-core/pull/143
- Symbol: use the types defined in the Js namespace. https://github.com/rescript-association/rescript-core/pull/145
- `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__Symbol.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type t
type t = Js.Types.symbol

@val external make: string => t = "Symbol"
@val external getFor: string => t = "Symbol.for"
Expand Down
5 changes: 5 additions & 0 deletions src/Core__Type.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
function classify(value) {
var match = Object.prototype.toString.call(value);
switch (match) {
case "[object BigInt]" :
return {
TAG: /* BigInt */6,
_0: value
};
case "[object Boolean]" :
return {
TAG: /* Bool */0,
Expand Down