tree-shaker icon indicating copy to clipboard operation
tree-shaker copied to clipboard

side-effects of iterating

Open kermanx opened this issue 1 year ago • 0 comments

The following 4 lines can have different results:

// Assuming that both a and b are unused.
const [a, b] = unknown;
const [ , ,] = unknown;
const [] = unknown;
unknown;

It's not hard to optimize the first line into any of these 3 lines. The problem is how to design the options.

kermanx avatar Oct 16 '24 12:10 kermanx