Add APIs to provide project info for a given file

Return the path of the config file and the file name list of the project
(optionally). This is helpful in differentiate the build command
behavior for loose files and configured projects in sublime.
This commit is contained in:
Zhengbo Li
2015-05-29 17:20:41 -07:00
parent 57f3e04b3f
commit c597bd63fc
3 changed files with 49 additions and 2 deletions

View File

@@ -87,6 +87,28 @@ declare module ts.server.protocol {
file: string;
}
/**
* Arguments for ProjectInfo messages.
*/
export interface ProjectInfoRequestArgs {
/**
* The file for the request (absolute pathname required).
*/
file: string;
/**
* Indicate if the file name list of the project is needed
*/
needFileNameList: boolean;
}
/**
* Response message for "projectInfo" request
*/
export interface ProjectInfo {
configFileName: string;
fileNameList?: string[];
}
/**
* Request whose sole parameter is a file name.
*/