@@ -885,6 +885,8 @@ module ts {
885
885
getCompletionsAtPosition ( fileName : string , position : number ) : CompletionInfo ;
886
886
getCompletionEntryDetails ( fileName : string , position : number , entryName : string ) : CompletionEntryDetails ;
887
887
888
+ getInlineInfo ( fileName : string ) : InlineInfo [ ] ;
889
+
888
890
getQuickInfoAtPosition ( fileName : string , position : number ) : QuickInfo ;
889
891
890
892
getNameOrDottedNameSpan ( fileName : string , startPos : number , endPos : number ) : TextSpan ;
@@ -1040,6 +1042,11 @@ module ts {
1040
1042
documentation : SymbolDisplayPart [ ] ;
1041
1043
}
1042
1044
1045
+ export interface InlineInfo {
1046
+ position : number ;
1047
+ displayParts : SymbolDisplayPart [ ] ;
1048
+ }
1049
+
1043
1050
export interface RenameInfo {
1044
1051
canRename : boolean ;
1045
1052
localizedErrorMessage : string ;
@@ -5245,6 +5252,41 @@ module ts {
5245
5252
}
5246
5253
}
5247
5254
5255
+ function getInlineInfo ( fileName : string ) : InlineInfo [ ] {
5256
+ synchronizeHostData ( ) ;
5257
+
5258
+ fileName = normalizeSlashes ( fileName ) ;
5259
+
5260
+ var sourceFile = getValidSourceFile ( fileName ) ;
5261
+
5262
+ cancellationToken . throwIfCancellationRequested ( ) ;
5263
+
5264
+ var result : InlineInfo [ ] = [ ] ;
5265
+
5266
+ forEachChild ( sourceFile , function aggregateUnannotatedNodes ( node ) {
5267
+ switch ( node . kind ) {
5268
+ case SyntaxKind . Parameter :
5269
+ if ( ! ( < ParameterDeclaration > node ) . type ) {
5270
+ result . push ( nodeToInlineInfo ( < ParameterDeclaration > node ) ) ;
5271
+ }
5272
+ }
5273
+
5274
+ forEachChild ( node , aggregateUnannotatedNodes ) ;
5275
+ } ) ;
5276
+
5277
+ return result ;
5278
+ }
5279
+
5280
+ function nodeToInlineInfo ( node : Declaration ) : InlineInfo {
5281
+ var position = node . getEnd ( ) ;
5282
+ var type = typeInfoResolver . getTypeAtLocation ( node ) ;
5283
+
5284
+ return {
5285
+ position,
5286
+ displayParts : typeToDisplayParts ( typeInfoResolver , type , getContainerNode ( node ) )
5287
+ } ;
5288
+ }
5289
+
5248
5290
function getOutliningSpans ( fileName : string ) : OutliningSpan [ ] {
5249
5291
// doesn't use compiler - no need to synchronize with host
5250
5292
fileName = normalizeSlashes ( fileName ) ;
@@ -5572,6 +5614,7 @@ module ts {
5572
5614
getCompletionsAtPosition,
5573
5615
getCompletionEntryDetails,
5574
5616
getSignatureHelpItems,
5617
+ getInlineInfo,
5575
5618
getQuickInfoAtPosition,
5576
5619
getDefinitionAtPosition,
5577
5620
getReferencesAtPosition,
0 commit comments