12.0.0-alpha.14
Pre-release
Pre-release
·
324 commits
to master
since this release
💥 Breaking Change
Iterator.forEachnow emitsIterator.prototype.forEachcall. #7506- Rename functions ending with
Exnto end withOrThrow. The oldExnfunctions are now deprecated:Bool.fromStringExn→Bool.fromStringOrThrowBigInt.fromStringExn→BigInt.fromStringOrThrowJSON.parseExn→JSON.parseOrThrow- Changed
BigInt.fromFloatto return an option rather than throwing an error. - Added
BigInt.fromFloatOrThrow Option.getExn→Option.getOrThrowNull.getExn→Null.getOrThrowNullable.getExn→Nullable.getOrThrowResult.getExn→Result.getOrThrowList.getExn→List.getOrThrowList.tailExn→List.tailOrThrowList.headExn→List.headOrThrow- Old functions remain available but are marked as deprecated with guidance to use the new
OrThrowvariants. - #7518, #7554
🚀 New Feature
- Add
RegExp.flags. #7461 - Add
Array.findLast,Array.findLastWithIndex,Array.findLastIndex,Array.findLastIndexWithIndexandArray.findLastIndexOpt. #7503 - Add
optionsargument toConsole.dir. #7504 - Show variant constructor's inline record types on hover. #7519
- Add additional
Iterator.prototypebindings toruntime/Stdlib_Iterator.res. #7506
🐛 Bug fix
rescript-tools docno longer includes shadowed bindings in its output. #7497- Treat
throwlikeraisein analysis. #7521 - Fix
index out of boundsexception thrown in rare cases byrescript-editor-analysis.exe codeActioncommand. #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
RegExpstdlib 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