-
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][match] Autocomplete for identifier patterns in match expressions
Summary: Autocomplete for identifier patterns in match expressions. Also, tests confirming that we don't autocomplete binding pattern names, and don't autocomplete object pattern keys with local identifiers. Changelog: [internal] Reviewed By: panagosg7 Differential Revision: D67830066 fbshipit-source-id: 50d03368b9c586ad4e1e19418c5877e52e2b3d7c
- Loading branch information
1 parent
24bb379
commit b62f486
Showing
7 changed files
with
85 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
declare const x: number; | ||
|
||
const foo = "foo"; // Will not be in autocomplete results below. | ||
|
||
const e = match (x) { | ||
[...const f ]: 0, | ||
// ^ | ||
{...const f }: 0, | ||
// ^ | ||
1 as f : 0, | ||
// ^ | ||
const f : 0, | ||
// ^ | ||
|
||
c | ||
// ^ | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
declare const x: number; | ||
|
||
declare const foo: 1; | ||
|
||
const e = match (x) { | ||
f | ||
// ^ | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
declare const x: number; | ||
|
||
const foo = "foo"; // Will not be in autocomplete results below. | ||
|
||
const e = match (x) { | ||
{f | ||
// ^ | ||
}; |
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