fix Typing[4110] errors by refactoring Options
commitd8c419c67c673891ed78b9be2d2f9c537a5f489a
authorEdwin Smith <smith@fb.com>
Wed, 12 Jan 2022 16:01:05 +0000 (12 08:01 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 12 Jan 2022 16:02:39 +0000 (12 08:02 -0800)
treed5761105c71709f7e0db30d2d33db09f09a38bd6
parent237d448280740c8d0c7cb53ec25c3d212580f289
fix Typing[4110] errors by refactoring Options

Summary:
The remaining type errors come from $options being a `dict<string,mixed>`
rather than a shape or class. Each option is naturally a different type,
and it is useful to allow additional properties (and methods), since `$options`
is already plumbed around everywhere.

I considered using a shape instead of a class to reduce churn, but
a dedicated class Options came out cleaner in the end.

Reviewed By: ricklavoie

Differential Revision: D33277162

fbshipit-source-id: 8eca8978739250422a25a62de659193ba8ff81fb
hphp/test/run.php