@@ -22,31 +22,29 @@ var debugObjectHost = (<any>this);
22
22
23
23
module ts {
24
24
export interface ScriptSnapshotShim {
25
- // Get's a portion of the script snapshot specified by [start, end).
25
+ /** Get's a portion of the script snapshot specified by [start, end). */
26
26
getText ( start : number , end : number ) : string ;
27
27
28
- // Get's the length of this script snapshot.
28
+ /** Get's the length of this script snapshot. */
29
29
getLength ( ) : number ;
30
30
31
- // This call returns the JSON encoded array of the type:
32
- // number[]
31
+ /** This call returns the JSON encoded array of the type: number[] */
33
32
getLineStartPositions ( ) : string ;
34
33
35
- // Returns a JSON encoded value of the type:
36
- // { span: { start: number; length: number }; newLength: number }
37
- //
38
- // Or null value if there was no change.
34
+ /**
35
+ * Returns a JSON encoded value of the type:
36
+ * { span: { start: number; length: number }; newLength: number }
37
+ *
38
+ * Or null value if there was no change.
39
+ */
39
40
getChangeRange ( oldSnapshot : ScriptSnapshotShim ) : string ;
40
41
}
41
42
42
- //
43
- // Public interface of the host of a language service shim instance.
44
- //
43
+ /** Public interface of the host of a language service shim instance.*/
45
44
export interface LanguageServiceShimHost extends Logger {
46
45
getCompilationSettings ( ) : string ;
47
46
48
- // Returns a JSON encoded value of the type:
49
- // string[]
47
+ /** Returns a JSON encoded value of the type: string[] */
50
48
getScriptFileNames ( ) : string ;
51
49
getScriptVersion ( fileName : string ) : string ;
52
50
getScriptIsOpen ( fileName : string ) : boolean ;
@@ -57,9 +55,7 @@ module ts {
57
55
getDefaultLibFilename ( ) : string ;
58
56
}
59
57
60
- //
61
- // Public interface of of a language service instance shim.
62
- //
58
+ /** Public interface of a language service instance shim. */
63
59
export interface ShimFactory {
64
60
registerShim ( shim : Shim ) : void ;
65
61
unregisterShim ( shim : Shim ) : void ;
@@ -96,38 +92,54 @@ module ts {
96
92
getSignatureHelpItems ( fileName : string , position : number ) : string ;
97
93
getSignatureHelpCurrentArgumentState ( fileName : string , position : number , applicableSpanStart : number ) : string ;
98
94
99
- // Returns a JSON encoded value of the type:
100
- // { canRename: boolean, localizedErrorMessage: string, displayName: string, fullDisplayName: string, kind: string, kindModifiers: string, triggerSpan: { start; length } }
95
+ /**
96
+ * Returns a JSON encoded value of the type:
97
+ * { canRename: boolean, localizedErrorMessage: string, displayName: string, fullDisplayName: string, kind: string, kindModifiers: string, triggerSpan: { start; length } }
98
+ */
101
99
getRenameInfo ( fileName : string , position : number ) : string ;
102
100
103
- // Returns a JSON encoded value of the type:
104
- // { fileName: string; textSpan: { start: number; length: number}; kind: string; name: string; containerKind: string; containerName: string }
105
- //
106
- // Or null value if no definition can be found.
101
+ /**
102
+ * Returns a JSON encoded value of the type:
103
+ * { fileName: string; textSpan: { start: number; length: number}; kind: string; name: string; containerKind: string; containerName: string }
104
+ *
105
+ * Or null value if no definition can be found.
106
+ */
107
107
getDefinitionAtPosition ( fileName : string , position : number ) : string ;
108
108
109
- // Returns a JSON encoded value of the type:
110
- // { fileName: string; textSpan: { start: number; length: number}; isWriteAccess: boolean }[]
109
+ /**
110
+ * Returns a JSON encoded value of the type:
111
+ * { fileName: string; textSpan: { start: number; length: number}; isWriteAccess: boolean }[]
112
+ */
111
113
getReferencesAtPosition ( fileName : string , position : number ) : string ;
112
114
113
- // Returns a JSON encoded value of the type:
114
- // { fileName: string; textSpan: { start: number; length: number}; isWriteAccess: boolean }[]
115
+ /**
116
+ * Returns a JSON encoded value of the type:
117
+ * { fileName: string; textSpan: { start: number; length: number}; isWriteAccess: boolean }[]
118
+ */
115
119
getOccurrencesAtPosition ( fileName : string , position : number ) : string ;
116
120
117
- // Returns a JSON encoded value of the type:
118
- // { fileName: string; textSpan: { start: number; length: number}; isWriteAccess: boolean }[]
121
+ /**
122
+ * Returns a JSON encoded value of the type:
123
+ * { fileName: string; textSpan: { start: number; length: number}; isWriteAccess: boolean }[]
124
+ */
119
125
getImplementorsAtPosition ( fileName : string , position : number ) : string ;
120
-
121
- // Returns a JSON encoded value of the type:
122
- // { name: string; kind: string; kindModifiers: string; containerName: string; containerKind: string; matchKind: string; fileName: string; textSpan: { start: number; length: number}; } [] = [];
126
+
127
+ /**
128
+ * Returns a JSON encoded value of the type:
129
+ * { name: string; kind: string; kindModifiers: string; containerName: string; containerKind: string; matchKind: string; fileName: string; textSpan: { start: number; length: number}; } [] = [];
130
+ */
123
131
getNavigateToItems ( searchValue : string ) : string ;
124
132
125
- // Returns a JSON encoded value of the type:
126
- // { text: string; kind: string; kindModifiers: string; bolded: boolean; grayed: boolean; indent: number; spans: { start: number; length: number; }[]; childItems: <recursive use of this type>[] } [] = [];
133
+ /**
134
+ * Returns a JSON encoded value of the type:
135
+ * { text: string; kind: string; kindModifiers: string; bolded: boolean; grayed: boolean; indent: number; spans: { start: number; length: number; }[]; childItems: <recursive use of this type>[] } [] = [];
136
+ */
127
137
getNavigationBarItems ( fileName : string ) : string ;
128
138
129
- // Returns a JSON encoded value of the type:
130
- // { textSpan: { start: number, length: number }; hintSpan: { start: number, length: number }; bannerText: string; autoCollapse: boolean } [] = [];
139
+ /**
140
+ * Returns a JSON encoded value of the type:
141
+ * { textSpan: { start: number, length: number }; hintSpan: { start: number, length: number }; bannerText: string; autoCollapse: boolean } [] = [];
142
+ */
131
143
getOutliningSpans ( fileName : string ) : string ;
132
144
133
145
getTodoComments ( fileName : string , todoCommentDescriptors : string ) : string ;
@@ -435,9 +447,12 @@ module ts {
435
447
return forwardJSONCall ( this . logger , actionDescription , action ) ;
436
448
}
437
449
438
- // DISPOSE
439
- // Ensure (almost) deterministic release of internal Javascript resources when
440
- // some external native objects holds onto us (e.g. Com/Interop).
450
+ /// DISPOSE
451
+
452
+ /**
453
+ * Ensure (almost) deterministic release of internal Javascript resources when
454
+ * some external native objects holds onto us (e.g. Com/Interop).
455
+ */
441
456
public dispose ( dummy : any ) : void {
442
457
this . logger . log ( "dispose()" ) ;
443
458
this . languageService . dispose ( ) ;
@@ -454,8 +469,11 @@ module ts {
454
469
super . dispose ( dummy ) ;
455
470
}
456
471
457
- // REFRESH
458
- // Update the list of scripts known to the compiler
472
+ /// REFRESH
473
+
474
+ /**
475
+ * Update the list of scripts known to the compiler
476
+ */
459
477
public refresh ( throwOnError : boolean ) : void {
460
478
this . forwardJSONCall (
461
479
"refresh(" + throwOnError + ")" ,
@@ -540,8 +558,11 @@ module ts {
540
558
}
541
559
542
560
/// QUICKINFO
543
- /// Computes a string representation of the type at the requested position
544
- /// in the active file.
561
+
562
+ /**
563
+ * Computes a string representation of the type at the requested position
564
+ * in the active file.
565
+ */
545
566
public getQuickInfoAtPosition ( fileName : string , position : number ) : string {
546
567
return this . forwardJSONCall (
547
568
"getQuickInfoAtPosition('" + fileName + "', " + position + ")" ,
@@ -562,8 +583,11 @@ module ts {
562
583
}
563
584
564
585
/// NAMEORDOTTEDNAMESPAN
565
- /// Computes span information of the name or dotted name at the requested position
566
- // in the active file.
586
+
587
+ /**
588
+ * Computes span information of the name or dotted name at the requested position
589
+ * in the active file.
590
+ */
567
591
public getNameOrDottedNameSpan ( fileName : string , startPos : number , endPos : number ) : string {
568
592
return this . forwardJSONCall (
569
593
"getNameOrDottedNameSpan('" + fileName + "', " + startPos + ", " + endPos + ")" ,
@@ -573,8 +597,10 @@ module ts {
573
597
} ) ;
574
598
}
575
599
576
- /// STATEMENTSPAN
577
- /// Computes span information of statement at the requested position in the active file.
600
+ /**
601
+ * STATEMENTSPAN
602
+ * Computes span information of statement at the requested position in the active file.
603
+ */
578
604
public getBreakpointStatementAtPosition ( fileName : string , position : number ) : string {
579
605
return this . forwardJSONCall (
580
606
"getBreakpointStatementAtPosition('" + fileName + "', " + position + ")" ,
@@ -606,8 +632,11 @@ module ts {
606
632
607
633
608
634
/// GOTO DEFINITION
609
- /// Computes the definition location and file for the symbol
610
- /// at the requested position.
635
+
636
+ /**
637
+ * Computes the definition location and file for the symbol
638
+ * at the requested position.
639
+ */
611
640
public getDefinitionAtPosition ( fileName : string , position : number ) : string {
612
641
return this . forwardJSONCall (
613
642
"getDefinitionAtPosition('" + fileName + "', " + position + ")" ,
@@ -645,9 +674,12 @@ module ts {
645
674
}
646
675
647
676
/// GET REFERENCES
648
- /// Return references to a symbol at the requested position.
649
- /// References are separated by "\n".
650
- /// Each reference is a "fileindex min lim" sub-string.
677
+
678
+ /**
679
+ * Return references to a symbol at the requested position.
680
+ * References are separated by "\n".
681
+ * Each reference is a "fileindex min lim" sub-string.
682
+ */
651
683
public getReferencesAtPosition ( fileName : string , position : number ) : string {
652
684
return this . forwardJSONCall (
653
685
"getReferencesAtPosition('" + fileName + "', " + position + ")" ,
@@ -675,9 +707,12 @@ module ts {
675
707
676
708
677
709
/// COMPLETION LISTS
678
- /// Get a string based representation of the completions
679
- /// to provide at the given source position and providing a member completion
680
- /// list if requested.
710
+
711
+ /**
712
+ * Get a string based representation of the completions
713
+ * to provide at the given source position and providing a member completion
714
+ * list if requested.
715
+ */
681
716
public getCompletionsAtPosition ( fileName : string , position : number , isMemberCompletion : boolean ) {
682
717
return this . forwardJSONCall (
683
718
"getCompletionsAtPosition('" + fileName + "', " + position + ", " + isMemberCompletion + ")" ,
@@ -687,7 +722,7 @@ module ts {
687
722
} ) ;
688
723
}
689
724
690
- /// Get a string based representation of a completion list entry details
725
+ /** Get a string based representation of a completion list entry details */
691
726
public getCompletionEntryDetails ( fileName : string , position : number , entryName : string ) {
692
727
return this . forwardJSONCall (
693
728
"getCompletionEntryDetails('" + fileName + "', " + position + ", " + entryName + ")" ,
@@ -728,7 +763,8 @@ module ts {
728
763
}
729
764
730
765
/// NAVIGATE TO
731
- /// Return a list of symbols that are interesting to navigate to
766
+
767
+ /** Return a list of symbols that are interesting to navigate to */
732
768
public getNavigateToItems ( searchValue : string ) : string {
733
769
return this . forwardJSONCall (
734
770
"getNavigateToItems('" + searchValue + "')" ,
@@ -807,9 +843,6 @@ module ts {
807
843
return forwardJSONCall ( this . logger , actionDescription , action ) ;
808
844
}
809
845
810
- ///
811
- /// getPreProcessedFileInfo
812
- ///
813
846
public getPreProcessedFileInfo ( fileName : string , sourceText : TypeScript . IScriptSnapshot ) : string {
814
847
return this . forwardJSONCall (
815
848
"getPreProcessedFileInfo('" + fileName + "')" ,
@@ -819,9 +852,6 @@ module ts {
819
852
} ) ;
820
853
}
821
854
822
- ///
823
- /// getDefaultCompilationSettings
824
- ///
825
855
public getDefaultCompilationSettings ( ) : string {
826
856
return this . forwardJSONCall (
827
857
"getDefaultCompilationSettings()" ,
0 commit comments