mirror of
https://github.com/status-im/react-native.git
synced 2025-02-25 15:45:32 +00:00
Summary: `declareOpts` is weakly typed. Since the callsite of Resolver constructor is itself flowifyed, we can get rid of `declareOpts`, and this provides us with much better typing. Eventually I'd like to get rid of most of the defaults in the packager's inner code (ex. `watch` being false, `dev` being true). The reason is that defaults everywhere are prone to causing inconsistencies (for ex. some other code could have `dev` as false by default), problems that cannot be caught by Flow. Instead of having non-required options, I believe it is more sensible to provide helper functions that build sets of default options. Reviewed By: davidaurelio, cpojer Differential Revision: D4351874 fbshipit-source-id: 38653063f8939b4282c7c27cb6d5e3f3a25a9484