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