Move side effect out of `typing_well_formedness`
commit6a95b67276ad3db8643790b2edb1e82bbabf28b4
authorMichael Thomas <mjt@fb.com>
Thu, 27 Jan 2022 15:28:54 +0000 (27 07:28 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 27 Jan 2022 16:23:25 +0000 (27 08:23 -0800)
tree1592f172ff1c52ee7c85255de53a296e894cef7c
parent9d48b77446fb49633e33a9550e89d13e5c8b04b0
Move side effect out of `typing_well_formedness`

Summary:
As part of the error refactor we want our core typing functions to return a list of errors rather than adding them as a side-effect

This diff changes the `typing_well_formedness` API to return a list of `Typing_error.t` rather than adding them to the global table in `errors.ml`.

Reviewed By: CatherineGasnier

Differential Revision: D33683912

fbshipit-source-id: 9e6ff5f9c7f092fea06f427f0f83dd8db91cafff
hphp/hack/src/typing/typing.ml
hphp/hack/src/typing/typing_toplevel.ml
hphp/hack/src/typing/typing_type_wellformedness.ml
hphp/hack/src/typing/typing_type_wellformedness.mli
hphp/hack/src/typing/typing_typedef.ml