2 * Declaration module describing the TypeScript Server protocol
4 declare namespace ts.server.protocol {
5 const enum CommandTypes {
6 JsxClosingTag = "jsxClosingTag",
8 BraceCompletion = "braceCompletion",
9 GetSpanOfEnclosingComment = "getSpanOfEnclosingComment",
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",
23 FileReferences = "fileReferences",
25 Formatonkey = "formatonkey",
27 GeterrForProject = "geterrForProject",
28 SemanticDiagnosticsSync = "semanticDiagnosticsSync",
29 SyntacticDiagnosticsSync = "syntacticDiagnosticsSync",
30 SuggestionDiagnosticsSync = "suggestionDiagnosticsSync",
34 NavTreeFull = "navtree-full",
36 Occurrences = "occurrences",
37 DocumentHighlights = "documentHighlights",
39 Quickinfo = "quickinfo",
40 References = "references",
44 SignatureHelp = "signatureHelp",
46 TypeDefinition = "typeDefinition",
47 ProjectInfo = "projectInfo",
48 ReloadProjects = "reloadProjects",
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"
78 * A TypeScript Server message
82 * Sequence number of the message
86 * One of "request", "response", or "event"
88 type: "request" | "response" | "event";
91 * Client-initiated request message
93 interface Request extends Message {
96 * The command to execute
100 * Object containing arguments for the command
105 * Request to reload the project structure for all the opened files
107 interface ReloadProjectsRequest extends Message {
108 command: CommandTypes.ReloadProjects;
111 * Server-initiated event message
113 interface Event extends Message {
120 * Event-specific information
125 * Response by server to client request message.
127 interface Response extends Message {
130 * Sequence number of the request message.
134 * Outcome of the request.
138 * The command requested.
142 * If success === false, this should always be provided.
143 * Otherwise, may (or may not) contain a success message.
147 * Contains message body if success === true.
151 * Contains extra information that plugin can include to be passed on
155 * Exposes information about the performance of this request-response pair.
157 performanceData?: PerformanceData;
159 interface PerformanceData {
161 * Time spent updating the program graph, in milliseconds.
163 updateGraphDurationMs?: number;
165 * The time spent creating or updating the auto-import program, in milliseconds.
167 createAutoImportProviderProgramDurationMs?: number;
170 * Arguments for FileRequest messages.
172 interface FileRequestArgs {
174 * The file for the request (absolute pathname required).
177 projectFileName?: string;
179 interface StatusRequest extends Request {
180 command: CommandTypes.Status;
182 interface StatusResponseBody {
184 * The TypeScript version (`ts.version`).
189 * Response to StatusRequest
191 interface StatusResponse extends Response {
192 body: StatusResponseBody;
195 * Requests a JS Doc comment template for a given position
197 interface DocCommentTemplateRequest extends FileLocationRequest {
198 command: CommandTypes.DocCommentTemplate;
201 * Response to DocCommentTemplateRequest
203 interface DocCommandTemplateResponse extends Response {
204 body?: TextInsertion;
207 * A request to get TODO comments from the file
209 interface TodoCommentRequest extends FileRequest {
210 command: CommandTypes.TodoComments;
211 arguments: TodoCommentRequestArgs;
214 * Arguments for TodoCommentRequest request.
216 interface TodoCommentRequestArgs extends FileRequestArgs {
218 * Array of target TodoCommentDescriptors that describes TODO comments to be found
220 descriptors: TodoCommentDescriptor[];
223 * Response for TodoCommentRequest request.
225 interface TodoCommentsResponse extends Response {
226 body?: TodoComment[];
229 * A request to determine if the caret is inside a comment.
231 interface SpanOfEnclosingCommentRequest extends FileLocationRequest {
232 command: CommandTypes.GetSpanOfEnclosingComment;
233 arguments: SpanOfEnclosingCommentRequestArgs;
235 interface SpanOfEnclosingCommentRequestArgs extends FileLocationRequestArgs {
237 * Requires that the enclosing span be a multi-line comment, or else the request returns undefined.
239 onlyMultiLine: boolean;
242 * Request to obtain outlining spans in file.
244 interface OutliningSpansRequest extends FileRequest {
245 command: CommandTypes.GetOutliningSpans;
247 interface OutliningSpan {
248 /** The span of the document to actually collapse. */
250 /** The span of the document to display when the user hovers over the collapsed span. */
252 /** The text to display in the editor for the collapsed region. */
255 * Whether or not this region should be automatically collapsed when
256 * the 'Collapse to Definitions' command is invoked.
258 autoCollapse: boolean;
260 * Classification of the contents of the span
262 kind: OutliningSpanKind;
265 * Response to OutliningSpansRequest request.
267 interface OutliningSpansResponse extends Response {
268 body?: OutliningSpan[];
271 * A request to get indentation for a location in file
273 interface IndentationRequest extends FileLocationRequest {
274 command: CommandTypes.Indentation;
275 arguments: IndentationRequestArgs;
278 * Response for IndentationRequest request.
280 interface IndentationResponse extends Response {
281 body?: IndentationResult;
284 * Indentation result representing where indentation should be placed
286 interface IndentationResult {
288 * The base position in the document that the indent should be relative to
292 * The number of columns the indent should be at relative to the position's column.
297 * Arguments for IndentationRequest request.
299 interface IndentationRequestArgs extends FileLocationRequestArgs {
301 * An optional set of settings to be used when computing indentation.
302 * If argument is omitted - then it will use settings for file that were previously set via 'configure' request or global settings.
304 options?: EditorSettings;
307 * Arguments for ProjectInfoRequest request.
309 interface ProjectInfoRequestArgs extends FileRequestArgs {
311 * Indicate if the file name list of the project is needed
313 needFileNameList: boolean;
316 * A request to get the project information of the current file.
318 interface ProjectInfoRequest extends Request {
319 command: CommandTypes.ProjectInfo;
320 arguments: ProjectInfoRequestArgs;
323 * A request to retrieve compiler options diagnostics for a project
325 interface CompilerOptionsDiagnosticsRequest extends Request {
326 arguments: CompilerOptionsDiagnosticsRequestArgs;
329 * Arguments for CompilerOptionsDiagnosticsRequest request.
331 interface CompilerOptionsDiagnosticsRequestArgs {
333 * Name of the project to retrieve compiler options diagnostics.
335 projectFileName: string;
338 * Response message body for "projectInfo" request
340 interface ProjectInfo {
342 * For configured project, this is the normalized path of the 'tsconfig.json' file
343 * For inferred project, this is undefined
345 configFileName: string;
347 * The list of normalized file name in the project, including 'lib.d.ts'
349 fileNames?: string[];
351 * Indicates if the project has a active language service instance
353 languageServiceDisabled?: boolean;
356 * Represents diagnostic info that includes location of diagnostic in two forms
357 * - start position and length of the error span
358 * - startLocation and endLocation - a pair of Location objects that store start/end line and offset of the error span.
360 interface DiagnosticWithLinePosition {
364 startLocation: Location;
365 endLocation: Location;
368 /** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */
369 reportsUnnecessary?: {};
370 reportsDeprecated?: {};
371 relatedInformation?: DiagnosticRelatedInformation[];
374 * Response message for "projectInfo" request
376 interface ProjectInfoResponse extends Response {
380 * Request whose sole parameter is a file name.
382 interface FileRequest extends Request {
383 arguments: FileRequestArgs;
386 * Instances of this interface specify a location in a source file:
387 * (file, line, character offset), where line and character offset are 1-based.
389 interface FileLocationRequestArgs extends FileRequestArgs {
391 * The line number for the request (1-based).
395 * The character offset (on the line) for the request (1-based).
399 type FileLocationOrRangeRequestArgs = FileLocationRequestArgs | FileRangeRequestArgs;
401 * Request refactorings at a given position or selection area.
403 interface GetApplicableRefactorsRequest extends Request {
404 command: CommandTypes.GetApplicableRefactors;
405 arguments: GetApplicableRefactorsRequestArgs;
407 type GetApplicableRefactorsRequestArgs = FileLocationOrRangeRequestArgs & {
408 triggerReason?: RefactorTriggerReason;
411 type RefactorTriggerReason = "implicit" | "invoked";
413 * Response is a list of available refactorings.
414 * Each refactoring exposes one or more "Actions"; a user selects one action to invoke a refactoring
416 interface GetApplicableRefactorsResponse extends Response {
417 body?: ApplicableRefactorInfo[];
420 * A set of one or more available refactoring actions, grouped under a parent refactoring.
422 interface ApplicableRefactorInfo {
424 * The programmatic name of the refactoring
428 * A description of this refactoring category to show to the user.
429 * If the refactoring gets inlined (see below), this text will not be visible.
433 * Inlineable refactorings can have their actions hoisted out to the top level
434 * of a context menu. Non-inlineanable refactorings should always be shown inside
435 * their parent grouping.
437 * If not specified, this value is assumed to be 'true'
439 inlineable?: boolean;
440 actions: RefactorActionInfo[];
443 * Represents a single refactoring action - for example, the "Extract Method..." refactor might
444 * offer several actions, each corresponding to a surround class or closure to extract into.
446 interface RefactorActionInfo {
448 * The programmatic name of the refactoring action
452 * A description of this refactoring action to show to the user.
453 * If the parent refactoring is inlined away, this will be the only text shown,
454 * so this description should make sense by itself if the parent is inlineable=true
458 * A message to show to the user if the refactoring cannot be applied in
459 * the current context.
461 notApplicableReason?: string;
463 * The hierarchical dotted name of the refactor action.
467 interface GetEditsForRefactorRequest extends Request {
468 command: CommandTypes.GetEditsForRefactor;
469 arguments: GetEditsForRefactorRequestArgs;
472 * Request the edits that a particular refactoring action produces.
473 * Callers must specify the name of the refactor and the name of the action.
475 type GetEditsForRefactorRequestArgs = FileLocationOrRangeRequestArgs & {
479 interface GetEditsForRefactorResponse extends Response {
480 body?: RefactorEditInfo;
482 interface RefactorEditInfo {
483 edits: FileCodeEdits[];
485 * An optional location where the editor should start a rename operation once
486 * the refactoring edits have been applied
488 renameLocation?: Location;
489 renameFilename?: string;
492 * Organize imports by:
493 * 1) Removing unused imports
494 * 2) Coalescing imports from the same module
497 interface OrganizeImportsRequest extends Request {
498 command: CommandTypes.OrganizeImports;
499 arguments: OrganizeImportsRequestArgs;
501 type OrganizeImportsScope = GetCombinedCodeFixScope;
502 interface OrganizeImportsRequestArgs {
503 scope: OrganizeImportsScope;
505 interface OrganizeImportsResponse extends Response {
506 body: readonly FileCodeEdits[];
508 interface GetEditsForFileRenameRequest extends Request {
509 command: CommandTypes.GetEditsForFileRename;
510 arguments: GetEditsForFileRenameRequestArgs;
512 /** Note: Paths may also be directories. */
513 interface GetEditsForFileRenameRequestArgs {
514 readonly oldFilePath: string;
515 readonly newFilePath: string;
517 interface GetEditsForFileRenameResponse extends Response {
518 body: readonly FileCodeEdits[];
521 * Request for the available codefixes at a specific position.
523 interface CodeFixRequest extends Request {
524 command: CommandTypes.GetCodeFixes;
525 arguments: CodeFixRequestArgs;
527 interface GetCombinedCodeFixRequest extends Request {
528 command: CommandTypes.GetCombinedCodeFix;
529 arguments: GetCombinedCodeFixRequestArgs;
531 interface GetCombinedCodeFixResponse extends Response {
532 body: CombinedCodeActions;
534 interface ApplyCodeActionCommandRequest extends Request {
535 command: CommandTypes.ApplyCodeActionCommand;
536 arguments: ApplyCodeActionCommandRequestArgs;
538 interface ApplyCodeActionCommandResponse extends Response {
540 interface FileRangeRequestArgs extends FileRequestArgs {
542 * The line number for the request (1-based).
546 * The character offset (on the line) for the request (1-based).
550 * The line number for the request (1-based).
554 * The character offset (on the line) for the request (1-based).
559 * Instances of this interface specify errorcodes on a specific location in a sourcefile.
561 interface CodeFixRequestArgs extends FileRangeRequestArgs {
563 * Errorcodes we want to get the fixes for.
565 errorCodes: readonly number[];
567 interface GetCombinedCodeFixRequestArgs {
568 scope: GetCombinedCodeFixScope;
571 interface GetCombinedCodeFixScope {
573 args: FileRequestArgs;
575 interface ApplyCodeActionCommandRequestArgs {
576 /** May also be an array of commands. */
580 * Response for GetCodeFixes request.
582 interface GetCodeFixesResponse extends Response {
586 * A request whose arguments specify a file location (file, line, col).
588 interface FileLocationRequest extends FileRequest {
589 arguments: FileLocationRequestArgs;
592 * A request to get codes of supported code fixes.
594 interface GetSupportedCodeFixesRequest extends Request {
595 command: CommandTypes.GetSupportedCodeFixes;
598 * A response for GetSupportedCodeFixesRequest request.
600 interface GetSupportedCodeFixesResponse extends Response {
602 * List of error codes supported by the server.
607 * A request to get encoded semantic classifications for a span in the file
609 interface EncodedSemanticClassificationsRequest extends FileRequest {
610 arguments: EncodedSemanticClassificationsRequestArgs;
613 * Arguments for EncodedSemanticClassificationsRequest request.
615 interface EncodedSemanticClassificationsRequestArgs extends FileRequestArgs {
617 * Start position of the span.
621 * Length of the span.
625 * Optional parameter for the semantic highlighting response, if absent it
626 * defaults to "original".
628 format?: "original" | "2020";
630 /** The response for a EncodedSemanticClassificationsRequest */
631 interface EncodedSemanticClassificationsResponse extends Response {
632 body?: EncodedSemanticClassificationsResponseBody;
635 * Implementation response message. Gives series of text spans depending on the format ar.
637 interface EncodedSemanticClassificationsResponseBody {
638 endOfLineState: EndOfLineState;
642 * Arguments in document highlight request; include: filesToSearch, file,
645 interface DocumentHighlightsRequestArgs extends FileLocationRequestArgs {
647 * List of files to search for document highlights.
649 filesToSearch: string[];
652 * Go to definition request; value of command field is
653 * "definition". Return response giving the file locations that
654 * define the symbol found in file at location line, col.
656 interface DefinitionRequest extends FileLocationRequest {
657 command: CommandTypes.Definition;
659 interface DefinitionAndBoundSpanRequest extends FileLocationRequest {
660 readonly command: CommandTypes.DefinitionAndBoundSpan;
662 interface DefinitionAndBoundSpanResponse extends Response {
663 readonly body: DefinitionInfoAndBoundSpan;
666 * Go to type request; value of command field is
667 * "typeDefinition". Return response giving the file locations that
668 * define the type for the symbol found in file at location line, col.
670 interface TypeDefinitionRequest extends FileLocationRequest {
671 command: CommandTypes.TypeDefinition;
674 * Go to implementation request; value of command field is
675 * "implementation". Return response giving the file locations that
676 * implement the symbol found in file at location line, col.
678 interface ImplementationRequest extends FileLocationRequest {
679 command: CommandTypes.Implementation;
682 * Location in source code expressed as (one-based) line and (one-based) column offset.
689 * Object found in response messages defining a span of text in source code.
693 * First character of the definition.
697 * One character past last character of the definition.
702 * Object found in response messages defining a span of text in a specific source file.
704 interface FileSpan extends TextSpan {
706 * File containing text span.
710 interface TextSpanWithContext extends TextSpan {
711 contextStart?: Location;
712 contextEnd?: Location;
714 interface FileSpanWithContext extends FileSpan, TextSpanWithContext {
716 interface DefinitionInfoAndBoundSpan {
717 definitions: readonly FileSpanWithContext[];
721 * Definition response message. Gives text range for definition.
723 interface DefinitionResponse extends Response {
724 body?: FileSpanWithContext[];
726 interface DefinitionInfoAndBoundSpanResponse extends Response {
727 body?: DefinitionInfoAndBoundSpan;
729 /** @deprecated Use `DefinitionInfoAndBoundSpanResponse` instead. */
730 type DefinitionInfoAndBoundSpanReponse = DefinitionInfoAndBoundSpanResponse;
732 * Definition response message. Gives text range for definition.
734 interface TypeDefinitionResponse extends Response {
735 body?: FileSpanWithContext[];
738 * Implementation response message. Gives text range for implementations.
740 interface ImplementationResponse extends Response {
741 body?: FileSpanWithContext[];
744 * Request to get brace completion for a location in the file.
746 interface BraceCompletionRequest extends FileLocationRequest {
747 command: CommandTypes.BraceCompletion;
748 arguments: BraceCompletionRequestArgs;
751 * Argument for BraceCompletionRequest request.
753 interface BraceCompletionRequestArgs extends FileLocationRequestArgs {
755 * Kind of opening brace
757 openingBrace: string;
759 interface JsxClosingTagRequest extends FileLocationRequest {
760 readonly command: CommandTypes.JsxClosingTag;
761 readonly arguments: JsxClosingTagRequestArgs;
763 interface JsxClosingTagRequestArgs extends FileLocationRequestArgs {
765 interface JsxClosingTagResponse extends Response {
766 readonly body: TextInsertion;
770 * Get occurrences request; value of command field is
771 * "occurrences". Return response giving spans that are relevant
772 * in the file at a given line and column.
774 interface OccurrencesRequest extends FileLocationRequest {
775 command: CommandTypes.Occurrences;
778 interface OccurrencesResponseItem extends FileSpanWithContext {
780 * True if the occurrence is a write location, false otherwise.
782 isWriteAccess: boolean;
784 * True if the occurrence is in a string, undefined otherwise;
789 interface OccurrencesResponse extends Response {
790 body?: OccurrencesResponseItem[];
793 * Get document highlights request; value of command field is
794 * "documentHighlights". Return response giving spans that are relevant
795 * in the file at a given line and column.
797 interface DocumentHighlightsRequest extends FileLocationRequest {
798 command: CommandTypes.DocumentHighlights;
799 arguments: DocumentHighlightsRequestArgs;
802 * Span augmented with extra information that denotes the kind of the highlighting to be used for span.
804 interface HighlightSpan extends TextSpanWithContext {
805 kind: HighlightSpanKind;
808 * Represents a set of highligh spans for a give name
810 interface DocumentHighlightsItem {
812 * File containing highlight spans.
816 * Spans to highlight in file.
818 highlightSpans: HighlightSpan[];
821 * Response for a DocumentHighlightsRequest request.
823 interface DocumentHighlightsResponse extends Response {
824 body?: DocumentHighlightsItem[];
827 * Find references request; value of command field is
828 * "references". Return response giving the file locations that
829 * reference the symbol found in file at location line, col.
831 interface ReferencesRequest extends FileLocationRequest {
832 command: CommandTypes.References;
834 interface ReferencesResponseItem extends FileSpanWithContext {
835 /** Text of line containing the reference. Including this
836 * with the response avoids latency of editor loading files
837 * to show text of reference line (the server already has
838 * loaded the referencing files).
842 * True if reference is a write location, false otherwise.
844 isWriteAccess: boolean;
846 * True if reference is a definition, false otherwise.
848 isDefinition: boolean;
851 * The body of a "references" response message.
853 interface ReferencesResponseBody {
855 * The file locations referencing the symbol.
857 refs: readonly ReferencesResponseItem[];
859 * The name of the symbol.
863 * The start character offset of the symbol (on the line provided by the references request).
865 symbolStartOffset: number;
867 * The full display name of the symbol.
869 symbolDisplayString: string;
872 * Response to "references" request.
874 interface ReferencesResponse extends Response {
875 body?: ReferencesResponseBody;
877 interface FileReferencesRequest extends FileRequest {
878 command: CommandTypes.FileReferences;
880 interface FileReferencesResponseBody {
882 * The file locations referencing the symbol.
884 refs: readonly ReferencesResponseItem[];
886 * The name of the symbol.
890 interface FileReferencesResponse extends Response {
891 body?: FileReferencesResponseBody;
894 * Argument for RenameRequest request.
896 interface RenameRequestArgs extends FileLocationRequestArgs {
898 * Should text at specified location be found/changed in comments?
900 findInComments?: boolean;
902 * Should text at specified location be found/changed in strings?
904 findInStrings?: boolean;
907 * Rename request; value of command field is "rename". Return
908 * response giving the file locations that reference the symbol
909 * found in file at location line, col. Also return full display
910 * name of the symbol so that client can print it unambiguously.
912 interface RenameRequest extends FileLocationRequest {
913 command: CommandTypes.Rename;
914 arguments: RenameRequestArgs;
917 * Information about the item to be renamed.
919 type RenameInfo = RenameInfoSuccess | RenameInfoFailure;
920 interface RenameInfoSuccess {
922 * True if item can be renamed.
926 * File or directory to rename.
927 * If set, `getEditsForFileRename` should be called instead of `findRenameLocations`.
929 fileToRename?: string;
931 * Display name of the item to be renamed.
935 * Full display name of item to be renamed.
937 fullDisplayName: string;
939 * The items's kind (such as 'className' or 'parameterName' or plain 'text').
941 kind: ScriptElementKind;
943 * Optional modifiers for the kind (such as 'public').
945 kindModifiers: string;
946 /** Span of text to rename. */
947 triggerSpan: TextSpan;
949 interface RenameInfoFailure {
952 * Error message if item can not be renamed.
954 localizedErrorMessage: string;
957 * A group of text spans, all in 'file'.
959 interface SpanGroup {
960 /** The file to which the spans apply */
962 /** The text spans in this group */
963 locs: RenameTextSpan[];
965 interface RenameTextSpan extends TextSpanWithContext {
966 readonly prefixText?: string;
967 readonly suffixText?: string;
969 interface RenameResponseBody {
971 * Information about the item to be renamed.
975 * An array of span groups (one per file) that refer to the item to be renamed.
977 locs: readonly SpanGroup[];
980 * Rename response message.
982 interface RenameResponse extends Response {
983 body?: RenameResponseBody;
986 * Represents a file in external project.
987 * External project is project whose set of files, compilation options and open\close state
988 * is maintained by the client (i.e. if all this data come from .csproj file in Visual Studio).
989 * External project will exist even if all files in it are closed and should be closed explicitly.
990 * If external project includes one or more tsconfig.json/jsconfig.json files then tsserver will
991 * create configured project for every config file but will maintain a link that these projects were created
992 * as a result of opening external project so they should be removed once external project is closed.
994 interface ExternalFile {
1000 * Script kind of the file
1002 scriptKind?: ScriptKindName | ts.ScriptKind;
1004 * Whether file has mixed content (i.e. .cshtml file that combines html markup with C#/JavaScript)
1006 hasMixedContent?: boolean;
1008 * Content of the file
1013 * Represent an external project
1015 interface ExternalProject {
1019 projectFileName: string;
1021 * List of root files in project
1023 rootFiles: ExternalFile[];
1025 * Compiler options for the project
1027 options: ExternalProjectCompilerOptions;
1029 * @deprecated typingOptions. Use typeAcquisition instead
1031 typingOptions?: TypeAcquisition;
1033 * Explicitly specified type acquisition for the project
1035 typeAcquisition?: TypeAcquisition;
1037 interface CompileOnSaveMixin {
1039 * If compile on save is enabled for the project
1041 compileOnSave?: boolean;
1044 * For external projects, some of the project settings are sent together with
1045 * compiler settings.
1047 type ExternalProjectCompilerOptions = CompilerOptions & CompileOnSaveMixin & WatchOptions;
1048 interface FileWithProjectReferenceRedirectInfo {
1054 * True if the file is primarily included in a referenced project
1056 isSourceOfProjectReferenceRedirect: boolean;
1059 * Represents a set of changes that happen in project
1061 interface ProjectChanges {
1063 * List of added files
1065 added: string[] | FileWithProjectReferenceRedirectInfo[];
1067 * List of removed files
1069 removed: string[] | FileWithProjectReferenceRedirectInfo[];
1071 * List of updated files
1073 updated: string[] | FileWithProjectReferenceRedirectInfo[];
1075 * List of files that have had their project reference redirect status updated
1076 * Only provided when the synchronizeProjectList request has includeProjectReferenceRedirectInfo set to true
1078 updatedRedirects?: FileWithProjectReferenceRedirectInfo[];
1081 * Information found in a configure request.
1083 interface ConfigureRequestArguments {
1085 * Information about the host, for example 'Emacs 24.4' or
1086 * 'Sublime Text version 3075'
1090 * If present, tab settings apply only to this file.
1094 * The format options to use during formatting and other code editing features.
1096 formatOptions?: FormatCodeSettings;
1097 preferences?: UserPreferences;
1099 * The host's additional supported .js file extensions
1101 extraFileExtensions?: FileExtensionInfo[];
1102 watchOptions?: WatchOptions;
1104 const enum WatchFileKind {
1105 FixedPollingInterval = "FixedPollingInterval",
1106 PriorityPollingInterval = "PriorityPollingInterval",
1107 DynamicPriorityPolling = "DynamicPriorityPolling",
1108 UseFsEvents = "UseFsEvents",
1109 UseFsEventsOnParentDirectory = "UseFsEventsOnParentDirectory"
1111 const enum WatchDirectoryKind {
1112 UseFsEvents = "UseFsEvents",
1113 FixedPollingInterval = "FixedPollingInterval",
1114 DynamicPriorityPolling = "DynamicPriorityPolling"
1116 const enum PollingWatchKind {
1117 FixedInterval = "FixedInterval",
1118 PriorityInterval = "PriorityInterval",
1119 DynamicPriority = "DynamicPriority"
1121 interface WatchOptions {
1122 watchFile?: WatchFileKind | ts.WatchFileKind;
1123 watchDirectory?: WatchDirectoryKind | ts.WatchDirectoryKind;
1124 fallbackPolling?: PollingWatchKind | ts.PollingWatchKind;
1125 synchronousWatchDirectory?: boolean;
1126 excludeDirectories?: string[];
1127 excludeFiles?: string[];
1128 [option: string]: CompilerOptionsValue | undefined;
1131 * Configure request; value of command field is "configure". Specifies
1132 * host information, such as host type, tab size, and indent size.
1134 interface ConfigureRequest extends Request {
1135 command: CommandTypes.Configure;
1136 arguments: ConfigureRequestArguments;
1139 * Response to "configure" request. This is just an acknowledgement, so
1140 * no body field is required.
1142 interface ConfigureResponse extends Response {
1144 interface ConfigurePluginRequestArguments {
1148 interface ConfigurePluginRequest extends Request {
1149 command: CommandTypes.ConfigurePlugin;
1150 arguments: ConfigurePluginRequestArguments;
1152 interface ConfigurePluginResponse extends Response {
1154 interface SelectionRangeRequest extends FileRequest {
1155 command: CommandTypes.SelectionRange;
1156 arguments: SelectionRangeRequestArgs;
1158 interface SelectionRangeRequestArgs extends FileRequestArgs {
1159 locations: Location[];
1161 interface SelectionRangeResponse extends Response {
1162 body?: SelectionRange[];
1164 interface SelectionRange {
1166 parent?: SelectionRange;
1168 interface ToggleLineCommentRequest extends FileRequest {
1169 command: CommandTypes.ToggleLineComment;
1170 arguments: FileRangeRequestArgs;
1172 interface ToggleMultilineCommentRequest extends FileRequest {
1173 command: CommandTypes.ToggleMultilineComment;
1174 arguments: FileRangeRequestArgs;
1176 interface CommentSelectionRequest extends FileRequest {
1177 command: CommandTypes.CommentSelection;
1178 arguments: FileRangeRequestArgs;
1180 interface UncommentSelectionRequest extends FileRequest {
1181 command: CommandTypes.UncommentSelection;
1182 arguments: FileRangeRequestArgs;
1185 * Information found in an "open" request.
1187 interface OpenRequestArgs extends FileRequestArgs {
1189 * Used when a version of the file content is known to be more up to date than the one on disk.
1190 * Then the known content will be used upon opening instead of the disk copy
1192 fileContent?: string;
1194 * Used to specify the script kind of the file explicitly. It could be one of the following:
1195 * "TS", "JS", "TSX", "JSX"
1197 scriptKindName?: ScriptKindName;
1199 * Used to limit the searching for project config file. If given the searching will stop at this
1200 * root path; otherwise it will go all the way up to the dist root path.
1202 projectRootPath?: string;
1204 type ScriptKindName = "TS" | "JS" | "TSX" | "JSX";
1206 * Open request; value of command field is "open". Notify the
1207 * server that the client has file open. The server will not
1208 * monitor the filesystem for changes in this file and will assume
1209 * that the client is updating the server (using the change and/or
1210 * reload messages) when the file changes. Server does not currently
1211 * send a response to an open request.
1213 interface OpenRequest extends Request {
1214 command: CommandTypes.Open;
1215 arguments: OpenRequestArgs;
1218 * Request to open or update external project
1220 interface OpenExternalProjectRequest extends Request {
1221 command: CommandTypes.OpenExternalProject;
1222 arguments: OpenExternalProjectArgs;
1225 * Arguments to OpenExternalProjectRequest request
1227 type OpenExternalProjectArgs = ExternalProject;
1229 * Request to open multiple external projects
1231 interface OpenExternalProjectsRequest extends Request {
1232 command: CommandTypes.OpenExternalProjects;
1233 arguments: OpenExternalProjectsArgs;
1236 * Arguments to OpenExternalProjectsRequest
1238 interface OpenExternalProjectsArgs {
1240 * List of external projects to open or update
1242 projects: ExternalProject[];
1245 * Response to OpenExternalProjectRequest request. This is just an acknowledgement, so
1246 * no body field is required.
1248 interface OpenExternalProjectResponse extends Response {
1251 * Response to OpenExternalProjectsRequest request. This is just an acknowledgement, so
1252 * no body field is required.
1254 interface OpenExternalProjectsResponse extends Response {
1257 * Request to close external project.
1259 interface CloseExternalProjectRequest extends Request {
1260 command: CommandTypes.CloseExternalProject;
1261 arguments: CloseExternalProjectRequestArgs;
1264 * Arguments to CloseExternalProjectRequest request
1266 interface CloseExternalProjectRequestArgs {
1268 * Name of the project to close
1270 projectFileName: string;
1273 * Response to CloseExternalProjectRequest request. This is just an acknowledgement, so
1274 * no body field is required.
1276 interface CloseExternalProjectResponse extends Response {
1279 * Request to synchronize list of open files with the client
1281 interface UpdateOpenRequest extends Request {
1282 command: CommandTypes.UpdateOpen;
1283 arguments: UpdateOpenRequestArgs;
1286 * Arguments to UpdateOpenRequest
1288 interface UpdateOpenRequestArgs {
1290 * List of newly open files
1292 openFiles?: OpenRequestArgs[];
1294 * List of open files files that were changes
1296 changedFiles?: FileCodeEdits[];
1298 * List of files that were closed
1300 closedFiles?: string[];
1303 * External projects have a typeAcquisition option so they need to be added separately to compiler options for inferred projects.
1305 type InferredProjectCompilerOptions = ExternalProjectCompilerOptions & TypeAcquisition;
1307 * Request to set compiler options for inferred projects.
1308 * External projects are opened / closed explicitly.
1309 * Configured projects are opened when user opens loose file that has 'tsconfig.json' or 'jsconfig.json' anywhere in one of containing folders.
1310 * This configuration file will be used to obtain a list of files and configuration settings for the project.
1311 * Inferred projects are created when user opens a loose file that is not the part of external project
1312 * or configured project and will contain only open file and transitive closure of referenced files if 'useOneInferredProject' is false,
1313 * or all open loose files and its transitive closure of referenced files if 'useOneInferredProject' is true.
1315 interface SetCompilerOptionsForInferredProjectsRequest extends Request {
1316 command: CommandTypes.CompilerOptionsForInferredProjects;
1317 arguments: SetCompilerOptionsForInferredProjectsArgs;
1320 * Argument for SetCompilerOptionsForInferredProjectsRequest request.
1322 interface SetCompilerOptionsForInferredProjectsArgs {
1324 * Compiler options to be used with inferred projects.
1326 options: InferredProjectCompilerOptions;
1328 * Specifies the project root path used to scope compiler options.
1329 * It is an error to provide this property if the server has not been started with
1330 * `useInferredProjectPerProjectRoot` enabled.
1332 projectRootPath?: string;
1335 * Response to SetCompilerOptionsForInferredProjectsResponse request. This is just an acknowledgement, so
1336 * no body field is required.
1338 interface SetCompilerOptionsForInferredProjectsResponse extends Response {
1341 * Exit request; value of command field is "exit". Ask the server process
1344 interface ExitRequest extends Request {
1345 command: CommandTypes.Exit;
1348 * Close request; value of command field is "close". Notify the
1349 * server that the client has closed a previously open file. If
1350 * file is still referenced by open files, the server will resume
1351 * monitoring the filesystem for changes to file. Server does not
1352 * currently send a response to a close request.
1354 interface CloseRequest extends FileRequest {
1355 command: CommandTypes.Close;
1358 * Request to obtain the list of files that should be regenerated if target file is recompiled.
1359 * NOTE: this us query-only operation and does not generate any output on disk.
1361 interface CompileOnSaveAffectedFileListRequest extends FileRequest {
1362 command: CommandTypes.CompileOnSaveAffectedFileList;
1365 * Contains a list of files that should be regenerated in a project
1367 interface CompileOnSaveAffectedFileListSingleProject {
1371 projectFileName: string;
1373 * List of files names that should be recompiled
1375 fileNames: string[];
1377 * true if project uses outFile or out compiler option
1379 projectUsesOutFile: boolean;
1382 * Response for CompileOnSaveAffectedFileListRequest request;
1384 interface CompileOnSaveAffectedFileListResponse extends Response {
1385 body: CompileOnSaveAffectedFileListSingleProject[];
1388 * Request to recompile the file. All generated outputs (.js, .d.ts or .js.map files) is written on disk.
1390 interface CompileOnSaveEmitFileRequest extends FileRequest {
1391 command: CommandTypes.CompileOnSaveEmitFile;
1392 arguments: CompileOnSaveEmitFileRequestArgs;
1395 * Arguments for CompileOnSaveEmitFileRequest
1397 interface CompileOnSaveEmitFileRequestArgs extends FileRequestArgs {
1399 * if true - then file should be recompiled even if it does not have any changes.
1402 includeLinePosition?: boolean;
1403 /** if true - return response as object with emitSkipped and diagnostics */
1404 richResponse?: boolean;
1406 interface CompileOnSaveEmitFileResponse extends Response {
1407 body: boolean | EmitResult;
1409 interface EmitResult {
1410 emitSkipped: boolean;
1411 diagnostics: Diagnostic[] | DiagnosticWithLinePosition[];
1414 * Quickinfo request; value of command field is
1415 * "quickinfo". Return response giving a quick type and
1416 * documentation string for the symbol found in file at location
1419 interface QuickInfoRequest extends FileLocationRequest {
1420 command: CommandTypes.Quickinfo;
1423 * Body of QuickInfoResponse.
1425 interface QuickInfoResponseBody {
1427 * The symbol's kind (such as 'className' or 'parameterName' or plain 'text').
1429 kind: ScriptElementKind;
1431 * Optional modifiers for the kind (such as 'public').
1433 kindModifiers: string;
1435 * Starting file location of symbol.
1439 * One past last character of symbol.
1443 * Type and kind of symbol.
1445 displayString: string;
1447 * Documentation associated with symbol.
1449 documentation: string;
1451 * JSDoc tags associated with symbol.
1453 tags: JSDocTagInfo[];
1456 * Quickinfo response message.
1458 interface QuickInfoResponse extends Response {
1459 body?: QuickInfoResponseBody;
1462 * Arguments for format messages.
1464 interface FormatRequestArgs extends FileLocationRequestArgs {
1466 * Last line of range for which to format text in file.
1470 * Character offset on last line of range for which to format text in file.
1474 * Format options to be used.
1476 options?: FormatCodeSettings;
1479 * Format request; value of command field is "format". Return
1480 * response giving zero or more edit instructions. The edit
1481 * instructions will be sorted in file order. Applying the edit
1482 * instructions in reverse to file will result in correctly
1485 interface FormatRequest extends FileLocationRequest {
1486 command: CommandTypes.Format;
1487 arguments: FormatRequestArgs;
1490 * Object found in response messages defining an editing
1491 * instruction for a span of text in source code. The effect of
1492 * this instruction is to replace the text starting at start and
1493 * ending one character before end with newText. For an insertion,
1494 * the text span is empty. For a deletion, newText is empty.
1496 interface CodeEdit {
1498 * First character of the text span to edit.
1502 * One character past last character of the text span to edit.
1506 * Replace the span defined above with this string (may be
1507 * the empty string).
1511 interface FileCodeEdits {
1513 textChanges: CodeEdit[];
1515 interface CodeFixResponse extends Response {
1516 /** The code actions that are available */
1517 body?: CodeFixAction[];
1519 interface CodeAction {
1520 /** Description of the code action to display in the UI of the editor */
1521 description: string;
1522 /** Text changes to apply to each file as part of the code action */
1523 changes: FileCodeEdits[];
1524 /** A command is an opaque object that should be passed to `ApplyCodeActionCommandRequestArgs` without modification. */
1527 interface CombinedCodeActions {
1528 changes: readonly FileCodeEdits[];
1529 commands?: readonly {}[];
1531 interface CodeFixAction extends CodeAction {
1532 /** Short name to identify the fix, for use by telemetry. */
1535 * If present, one may call 'getCombinedCodeFix' with this fixId.
1536 * This may be omitted to indicate that the code fix can't be applied in a group.
1539 /** Should be present if and only if 'fixId' is. */
1540 fixAllDescription?: string;
1543 * Format and format on key response message.
1545 interface FormatResponse extends Response {
1549 * Arguments for format on key messages.
1551 interface FormatOnKeyRequestArgs extends FileLocationRequestArgs {
1553 * Key pressed (';', '\n', or '}').
1556 options?: FormatCodeSettings;
1559 * Format on key request; value of command field is
1560 * "formatonkey". Given file location and key typed (as string),
1561 * return response giving zero or more edit instructions. The
1562 * edit instructions will be sorted in file order. Applying the
1563 * edit instructions in reverse to file will result in correctly
1566 interface FormatOnKeyRequest extends FileLocationRequest {
1567 command: CommandTypes.Formatonkey;
1568 arguments: FormatOnKeyRequestArgs;
1570 type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#";
1572 * Arguments for completions messages.
1574 interface CompletionsRequestArgs extends FileLocationRequestArgs {
1576 * Optional prefix to apply to possible completions.
1580 * Character that was responsible for triggering completion.
1581 * Should be `undefined` if a user manually requested completion.
1583 triggerCharacter?: CompletionsTriggerCharacter;
1585 * @deprecated Use UserPreferences.includeCompletionsForModuleExports
1587 includeExternalModuleExports?: boolean;
1589 * @deprecated Use UserPreferences.includeCompletionsWithInsertText
1591 includeInsertTextCompletions?: boolean;
1594 * Completions request; value of command field is "completions".
1595 * Given a file location (file, line, col) and a prefix (which may
1596 * be the empty string), return the possible completions that
1597 * begin with prefix.
1599 interface CompletionsRequest extends FileLocationRequest {
1600 command: CommandTypes.Completions | CommandTypes.CompletionInfo;
1601 arguments: CompletionsRequestArgs;
1604 * Arguments for completion details request.
1606 interface CompletionDetailsRequestArgs extends FileLocationRequestArgs {
1608 * Names of one or more entries for which to obtain details.
1610 entryNames: (string | CompletionEntryIdentifier)[];
1612 interface CompletionEntryIdentifier {
1617 * Completion entry details request; value of command field is
1618 * "completionEntryDetails". Given a file location (file, line,
1619 * col) and an array of completion entry names return more
1620 * detailed information for each completion entry.
1622 interface CompletionDetailsRequest extends FileLocationRequest {
1623 command: CommandTypes.CompletionDetails;
1624 arguments: CompletionDetailsRequestArgs;
1627 * Part of a symbol description.
1629 interface SymbolDisplayPart {
1631 * Text of an item describing the symbol.
1635 * The symbol's kind (such as 'className' or 'parameterName' or plain 'text').
1640 * An item found in a completion response.
1642 interface CompletionEntry {
1644 * The symbol's name.
1648 * The symbol's kind (such as 'className' or 'parameterName').
1650 kind: ScriptElementKind;
1652 * Optional modifiers for the kind (such as 'public').
1654 kindModifiers?: string;
1656 * A string that is used for comparing completion items so that they can be ordered. This
1657 * is often the same as the name but may be different in certain circumstances.
1661 * Text to insert instead of `name`.
1662 * This is used to support bracketed completions; If `name` might be "a-b" but `insertText` would be `["a-b"]`,
1663 * coupled with `replacementSpan` to replace a dotted access with a bracket access.
1665 insertText?: string;
1667 * An optional span that indicates the text to be replaced by this completion item.
1668 * If present, this span should be used instead of the default one.
1669 * It will be set if the required span differs from the one generated by the default replacement behavior.
1671 replacementSpan?: TextSpan;
1673 * Indicates whether commiting this completion entry will require additional code actions to be
1674 * made to avoid errors. The CompletionEntryDetails will have these actions.
1678 * Identifier (not necessarily human-readable) identifying where this completion came from.
1682 * If true, this completion should be highlighted as recommended. There will only be one of these.
1683 * This will be set when we know the user should write an expression with a certain type and that type is an enum or constructable class.
1684 * Then either that enum/class or a namespace containing it will be the recommended symbol.
1686 isRecommended?: true;
1688 * If true, this completion was generated from traversing the name table of an unchecked JS file,
1689 * and therefore may not be accurate.
1691 isFromUncheckedFile?: true;
1693 * If true, this completion was for an auto-import of a module not yet in the program, but listed
1694 * in the project package.json.
1696 isPackageJsonImport?: true;
1699 * Additional completion entry details, available on demand
1701 interface CompletionEntryDetails {
1703 * The symbol's name.
1707 * The symbol's kind (such as 'className' or 'parameterName').
1709 kind: ScriptElementKind;
1711 * Optional modifiers for the kind (such as 'public').
1713 kindModifiers: string;
1715 * Display parts of the symbol (similar to quick info).
1717 displayParts: SymbolDisplayPart[];
1719 * Documentation strings for the symbol.
1721 documentation?: SymbolDisplayPart[];
1723 * JSDoc tags for the symbol.
1725 tags?: JSDocTagInfo[];
1727 * The associated code actions for this entry
1729 codeActions?: CodeAction[];
1731 * Human-readable description of the `source` from the CompletionEntry.
1733 source?: SymbolDisplayPart[];
1735 /** @deprecated Prefer CompletionInfoResponse, which supports several top-level fields in addition to the array of entries. */
1736 interface CompletionsResponse extends Response {
1737 body?: CompletionEntry[];
1739 interface CompletionInfoResponse extends Response {
1740 body?: CompletionInfo;
1742 interface CompletionInfo {
1743 readonly isGlobalCompletion: boolean;
1744 readonly isMemberCompletion: boolean;
1745 readonly isNewIdentifierLocation: boolean;
1747 * In the absence of `CompletionEntry["replacementSpan"]`, the editor may choose whether to use
1748 * this span or its default one. If `CompletionEntry["replacementSpan"]` is defined, that span
1749 * must be used to commit that completion entry.
1751 readonly optionalReplacementSpan?: TextSpan;
1752 readonly entries: readonly CompletionEntry[];
1754 interface CompletionDetailsResponse extends Response {
1755 body?: CompletionEntryDetails[];
1758 * Signature help information for a single parameter
1760 interface SignatureHelpParameter {
1762 * The parameter's name
1766 * Documentation of the parameter.
1768 documentation: SymbolDisplayPart[];
1770 * Display parts of the parameter.
1772 displayParts: SymbolDisplayPart[];
1774 * Whether the parameter is optional or not.
1776 isOptional: boolean;
1779 * Represents a single signature to show in signature help.
1781 interface SignatureHelpItem {
1783 * Whether the signature accepts a variable number of arguments.
1785 isVariadic: boolean;
1787 * The prefix display parts.
1789 prefixDisplayParts: SymbolDisplayPart[];
1791 * The suffix display parts.
1793 suffixDisplayParts: SymbolDisplayPart[];
1795 * The separator display parts.
1797 separatorDisplayParts: SymbolDisplayPart[];
1799 * The signature helps items for the parameters.
1801 parameters: SignatureHelpParameter[];
1803 * The signature's documentation
1805 documentation: SymbolDisplayPart[];
1807 * The signature's JSDoc tags
1809 tags: JSDocTagInfo[];
1812 * Signature help items found in the response of a signature help request.
1814 interface SignatureHelpItems {
1816 * The signature help items.
1818 items: SignatureHelpItem[];
1820 * The span for which signature help should appear on a signature
1822 applicableSpan: TextSpan;
1824 * The item selected in the set of available help items.
1826 selectedItemIndex: number;
1828 * The argument selected in the set of parameters.
1830 argumentIndex: number;
1832 * The argument count
1834 argumentCount: number;
1836 type SignatureHelpTriggerCharacter = "," | "(" | "<";
1837 type SignatureHelpRetriggerCharacter = SignatureHelpTriggerCharacter | ")";
1839 * Arguments of a signature help request.
1841 interface SignatureHelpRequestArgs extends FileLocationRequestArgs {
1843 * Reason why signature help was invoked.
1844 * See each individual possible
1846 triggerReason?: SignatureHelpTriggerReason;
1848 type SignatureHelpTriggerReason = SignatureHelpInvokedReason | SignatureHelpCharacterTypedReason | SignatureHelpRetriggeredReason;
1850 * Signals that the user manually requested signature help.
1851 * The language service will unconditionally attempt to provide a result.
1853 interface SignatureHelpInvokedReason {
1855 triggerCharacter?: undefined;
1858 * Signals that the signature help request came from a user typing a character.
1859 * Depending on the character and the syntactic context, the request may or may not be served a result.
1861 interface SignatureHelpCharacterTypedReason {
1862 kind: "characterTyped";
1864 * Character that was responsible for triggering signature help.
1866 triggerCharacter: SignatureHelpTriggerCharacter;
1869 * Signals that this signature help request came from typing a character or moving the cursor.
1870 * This should only occur if a signature help session was already active and the editor needs to see if it should adjust.
1871 * The language service will unconditionally attempt to provide a result.
1872 * `triggerCharacter` can be `undefined` for a retrigger caused by a cursor move.
1874 interface SignatureHelpRetriggeredReason {
1877 * Character that was responsible for triggering signature help.
1879 triggerCharacter?: SignatureHelpRetriggerCharacter;
1882 * Signature help request; value of command field is "signatureHelp".
1883 * Given a file location (file, line, col), return the signature
1886 interface SignatureHelpRequest extends FileLocationRequest {
1887 command: CommandTypes.SignatureHelp;
1888 arguments: SignatureHelpRequestArgs;
1891 * Response object for a SignatureHelpRequest.
1893 interface SignatureHelpResponse extends Response {
1894 body?: SignatureHelpItems;
1897 * Synchronous request for semantic diagnostics of one file.
1899 interface SemanticDiagnosticsSyncRequest extends FileRequest {
1900 command: CommandTypes.SemanticDiagnosticsSync;
1901 arguments: SemanticDiagnosticsSyncRequestArgs;
1903 interface SemanticDiagnosticsSyncRequestArgs extends FileRequestArgs {
1904 includeLinePosition?: boolean;
1907 * Response object for synchronous sematic diagnostics request.
1909 interface SemanticDiagnosticsSyncResponse extends Response {
1910 body?: Diagnostic[] | DiagnosticWithLinePosition[];
1912 interface SuggestionDiagnosticsSyncRequest extends FileRequest {
1913 command: CommandTypes.SuggestionDiagnosticsSync;
1914 arguments: SuggestionDiagnosticsSyncRequestArgs;
1916 type SuggestionDiagnosticsSyncRequestArgs = SemanticDiagnosticsSyncRequestArgs;
1917 type SuggestionDiagnosticsSyncResponse = SemanticDiagnosticsSyncResponse;
1919 * Synchronous request for syntactic diagnostics of one file.
1921 interface SyntacticDiagnosticsSyncRequest extends FileRequest {
1922 command: CommandTypes.SyntacticDiagnosticsSync;
1923 arguments: SyntacticDiagnosticsSyncRequestArgs;
1925 interface SyntacticDiagnosticsSyncRequestArgs extends FileRequestArgs {
1926 includeLinePosition?: boolean;
1929 * Response object for synchronous syntactic diagnostics request.
1931 interface SyntacticDiagnosticsSyncResponse extends Response {
1932 body?: Diagnostic[] | DiagnosticWithLinePosition[];
1935 * Arguments for GeterrForProject request.
1937 interface GeterrForProjectRequestArgs {
1939 * the file requesting project error list
1943 * Delay in milliseconds to wait before starting to compute
1944 * errors for the files in the file list
1949 * GeterrForProjectRequest request; value of command field is
1950 * "geterrForProject". It works similarly with 'Geterr', only
1951 * it request for every file in this project.
1953 interface GeterrForProjectRequest extends Request {
1954 command: CommandTypes.GeterrForProject;
1955 arguments: GeterrForProjectRequestArgs;
1958 * Arguments for geterr messages.
1960 interface GeterrRequestArgs {
1962 * List of file names for which to compute compiler errors.
1963 * The files will be checked in list order.
1967 * Delay in milliseconds to wait before starting to compute
1968 * errors for the files in the file list
1973 * Geterr request; value of command field is "geterr". Wait for
1974 * delay milliseconds and then, if during the wait no change or
1975 * reload messages have arrived for the first file in the files
1976 * list, get the syntactic errors for the file, field requests,
1977 * and then get the semantic errors for the file. Repeat with a
1978 * smaller delay for each subsequent file on the files list. Best
1979 * practice for an editor is to send a file list containing each
1980 * file that is currently visible, in most-recently-used order.
1982 interface GeterrRequest extends Request {
1983 command: CommandTypes.Geterr;
1984 arguments: GeterrRequestArgs;
1986 type RequestCompletedEventName = "requestCompleted";
1988 * Event that is sent when server have finished processing request with specified id.
1990 interface RequestCompletedEvent extends Event {
1991 event: RequestCompletedEventName;
1992 body: RequestCompletedEventBody;
1994 interface RequestCompletedEventBody {
1995 request_seq: number;
1998 * Item of diagnostic information found in a DiagnosticEvent message.
2000 interface Diagnostic {
2002 * Starting file location at which text applies.
2006 * The last file location at which the text applies.
2010 * Text of diagnostic message.
2014 * The category of the diagnostic message, e.g. "error", "warning", or "suggestion".
2017 reportsUnnecessary?: {};
2018 reportsDeprecated?: {};
2020 * Any related spans the diagnostic may have, such as other locations relevant to an error, such as declarartion sites
2022 relatedInformation?: DiagnosticRelatedInformation[];
2024 * The error code of the diagnostic message.
2028 * The name of the plugin reporting the message.
2032 interface DiagnosticWithFileName extends Diagnostic {
2034 * Name of the file the diagnostic is in
2039 * Represents additional spans returned with a diagnostic which are relevant to it
2041 interface DiagnosticRelatedInformation {
2043 * The category of the related information message, e.g. "error", "warning", or "suggestion".
2047 * The code used ot identify the related information
2051 * Text of related or additional information.
2055 * Associated location
2059 interface DiagnosticEventBody {
2061 * The file for which diagnostic information is reported.
2065 * An array of diagnostic information items.
2067 diagnostics: Diagnostic[];
2069 type DiagnosticEventKind = "semanticDiag" | "syntaxDiag" | "suggestionDiag";
2071 * Event message for DiagnosticEventKind event types.
2072 * These events provide syntactic and semantic errors for a file.
2074 interface DiagnosticEvent extends Event {
2075 body?: DiagnosticEventBody;
2076 event: DiagnosticEventKind;
2078 interface ConfigFileDiagnosticEventBody {
2080 * The file which trigged the searching and error-checking of the config file
2082 triggerFile: string;
2084 * The name of the found config file.
2088 * An arry of diagnostic information items for the found config file.
2090 diagnostics: DiagnosticWithFileName[];
2093 * Event message for "configFileDiag" event type.
2094 * This event provides errors for a found config file.
2096 interface ConfigFileDiagnosticEvent extends Event {
2097 body?: ConfigFileDiagnosticEventBody;
2098 event: "configFileDiag";
2100 type ProjectLanguageServiceStateEventName = "projectLanguageServiceState";
2101 interface ProjectLanguageServiceStateEvent extends Event {
2102 event: ProjectLanguageServiceStateEventName;
2103 body?: ProjectLanguageServiceStateEventBody;
2105 interface ProjectLanguageServiceStateEventBody {
2107 * Project name that has changes in the state of language service.
2108 * For configured projects this will be the config file path.
2109 * For external projects this will be the name of the projects specified when project was open.
2110 * For inferred projects this event is not raised.
2112 projectName: string;
2114 * True if language service state switched from disabled to enabled
2115 * and false otherwise.
2117 languageServiceEnabled: boolean;
2119 type ProjectsUpdatedInBackgroundEventName = "projectsUpdatedInBackground";
2120 interface ProjectsUpdatedInBackgroundEvent extends Event {
2121 event: ProjectsUpdatedInBackgroundEventName;
2122 body: ProjectsUpdatedInBackgroundEventBody;
2124 interface ProjectsUpdatedInBackgroundEventBody {
2126 * Current set of open files
2128 openFiles: string[];
2130 type ProjectLoadingStartEventName = "projectLoadingStart";
2131 interface ProjectLoadingStartEvent extends Event {
2132 event: ProjectLoadingStartEventName;
2133 body: ProjectLoadingStartEventBody;
2135 interface ProjectLoadingStartEventBody {
2136 /** name of the project */
2137 projectName: string;
2138 /** reason for loading */
2141 type ProjectLoadingFinishEventName = "projectLoadingFinish";
2142 interface ProjectLoadingFinishEvent extends Event {
2143 event: ProjectLoadingFinishEventName;
2144 body: ProjectLoadingFinishEventBody;
2146 interface ProjectLoadingFinishEventBody {
2147 /** name of the project */
2148 projectName: string;
2150 type SurveyReadyEventName = "surveyReady";
2151 interface SurveyReadyEvent extends Event {
2152 event: SurveyReadyEventName;
2153 body: SurveyReadyEventBody;
2155 interface SurveyReadyEventBody {
2156 /** Name of the survey. This is an internal machine- and programmer-friendly name */
2159 type LargeFileReferencedEventName = "largeFileReferenced";
2160 interface LargeFileReferencedEvent extends Event {
2161 event: LargeFileReferencedEventName;
2162 body: LargeFileReferencedEventBody;
2164 interface LargeFileReferencedEventBody {
2166 * name of the large file being loaded
2174 * max file size allowed on the server
2176 maxFileSize: number;
2179 * Arguments for reload request.
2181 interface ReloadRequestArgs extends FileRequestArgs {
2183 * Name of temporary file from which to reload file
2184 * contents. May be same as file.
2189 * Reload request message; value of command field is "reload".
2190 * Reload contents of file with name given by the 'file' argument
2191 * from temporary file with name given by the 'tmpfile' argument.
2192 * The two names can be identical.
2194 interface ReloadRequest extends FileRequest {
2195 command: CommandTypes.Reload;
2196 arguments: ReloadRequestArgs;
2199 * Response to "reload" request. This is just an acknowledgement, so
2200 * no body field is required.
2202 interface ReloadResponse extends Response {
2205 * Arguments for saveto request.
2207 interface SavetoRequestArgs extends FileRequestArgs {
2209 * Name of temporary file into which to save server's view of
2215 * Saveto request message; value of command field is "saveto".
2216 * For debugging purposes, save to a temporaryfile (named by
2217 * argument 'tmpfile') the contents of file named by argument
2218 * 'file'. The server does not currently send a response to a
2221 interface SavetoRequest extends FileRequest {
2222 command: CommandTypes.Saveto;
2223 arguments: SavetoRequestArgs;
2226 * Arguments for navto request message.
2228 interface NavtoRequestArgs {
2230 * Search term to navigate to from current location; term can
2231 * be '.*' or an identifier prefix.
2233 searchValue: string;
2235 * Optional limit on the number of items to return.
2237 maxResultCount?: number;
2239 * The file for the request (absolute pathname required).
2243 * Optional flag to indicate we want results for just the current file
2244 * or the entire project.
2246 currentFileOnly?: boolean;
2247 projectFileName?: string;
2250 * Navto request message; value of command field is "navto".
2251 * Return list of objects giving file locations and symbols that
2252 * match the search term given in argument 'searchTerm'. The
2253 * context for the search is given by the named file.
2255 interface NavtoRequest extends Request {
2256 command: CommandTypes.Navto;
2257 arguments: NavtoRequestArgs;
2260 * An item found in a navto response.
2262 interface NavtoItem extends FileSpan {
2264 * The symbol's name.
2268 * The symbol's kind (such as 'className' or 'parameterName').
2270 kind: ScriptElementKind;
2272 * exact, substring, or prefix.
2276 * If this was a case sensitive or insensitive match.
2278 isCaseSensitive: boolean;
2280 * Optional modifiers for the kind (such as 'public').
2282 kindModifiers?: string;
2284 * Name of symbol's container symbol (if any); for example,
2285 * the class name if symbol is a class member.
2287 containerName?: string;
2289 * Kind of symbol's container symbol (if any).
2291 containerKind?: ScriptElementKind;
2294 * Navto response message. Body is an array of navto items. Each
2295 * item gives a symbol that matched the search term.
2297 interface NavtoResponse extends Response {
2301 * Arguments for change request message.
2303 interface ChangeRequestArgs extends FormatRequestArgs {
2305 * Optional string to insert at location (file, line, offset).
2307 insertString?: string;
2310 * Change request message; value of command field is "change".
2311 * Update the server's view of the file named by argument 'file'.
2312 * Server does not currently send a response to a change request.
2314 interface ChangeRequest extends FileLocationRequest {
2315 command: CommandTypes.Change;
2316 arguments: ChangeRequestArgs;
2319 * Response to "brace" request.
2321 interface BraceResponse extends Response {
2325 * Brace matching request; value of command field is "brace".
2326 * Return response giving the file locations of matching braces
2327 * found in file at location line, offset.
2329 interface BraceRequest extends FileLocationRequest {
2330 command: CommandTypes.Brace;
2333 * NavBar items request; value of command field is "navbar".
2334 * Return response giving the list of navigation bar entries
2335 * extracted from the requested file.
2337 interface NavBarRequest extends FileRequest {
2338 command: CommandTypes.NavBar;
2341 * NavTree request; value of command field is "navtree".
2342 * Return response giving the navigation tree of the requested file.
2344 interface NavTreeRequest extends FileRequest {
2345 command: CommandTypes.NavTree;
2347 interface NavigationBarItem {
2349 * The item's display text.
2353 * The symbol's kind (such as 'className' or 'parameterName').
2355 kind: ScriptElementKind;
2357 * Optional modifiers for the kind (such as 'public').
2359 kindModifiers?: string;
2361 * The definition locations of the item.
2365 * Optional children.
2367 childItems?: NavigationBarItem[];
2369 * Number of levels deep this item should appear.
2373 /** protocol.NavigationTree is identical to ts.NavigationTree, except using protocol.TextSpan instead of ts.TextSpan */
2374 interface NavigationTree {
2376 kind: ScriptElementKind;
2377 kindModifiers: string;
2379 nameSpan: TextSpan | undefined;
2380 childItems?: NavigationTree[];
2382 type TelemetryEventName = "telemetry";
2383 interface TelemetryEvent extends Event {
2384 event: TelemetryEventName;
2385 body: TelemetryEventBody;
2387 interface TelemetryEventBody {
2388 telemetryEventName: string;
2391 type TypesInstallerInitializationFailedEventName = "typesInstallerInitializationFailed";
2392 interface TypesInstallerInitializationFailedEvent extends Event {
2393 event: TypesInstallerInitializationFailedEventName;
2394 body: TypesInstallerInitializationFailedEventBody;
2396 interface TypesInstallerInitializationFailedEventBody {
2399 type TypingsInstalledTelemetryEventName = "typingsInstalled";
2400 interface TypingsInstalledTelemetryEventBody extends TelemetryEventBody {
2401 telemetryEventName: TypingsInstalledTelemetryEventName;
2402 payload: TypingsInstalledTelemetryEventPayload;
2404 interface TypingsInstalledTelemetryEventPayload {
2406 * Comma separated list of installed typing packages
2408 installedPackages: string;
2410 * true if install request succeeded, otherwise - false
2412 installSuccess: boolean;
2414 * version of typings installer
2416 typingsInstallerVersion: string;
2418 type BeginInstallTypesEventName = "beginInstallTypes";
2419 type EndInstallTypesEventName = "endInstallTypes";
2420 interface BeginInstallTypesEvent extends Event {
2421 event: BeginInstallTypesEventName;
2422 body: BeginInstallTypesEventBody;
2424 interface EndInstallTypesEvent extends Event {
2425 event: EndInstallTypesEventName;
2426 body: EndInstallTypesEventBody;
2428 interface InstallTypesEventBody {
2430 * correlation id to match begin and end events
2434 * list of packages to install
2436 packages: readonly string[];
2438 interface BeginInstallTypesEventBody extends InstallTypesEventBody {
2440 interface EndInstallTypesEventBody extends InstallTypesEventBody {
2442 * true if installation succeeded, otherwise false
2446 interface NavBarResponse extends Response {
2447 body?: NavigationBarItem[];
2449 interface NavTreeResponse extends Response {
2450 body?: NavigationTree;
2452 interface CallHierarchyItem {
2454 kind: ScriptElementKind;
2455 kindModifiers?: string;
2458 selectionSpan: TextSpan;
2459 containerName?: string;
2461 interface CallHierarchyIncomingCall {
2462 from: CallHierarchyItem;
2463 fromSpans: TextSpan[];
2465 interface CallHierarchyOutgoingCall {
2466 to: CallHierarchyItem;
2467 fromSpans: TextSpan[];
2469 interface PrepareCallHierarchyRequest extends FileLocationRequest {
2470 command: CommandTypes.PrepareCallHierarchy;
2472 interface PrepareCallHierarchyResponse extends Response {
2473 readonly body: CallHierarchyItem | CallHierarchyItem[];
2475 interface ProvideCallHierarchyIncomingCallsRequest extends FileLocationRequest {
2476 command: CommandTypes.ProvideCallHierarchyIncomingCalls;
2478 interface ProvideCallHierarchyIncomingCallsResponse extends Response {
2479 readonly body: CallHierarchyIncomingCall[];
2481 interface ProvideCallHierarchyOutgoingCallsRequest extends FileLocationRequest {
2482 command: CommandTypes.ProvideCallHierarchyOutgoingCalls;
2484 interface ProvideCallHierarchyOutgoingCallsResponse extends Response {
2485 readonly body: CallHierarchyOutgoingCall[];
2487 const enum IndentStyle {
2492 enum SemicolonPreference {
2497 interface EditorSettings {
2498 baseIndentSize?: number;
2499 indentSize?: number;
2501 newLineCharacter?: string;
2502 convertTabsToSpaces?: boolean;
2503 indentStyle?: IndentStyle | ts.IndentStyle;
2504 trimTrailingWhitespace?: boolean;
2506 interface FormatCodeSettings extends EditorSettings {
2507 insertSpaceAfterCommaDelimiter?: boolean;
2508 insertSpaceAfterSemicolonInForStatements?: boolean;
2509 insertSpaceBeforeAndAfterBinaryOperators?: boolean;
2510 insertSpaceAfterConstructor?: boolean;
2511 insertSpaceAfterKeywordsInControlFlowStatements?: boolean;
2512 insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean;
2513 insertSpaceAfterOpeningAndBeforeClosingEmptyBraces?: boolean;
2514 insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean;
2515 insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean;
2516 insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean;
2517 insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean;
2518 insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
2519 insertSpaceAfterTypeAssertion?: boolean;
2520 insertSpaceBeforeFunctionParenthesis?: boolean;
2521 placeOpenBraceOnNewLineForFunctions?: boolean;
2522 placeOpenBraceOnNewLineForControlBlocks?: boolean;
2523 insertSpaceBeforeTypeAnnotation?: boolean;
2524 semicolons?: SemicolonPreference;
2526 interface UserPreferences {
2527 readonly disableSuggestions?: boolean;
2528 readonly quotePreference?: "auto" | "double" | "single";
2530 * If enabled, TypeScript will search through all external modules' exports and add them to the completions list.
2531 * This affects lone identifier completions but not completions on the right hand side of `obj.`.
2533 readonly includeCompletionsForModuleExports?: boolean;
2535 * If enabled, the completion list will include completions with invalid identifier names.
2536 * For those entries, The `insertText` and `replacementSpan` properties will be set to change from `.x` property access to `["x"]`.
2538 readonly includeCompletionsWithInsertText?: boolean;
2540 * Unless this option is `false`, or `includeCompletionsWithInsertText` is not enabled,
2541 * member completion lists triggered with `.` will include entries on potentially-null and potentially-undefined
2542 * values, with insertion text to replace preceding `.` tokens with `?.`.
2544 readonly includeAutomaticOptionalChainCompletions?: boolean;
2545 readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative";
2546 /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */
2547 readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js";
2548 readonly allowTextChangesInNewFiles?: boolean;
2549 readonly lazyConfiguredProjectsFromExternalProject?: boolean;
2550 readonly providePrefixAndSuffixTextForRename?: boolean;
2551 readonly provideRefactorNotApplicableReason?: boolean;
2552 readonly allowRenameOfImportPath?: boolean;
2553 readonly includePackageJsonAutoImports?: "auto" | "on" | "off";
2554 readonly generateReturnInDocTemplate?: boolean;
2556 interface CompilerOptions {
2558 allowSyntheticDefaultImports?: boolean;
2559 allowUnreachableCode?: boolean;
2560 allowUnusedLabels?: boolean;
2561 alwaysStrict?: boolean;
2565 declaration?: boolean;
2566 declarationDir?: string;
2567 disableSizeLimit?: boolean;
2568 downlevelIteration?: boolean;
2570 emitDecoratorMetadata?: boolean;
2571 experimentalDecorators?: boolean;
2572 forceConsistentCasingInFileNames?: boolean;
2573 importHelpers?: boolean;
2574 inlineSourceMap?: boolean;
2575 inlineSources?: boolean;
2576 isolatedModules?: boolean;
2577 jsx?: JsxEmit | ts.JsxEmit;
2581 maxNodeModuleJsDepth?: number;
2582 module?: ModuleKind | ts.ModuleKind;
2583 moduleResolution?: ModuleResolutionKind | ts.ModuleResolutionKind;
2584 newLine?: NewLineKind | ts.NewLineKind;
2586 noEmitHelpers?: boolean;
2587 noEmitOnError?: boolean;
2588 noErrorTruncation?: boolean;
2589 noFallthroughCasesInSwitch?: boolean;
2590 noImplicitAny?: boolean;
2591 noImplicitReturns?: boolean;
2592 noImplicitThis?: boolean;
2593 noUnusedLocals?: boolean;
2594 noUnusedParameters?: boolean;
2595 noImplicitUseStrict?: boolean;
2597 noResolve?: boolean;
2601 paths?: MapLike<string[]>;
2602 plugins?: PluginImport[];
2603 preserveConstEnums?: boolean;
2604 preserveSymlinks?: boolean;
2606 reactNamespace?: string;
2607 removeComments?: boolean;
2608 references?: ProjectReference[];
2610 rootDirs?: string[];
2611 skipLibCheck?: boolean;
2612 skipDefaultLibCheck?: boolean;
2613 sourceMap?: boolean;
2614 sourceRoot?: string;
2616 strictNullChecks?: boolean;
2617 suppressExcessPropertyErrors?: boolean;
2618 suppressImplicitAnyIndexErrors?: boolean;
2619 useDefineForClassFields?: boolean;
2620 target?: ScriptTarget | ts.ScriptTarget;
2621 traceResolution?: boolean;
2622 resolveJsonModule?: boolean;
2624 /** Paths used to used to compute primary types search locations */
2625 typeRoots?: string[];
2626 [option: string]: CompilerOptionsValue | undefined;
2628 const enum JsxEmit {
2630 Preserve = "Preserve",
2631 ReactNative = "ReactNative",
2634 const enum ModuleKind {
2636 CommonJS = "CommonJS",
2644 const enum ModuleResolutionKind {
2645 Classic = "Classic",
2648 const enum NewLineKind {
2652 const enum ScriptTarget {
2664 const enum ClassificationType {
2671 regularExpressionLiteral = 7,
2679 typeParameterName = 15,
2682 docCommentTagName = 18,
2683 jsxOpenTagName = 19,
2684 jsxCloseTagName = 20,
2685 jsxSelfClosingTagName = 21,
2688 jsxAttributeStringLiteralValue = 24,
2692 declare namespace ts.server.protocol {
2694 interface TextInsertion {
2696 /** The position in newText the caret should point to after the insertion. */
2697 caretOffset: number;
2700 interface TodoCommentDescriptor {
2705 interface TodoComment {
2706 descriptor: TodoCommentDescriptor;
2711 enum OutliningSpanKind {
2712 /** Single or multi-line comments */
2713 Comment = "comment",
2714 /** Sections marked by '// #region' and '// #endregion' comments */
2716 /** Declarations and expressions */
2718 /** Contiguous blocks of import declarations */
2722 enum HighlightSpanKind {
2724 definition = "definition",
2725 reference = "reference",
2726 writtenReference = "writtenReference"
2729 enum ScriptElementKind {
2731 warning = "warning",
2732 /** predefined type (void) or keyword (class) */
2733 keyword = "keyword",
2734 /** top level script node */
2735 scriptElement = "script",
2736 /** module foo {} */
2737 moduleElement = "module",
2739 classElement = "class",
2740 /** var x = class X {} */
2741 localClassElement = "local class",
2742 /** interface Y {} */
2743 interfaceElement = "interface",
2745 typeElement = "type",
2747 enumElement = "enum",
2748 enumMemberElement = "enum member",
2750 * Inside module and script only
2753 variableElement = "var",
2754 /** Inside function */
2755 localVariableElement = "local var",
2757 * Inside module and script only
2760 functionElement = "function",
2761 /** Inside function */
2762 localFunctionElement = "local function",
2763 /** class X { [public|private]* foo() {} } */
2764 memberFunctionElement = "method",
2765 /** class X { [public|private]* [get|set] foo:number; } */
2766 memberGetAccessorElement = "getter",
2767 memberSetAccessorElement = "setter",
2769 * class X { [public|private]* foo:number; }
2770 * interface Y { foo:number; }
2772 memberVariableElement = "property",
2773 /** class X { constructor() { } } */
2774 constructorImplementationElement = "constructor",
2775 /** interface Y { ():number; } */
2776 callSignatureElement = "call",
2777 /** interface Y { []:number; } */
2778 indexSignatureElement = "index",
2779 /** interface Y { new():Y; } */
2780 constructSignatureElement = "construct",
2781 /** function foo(*Y*: string) */
2782 parameterElement = "parameter",
2783 typeParameterElement = "type parameter",
2784 primitiveType = "primitive type",
2787 constElement = "const",
2789 directory = "directory",
2790 externalModuleName = "external module name",
2792 * <JsxTagName attribute1 attribute2={0} />
2794 jsxAttribute = "JSX attribute",
2795 /** String literal */
2799 export interface TypeAcquisition {
2801 * @deprecated typingOptions.enableAutoDiscovery
2802 * Use typeAcquisition.enable instead.
2804 enableAutoDiscovery?: boolean;
2808 disableFilenameBasedTypeAcquisition?: boolean;
2809 [option: string]: CompilerOptionsValue | undefined;
2812 export type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | PluginImport[] | ProjectReference[] | null | undefined;
2814 export interface FileExtensionInfo {
2816 isMixedContent: boolean;
2817 scriptKind?: ScriptKind;
2820 interface JSDocTagInfo {
2826 * Type of objects whose values are all of the same type.
2827 * The `in` and `for-in` operators can *not* be safely used,
2828 * since `Object.prototype` may be modified by outside code.
2830 interface MapLike<T> {
2834 export interface PluginImport {
2838 export interface ProjectReference {
2839 /** A normalized path on disk */
2841 /** The path as the user originally wrote it */
2842 originalPath?: string;
2843 /** True if the output of this reference should be prepended to the output of this project. Only valid for --outFile compilations */
2845 /** True if it is intended that this reference form a circularity */
2849 declare namespace ts {
2850 // these types are empty stubs for types from services and should not be used directly
2851 export type EndOfLineState = never;
2852 export type ScriptKind = never;
2853 export type WatchFileKind = never;
2854 export type WatchDirectoryKind = never;
2855 export type PollingWatchKind = never;
2856 export type IndentStyle = never;
2857 export type JsxEmit = never;
2858 export type ModuleKind = never;
2859 export type ModuleResolutionKind = never;
2860 export type NewLineKind = never;
2861 export type ScriptTarget = never;
2863 import protocol = ts.server.protocol;
2865 export as namespace protocol;