dillon1000/react
Commit
Browse files 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.
Changed paths8 files
First-parent comparisoncompiler/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 AddedPatch
Files changed
Rendering syntax-highlighted changes…