CR feedback

This commit is contained in:
Zhengbo Li
2015-06-02 15:25:01 -07:00
parent 70675162dc
commit a7550dbba1
3 changed files with 33 additions and 6 deletions

View File

@@ -175,7 +175,7 @@ module ts.server {
getProjectInfo(fileName: string, needFileNameList: boolean): protocol.ProjectInfo {
var args: protocol.ProjectInfoRequestArgs = {
file: fileName,
needFileNameList: !!needFileNameList
needFileNameList: needFileNameList
};
var request = this.processRequest<protocol.ProjectInfoRequest>(CommandNames.ProjectInfo, args);

View File

@@ -88,7 +88,7 @@ declare module ts.server.protocol {
}
/**
* Arguments for ProjectInfoResponse messages.
* Arguments for ProjectInfoRequest request.
*/
export interface ProjectInfoRequestArgs extends FileRequestArgs {
/**
@@ -97,18 +97,31 @@ declare module ts.server.protocol {
needFileNameList: boolean;
}
/**
* A request to get the project information of the current file
*/
export interface ProjectInfoRequest extends Request {
arguments: ProjectInfoRequestArgs
}
/**
* Response message for "projectInfo" request
* Response message body for "projectInfo" request
*/
export interface ProjectInfo {
/**
* For configured project, this is the normalized path of the 'tsconfig.json' file
* For inferred project, this is undefined
*/
configFileName: string;
/**
* The list of normalized file name in the project, including 'lib.d.ts'
*/
fileNameList?: string[];
}
/**
* Response message for "projectInfo" request
*/
export interface ProjectInfoResponse extends Response {
body?: ProjectInfo;
}