summaryrefslogtreecommitdiff
path: root/node_modules/typescript/lib/protocol.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/typescript/lib/protocol.d.ts')
-rw-r--r--node_modules/typescript/lib/protocol.d.ts1031
1 files changed, 565 insertions, 466 deletions
diff --git a/node_modules/typescript/lib/protocol.d.ts b/node_modules/typescript/lib/protocol.d.ts
index c2577c247..0afebe0bc 100644
--- a/node_modules/typescript/lib/protocol.d.ts
+++ b/node_modules/typescript/lib/protocol.d.ts
@@ -1,6 +1,6 @@
/**
- * Declaration module describing the TypeScript Server protocol
- */
+ * Declaration module describing the TypeScript Server protocol
+ */
declare namespace ts.server.protocol {
namespace CommandTypes {
type Brace = "brace";
@@ -49,82 +49,82 @@ declare namespace ts.server.protocol {
type GetSupportedCodeFixes = "getSupportedCodeFixes";
}
/**
- * A TypeScript Server message
- */
+ * A TypeScript Server message
+ */
interface Message {
/**
- * Sequence number of the message
- */
+ * Sequence number of the message
+ */
seq: number;
/**
- * One of "request", "response", or "event"
- */
+ * One of "request", "response", or "event"
+ */
type: "request" | "response" | "event";
}
/**
- * Client-initiated request message
- */
+ * Client-initiated request message
+ */
interface Request extends Message {
/**
- * The command to execute
- */
+ * The command to execute
+ */
command: string;
/**
- * Object containing arguments for the command
- */
+ * Object containing arguments for the command
+ */
arguments?: any;
}
/**
- * Request to reload the project structure for all the opened files
- */
+ * Request to reload the project structure for all the opened files
+ */
interface ReloadProjectsRequest extends Message {
command: CommandTypes.ReloadProjects;
}
/**
- * Server-initiated event message
- */
+ * Server-initiated event message
+ */
interface Event extends Message {
/**
- * Name of event
- */
+ * Name of event
+ */
event: string;
/**
- * Event-specific information
- */
+ * Event-specific information
+ */
body?: any;
}
/**
- * Response by server to client request message.
- */
+ * Response by server to client request message.
+ */
interface Response extends Message {
/**
- * Sequence number of the request message.
- */
+ * Sequence number of the request message.
+ */
request_seq: number;
/**
- * Outcome of the request.
- */
+ * Outcome of the request.
+ */
success: boolean;
/**
- * The command requested.
- */
+ * The command requested.
+ */
command: string;
/**
- * Contains error message if success === false.
- */
+ * Contains error message if success === false.
+ */
message?: string;
/**
- * Contains message body if success === true.
- */
+ * Contains message body if success === true.
+ */
body?: any;
}
/**
- * Arguments for FileRequest messages.
- */
+ * Arguments for FileRequest messages.
+ */
interface FileRequestArgs {
/**
- * The file for the request (absolute pathname required).
- */
+ * The file for the request (absolute pathname required).
+ */
file: string;
projectFileName?: string;
}
@@ -199,17 +199,17 @@ declare namespace ts.server.protocol {
options?: EditorSettings;
}
/**
- * Arguments for ProjectInfoRequest request.
- */
+ * Arguments for ProjectInfoRequest request.
+ */
interface ProjectInfoRequestArgs extends FileRequestArgs {
/**
- * Indicate if the file name list of the project is needed
- */
+ * Indicate if the file name list of the project is needed
+ */
needFileNameList: boolean;
}
/**
- * A request to get the project information of the current file.
- */
+ * A request to get the project information of the current file.
+ */
interface ProjectInfoRequest extends Request {
command: CommandTypes.ProjectInfo;
arguments: ProjectInfoRequestArgs;
@@ -230,21 +230,21 @@ declare namespace ts.server.protocol {
projectFileName: string;
}
/**
- * Response message body for "projectInfo" request
- */
+ * Response message body for "projectInfo" request
+ */
interface ProjectInfo {
/**
- * For configured project, this is the normalized path of the 'tsconfig.json' file
- * For inferred project, this is undefined
- */
+ * 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'
- */
+ * The list of normalized file name in the project, including 'lib.d.ts'
+ */
fileNames?: string[];
/**
- * Indicates if the project has a active language service instance
- */
+ * Indicates if the project has a active language service instance
+ */
languageServiceDisabled?: boolean;
}
/**
@@ -262,61 +262,61 @@ declare namespace ts.server.protocol {
code: number;
}
/**
- * Response message for "projectInfo" request
- */
+ * Response message for "projectInfo" request
+ */
interface ProjectInfoResponse extends Response {
body?: ProjectInfo;
}
/**
- * Request whose sole parameter is a file name.
- */
+ * Request whose sole parameter is a file name.
+ */
interface FileRequest extends Request {
arguments: FileRequestArgs;
}
/**
- * Instances of this interface specify a location in a source file:
- * (file, line, character offset), where line and character offset are 1-based.
- */
+ * Instances of this interface specify a location in a source file:
+ * (file, line, character offset), where line and character offset are 1-based.
+ */
interface FileLocationRequestArgs extends FileRequestArgs {
/**
- * The line number for the request (1-based).
- */
+ * The line number for the request (1-based).
+ */
line: number;
/**
- * The character offset (on the line) for the request (1-based).
- */
+ * The character offset (on the line) for the request (1-based).
+ */
offset: number;
}
/**
- * Request for the available codefixes at a specific position.
- */
+ * Request for the available codefixes at a specific position.
+ */
interface CodeFixRequest extends Request {
command: CommandTypes.GetCodeFixes;
arguments: CodeFixRequestArgs;
}
/**
- * Instances of this interface specify errorcodes on a specific location in a sourcefile.
- */
+ * Instances of this interface specify errorcodes on a specific location in a sourcefile.
+ */
interface CodeFixRequestArgs extends FileRequestArgs {
/**
- * The line number for the request (1-based).
- */
+ * The line number for the request (1-based).
+ */
startLine: number;
/**
- * The character offset (on the line) for the request (1-based).
- */
+ * The character offset (on the line) for the request (1-based).
+ */
startOffset: number;
/**
- * The line number for the request (1-based).
- */
+ * The line number for the request (1-based).
+ */
endLine: number;
/**
- * The character offset (on the line) for the request (1-based).
- */
+ * The character offset (on the line) for the request (1-based).
+ */
endOffset: number;
/**
- * Errorcodes we want to get the fixes for.
- */
+ * Errorcodes we want to get the fixes for.
+ */
errorCodes?: number[];
}
/**
@@ -326,8 +326,8 @@ declare namespace ts.server.protocol {
body?: CodeAction[];
}
/**
- * A request whose arguments specify a file location (file, line, col).
- */
+ * A request whose arguments specify a file location (file, line, col).
+ */
interface FileLocationRequest extends FileRequest {
arguments: FileLocationRequestArgs;
}
@@ -360,9 +360,9 @@ declare namespace ts.server.protocol {
length: number;
}
/**
- * Arguments in document highlight request; include: filesToSearch, file,
- * line, offset.
- */
+ * Arguments in document highlight request; include: filesToSearch, file,
+ * line, offset.
+ */
interface DocumentHighlightsRequestArgs extends FileLocationRequestArgs {
/**
* List of files to search for document highlights.
@@ -370,73 +370,73 @@ declare namespace ts.server.protocol {
filesToSearch: string[];
}
/**
- * Go to definition request; value of command field is
- * "definition". Return response giving the file locations that
- * define the symbol found in file at location line, col.
- */
+ * Go to definition request; value of command field is
+ * "definition". Return response giving the file locations that
+ * define the symbol found in file at location line, col.
+ */
interface DefinitionRequest extends FileLocationRequest {
command: CommandTypes.Definition;
}
/**
- * Go to type request; value of command field is
- * "typeDefinition". Return response giving the file locations that
- * define the type for the symbol found in file at location line, col.
- */
+ * Go to type request; value of command field is
+ * "typeDefinition". Return response giving the file locations that
+ * define the type for the symbol found in file at location line, col.
+ */
interface TypeDefinitionRequest extends FileLocationRequest {
command: CommandTypes.TypeDefinition;
}
/**
- * Go to implementation request; value of command field is
- * "implementation". Return response giving the file locations that
- * implement the symbol found in file at location line, col.
- */
+ * Go to implementation request; value of command field is
+ * "implementation". Return response giving the file locations that
+ * implement the symbol found in file at location line, col.
+ */
interface ImplementationRequest extends FileLocationRequest {
command: CommandTypes.Implementation;
}
/**
- * Location in source code expressed as (one-based) line and character offset.
- */
+ * Location in source code expressed as (one-based) line and character offset.
+ */
interface Location {
line: number;
offset: number;
}
/**
- * Object found in response messages defining a span of text in source code.
- */
+ * Object found in response messages defining a span of text in source code.
+ */
interface TextSpan {
/**
- * First character of the definition.
- */
+ * First character of the definition.
+ */
start: Location;
/**
- * One character past last character of the definition.
- */
+ * One character past last character of the definition.
+ */
end: Location;
}
/**
- * Object found in response messages defining a span of text in a specific source file.
- */
+ * Object found in response messages defining a span of text in a specific source file.
+ */
interface FileSpan extends TextSpan {
/**
- * File containing text span.
- */
+ * File containing text span.
+ */
file: string;
}
/**
- * Definition response message. Gives text range for definition.
- */
+ * Definition response message. Gives text range for definition.
+ */
interface DefinitionResponse extends Response {
body?: FileSpan[];
}
/**
- * Definition response message. Gives text range for definition.
- */
+ * Definition response message. Gives text range for definition.
+ */
interface TypeDefinitionResponse extends Response {
body?: FileSpan[];
}
/**
- * Implementation response message. Gives text range for implementations.
- */
+ * Implementation response message. Gives text range for implementations.
+ */
interface ImplementationResponse extends Response {
body?: FileSpan[];
}
@@ -457,27 +457,31 @@ declare namespace ts.server.protocol {
openingBrace: string;
}
/**
- * Get occurrences request; value of command field is
- * "occurrences". Return response giving spans that are relevant
- * in the file at a given line and column.
- */
+ * Get occurrences request; value of command field is
+ * "occurrences". Return response giving spans that are relevant
+ * in the file at a given line and column.
+ */
interface OccurrencesRequest extends FileLocationRequest {
command: CommandTypes.Occurrences;
}
interface OccurrencesResponseItem extends FileSpan {
/**
- * True if the occurrence is a write location, false otherwise.
- */
+ * True if the occurrence is a write location, false otherwise.
+ */
isWriteAccess: boolean;
+ /**
+ * True if the occurrence is in a string, undefined otherwise;
+ */
+ isInString?: true;
}
interface OccurrencesResponse extends Response {
body?: OccurrencesResponseItem[];
}
/**
- * Get document highlights request; value of command field is
- * "documentHighlights". Return response giving spans that are relevant
- * in the file at a given line and column.
- */
+ * Get document highlights request; value of command field is
+ * "documentHighlights". Return response giving spans that are relevant
+ * in the file at a given line and column.
+ */
interface DocumentHighlightsRequest extends FileLocationRequest {
command: CommandTypes.DocumentHighlights;
arguments: DocumentHighlightsRequestArgs;
@@ -494,12 +498,12 @@ declare namespace ts.server.protocol {
*/
interface DocumentHighlightsItem {
/**
- * File containing highlight spans.
- */
+ * File containing highlight spans.
+ */
file: string;
/**
- * Spans to highlight in file.
- */
+ * Spans to highlight in file.
+ */
highlightSpans: HighlightSpan[];
}
/**
@@ -509,23 +513,23 @@ declare namespace ts.server.protocol {
body?: DocumentHighlightsItem[];
}
/**
- * Find references request; value of command field is
- * "references". Return response giving the file locations that
- * reference the symbol found in file at location line, col.
- */
+ * Find references request; value of command field is
+ * "references". Return response giving the file locations that
+ * reference the symbol found in file at location line, col.
+ */
interface ReferencesRequest extends FileLocationRequest {
command: CommandTypes.References;
}
interface ReferencesResponseItem extends FileSpan {
/** Text of line containing the reference. Including this
- * with the response avoids latency of editor loading files
- * to show text of reference line (the server already has
- * loaded the referencing files).
- */
+ * with the response avoids latency of editor loading files
+ * to show text of reference line (the server already has
+ * loaded the referencing files).
+ */
lineText: string;
/**
- * True if reference is a write location, false otherwise.
- */
+ * True if reference is a write location, false otherwise.
+ */
isWriteAccess: boolean;
/**
* True if reference is a definition, false otherwise.
@@ -533,29 +537,29 @@ declare namespace ts.server.protocol {
isDefinition: boolean;
}
/**
- * The body of a "references" response message.
- */
+ * The body of a "references" response message.
+ */
interface ReferencesResponseBody {
/**
- * The file locations referencing the symbol.
- */
+ * The file locations referencing the symbol.
+ */
refs: ReferencesResponseItem[];
/**
- * The name of the symbol.
- */
+ * The name of the symbol.
+ */
symbolName: string;
/**
- * The start character offset of the symbol (on the line provided by the references request).
- */
+ * The start character offset of the symbol (on the line provided by the references request).
+ */
symbolStartOffset: number;
/**
- * The full display name of the symbol.
- */
+ * The full display name of the symbol.
+ */
symbolDisplayString: string;
}
/**
- * Response to "references" request.
- */
+ * Response to "references" request.
+ */
interface ReferencesResponse extends Response {
body?: ReferencesResponseBody;
}
@@ -573,42 +577,42 @@ declare namespace ts.server.protocol {
findInStrings?: boolean;
}
/**
- * Rename request; value of command field is "rename". Return
- * response giving the file locations that reference the symbol
- * found in file at location line, col. Also return full display
- * name of the symbol so that client can print it unambiguously.
- */
+ * Rename request; value of command field is "rename". Return
+ * response giving the file locations that reference the symbol
+ * found in file at location line, col. Also return full display
+ * name of the symbol so that client can print it unambiguously.
+ */
interface RenameRequest extends FileLocationRequest {
command: CommandTypes.Rename;
arguments: RenameRequestArgs;
}
/**
- * Information about the item to be renamed.
- */
+ * Information about the item to be renamed.
+ */
interface RenameInfo {
/**
- * True if item can be renamed.
- */
+ * True if item can be renamed.
+ */
canRename: boolean;
/**
- * Error message if item can not be renamed.
- */
+ * Error message if item can not be renamed.
+ */
localizedErrorMessage?: string;
/**
- * Display name of the item to be renamed.
- */
+ * Display name of the item to be renamed.
+ */
displayName: string;
/**
- * Full display name of item to be renamed.
- */
+ * Full display name of item to be renamed.
+ */
fullDisplayName: string;
/**
- * The items's kind (such as 'className' or 'parameterName' or plain 'text').
- */
+ * The items's kind (such as 'className' or 'parameterName' or plain 'text').
+ */
kind: string;
/**
- * Optional modifiers for the kind (such as 'public').
- */
+ * Optional modifiers for the kind (such as 'public').
+ */
kindModifiers: string;
}
/**
@@ -631,8 +635,8 @@ declare namespace ts.server.protocol {
locs: SpanGroup[];
}
/**
- * Rename response message.
- */
+ * Rename response message.
+ */
interface RenameResponse extends Response {
body?: RenameResponseBody;
}
@@ -640,7 +644,7 @@ declare namespace ts.server.protocol {
* Represents a file in external project.
* External project is project whose set of files, compilation options and open\close state
* is maintained by the client (i.e. if all this data come from .csproj file in Visual Studio).
- * External project will exist even if all files in it are closed and should be closed explicity.
+ * External project will exist even if all files in it are closed and should be closed explicitly.
* If external project includes one or more tsconfig.json/jsconfig.json files then tsserver will
* create configured project for every config file but will maintain a link that these projects were created
* as a result of opening external project so they should be removed once external project is closed.
@@ -711,42 +715,50 @@ declare namespace ts.server.protocol {
* List of removed files
*/
removed: string[];
+ /**
+ * List of updated files
+ */
+ updated: string[];
}
/**
- * Information found in a configure request.
- */
+ * Information found in a configure request.
+ */
interface ConfigureRequestArguments {
/**
- * Information about the host, for example 'Emacs 24.4' or
- * 'Sublime Text version 3075'
- */
+ * Information about the host, for example 'Emacs 24.4' or
+ * 'Sublime Text version 3075'
+ */
hostInfo?: string;
/**
- * If present, tab settings apply only to this file.
- */
+ * If present, tab settings apply only to this file.
+ */
file?: string;
/**
* The format options to use during formatting and other code editing features.
*/
formatOptions?: FormatCodeSettings;
+ /**
+ * The host's additional supported .js file extensions
+ */
+ extraFileExtensions?: JsFileExtensionInfo[];
}
/**
- * Configure request; value of command field is "configure". Specifies
- * host information, such as host type, tab size, and indent size.
- */
+ * Configure request; value of command field is "configure". Specifies
+ * host information, such as host type, tab size, and indent size.
+ */
interface ConfigureRequest extends Request {
command: CommandTypes.Configure;
arguments: ConfigureRequestArguments;
}
/**
- * Response to "configure" request. This is just an acknowledgement, so
- * no body field is required.
- */
+ * Response to "configure" request. This is just an acknowledgement, so
+ * no body field is required.
+ */
interface ConfigureResponse extends Response {
}
/**
- * Information found in an "open" request.
- */
+ * Information found in an "open" request.
+ */
interface OpenRequestArgs extends FileRequestArgs {
/**
* Used when a version of the file content is known to be more up to date than the one on disk.
@@ -761,13 +773,13 @@ declare namespace ts.server.protocol {
}
type ScriptKindName = "TS" | "JS" | "TSX" | "JSX";
/**
- * Open request; value of command field is "open". Notify the
- * server that the client has file open. The server will not
- * monitor the filesystem for changes in this file and will assume
- * that the client is updating the server (using the change and/or
- * reload messages) when the file changes. Server does not currently
- * send a response to an open request.
- */
+ * Open request; value of command field is "open". Notify the
+ * server that the client has file open. The server will not
+ * monitor the filesystem for changes in this file and will assume
+ * that the client is updating the server (using the change and/or
+ * reload messages) when the file changes. Server does not currently
+ * send a response to an open request.
+ */
interface OpenRequest extends Request {
command: CommandTypes.Open;
arguments: OpenRequestArgs;
@@ -856,25 +868,25 @@ declare namespace ts.server.protocol {
options: ExternalProjectCompilerOptions;
}
/**
- * Response to SetCompilerOptionsForInferredProjectsResponse request. This is just an acknowledgement, so
- * no body field is required.
- */
+ * Response to SetCompilerOptionsForInferredProjectsResponse request. This is just an acknowledgement, so
+ * no body field is required.
+ */
interface SetCompilerOptionsForInferredProjectsResponse extends Response {
}
/**
- * Exit request; value of command field is "exit". Ask the server process
- * to exit.
- */
+ * Exit request; value of command field is "exit". Ask the server process
+ * to exit.
+ */
interface ExitRequest extends Request {
command: CommandTypes.Exit;
}
/**
- * Close request; value of command field is "close". Notify the
- * server that the client has closed a previously open file. If
- * file is still referenced by open files, the server will resume
- * monitoring the filesystem for changes to file. Server does not
- * currently send a response to a close request.
- */
+ * Close request; value of command field is "close". Notify the
+ * server that the client has closed a previously open file. If
+ * file is still referenced by open files, the server will resume
+ * monitoring the filesystem for changes to file. Server does not
+ * currently send a response to a close request.
+ */
interface CloseRequest extends FileRequest {
command: CommandTypes.Close;
}
@@ -897,6 +909,10 @@ declare namespace ts.server.protocol {
* List of files names that should be recompiled
*/
fileNames: string[];
+ /**
+ * true if project uses outFile or out compiler option
+ */
+ projectUsesOutFile: boolean;
}
/**
* Response for CompileOnSaveAffectedFileListRequest request;
@@ -921,60 +937,64 @@ declare namespace ts.server.protocol {
forced?: boolean;
}
/**
- * Quickinfo request; value of command field is
- * "quickinfo". Return response giving a quick type and
- * documentation string for the symbol found in file at location
- * line, col.
- */
+ * Quickinfo request; value of command field is
+ * "quickinfo". Return response giving a quick type and
+ * documentation string for the symbol found in file at location
+ * line, col.
+ */
interface QuickInfoRequest extends FileLocationRequest {
command: CommandTypes.Quickinfo;
}
/**
- * Body of QuickInfoResponse.
- */
+ * Body of QuickInfoResponse.
+ */
interface QuickInfoResponseBody {
/**
- * The symbol's kind (such as 'className' or 'parameterName' or plain 'text').
- */
+ * The symbol's kind (such as 'className' or 'parameterName' or plain 'text').
+ */
kind: string;
/**
- * Optional modifiers for the kind (such as 'public').
- */
+ * Optional modifiers for the kind (such as 'public').
+ */
kindModifiers: string;
/**
- * Starting file location of symbol.
- */
+ * Starting file location of symbol.
+ */
start: Location;
/**
- * One past last character of symbol.
- */
+ * One past last character of symbol.
+ */
end: Location;
/**
- * Type and kind of symbol.
- */
+ * Type and kind of symbol.
+ */
displayString: string;
/**
- * Documentation associated with symbol.
- */
+ * Documentation associated with symbol.
+ */
documentation: string;
+ /**
+ * JSDoc tags associated with symbol.
+ */
+ tags: JSDocTagInfo[];
}
/**
- * Quickinfo response message.
- */
+ * Quickinfo response message.
+ */
interface QuickInfoResponse extends Response {
body?: QuickInfoResponseBody;
}
/**
- * Arguments for format messages.
- */
+ * Arguments for format messages.
+ */
interface FormatRequestArgs extends FileLocationRequestArgs {
/**
- * Last line of range for which to format text in file.
- */
+ * Last line of range for which to format text in file.
+ */
endLine: number;
/**
- * Character offset on last line of range for which to format text in file.
- */
+ * Character offset on last line of range for which to format text in file.
+ */
endOffset: number;
/**
* Format options to be used.
@@ -982,36 +1002,36 @@ declare namespace ts.server.protocol {
options?: FormatCodeSettings;
}
/**
- * Format request; value of command field is "format". Return
- * response giving zero or more edit instructions. The edit
- * instructions will be sorted in file order. Applying the edit
- * instructions in reverse to file will result in correctly
- * reformatted text.
- */
+ * Format request; value of command field is "format". Return
+ * response giving zero or more edit instructions. The edit
+ * instructions will be sorted in file order. Applying the edit
+ * instructions in reverse to file will result in correctly
+ * reformatted text.
+ */
interface FormatRequest extends FileLocationRequest {
command: CommandTypes.Format;
arguments: FormatRequestArgs;
}
/**
- * Object found in response messages defining an editing
- * instruction for a span of text in source code. The effect of
- * this instruction is to replace the text starting at start and
- * ending one character before end with newText. For an insertion,
- * the text span is empty. For a deletion, newText is empty.
- */
+ * Object found in response messages defining an editing
+ * instruction for a span of text in source code. The effect of
+ * this instruction is to replace the text starting at start and
+ * ending one character before end with newText. For an insertion,
+ * the text span is empty. For a deletion, newText is empty.
+ */
interface CodeEdit {
/**
- * First character of the text span to edit.
- */
+ * First character of the text span to edit.
+ */
start: Location;
/**
- * One character past last character of the text span to edit.
- */
+ * One character past last character of the text span to edit.
+ */
end: Location;
/**
- * Replace the span defined above with this string (may be
- * the empty string).
- */
+ * Replace the span defined above with this string (may be
+ * the empty string).
+ */
newText: string;
}
interface FileCodeEdits {
@@ -1029,99 +1049,99 @@ declare namespace ts.server.protocol {
changes: FileCodeEdits[];
}
/**
- * Format and format on key response message.
- */
+ * Format and format on key response message.
+ */
interface FormatResponse extends Response {
body?: CodeEdit[];
}
/**
- * Arguments for format on key messages.
- */
+ * Arguments for format on key messages.
+ */
interface FormatOnKeyRequestArgs extends FileLocationRequestArgs {
/**
- * Key pressed (';', '\n', or '}').
- */
+ * Key pressed (';', '\n', or '}').
+ */
key: string;
options?: FormatCodeSettings;
}
/**
- * Format on key request; value of command field is
- * "formatonkey". Given file location and key typed (as string),
- * return response giving zero or more edit instructions. The
- * edit instructions will be sorted in file order. Applying the
- * edit instructions in reverse to file will result in correctly
- * reformatted text.
- */
+ * Format on key request; value of command field is
+ * "formatonkey". Given file location and key typed (as string),
+ * return response giving zero or more edit instructions. The
+ * edit instructions will be sorted in file order. Applying the
+ * edit instructions in reverse to file will result in correctly
+ * reformatted text.
+ */
interface FormatOnKeyRequest extends FileLocationRequest {
command: CommandTypes.Formatonkey;
arguments: FormatOnKeyRequestArgs;
}
/**
- * Arguments for completions messages.
- */
+ * Arguments for completions messages.
+ */
interface CompletionsRequestArgs extends FileLocationRequestArgs {
/**
- * Optional prefix to apply to possible completions.
- */
+ * Optional prefix to apply to possible completions.
+ */
prefix?: string;
}
/**
- * Completions request; value of command field is "completions".
- * Given a file location (file, line, col) and a prefix (which may
- * be the empty string), return the possible completions that
- * begin with prefix.
- */
+ * Completions request; value of command field is "completions".
+ * Given a file location (file, line, col) and a prefix (which may
+ * be the empty string), return the possible completions that
+ * begin with prefix.
+ */
interface CompletionsRequest extends FileLocationRequest {
command: CommandTypes.Completions;
arguments: CompletionsRequestArgs;
}
/**
- * Arguments for completion details request.
- */
+ * Arguments for completion details request.
+ */
interface CompletionDetailsRequestArgs extends FileLocationRequestArgs {
/**
- * Names of one or more entries for which to obtain details.
- */
+ * Names of one or more entries for which to obtain details.
+ */
entryNames: string[];
}
/**
- * Completion entry details request; value of command field is
- * "completionEntryDetails". Given a file location (file, line,
- * col) and an array of completion entry names return more
- * detailed information for each completion entry.
- */
+ * Completion entry details request; value of command field is
+ * "completionEntryDetails". Given a file location (file, line,
+ * col) and an array of completion entry names return more
+ * detailed information for each completion entry.
+ */
interface CompletionDetailsRequest extends FileLocationRequest {
command: CommandTypes.CompletionDetails;
arguments: CompletionDetailsRequestArgs;
}
/**
- * Part of a symbol description.
- */
+ * Part of a symbol description.
+ */
interface SymbolDisplayPart {
/**
- * Text of an item describing the symbol.
- */
+ * Text of an item describing the symbol.
+ */
text: string;
/**
- * The symbol's kind (such as 'className' or 'parameterName' or plain 'text').
- */
+ * The symbol's kind (such as 'className' or 'parameterName' or plain 'text').
+ */
kind: string;
}
/**
- * An item found in a completion response.
- */
+ * An item found in a completion response.
+ */
interface CompletionEntry {
/**
- * The symbol's name.
- */
+ * The symbol's name.
+ */
name: string;
/**
- * The symbol's kind (such as 'className' or 'parameterName').
- */
+ * The symbol's kind (such as 'className' or 'parameterName').
+ */
kind: string;
/**
- * Optional modifiers for the kind (such as 'public').
- */
+ * Optional modifiers for the kind (such as 'public').
+ */
kindModifiers: string;
/**
* A string that is used for comparing completion items so that they can be ordered. This
@@ -1135,29 +1155,33 @@ declare namespace ts.server.protocol {
replacementSpan?: TextSpan;
}
/**
- * Additional completion entry details, available on demand
- */
+ * Additional completion entry details, available on demand
+ */
interface CompletionEntryDetails {
/**
- * The symbol's name.
- */
+ * The symbol's name.
+ */
name: string;
/**
- * The symbol's kind (such as 'className' or 'parameterName').
- */
+ * The symbol's kind (such as 'className' or 'parameterName').
+ */
kind: string;
/**
- * Optional modifiers for the kind (such as 'public').
- */
+ * Optional modifiers for the kind (such as 'public').
+ */
kindModifiers: string;
/**
- * Display parts of the symbol (similar to quick info).
- */
+ * Display parts of the symbol (similar to quick info).
+ */
displayParts: SymbolDisplayPart[];
/**
- * Documentation strings for the symbol.
- */
+ * Documentation strings for the symbol.
+ */
documentation: SymbolDisplayPart[];
+ /**
+ * JSDoc tags for the symbol.
+ */
+ tags: JSDocTagInfo[];
}
interface CompletionsResponse extends Response {
body?: CompletionEntry[];
@@ -1174,12 +1198,12 @@ declare namespace ts.server.protocol {
*/
name: string;
/**
- * Documentation of the parameter.
- */
+ * Documentation of the parameter.
+ */
documentation: SymbolDisplayPart[];
/**
- * Display parts of the parameter.
- */
+ * Display parts of the parameter.
+ */
displayParts: SymbolDisplayPart[];
/**
* Whether the parameter is optional or not.
@@ -1214,6 +1238,10 @@ declare namespace ts.server.protocol {
* The signature's documentation
*/
documentation: SymbolDisplayPart[];
+ /**
+ * The signature's JSDoc tags
+ */
+ tags: JSDocTagInfo[];
}
/**
* Signature help items found in the response of a signature help request.
@@ -1246,10 +1274,10 @@ declare namespace ts.server.protocol {
interface SignatureHelpRequestArgs extends FileLocationRequestArgs {
}
/**
- * Signature help request; value of command field is "signatureHelp".
- * Given a file location (file, line, col), return the signature
- * help.
- */
+ * Signature help request; value of command field is "signatureHelp".
+ * Given a file location (file, line, col), return the signature
+ * help.
+ */
interface SignatureHelpRequest extends FileLocationRequest {
command: CommandTypes.SignatureHelp;
arguments: SignatureHelpRequestArgs;
@@ -1261,8 +1289,8 @@ declare namespace ts.server.protocol {
body?: SignatureHelpItems;
}
/**
- * Synchronous request for semantic diagnostics of one file.
- */
+ * Synchronous request for semantic diagnostics of one file.
+ */
interface SemanticDiagnosticsSyncRequest extends FileRequest {
command: CommandTypes.SemanticDiagnosticsSync;
arguments: SemanticDiagnosticsSyncRequestArgs;
@@ -1271,14 +1299,14 @@ declare namespace ts.server.protocol {
includeLinePosition?: boolean;
}
/**
- * Response object for synchronous sematic diagnostics request.
- */
+ * Response object for synchronous sematic diagnostics request.
+ */
interface SemanticDiagnosticsSyncResponse extends Response {
body?: Diagnostic[] | DiagnosticWithLinePosition[];
}
/**
- * Synchronous request for syntactic diagnostics of one file.
- */
+ * Synchronous request for syntactic diagnostics of one file.
+ */
interface SyntacticDiagnosticsSyncRequest extends FileRequest {
command: CommandTypes.SyntacticDiagnosticsSync;
arguments: SyntacticDiagnosticsSyncRequestArgs;
@@ -1287,98 +1315,109 @@ declare namespace ts.server.protocol {
includeLinePosition?: boolean;
}
/**
- * Response object for synchronous syntactic diagnostics request.
- */
+ * Response object for synchronous syntactic diagnostics request.
+ */
interface SyntacticDiagnosticsSyncResponse extends Response {
body?: Diagnostic[] | DiagnosticWithLinePosition[];
}
/**
- * Arguments for GeterrForProject request.
- */
+ * Arguments for GeterrForProject request.
+ */
interface GeterrForProjectRequestArgs {
/**
- * the file requesting project error list
- */
+ * the file requesting project error list
+ */
file: string;
/**
- * Delay in milliseconds to wait before starting to compute
- * errors for the files in the file list
- */
+ * Delay in milliseconds to wait before starting to compute
+ * errors for the files in the file list
+ */
delay: number;
}
/**
- * GeterrForProjectRequest request; value of command field is
- * "geterrForProject". It works similarly with 'Geterr', only
- * it request for every file in this project.
- */
+ * GeterrForProjectRequest request; value of command field is
+ * "geterrForProject". It works similarly with 'Geterr', only
+ * it request for every file in this project.
+ */
interface GeterrForProjectRequest extends Request {
command: CommandTypes.GeterrForProject;
arguments: GeterrForProjectRequestArgs;
}
/**
- * Arguments for geterr messages.
- */
+ * Arguments for geterr messages.
+ */
interface GeterrRequestArgs {
/**
- * List of file names for which to compute compiler errors.
- * The files will be checked in list order.
- */
+ * List of file names for which to compute compiler errors.
+ * The files will be checked in list order.
+ */
files: string[];
/**
- * Delay in milliseconds to wait before starting to compute
- * errors for the files in the file list
- */
+ * Delay in milliseconds to wait before starting to compute
+ * errors for the files in the file list
+ */
delay: number;
}
/**
- * Geterr request; value of command field is "geterr". Wait for
- * delay milliseconds and then, if during the wait no change or
- * reload messages have arrived for the first file in the files
- * list, get the syntactic errors for the file, field requests,
- * and then get the semantic errors for the file. Repeat with a
- * smaller delay for each subsequent file on the files list. Best
- * practice for an editor is to send a file list containing each
- * file that is currently visible, in most-recently-used order.
- */
+ * Geterr request; value of command field is "geterr". Wait for
+ * delay milliseconds and then, if during the wait no change or
+ * reload messages have arrived for the first file in the files
+ * list, get the syntactic errors for the file, field requests,
+ * and then get the semantic errors for the file. Repeat with a
+ * smaller delay for each subsequent file on the files list. Best
+ * practice for an editor is to send a file list containing each
+ * file that is currently visible, in most-recently-used order.
+ */
interface GeterrRequest extends Request {
command: CommandTypes.Geterr;
arguments: GeterrRequestArgs;
}
+ type RequestCompletedEventName = "requestCompleted";
+ /**
+ * Event that is sent when server have finished processing request with specified id.
+ */
+ interface RequestCompletedEvent extends Event {
+ event: RequestCompletedEventName;
+ body: RequestCompletedEventBody;
+ }
+ interface RequestCompletedEventBody {
+ request_seq: number;
+ }
/**
- * Item of diagnostic information found in a DiagnosticEvent message.
- */
+ * Item of diagnostic information found in a DiagnosticEvent message.
+ */
interface Diagnostic {
/**
- * Starting file location at which text applies.
- */
+ * Starting file location at which text applies.
+ */
start: Location;
/**
- * The last file location at which the text applies.
- */
+ * The last file location at which the text applies.
+ */
end: Location;
/**
- * Text of diagnostic message.
- */
+ * Text of diagnostic message.
+ */
text: string;
/**
- * The error code of the diagnostic message.
- */
+ * The error code of the diagnostic message.
+ */
code?: number;
}
interface DiagnosticEventBody {
/**
- * The file for which diagnostic information is reported.
- */
+ * The file for which diagnostic information is reported.
+ */
file: string;
/**
- * An array of diagnostic information items.
- */
+ * An array of diagnostic information items.
+ */
diagnostics: Diagnostic[];
}
/**
- * Event message for "syntaxDiag" and "semanticDiag" event types.
- * These events provide syntactic and semantic errors for a file.
- */
+ * Event message for "syntaxDiag" and "semanticDiag" event types.
+ * These events provide syntactic and semantic errors for a file.
+ */
interface DiagnosticEvent extends Event {
body?: DiagnosticEventBody;
}
@@ -1424,172 +1463,172 @@ declare namespace ts.server.protocol {
languageServiceEnabled: boolean;
}
/**
- * Arguments for reload request.
- */
+ * Arguments for reload request.
+ */
interface ReloadRequestArgs extends FileRequestArgs {
/**
- * Name of temporary file from which to reload file
- * contents. May be same as file.
- */
+ * Name of temporary file from which to reload file
+ * contents. May be same as file.
+ */
tmpfile: string;
}
/**
- * Reload request message; value of command field is "reload".
- * Reload contents of file with name given by the 'file' argument
- * from temporary file with name given by the 'tmpfile' argument.
- * The two names can be identical.
- */
+ * Reload request message; value of command field is "reload".
+ * Reload contents of file with name given by the 'file' argument
+ * from temporary file with name given by the 'tmpfile' argument.
+ * The two names can be identical.
+ */
interface ReloadRequest extends FileRequest {
command: CommandTypes.Reload;
arguments: ReloadRequestArgs;
}
/**
- * Response to "reload" request. This is just an acknowledgement, so
- * no body field is required.
- */
+ * Response to "reload" request. This is just an acknowledgement, so
+ * no body field is required.
+ */
interface ReloadResponse extends Response {
}
/**
- * Arguments for saveto request.
- */
+ * Arguments for saveto request.
+ */
interface SavetoRequestArgs extends FileRequestArgs {
/**
- * Name of temporary file into which to save server's view of
- * file contents.
- */
+ * Name of temporary file into which to save server's view of
+ * file contents.
+ */
tmpfile: string;
}
/**
- * Saveto request message; value of command field is "saveto".
- * For debugging purposes, save to a temporaryfile (named by
- * argument 'tmpfile') the contents of file named by argument
- * 'file'. The server does not currently send a response to a
- * "saveto" request.
- */
+ * Saveto request message; value of command field is "saveto".
+ * For debugging purposes, save to a temporaryfile (named by
+ * argument 'tmpfile') the contents of file named by argument
+ * 'file'. The server does not currently send a response to a
+ * "saveto" request.
+ */
interface SavetoRequest extends FileRequest {
command: CommandTypes.Saveto;
arguments: SavetoRequestArgs;
}
/**
- * Arguments for navto request message.
- */
+ * Arguments for navto request message.
+ */
interface NavtoRequestArgs extends FileRequestArgs {
/**
- * Search term to navigate to from current location; term can
- * be '.*' or an identifier prefix.
- */
+ * Search term to navigate to from current location; term can
+ * be '.*' or an identifier prefix.
+ */
searchValue: string;
/**
- * Optional limit on the number of items to return.
- */
+ * Optional limit on the number of items to return.
+ */
maxResultCount?: number;
/**
- * Optional flag to indicate we want results for just the current file
- * or the entire project.
- */
+ * Optional flag to indicate we want results for just the current file
+ * or the entire project.
+ */
currentFileOnly?: boolean;
projectFileName?: string;
}
/**
- * Navto request message; value of command field is "navto".
- * Return list of objects giving file locations and symbols that
- * match the search term given in argument 'searchTerm'. The
- * context for the search is given by the named file.
- */
+ * Navto request message; value of command field is "navto".
+ * Return list of objects giving file locations and symbols that
+ * match the search term given in argument 'searchTerm'. The
+ * context for the search is given by the named file.
+ */
interface NavtoRequest extends FileRequest {
command: CommandTypes.Navto;
arguments: NavtoRequestArgs;
}
/**
- * An item found in a navto response.
- */
+ * An item found in a navto response.
+ */
interface NavtoItem {
/**
- * The symbol's name.
- */
+ * The symbol's name.
+ */
name: string;
/**
- * The symbol's kind (such as 'className' or 'parameterName').
- */
+ * The symbol's kind (such as 'className' or 'parameterName').
+ */
kind: string;
/**
- * exact, substring, or prefix.
- */
+ * exact, substring, or prefix.
+ */
matchKind?: string;
/**
- * If this was a case sensitive or insensitive match.
- */
+ * If this was a case sensitive or insensitive match.
+ */
isCaseSensitive?: boolean;
/**
- * Optional modifiers for the kind (such as 'public').
- */
+ * Optional modifiers for the kind (such as 'public').
+ */
kindModifiers?: string;
/**
- * The file in which the symbol is found.
- */
+ * The file in which the symbol is found.
+ */
file: string;
/**
- * The location within file at which the symbol is found.
- */
+ * The location within file at which the symbol is found.
+ */
start: Location;
/**
- * One past the last character of the symbol.
- */
+ * One past the last character of the symbol.
+ */
end: Location;
/**
- * Name of symbol's container symbol (if any); for example,
- * the class name if symbol is a class member.
- */
+ * Name of symbol's container symbol (if any); for example,
+ * the class name if symbol is a class member.
+ */
containerName?: string;
/**
- * Kind of symbol's container symbol (if any).
- */
+ * Kind of symbol's container symbol (if any).
+ */
containerKind?: string;
}
/**
- * Navto response message. Body is an array of navto items. Each
- * item gives a symbol that matched the search term.
- */
+ * Navto response message. Body is an array of navto items. Each
+ * item gives a symbol that matched the search term.
+ */
interface NavtoResponse extends Response {
body?: NavtoItem[];
}
/**
- * Arguments for change request message.
- */
+ * Arguments for change request message.
+ */
interface ChangeRequestArgs extends FormatRequestArgs {
/**
- * Optional string to insert at location (file, line, offset).
- */
+ * Optional string to insert at location (file, line, offset).
+ */
insertString?: string;
}
/**
- * Change request message; value of command field is "change".
- * Update the server's view of the file named by argument 'file'.
- * Server does not currently send a response to a change request.
- */
+ * Change request message; value of command field is "change".
+ * Update the server's view of the file named by argument 'file'.
+ * Server does not currently send a response to a change request.
+ */
interface ChangeRequest extends FileLocationRequest {
command: CommandTypes.Change;
arguments: ChangeRequestArgs;
}
/**
- * Response to "brace" request.
- */
+ * Response to "brace" request.
+ */
interface BraceResponse extends Response {
body?: TextSpan[];
}
/**
- * Brace matching request; value of command field is "brace".
- * Return response giving the file locations of matching braces
- * found in file at location line, offset.
- */
+ * Brace matching request; value of command field is "brace".
+ * Return response giving the file locations of matching braces
+ * found in file at location line, offset.
+ */
interface BraceRequest extends FileLocationRequest {
command: CommandTypes.Brace;
}
/**
- * NavBar items request; value of command field is "navbar".
- * Return response giving the list of navigation bar entries
- * extracted from the requested file.
- */
+ * NavBar items request; value of command field is "navbar".
+ * Return response giving the list of navigation bar entries
+ * extracted from the requested file.
+ */
interface NavBarRequest extends FileRequest {
command: CommandTypes.NavBar;
}
@@ -1602,28 +1641,28 @@ declare namespace ts.server.protocol {
}
interface NavigationBarItem {
/**
- * The item's display text.
- */
+ * The item's display text.
+ */
text: string;
/**
- * The symbol's kind (such as 'className' or 'parameterName').
- */
+ * The symbol's kind (such as 'className' or 'parameterName').
+ */
kind: string;
/**
- * Optional modifiers for the kind (such as 'public').
- */
+ * Optional modifiers for the kind (such as 'public').
+ */
kindModifiers?: string;
/**
- * The definition locations of the item.
- */
+ * The definition locations of the item.
+ */
spans: TextSpan[];
/**
- * Optional children.
- */
+ * Optional children.
+ */
childItems?: NavigationBarItem[];
/**
- * Number of levels deep this item should appear.
- */
+ * Number of levels deep this item should appear.
+ */
indent: number;
}
/** protocol.NavigationTree is identical to ts.NavigationTree, except using protocol.TextSpan instead of ts.TextSpan */
@@ -1643,6 +1682,14 @@ declare namespace ts.server.protocol {
telemetryEventName: string;
payload: any;
}
+ type TypesInstallerInitializationFailedEventName = "typesInstallerInitializationFailed";
+ interface TypesInstallerInitializationFailedEvent extends Event {
+ event: TypesInstallerInitializationFailedEventName;
+ body: TypesInstallerInitializationFailedEventBody;
+ }
+ interface TypesInstallerInitializationFailedEventBody {
+ message: string;
+ }
type TypingsInstalledTelemetryEventName = "typingsInstalled";
interface TypingsInstalledTelemetryEventBody extends TelemetryEventBody {
telemetryEventName: TypingsInstalledTelemetryEventName;
@@ -1662,6 +1709,34 @@ declare namespace ts.server.protocol {
*/
typingsInstallerVersion: string;
}
+ type BeginInstallTypesEventName = "beginInstallTypes";
+ type EndInstallTypesEventName = "endInstallTypes";
+ interface BeginInstallTypesEvent extends Event {
+ event: BeginInstallTypesEventName;
+ body: BeginInstallTypesEventBody;
+ }
+ interface EndInstallTypesEvent extends Event {
+ event: EndInstallTypesEventName;
+ body: EndInstallTypesEventBody;
+ }
+ interface InstallTypesEventBody {
+ /**
+ * correlation id to match begin and end events
+ */
+ eventId: number;
+ /**
+ * list of packages to install
+ */
+ packages: ReadonlyArray<string>;
+ }
+ interface BeginInstallTypesEventBody extends InstallTypesEventBody {
+ }
+ interface EndInstallTypesEventBody extends InstallTypesEventBody {
+ /**
+ * true if installation succeeded, otherwise false
+ */
+ success: boolean;
+ }
interface NavBarResponse extends Response {
body?: NavigationBarItem[];
}
@@ -1686,12 +1761,15 @@ declare namespace ts.server.protocol {
insertSpaceAfterCommaDelimiter?: boolean;
insertSpaceAfterSemicolonInForStatements?: boolean;
insertSpaceBeforeAndAfterBinaryOperators?: boolean;
+ insertSpaceAfterConstructor?: boolean;
insertSpaceAfterKeywordsInControlFlowStatements?: boolean;
insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean;
insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean;
insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean;
+ insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean;
insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean;
insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
+ insertSpaceBeforeFunctionParenthesis?: boolean;
placeOpenBraceOnNewLineForFunctions?: boolean;
placeOpenBraceOnNewLineForControlBlocks?: boolean;
}
@@ -1737,6 +1815,7 @@ declare namespace ts.server.protocol {
outDir?: string;
outFile?: string;
paths?: MapLike<string[]>;
+ plugins?: PluginImport[];
preserveConstEnums?: boolean;
project?: string;
reactNamespace?: string;
@@ -1760,9 +1839,10 @@ declare namespace ts.server.protocol {
namespace JsxEmit {
type None = "None";
type Preserve = "Preserve";
+ type ReactNative = "ReactNative";
type React = "React";
}
- type JsxEmit = JsxEmit.None | JsxEmit.Preserve | JsxEmit.React;
+ type JsxEmit = JsxEmit.None | JsxEmit.Preserve | JsxEmit.React | JsxEmit.ReactNative;
namespace ModuleKind {
type None = "None";
type CommonJS = "CommonJS";
@@ -1818,11 +1898,30 @@ declare namespace ts.server.protocol {
[option: string]: string[] | boolean | undefined;
}
+ interface JsFileExtensionInfo {
+ extension: string;
+ isMixedContent: boolean;
+ }
+
+ interface JSDocTagInfo {
+ name: string;
+ text?: string;
+ }
+
+ /**
+ * Type of objects whose values are all of the same type.
+ * The `in` and `for-in` operators can *not* be safely used,
+ * since `Object.prototype` may be modified by outside code.
+ */
interface MapLike<T> {
[index: string]: T;
}
- type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]>;
+ interface PluginImport {
+ name: string;
+ }
+
+ type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | PluginImport[];
}
declare namespace ts {
// these types are empty stubs for types from services and should not be used directly