forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsserverlibrary.d.ts
More file actions
11893 lines (11893 loc) · 498 KB
/
tsserverlibrary.d.ts
File metadata and controls
11893 lines (11893 loc) · 498 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/// <reference path="../../src/server/types.d.ts" />
declare namespace ts.server.protocol {
namespace CommandTypes {
type Brace = "brace";
type BraceFull = "brace-full";
type BraceCompletion = "braceCompletion";
type Change = "change";
type Close = "close";
type Completions = "completions";
type CompletionsFull = "completions-full";
type CompletionDetails = "completionEntryDetails";
type CompileOnSaveAffectedFileList = "compileOnSaveAffectedFileList";
type CompileOnSaveEmitFile = "compileOnSaveEmitFile";
type Configure = "configure";
type Definition = "definition";
type DefinitionFull = "definition-full";
type Implementation = "implementation";
type ImplementationFull = "implementation-full";
type Exit = "exit";
type Format = "format";
type Formatonkey = "formatonkey";
type FormatFull = "format-full";
type FormatonkeyFull = "formatonkey-full";
type FormatRangeFull = "formatRange-full";
type Geterr = "geterr";
type GeterrForProject = "geterrForProject";
type SemanticDiagnosticsSync = "semanticDiagnosticsSync";
type SyntacticDiagnosticsSync = "syntacticDiagnosticsSync";
type NavBar = "navbar";
type NavBarFull = "navbar-full";
type Navto = "navto";
type NavtoFull = "navto-full";
type NavTree = "navtree";
type NavTreeFull = "navtree-full";
type Occurrences = "occurrences";
type DocumentHighlights = "documentHighlights";
type DocumentHighlightsFull = "documentHighlights-full";
type Open = "open";
type Quickinfo = "quickinfo";
type QuickinfoFull = "quickinfo-full";
type References = "references";
type ReferencesFull = "references-full";
type Reload = "reload";
type Rename = "rename";
type RenameInfoFull = "rename-full";
type RenameLocationsFull = "renameLocations-full";
type Saveto = "saveto";
type SignatureHelp = "signatureHelp";
type SignatureHelpFull = "signatureHelp-full";
type TypeDefinition = "typeDefinition";
type ProjectInfo = "projectInfo";
type ReloadProjects = "reloadProjects";
type Unknown = "unknown";
type OpenExternalProject = "openExternalProject";
type OpenExternalProjects = "openExternalProjects";
type CloseExternalProject = "closeExternalProject";
type SynchronizeProjectList = "synchronizeProjectList";
type ApplyChangedToOpenFiles = "applyChangedToOpenFiles";
type EncodedSemanticClassificationsFull = "encodedSemanticClassifications-full";
type Cleanup = "cleanup";
type OutliningSpans = "outliningSpans";
type TodoComments = "todoComments";
type Indentation = "indentation";
type DocCommentTemplate = "docCommentTemplate";
type CompilerOptionsDiagnosticsFull = "compilerOptionsDiagnostics-full";
type NameOrDottedNameSpan = "nameOrDottedNameSpan";
type BreakpointStatement = "breakpointStatement";
type CompilerOptionsForInferredProjects = "compilerOptionsForInferredProjects";
type GetCodeFixes = "getCodeFixes";
type GetCodeFixesFull = "getCodeFixes-full";
type GetSupportedCodeFixes = "getSupportedCodeFixes";
}
interface Message {
seq: number;
type: "request" | "response" | "event";
}
interface Request extends Message {
command: string;
arguments?: any;
}
interface ReloadProjectsRequest extends Message {
command: CommandTypes.ReloadProjects;
}
interface Event extends Message {
event: string;
body?: any;
}
interface Response extends Message {
request_seq: number;
success: boolean;
command: string;
message?: string;
body?: any;
}
interface FileRequestArgs {
file: string;
projectFileName?: string;
}
interface DocCommentTemplateRequest extends FileLocationRequest {
command: CommandTypes.DocCommentTemplate;
}
interface DocCommandTemplateResponse extends Response {
body?: TextInsertion;
}
interface TodoCommentRequest extends FileRequest {
command: CommandTypes.TodoComments;
arguments: TodoCommentRequestArgs;
}
interface TodoCommentRequestArgs extends FileRequestArgs {
descriptors: TodoCommentDescriptor[];
}
interface TodoCommentsResponse extends Response {
body?: TodoComment[];
}
interface OutliningSpansRequest extends FileRequest {
command: CommandTypes.OutliningSpans;
}
interface OutliningSpansResponse extends Response {
body?: OutliningSpan[];
}
interface IndentationRequest extends FileLocationRequest {
command: CommandTypes.Indentation;
arguments: IndentationRequestArgs;
}
interface IndentationResponse extends Response {
body?: IndentationResult;
}
interface IndentationResult {
position: number;
indentation: number;
}
interface IndentationRequestArgs extends FileLocationRequestArgs {
options?: EditorSettings;
}
interface ProjectInfoRequestArgs extends FileRequestArgs {
needFileNameList: boolean;
}
interface ProjectInfoRequest extends Request {
command: CommandTypes.ProjectInfo;
arguments: ProjectInfoRequestArgs;
}
interface CompilerOptionsDiagnosticsRequest extends Request {
arguments: CompilerOptionsDiagnosticsRequestArgs;
}
interface CompilerOptionsDiagnosticsRequestArgs {
projectFileName: string;
}
interface ProjectInfo {
configFileName: string;
fileNames?: string[];
languageServiceDisabled?: boolean;
}
interface DiagnosticWithLinePosition {
message: string;
start: number;
length: number;
startLocation: Location;
endLocation: Location;
category: string;
code: number;
}
interface ProjectInfoResponse extends Response {
body?: ProjectInfo;
}
interface FileRequest extends Request {
arguments: FileRequestArgs;
}
interface FileLocationRequestArgs extends FileRequestArgs {
line: number;
offset: number;
position?: number;
}
interface CodeFixRequest extends Request {
command: CommandTypes.GetCodeFixes;
arguments: CodeFixRequestArgs;
}
interface CodeFixRequestArgs extends FileRequestArgs {
startLine: number;
startOffset: number;
startPosition?: number;
endLine: number;
endOffset: number;
endPosition?: number;
errorCodes?: number[];
}
interface GetCodeFixesResponse extends Response {
body?: CodeAction[];
}
interface FileLocationRequest extends FileRequest {
arguments: FileLocationRequestArgs;
}
interface GetSupportedCodeFixesRequest extends Request {
command: CommandTypes.GetSupportedCodeFixes;
}
interface GetSupportedCodeFixesResponse extends Response {
body?: string[];
}
interface EncodedSemanticClassificationsRequest extends FileRequest {
arguments: EncodedSemanticClassificationsRequestArgs;
}
interface EncodedSemanticClassificationsRequestArgs extends FileRequestArgs {
start: number;
length: number;
}
interface DocumentHighlightsRequestArgs extends FileLocationRequestArgs {
filesToSearch: string[];
}
interface DefinitionRequest extends FileLocationRequest {
command: CommandTypes.Definition;
}
interface TypeDefinitionRequest extends FileLocationRequest {
command: CommandTypes.TypeDefinition;
}
interface ImplementationRequest extends FileLocationRequest {
command: CommandTypes.Implementation;
}
interface Location {
line: number;
offset: number;
}
interface TextSpan {
start: Location;
end: Location;
}
interface FileSpan extends TextSpan {
file: string;
}
interface DefinitionResponse extends Response {
body?: FileSpan[];
}
interface TypeDefinitionResponse extends Response {
body?: FileSpan[];
}
interface ImplementationResponse extends Response {
body?: FileSpan[];
}
interface BraceCompletionRequest extends FileLocationRequest {
command: CommandTypes.BraceCompletion;
arguments: BraceCompletionRequestArgs;
}
interface BraceCompletionRequestArgs extends FileLocationRequestArgs {
openingBrace: string;
}
interface OccurrencesRequest extends FileLocationRequest {
command: CommandTypes.Occurrences;
}
interface OccurrencesResponseItem extends FileSpan {
isWriteAccess: boolean;
}
interface OccurrencesResponse extends Response {
body?: OccurrencesResponseItem[];
}
interface DocumentHighlightsRequest extends FileLocationRequest {
command: CommandTypes.DocumentHighlights;
arguments: DocumentHighlightsRequestArgs;
}
interface HighlightSpan extends TextSpan {
kind: string;
}
interface DocumentHighlightsItem {
file: string;
highlightSpans: HighlightSpan[];
}
interface DocumentHighlightsResponse extends Response {
body?: DocumentHighlightsItem[];
}
interface ReferencesRequest extends FileLocationRequest {
command: CommandTypes.References;
}
interface ReferencesResponseItem extends FileSpan {
lineText: string;
isWriteAccess: boolean;
isDefinition: boolean;
}
interface ReferencesResponseBody {
refs: ReferencesResponseItem[];
symbolName: string;
symbolStartOffset: number;
symbolDisplayString: string;
}
interface ReferencesResponse extends Response {
body?: ReferencesResponseBody;
}
interface RenameRequestArgs extends FileLocationRequestArgs {
findInComments?: boolean;
findInStrings?: boolean;
}
interface RenameRequest extends FileLocationRequest {
command: CommandTypes.Rename;
arguments: RenameRequestArgs;
}
interface RenameInfo {
canRename: boolean;
localizedErrorMessage?: string;
displayName: string;
fullDisplayName: string;
kind: string;
kindModifiers: string;
}
interface SpanGroup {
file: string;
locs: TextSpan[];
}
interface RenameResponseBody {
info: RenameInfo;
locs: SpanGroup[];
}
interface RenameResponse extends Response {
body?: RenameResponseBody;
}
interface ExternalFile {
fileName: string;
scriptKind?: ScriptKindName | ts.ScriptKind;
hasMixedContent?: boolean;
content?: string;
}
interface ExternalProject {
projectFileName: string;
rootFiles: ExternalFile[];
options: ExternalProjectCompilerOptions;
typingOptions?: TypeAcquisition;
typeAcquisition?: TypeAcquisition;
}
interface CompileOnSaveMixin {
compileOnSave?: boolean;
}
type ExternalProjectCompilerOptions = CompilerOptions & CompileOnSaveMixin;
interface ProjectVersionInfo {
projectName: string;
isInferred: boolean;
version: number;
options: ts.CompilerOptions;
languageServiceDisabled: boolean;
}
interface ProjectChanges {
added: string[];
removed: string[];
updated: string[];
}
interface ProjectFiles {
info?: ProjectVersionInfo;
files?: string[];
changes?: ProjectChanges;
}
interface ProjectFilesWithDiagnostics extends ProjectFiles {
projectErrors: DiagnosticWithLinePosition[];
}
interface ChangedOpenFile {
fileName: string;
changes: ts.TextChange[];
}
interface ConfigureRequestArguments {
hostInfo?: string;
file?: string;
formatOptions?: FormatCodeSettings;
extraFileExtensions?: FileExtensionInfo[];
}
interface ConfigureRequest extends Request {
command: CommandTypes.Configure;
arguments: ConfigureRequestArguments;
}
interface ConfigureResponse extends Response {
}
interface OpenRequestArgs extends FileRequestArgs {
fileContent?: string;
scriptKindName?: ScriptKindName;
}
type ScriptKindName = "TS" | "JS" | "TSX" | "JSX";
interface OpenRequest extends Request {
command: CommandTypes.Open;
arguments: OpenRequestArgs;
}
interface OpenExternalProjectRequest extends Request {
command: CommandTypes.OpenExternalProject;
arguments: OpenExternalProjectArgs;
}
type OpenExternalProjectArgs = ExternalProject;
interface OpenExternalProjectsRequest extends Request {
command: CommandTypes.OpenExternalProjects;
arguments: OpenExternalProjectsArgs;
}
interface OpenExternalProjectsArgs {
projects: ExternalProject[];
}
interface OpenExternalProjectResponse extends Response {
}
interface OpenExternalProjectsResponse extends Response {
}
interface CloseExternalProjectRequest extends Request {
command: CommandTypes.CloseExternalProject;
arguments: CloseExternalProjectRequestArgs;
}
interface CloseExternalProjectRequestArgs {
projectFileName: string;
}
interface CloseExternalProjectResponse extends Response {
}
interface SynchronizeProjectListRequest extends Request {
arguments: SynchronizeProjectListRequestArgs;
}
interface SynchronizeProjectListRequestArgs {
knownProjects: protocol.ProjectVersionInfo[];
}
interface ApplyChangedToOpenFilesRequest extends Request {
arguments: ApplyChangedToOpenFilesRequestArgs;
}
interface ApplyChangedToOpenFilesRequestArgs {
openFiles?: ExternalFile[];
changedFiles?: ChangedOpenFile[];
closedFiles?: string[];
}
interface SetCompilerOptionsForInferredProjectsRequest extends Request {
command: CommandTypes.CompilerOptionsForInferredProjects;
arguments: SetCompilerOptionsForInferredProjectsArgs;
}
interface SetCompilerOptionsForInferredProjectsArgs {
options: ExternalProjectCompilerOptions;
}
interface SetCompilerOptionsForInferredProjectsResponse extends Response {
}
interface ExitRequest extends Request {
command: CommandTypes.Exit;
}
interface CloseRequest extends FileRequest {
command: CommandTypes.Close;
}
interface CompileOnSaveAffectedFileListRequest extends FileRequest {
command: CommandTypes.CompileOnSaveAffectedFileList;
}
interface CompileOnSaveAffectedFileListSingleProject {
projectFileName: string;
fileNames: string[];
}
interface CompileOnSaveAffectedFileListResponse extends Response {
body: CompileOnSaveAffectedFileListSingleProject[];
}
interface CompileOnSaveEmitFileRequest extends FileRequest {
command: CommandTypes.CompileOnSaveEmitFile;
arguments: CompileOnSaveEmitFileRequestArgs;
}
interface CompileOnSaveEmitFileRequestArgs extends FileRequestArgs {
forced?: boolean;
}
interface QuickInfoRequest extends FileLocationRequest {
command: CommandTypes.Quickinfo;
}
interface QuickInfoResponseBody {
kind: string;
kindModifiers: string;
start: Location;
end: Location;
displayString: string;
documentation: string;
}
interface QuickInfoResponse extends Response {
body?: QuickInfoResponseBody;
}
interface FormatRequestArgs extends FileLocationRequestArgs {
endLine: number;
endOffset: number;
endPosition?: number;
options?: FormatCodeSettings;
}
interface FormatRequest extends FileLocationRequest {
command: CommandTypes.Format;
arguments: FormatRequestArgs;
}
interface CodeEdit {
start: Location;
end: Location;
newText: string;
}
interface FileCodeEdits {
fileName: string;
textChanges: CodeEdit[];
}
interface CodeFixResponse extends Response {
body?: CodeAction[];
}
interface CodeAction {
description: string;
changes: FileCodeEdits[];
}
interface FormatResponse extends Response {
body?: CodeEdit[];
}
interface FormatOnKeyRequestArgs extends FileLocationRequestArgs {
key: string;
options?: FormatCodeSettings;
}
interface FormatOnKeyRequest extends FileLocationRequest {
command: CommandTypes.Formatonkey;
arguments: FormatOnKeyRequestArgs;
}
interface CompletionsRequestArgs extends FileLocationRequestArgs {
prefix?: string;
}
interface CompletionsRequest extends FileLocationRequest {
command: CommandTypes.Completions;
arguments: CompletionsRequestArgs;
}
interface CompletionDetailsRequestArgs extends FileLocationRequestArgs {
entryNames: string[];
}
interface CompletionDetailsRequest extends FileLocationRequest {
command: CommandTypes.CompletionDetails;
arguments: CompletionDetailsRequestArgs;
}
interface SymbolDisplayPart {
text: string;
kind: string;
}
interface CompletionEntry {
name: string;
kind: string;
kindModifiers: string;
sortText: string;
replacementSpan?: TextSpan;
}
interface CompletionEntryDetails {
name: string;
kind: string;
kindModifiers: string;
displayParts: SymbolDisplayPart[];
documentation: SymbolDisplayPart[];
}
interface CompletionsResponse extends Response {
body?: CompletionEntry[];
}
interface CompletionDetailsResponse extends Response {
body?: CompletionEntryDetails[];
}
interface SignatureHelpParameter {
name: string;
documentation: SymbolDisplayPart[];
displayParts: SymbolDisplayPart[];
isOptional: boolean;
}
interface SignatureHelpItem {
isVariadic: boolean;
prefixDisplayParts: SymbolDisplayPart[];
suffixDisplayParts: SymbolDisplayPart[];
separatorDisplayParts: SymbolDisplayPart[];
parameters: SignatureHelpParameter[];
documentation: SymbolDisplayPart[];
}
interface SignatureHelpItems {
items: SignatureHelpItem[];
applicableSpan: TextSpan;
selectedItemIndex: number;
argumentIndex: number;
argumentCount: number;
}
interface SignatureHelpRequestArgs extends FileLocationRequestArgs {
}
interface SignatureHelpRequest extends FileLocationRequest {
command: CommandTypes.SignatureHelp;
arguments: SignatureHelpRequestArgs;
}
interface SignatureHelpResponse extends Response {
body?: SignatureHelpItems;
}
interface SemanticDiagnosticsSyncRequest extends FileRequest {
command: CommandTypes.SemanticDiagnosticsSync;
arguments: SemanticDiagnosticsSyncRequestArgs;
}
interface SemanticDiagnosticsSyncRequestArgs extends FileRequestArgs {
includeLinePosition?: boolean;
}
interface SemanticDiagnosticsSyncResponse extends Response {
body?: Diagnostic[] | DiagnosticWithLinePosition[];
}
interface SyntacticDiagnosticsSyncRequest extends FileRequest {
command: CommandTypes.SyntacticDiagnosticsSync;
arguments: SyntacticDiagnosticsSyncRequestArgs;
}
interface SyntacticDiagnosticsSyncRequestArgs extends FileRequestArgs {
includeLinePosition?: boolean;
}
interface SyntacticDiagnosticsSyncResponse extends Response {
body?: Diagnostic[] | DiagnosticWithLinePosition[];
}
interface GeterrForProjectRequestArgs {
file: string;
delay: number;
}
interface GeterrForProjectRequest extends Request {
command: CommandTypes.GeterrForProject;
arguments: GeterrForProjectRequestArgs;
}
interface GeterrRequestArgs {
files: string[];
delay: number;
}
interface GeterrRequest extends Request {
command: CommandTypes.Geterr;
arguments: GeterrRequestArgs;
}
interface Diagnostic {
start: Location;
end: Location;
text: string;
code?: number;
}
interface DiagnosticEventBody {
file: string;
diagnostics: Diagnostic[];
}
interface DiagnosticEvent extends Event {
body?: DiagnosticEventBody;
}
interface ConfigFileDiagnosticEventBody {
triggerFile: string;
configFile: string;
diagnostics: Diagnostic[];
}
interface ConfigFileDiagnosticEvent extends Event {
body?: ConfigFileDiagnosticEventBody;
event: "configFileDiag";
}
type ProjectLanguageServiceStateEventName = "projectLanguageServiceState";
interface ProjectLanguageServiceStateEvent extends Event {
event: ProjectLanguageServiceStateEventName;
body?: ProjectLanguageServiceStateEventBody;
}
interface ProjectLanguageServiceStateEventBody {
projectName: string;
languageServiceEnabled: boolean;
}
interface ReloadRequestArgs extends FileRequestArgs {
tmpfile: string;
}
interface ReloadRequest extends FileRequest {
command: CommandTypes.Reload;
arguments: ReloadRequestArgs;
}
interface ReloadResponse extends Response {
}
interface SavetoRequestArgs extends FileRequestArgs {
tmpfile: string;
}
interface SavetoRequest extends FileRequest {
command: CommandTypes.Saveto;
arguments: SavetoRequestArgs;
}
interface NavtoRequestArgs extends FileRequestArgs {
searchValue: string;
maxResultCount?: number;
currentFileOnly?: boolean;
projectFileName?: string;
}
interface NavtoRequest extends FileRequest {
command: CommandTypes.Navto;
arguments: NavtoRequestArgs;
}
interface NavtoItem {
name: string;
kind: string;
matchKind?: string;
isCaseSensitive?: boolean;
kindModifiers?: string;
file: string;
start: Location;
end: Location;
containerName?: string;
containerKind?: string;
}
interface NavtoResponse extends Response {
body?: NavtoItem[];
}
interface ChangeRequestArgs extends FormatRequestArgs {
insertString?: string;
}
interface ChangeRequest extends FileLocationRequest {
command: CommandTypes.Change;
arguments: ChangeRequestArgs;
}
interface BraceResponse extends Response {
body?: TextSpan[];
}
interface BraceRequest extends FileLocationRequest {
command: CommandTypes.Brace;
}
interface NavBarRequest extends FileRequest {
command: CommandTypes.NavBar;
}
interface NavTreeRequest extends FileRequest {
command: CommandTypes.NavTree;
}
interface NavigationBarItem {
text: string;
kind: string;
kindModifiers?: string;
spans: TextSpan[];
childItems?: NavigationBarItem[];
indent: number;
}
interface NavigationTree {
text: string;
kind: string;
kindModifiers: string;
spans: TextSpan[];
childItems?: NavigationTree[];
}
type TelemetryEventName = "telemetry";
interface TelemetryEvent extends Event {
event: TelemetryEventName;
body: TelemetryEventBody;
}
interface TelemetryEventBody {
telemetryEventName: string;
payload: any;
}
type TypingsInstalledTelemetryEventName = "typingsInstalled";
interface TypingsInstalledTelemetryEventBody extends TelemetryEventBody {
telemetryEventName: TypingsInstalledTelemetryEventName;
payload: TypingsInstalledTelemetryEventPayload;
}
interface TypingsInstalledTelemetryEventPayload {
installedPackages: string;
installSuccess: boolean;
typingsInstallerVersion: string;
}
type BeginInstallTypesEventName = "beginInstallTypes";
type EndInstallTypesEventName = "endInstallTypes";
interface BeginInstallTypesEvent extends Event {
event: BeginInstallTypesEventName;
body: BeginInstallTypesEventBody;
}
interface EndInstallTypesEvent extends Event {
event: EndInstallTypesEventName;
body: EndInstallTypesEventBody;
}
interface InstallTypesEventBody {
eventId: number;
packages: ReadonlyArray<string>;
}
interface BeginInstallTypesEventBody extends InstallTypesEventBody {
}
interface EndInstallTypesEventBody extends InstallTypesEventBody {
success: boolean;
}
interface NavBarResponse extends Response {
body?: NavigationBarItem[];
}
interface NavTreeResponse extends Response {
body?: NavigationTree;
}
namespace IndentStyle {
type None = "None";
type Block = "Block";
type Smart = "Smart";
}
type IndentStyle = IndentStyle.None | IndentStyle.Block | IndentStyle.Smart;
interface EditorSettings {
baseIndentSize?: number;
indentSize?: number;
tabSize?: number;
newLineCharacter?: string;
convertTabsToSpaces?: boolean;
indentStyle?: IndentStyle | ts.IndentStyle;
}
interface FormatCodeSettings extends EditorSettings {
insertSpaceAfterCommaDelimiter?: boolean;
insertSpaceAfterSemicolonInForStatements?: boolean;
insertSpaceBeforeAndAfterBinaryOperators?: boolean;
insertSpaceAfterKeywordsInControlFlowStatements?: boolean;
insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean;
insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean;
insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean;
insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean;
insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
placeOpenBraceOnNewLineForFunctions?: boolean;
placeOpenBraceOnNewLineForControlBlocks?: boolean;
}
interface CompilerOptions {
allowJs?: boolean;
allowSyntheticDefaultImports?: boolean;
allowUnreachableCode?: boolean;
allowUnusedLabels?: boolean;
baseUrl?: string;
charset?: string;
declaration?: boolean;
declarationDir?: string;
disableSizeLimit?: boolean;
emitBOM?: boolean;
emitDecoratorMetadata?: boolean;
experimentalDecorators?: boolean;
forceConsistentCasingInFileNames?: boolean;
inlineSourceMap?: boolean;
inlineSources?: boolean;
isolatedModules?: boolean;
jsx?: JsxEmit | ts.JsxEmit;
lib?: string[];
locale?: string;
mapRoot?: string;
maxNodeModuleJsDepth?: number;
module?: ModuleKind | ts.ModuleKind;
moduleResolution?: ModuleResolutionKind | ts.ModuleResolutionKind;
newLine?: NewLineKind | ts.NewLineKind;
noEmit?: boolean;
noEmitHelpers?: boolean;
noEmitOnError?: boolean;
noErrorTruncation?: boolean;
noFallthroughCasesInSwitch?: boolean;
noImplicitAny?: boolean;
noImplicitReturns?: boolean;
noImplicitThis?: boolean;
noUnusedLocals?: boolean;
noUnusedParameters?: boolean;
noImplicitUseStrict?: boolean;
noLib?: boolean;
noResolve?: boolean;
out?: string;
outDir?: string;
outFile?: string;
paths?: MapLike<string[]>;
preserveConstEnums?: boolean;
project?: string;
reactNamespace?: string;
removeComments?: boolean;
rootDir?: string;
rootDirs?: string[];
skipLibCheck?: boolean;
skipDefaultLibCheck?: boolean;
sourceMap?: boolean;
sourceRoot?: string;
strictNullChecks?: boolean;
suppressExcessPropertyErrors?: boolean;
suppressImplicitAnyIndexErrors?: boolean;
target?: ScriptTarget | ts.ScriptTarget;
traceResolution?: boolean;
types?: string[];
typeRoots?: string[];
[option: string]: CompilerOptionsValue | undefined;
}
namespace JsxEmit {
type None = "None";
type Preserve = "Preserve";
type React = "React";
}
type JsxEmit = JsxEmit.None | JsxEmit.Preserve | JsxEmit.React;
namespace ModuleKind {
type None = "None";
type CommonJS = "CommonJS";
type AMD = "AMD";
type UMD = "UMD";
type System = "System";
type ES6 = "ES6";
type ES2015 = "ES2015";
}
type ModuleKind = ModuleKind.None | ModuleKind.CommonJS | ModuleKind.AMD | ModuleKind.UMD | ModuleKind.System | ModuleKind.ES6 | ModuleKind.ES2015;
namespace ModuleResolutionKind {
type Classic = "Classic";
type Node = "Node";
}
type ModuleResolutionKind = ModuleResolutionKind.Classic | ModuleResolutionKind.Node;
namespace NewLineKind {
type Crlf = "Crlf";
type Lf = "Lf";
}
type NewLineKind = NewLineKind.Crlf | NewLineKind.Lf;
namespace ScriptTarget {
type ES3 = "ES3";
type ES5 = "ES5";
type ES6 = "ES6";
type ES2015 = "ES2015";
}
type ScriptTarget = ScriptTarget.ES3 | ScriptTarget.ES5 | ScriptTarget.ES6 | ScriptTarget.ES2015;
}
declare namespace ts {
interface MapLike<T> {
[index: string]: T;
}
interface Map<T> extends MapLike<T> {
__mapBrand: any;
}
type Path = string & {
__pathBrand: any;
};
interface FileMap<T> {
get(fileName: Path): T;
set(fileName: Path, value: T): void;
contains(fileName: Path): boolean;
remove(fileName: Path): void;
forEachValue(f: (key: Path, v: T) => void): void;
getKeys(): Path[];
clear(): void;
}
interface TextRange {
pos: number;
end: number;
}
const enum SyntaxKind {
Unknown = 0,
EndOfFileToken = 1,
SingleLineCommentTrivia = 2,
MultiLineCommentTrivia = 3,
NewLineTrivia = 4,
WhitespaceTrivia = 5,
ShebangTrivia = 6,
ConflictMarkerTrivia = 7,
NumericLiteral = 8,
StringLiteral = 9,
JsxText = 10,
RegularExpressionLiteral = 11,
NoSubstitutionTemplateLiteral = 12,
TemplateHead = 13,
TemplateMiddle = 14,
TemplateTail = 15,
OpenBraceToken = 16,
CloseBraceToken = 17,
OpenParenToken = 18,
CloseParenToken = 19,
OpenBracketToken = 20,
CloseBracketToken = 21,
DotToken = 22,
DotDotDotToken = 23,
SemicolonToken = 24,
CommaToken = 25,
LessThanToken = 26,
LessThanSlashToken = 27,
GreaterThanToken = 28,
LessThanEqualsToken = 29,
GreaterThanEqualsToken = 30,
EqualsEqualsToken = 31,
ExclamationEqualsToken = 32,
EqualsEqualsEqualsToken = 33,
ExclamationEqualsEqualsToken = 34,
EqualsGreaterThanToken = 35,
PlusToken = 36,
MinusToken = 37,
AsteriskToken = 38,
AsteriskAsteriskToken = 39,
SlashToken = 40,
PercentToken = 41,
PlusPlusToken = 42,
MinusMinusToken = 43,
LessThanLessThanToken = 44,
GreaterThanGreaterThanToken = 45,
GreaterThanGreaterThanGreaterThanToken = 46,
AmpersandToken = 47,
BarToken = 48,
CaretToken = 49,
ExclamationToken = 50,
TildeToken = 51,
AmpersandAmpersandToken = 52,
BarBarToken = 53,
QuestionToken = 54,
ColonToken = 55,
AtToken = 56,
EqualsToken = 57,
PlusEqualsToken = 58,
MinusEqualsToken = 59,
AsteriskEqualsToken = 60,
AsteriskAsteriskEqualsToken = 61,
SlashEqualsToken = 62,
PercentEqualsToken = 63,
LessThanLessThanEqualsToken = 64,
GreaterThanGreaterThanEqualsToken = 65,
GreaterThanGreaterThanGreaterThanEqualsToken = 66,
AmpersandEqualsToken = 67,
BarEqualsToken = 68,
CaretEqualsToken = 69,
Identifier = 70,
BreakKeyword = 71,
CaseKeyword = 72,
CatchKeyword = 73,
ClassKeyword = 74,
ConstKeyword = 75,
ContinueKeyword = 76,
DebuggerKeyword = 77,
DefaultKeyword = 78,
DeleteKeyword = 79,
DoKeyword = 80,
ElseKeyword = 81,
EnumKeyword = 82,
ExportKeyword = 83,
ExtendsKeyword = 84,
FalseKeyword = 85,
FinallyKeyword = 86,
ForKeyword = 87,
FunctionKeyword = 88,
IfKeyword = 89,
ImportKeyword = 90,
InKeyword = 91,
InstanceOfKeyword = 92,
NewKeyword = 93,
NullKeyword = 94,
ReturnKeyword = 95,
SuperKeyword = 96,
SwitchKeyword = 97,
ThisKeyword = 98,
ThrowKeyword = 99,
TrueKeyword = 100,
TryKeyword = 101,
TypeOfKeyword = 102,
VarKeyword = 103,
VoidKeyword = 104,
WhileKeyword = 105,