12.0.0-alpha.14
Pre-release
Pre-release
·
14 commits
to master
since this release
💥 Breaking Change
Iterator.forEach
now emitsIterator.prototype.forEach
call. #7506- Rename functions ending with
Exn
to end withOrThrow
. The oldExn
functions are now deprecated:Bool.fromStringExn
→Bool.fromStringOrThrow
BigInt.fromStringExn
→BigInt.fromStringOrThrow
JSON.parseExn
→JSON.parseOrThrow
- Changed
BigInt.fromFloat
to return an option rather than throwing an error. - Added
BigInt.fromFloatOrThrow
Option.getExn
→Option.getOrThrow
Null.getExn
→Null.getOrThrow
Nullable.getExn
→Nullable.getOrThrow
Result.getExn
→Result.getOrThrow
List.getExn
→List.getOrThrow
List.tailExn
→List.tailOrThrow
List.headExn
→List.headOrThrow
- Old functions remain available but are marked as deprecated with guidance to use the new
OrThrow
variants. - #7518, #7554
🚀 New Feature
- Add
RegExp.flags
. #7461 - Add
Array.findLast
,Array.findLastWithIndex
,Array.findLastIndex
,Array.findLastIndexWithIndex
andArray.findLastIndexOpt
. #7503 - Add
options
argument toConsole.dir
. #7504 - Show variant constructor's inline record types on hover. #7519
- Add additional
Iterator.prototype
bindings toruntime/Stdlib_Iterator.res
. #7506
🐛 Bug fix
rescript-tools doc
no longer includes shadowed bindings in its output. #7497- Treat
throw
likeraise
in analysis. #7521 - Fix
index out of bounds
exception thrown in rare cases byrescript-editor-analysis.exe codeAction
command. #7523 - Don't produce duplicate type definitions for recursive types on hover. #7524
- Prop punning when types don't match results in
I/O error: _none_: No such file or directory
. #7533 - Fix partial application with user-defined function types. #7548
- Fix doc comment before variant throwing syntax error. #7535
- Fix apparent non-determinism in generated code for pattern matching. #7557
💅 Polish
- Suggest awaiting promise before using it when types mismatch. #7498
- Complete from
RegExp
stdlib module for regexes. #7425 - Allow oneliner formatting when including module with single type alias. #7502
- Improve error messages for JSX type mismatches, passing objects where record is expected, passing array literal where tuple is expected, and more. #7500
- Show in error messages when coercion can be used to fix a type mismatch. #7505
- Remove deprecated pipe last (
|>
) syntax. #7512 - Improve error message for pipe (
->
) syntax. #7520 - Improve a few error messages around various subtyping issues. #7404
- In module declarations, accept the invalid syntax
M = {...}
and format it toM : {...}
. #7527 - Improve doc comment formatting to match the style of multiline comments. #7529
- Improve error messages around type mismatches for try/catch, if, for, while, and optional record fields + optional function arguments. #7522
- Sync reanalyze with the new APIs around exception. #7536
- Improve array pattern spread error message. #7549
- Sync API docs with rescript-lang.org on release. #7555