-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flow][refactor] Make CJSExtractNamedExportsTKit only depend on concr…
…etizer Summary: The goal of this stack is to gradually refactor the checking and merging of modules so that we can eventually kill `ModuleT`, which really doesn't belong in `Type.t`. Instead, we want to replace everywhere where we currently accept `Type.t` but only meant to accept either module or any with `(moduletype, any_info) result`. This diff addresses the root of the evil: `CJSExtractNamedExportsTKit`. To create `module_type` from cjs, we have to concretize a potentially lazy type to grab information. Since everything in Flow_js and annotation_inference only outputs type, we are forced to make module information a type. This diff changes it so that we only use flow_js and annotation_inference for concretization (see the added `ConcretizeForCJSExtractNamedExports` and `Annot_ConcretizeForCJSExtractNamedExports`). Everything else can be done completely within `CJSExtractNamedExportsTKit`. With this refactor, it becomes clear in `type_sig_merge` and `module_info_analyzer` that when we are creating module types, we are dealing with only `ModuleT` the entire time, which enables future diffs in the stack to do further cleanup. Changelog: [internal] Reviewed By: panagosg7 Differential Revision: D68303855 fbshipit-source-id: b10749f9a4dc3b1b00f1d487453ccf8f9c496561
- Loading branch information
1 parent
a508bd4
commit 5846cf2
Showing
13 changed files
with
77 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.