Skip to content

Commit fed0bf2

Browse files
Move the getDocumentationForSymbol docstring onto the function (#64686)
1 parent ec47d33 commit fed0bf2

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎tsc/internal/ls/hover.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,6 @@ func (l *LanguageService) getQuickInfoAndDocumentationForSymbol(c *checker.Check
197197
return quickInfo, documentation, vsDocumentation, quickInfoRuns
198198
}
199199

200-
// getDocumentationForSymbol tries each documentation source in turn (call-signature documentation,
201-
// declaration JSDoc, root-symbol JSDoc, alias target JSDoc) and returns the first non-empty result,
202-
// formatted for contentFormat. commentOnly restricts the result to the JSDoc summary, excluding the
203-
// @tag section.
204200
type documentationLocationMapper func(*ast.SourceFile, core.TextRange) (lsproto.Location, spanmap.Fidelity)
205201

206202
func (l *LanguageService) documentationLocationMapper(feature spanmap.Feature) documentationLocationMapper {
@@ -209,6 +205,10 @@ func (l *LanguageService) documentationLocationMapper(feature spanmap.Feature) d
209205
}
210206
}
211207

208+
// getDocumentationForSymbol tries each documentation source in turn (call-signature documentation,
209+
// declaration JSDoc, root-symbol JSDoc, alias target JSDoc) and returns the first non-empty result,
210+
// formatted for contentFormat. commentOnly restricts the result to the JSDoc summary, excluding the
211+
// @tag section.
212212
func getDocumentationForSymbol(getMappedLocation documentationLocationMapper, c *checker.Checker, symbol *ast.Symbol, node *ast.Node, declaration *ast.Node, contentFormat lsproto.MarkupKind, commentOnly bool) string {
213213
documentation := documentationFromSignature(getMappedLocation, c, symbol, getCallOrNewExpression(node), node, contentFormat, commentOnly)
214214
if documentation != "" {

0 commit comments

Comments
 (0)