-
Notifications
You must be signed in to change notification settings - Fork 12.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle the case where the FAR results map is empty (#49254)
* Handle the case where the FAR results map is empty Searching exactly one project does not imply the presence of exactly one references list. Fixes #49217 * Use emptyArray Co-authored-by: Sheetal Nandi <shkamat@microsoft.com> Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
- Loading branch information
1 parent
77ffb96
commit 8497483
Showing
7 changed files
with
40 additions
and
2 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
1 change: 1 addition & 0 deletions
1
tests/baselines/reference/referenceToEmptyObject.baseline.jsonc
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 @@ | ||
[] |
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 @@ | ||
[] |
22 changes: 22 additions & 0 deletions
22
tests/baselines/reference/referencesToStringLiteralValue.baseline.jsonc
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,22 @@ | ||
[ | ||
{ | ||
"definition": { | ||
"containerKind": "", | ||
"containerName": "", | ||
"fileName": "/tests/cases/fourslash/server/referencesToStringLiteralValue.ts", | ||
"kind": "var", | ||
"name": "some string", | ||
"textSpan": { | ||
"start": 19, | ||
"length": 12 | ||
}, | ||
"displayParts": [ | ||
{ | ||
"text": "\"some string\"", | ||
"kind": "stringLiteral" | ||
} | ||
] | ||
}, | ||
"references": [] | ||
} | ||
] |
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,5 @@ | ||
/// <reference path='fourslash.ts'/> | ||
|
||
////const obj = {}/*1*/; | ||
|
||
verify.baselineFindAllReferences('1'); |
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,5 @@ | ||
/// <reference path='fourslash.ts'/> | ||
|
||
/////*1*/ | ||
|
||
verify.baselineFindAllReferences('1'); |
5 changes: 5 additions & 0 deletions
5
tests/cases/fourslash/server/referencesToStringLiteralValue.ts
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,5 @@ | ||
/// <reference path='fourslash.ts'/> | ||
|
||
////const s: string = "some /*1*/ string"; | ||
|
||
verify.baselineFindAllReferences('1'); |