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 {
175
175
getProjectInfo ( fileName : string , needFileNameList : boolean ) : protocol . ProjectInfo {
176
176
var args : protocol . ProjectInfoRequestArgs = {
177
177
file : fileName ,
178
- needFileNameList : ! ! needFileNameList
178
+ needFileNameList : needFileNameList
179
179
} ;
180
180
181
181
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 {
88
88
}
89
89
90
90
/**
91
- * Arguments for ProjectInfoResponse messages .
91
+ * Arguments for ProjectInfoRequest request .
92
92
*/
93
93
export interface ProjectInfoRequestArgs extends FileRequestArgs {
94
94
/**
@@ -97,18 +97,31 @@ declare module ts.server.protocol {
97
97
needFileNameList : boolean ;
98
98
}
99
99
100
+ /**
101
+ * A request to get the project information of the current file
102
+ */
100
103
export interface ProjectInfoRequest extends Request {
101
104
arguments : ProjectInfoRequestArgs
102
105
}
103
106
104
107
/**
105
- * Response message for "projectInfo" request
108
+ * Response message body for "projectInfo" request
106
109
*/
107
110
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
+ */
108
115
configFileName : string ;
116
+ /**
117
+ * The list of normalized file name in the project, including 'lib.d.ts'
118
+ */
109
119
fileNameList ?: string [ ] ;
110
120
}
111
121
122
+ /**
123
+ * Response message for "projectInfo" request
124
+ */
112
125
export interface ProjectInfoResponse extends Response {
113
126
body ?: ProjectInfo ;
114
127
}
Original file line number Diff line number Diff line change 1
1
/// <reference path="../fourslash.ts"/>
2
2
3
3
// @Filename : a.ts
4
- //// import test from "b "
4
+ ////export var test = "test String "
5
5
6
6
// @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");
8
15
9
16
goTo . 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