-
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][autocomplete] Autocomplete on string literal types returns emp…
…ty result Summary: I tried to figure out what the intention was behind capturing the case of `StringLiteral` type in autocomplete, given that we never return an actual result. In D18509589 and D18616795, we started returning `Ac_literal` as the `autocomplete_type`. This did not return an actual result and so we would log these as `AcEmpty`. This answered the question about why we caught this case in the first place. In D21183466 we started returning results for *some* literals. We still did not return any meaningful result for string literal types, but this case was now also mapped to `AcReturn` result since the same `Ac_literal` constructor was still used. Finally, with D54659383 the type returned used for auto-completing string type literals was hard-coded to `empty`. This diff restores the original behavior of returning `AcEmpty` when auto-completing in a string literal type. It also reverts the change of D54659383, so that we don't have to use the hook in type_annotation.ml. Changelog: [internal] Reviewed By: SamChou19815 Differential Revision: D54884663 fbshipit-source-id: 29dfc8af6063e8e953bb7068e9cf942411f183b5
- Loading branch information
1 parent
7a6d3fd
commit c23d028
Showing
4 changed files
with
12 additions
and
17 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