diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d408b7770..9aca954912 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ #### :boom: Breaking Change - Add smart printer for pipe-chains. https://github.com/rescript-lang/rescript-compiler/pull/6411 (the formatter will reformat existing code in certain cases) +- `Js.Json.t` now uses `Boolean(bool)` instead of explicit `@as(true) True | @as(false) False`. https://github.com/rescript-lang/rescript-compiler/pull/6421 #### :nail_care: Polish diff --git a/jscomp/others/js_json.res b/jscomp/others/js_json.res index 22a117ecce..ccfa6de9f7 100644 --- a/jscomp/others/js_json.res +++ b/jscomp/others/js_json.res @@ -26,8 +26,7 @@ @unboxed type rec t = - | @as(false) False - | @as(true) True + | Boolean(bool) | @as(null) Null | String(string) | Number(float) diff --git a/jscomp/others/js_json.resi b/jscomp/others/js_json.resi index 3063bc90ff..fad033bf14 100644 --- a/jscomp/others/js_json.resi +++ b/jscomp/others/js_json.resi @@ -32,8 +32,7 @@ @unboxed /** The JSON data structure */ type rec t = - | @as(false) False - | @as(true) True + | Boolean(bool) | @as(null) Null | String(string) | Number(float)