dillon1000/react

Commit

Type Array.prototype.map/filter

We can now type `Array.prototype.{map,filter}`: 

* The callee is ConditionallyMutable because, although the array itself is not 
modified, its items flow into the lambda and may be modified there. 

* The argument is ConditionallyMutable because it accepts both mutable and 
immutable lambdas. Mutate would disallow immutable lambdas (wrong), while Read 
would be incorrect for mutable lambdas since calling them triggers mutation.
Browse files
Changed paths5 files
First-parent comparison
M compiler/forget/src/HIR/ObjectShape.ts ModifiedA compiler/forget/src/__tests__/fixtures/compiler/array-map-frozen-array.expect.md AddedA compiler/forget/src/__tests__/fixtures/compiler/array-map-frozen-array.js AddedA compiler/forget/src/__tests__/fixtures/compiler/array-map-mutable-array-mutating-lambda.expect.md AddedA compiler/forget/src/__tests__/fixtures/compiler/array-map-mutable-array-mutating-lambda.js Added
Patch

Files changed

Rendering syntax-highlighted changes…