File tree Expand file tree Collapse file tree 3 files changed +33
-6
lines changed
tests/cases/fourslash/server Expand file tree Collapse file tree 3 files changed +33
-6
lines changed Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ module ts.server {
175175 getProjectInfo ( fileName : string , needFileNameList : boolean ) : protocol . ProjectInfo {
176176 var args : protocol . ProjectInfoRequestArgs = {
177177 file : fileName ,
178- needFileNameList : ! ! needFileNameList
178+ needFileNameList : needFileNameList
179179 } ;
180180
181181 var request = this . processRequest < protocol . ProjectInfoRequest > ( CommandNames . ProjectInfo , args ) ;
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ declare module ts.server.protocol {
8888 }
8989
9090 /**
91- * Arguments for ProjectInfoResponse messages .
91+ * Arguments for ProjectInfoRequest request .
9292 */
9393 export interface ProjectInfoRequestArgs extends FileRequestArgs {
9494 /**
@@ -97,18 +97,31 @@ declare module ts.server.protocol {
9797 needFileNameList : boolean ;
9898 }
9999
100+ /**
101+ * A request to get the project information of the current file
102+ */
100103 export interface ProjectInfoRequest extends Request {
101104 arguments : ProjectInfoRequestArgs
102105 }
103106
104107 /**
105- * Response message for "projectInfo" request
108+ * Response message body for "projectInfo" request
106109 */
107110 export interface ProjectInfo {
111+ /**
112+ * For configured project, this is the normalized path of the 'tsconfig.json' file
113+ * For inferred project, this is undefined
114+ */
108115 configFileName : string ;
116+ /**
117+ * The list of normalized file name in the project, including 'lib.d.ts'
118+ */
109119 fileNameList ?: string [ ] ;
110120 }
111121
122+ /**
123+ * Response message for "projectInfo" request
124+ */
112125 export interface ProjectInfoResponse extends Response {
113126 body ?: ProjectInfo ;
114127 }
Original file line number Diff line number Diff line change 11/// <reference path="../fourslash.ts"/>
22
33// @Filename : a.ts
4- //// import test from "b "
4+ ////export var test = "test String "
55
66// @Filename : b.ts
7- //// export var test = "test String"
7+ ////import test from "a"
8+
9+ // @Filename : c.ts
10+ /////// <reference path="a.ts"/>
11+ /////// <reference path="b.ts"/>
12+
13+ // @Filename : d.ts
14+ ////console.log("nothing");
815
916goTo . file ( "a.ts" )
10- verify . ProjectInfo ( [ "lib.d.ts" , "b.ts" , "a.ts" ] )
17+ verify . ProjectInfo ( [ "lib.d.ts" , "a.ts" ] )
18+ goTo . file ( "b.ts" )
19+ verify . ProjectInfo ( [ "lib.d.ts" , "a.ts" , "b.ts" ] )
20+ goTo . file ( "c.ts" )
21+ verify . ProjectInfo ( [ "lib.d.ts" , "a.ts" , "b.ts" , "c.ts" ] )
22+ goTo . file ( "d.ts" )
23+ verify . ProjectInfo ( [ "lib.d.ts" , "d.ts" ] )
24+
You can’t perform that action at this time.
0 commit comments