mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 04:43:37 -05:00
Add configured projects to the list of projects when searching
This commit is contained in:
@@ -919,6 +919,7 @@ namespace ts.server {
|
||||
configuredProject.updateGraph();
|
||||
if (configuredProject.getSourceFile(info)) {
|
||||
info.defaultProject = configuredProject;
|
||||
referencingProjects.push(configuredProject);
|
||||
}
|
||||
}
|
||||
return referencingProjects;
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/// <reference path="../fourslash.ts"/>
|
||||
|
||||
// Global class reference.
|
||||
|
||||
// @Filename: referencesForGlobals_1.ts
|
||||
////class /*2*/globalClass {
|
||||
//// public f() { }
|
||||
////}
|
||||
|
||||
// @Filename: referencesForGlobals_2.ts
|
||||
////var c = /*1*/globalClass();
|
||||
|
||||
// @Filename: tsconfig.json
|
||||
////{ "files": ["referencesForGlobals_1.ts", "referencesForGlobals_2.ts"] }
|
||||
|
||||
goTo.marker("1");
|
||||
verify.referencesCountIs(2);
|
||||
|
||||
goTo.marker("2");
|
||||
verify.referencesCountIs(2);
|
||||
13
tests/cases/fourslash/server/renameInConfiguredProject.ts
Normal file
13
tests/cases/fourslash/server/renameInConfiguredProject.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
/// <reference path="../fourslash.ts"/>
|
||||
|
||||
// @Filename: referencesForGlobals_1.ts
|
||||
////var [|globalName|] = 0;
|
||||
|
||||
// @Filename: referencesForGlobals_2.ts
|
||||
////var y = /*1*/[|globalName|];
|
||||
|
||||
// @Filename: tsconfig.json
|
||||
////{ "files": ["referencesForGlobals_1.ts", "referencesForGlobals_2.ts"] }
|
||||
|
||||
goTo.marker("1");
|
||||
verify.renameLocations(/*findInStrings:*/ true, /*findInComments:*/ true);
|
||||
Reference in New Issue
Block a user