.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-html / node_modules / typescript / lib / protocol.d.ts
1 /**
2  * Declaration module describing the TypeScript Server protocol
3  */
4 declare namespace ts.server.protocol {
5     const enum CommandTypes {
6         JsxClosingTag = "jsxClosingTag",
7         Brace = "brace",
8         BraceCompletion = "braceCompletion",
9         GetSpanOfEnclosingComment = "getSpanOfEnclosingComment",
10         Change = "change",
11         Close = "close",
12         /** @deprecated Prefer CompletionInfo -- see comment on CompletionsResponse */
13         Completions = "completions",
14         CompletionInfo = "completionInfo",
15         CompletionDetails = "completionEntryDetails",
16         CompileOnSaveAffectedFileList = "compileOnSaveAffectedFileList",
17         CompileOnSaveEmitFile = "compileOnSaveEmitFile",
18         Configure = "configure",
19         Definition = "definition",
20         DefinitionAndBoundSpan = "definitionAndBoundSpan",
21         Implementation = "implementation",
22         Exit = "exit",
23         FileReferences = "fileReferences",
24         Format = "format",
25         Formatonkey = "formatonkey",
26         Geterr = "geterr",
27         GeterrForProject = "geterrForProject",
28         SemanticDiagnosticsSync = "semanticDiagnosticsSync",
29         SyntacticDiagnosticsSync = "syntacticDiagnosticsSync",
30         SuggestionDiagnosticsSync = "suggestionDiagnosticsSync",
31         NavBar = "navbar",
32         Navto = "navto",
33         NavTree = "navtree",
34         NavTreeFull = "navtree-full",
35         /** @deprecated */
36         Occurrences = "occurrences",
37         DocumentHighlights = "documentHighlights",
38         Open = "open",
39         Quickinfo = "quickinfo",
40         References = "references",
41         Reload = "reload",
42         Rename = "rename",
43         Saveto = "saveto",
44         SignatureHelp = "signatureHelp",
45         Status = "status",
46         TypeDefinition = "typeDefinition",
47         ProjectInfo = "projectInfo",
48         ReloadProjects = "reloadProjects",
49         Unknown = "unknown",
50         OpenExternalProject = "openExternalProject",
51         OpenExternalProjects = "openExternalProjects",
52         CloseExternalProject = "closeExternalProject",
53         UpdateOpen = "updateOpen",
54         GetOutliningSpans = "getOutliningSpans",
55         TodoComments = "todoComments",
56         Indentation = "indentation",
57         DocCommentTemplate = "docCommentTemplate",
58         CompilerOptionsForInferredProjects = "compilerOptionsForInferredProjects",
59         GetCodeFixes = "getCodeFixes",
60         GetCombinedCodeFix = "getCombinedCodeFix",
61         ApplyCodeActionCommand = "applyCodeActionCommand",
62         GetSupportedCodeFixes = "getSupportedCodeFixes",
63         GetApplicableRefactors = "getApplicableRefactors",
64         GetEditsForRefactor = "getEditsForRefactor",
65         OrganizeImports = "organizeImports",
66         GetEditsForFileRename = "getEditsForFileRename",
67         ConfigurePlugin = "configurePlugin",
68         SelectionRange = "selectionRange",
69         ToggleLineComment = "toggleLineComment",
70         ToggleMultilineComment = "toggleMultilineComment",
71         CommentSelection = "commentSelection",
72         UncommentSelection = "uncommentSelection",
73         PrepareCallHierarchy = "prepareCallHierarchy",
74         ProvideCallHierarchyIncomingCalls = "provideCallHierarchyIncomingCalls",
75         ProvideCallHierarchyOutgoingCalls = "provideCallHierarchyOutgoingCalls"
76     }
77     /**
78      * A TypeScript Server message
79      */
80     interface Message {
81         /**
82          * Sequence number of the message
83          */
84         seq: number;
85         /**
86          * One of "request", "response", or "event"
87          */
88         type: "request" | "response" | "event";
89     }
90     /**
91      * Client-initiated request message
92      */
93     interface Request extends Message {
94         type: "request";
95         /**
96          * The command to execute
97          */
98         command: string;
99         /**
100          * Object containing arguments for the command
101          */
102         arguments?: any;
103     }
104     /**
105      * Request to reload the project structure for all the opened files
106      */
107     interface ReloadProjectsRequest extends Message {
108         command: CommandTypes.ReloadProjects;
109     }
110     /**
111      * Server-initiated event message
112      */
113     interface Event extends Message {
114         type: "event";
115         /**
116          * Name of event
117          */
118         event: string;
119         /**
120          * Event-specific information
121          */
122         body?: any;
123     }
124     /**
125      * Response by server to client request message.
126      */
127     interface Response extends Message {
128         type: "response";
129         /**
130          * Sequence number of the request message.
131          */
132         request_seq: number;
133         /**
134          * Outcome of the request.
135          */
136         success: boolean;
137         /**
138          * The command requested.
139          */
140         command: string;
141         /**
142          * If success === false, this should always be provided.
143          * Otherwise, may (or may not) contain a success message.
144          */
145         message?: string;
146         /**
147          * Contains message body if success === true.
148          */
149         body?: any;
150         /**
151          * Contains extra information that plugin can include to be passed on
152          */
153         metadata?: unknown;
154         /**
155          * Exposes information about the performance of this request-response pair.
156          */
157         performanceData?: PerformanceData;
158     }
159     interface PerformanceData {
160         /**
161          * Time spent updating the program graph, in milliseconds.
162          */
163         updateGraphDurationMs?: number;
164         /**
165          * The time spent creating or updating the auto-import program, in milliseconds.
166          */
167         createAutoImportProviderProgramDurationMs?: number;
168     }
169     /**
170      * Arguments for FileRequest messages.
171      */
172     interface FileRequestArgs {
173         /**
174          * The file for the request (absolute pathname required).
175          */
176         file: string;
177         projectFileName?: string;
178     }
179     interface StatusRequest extends Request {
180         command: CommandTypes.Status;
181     }
182     interface StatusResponseBody {
183         /**
184          * The TypeScript version (`ts.version`).
185          */
186         version: string;
187     }
188     /**
189      * Response to StatusRequest
190      */
191     interface StatusResponse extends Response {
192         body: StatusResponseBody;
193     }
194     /**
195      * Requests a JS Doc comment template for a given position
196      */
197     interface DocCommentTemplateRequest extends FileLocationRequest {
198         command: CommandTypes.DocCommentTemplate;
199     }
200     /**
201      * Response to DocCommentTemplateRequest
202      */
203     interface DocCommandTemplateResponse extends Response {
204         body?: TextInsertion;
205     }
206     /**
207      * A request to get TODO comments from the file
208      */
209     interface TodoCommentRequest extends FileRequest {
210         command: CommandTypes.TodoComments;
211         arguments: TodoCommentRequestArgs;
212     }
213     /**
214      * Arguments for TodoCommentRequest request.
215      */
216     interface TodoCommentRequestArgs extends FileRequestArgs {
217         /**
218          * Array of target TodoCommentDescriptors that describes TODO comments to be found
219          */
220         descriptors: TodoCommentDescriptor[];
221     }
222     /**
223      * Response for TodoCommentRequest request.
224      */
225     interface TodoCommentsResponse extends Response {
226         body?: TodoComment[];
227     }
228     /**
229      * A request to determine if the caret is inside a comment.
230      */
231     interface SpanOfEnclosingCommentRequest extends FileLocationRequest {
232         command: CommandTypes.GetSpanOfEnclosingComment;
233         arguments: SpanOfEnclosingCommentRequestArgs;
234     }
235     interface SpanOfEnclosingCommentRequestArgs extends FileLocationRequestArgs {
236         /**
237          * Requires that the enclosing span be a multi-line comment, or else the request returns undefined.
238          */
239         onlyMultiLine: boolean;
240     }
241     /**
242      * Request to obtain outlining spans in file.
243      */
244     interface OutliningSpansRequest extends FileRequest {
245         command: CommandTypes.GetOutliningSpans;
246     }
247     interface OutliningSpan {
248         /** The span of the document to actually collapse. */
249         textSpan: TextSpan;
250         /** The span of the document to display when the user hovers over the collapsed span. */
251         hintSpan: TextSpan;
252         /** The text to display in the editor for the collapsed region. */
253         bannerText: string;
254         /**
255          * Whether or not this region should be automatically collapsed when
256          * the 'Collapse to Definitions' command is invoked.
257          */
258         autoCollapse: boolean;
259         /**
260          * Classification of the contents of the span
261          */
262         kind: OutliningSpanKind;
263     }
264     /**
265      * Response to OutliningSpansRequest request.
266      */
267     interface OutliningSpansResponse extends Response {
268         body?: OutliningSpan[];
269     }
270     /**
271      * A request to get indentation for a location in file
272      */
273     interface IndentationRequest extends FileLocationRequest {
274         command: CommandTypes.Indentation;
275         arguments: IndentationRequestArgs;
276     }
277     /**
278      * Response for IndentationRequest request.
279      */
280     interface IndentationResponse extends Response {
281         body?: IndentationResult;
282     }
283     /**
284      * Indentation result representing where indentation should be placed
285      */
286     interface IndentationResult {
287         /**
288          * The base position in the document that the indent should be relative to
289          */
290         position: number;
291         /**
292          * The number of columns the indent should be at relative to the position's column.
293          */
294         indentation: number;
295     }
296     /**
297      * Arguments for IndentationRequest request.
298      */
299     interface IndentationRequestArgs extends FileLocationRequestArgs {
300         /**
301          * An optional set of settings to be used when computing indentation.
302          * If argument is omitted - then it will use settings for file that were previously set via 'configure' request or global settings.
303          */
304         options?: EditorSettings;
305     }
306     /**
307      * Arguments for ProjectInfoRequest request.
308      */
309     interface ProjectInfoRequestArgs extends FileRequestArgs {
310         /**
311          * Indicate if the file name list of the project is needed
312          */
313         needFileNameList: boolean;
314     }
315     /**
316      * A request to get the project information of the current file.
317      */
318     interface ProjectInfoRequest extends Request {
319         command: CommandTypes.ProjectInfo;
320         arguments: ProjectInfoRequestArgs;
321     }
322     /**
323      * A request to retrieve compiler options diagnostics for a project
324      */
325     interface CompilerOptionsDiagnosticsRequest extends Request {
326         arguments: CompilerOptionsDiagnosticsRequestArgs;
327     }
328     /**
329      * Arguments for CompilerOptionsDiagnosticsRequest request.
330      */
331     interface CompilerOptionsDiagnosticsRequestArgs {
332         /**
333          * Name of the project to retrieve compiler options diagnostics.
334          */
335         projectFileName: string;
336     }
337     /**
338      * Response message body for "projectInfo" request
339      */
340     interface ProjectInfo {
341         /**
342          * For configured project, this is the normalized path of the 'tsconfig.json' file
343          * For inferred project, this is undefined
344          */
345         configFileName: string;
346         /**
347          * The list of normalized file name in the project, including 'lib.d.ts'
348          */
349         fileNames?: string[];
350         /**
351          * Indicates if the project has a active language service instance
352          */
353         languageServiceDisabled?: boolean;
354     }
355     /**
356      * Represents diagnostic info that includes location of diagnostic in two forms
357      * - start position and length of the error span
358      * - startLocation and endLocation - a pair of Location objects that store start/end line and offset of the error span.
359      */
360     interface DiagnosticWithLinePosition {
361         message: string;
362         start: number;
363         length: number;
364         startLocation: Location;
365         endLocation: Location;
366         category: string;
367         code: number;
368         /** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */
369         reportsUnnecessary?: {};
370         reportsDeprecated?: {};
371         relatedInformation?: DiagnosticRelatedInformation[];
372     }
373     /**
374      * Response message for "projectInfo" request
375      */
376     interface ProjectInfoResponse extends Response {
377         body?: ProjectInfo;
378     }
379     /**
380      * Request whose sole parameter is a file name.
381      */
382     interface FileRequest extends Request {
383         arguments: FileRequestArgs;
384     }
385     /**
386      * Instances of this interface specify a location in a source file:
387      * (file, line, character offset), where line and character offset are 1-based.
388      */
389     interface FileLocationRequestArgs extends FileRequestArgs {
390         /**
391          * The line number for the request (1-based).
392          */
393         line: number;
394         /**
395          * The character offset (on the line) for the request (1-based).
396          */
397         offset: number;
398     }
399     type FileLocationOrRangeRequestArgs = FileLocationRequestArgs | FileRangeRequestArgs;
400     /**
401      * Request refactorings at a given position or selection area.
402      */
403     interface GetApplicableRefactorsRequest extends Request {
404         command: CommandTypes.GetApplicableRefactors;
405         arguments: GetApplicableRefactorsRequestArgs;
406     }
407     type GetApplicableRefactorsRequestArgs = FileLocationOrRangeRequestArgs & {
408         triggerReason?: RefactorTriggerReason;
409         kind?: string;
410     };
411     type RefactorTriggerReason = "implicit" | "invoked";
412     /**
413      * Response is a list of available refactorings.
414      * Each refactoring exposes one or more "Actions"; a user selects one action to invoke a refactoring
415      */
416     interface GetApplicableRefactorsResponse extends Response {
417         body?: ApplicableRefactorInfo[];
418     }
419     /**
420      * A set of one or more available refactoring actions, grouped under a parent refactoring.
421      */
422     interface ApplicableRefactorInfo {
423         /**
424          * The programmatic name of the refactoring
425          */
426         name: string;
427         /**
428          * A description of this refactoring category to show to the user.
429          * If the refactoring gets inlined (see below), this text will not be visible.
430          */
431         description: string;
432         /**
433          * Inlineable refactorings can have their actions hoisted out to the top level
434          * of a context menu. Non-inlineanable refactorings should always be shown inside
435          * their parent grouping.
436          *
437          * If not specified, this value is assumed to be 'true'
438          */
439         inlineable?: boolean;
440         actions: RefactorActionInfo[];
441     }
442     /**
443      * Represents a single refactoring action - for example, the "Extract Method..." refactor might
444      * offer several actions, each corresponding to a surround class or closure to extract into.
445      */
446     interface RefactorActionInfo {
447         /**
448          * The programmatic name of the refactoring action
449          */
450         name: string;
451         /**
452          * A description of this refactoring action to show to the user.
453          * If the parent refactoring is inlined away, this will be the only text shown,
454          * so this description should make sense by itself if the parent is inlineable=true
455          */
456         description: string;
457         /**
458          * A message to show to the user if the refactoring cannot be applied in
459          * the current context.
460          */
461         notApplicableReason?: string;
462         /**
463          * The hierarchical dotted name of the refactor action.
464          */
465         kind?: string;
466     }
467     interface GetEditsForRefactorRequest extends Request {
468         command: CommandTypes.GetEditsForRefactor;
469         arguments: GetEditsForRefactorRequestArgs;
470     }
471     /**
472      * Request the edits that a particular refactoring action produces.
473      * Callers must specify the name of the refactor and the name of the action.
474      */
475     type GetEditsForRefactorRequestArgs = FileLocationOrRangeRequestArgs & {
476         refactor: string;
477         action: string;
478     };
479     interface GetEditsForRefactorResponse extends Response {
480         body?: RefactorEditInfo;
481     }
482     interface RefactorEditInfo {
483         edits: FileCodeEdits[];
484         /**
485          * An optional location where the editor should start a rename operation once
486          * the refactoring edits have been applied
487          */
488         renameLocation?: Location;
489         renameFilename?: string;
490     }
491     /**
492      * Organize imports by:
493      *   1) Removing unused imports
494      *   2) Coalescing imports from the same module
495      *   3) Sorting imports
496      */
497     interface OrganizeImportsRequest extends Request {
498         command: CommandTypes.OrganizeImports;
499         arguments: OrganizeImportsRequestArgs;
500     }
501     type OrganizeImportsScope = GetCombinedCodeFixScope;
502     interface OrganizeImportsRequestArgs {
503         scope: OrganizeImportsScope;
504     }
505     interface OrganizeImportsResponse extends Response {
506         body: readonly FileCodeEdits[];
507     }
508     interface GetEditsForFileRenameRequest extends Request {
509         command: CommandTypes.GetEditsForFileRename;
510         arguments: GetEditsForFileRenameRequestArgs;
511     }
512     /** Note: Paths may also be directories. */
513     interface GetEditsForFileRenameRequestArgs {
514         readonly oldFilePath: string;
515         readonly newFilePath: string;
516     }
517     interface GetEditsForFileRenameResponse extends Response {
518         body: readonly FileCodeEdits[];
519     }
520     /**
521      * Request for the available codefixes at a specific position.
522      */
523     interface CodeFixRequest extends Request {
524         command: CommandTypes.GetCodeFixes;
525         arguments: CodeFixRequestArgs;
526     }
527     interface GetCombinedCodeFixRequest extends Request {
528         command: CommandTypes.GetCombinedCodeFix;
529         arguments: GetCombinedCodeFixRequestArgs;
530     }
531     interface GetCombinedCodeFixResponse extends Response {
532         body: CombinedCodeActions;
533     }
534     interface ApplyCodeActionCommandRequest extends Request {
535         command: CommandTypes.ApplyCodeActionCommand;
536         arguments: ApplyCodeActionCommandRequestArgs;
537     }
538     interface ApplyCodeActionCommandResponse extends Response {
539     }
540     interface FileRangeRequestArgs extends FileRequestArgs {
541         /**
542          * The line number for the request (1-based).
543          */
544         startLine: number;
545         /**
546          * The character offset (on the line) for the request (1-based).
547          */
548         startOffset: number;
549         /**
550          * The line number for the request (1-based).
551          */
552         endLine: number;
553         /**
554          * The character offset (on the line) for the request (1-based).
555          */
556         endOffset: number;
557     }
558     /**
559      * Instances of this interface specify errorcodes on a specific location in a sourcefile.
560      */
561     interface CodeFixRequestArgs extends FileRangeRequestArgs {
562         /**
563          * Errorcodes we want to get the fixes for.
564          */
565         errorCodes: readonly number[];
566     }
567     interface GetCombinedCodeFixRequestArgs {
568         scope: GetCombinedCodeFixScope;
569         fixId: {};
570     }
571     interface GetCombinedCodeFixScope {
572         type: "file";
573         args: FileRequestArgs;
574     }
575     interface ApplyCodeActionCommandRequestArgs {
576         /** May also be an array of commands. */
577         command: {};
578     }
579     /**
580      * Response for GetCodeFixes request.
581      */
582     interface GetCodeFixesResponse extends Response {
583         body?: CodeAction[];
584     }
585     /**
586      * A request whose arguments specify a file location (file, line, col).
587      */
588     interface FileLocationRequest extends FileRequest {
589         arguments: FileLocationRequestArgs;
590     }
591     /**
592      * A request to get codes of supported code fixes.
593      */
594     interface GetSupportedCodeFixesRequest extends Request {
595         command: CommandTypes.GetSupportedCodeFixes;
596     }
597     /**
598      * A response for GetSupportedCodeFixesRequest request.
599      */
600     interface GetSupportedCodeFixesResponse extends Response {
601         /**
602          * List of error codes supported by the server.
603          */
604         body?: string[];
605     }
606     /**
607      * A request to get encoded semantic classifications for a span in the file
608      */
609     interface EncodedSemanticClassificationsRequest extends FileRequest {
610         arguments: EncodedSemanticClassificationsRequestArgs;
611     }
612     /**
613      * Arguments for EncodedSemanticClassificationsRequest request.
614      */
615     interface EncodedSemanticClassificationsRequestArgs extends FileRequestArgs {
616         /**
617          * Start position of the span.
618          */
619         start: number;
620         /**
621          * Length of the span.
622          */
623         length: number;
624         /**
625          * Optional parameter for the semantic highlighting response, if absent it
626          * defaults to "original".
627          */
628         format?: "original" | "2020";
629     }
630     /** The response for a EncodedSemanticClassificationsRequest */
631     interface EncodedSemanticClassificationsResponse extends Response {
632         body?: EncodedSemanticClassificationsResponseBody;
633     }
634     /**
635      * Implementation response message. Gives series of text spans depending on the format ar.
636      */
637     interface EncodedSemanticClassificationsResponseBody {
638         endOfLineState: EndOfLineState;
639         spans: number[];
640     }
641     /**
642      * Arguments in document highlight request; include: filesToSearch, file,
643      * line, offset.
644      */
645     interface DocumentHighlightsRequestArgs extends FileLocationRequestArgs {
646         /**
647          * List of files to search for document highlights.
648          */
649         filesToSearch: string[];
650     }
651     /**
652      * Go to definition request; value of command field is
653      * "definition". Return response giving the file locations that
654      * define the symbol found in file at location line, col.
655      */
656     interface DefinitionRequest extends FileLocationRequest {
657         command: CommandTypes.Definition;
658     }
659     interface DefinitionAndBoundSpanRequest extends FileLocationRequest {
660         readonly command: CommandTypes.DefinitionAndBoundSpan;
661     }
662     interface DefinitionAndBoundSpanResponse extends Response {
663         readonly body: DefinitionInfoAndBoundSpan;
664     }
665     /**
666      * Go to type request; value of command field is
667      * "typeDefinition". Return response giving the file locations that
668      * define the type for the symbol found in file at location line, col.
669      */
670     interface TypeDefinitionRequest extends FileLocationRequest {
671         command: CommandTypes.TypeDefinition;
672     }
673     /**
674      * Go to implementation request; value of command field is
675      * "implementation". Return response giving the file locations that
676      * implement the symbol found in file at location line, col.
677      */
678     interface ImplementationRequest extends FileLocationRequest {
679         command: CommandTypes.Implementation;
680     }
681     /**
682      * Location in source code expressed as (one-based) line and (one-based) column offset.
683      */
684     interface Location {
685         line: number;
686         offset: number;
687     }
688     /**
689      * Object found in response messages defining a span of text in source code.
690      */
691     interface TextSpan {
692         /**
693          * First character of the definition.
694          */
695         start: Location;
696         /**
697          * One character past last character of the definition.
698          */
699         end: Location;
700     }
701     /**
702      * Object found in response messages defining a span of text in a specific source file.
703      */
704     interface FileSpan extends TextSpan {
705         /**
706          * File containing text span.
707          */
708         file: string;
709     }
710     interface TextSpanWithContext extends TextSpan {
711         contextStart?: Location;
712         contextEnd?: Location;
713     }
714     interface FileSpanWithContext extends FileSpan, TextSpanWithContext {
715     }
716     interface DefinitionInfoAndBoundSpan {
717         definitions: readonly FileSpanWithContext[];
718         textSpan: TextSpan;
719     }
720     /**
721      * Definition response message.  Gives text range for definition.
722      */
723     interface DefinitionResponse extends Response {
724         body?: FileSpanWithContext[];
725     }
726     interface DefinitionInfoAndBoundSpanResponse extends Response {
727         body?: DefinitionInfoAndBoundSpan;
728     }
729     /** @deprecated Use `DefinitionInfoAndBoundSpanResponse` instead. */
730     type DefinitionInfoAndBoundSpanReponse = DefinitionInfoAndBoundSpanResponse;
731     /**
732      * Definition response message.  Gives text range for definition.
733      */
734     interface TypeDefinitionResponse extends Response {
735         body?: FileSpanWithContext[];
736     }
737     /**
738      * Implementation response message.  Gives text range for implementations.
739      */
740     interface ImplementationResponse extends Response {
741         body?: FileSpanWithContext[];
742     }
743     /**
744      * Request to get brace completion for a location in the file.
745      */
746     interface BraceCompletionRequest extends FileLocationRequest {
747         command: CommandTypes.BraceCompletion;
748         arguments: BraceCompletionRequestArgs;
749     }
750     /**
751      * Argument for BraceCompletionRequest request.
752      */
753     interface BraceCompletionRequestArgs extends FileLocationRequestArgs {
754         /**
755          * Kind of opening brace
756          */
757         openingBrace: string;
758     }
759     interface JsxClosingTagRequest extends FileLocationRequest {
760         readonly command: CommandTypes.JsxClosingTag;
761         readonly arguments: JsxClosingTagRequestArgs;
762     }
763     interface JsxClosingTagRequestArgs extends FileLocationRequestArgs {
764     }
765     interface JsxClosingTagResponse extends Response {
766         readonly body: TextInsertion;
767     }
768     /**
769      * @deprecated
770      * Get occurrences request; value of command field is
771      * "occurrences". Return response giving spans that are relevant
772      * in the file at a given line and column.
773      */
774     interface OccurrencesRequest extends FileLocationRequest {
775         command: CommandTypes.Occurrences;
776     }
777     /** @deprecated */
778     interface OccurrencesResponseItem extends FileSpanWithContext {
779         /**
780          * True if the occurrence is a write location, false otherwise.
781          */
782         isWriteAccess: boolean;
783         /**
784          * True if the occurrence is in a string, undefined otherwise;
785          */
786         isInString?: true;
787     }
788     /** @deprecated */
789     interface OccurrencesResponse extends Response {
790         body?: OccurrencesResponseItem[];
791     }
792     /**
793      * Get document highlights request; value of command field is
794      * "documentHighlights". Return response giving spans that are relevant
795      * in the file at a given line and column.
796      */
797     interface DocumentHighlightsRequest extends FileLocationRequest {
798         command: CommandTypes.DocumentHighlights;
799         arguments: DocumentHighlightsRequestArgs;
800     }
801     /**
802      * Span augmented with extra information that denotes the kind of the highlighting to be used for span.
803      */
804     interface HighlightSpan extends TextSpanWithContext {
805         kind: HighlightSpanKind;
806     }
807     /**
808      * Represents a set of highligh spans for a give name
809      */
810     interface DocumentHighlightsItem {
811         /**
812          * File containing highlight spans.
813          */
814         file: string;
815         /**
816          * Spans to highlight in file.
817          */
818         highlightSpans: HighlightSpan[];
819     }
820     /**
821      * Response for a DocumentHighlightsRequest request.
822      */
823     interface DocumentHighlightsResponse extends Response {
824         body?: DocumentHighlightsItem[];
825     }
826     /**
827      * Find references request; value of command field is
828      * "references". Return response giving the file locations that
829      * reference the symbol found in file at location line, col.
830      */
831     interface ReferencesRequest extends FileLocationRequest {
832         command: CommandTypes.References;
833     }
834     interface ReferencesResponseItem extends FileSpanWithContext {
835         /** Text of line containing the reference.  Including this
836          *  with the response avoids latency of editor loading files
837          * to show text of reference line (the server already has
838          * loaded the referencing files).
839          */
840         lineText: string;
841         /**
842          * True if reference is a write location, false otherwise.
843          */
844         isWriteAccess: boolean;
845         /**
846          * True if reference is a definition, false otherwise.
847          */
848         isDefinition: boolean;
849     }
850     /**
851      * The body of a "references" response message.
852      */
853     interface ReferencesResponseBody {
854         /**
855          * The file locations referencing the symbol.
856          */
857         refs: readonly ReferencesResponseItem[];
858         /**
859          * The name of the symbol.
860          */
861         symbolName: string;
862         /**
863          * The start character offset of the symbol (on the line provided by the references request).
864          */
865         symbolStartOffset: number;
866         /**
867          * The full display name of the symbol.
868          */
869         symbolDisplayString: string;
870     }
871     /**
872      * Response to "references" request.
873      */
874     interface ReferencesResponse extends Response {
875         body?: ReferencesResponseBody;
876     }
877     interface FileReferencesRequest extends FileRequest {
878         command: CommandTypes.FileReferences;
879     }
880     interface FileReferencesResponseBody {
881         /**
882          * The file locations referencing the symbol.
883          */
884         refs: readonly ReferencesResponseItem[];
885         /**
886          * The name of the symbol.
887          */
888         symbolName: string;
889     }
890     interface FileReferencesResponse extends Response {
891         body?: FileReferencesResponseBody;
892     }
893     /**
894      * Argument for RenameRequest request.
895      */
896     interface RenameRequestArgs extends FileLocationRequestArgs {
897         /**
898          * Should text at specified location be found/changed in comments?
899          */
900         findInComments?: boolean;
901         /**
902          * Should text at specified location be found/changed in strings?
903          */
904         findInStrings?: boolean;
905     }
906     /**
907      * Rename request; value of command field is "rename". Return
908      * response giving the file locations that reference the symbol
909      * found in file at location line, col. Also return full display
910      * name of the symbol so that client can print it unambiguously.
911      */
912     interface RenameRequest extends FileLocationRequest {
913         command: CommandTypes.Rename;
914         arguments: RenameRequestArgs;
915     }
916     /**
917      * Information about the item to be renamed.
918      */
919     type RenameInfo = RenameInfoSuccess | RenameInfoFailure;
920     interface RenameInfoSuccess {
921         /**
922          * True if item can be renamed.
923          */
924         canRename: true;
925         /**
926          * File or directory to rename.
927          * If set, `getEditsForFileRename` should be called instead of `findRenameLocations`.
928          */
929         fileToRename?: string;
930         /**
931          * Display name of the item to be renamed.
932          */
933         displayName: string;
934         /**
935          * Full display name of item to be renamed.
936          */
937         fullDisplayName: string;
938         /**
939          * The items's kind (such as 'className' or 'parameterName' or plain 'text').
940          */
941         kind: ScriptElementKind;
942         /**
943          * Optional modifiers for the kind (such as 'public').
944          */
945         kindModifiers: string;
946         /** Span of text to rename. */
947         triggerSpan: TextSpan;
948     }
949     interface RenameInfoFailure {
950         canRename: false;
951         /**
952          * Error message if item can not be renamed.
953          */
954         localizedErrorMessage: string;
955     }
956     /**
957      *  A group of text spans, all in 'file'.
958      */
959     interface SpanGroup {
960         /** The file to which the spans apply */
961         file: string;
962         /** The text spans in this group */
963         locs: RenameTextSpan[];
964     }
965     interface RenameTextSpan extends TextSpanWithContext {
966         readonly prefixText?: string;
967         readonly suffixText?: string;
968     }
969     interface RenameResponseBody {
970         /**
971          * Information about the item to be renamed.
972          */
973         info: RenameInfo;
974         /**
975          * An array of span groups (one per file) that refer to the item to be renamed.
976          */
977         locs: readonly SpanGroup[];
978     }
979     /**
980      * Rename response message.
981      */
982     interface RenameResponse extends Response {
983         body?: RenameResponseBody;
984     }
985     /**
986      * Represents a file in external project.
987      * External project is project whose set of files, compilation options and open\close state
988      * is maintained by the client (i.e. if all this data come from .csproj file in Visual Studio).
989      * External project will exist even if all files in it are closed and should be closed explicitly.
990      * If external project includes one or more tsconfig.json/jsconfig.json files then tsserver will
991      * create configured project for every config file but will maintain a link that these projects were created
992      * as a result of opening external project so they should be removed once external project is closed.
993      */
994     interface ExternalFile {
995         /**
996          * Name of file file
997          */
998         fileName: string;
999         /**
1000          * Script kind of the file
1001          */
1002         scriptKind?: ScriptKindName | ts.ScriptKind;
1003         /**
1004          * Whether file has mixed content (i.e. .cshtml file that combines html markup with C#/JavaScript)
1005          */
1006         hasMixedContent?: boolean;
1007         /**
1008          * Content of the file
1009          */
1010         content?: string;
1011     }
1012     /**
1013      * Represent an external project
1014      */
1015     interface ExternalProject {
1016         /**
1017          * Project name
1018          */
1019         projectFileName: string;
1020         /**
1021          * List of root files in project
1022          */
1023         rootFiles: ExternalFile[];
1024         /**
1025          * Compiler options for the project
1026          */
1027         options: ExternalProjectCompilerOptions;
1028         /**
1029          * @deprecated typingOptions. Use typeAcquisition instead
1030          */
1031         typingOptions?: TypeAcquisition;
1032         /**
1033          * Explicitly specified type acquisition for the project
1034          */
1035         typeAcquisition?: TypeAcquisition;
1036     }
1037     interface CompileOnSaveMixin {
1038         /**
1039          * If compile on save is enabled for the project
1040          */
1041         compileOnSave?: boolean;
1042     }
1043     /**
1044      * For external projects, some of the project settings are sent together with
1045      * compiler settings.
1046      */
1047     type ExternalProjectCompilerOptions = CompilerOptions & CompileOnSaveMixin & WatchOptions;
1048     interface FileWithProjectReferenceRedirectInfo {
1049         /**
1050          * Name of file
1051          */
1052         fileName: string;
1053         /**
1054          * True if the file is primarily included in a referenced project
1055          */
1056         isSourceOfProjectReferenceRedirect: boolean;
1057     }
1058     /**
1059      * Represents a set of changes that happen in project
1060      */
1061     interface ProjectChanges {
1062         /**
1063          * List of added files
1064          */
1065         added: string[] | FileWithProjectReferenceRedirectInfo[];
1066         /**
1067          * List of removed files
1068          */
1069         removed: string[] | FileWithProjectReferenceRedirectInfo[];
1070         /**
1071          * List of updated files
1072          */
1073         updated: string[] | FileWithProjectReferenceRedirectInfo[];
1074         /**
1075          * List of files that have had their project reference redirect status updated
1076          * Only provided when the synchronizeProjectList request has includeProjectReferenceRedirectInfo set to true
1077          */
1078         updatedRedirects?: FileWithProjectReferenceRedirectInfo[];
1079     }
1080     /**
1081      * Information found in a configure request.
1082      */
1083     interface ConfigureRequestArguments {
1084         /**
1085          * Information about the host, for example 'Emacs 24.4' or
1086          * 'Sublime Text version 3075'
1087          */
1088         hostInfo?: string;
1089         /**
1090          * If present, tab settings apply only to this file.
1091          */
1092         file?: string;
1093         /**
1094          * The format options to use during formatting and other code editing features.
1095          */
1096         formatOptions?: FormatCodeSettings;
1097         preferences?: UserPreferences;
1098         /**
1099          * The host's additional supported .js file extensions
1100          */
1101         extraFileExtensions?: FileExtensionInfo[];
1102         watchOptions?: WatchOptions;
1103     }
1104     const enum WatchFileKind {
1105         FixedPollingInterval = "FixedPollingInterval",
1106         PriorityPollingInterval = "PriorityPollingInterval",
1107         DynamicPriorityPolling = "DynamicPriorityPolling",
1108         UseFsEvents = "UseFsEvents",
1109         UseFsEventsOnParentDirectory = "UseFsEventsOnParentDirectory"
1110     }
1111     const enum WatchDirectoryKind {
1112         UseFsEvents = "UseFsEvents",
1113         FixedPollingInterval = "FixedPollingInterval",
1114         DynamicPriorityPolling = "DynamicPriorityPolling"
1115     }
1116     const enum PollingWatchKind {
1117         FixedInterval = "FixedInterval",
1118         PriorityInterval = "PriorityInterval",
1119         DynamicPriority = "DynamicPriority"
1120     }
1121     interface WatchOptions {
1122         watchFile?: WatchFileKind | ts.WatchFileKind;
1123         watchDirectory?: WatchDirectoryKind | ts.WatchDirectoryKind;
1124         fallbackPolling?: PollingWatchKind | ts.PollingWatchKind;
1125         synchronousWatchDirectory?: boolean;
1126         excludeDirectories?: string[];
1127         excludeFiles?: string[];
1128         [option: string]: CompilerOptionsValue | undefined;
1129     }
1130     /**
1131      *  Configure request; value of command field is "configure".  Specifies
1132      *  host information, such as host type, tab size, and indent size.
1133      */
1134     interface ConfigureRequest extends Request {
1135         command: CommandTypes.Configure;
1136         arguments: ConfigureRequestArguments;
1137     }
1138     /**
1139      * Response to "configure" request.  This is just an acknowledgement, so
1140      * no body field is required.
1141      */
1142     interface ConfigureResponse extends Response {
1143     }
1144     interface ConfigurePluginRequestArguments {
1145         pluginName: string;
1146         configuration: any;
1147     }
1148     interface ConfigurePluginRequest extends Request {
1149         command: CommandTypes.ConfigurePlugin;
1150         arguments: ConfigurePluginRequestArguments;
1151     }
1152     interface ConfigurePluginResponse extends Response {
1153     }
1154     interface SelectionRangeRequest extends FileRequest {
1155         command: CommandTypes.SelectionRange;
1156         arguments: SelectionRangeRequestArgs;
1157     }
1158     interface SelectionRangeRequestArgs extends FileRequestArgs {
1159         locations: Location[];
1160     }
1161     interface SelectionRangeResponse extends Response {
1162         body?: SelectionRange[];
1163     }
1164     interface SelectionRange {
1165         textSpan: TextSpan;
1166         parent?: SelectionRange;
1167     }
1168     interface ToggleLineCommentRequest extends FileRequest {
1169         command: CommandTypes.ToggleLineComment;
1170         arguments: FileRangeRequestArgs;
1171     }
1172     interface ToggleMultilineCommentRequest extends FileRequest {
1173         command: CommandTypes.ToggleMultilineComment;
1174         arguments: FileRangeRequestArgs;
1175     }
1176     interface CommentSelectionRequest extends FileRequest {
1177         command: CommandTypes.CommentSelection;
1178         arguments: FileRangeRequestArgs;
1179     }
1180     interface UncommentSelectionRequest extends FileRequest {
1181         command: CommandTypes.UncommentSelection;
1182         arguments: FileRangeRequestArgs;
1183     }
1184     /**
1185      *  Information found in an "open" request.
1186      */
1187     interface OpenRequestArgs extends FileRequestArgs {
1188         /**
1189          * Used when a version of the file content is known to be more up to date than the one on disk.
1190          * Then the known content will be used upon opening instead of the disk copy
1191          */
1192         fileContent?: string;
1193         /**
1194          * Used to specify the script kind of the file explicitly. It could be one of the following:
1195          *      "TS", "JS", "TSX", "JSX"
1196          */
1197         scriptKindName?: ScriptKindName;
1198         /**
1199          * Used to limit the searching for project config file. If given the searching will stop at this
1200          * root path; otherwise it will go all the way up to the dist root path.
1201          */
1202         projectRootPath?: string;
1203     }
1204     type ScriptKindName = "TS" | "JS" | "TSX" | "JSX";
1205     /**
1206      * Open request; value of command field is "open". Notify the
1207      * server that the client has file open.  The server will not
1208      * monitor the filesystem for changes in this file and will assume
1209      * that the client is updating the server (using the change and/or
1210      * reload messages) when the file changes. Server does not currently
1211      * send a response to an open request.
1212      */
1213     interface OpenRequest extends Request {
1214         command: CommandTypes.Open;
1215         arguments: OpenRequestArgs;
1216     }
1217     /**
1218      * Request to open or update external project
1219      */
1220     interface OpenExternalProjectRequest extends Request {
1221         command: CommandTypes.OpenExternalProject;
1222         arguments: OpenExternalProjectArgs;
1223     }
1224     /**
1225      * Arguments to OpenExternalProjectRequest request
1226      */
1227     type OpenExternalProjectArgs = ExternalProject;
1228     /**
1229      * Request to open multiple external projects
1230      */
1231     interface OpenExternalProjectsRequest extends Request {
1232         command: CommandTypes.OpenExternalProjects;
1233         arguments: OpenExternalProjectsArgs;
1234     }
1235     /**
1236      * Arguments to OpenExternalProjectsRequest
1237      */
1238     interface OpenExternalProjectsArgs {
1239         /**
1240          * List of external projects to open or update
1241          */
1242         projects: ExternalProject[];
1243     }
1244     /**
1245      * Response to OpenExternalProjectRequest request. This is just an acknowledgement, so
1246      * no body field is required.
1247      */
1248     interface OpenExternalProjectResponse extends Response {
1249     }
1250     /**
1251      * Response to OpenExternalProjectsRequest request. This is just an acknowledgement, so
1252      * no body field is required.
1253      */
1254     interface OpenExternalProjectsResponse extends Response {
1255     }
1256     /**
1257      * Request to close external project.
1258      */
1259     interface CloseExternalProjectRequest extends Request {
1260         command: CommandTypes.CloseExternalProject;
1261         arguments: CloseExternalProjectRequestArgs;
1262     }
1263     /**
1264      * Arguments to CloseExternalProjectRequest request
1265      */
1266     interface CloseExternalProjectRequestArgs {
1267         /**
1268          * Name of the project to close
1269          */
1270         projectFileName: string;
1271     }
1272     /**
1273      * Response to CloseExternalProjectRequest request. This is just an acknowledgement, so
1274      * no body field is required.
1275      */
1276     interface CloseExternalProjectResponse extends Response {
1277     }
1278     /**
1279      * Request to synchronize list of open files with the client
1280      */
1281     interface UpdateOpenRequest extends Request {
1282         command: CommandTypes.UpdateOpen;
1283         arguments: UpdateOpenRequestArgs;
1284     }
1285     /**
1286      * Arguments to UpdateOpenRequest
1287      */
1288     interface UpdateOpenRequestArgs {
1289         /**
1290          * List of newly open files
1291          */
1292         openFiles?: OpenRequestArgs[];
1293         /**
1294          * List of open files files that were changes
1295          */
1296         changedFiles?: FileCodeEdits[];
1297         /**
1298          * List of files that were closed
1299          */
1300         closedFiles?: string[];
1301     }
1302     /**
1303      * External projects have a typeAcquisition option so they need to be added separately to compiler options for inferred projects.
1304      */
1305     type InferredProjectCompilerOptions = ExternalProjectCompilerOptions & TypeAcquisition;
1306     /**
1307      * Request to set compiler options for inferred projects.
1308      * External projects are opened / closed explicitly.
1309      * Configured projects are opened when user opens loose file that has 'tsconfig.json' or 'jsconfig.json' anywhere in one of containing folders.
1310      * This configuration file will be used to obtain a list of files and configuration settings for the project.
1311      * Inferred projects are created when user opens a loose file that is not the part of external project
1312      * or configured project and will contain only open file and transitive closure of referenced files if 'useOneInferredProject' is false,
1313      * or all open loose files and its transitive closure of referenced files if 'useOneInferredProject' is true.
1314      */
1315     interface SetCompilerOptionsForInferredProjectsRequest extends Request {
1316         command: CommandTypes.CompilerOptionsForInferredProjects;
1317         arguments: SetCompilerOptionsForInferredProjectsArgs;
1318     }
1319     /**
1320      * Argument for SetCompilerOptionsForInferredProjectsRequest request.
1321      */
1322     interface SetCompilerOptionsForInferredProjectsArgs {
1323         /**
1324          * Compiler options to be used with inferred projects.
1325          */
1326         options: InferredProjectCompilerOptions;
1327         /**
1328          * Specifies the project root path used to scope compiler options.
1329          * It is an error to provide this property if the server has not been started with
1330          * `useInferredProjectPerProjectRoot` enabled.
1331          */
1332         projectRootPath?: string;
1333     }
1334     /**
1335      * Response to SetCompilerOptionsForInferredProjectsResponse request. This is just an acknowledgement, so
1336      * no body field is required.
1337      */
1338     interface SetCompilerOptionsForInferredProjectsResponse extends Response {
1339     }
1340     /**
1341      *  Exit request; value of command field is "exit".  Ask the server process
1342      *  to exit.
1343      */
1344     interface ExitRequest extends Request {
1345         command: CommandTypes.Exit;
1346     }
1347     /**
1348      * Close request; value of command field is "close". Notify the
1349      * server that the client has closed a previously open file.  If
1350      * file is still referenced by open files, the server will resume
1351      * monitoring the filesystem for changes to file.  Server does not
1352      * currently send a response to a close request.
1353      */
1354     interface CloseRequest extends FileRequest {
1355         command: CommandTypes.Close;
1356     }
1357     /**
1358      * Request to obtain the list of files that should be regenerated if target file is recompiled.
1359      * NOTE: this us query-only operation and does not generate any output on disk.
1360      */
1361     interface CompileOnSaveAffectedFileListRequest extends FileRequest {
1362         command: CommandTypes.CompileOnSaveAffectedFileList;
1363     }
1364     /**
1365      * Contains a list of files that should be regenerated in a project
1366      */
1367     interface CompileOnSaveAffectedFileListSingleProject {
1368         /**
1369          * Project name
1370          */
1371         projectFileName: string;
1372         /**
1373          * List of files names that should be recompiled
1374          */
1375         fileNames: string[];
1376         /**
1377          * true if project uses outFile or out compiler option
1378          */
1379         projectUsesOutFile: boolean;
1380     }
1381     /**
1382      * Response for CompileOnSaveAffectedFileListRequest request;
1383      */
1384     interface CompileOnSaveAffectedFileListResponse extends Response {
1385         body: CompileOnSaveAffectedFileListSingleProject[];
1386     }
1387     /**
1388      * Request to recompile the file. All generated outputs (.js, .d.ts or .js.map files) is written on disk.
1389      */
1390     interface CompileOnSaveEmitFileRequest extends FileRequest {
1391         command: CommandTypes.CompileOnSaveEmitFile;
1392         arguments: CompileOnSaveEmitFileRequestArgs;
1393     }
1394     /**
1395      * Arguments for CompileOnSaveEmitFileRequest
1396      */
1397     interface CompileOnSaveEmitFileRequestArgs extends FileRequestArgs {
1398         /**
1399          * if true - then file should be recompiled even if it does not have any changes.
1400          */
1401         forced?: boolean;
1402         includeLinePosition?: boolean;
1403         /** if true - return response as object with emitSkipped and diagnostics */
1404         richResponse?: boolean;
1405     }
1406     interface CompileOnSaveEmitFileResponse extends Response {
1407         body: boolean | EmitResult;
1408     }
1409     interface EmitResult {
1410         emitSkipped: boolean;
1411         diagnostics: Diagnostic[] | DiagnosticWithLinePosition[];
1412     }
1413     /**
1414      * Quickinfo request; value of command field is
1415      * "quickinfo". Return response giving a quick type and
1416      * documentation string for the symbol found in file at location
1417      * line, col.
1418      */
1419     interface QuickInfoRequest extends FileLocationRequest {
1420         command: CommandTypes.Quickinfo;
1421     }
1422     /**
1423      * Body of QuickInfoResponse.
1424      */
1425     interface QuickInfoResponseBody {
1426         /**
1427          * The symbol's kind (such as 'className' or 'parameterName' or plain 'text').
1428          */
1429         kind: ScriptElementKind;
1430         /**
1431          * Optional modifiers for the kind (such as 'public').
1432          */
1433         kindModifiers: string;
1434         /**
1435          * Starting file location of symbol.
1436          */
1437         start: Location;
1438         /**
1439          * One past last character of symbol.
1440          */
1441         end: Location;
1442         /**
1443          * Type and kind of symbol.
1444          */
1445         displayString: string;
1446         /**
1447          * Documentation associated with symbol.
1448          */
1449         documentation: string;
1450         /**
1451          * JSDoc tags associated with symbol.
1452          */
1453         tags: JSDocTagInfo[];
1454     }
1455     /**
1456      * Quickinfo response message.
1457      */
1458     interface QuickInfoResponse extends Response {
1459         body?: QuickInfoResponseBody;
1460     }
1461     /**
1462      * Arguments for format messages.
1463      */
1464     interface FormatRequestArgs extends FileLocationRequestArgs {
1465         /**
1466          * Last line of range for which to format text in file.
1467          */
1468         endLine: number;
1469         /**
1470          * Character offset on last line of range for which to format text in file.
1471          */
1472         endOffset: number;
1473         /**
1474          * Format options to be used.
1475          */
1476         options?: FormatCodeSettings;
1477     }
1478     /**
1479      * Format request; value of command field is "format".  Return
1480      * response giving zero or more edit instructions.  The edit
1481      * instructions will be sorted in file order.  Applying the edit
1482      * instructions in reverse to file will result in correctly
1483      * reformatted text.
1484      */
1485     interface FormatRequest extends FileLocationRequest {
1486         command: CommandTypes.Format;
1487         arguments: FormatRequestArgs;
1488     }
1489     /**
1490      * Object found in response messages defining an editing
1491      * instruction for a span of text in source code.  The effect of
1492      * this instruction is to replace the text starting at start and
1493      * ending one character before end with newText. For an insertion,
1494      * the text span is empty.  For a deletion, newText is empty.
1495      */
1496     interface CodeEdit {
1497         /**
1498          * First character of the text span to edit.
1499          */
1500         start: Location;
1501         /**
1502          * One character past last character of the text span to edit.
1503          */
1504         end: Location;
1505         /**
1506          * Replace the span defined above with this string (may be
1507          * the empty string).
1508          */
1509         newText: string;
1510     }
1511     interface FileCodeEdits {
1512         fileName: string;
1513         textChanges: CodeEdit[];
1514     }
1515     interface CodeFixResponse extends Response {
1516         /** The code actions that are available */
1517         body?: CodeFixAction[];
1518     }
1519     interface CodeAction {
1520         /** Description of the code action to display in the UI of the editor */
1521         description: string;
1522         /** Text changes to apply to each file as part of the code action */
1523         changes: FileCodeEdits[];
1524         /** A command is an opaque object that should be passed to `ApplyCodeActionCommandRequestArgs` without modification.  */
1525         commands?: {}[];
1526     }
1527     interface CombinedCodeActions {
1528         changes: readonly FileCodeEdits[];
1529         commands?: readonly {}[];
1530     }
1531     interface CodeFixAction extends CodeAction {
1532         /** Short name to identify the fix, for use by telemetry. */
1533         fixName: string;
1534         /**
1535          * If present, one may call 'getCombinedCodeFix' with this fixId.
1536          * This may be omitted to indicate that the code fix can't be applied in a group.
1537          */
1538         fixId?: {};
1539         /** Should be present if and only if 'fixId' is. */
1540         fixAllDescription?: string;
1541     }
1542     /**
1543      * Format and format on key response message.
1544      */
1545     interface FormatResponse extends Response {
1546         body?: CodeEdit[];
1547     }
1548     /**
1549      * Arguments for format on key messages.
1550      */
1551     interface FormatOnKeyRequestArgs extends FileLocationRequestArgs {
1552         /**
1553          * Key pressed (';', '\n', or '}').
1554          */
1555         key: string;
1556         options?: FormatCodeSettings;
1557     }
1558     /**
1559      * Format on key request; value of command field is
1560      * "formatonkey". Given file location and key typed (as string),
1561      * return response giving zero or more edit instructions.  The
1562      * edit instructions will be sorted in file order.  Applying the
1563      * edit instructions in reverse to file will result in correctly
1564      * reformatted text.
1565      */
1566     interface FormatOnKeyRequest extends FileLocationRequest {
1567         command: CommandTypes.Formatonkey;
1568         arguments: FormatOnKeyRequestArgs;
1569     }
1570     type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#";
1571     /**
1572      * Arguments for completions messages.
1573      */
1574     interface CompletionsRequestArgs extends FileLocationRequestArgs {
1575         /**
1576          * Optional prefix to apply to possible completions.
1577          */
1578         prefix?: string;
1579         /**
1580          * Character that was responsible for triggering completion.
1581          * Should be `undefined` if a user manually requested completion.
1582          */
1583         triggerCharacter?: CompletionsTriggerCharacter;
1584         /**
1585          * @deprecated Use UserPreferences.includeCompletionsForModuleExports
1586          */
1587         includeExternalModuleExports?: boolean;
1588         /**
1589          * @deprecated Use UserPreferences.includeCompletionsWithInsertText
1590          */
1591         includeInsertTextCompletions?: boolean;
1592     }
1593     /**
1594      * Completions request; value of command field is "completions".
1595      * Given a file location (file, line, col) and a prefix (which may
1596      * be the empty string), return the possible completions that
1597      * begin with prefix.
1598      */
1599     interface CompletionsRequest extends FileLocationRequest {
1600         command: CommandTypes.Completions | CommandTypes.CompletionInfo;
1601         arguments: CompletionsRequestArgs;
1602     }
1603     /**
1604      * Arguments for completion details request.
1605      */
1606     interface CompletionDetailsRequestArgs extends FileLocationRequestArgs {
1607         /**
1608          * Names of one or more entries for which to obtain details.
1609          */
1610         entryNames: (string | CompletionEntryIdentifier)[];
1611     }
1612     interface CompletionEntryIdentifier {
1613         name: string;
1614         source?: string;
1615     }
1616     /**
1617      * Completion entry details request; value of command field is
1618      * "completionEntryDetails".  Given a file location (file, line,
1619      * col) and an array of completion entry names return more
1620      * detailed information for each completion entry.
1621      */
1622     interface CompletionDetailsRequest extends FileLocationRequest {
1623         command: CommandTypes.CompletionDetails;
1624         arguments: CompletionDetailsRequestArgs;
1625     }
1626     /**
1627      * Part of a symbol description.
1628      */
1629     interface SymbolDisplayPart {
1630         /**
1631          * Text of an item describing the symbol.
1632          */
1633         text: string;
1634         /**
1635          * The symbol's kind (such as 'className' or 'parameterName' or plain 'text').
1636          */
1637         kind: string;
1638     }
1639     /**
1640      * An item found in a completion response.
1641      */
1642     interface CompletionEntry {
1643         /**
1644          * The symbol's name.
1645          */
1646         name: string;
1647         /**
1648          * The symbol's kind (such as 'className' or 'parameterName').
1649          */
1650         kind: ScriptElementKind;
1651         /**
1652          * Optional modifiers for the kind (such as 'public').
1653          */
1654         kindModifiers?: string;
1655         /**
1656          * A string that is used for comparing completion items so that they can be ordered.  This
1657          * is often the same as the name but may be different in certain circumstances.
1658          */
1659         sortText: string;
1660         /**
1661          * Text to insert instead of `name`.
1662          * This is used to support bracketed completions; If `name` might be "a-b" but `insertText` would be `["a-b"]`,
1663          * coupled with `replacementSpan` to replace a dotted access with a bracket access.
1664          */
1665         insertText?: string;
1666         /**
1667          * An optional span that indicates the text to be replaced by this completion item.
1668          * If present, this span should be used instead of the default one.
1669          * It will be set if the required span differs from the one generated by the default replacement behavior.
1670          */
1671         replacementSpan?: TextSpan;
1672         /**
1673          * Indicates whether commiting this completion entry will require additional code actions to be
1674          * made to avoid errors. The CompletionEntryDetails will have these actions.
1675          */
1676         hasAction?: true;
1677         /**
1678          * Identifier (not necessarily human-readable) identifying where this completion came from.
1679          */
1680         source?: string;
1681         /**
1682          * If true, this completion should be highlighted as recommended. There will only be one of these.
1683          * This will be set when we know the user should write an expression with a certain type and that type is an enum or constructable class.
1684          * Then either that enum/class or a namespace containing it will be the recommended symbol.
1685          */
1686         isRecommended?: true;
1687         /**
1688          * If true, this completion was generated from traversing the name table of an unchecked JS file,
1689          * and therefore may not be accurate.
1690          */
1691         isFromUncheckedFile?: true;
1692         /**
1693          * If true, this completion was for an auto-import of a module not yet in the program, but listed
1694          * in the project package.json.
1695          */
1696         isPackageJsonImport?: true;
1697     }
1698     /**
1699      * Additional completion entry details, available on demand
1700      */
1701     interface CompletionEntryDetails {
1702         /**
1703          * The symbol's name.
1704          */
1705         name: string;
1706         /**
1707          * The symbol's kind (such as 'className' or 'parameterName').
1708          */
1709         kind: ScriptElementKind;
1710         /**
1711          * Optional modifiers for the kind (such as 'public').
1712          */
1713         kindModifiers: string;
1714         /**
1715          * Display parts of the symbol (similar to quick info).
1716          */
1717         displayParts: SymbolDisplayPart[];
1718         /**
1719          * Documentation strings for the symbol.
1720          */
1721         documentation?: SymbolDisplayPart[];
1722         /**
1723          * JSDoc tags for the symbol.
1724          */
1725         tags?: JSDocTagInfo[];
1726         /**
1727          * The associated code actions for this entry
1728          */
1729         codeActions?: CodeAction[];
1730         /**
1731          * Human-readable description of the `source` from the CompletionEntry.
1732          */
1733         source?: SymbolDisplayPart[];
1734     }
1735     /** @deprecated Prefer CompletionInfoResponse, which supports several top-level fields in addition to the array of entries. */
1736     interface CompletionsResponse extends Response {
1737         body?: CompletionEntry[];
1738     }
1739     interface CompletionInfoResponse extends Response {
1740         body?: CompletionInfo;
1741     }
1742     interface CompletionInfo {
1743         readonly isGlobalCompletion: boolean;
1744         readonly isMemberCompletion: boolean;
1745         readonly isNewIdentifierLocation: boolean;
1746         /**
1747          * In the absence of `CompletionEntry["replacementSpan"]`, the editor may choose whether to use
1748          * this span or its default one. If `CompletionEntry["replacementSpan"]` is defined, that span
1749          * must be used to commit that completion entry.
1750          */
1751         readonly optionalReplacementSpan?: TextSpan;
1752         readonly entries: readonly CompletionEntry[];
1753     }
1754     interface CompletionDetailsResponse extends Response {
1755         body?: CompletionEntryDetails[];
1756     }
1757     /**
1758      * Signature help information for a single parameter
1759      */
1760     interface SignatureHelpParameter {
1761         /**
1762          * The parameter's name
1763          */
1764         name: string;
1765         /**
1766          * Documentation of the parameter.
1767          */
1768         documentation: SymbolDisplayPart[];
1769         /**
1770          * Display parts of the parameter.
1771          */
1772         displayParts: SymbolDisplayPart[];
1773         /**
1774          * Whether the parameter is optional or not.
1775          */
1776         isOptional: boolean;
1777     }
1778     /**
1779      * Represents a single signature to show in signature help.
1780      */
1781     interface SignatureHelpItem {
1782         /**
1783          * Whether the signature accepts a variable number of arguments.
1784          */
1785         isVariadic: boolean;
1786         /**
1787          * The prefix display parts.
1788          */
1789         prefixDisplayParts: SymbolDisplayPart[];
1790         /**
1791          * The suffix display parts.
1792          */
1793         suffixDisplayParts: SymbolDisplayPart[];
1794         /**
1795          * The separator display parts.
1796          */
1797         separatorDisplayParts: SymbolDisplayPart[];
1798         /**
1799          * The signature helps items for the parameters.
1800          */
1801         parameters: SignatureHelpParameter[];
1802         /**
1803          * The signature's documentation
1804          */
1805         documentation: SymbolDisplayPart[];
1806         /**
1807          * The signature's JSDoc tags
1808          */
1809         tags: JSDocTagInfo[];
1810     }
1811     /**
1812      * Signature help items found in the response of a signature help request.
1813      */
1814     interface SignatureHelpItems {
1815         /**
1816          * The signature help items.
1817          */
1818         items: SignatureHelpItem[];
1819         /**
1820          * The span for which signature help should appear on a signature
1821          */
1822         applicableSpan: TextSpan;
1823         /**
1824          * The item selected in the set of available help items.
1825          */
1826         selectedItemIndex: number;
1827         /**
1828          * The argument selected in the set of parameters.
1829          */
1830         argumentIndex: number;
1831         /**
1832          * The argument count
1833          */
1834         argumentCount: number;
1835     }
1836     type SignatureHelpTriggerCharacter = "," | "(" | "<";
1837     type SignatureHelpRetriggerCharacter = SignatureHelpTriggerCharacter | ")";
1838     /**
1839      * Arguments of a signature help request.
1840      */
1841     interface SignatureHelpRequestArgs extends FileLocationRequestArgs {
1842         /**
1843          * Reason why signature help was invoked.
1844          * See each individual possible
1845          */
1846         triggerReason?: SignatureHelpTriggerReason;
1847     }
1848     type SignatureHelpTriggerReason = SignatureHelpInvokedReason | SignatureHelpCharacterTypedReason | SignatureHelpRetriggeredReason;
1849     /**
1850      * Signals that the user manually requested signature help.
1851      * The language service will unconditionally attempt to provide a result.
1852      */
1853     interface SignatureHelpInvokedReason {
1854         kind: "invoked";
1855         triggerCharacter?: undefined;
1856     }
1857     /**
1858      * Signals that the signature help request came from a user typing a character.
1859      * Depending on the character and the syntactic context, the request may or may not be served a result.
1860      */
1861     interface SignatureHelpCharacterTypedReason {
1862         kind: "characterTyped";
1863         /**
1864          * Character that was responsible for triggering signature help.
1865          */
1866         triggerCharacter: SignatureHelpTriggerCharacter;
1867     }
1868     /**
1869      * Signals that this signature help request came from typing a character or moving the cursor.
1870      * This should only occur if a signature help session was already active and the editor needs to see if it should adjust.
1871      * The language service will unconditionally attempt to provide a result.
1872      * `triggerCharacter` can be `undefined` for a retrigger caused by a cursor move.
1873      */
1874     interface SignatureHelpRetriggeredReason {
1875         kind: "retrigger";
1876         /**
1877          * Character that was responsible for triggering signature help.
1878          */
1879         triggerCharacter?: SignatureHelpRetriggerCharacter;
1880     }
1881     /**
1882      * Signature help request; value of command field is "signatureHelp".
1883      * Given a file location (file, line, col), return the signature
1884      * help.
1885      */
1886     interface SignatureHelpRequest extends FileLocationRequest {
1887         command: CommandTypes.SignatureHelp;
1888         arguments: SignatureHelpRequestArgs;
1889     }
1890     /**
1891      * Response object for a SignatureHelpRequest.
1892      */
1893     interface SignatureHelpResponse extends Response {
1894         body?: SignatureHelpItems;
1895     }
1896     /**
1897      * Synchronous request for semantic diagnostics of one file.
1898      */
1899     interface SemanticDiagnosticsSyncRequest extends FileRequest {
1900         command: CommandTypes.SemanticDiagnosticsSync;
1901         arguments: SemanticDiagnosticsSyncRequestArgs;
1902     }
1903     interface SemanticDiagnosticsSyncRequestArgs extends FileRequestArgs {
1904         includeLinePosition?: boolean;
1905     }
1906     /**
1907      * Response object for synchronous sematic diagnostics request.
1908      */
1909     interface SemanticDiagnosticsSyncResponse extends Response {
1910         body?: Diagnostic[] | DiagnosticWithLinePosition[];
1911     }
1912     interface SuggestionDiagnosticsSyncRequest extends FileRequest {
1913         command: CommandTypes.SuggestionDiagnosticsSync;
1914         arguments: SuggestionDiagnosticsSyncRequestArgs;
1915     }
1916     type SuggestionDiagnosticsSyncRequestArgs = SemanticDiagnosticsSyncRequestArgs;
1917     type SuggestionDiagnosticsSyncResponse = SemanticDiagnosticsSyncResponse;
1918     /**
1919      * Synchronous request for syntactic diagnostics of one file.
1920      */
1921     interface SyntacticDiagnosticsSyncRequest extends FileRequest {
1922         command: CommandTypes.SyntacticDiagnosticsSync;
1923         arguments: SyntacticDiagnosticsSyncRequestArgs;
1924     }
1925     interface SyntacticDiagnosticsSyncRequestArgs extends FileRequestArgs {
1926         includeLinePosition?: boolean;
1927     }
1928     /**
1929      * Response object for synchronous syntactic diagnostics request.
1930      */
1931     interface SyntacticDiagnosticsSyncResponse extends Response {
1932         body?: Diagnostic[] | DiagnosticWithLinePosition[];
1933     }
1934     /**
1935      * Arguments for GeterrForProject request.
1936      */
1937     interface GeterrForProjectRequestArgs {
1938         /**
1939          * the file requesting project error list
1940          */
1941         file: string;
1942         /**
1943          * Delay in milliseconds to wait before starting to compute
1944          * errors for the files in the file list
1945          */
1946         delay: number;
1947     }
1948     /**
1949      * GeterrForProjectRequest request; value of command field is
1950      * "geterrForProject". It works similarly with 'Geterr', only
1951      * it request for every file in this project.
1952      */
1953     interface GeterrForProjectRequest extends Request {
1954         command: CommandTypes.GeterrForProject;
1955         arguments: GeterrForProjectRequestArgs;
1956     }
1957     /**
1958      * Arguments for geterr messages.
1959      */
1960     interface GeterrRequestArgs {
1961         /**
1962          * List of file names for which to compute compiler errors.
1963          * The files will be checked in list order.
1964          */
1965         files: string[];
1966         /**
1967          * Delay in milliseconds to wait before starting to compute
1968          * errors for the files in the file list
1969          */
1970         delay: number;
1971     }
1972     /**
1973      * Geterr request; value of command field is "geterr". Wait for
1974      * delay milliseconds and then, if during the wait no change or
1975      * reload messages have arrived for the first file in the files
1976      * list, get the syntactic errors for the file, field requests,
1977      * and then get the semantic errors for the file.  Repeat with a
1978      * smaller delay for each subsequent file on the files list.  Best
1979      * practice for an editor is to send a file list containing each
1980      * file that is currently visible, in most-recently-used order.
1981      */
1982     interface GeterrRequest extends Request {
1983         command: CommandTypes.Geterr;
1984         arguments: GeterrRequestArgs;
1985     }
1986     type RequestCompletedEventName = "requestCompleted";
1987     /**
1988      * Event that is sent when server have finished processing request with specified id.
1989      */
1990     interface RequestCompletedEvent extends Event {
1991         event: RequestCompletedEventName;
1992         body: RequestCompletedEventBody;
1993     }
1994     interface RequestCompletedEventBody {
1995         request_seq: number;
1996     }
1997     /**
1998      * Item of diagnostic information found in a DiagnosticEvent message.
1999      */
2000     interface Diagnostic {
2001         /**
2002          * Starting file location at which text applies.
2003          */
2004         start: Location;
2005         /**
2006          * The last file location at which the text applies.
2007          */
2008         end: Location;
2009         /**
2010          * Text of diagnostic message.
2011          */
2012         text: string;
2013         /**
2014          * The category of the diagnostic message, e.g. "error", "warning", or "suggestion".
2015          */
2016         category: string;
2017         reportsUnnecessary?: {};
2018         reportsDeprecated?: {};
2019         /**
2020          * Any related spans the diagnostic may have, such as other locations relevant to an error, such as declarartion sites
2021          */
2022         relatedInformation?: DiagnosticRelatedInformation[];
2023         /**
2024          * The error code of the diagnostic message.
2025          */
2026         code?: number;
2027         /**
2028          * The name of the plugin reporting the message.
2029          */
2030         source?: string;
2031     }
2032     interface DiagnosticWithFileName extends Diagnostic {
2033         /**
2034          * Name of the file the diagnostic is in
2035          */
2036         fileName: string;
2037     }
2038     /**
2039      * Represents additional spans returned with a diagnostic which are relevant to it
2040      */
2041     interface DiagnosticRelatedInformation {
2042         /**
2043          * The category of the related information message, e.g. "error", "warning", or "suggestion".
2044          */
2045         category: string;
2046         /**
2047          * The code used ot identify the related information
2048          */
2049         code: number;
2050         /**
2051          * Text of related or additional information.
2052          */
2053         message: string;
2054         /**
2055          * Associated location
2056          */
2057         span?: FileSpan;
2058     }
2059     interface DiagnosticEventBody {
2060         /**
2061          * The file for which diagnostic information is reported.
2062          */
2063         file: string;
2064         /**
2065          * An array of diagnostic information items.
2066          */
2067         diagnostics: Diagnostic[];
2068     }
2069     type DiagnosticEventKind = "semanticDiag" | "syntaxDiag" | "suggestionDiag";
2070     /**
2071      * Event message for DiagnosticEventKind event types.
2072      * These events provide syntactic and semantic errors for a file.
2073      */
2074     interface DiagnosticEvent extends Event {
2075         body?: DiagnosticEventBody;
2076         event: DiagnosticEventKind;
2077     }
2078     interface ConfigFileDiagnosticEventBody {
2079         /**
2080          * The file which trigged the searching and error-checking of the config file
2081          */
2082         triggerFile: string;
2083         /**
2084          * The name of the found config file.
2085          */
2086         configFile: string;
2087         /**
2088          * An arry of diagnostic information items for the found config file.
2089          */
2090         diagnostics: DiagnosticWithFileName[];
2091     }
2092     /**
2093      * Event message for "configFileDiag" event type.
2094      * This event provides errors for a found config file.
2095      */
2096     interface ConfigFileDiagnosticEvent extends Event {
2097         body?: ConfigFileDiagnosticEventBody;
2098         event: "configFileDiag";
2099     }
2100     type ProjectLanguageServiceStateEventName = "projectLanguageServiceState";
2101     interface ProjectLanguageServiceStateEvent extends Event {
2102         event: ProjectLanguageServiceStateEventName;
2103         body?: ProjectLanguageServiceStateEventBody;
2104     }
2105     interface ProjectLanguageServiceStateEventBody {
2106         /**
2107          * Project name that has changes in the state of language service.
2108          * For configured projects this will be the config file path.
2109          * For external projects this will be the name of the projects specified when project was open.
2110          * For inferred projects this event is not raised.
2111          */
2112         projectName: string;
2113         /**
2114          * True if language service state switched from disabled to enabled
2115          * and false otherwise.
2116          */
2117         languageServiceEnabled: boolean;
2118     }
2119     type ProjectsUpdatedInBackgroundEventName = "projectsUpdatedInBackground";
2120     interface ProjectsUpdatedInBackgroundEvent extends Event {
2121         event: ProjectsUpdatedInBackgroundEventName;
2122         body: ProjectsUpdatedInBackgroundEventBody;
2123     }
2124     interface ProjectsUpdatedInBackgroundEventBody {
2125         /**
2126          * Current set of open files
2127          */
2128         openFiles: string[];
2129     }
2130     type ProjectLoadingStartEventName = "projectLoadingStart";
2131     interface ProjectLoadingStartEvent extends Event {
2132         event: ProjectLoadingStartEventName;
2133         body: ProjectLoadingStartEventBody;
2134     }
2135     interface ProjectLoadingStartEventBody {
2136         /** name of the project */
2137         projectName: string;
2138         /** reason for loading */
2139         reason: string;
2140     }
2141     type ProjectLoadingFinishEventName = "projectLoadingFinish";
2142     interface ProjectLoadingFinishEvent extends Event {
2143         event: ProjectLoadingFinishEventName;
2144         body: ProjectLoadingFinishEventBody;
2145     }
2146     interface ProjectLoadingFinishEventBody {
2147         /** name of the project */
2148         projectName: string;
2149     }
2150     type SurveyReadyEventName = "surveyReady";
2151     interface SurveyReadyEvent extends Event {
2152         event: SurveyReadyEventName;
2153         body: SurveyReadyEventBody;
2154     }
2155     interface SurveyReadyEventBody {
2156         /** Name of the survey. This is an internal machine- and programmer-friendly name */
2157         surveyId: string;
2158     }
2159     type LargeFileReferencedEventName = "largeFileReferenced";
2160     interface LargeFileReferencedEvent extends Event {
2161         event: LargeFileReferencedEventName;
2162         body: LargeFileReferencedEventBody;
2163     }
2164     interface LargeFileReferencedEventBody {
2165         /**
2166          * name of the large file being loaded
2167          */
2168         file: string;
2169         /**
2170          * size of the file
2171          */
2172         fileSize: number;
2173         /**
2174          * max file size allowed on the server
2175          */
2176         maxFileSize: number;
2177     }
2178     /**
2179      * Arguments for reload request.
2180      */
2181     interface ReloadRequestArgs extends FileRequestArgs {
2182         /**
2183          * Name of temporary file from which to reload file
2184          * contents. May be same as file.
2185          */
2186         tmpfile: string;
2187     }
2188     /**
2189      * Reload request message; value of command field is "reload".
2190      * Reload contents of file with name given by the 'file' argument
2191      * from temporary file with name given by the 'tmpfile' argument.
2192      * The two names can be identical.
2193      */
2194     interface ReloadRequest extends FileRequest {
2195         command: CommandTypes.Reload;
2196         arguments: ReloadRequestArgs;
2197     }
2198     /**
2199      * Response to "reload" request. This is just an acknowledgement, so
2200      * no body field is required.
2201      */
2202     interface ReloadResponse extends Response {
2203     }
2204     /**
2205      * Arguments for saveto request.
2206      */
2207     interface SavetoRequestArgs extends FileRequestArgs {
2208         /**
2209          * Name of temporary file into which to save server's view of
2210          * file contents.
2211          */
2212         tmpfile: string;
2213     }
2214     /**
2215      * Saveto request message; value of command field is "saveto".
2216      * For debugging purposes, save to a temporaryfile (named by
2217      * argument 'tmpfile') the contents of file named by argument
2218      * 'file'.  The server does not currently send a response to a
2219      * "saveto" request.
2220      */
2221     interface SavetoRequest extends FileRequest {
2222         command: CommandTypes.Saveto;
2223         arguments: SavetoRequestArgs;
2224     }
2225     /**
2226      * Arguments for navto request message.
2227      */
2228     interface NavtoRequestArgs {
2229         /**
2230          * Search term to navigate to from current location; term can
2231          * be '.*' or an identifier prefix.
2232          */
2233         searchValue: string;
2234         /**
2235          *  Optional limit on the number of items to return.
2236          */
2237         maxResultCount?: number;
2238         /**
2239          * The file for the request (absolute pathname required).
2240          */
2241         file?: string;
2242         /**
2243          * Optional flag to indicate we want results for just the current file
2244          * or the entire project.
2245          */
2246         currentFileOnly?: boolean;
2247         projectFileName?: string;
2248     }
2249     /**
2250      * Navto request message; value of command field is "navto".
2251      * Return list of objects giving file locations and symbols that
2252      * match the search term given in argument 'searchTerm'.  The
2253      * context for the search is given by the named file.
2254      */
2255     interface NavtoRequest extends Request {
2256         command: CommandTypes.Navto;
2257         arguments: NavtoRequestArgs;
2258     }
2259     /**
2260      * An item found in a navto response.
2261      */
2262     interface NavtoItem extends FileSpan {
2263         /**
2264          * The symbol's name.
2265          */
2266         name: string;
2267         /**
2268          * The symbol's kind (such as 'className' or 'parameterName').
2269          */
2270         kind: ScriptElementKind;
2271         /**
2272          * exact, substring, or prefix.
2273          */
2274         matchKind: string;
2275         /**
2276          * If this was a case sensitive or insensitive match.
2277          */
2278         isCaseSensitive: boolean;
2279         /**
2280          * Optional modifiers for the kind (such as 'public').
2281          */
2282         kindModifiers?: string;
2283         /**
2284          * Name of symbol's container symbol (if any); for example,
2285          * the class name if symbol is a class member.
2286          */
2287         containerName?: string;
2288         /**
2289          * Kind of symbol's container symbol (if any).
2290          */
2291         containerKind?: ScriptElementKind;
2292     }
2293     /**
2294      * Navto response message. Body is an array of navto items.  Each
2295      * item gives a symbol that matched the search term.
2296      */
2297     interface NavtoResponse extends Response {
2298         body?: NavtoItem[];
2299     }
2300     /**
2301      * Arguments for change request message.
2302      */
2303     interface ChangeRequestArgs extends FormatRequestArgs {
2304         /**
2305          * Optional string to insert at location (file, line, offset).
2306          */
2307         insertString?: string;
2308     }
2309     /**
2310      * Change request message; value of command field is "change".
2311      * Update the server's view of the file named by argument 'file'.
2312      * Server does not currently send a response to a change request.
2313      */
2314     interface ChangeRequest extends FileLocationRequest {
2315         command: CommandTypes.Change;
2316         arguments: ChangeRequestArgs;
2317     }
2318     /**
2319      * Response to "brace" request.
2320      */
2321     interface BraceResponse extends Response {
2322         body?: TextSpan[];
2323     }
2324     /**
2325      * Brace matching request; value of command field is "brace".
2326      * Return response giving the file locations of matching braces
2327      * found in file at location line, offset.
2328      */
2329     interface BraceRequest extends FileLocationRequest {
2330         command: CommandTypes.Brace;
2331     }
2332     /**
2333      * NavBar items request; value of command field is "navbar".
2334      * Return response giving the list of navigation bar entries
2335      * extracted from the requested file.
2336      */
2337     interface NavBarRequest extends FileRequest {
2338         command: CommandTypes.NavBar;
2339     }
2340     /**
2341      * NavTree request; value of command field is "navtree".
2342      * Return response giving the navigation tree of the requested file.
2343      */
2344     interface NavTreeRequest extends FileRequest {
2345         command: CommandTypes.NavTree;
2346     }
2347     interface NavigationBarItem {
2348         /**
2349          * The item's display text.
2350          */
2351         text: string;
2352         /**
2353          * The symbol's kind (such as 'className' or 'parameterName').
2354          */
2355         kind: ScriptElementKind;
2356         /**
2357          * Optional modifiers for the kind (such as 'public').
2358          */
2359         kindModifiers?: string;
2360         /**
2361          * The definition locations of the item.
2362          */
2363         spans: TextSpan[];
2364         /**
2365          * Optional children.
2366          */
2367         childItems?: NavigationBarItem[];
2368         /**
2369          * Number of levels deep this item should appear.
2370          */
2371         indent: number;
2372     }
2373     /** protocol.NavigationTree is identical to ts.NavigationTree, except using protocol.TextSpan instead of ts.TextSpan */
2374     interface NavigationTree {
2375         text: string;
2376         kind: ScriptElementKind;
2377         kindModifiers: string;
2378         spans: TextSpan[];
2379         nameSpan: TextSpan | undefined;
2380         childItems?: NavigationTree[];
2381     }
2382     type TelemetryEventName = "telemetry";
2383     interface TelemetryEvent extends Event {
2384         event: TelemetryEventName;
2385         body: TelemetryEventBody;
2386     }
2387     interface TelemetryEventBody {
2388         telemetryEventName: string;
2389         payload: any;
2390     }
2391     type TypesInstallerInitializationFailedEventName = "typesInstallerInitializationFailed";
2392     interface TypesInstallerInitializationFailedEvent extends Event {
2393         event: TypesInstallerInitializationFailedEventName;
2394         body: TypesInstallerInitializationFailedEventBody;
2395     }
2396     interface TypesInstallerInitializationFailedEventBody {
2397         message: string;
2398     }
2399     type TypingsInstalledTelemetryEventName = "typingsInstalled";
2400     interface TypingsInstalledTelemetryEventBody extends TelemetryEventBody {
2401         telemetryEventName: TypingsInstalledTelemetryEventName;
2402         payload: TypingsInstalledTelemetryEventPayload;
2403     }
2404     interface TypingsInstalledTelemetryEventPayload {
2405         /**
2406          * Comma separated list of installed typing packages
2407          */
2408         installedPackages: string;
2409         /**
2410          * true if install request succeeded, otherwise - false
2411          */
2412         installSuccess: boolean;
2413         /**
2414          * version of typings installer
2415          */
2416         typingsInstallerVersion: string;
2417     }
2418     type BeginInstallTypesEventName = "beginInstallTypes";
2419     type EndInstallTypesEventName = "endInstallTypes";
2420     interface BeginInstallTypesEvent extends Event {
2421         event: BeginInstallTypesEventName;
2422         body: BeginInstallTypesEventBody;
2423     }
2424     interface EndInstallTypesEvent extends Event {
2425         event: EndInstallTypesEventName;
2426         body: EndInstallTypesEventBody;
2427     }
2428     interface InstallTypesEventBody {
2429         /**
2430          * correlation id to match begin and end events
2431          */
2432         eventId: number;
2433         /**
2434          * list of packages to install
2435          */
2436         packages: readonly string[];
2437     }
2438     interface BeginInstallTypesEventBody extends InstallTypesEventBody {
2439     }
2440     interface EndInstallTypesEventBody extends InstallTypesEventBody {
2441         /**
2442          * true if installation succeeded, otherwise false
2443          */
2444         success: boolean;
2445     }
2446     interface NavBarResponse extends Response {
2447         body?: NavigationBarItem[];
2448     }
2449     interface NavTreeResponse extends Response {
2450         body?: NavigationTree;
2451     }
2452     interface CallHierarchyItem {
2453         name: string;
2454         kind: ScriptElementKind;
2455         kindModifiers?: string;
2456         file: string;
2457         span: TextSpan;
2458         selectionSpan: TextSpan;
2459         containerName?: string;
2460     }
2461     interface CallHierarchyIncomingCall {
2462         from: CallHierarchyItem;
2463         fromSpans: TextSpan[];
2464     }
2465     interface CallHierarchyOutgoingCall {
2466         to: CallHierarchyItem;
2467         fromSpans: TextSpan[];
2468     }
2469     interface PrepareCallHierarchyRequest extends FileLocationRequest {
2470         command: CommandTypes.PrepareCallHierarchy;
2471     }
2472     interface PrepareCallHierarchyResponse extends Response {
2473         readonly body: CallHierarchyItem | CallHierarchyItem[];
2474     }
2475     interface ProvideCallHierarchyIncomingCallsRequest extends FileLocationRequest {
2476         command: CommandTypes.ProvideCallHierarchyIncomingCalls;
2477     }
2478     interface ProvideCallHierarchyIncomingCallsResponse extends Response {
2479         readonly body: CallHierarchyIncomingCall[];
2480     }
2481     interface ProvideCallHierarchyOutgoingCallsRequest extends FileLocationRequest {
2482         command: CommandTypes.ProvideCallHierarchyOutgoingCalls;
2483     }
2484     interface ProvideCallHierarchyOutgoingCallsResponse extends Response {
2485         readonly body: CallHierarchyOutgoingCall[];
2486     }
2487     const enum IndentStyle {
2488         None = "None",
2489         Block = "Block",
2490         Smart = "Smart"
2491     }
2492     enum SemicolonPreference {
2493         Ignore = "ignore",
2494         Insert = "insert",
2495         Remove = "remove"
2496     }
2497     interface EditorSettings {
2498         baseIndentSize?: number;
2499         indentSize?: number;
2500         tabSize?: number;
2501         newLineCharacter?: string;
2502         convertTabsToSpaces?: boolean;
2503         indentStyle?: IndentStyle | ts.IndentStyle;
2504         trimTrailingWhitespace?: boolean;
2505     }
2506     interface FormatCodeSettings extends EditorSettings {
2507         insertSpaceAfterCommaDelimiter?: boolean;
2508         insertSpaceAfterSemicolonInForStatements?: boolean;
2509         insertSpaceBeforeAndAfterBinaryOperators?: boolean;
2510         insertSpaceAfterConstructor?: boolean;
2511         insertSpaceAfterKeywordsInControlFlowStatements?: boolean;
2512         insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean;
2513         insertSpaceAfterOpeningAndBeforeClosingEmptyBraces?: boolean;
2514         insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean;
2515         insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean;
2516         insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean;
2517         insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean;
2518         insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
2519         insertSpaceAfterTypeAssertion?: boolean;
2520         insertSpaceBeforeFunctionParenthesis?: boolean;
2521         placeOpenBraceOnNewLineForFunctions?: boolean;
2522         placeOpenBraceOnNewLineForControlBlocks?: boolean;
2523         insertSpaceBeforeTypeAnnotation?: boolean;
2524         semicolons?: SemicolonPreference;
2525     }
2526     interface UserPreferences {
2527         readonly disableSuggestions?: boolean;
2528         readonly quotePreference?: "auto" | "double" | "single";
2529         /**
2530          * If enabled, TypeScript will search through all external modules' exports and add them to the completions list.
2531          * This affects lone identifier completions but not completions on the right hand side of `obj.`.
2532          */
2533         readonly includeCompletionsForModuleExports?: boolean;
2534         /**
2535          * If enabled, the completion list will include completions with invalid identifier names.
2536          * For those entries, The `insertText` and `replacementSpan` properties will be set to change from `.x` property access to `["x"]`.
2537          */
2538         readonly includeCompletionsWithInsertText?: boolean;
2539         /**
2540          * Unless this option is `false`, or `includeCompletionsWithInsertText` is not enabled,
2541          * member completion lists triggered with `.` will include entries on potentially-null and potentially-undefined
2542          * values, with insertion text to replace preceding `.` tokens with `?.`.
2543          */
2544         readonly includeAutomaticOptionalChainCompletions?: boolean;
2545         readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative";
2546         /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */
2547         readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js";
2548         readonly allowTextChangesInNewFiles?: boolean;
2549         readonly lazyConfiguredProjectsFromExternalProject?: boolean;
2550         readonly providePrefixAndSuffixTextForRename?: boolean;
2551         readonly provideRefactorNotApplicableReason?: boolean;
2552         readonly allowRenameOfImportPath?: boolean;
2553         readonly includePackageJsonAutoImports?: "auto" | "on" | "off";
2554         readonly generateReturnInDocTemplate?: boolean;
2555     }
2556     interface CompilerOptions {
2557         allowJs?: boolean;
2558         allowSyntheticDefaultImports?: boolean;
2559         allowUnreachableCode?: boolean;
2560         allowUnusedLabels?: boolean;
2561         alwaysStrict?: boolean;
2562         baseUrl?: string;
2563         charset?: string;
2564         checkJs?: boolean;
2565         declaration?: boolean;
2566         declarationDir?: string;
2567         disableSizeLimit?: boolean;
2568         downlevelIteration?: boolean;
2569         emitBOM?: boolean;
2570         emitDecoratorMetadata?: boolean;
2571         experimentalDecorators?: boolean;
2572         forceConsistentCasingInFileNames?: boolean;
2573         importHelpers?: boolean;
2574         inlineSourceMap?: boolean;
2575         inlineSources?: boolean;
2576         isolatedModules?: boolean;
2577         jsx?: JsxEmit | ts.JsxEmit;
2578         lib?: string[];
2579         locale?: string;
2580         mapRoot?: string;
2581         maxNodeModuleJsDepth?: number;
2582         module?: ModuleKind | ts.ModuleKind;
2583         moduleResolution?: ModuleResolutionKind | ts.ModuleResolutionKind;
2584         newLine?: NewLineKind | ts.NewLineKind;
2585         noEmit?: boolean;
2586         noEmitHelpers?: boolean;
2587         noEmitOnError?: boolean;
2588         noErrorTruncation?: boolean;
2589         noFallthroughCasesInSwitch?: boolean;
2590         noImplicitAny?: boolean;
2591         noImplicitReturns?: boolean;
2592         noImplicitThis?: boolean;
2593         noUnusedLocals?: boolean;
2594         noUnusedParameters?: boolean;
2595         noImplicitUseStrict?: boolean;
2596         noLib?: boolean;
2597         noResolve?: boolean;
2598         out?: string;
2599         outDir?: string;
2600         outFile?: string;
2601         paths?: MapLike<string[]>;
2602         plugins?: PluginImport[];
2603         preserveConstEnums?: boolean;
2604         preserveSymlinks?: boolean;
2605         project?: string;
2606         reactNamespace?: string;
2607         removeComments?: boolean;
2608         references?: ProjectReference[];
2609         rootDir?: string;
2610         rootDirs?: string[];
2611         skipLibCheck?: boolean;
2612         skipDefaultLibCheck?: boolean;
2613         sourceMap?: boolean;
2614         sourceRoot?: string;
2615         strict?: boolean;
2616         strictNullChecks?: boolean;
2617         suppressExcessPropertyErrors?: boolean;
2618         suppressImplicitAnyIndexErrors?: boolean;
2619         useDefineForClassFields?: boolean;
2620         target?: ScriptTarget | ts.ScriptTarget;
2621         traceResolution?: boolean;
2622         resolveJsonModule?: boolean;
2623         types?: string[];
2624         /** Paths used to used to compute primary types search locations */
2625         typeRoots?: string[];
2626         [option: string]: CompilerOptionsValue | undefined;
2627     }
2628     const enum JsxEmit {
2629         None = "None",
2630         Preserve = "Preserve",
2631         ReactNative = "ReactNative",
2632         React = "React"
2633     }
2634     const enum ModuleKind {
2635         None = "None",
2636         CommonJS = "CommonJS",
2637         AMD = "AMD",
2638         UMD = "UMD",
2639         System = "System",
2640         ES6 = "ES6",
2641         ES2015 = "ES2015",
2642         ESNext = "ESNext"
2643     }
2644     const enum ModuleResolutionKind {
2645         Classic = "Classic",
2646         Node = "Node"
2647     }
2648     const enum NewLineKind {
2649         Crlf = "Crlf",
2650         Lf = "Lf"
2651     }
2652     const enum ScriptTarget {
2653         ES3 = "ES3",
2654         ES5 = "ES5",
2655         ES6 = "ES6",
2656         ES2015 = "ES2015",
2657         ES2016 = "ES2016",
2658         ES2017 = "ES2017",
2659         ES2018 = "ES2018",
2660         ES2019 = "ES2019",
2661         ES2020 = "ES2020",
2662         ESNext = "ESNext"
2663     }
2664     const enum ClassificationType {
2665         comment = 1,
2666         identifier = 2,
2667         keyword = 3,
2668         numericLiteral = 4,
2669         operator = 5,
2670         stringLiteral = 6,
2671         regularExpressionLiteral = 7,
2672         whiteSpace = 8,
2673         text = 9,
2674         punctuation = 10,
2675         className = 11,
2676         enumName = 12,
2677         interfaceName = 13,
2678         moduleName = 14,
2679         typeParameterName = 15,
2680         typeAliasName = 16,
2681         parameterName = 17,
2682         docCommentTagName = 18,
2683         jsxOpenTagName = 19,
2684         jsxCloseTagName = 20,
2685         jsxSelfClosingTagName = 21,
2686         jsxAttribute = 22,
2687         jsxText = 23,
2688         jsxAttributeStringLiteralValue = 24,
2689         bigintLiteral = 25
2690     }
2691 }
2692 declare namespace ts.server.protocol {
2693
2694     interface TextInsertion {
2695         newText: string;
2696         /** The position in newText the caret should point to after the insertion. */
2697         caretOffset: number;
2698     }
2699
2700     interface TodoCommentDescriptor {
2701         text: string;
2702         priority: number;
2703     }
2704
2705     interface TodoComment {
2706         descriptor: TodoCommentDescriptor;
2707         message: string;
2708         position: number;
2709     }
2710
2711     enum OutliningSpanKind {
2712         /** Single or multi-line comments */
2713         Comment = "comment",
2714         /** Sections marked by '// #region' and '// #endregion' comments */
2715         Region = "region",
2716         /** Declarations and expressions */
2717         Code = "code",
2718         /** Contiguous blocks of import declarations */
2719         Imports = "imports"
2720     }
2721
2722     enum HighlightSpanKind {
2723         none = "none",
2724         definition = "definition",
2725         reference = "reference",
2726         writtenReference = "writtenReference"
2727     }
2728
2729     enum ScriptElementKind {
2730         unknown = "",
2731         warning = "warning",
2732         /** predefined type (void) or keyword (class) */
2733         keyword = "keyword",
2734         /** top level script node */
2735         scriptElement = "script",
2736         /** module foo {} */
2737         moduleElement = "module",
2738         /** class X {} */
2739         classElement = "class",
2740         /** var x = class X {} */
2741         localClassElement = "local class",
2742         /** interface Y {} */
2743         interfaceElement = "interface",
2744         /** type T = ... */
2745         typeElement = "type",
2746         /** enum E */
2747         enumElement = "enum",
2748         enumMemberElement = "enum member",
2749         /**
2750          * Inside module and script only
2751          * const v = ..
2752          */
2753         variableElement = "var",
2754         /** Inside function */
2755         localVariableElement = "local var",
2756         /**
2757          * Inside module and script only
2758          * function f() { }
2759          */
2760         functionElement = "function",
2761         /** Inside function */
2762         localFunctionElement = "local function",
2763         /** class X { [public|private]* foo() {} } */
2764         memberFunctionElement = "method",
2765         /** class X { [public|private]* [get|set] foo:number; } */
2766         memberGetAccessorElement = "getter",
2767         memberSetAccessorElement = "setter",
2768         /**
2769          * class X { [public|private]* foo:number; }
2770          * interface Y { foo:number; }
2771          */
2772         memberVariableElement = "property",
2773         /** class X { constructor() { } } */
2774         constructorImplementationElement = "constructor",
2775         /** interface Y { ():number; } */
2776         callSignatureElement = "call",
2777         /** interface Y { []:number; } */
2778         indexSignatureElement = "index",
2779         /** interface Y { new():Y; } */
2780         constructSignatureElement = "construct",
2781         /** function foo(*Y*: string) */
2782         parameterElement = "parameter",
2783         typeParameterElement = "type parameter",
2784         primitiveType = "primitive type",
2785         label = "label",
2786         alias = "alias",
2787         constElement = "const",
2788         letElement = "let",
2789         directory = "directory",
2790         externalModuleName = "external module name",
2791         /**
2792          * <JsxTagName attribute1 attribute2={0} />
2793          */
2794         jsxAttribute = "JSX attribute",
2795         /** String literal */
2796         string = "string"
2797     }
2798
2799     export interface TypeAcquisition {
2800         /**
2801          * @deprecated typingOptions.enableAutoDiscovery
2802          * Use typeAcquisition.enable instead.
2803          */
2804         enableAutoDiscovery?: boolean;
2805         enable?: boolean;
2806         include?: string[];
2807         exclude?: string[];
2808         disableFilenameBasedTypeAcquisition?: boolean;
2809         [option: string]: CompilerOptionsValue | undefined;
2810     }
2811
2812     export type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | PluginImport[] | ProjectReference[] | null | undefined;
2813
2814     export interface FileExtensionInfo {
2815         extension: string;
2816         isMixedContent: boolean;
2817         scriptKind?: ScriptKind;
2818     }
2819
2820     interface JSDocTagInfo {
2821         name: string;
2822         text?: string;
2823     }
2824
2825     /**
2826      * Type of objects whose values are all of the same type.
2827      * The `in` and `for-in` operators can *not* be safely used,
2828      * since `Object.prototype` may be modified by outside code.
2829      */
2830     interface MapLike<T> {
2831         [index: string]: T;
2832     }
2833
2834     export interface PluginImport {
2835         name: string;
2836     }
2837
2838     export interface ProjectReference {
2839         /** A normalized path on disk */
2840         path: string;
2841         /** The path as the user originally wrote it */
2842         originalPath?: string;
2843         /** True if the output of this reference should be prepended to the output of this project. Only valid for --outFile compilations */
2844         prepend?: boolean;
2845         /** True if it is intended that this reference form a circularity */
2846         circular?: boolean;
2847     }
2848 }
2849 declare namespace ts {
2850     // these types are empty stubs for types from services and should not be used directly
2851     export type EndOfLineState = never;
2852     export type ScriptKind = never;
2853     export type WatchFileKind = never;
2854     export type WatchDirectoryKind = never;
2855     export type PollingWatchKind = never;
2856     export type IndentStyle = never;
2857     export type JsxEmit = never;
2858     export type ModuleKind = never;
2859     export type ModuleResolutionKind = never;
2860     export type NewLineKind = never;
2861     export type ScriptTarget = never;
2862 }
2863 import protocol = ts.server.protocol;
2864 export = protocol;
2865 export as namespace protocol;