mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
ab150bd9d10f227536edfe1ed146be6bd89f43cd
Implements support for array and object de-structuring in variable declarations and assignment expressions. Note that the code currently makes the overly optimistic assumption that the RHS is an array or object that can be safely indexed into. The correct representation would instead treat the RHS as possibly iterable, but we need to consider the appropriate representation. I think it's worth landing a first optimistic pass and we can iterate forward, this helps make it more clear what the ideal representation would have to be and should make a bunch of examples work. It also allows us to experiment with representations of, and handling for, scope dependencies that involve computed property access.
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%