dillon1000/react

Commit

Infer more primitive types

Handles three more cases: 

* Template literals 

* deletion (property/computed) 

* type casts 

Only the latter has an observable impact, though i added tests for deletion just 
in case and found a bug. For type casts, they're reasonably common internally 
for fixmes, so this PR will help to ensure we don't drop type information just 
because of a cast.
Browse files
Changed paths8 files
First-parent comparison
M compiler/forget/src/Inference/InferReferenceEffects.ts ModifiedM compiler/forget/src/TypeInference/InferTypes.ts ModifiedA compiler/forget/src/__tests__/fixtures/compiler/infer-computed-delete.expect.md AddedA compiler/forget/src/__tests__/fixtures/compiler/infer-computed-delete.js AddedA compiler/forget/src/__tests__/fixtures/compiler/infer-property-delete.expect.md AddedA compiler/forget/src/__tests__/fixtures/compiler/infer-property-delete.js AddedA compiler/forget/src/__tests__/fixtures/compiler/infer-types-through-type-cast.flow.expect.md AddedA compiler/forget/src/__tests__/fixtures/compiler/infer-types-through-type-cast.flow.js Added
Patch

Files changed

Rendering syntax-highlighted changes…