dillon1000/react

Commit

[be] Change validate functions to not return unnecessary Result

These validations needs to be able to transitively check for violations within 
function expressions, without immediately erroring. So the inner "-Impl" helpers 
return a Result. But the outer, exported validate functions don't need to return 
a Result, especially since TS has no Rust-style enforcement that return values 
are actually used. Unwrapping within the validation means the caller can't 
forget to do so and inadvertently silence the errors.
Browse files
Changed paths3 files
First-parent comparison
M compiler/packages/babel-plugin-react-forget/src/Entrypoint/Pipeline.ts ModifiedM compiler/packages/babel-plugin-react-forget/src/Validation/ValidateNoRefAccesInRender.ts ModifiedM compiler/packages/babel-plugin-react-forget/src/Validation/ValidateNoSetStateInRender.ts Modified
Patch

Files changed

Rendering syntax-highlighted changes…