You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* destructure record rest elements - fixes#8311
* support type with parameter for record rest
* simplify parsing of record rest
* update record spread error message
* improve error message of superfluous fields in rest
* improve error message of non optional rest field already matched
* add a warning when rest record would be empty
* add fixture tests for error/warning messages
* add changelog
* address comments (parsetree0 PPX roundtrips, nested rest, etc)
* support rest of inline record
* check rest field types, fix matching & invalid field identifier
* fix rest of private type and analysis
* use runtime field names for rest
* support record type alias in rest
* fix compiler crash when spreading the whole record
* disallow rest spreading on packed modules
* add tests for record rest with namespaced type
* make sure rest is used and move logic to its own files
* stop ignoring _rest in a few more places
* format
Signed-off-by: tsnobip <dontshootthink@gmail.com>
* improve output (compile to JS destructuring)
* update changelog
* remove leading _ of used variable
* add more tests
* disallow spreading rest to unboxed record
* address #8317 (comment)
* document type_record_pat_rest function
* add comment about Tpat_record rest
* forbid destructure to rest of record with mutable fields
* do not spread function params to avoid issues with 'use strict'
* fix comment table for rest spread
* Include record rest binders in rec check
Signed-off-by: tsnobip <dontshootthink@gmail.com>
* Track record rest types in dead analysis
Signed-off-by: tsnobip <dontshootthink@gmail.com>
* Rename record rest test config fixture
Signed-off-by: tsnobip <dontshootthink@gmail.com>
* add a warning for optional field overlap
* no longer drop rest when printing pattern
* make Parmatch.Conv.conv no longer drop rest
* remove unused Object_rest_param
* use internal attribute for ast mapper
* improve completion support for record rest destructuring
* simplify js dump shape
* simplify materialize_fields
* improve record rest completion
Signed-off-by: tsnobip <dontshootthink@gmail.com>
* print record rest in typedtree dumps
Signed-off-by: tsnobip <dontshootthink@gmail.com>
* simplify record rest implementation
* restore better JS output for rest destructuring
---------
Signed-off-by: tsnobip <dontshootthink@gmail.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@
24
24
25
25
- Add a first-class `taggedTemplate<'param, 'output>` builtin type and the `TaggedTemplate` stdlib module (`TaggedTemplate.make`). Tagged-template tags are now tracked through the type system, so they emit real JS tagged-template syntax across module boundaries, when passed as first-class values, and when constructed at runtime by a factory (e.g. `postgres`). https://github.com/rescript-lang/rescript/pull/8461
26
26
- Make mutation of private record mutable fields a configurable warning instead of a hard error. https://github.com/rescript-lang/rescript/pull/8366
27
+
- Add support for pattern matching/destructuring of record rest. https://github.com/rescript-lang/rescript/pull/8317
0 commit comments