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