-
-
Notifications
You must be signed in to change notification settings - Fork 268
Description
@metamask/controllers uses the following packages which lack TypeScript types. Currently we are just stubbing the modules in dependencies.d.ts, but this ends up adding any to any objects that the modules export, and any trickles down to code which uses these modules. While we can work around this, it is very inconvenient and it would be easier to write types directly for these modules so that we can have proper types throughout the controllers codebase.
Note that we can go further on this and replace the Ethereum utility packages with other packages that are already TypeScript-compatible (e.g. Ethers). However, that requires that we improve the unit tests first. Backfilling the types is intended as a band-aid.
The list of modules listed in dependencies.d.ts are:
- @metamask/contract-metadata
- @metamask/metamask-eth-abis (this already has types, so we can remove this!)
- eth-ens-namehash
- eth-json-rpc-infura
-
eth-keyring-controller(decided to skip this) - eth-phishing-detect
- eth-query
- ethjs-provider-http
- ethjs-unit
-
isomorphic-fetch(decided to skip this) -
single-call-balance-checker-abi(decided to skip this) -
web3-provider-engine(decided to skip this)