Skip to content

Commit 05b7543

Browse files
committed
Deprecate JSON.Classify.classify
1 parent e78c8cd commit 05b7543

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020

2121
- Clean up legacy tags handling. https://github.com/rescript-lang/rescript/pull/7309
2222

23+
#### :nail_care: Polish
24+
25+
- Deprecate JSON.Classify.classify. https://github.com/rescript-lang/rescript/pull/7315
26+
2327
# 12.0.0-alpha.9
2428

2529
#### :boom: Breaking Change

runtime/Stdlib_JSON.res

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ module Classify = {
5757
| Object(dict<t>)
5858
| Array(array<t>)
5959

60+
@deprecated("Directly switch on the JSON object instead") @raises @val
6061
let classify = value => {
6162
switch _internalClass(value) {
6263
| "[object Boolean]" => Bool(_asBool(value))

runtime/Stdlib_JSON.resi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,9 @@ module Classify: {
630630
// Number(42)
631631
```
632632
*/
633+
@deprecated("Directly switch on the JSON object instead")
634+
@raises
635+
@val
633636
let classify: 'a => t
634637
}
635638

0 commit comments

Comments
 (0)