rescript-core
rescript-core copied to clipboard
Fix Intellisense menu for Error
This removes all the submodules like SyntaxError
and RangeError
that had a single function in it - make
- and moves these to the top level like makeRangeError
and makeSyntaxError
. This is more like the old Js.Exn
module and makes the Intelliense menu a lot easier to navigate. You can quickly see the types of errors you can create. It is still a 2 step process - make then raise - even though in 99% of the cases the user will throw immediately; this is a step backward from the Js.Exn
module that has raiseSyntaxError
and other variants.
Before:

After:
