We want to convert NetworkController to TypeScript in order to be able
to compare differences in the controller between in this repo and the
core repo. To do this, however, we need to convert the dependencies of
the controller to TypeScript.
As a part of this effort, this commit converts
`shared/constants/metametrics` to TypeScript. Note that simple objects
have been largely replaced with enums. There are some cases where I even
split up some of these objects into multiple enums.
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
We've been migrating from callback-based to async background calls for
a number of years now. The async calls are easier to read, and less
likely to be misused (especially when it comes to error handling).
The `callBackgroundMethod` method, used to make a callback-based
background call, has been marked as deprecated. Hopefully this will
discourage further use.