core
core copied to clipboard
`json-rpc-engine`: Replace use of `any` with proper types (non-test files only)
Look for the following string in non-test files to find these: // TODO: Replace `any` with type
At time of writing, there were 6 instances.
- Completing this ticket will enable us to take full advantage of the type safety improvements that will be introduced by the provider alignment technical proposals.
- All of the
anyusages in this package are for typing errors in catch blocks. These errors should mostly be aligned toJsonRpcEngineCallbackError. serializeError()should only be used when sending an error via JSON-RPC. Otherwise, the information inunknownerrors thrown by middleware should be preserved.
- See previous refactor efforts: https://github.com/MetaMask/json-rpc-engine/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc
- Especially relevant: https://github.com/MetaMask/json-rpc-engine/pull/84