diff --git a/internal/ls/hover.go b/internal/ls/hover.go index c7a573f745..ec671a4021 100644 --- a/internal/ls/hover.go +++ b/internal/ls/hover.go @@ -68,21 +68,21 @@ func (l *LanguageService) getQuickInfoAndDocumentationForSymbol(c *checker.Check if quickInfo == "" { return "", "" } - return quickInfo, l.getDocumentationFromDeclaration(c, declaration, contentFormat) + return quickInfo, l.getDocumentationFromDeclaration(c, declaration, contentFormat, false /*commentOnly*/) } -func (l *LanguageService) getDocumentationFromDeclaration(c *checker.Checker, declaration *ast.Node, contentFormat lsproto.MarkupKind) string { +func (l *LanguageService) getDocumentationFromDeclaration(c *checker.Checker, declaration *ast.Node, contentFormat lsproto.MarkupKind, commentOnly bool) string { if declaration == nil { return "" } isMarkdown := contentFormat == lsproto.MarkupKindMarkdown var b strings.Builder - if jsdoc := getJSDocOrTag(c, declaration); jsdoc != nil && !containsTypedefTag(jsdoc) { + if jsdoc := getJSDocOrTag(c, declaration); jsdoc != nil && !(declaration.Flags&ast.NodeFlagsReparsed == 0 && containsTypedefTag(jsdoc)) { l.writeComments(&b, c, jsdoc.Comments(), isMarkdown) - if jsdoc.Kind == ast.KindJSDoc { + if jsdoc.Kind == ast.KindJSDoc && !commentOnly { if tags := jsdoc.AsJSDoc().Tags; tags != nil { for _, tag := range tags.Nodes { - if tag.Kind == ast.KindJSDocTypeTag { + if tag.Kind == ast.KindJSDocTypeTag || tag.Kind == ast.KindJSDocTypedefTag || tag.Kind == ast.KindJSDocCallbackTag { continue } b.WriteString("\n\n") @@ -142,7 +142,7 @@ func (l *LanguageService) getDocumentationFromDeclaration(c *checker.Checker, de } } else if len(comments) != 0 { b.WriteString(" ") - if !commentHasPrefix(comments, "-") { + if comments[0].Kind != ast.KindJSDocText || !strings.HasPrefix(comments[0].Text(), "-") { b.WriteString("— ") } l.writeComments(&b, c, comments, isMarkdown) @@ -307,7 +307,7 @@ func getQuickInfoAndDeclarationAtLocation(c *checker.Checker, symbol *ast.Symbol b.WriteString(" = ") b.WriteString(c.TypeToStringEx(c.GetDeclaredTypeOfSymbol(symbol), container, typeFormatFlags|checker.TypeFormatFlagsInTypeAlias)) } - declaration = core.Find(symbol.Declarations, ast.IsTypeAliasDeclaration) + declaration = core.Find(symbol.Declarations, ast.IsTypeOrJSTypeAliasDeclaration) default: b.WriteString(c.TypeToStringEx(c.GetTypeOfSymbol(symbol), container, typeFormatFlags)) } @@ -442,10 +442,6 @@ func containsTypedefTag(jsdoc *ast.Node) bool { return false } -func commentHasPrefix(comments []*ast.Node, prefix string) bool { - return comments[0].Kind == ast.KindJSDocText && strings.HasPrefix(comments[0].Text(), prefix) -} - func getJSDoc(node *ast.Node) *ast.Node { return core.LastOrNil(node.JSDoc(nil)) } diff --git a/internal/ls/signaturehelp.go b/internal/ls/signaturehelp.go index 2335b27a0e..e4258dd412 100644 --- a/internal/ls/signaturehelp.go +++ b/internal/ls/signaturehelp.go @@ -418,9 +418,9 @@ func (l *LanguageService) computeActiveParameter(sig signatureInformation, argum func (l *LanguageService) getSignatureHelpItem(candidate *checker.Signature, isTypeParameterList bool, callTargetSymbol string, enclosingDeclaration *ast.Node, sourceFile *ast.SourceFile, c *checker.Checker, docFormat lsproto.MarkupKind) []signatureInformation { var infos []*signatureHelpItemInfo if isTypeParameterList { - infos = itemInfoForTypeParameters(candidate, c, enclosingDeclaration, sourceFile) + infos = l.itemInfoForTypeParameters(candidate, c, enclosingDeclaration, sourceFile, docFormat) } else { - infos = itemInfoForParameters(candidate, c, enclosingDeclaration, sourceFile) + infos = l.itemInfoForParameters(candidate, c, enclosingDeclaration, sourceFile, docFormat) } suffixDisplayParts := returnTypeToDisplayParts(candidate, c) @@ -428,7 +428,7 @@ func (l *LanguageService) getSignatureHelpItem(candidate *checker.Signature, isT // Generate documentation from the signature's declaration var documentation *string if declaration := candidate.Declaration(); declaration != nil { - doc := l.getDocumentationFromDeclaration(c, declaration, docFormat) + doc := l.getDocumentationFromDeclaration(c, declaration, docFormat, true /*commentOnly*/) if doc != "" { documentation = &doc } @@ -462,7 +462,7 @@ func returnTypeToDisplayParts(candidateSignature *checker.Signature, c *checker. return returnType.String() } -func itemInfoForTypeParameters(candidateSignature *checker.Signature, c *checker.Checker, enclosingDeclaration *ast.Node, sourceFile *ast.SourceFile) []*signatureHelpItemInfo { +func (l *LanguageService) itemInfoForTypeParameters(candidateSignature *checker.Signature, c *checker.Checker, enclosingDeclaration *ast.Node, sourceFile *ast.SourceFile, docFormat lsproto.MarkupKind) []*signatureHelpItemInfo { printer := printer.NewPrinter(printer.PrinterOptions{NewLine: core.NewLineKindLF}, printer.PrintHandlers{}, nil) var typeParameters []*checker.Type @@ -478,7 +478,7 @@ func itemInfoForTypeParameters(candidateSignature *checker.Signature, c *checker thisParameter := []signatureHelpParameter{} if candidateSignature.ThisParameter() != nil { - thisParameter = []signatureHelpParameter{createSignatureHelpParameterForParameter(candidateSignature.ThisParameter(), enclosingDeclaration, printer, sourceFile, c)} + thisParameter = []signatureHelpParameter{l.createSignatureHelpParameterForParameter(candidateSignature.ThisParameter(), enclosingDeclaration, printer, sourceFile, c, docFormat)} } // Creating type parameter display label @@ -504,7 +504,7 @@ func itemInfoForTypeParameters(candidateSignature *checker.Signature, c *checker displayParameters.WriteString(displayParts.String()) parameters := thisParameter for j, param := range parameterList { - parameter := createSignatureHelpParameterForParameter(param, enclosingDeclaration, printer, sourceFile, c) + parameter := l.createSignatureHelpParameterForParameter(param, enclosingDeclaration, printer, sourceFile, c, docFormat) parameters = append(parameters, parameter) if j > 0 { displayParameters.WriteString(", ") @@ -522,7 +522,7 @@ func itemInfoForTypeParameters(candidateSignature *checker.Signature, c *checker return result } -func itemInfoForParameters(candidateSignature *checker.Signature, c *checker.Checker, enclosingDeclaratipn *ast.Node, sourceFile *ast.SourceFile) []*signatureHelpItemInfo { +func (l *LanguageService) itemInfoForParameters(candidateSignature *checker.Signature, c *checker.Checker, enclosingDeclaratipn *ast.Node, sourceFile *ast.SourceFile, docFormat lsproto.MarkupKind) []*signatureHelpItemInfo { printer := printer.NewPrinter(printer.PrinterOptions{NewLine: core.NewLineKindLF}, printer.PrintHandlers{}, nil) signatureHelpTypeParameters := make([]signatureHelpParameter, len(candidateSignature.TypeParameters())) @@ -564,7 +564,7 @@ func itemInfoForParameters(candidateSignature *checker.Signature, c *checker.Che var displayParameters strings.Builder displayParameters.WriteString(displayParts.String()) for j, param := range parameterList { - parameter := createSignatureHelpParameterForParameter(param, enclosingDeclaratipn, printer, sourceFile, c) + parameter := l.createSignatureHelpParameterForParameter(param, enclosingDeclaratipn, printer, sourceFile, c, docFormat) parameters[j] = parameter if j > 0 { displayParameters.WriteString(", ") @@ -585,14 +585,26 @@ func itemInfoForParameters(candidateSignature *checker.Signature, c *checker.Che const signatureHelpNodeBuilderFlags = nodebuilder.FlagsOmitParameterModifiers | nodebuilder.FlagsIgnoreErrors | nodebuilder.FlagsUseAliasDefinedOutsideCurrentScope -func createSignatureHelpParameterForParameter(parameter *ast.Symbol, enclosingDeclaratipn *ast.Node, p *printer.Printer, sourceFile *ast.SourceFile, c *checker.Checker) signatureHelpParameter { +func (l *LanguageService) createSignatureHelpParameterForParameter(parameter *ast.Symbol, enclosingDeclaratipn *ast.Node, p *printer.Printer, sourceFile *ast.SourceFile, c *checker.Checker, docFormat lsproto.MarkupKind) signatureHelpParameter { display := p.Emit(checker.NewNodeBuilder(c, printer.NewEmitContext()).SymbolToParameterDeclaration(parameter, enclosingDeclaratipn, signatureHelpNodeBuilderFlags, nodebuilder.InternalFlagsNone, nil), sourceFile) isOptional := parameter.CheckFlags&ast.CheckFlagsOptionalParameter != 0 isRest := parameter.CheckFlags&ast.CheckFlagsRestParameter != 0 + var documentation *lsproto.StringOrMarkupContent + if parameter.ValueDeclaration != nil { + doc := l.getDocumentationFromDeclaration(c, parameter.ValueDeclaration, docFormat, true /*commentOnly*/) + if doc != "" { + documentation = &lsproto.StringOrMarkupContent{ + MarkupContent: &lsproto.MarkupContent{ + Kind: docFormat, + Value: doc, + }, + } + } + } return signatureHelpParameter{ parameterInfo: &lsproto.ParameterInformation{ Label: lsproto.StringOrTuple{String: &display}, - Documentation: nil, + Documentation: documentation, }, isRest: isRest, isOptional: isOptional, diff --git a/internal/ls/symbols.go b/internal/ls/symbols.go index 61c55730c1..2471c7c063 100644 --- a/internal/ls/symbols.go +++ b/internal/ls/symbols.go @@ -125,12 +125,14 @@ func (l *LanguageService) getDocumentSymbolsForChildren(ctx context.Context, nod if ctx.Err() != nil { return true } - if jsdocs := node.JSDoc(file); len(jsdocs) > 0 { - for _, jsdoc := range jsdocs { - if tagList := jsdoc.AsJSDoc().Tags; tagList != nil { - for _, tag := range tagList.Nodes { - if ast.IsJSDocTypedefTag(tag) || ast.IsJSDocCallbackTag(tag) { - addSymbolForNode(tag, nil /*children*/) + if node.Flags&ast.NodeFlagsReparsed == 0 { + if jsdocs := node.JSDoc(file); len(jsdocs) > 0 { + for _, jsdoc := range jsdocs { + if tagList := jsdoc.AsJSDoc().Tags; tagList != nil { + for _, tag := range tagList.Nodes { + if ast.IsJSDocTypedefTag(tag) || ast.IsJSDocCallbackTag(tag) { + addSymbolForNode(tag, nil /*children*/) + } } } } diff --git a/internal/parser/jsdoc.go b/internal/parser/jsdoc.go index 3a76222762..1c5dc684b7 100644 --- a/internal/parser/jsdoc.go +++ b/internal/parser/jsdoc.go @@ -298,7 +298,7 @@ loop: func removeLeadingNewlines(comments []string) []string { i := 0 - for i < len(comments) && (comments[i] == "\n" || comments[i] == "\r") { + for i < len(comments) && strings.TrimLeft(comments[i], "\r\n") == "" { i++ } return comments[i:] diff --git a/internal/parser/reparser.go b/internal/parser/reparser.go index f31c8a0ae6..73813952f0 100644 --- a/internal/parser/reparser.go +++ b/internal/parser/reparser.go @@ -84,6 +84,8 @@ func (p *Parser) reparseUnhosted(tag *ast.Node, parent *ast.Node, jsDoc *ast.Nod } typeAlias.AsTypeAliasDeclaration().Type = t p.finishReparsedNode(typeAlias, tag) + p.jsdocCache[typeAlias] = []*ast.Node{jsDoc} + typeAlias.Flags |= ast.NodeFlagsHasJSDoc p.reparseList = append(p.reparseList, typeAlias) case ast.KindJSDocCallbackTag: callbackTag := tag.AsJSDocCallbackTag() @@ -94,6 +96,8 @@ func (p *Parser) reparseUnhosted(tag *ast.Node, parent *ast.Node, jsDoc *ast.Nod typeAlias := p.factory.NewJSTypeAliasDeclaration(nil, p.factory.DeepCloneReparse(callbackTag.FullName), nil, functionType) typeAlias.AsTypeAliasDeclaration().TypeParameters = p.gatherTypeParameters(jsDoc, tag) p.finishReparsedNode(typeAlias, tag) + p.jsdocCache[typeAlias] = []*ast.Node{jsDoc} + typeAlias.Flags |= ast.NodeFlagsHasJSDoc p.reparseList = append(p.reparseList, typeAlias) case ast.KindJSDocImportTag: importTag := tag.AsJSDocImportTag() @@ -171,6 +175,7 @@ func (p *Parser) reparseJSDocSignature(jsSignature *ast.Node, fun *ast.Node, jsD } p.finishReparsedNode(parameter, param) parameters = append(parameters, parameter) + p.reparseJSDocComment(parameter, param) } signature.FunctionLikeData().Parameters = p.newNodeList(jsSignature.AsJSDocSignature().Parameters.Loc, parameters) @@ -205,6 +210,7 @@ func (p *Parser) reparseJSDocTypeLiteral(t *ast.TypeNode) *ast.Node { } p.finishReparsedNode(property, prop) properties = append(properties, property) + p.reparseJSDocComment(property, prop) } t = p.factory.NewTypeLiteralNode(p.newNodeList(jstypeliteral.Loc, properties)) if isArrayType { @@ -212,10 +218,20 @@ func (p *Parser) reparseJSDocTypeLiteral(t *ast.TypeNode) *ast.Node { t = p.factory.NewArrayTypeNode(t) } p.finishReparsedNode(t, jstypeliteral.AsNode()) + return t } return p.factory.DeepCloneReparse(t) } +func (p *Parser) reparseJSDocComment(node *ast.Node, tag *ast.Node) { + if comment := tag.CommentList(); comment != nil { + propJSDoc := p.factory.NewJSDoc(comment, nil) + p.finishReparsedNode(propJSDoc, tag) + p.jsdocCache[node] = []*ast.Node{propJSDoc} + node.Flags |= ast.NodeFlagsHasJSDoc + } +} + func (p *Parser) gatherTypeParameters(j *ast.Node, tagWithTypeParameters *ast.Node) *ast.NodeList { var typeParameters []*ast.Node pos := -1 diff --git a/testdata/baselines/reference/fourslash/quickInfo/quickInfoForJSDocWithHttpLinks.baseline b/testdata/baselines/reference/fourslash/quickInfo/quickInfoForJSDocWithHttpLinks.baseline index 99a04506f3..5306cd56da 100644 --- a/testdata/baselines/reference/fourslash/quickInfo/quickInfoForJSDocWithHttpLinks.baseline +++ b/testdata/baselines/reference/fourslash/quickInfo/quickInfoForJSDocWithHttpLinks.baseline @@ -17,6 +17,7 @@ // | ```tsx // | (property) https: number // | ``` +// | ://wass // | // | ---------------------------------------------------------------------- // */ @@ -105,7 +106,7 @@ "item": { "contents": { "kind": "markdown", - "value": "```tsx\n(property) https: number\n```\n" + "value": "```tsx\n(property) https: number\n```\n://wass\n" }, "range": { "start": { diff --git a/testdata/baselines/reference/fourslash/quickInfo/quickInfoJsDocTagsTypedef.baseline b/testdata/baselines/reference/fourslash/quickInfo/quickInfoJsDocTagsTypedef.baseline index 05bd1f6763..d100750d68 100644 --- a/testdata/baselines/reference/fourslash/quickInfo/quickInfoJsDocTagsTypedef.baseline +++ b/testdata/baselines/reference/fourslash/quickInfo/quickInfoJsDocTagsTypedef.baseline @@ -8,7 +8,7 @@ // | ```tsx // | type Bar = { baz: string; qux: string; } // | ``` -// | +// | Bar comment // | ---------------------------------------------------------------------- // * @property {string} baz - baz comment // * @property {string} qux - qux comment @@ -22,7 +22,7 @@ // | ```tsx // | type Bar = { baz: string; qux: string; } // | ``` -// | +// | Bar comment // | ---------------------------------------------------------------------- // * @returns {Bar} // */ @@ -43,7 +43,7 @@ "item": { "contents": { "kind": "markdown", - "value": "```tsx\ntype Bar = { baz: string; qux: string; }\n```\n" + "value": "```tsx\ntype Bar = { baz: string; qux: string; }\n```\nBar comment" }, "range": { "start": { @@ -70,7 +70,7 @@ "item": { "contents": { "kind": "markdown", - "value": "```tsx\ntype Bar = { baz: string; qux: string; }\n```\n" + "value": "```tsx\ntype Bar = { baz: string; qux: string; }\n```\nBar comment" }, "range": { "start": { diff --git a/testdata/baselines/reference/fourslash/signatureHelp/jsDocDontBreakWithNamespaces.baseline b/testdata/baselines/reference/fourslash/signatureHelp/jsDocDontBreakWithNamespaces.baseline index 09879cb552..e5705afcf9 100644 --- a/testdata/baselines/reference/fourslash/signatureHelp/jsDocDontBreakWithNamespaces.baseline +++ b/testdata/baselines/reference/fourslash/signatureHelp/jsDocDontBreakWithNamespaces.baseline @@ -8,10 +8,6 @@ // ^ // | ---------------------------------------------------------------------- // | foo(): module -// | -// | -// | *@returns* — :@nodefuel/web~Webserver~wsServer#hello} Websocket server object -// | // | ---------------------------------------------------------------------- // // /** @@ -46,10 +42,6 @@ "signatures": [ { "label": "foo(): module", - "documentation": { - "kind": "markdown", - "value": "\n\n*@returns* — :@nodefuel/web~Webserver~wsServer#hello} Websocket server object\n" - }, "parameters": [] } ], diff --git a/testdata/baselines/reference/fourslash/signatureHelp/jsDocFunctionSignatures5.baseline b/testdata/baselines/reference/fourslash/signatureHelp/jsDocFunctionSignatures5.baseline index f79cc4afea..a97845080d 100644 --- a/testdata/baselines/reference/fourslash/signatureHelp/jsDocFunctionSignatures5.baseline +++ b/testdata/baselines/reference/fourslash/signatureHelp/jsDocFunctionSignatures5.baseline @@ -15,22 +15,9 @@ // ^ // | ---------------------------------------------------------------------- // | pathFilter(**basePath: String**, pattern: String, type: String, options: Object): any[] +// | - `basePath: String`: The base path where the search will be performed. + // | Filters a path based on a regexp or glob pattern. -// | -// | *@param* `basePath` — The base path where the search will be performed. -// | -// | -// | *@param* `pattern` — A string defining a regexp of a glob pattern. -// | -// | -// | *@param* `type` — The search pattern type, can be a regexp or a glob. -// | -// | -// | *@param* `options` — A object containing options to the search. -// | -// | -// | *@return* — A list containing the filtered paths. -// | // | ---------------------------------------------------------------------- [ { @@ -49,20 +36,36 @@ "label": "pathFilter(basePath: String, pattern: String, type: String, options: Object): any[]", "documentation": { "kind": "markdown", - "value": "Filters a path based on a regexp or glob pattern.\n\n*@param* `basePath` — The base path where the search will be performed.\n\n\n*@param* `pattern` — A string defining a regexp of a glob pattern.\n\n\n*@param* `type` — The search pattern type, can be a regexp or a glob.\n\n\n*@param* `options` — A object containing options to the search.\n\n\n*@return* — A list containing the filtered paths.\n" + "value": "Filters a path based on a regexp or glob pattern." }, "parameters": [ { - "label": "basePath: String" + "label": "basePath: String", + "documentation": { + "kind": "markdown", + "value": "The base path where the search will be performed.\n" + } }, { - "label": "pattern: String" + "label": "pattern: String", + "documentation": { + "kind": "markdown", + "value": "A string defining a regexp of a glob pattern.\n" + } }, { - "label": "type: String" + "label": "type: String", + "documentation": { + "kind": "markdown", + "value": "The search pattern type, can be a regexp or a glob.\n" + } }, { - "label": "options: Object" + "label": "options: Object", + "documentation": { + "kind": "markdown", + "value": "A object containing options to the search.\n" + } } ], "activeParameter": 0 diff --git a/testdata/baselines/reference/fourslash/signatureHelp/jsDocFunctionSignatures6.baseline b/testdata/baselines/reference/fourslash/signatureHelp/jsDocFunctionSignatures6.baseline index 742ccccb85..18bef25750 100644 --- a/testdata/baselines/reference/fourslash/signatureHelp/jsDocFunctionSignatures6.baseline +++ b/testdata/baselines/reference/fourslash/signatureHelp/jsDocFunctionSignatures6.baseline @@ -11,70 +11,26 @@ // ^ // | ---------------------------------------------------------------------- // | f1(**p1: string**, p2: string, p3?: string, p4?: string): void -// | -// | -// | *@param* `p1` - A string param -// | -// | -// | *@param* `p2` - An optional param -// | -// | -// | *@param* `p3` - Another optional param -// | -// | -// | *@param* `p4` - An optional param with a default value -// | +// | - `p1: string`: - A string param + // | ---------------------------------------------------------------------- // ^ // | ---------------------------------------------------------------------- // | f1(p1: string, **p2: string**, p3?: string, p4?: string): void -// | -// | -// | *@param* `p1` - A string param -// | -// | -// | *@param* `p2` - An optional param -// | -// | -// | *@param* `p3` - Another optional param -// | -// | -// | *@param* `p4` - An optional param with a default value -// | +// | - `p2: string`: - An optional param + // | ---------------------------------------------------------------------- // ^ // | ---------------------------------------------------------------------- // | f1(p1: string, p2: string, **p3?: string**, p4?: string): void -// | -// | -// | *@param* `p1` - A string param -// | -// | -// | *@param* `p2` - An optional param -// | -// | -// | *@param* `p3` - Another optional param -// | -// | -// | *@param* `p4` - An optional param with a default value -// | +// | - `p3?: string`: - Another optional param + // | ---------------------------------------------------------------------- // ^ // | ---------------------------------------------------------------------- // | f1(p1: string, p2: string, p3?: string, **p4?: string**): void -// | -// | -// | *@param* `p1` - A string param -// | -// | -// | *@param* `p2` - An optional param -// | -// | -// | *@param* `p3` - Another optional param -// | -// | -// | *@param* `p4` - An optional param with a default value -// | +// | - `p4?: string`: - An optional param with a default value + // | ---------------------------------------------------------------------- [ { @@ -91,22 +47,34 @@ "signatures": [ { "label": "f1(p1: string, p2: string, p3?: string, p4?: string): void", - "documentation": { - "kind": "markdown", - "value": "\n\n*@param* `p1` - A string param\n\n\n*@param* `p2` - An optional param\n\n\n*@param* `p3` - Another optional param\n\n\n*@param* `p4` - An optional param with a default value\n" - }, "parameters": [ { - "label": "p1: string" + "label": "p1: string", + "documentation": { + "kind": "markdown", + "value": "- A string param\n" + } }, { - "label": "p2: string" + "label": "p2: string", + "documentation": { + "kind": "markdown", + "value": "- An optional param\n" + } }, { - "label": "p3?: string" + "label": "p3?: string", + "documentation": { + "kind": "markdown", + "value": "- Another optional param\n" + } }, { - "label": "p4?: string" + "label": "p4?: string", + "documentation": { + "kind": "markdown", + "value": "- An optional param with a default value\n" + } } ], "activeParameter": 0 @@ -129,22 +97,34 @@ "signatures": [ { "label": "f1(p1: string, p2: string, p3?: string, p4?: string): void", - "documentation": { - "kind": "markdown", - "value": "\n\n*@param* `p1` - A string param\n\n\n*@param* `p2` - An optional param\n\n\n*@param* `p3` - Another optional param\n\n\n*@param* `p4` - An optional param with a default value\n" - }, "parameters": [ { - "label": "p1: string" + "label": "p1: string", + "documentation": { + "kind": "markdown", + "value": "- A string param\n" + } }, { - "label": "p2: string" + "label": "p2: string", + "documentation": { + "kind": "markdown", + "value": "- An optional param\n" + } }, { - "label": "p3?: string" + "label": "p3?: string", + "documentation": { + "kind": "markdown", + "value": "- Another optional param\n" + } }, { - "label": "p4?: string" + "label": "p4?: string", + "documentation": { + "kind": "markdown", + "value": "- An optional param with a default value\n" + } } ], "activeParameter": 1 @@ -167,22 +147,34 @@ "signatures": [ { "label": "f1(p1: string, p2: string, p3?: string, p4?: string): void", - "documentation": { - "kind": "markdown", - "value": "\n\n*@param* `p1` - A string param\n\n\n*@param* `p2` - An optional param\n\n\n*@param* `p3` - Another optional param\n\n\n*@param* `p4` - An optional param with a default value\n" - }, "parameters": [ { - "label": "p1: string" + "label": "p1: string", + "documentation": { + "kind": "markdown", + "value": "- A string param\n" + } }, { - "label": "p2: string" + "label": "p2: string", + "documentation": { + "kind": "markdown", + "value": "- An optional param\n" + } }, { - "label": "p3?: string" + "label": "p3?: string", + "documentation": { + "kind": "markdown", + "value": "- Another optional param\n" + } }, { - "label": "p4?: string" + "label": "p4?: string", + "documentation": { + "kind": "markdown", + "value": "- An optional param with a default value\n" + } } ], "activeParameter": 2 @@ -205,22 +197,34 @@ "signatures": [ { "label": "f1(p1: string, p2: string, p3?: string, p4?: string): void", - "documentation": { - "kind": "markdown", - "value": "\n\n*@param* `p1` - A string param\n\n\n*@param* `p2` - An optional param\n\n\n*@param* `p3` - Another optional param\n\n\n*@param* `p4` - An optional param with a default value\n" - }, "parameters": [ { - "label": "p1: string" + "label": "p1: string", + "documentation": { + "kind": "markdown", + "value": "- A string param\n" + } }, { - "label": "p2: string" + "label": "p2: string", + "documentation": { + "kind": "markdown", + "value": "- An optional param\n" + } }, { - "label": "p3?: string" + "label": "p3?: string", + "documentation": { + "kind": "markdown", + "value": "- Another optional param\n" + } }, { - "label": "p4?: string" + "label": "p4?: string", + "documentation": { + "kind": "markdown", + "value": "- An optional param with a default value\n" + } } ], "activeParameter": 3 diff --git a/testdata/baselines/reference/fourslash/signatureHelp/jsdocReturnsTag.baseline b/testdata/baselines/reference/fourslash/signatureHelp/jsdocReturnsTag.baseline index 4551f8a9c3..3134f625a6 100644 --- a/testdata/baselines/reference/fourslash/signatureHelp/jsdocReturnsTag.baseline +++ b/testdata/baselines/reference/fourslash/signatureHelp/jsdocReturnsTag.baseline @@ -14,15 +14,6 @@ // | ---------------------------------------------------------------------- // | find(**l: unknown[]**, x: unknown): unknown // | Find an item -// | -// | *@template* `T` -// | -// | *@param* `l` -// | -// | *@param* `x` -// | -// | *@returns* — The names of the found item(s). -// | // | ---------------------------------------------------------------------- [ { @@ -41,7 +32,7 @@ "label": "find(l: unknown[], x: unknown): unknown", "documentation": { "kind": "markdown", - "value": "Find an item\n\n*@template* `T`\n\n*@param* `l`\n\n*@param* `x`\n\n*@returns* — The names of the found item(s).\n" + "value": "Find an item" }, "parameters": [ { diff --git a/testdata/baselines/reference/fourslash/signatureHelp/quickInfoJsDocTextFormatting1.baseline b/testdata/baselines/reference/fourslash/signatureHelp/quickInfoJsDocTextFormatting1.baseline index 73e4be6afc..25aa511356 100644 --- a/testdata/baselines/reference/fourslash/signatureHelp/quickInfoJsDocTextFormatting1.baseline +++ b/testdata/baselines/reference/fourslash/signatureHelp/quickInfoJsDocTextFormatting1.baseline @@ -40,61 +40,36 @@ // ^ // | ---------------------------------------------------------------------- // | f1(**var1: any**, var2: any): void -// | -// | -// | *@param* `var1` — **Highlighted text** -// | -// | -// | *@param* `var2` — Another **Highlighted text** -// | +// | - `var1: any`: **Highlighted text** + // | ---------------------------------------------------------------------- // f2(); // ^ // | ---------------------------------------------------------------------- // | f2(**var1: any**, var2: any): void -// | -// | -// | *@param* `var1` — *Regular text with an asterisk -// | -// | -// | *@param* `var2` — Another *Regular text with an asterisk -// | +// | - `var1: any`: *Regular text with an asterisk + // | ---------------------------------------------------------------------- // f3(); // ^ // | ---------------------------------------------------------------------- // | f3(**var1: any**, var2: any): void -// | -// | -// | *@param* `var1` — *Regular text with an asterisk -// | -// | -// | *@param* `var2` — Another *Regular text with an asterisk -// | +// | - `var1: any`: *Regular text with an asterisk + // | ---------------------------------------------------------------------- // f4(); // ^ // | ---------------------------------------------------------------------- // | f4(**var1: any**, var2: any): void -// | -// | -// | *@param* `var1` — **Highlighted text** -// | -// | -// | *@param* `var2` — Another **Highlighted text** -// | +// | - `var1: any`: **Highlighted text** + // | ---------------------------------------------------------------------- // f5(); // ^ // | ---------------------------------------------------------------------- // | f5(**var1: any**, var2: any): void -// | -// | -// | *@param* `var1` — **Highlighted text** -// | -// | -// | *@param* `var2` — Another **Highlighted text** -// | +// | - `var1: any`: **Highlighted text** + // | ---------------------------------------------------------------------- [ { @@ -111,16 +86,20 @@ "signatures": [ { "label": "f1(var1: any, var2: any): void", - "documentation": { - "kind": "markdown", - "value": "\n\n*@param* `var1` — **Highlighted text**\n\n\n*@param* `var2` — Another **Highlighted text**\n" - }, "parameters": [ { - "label": "var1: any" + "label": "var1: any", + "documentation": { + "kind": "markdown", + "value": "**Highlighted text**\n" + } }, { - "label": "var2: any" + "label": "var2: any", + "documentation": { + "kind": "markdown", + "value": "Another **Highlighted text**\n" + } } ], "activeParameter": 0 @@ -143,16 +122,20 @@ "signatures": [ { "label": "f2(var1: any, var2: any): void", - "documentation": { - "kind": "markdown", - "value": "\n\n*@param* `var1` — *Regular text with an asterisk\n\n\n*@param* `var2` — Another *Regular text with an asterisk\n" - }, "parameters": [ { - "label": "var1: any" + "label": "var1: any", + "documentation": { + "kind": "markdown", + "value": "*Regular text with an asterisk\n" + } }, { - "label": "var2: any" + "label": "var2: any", + "documentation": { + "kind": "markdown", + "value": "Another *Regular text with an asterisk\n" + } } ], "activeParameter": 0 @@ -175,16 +158,20 @@ "signatures": [ { "label": "f3(var1: any, var2: any): void", - "documentation": { - "kind": "markdown", - "value": "\n\n*@param* `var1` — *Regular text with an asterisk\n\n\n*@param* `var2` — Another *Regular text with an asterisk\n" - }, "parameters": [ { - "label": "var1: any" + "label": "var1: any", + "documentation": { + "kind": "markdown", + "value": "*Regular text with an asterisk\n" + } }, { - "label": "var2: any" + "label": "var2: any", + "documentation": { + "kind": "markdown", + "value": "Another *Regular text with an asterisk\n" + } } ], "activeParameter": 0 @@ -207,16 +194,20 @@ "signatures": [ { "label": "f4(var1: any, var2: any): void", - "documentation": { - "kind": "markdown", - "value": "\n\n*@param* `var1` — **Highlighted text**\n\n\n*@param* `var2` — Another **Highlighted text**\n" - }, "parameters": [ { - "label": "var1: any" + "label": "var1: any", + "documentation": { + "kind": "markdown", + "value": "**Highlighted text**\n" + } }, { - "label": "var2: any" + "label": "var2: any", + "documentation": { + "kind": "markdown", + "value": "Another **Highlighted text**\n" + } } ], "activeParameter": 0 @@ -239,16 +230,20 @@ "signatures": [ { "label": "f5(var1: any, var2: any): void", - "documentation": { - "kind": "markdown", - "value": "\n\n*@param* `var1` — **Highlighted text**\n\n\n*@param* `var2` — Another **Highlighted text**\n" - }, "parameters": [ { - "label": "var1: any" + "label": "var1: any", + "documentation": { + "kind": "markdown", + "value": "**Highlighted text**\n" + } }, { - "label": "var2: any" + "label": "var2: any", + "documentation": { + "kind": "markdown", + "value": "Another **Highlighted text**\n" + } } ], "activeParameter": 0 diff --git a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsClass.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsClass.baseline index 5ffa2a7a6a..4737d216a3 100644 --- a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsClass.baseline +++ b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsClass.baseline @@ -72,10 +72,9 @@ // ^ // | ---------------------------------------------------------------------- // | a(**a: string**): a +// | - `a: string`: this is my a + // | constructor for a -// | -// | *@param* `a` — this is my a -// | // | ---------------------------------------------------------------------- // module m { // export module m2 { @@ -217,11 +216,15 @@ "label": "a(a: string): a", "documentation": { "kind": "markdown", - "value": "constructor for a\n\n*@param* `a` — this is my a\n" + "value": "constructor for a" }, "parameters": [ { - "label": "a: string" + "label": "a: string", + "documentation": { + "kind": "markdown", + "value": "this is my a\n" + } } ], "activeParameter": 0 diff --git a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsClassMembers.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsClassMembers.baseline index e460d9a510..1198ac8bc3 100644 --- a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsClassMembers.baseline +++ b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsClassMembers.baseline @@ -14,6 +14,7 @@ // ^ // | ---------------------------------------------------------------------- // | p2(**b: number**): number +// | - `b: number`: number to add // | sum with property // | ---------------------------------------------------------------------- // } @@ -23,6 +24,7 @@ // ^ // | ---------------------------------------------------------------------- // | p2(**b: number**): number +// | - `b: number`: number to add // | sum with property // | ---------------------------------------------------------------------- // } @@ -38,6 +40,7 @@ // ^ // | ---------------------------------------------------------------------- // | pp2(**b: number**): number +// | - `b: number`: number to add // | sum with property // | ---------------------------------------------------------------------- // } @@ -47,6 +50,7 @@ // ^ // | ---------------------------------------------------------------------- // | pp2(**b: number**): number +// | - `b: number`: number to add // | sum with property // | ---------------------------------------------------------------------- // } @@ -65,6 +69,7 @@ // ^ // | ---------------------------------------------------------------------- // | s2(**b: number**): number +// | - `b: number`: number to add // | static sum with property // | ---------------------------------------------------------------------- // } @@ -74,6 +79,7 @@ // ^ // | ---------------------------------------------------------------------- // | s2(**b: number**): number +// | - `b: number`: number to add // | static sum with property // | ---------------------------------------------------------------------- // } @@ -144,6 +150,7 @@ // ^ // | ---------------------------------------------------------------------- // | p2(**b: number**): number +// | - `b: number`: number to add // | sum with property // | ---------------------------------------------------------------------- // var i1_prop = i1.p3; @@ -163,6 +170,7 @@ // ^ // | ---------------------------------------------------------------------- // | s2(**b: number**): number +// | - `b: number`: number to add // | static sum with property // | ---------------------------------------------------------------------- // var i1_s_prop = c1.s3; @@ -229,7 +237,11 @@ }, "parameters": [ { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "number to add" + } } ], "activeParameter": 0 @@ -258,7 +270,11 @@ }, "parameters": [ { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "number to add" + } } ], "activeParameter": 0 @@ -287,7 +303,11 @@ }, "parameters": [ { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "number to add" + } } ], "activeParameter": 0 @@ -316,7 +336,11 @@ }, "parameters": [ { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "number to add" + } } ], "activeParameter": 0 @@ -345,7 +369,11 @@ }, "parameters": [ { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "number to add" + } } ], "activeParameter": 0 @@ -374,7 +402,11 @@ }, "parameters": [ { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "number to add" + } } ], "activeParameter": 0 @@ -577,7 +609,11 @@ }, "parameters": [ { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "number to add" + } } ], "activeParameter": 0 @@ -631,7 +667,11 @@ }, "parameters": [ { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "number to add" + } } ], "activeParameter": 0 diff --git a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsCommentParsing.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsCommentParsing.baseline index f00c5fc84b..4d24cd3db6 100644 --- a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsCommentParsing.baseline +++ b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsCommentParsing.baseline @@ -169,24 +169,16 @@ // ^ // | ---------------------------------------------------------------------- // | sum(**a: number**, b: number): number +// | - `a: number`: first number + // | Adds two integers and returns the result -// | -// | *@param* `a` — first number -// | -// | -// | *@param* `b` — second number -// | // | ---------------------------------------------------------------------- // ^ // | ---------------------------------------------------------------------- // | sum(a: number, **b: number**): number +// | - `b: number`: second number + // | Adds two integers and returns the result -// | -// | *@param* `a` — first number -// | -// | -// | *@param* `b` — second number -// | // | ---------------------------------------------------------------------- // /** This is multiplication function // * @param @@ -201,112 +193,30 @@ // ^ // | ---------------------------------------------------------------------- // | multiply(**a: number**, b: number, c?: number, d?: any, e?: any): void +// | - `a: number`: first number + // | This is multiplication function -// | -// | *@param* `` -// | -// | *@param* `a` — first number -// | -// | -// | *@param* `b` -// | -// | *@param* `c` -// | -// | *@param* `d` -// | -// | *@anotherTag* -// | -// | *@param* `e` — LastParam -// | -// | *@anotherTag* // | ---------------------------------------------------------------------- // ^ // | ---------------------------------------------------------------------- // | multiply(a: number, **b: number**, c?: number, d?: any, e?: any): void // | This is multiplication function -// | -// | *@param* `` -// | -// | *@param* `a` — first number -// | -// | -// | *@param* `b` -// | -// | *@param* `c` -// | -// | *@param* `d` -// | -// | *@anotherTag* -// | -// | *@param* `e` — LastParam -// | -// | *@anotherTag* // | ---------------------------------------------------------------------- // ^ // | ---------------------------------------------------------------------- // | multiply(a: number, b: number, **c?: number**, d?: any, e?: any): void // | This is multiplication function -// | -// | *@param* `` -// | -// | *@param* `a` — first number -// | -// | -// | *@param* `b` -// | -// | *@param* `c` -// | -// | *@param* `d` -// | -// | *@anotherTag* -// | -// | *@param* `e` — LastParam -// | -// | *@anotherTag* // | ---------------------------------------------------------------------- // ^ // | ---------------------------------------------------------------------- // | multiply(a: number, b: number, c?: number, **d?: any**, e?: any): void // | This is multiplication function -// | -// | *@param* `` -// | -// | *@param* `a` — first number -// | -// | -// | *@param* `b` -// | -// | *@param* `c` -// | -// | *@param* `d` -// | -// | *@anotherTag* -// | -// | *@param* `e` — LastParam -// | -// | *@anotherTag* // | ---------------------------------------------------------------------- // ^ // | ---------------------------------------------------------------------- // | multiply(a: number, b: number, c?: number, d?: any, **e?: any**): void +// | - `e?: any`: LastParam // | This is multiplication function -// | -// | *@param* `` -// | -// | *@param* `a` — first number -// | -// | -// | *@param* `b` -// | -// | *@param* `c` -// | -// | *@param* `d` -// | -// | *@anotherTag* -// | -// | *@param* `e` — LastParam -// | -// | *@anotherTag* // | ---------------------------------------------------------------------- // /** fn f1 with number // * @param { string} b about b @@ -322,9 +232,6 @@ // | ---------------------------------------------------------------------- // | f1(**a: number**): any // | fn f1 with number -// | -// | *@param* `b` — about b -// | // | ---------------------------------------------------------------------- // f1("hello"); // ^ @@ -347,133 +254,39 @@ // | ---------------------------------------------------------------------- // | subtract(**a: number**, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void // | This is subtract function -// | -// | *@param* `` -// | -// | *@param* `b` — this is about b -// | -// | -// | *@param* `c` — this is optional param c -// | -// | -// | *@param* `d` — this is optional param d -// | -// | -// | *@param* `e` — this is optional param e -// | -// | -// | *@param* `` — { () => string; } } f this is optional param f -// | // | ---------------------------------------------------------------------- // ^ // | ---------------------------------------------------------------------- // | subtract(a: number, **b: number**, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void +// | - `b: number`: this is about b + // | This is subtract function -// | -// | *@param* `` -// | -// | *@param* `b` — this is about b -// | -// | -// | *@param* `c` — this is optional param c -// | -// | -// | *@param* `d` — this is optional param d -// | -// | -// | *@param* `e` — this is optional param e -// | -// | -// | *@param* `` — { () => string; } } f this is optional param f -// | // | ---------------------------------------------------------------------- // ^ // | ---------------------------------------------------------------------- // | subtract(a: number, b: number, **c?: () => string**, d?: () => string, e?: () => string, f?: () => string): void +// | - `c?: () => string`: this is optional param c + // | This is subtract function -// | -// | *@param* `` -// | -// | *@param* `b` — this is about b -// | -// | -// | *@param* `c` — this is optional param c -// | -// | -// | *@param* `d` — this is optional param d -// | -// | -// | *@param* `e` — this is optional param e -// | -// | -// | *@param* `` — { () => string; } } f this is optional param f -// | // | ---------------------------------------------------------------------- // ^ // | ---------------------------------------------------------------------- // | subtract(a: number, b: number, c?: () => string, **d?: () => string**, e?: () => string, f?: () => string): void +// | - `d?: () => string`: this is optional param d + // | This is subtract function -// | -// | *@param* `` -// | -// | *@param* `b` — this is about b -// | -// | -// | *@param* `c` — this is optional param c -// | -// | -// | *@param* `d` — this is optional param d -// | -// | -// | *@param* `e` — this is optional param e -// | -// | -// | *@param* `` — { () => string; } } f this is optional param f -// | // | ---------------------------------------------------------------------- // ^ // | ---------------------------------------------------------------------- // | subtract(a: number, b: number, c?: () => string, d?: () => string, **e?: () => string**, f?: () => string): void +// | - `e?: () => string`: this is optional param e + // | This is subtract function -// | -// | *@param* `` -// | -// | *@param* `b` — this is about b -// | -// | -// | *@param* `c` — this is optional param c -// | -// | -// | *@param* `d` — this is optional param d -// | -// | -// | *@param* `e` — this is optional param e -// | -// | -// | *@param* `` — { () => string; } } f this is optional param f -// | // | ---------------------------------------------------------------------- // ^ // | ---------------------------------------------------------------------- // | subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, **f?: () => string**): void // | This is subtract function -// | -// | *@param* `` -// | -// | *@param* `b` — this is about b -// | -// | -// | *@param* `c` — this is optional param c -// | -// | -// | *@param* `d` — this is optional param d -// | -// | -// | *@param* `e` — this is optional param e -// | -// | -// | *@param* `` — { () => string; } } f this is optional param f -// | // | ---------------------------------------------------------------------- // /** this is square function // @paramTag { number } a this is input number of paramTag @@ -487,16 +300,9 @@ // ^ // | ---------------------------------------------------------------------- // | square(**a: number**): number +// | - `a: number`: this is input number + // | this is square function -// | -// | *@paramTag* — { number } a this is input number of paramTag -// | -// | -// | *@param* `a` — this is input number -// | -// | -// | *@returnType* — { number } it is return type -// | // | ---------------------------------------------------------------------- // /** this is divide function // @param { number} a this is a @@ -509,30 +315,16 @@ // ^ // | ---------------------------------------------------------------------- // | divide(**a: number**, b: number): void +// | - `a: number`: this is a + // | this is divide function -// | -// | *@param* `a` — this is a -// | -// | -// | *@paramTag* — { number } g this is optional param g -// | -// | -// | *@param* `b` — this is b -// | // | ---------------------------------------------------------------------- // ^ // | ---------------------------------------------------------------------- // | divide(a: number, **b: number**): void +// | - `b: number`: this is b + // | this is divide function -// | -// | *@param* `a` — this is a -// | -// | -// | *@paramTag* — { number } g this is optional param g -// | -// | -// | *@param* `b` — this is b -// | // | ---------------------------------------------------------------------- // /** // Function returns string concat of foo and bar @@ -546,24 +338,16 @@ // ^ // | ---------------------------------------------------------------------- // | fooBar(**foo: string**, bar: string): string +// | - `foo: string`: is string + // | Function returns string concat of foo and bar -// | -// | *@param* `foo` — is string -// | -// | -// | *@param* `bar` — is second string -// | // | ---------------------------------------------------------------------- // ^ // | ---------------------------------------------------------------------- // | fooBar(foo: string, **bar: string**): string +// | - `bar: string`: is second string + // | Function returns string concat of foo and bar -// | -// | *@param* `foo` — is string -// | -// | -// | *@param* `bar` — is second string -// | // | ---------------------------------------------------------------------- // /** This is a comment */ // var x; @@ -586,46 +370,26 @@ // ^ // | ---------------------------------------------------------------------- // | jsDocParamTest(**a: number**, b: number, c: number, d: number): number +// | - `a: number`: this is inline comment for a // | this is jsdoc style function with param tag as well as inline parameter help -// | -// | *@param* `a` — it is first parameter -// | -// | -// | *@param* `c` — it is third parameter -// | // | ---------------------------------------------------------------------- // ^ // | ---------------------------------------------------------------------- // | jsDocParamTest(a: number, **b: number**, c: number, d: number): number +// | - `b: number`: this is inline comment for b // | this is jsdoc style function with param tag as well as inline parameter help -// | -// | *@param* `a` — it is first parameter -// | -// | -// | *@param* `c` — it is third parameter -// | // | ---------------------------------------------------------------------- // ^ // | ---------------------------------------------------------------------- // | jsDocParamTest(a: number, b: number, **c: number**, d: number): number +// | - `c: number`: it is third parameter + // | this is jsdoc style function with param tag as well as inline parameter help -// | -// | *@param* `a` — it is first parameter -// | -// | -// | *@param* `c` — it is third parameter -// | // | ---------------------------------------------------------------------- // ^ // | ---------------------------------------------------------------------- // | jsDocParamTest(a: number, b: number, c: number, **d: number**): number // | this is jsdoc style function with param tag as well as inline parameter help -// | -// | *@param* `a` — it is first parameter -// | -// | -// | *@param* `c` — it is third parameter -// | // | ---------------------------------------------------------------------- // /** This is function comment // * And properly aligned comment @@ -668,62 +432,31 @@ // ^ // | ---------------------------------------------------------------------- // | jsDocCommentAlignmentTest3(**a: string**, b: any, c: any): void +// | - `a: string`: this is info about a +spanning on two lines and aligned perfectly + // | This is function comment // | And aligned with 4 space char margin -// | -// | *@param* `a` — this is info about a -// | spanning on two lines and aligned perfectly -// | -// | -// | *@param* `b` — this is info about b -// | spanning on two lines and aligned perfectly -// | spanning one more line alined perfectly -// | spanning another line with more margin -// | -// | -// | *@param* `c` — this is info about b -// | not aligned text about parameter will eat only one space -// | // | ---------------------------------------------------------------------- // ^ // | ---------------------------------------------------------------------- // | jsDocCommentAlignmentTest3(a: string, **b: any**, c: any): void +// | - `b: any`: this is info about b +spanning on two lines and aligned perfectly +spanning one more line alined perfectly + spanning another line with more margin + // | This is function comment // | And aligned with 4 space char margin -// | -// | *@param* `a` — this is info about a -// | spanning on two lines and aligned perfectly -// | -// | -// | *@param* `b` — this is info about b -// | spanning on two lines and aligned perfectly -// | spanning one more line alined perfectly -// | spanning another line with more margin -// | -// | -// | *@param* `c` — this is info about b -// | not aligned text about parameter will eat only one space -// | // | ---------------------------------------------------------------------- // ^ // | ---------------------------------------------------------------------- // | jsDocCommentAlignmentTest3(a: string, b: any, **c: any**): void +// | - `c: any`: this is info about b +not aligned text about parameter will eat only one space + // | This is function comment // | And aligned with 4 space char margin -// | -// | *@param* `a` — this is info about a -// | spanning on two lines and aligned perfectly -// | -// | -// | *@param* `b` — this is info about b -// | spanning on two lines and aligned perfectly -// | spanning one more line alined perfectly -// | spanning another line with more margin -// | -// | -// | *@param* `c` — this is info about b -// | not aligned text about parameter will eat only one space -// | // | ---------------------------------------------------------------------- // // ^ @@ -1065,14 +798,22 @@ "label": "sum(a: number, b: number): number", "documentation": { "kind": "markdown", - "value": "Adds two integers and returns the result\n\n*@param* `a` — first number\n\n\n*@param* `b` — second number\n" + "value": "Adds two integers and returns the result" }, "parameters": [ { - "label": "a: number" + "label": "a: number", + "documentation": { + "kind": "markdown", + "value": "first number\n" + } }, { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "second number\n" + } } ], "activeParameter": 0 @@ -1097,14 +838,22 @@ "label": "sum(a: number, b: number): number", "documentation": { "kind": "markdown", - "value": "Adds two integers and returns the result\n\n*@param* `a` — first number\n\n\n*@param* `b` — second number\n" + "value": "Adds two integers and returns the result" }, "parameters": [ { - "label": "a: number" + "label": "a: number", + "documentation": { + "kind": "markdown", + "value": "first number\n" + } }, { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "second number\n" + } } ], "activeParameter": 1 @@ -1129,11 +878,15 @@ "label": "multiply(a: number, b: number, c?: number, d?: any, e?: any): void", "documentation": { "kind": "markdown", - "value": "This is multiplication function\n\n*@param* ``\n\n*@param* `a` — first number\n\n\n*@param* `b`\n\n*@param* `c`\n\n*@param* `d`\n\n*@anotherTag*\n\n*@param* `e` — LastParam \n\n*@anotherTag*" + "value": "This is multiplication function" }, "parameters": [ { - "label": "a: number" + "label": "a: number", + "documentation": { + "kind": "markdown", + "value": "first number\n" + } }, { "label": "b: number" @@ -1145,7 +898,11 @@ "label": "d?: any" }, { - "label": "e?: any" + "label": "e?: any", + "documentation": { + "kind": "markdown", + "value": "LastParam " + } } ], "activeParameter": 0 @@ -1170,11 +927,15 @@ "label": "multiply(a: number, b: number, c?: number, d?: any, e?: any): void", "documentation": { "kind": "markdown", - "value": "This is multiplication function\n\n*@param* ``\n\n*@param* `a` — first number\n\n\n*@param* `b`\n\n*@param* `c`\n\n*@param* `d`\n\n*@anotherTag*\n\n*@param* `e` — LastParam \n\n*@anotherTag*" + "value": "This is multiplication function" }, "parameters": [ { - "label": "a: number" + "label": "a: number", + "documentation": { + "kind": "markdown", + "value": "first number\n" + } }, { "label": "b: number" @@ -1186,7 +947,11 @@ "label": "d?: any" }, { - "label": "e?: any" + "label": "e?: any", + "documentation": { + "kind": "markdown", + "value": "LastParam " + } } ], "activeParameter": 1 @@ -1211,11 +976,15 @@ "label": "multiply(a: number, b: number, c?: number, d?: any, e?: any): void", "documentation": { "kind": "markdown", - "value": "This is multiplication function\n\n*@param* ``\n\n*@param* `a` — first number\n\n\n*@param* `b`\n\n*@param* `c`\n\n*@param* `d`\n\n*@anotherTag*\n\n*@param* `e` — LastParam \n\n*@anotherTag*" + "value": "This is multiplication function" }, "parameters": [ { - "label": "a: number" + "label": "a: number", + "documentation": { + "kind": "markdown", + "value": "first number\n" + } }, { "label": "b: number" @@ -1227,7 +996,11 @@ "label": "d?: any" }, { - "label": "e?: any" + "label": "e?: any", + "documentation": { + "kind": "markdown", + "value": "LastParam " + } } ], "activeParameter": 2 @@ -1252,11 +1025,15 @@ "label": "multiply(a: number, b: number, c?: number, d?: any, e?: any): void", "documentation": { "kind": "markdown", - "value": "This is multiplication function\n\n*@param* ``\n\n*@param* `a` — first number\n\n\n*@param* `b`\n\n*@param* `c`\n\n*@param* `d`\n\n*@anotherTag*\n\n*@param* `e` — LastParam \n\n*@anotherTag*" + "value": "This is multiplication function" }, "parameters": [ { - "label": "a: number" + "label": "a: number", + "documentation": { + "kind": "markdown", + "value": "first number\n" + } }, { "label": "b: number" @@ -1268,7 +1045,11 @@ "label": "d?: any" }, { - "label": "e?: any" + "label": "e?: any", + "documentation": { + "kind": "markdown", + "value": "LastParam " + } } ], "activeParameter": 3 @@ -1293,11 +1074,15 @@ "label": "multiply(a: number, b: number, c?: number, d?: any, e?: any): void", "documentation": { "kind": "markdown", - "value": "This is multiplication function\n\n*@param* ``\n\n*@param* `a` — first number\n\n\n*@param* `b`\n\n*@param* `c`\n\n*@param* `d`\n\n*@anotherTag*\n\n*@param* `e` — LastParam \n\n*@anotherTag*" + "value": "This is multiplication function" }, "parameters": [ { - "label": "a: number" + "label": "a: number", + "documentation": { + "kind": "markdown", + "value": "first number\n" + } }, { "label": "b: number" @@ -1309,7 +1094,11 @@ "label": "d?: any" }, { - "label": "e?: any" + "label": "e?: any", + "documentation": { + "kind": "markdown", + "value": "LastParam " + } } ], "activeParameter": 4 @@ -1334,7 +1123,7 @@ "label": "f1(a: number): any", "documentation": { "kind": "markdown", - "value": "fn f1 with number\n\n*@param* `b` — about b\n" + "value": "fn f1 with number" }, "parameters": [ { @@ -1372,7 +1161,7 @@ "label": "f1(a: number): any", "documentation": { "kind": "markdown", - "value": "fn f1 with number\n\n*@param* `b` — about b\n" + "value": "fn f1 with number" }, "parameters": [ { @@ -1410,23 +1199,39 @@ "label": "subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void", "documentation": { "kind": "markdown", - "value": "This is subtract function\n\n*@param* ``\n\n*@param* `b` — this is about b\n\n\n*@param* `c` — this is optional param c\n\n\n*@param* `d` — this is optional param d\n\n\n*@param* `e` — this is optional param e\n\n\n*@param* `` — { () => string; } } f this is optional param f\n" + "value": "This is subtract function" }, "parameters": [ { "label": "a: number" }, { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "this is about b\n" + } }, { - "label": "c?: () => string" + "label": "c?: () => string", + "documentation": { + "kind": "markdown", + "value": "this is optional param c\n" + } }, { - "label": "d?: () => string" + "label": "d?: () => string", + "documentation": { + "kind": "markdown", + "value": "this is optional param d\n" + } }, { - "label": "e?: () => string" + "label": "e?: () => string", + "documentation": { + "kind": "markdown", + "value": "this is optional param e\n" + } }, { "label": "f?: () => string" @@ -1454,23 +1259,39 @@ "label": "subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void", "documentation": { "kind": "markdown", - "value": "This is subtract function\n\n*@param* ``\n\n*@param* `b` — this is about b\n\n\n*@param* `c` — this is optional param c\n\n\n*@param* `d` — this is optional param d\n\n\n*@param* `e` — this is optional param e\n\n\n*@param* `` — { () => string; } } f this is optional param f\n" + "value": "This is subtract function" }, "parameters": [ { "label": "a: number" }, { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "this is about b\n" + } }, { - "label": "c?: () => string" + "label": "c?: () => string", + "documentation": { + "kind": "markdown", + "value": "this is optional param c\n" + } }, { - "label": "d?: () => string" + "label": "d?: () => string", + "documentation": { + "kind": "markdown", + "value": "this is optional param d\n" + } }, { - "label": "e?: () => string" + "label": "e?: () => string", + "documentation": { + "kind": "markdown", + "value": "this is optional param e\n" + } }, { "label": "f?: () => string" @@ -1498,23 +1319,39 @@ "label": "subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void", "documentation": { "kind": "markdown", - "value": "This is subtract function\n\n*@param* ``\n\n*@param* `b` — this is about b\n\n\n*@param* `c` — this is optional param c\n\n\n*@param* `d` — this is optional param d\n\n\n*@param* `e` — this is optional param e\n\n\n*@param* `` — { () => string; } } f this is optional param f\n" + "value": "This is subtract function" }, "parameters": [ { "label": "a: number" }, { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "this is about b\n" + } }, { - "label": "c?: () => string" + "label": "c?: () => string", + "documentation": { + "kind": "markdown", + "value": "this is optional param c\n" + } }, { - "label": "d?: () => string" + "label": "d?: () => string", + "documentation": { + "kind": "markdown", + "value": "this is optional param d\n" + } }, { - "label": "e?: () => string" + "label": "e?: () => string", + "documentation": { + "kind": "markdown", + "value": "this is optional param e\n" + } }, { "label": "f?: () => string" @@ -1542,23 +1379,39 @@ "label": "subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void", "documentation": { "kind": "markdown", - "value": "This is subtract function\n\n*@param* ``\n\n*@param* `b` — this is about b\n\n\n*@param* `c` — this is optional param c\n\n\n*@param* `d` — this is optional param d\n\n\n*@param* `e` — this is optional param e\n\n\n*@param* `` — { () => string; } } f this is optional param f\n" + "value": "This is subtract function" }, "parameters": [ { "label": "a: number" }, { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "this is about b\n" + } }, { - "label": "c?: () => string" + "label": "c?: () => string", + "documentation": { + "kind": "markdown", + "value": "this is optional param c\n" + } }, { - "label": "d?: () => string" + "label": "d?: () => string", + "documentation": { + "kind": "markdown", + "value": "this is optional param d\n" + } }, { - "label": "e?: () => string" + "label": "e?: () => string", + "documentation": { + "kind": "markdown", + "value": "this is optional param e\n" + } }, { "label": "f?: () => string" @@ -1586,23 +1439,39 @@ "label": "subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void", "documentation": { "kind": "markdown", - "value": "This is subtract function\n\n*@param* ``\n\n*@param* `b` — this is about b\n\n\n*@param* `c` — this is optional param c\n\n\n*@param* `d` — this is optional param d\n\n\n*@param* `e` — this is optional param e\n\n\n*@param* `` — { () => string; } } f this is optional param f\n" + "value": "This is subtract function" }, "parameters": [ { "label": "a: number" }, { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "this is about b\n" + } }, { - "label": "c?: () => string" + "label": "c?: () => string", + "documentation": { + "kind": "markdown", + "value": "this is optional param c\n" + } }, { - "label": "d?: () => string" + "label": "d?: () => string", + "documentation": { + "kind": "markdown", + "value": "this is optional param d\n" + } }, { - "label": "e?: () => string" + "label": "e?: () => string", + "documentation": { + "kind": "markdown", + "value": "this is optional param e\n" + } }, { "label": "f?: () => string" @@ -1630,23 +1499,39 @@ "label": "subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void", "documentation": { "kind": "markdown", - "value": "This is subtract function\n\n*@param* ``\n\n*@param* `b` — this is about b\n\n\n*@param* `c` — this is optional param c\n\n\n*@param* `d` — this is optional param d\n\n\n*@param* `e` — this is optional param e\n\n\n*@param* `` — { () => string; } } f this is optional param f\n" + "value": "This is subtract function" }, "parameters": [ { "label": "a: number" }, { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "this is about b\n" + } }, { - "label": "c?: () => string" + "label": "c?: () => string", + "documentation": { + "kind": "markdown", + "value": "this is optional param c\n" + } }, { - "label": "d?: () => string" + "label": "d?: () => string", + "documentation": { + "kind": "markdown", + "value": "this is optional param d\n" + } }, { - "label": "e?: () => string" + "label": "e?: () => string", + "documentation": { + "kind": "markdown", + "value": "this is optional param e\n" + } }, { "label": "f?: () => string" @@ -1674,11 +1559,15 @@ "label": "square(a: number): number", "documentation": { "kind": "markdown", - "value": "this is square function\n\n*@paramTag* — { number } a this is input number of paramTag\n\n\n*@param* `a` — this is input number\n\n\n*@returnType* — { number } it is return type\n" + "value": "this is square function" }, "parameters": [ { - "label": "a: number" + "label": "a: number", + "documentation": { + "kind": "markdown", + "value": "this is input number\n" + } } ], "activeParameter": 0 @@ -1703,14 +1592,22 @@ "label": "divide(a: number, b: number): void", "documentation": { "kind": "markdown", - "value": "this is divide function\n\n*@param* `a` — this is a\n\n\n*@paramTag* — { number } g this is optional param g\n\n\n*@param* `b` — this is b\n" + "value": "this is divide function" }, "parameters": [ { - "label": "a: number" + "label": "a: number", + "documentation": { + "kind": "markdown", + "value": "this is a\n" + } }, { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "this is b\n" + } } ], "activeParameter": 0 @@ -1735,14 +1632,22 @@ "label": "divide(a: number, b: number): void", "documentation": { "kind": "markdown", - "value": "this is divide function\n\n*@param* `a` — this is a\n\n\n*@paramTag* — { number } g this is optional param g\n\n\n*@param* `b` — this is b\n" + "value": "this is divide function" }, "parameters": [ { - "label": "a: number" + "label": "a: number", + "documentation": { + "kind": "markdown", + "value": "this is a\n" + } }, { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "this is b\n" + } } ], "activeParameter": 1 @@ -1767,14 +1672,22 @@ "label": "fooBar(foo: string, bar: string): string", "documentation": { "kind": "markdown", - "value": "Function returns string concat of foo and bar\n\n*@param* `foo` — is string\n\n\n*@param* `bar` — is second string\n" + "value": "Function returns string concat of foo and bar" }, "parameters": [ { - "label": "foo: string" + "label": "foo: string", + "documentation": { + "kind": "markdown", + "value": "is string\n" + } }, { - "label": "bar: string" + "label": "bar: string", + "documentation": { + "kind": "markdown", + "value": "is second string\n" + } } ], "activeParameter": 0 @@ -1799,14 +1712,22 @@ "label": "fooBar(foo: string, bar: string): string", "documentation": { "kind": "markdown", - "value": "Function returns string concat of foo and bar\n\n*@param* `foo` — is string\n\n\n*@param* `bar` — is second string\n" + "value": "Function returns string concat of foo and bar" }, "parameters": [ { - "label": "foo: string" + "label": "foo: string", + "documentation": { + "kind": "markdown", + "value": "is string\n" + } }, { - "label": "bar: string" + "label": "bar: string", + "documentation": { + "kind": "markdown", + "value": "is second string\n" + } } ], "activeParameter": 1 @@ -1843,17 +1764,29 @@ "label": "jsDocParamTest(a: number, b: number, c: number, d: number): number", "documentation": { "kind": "markdown", - "value": "this is jsdoc style function with param tag as well as inline parameter help\n\n*@param* `a` — it is first parameter\n\n\n*@param* `c` — it is third parameter\n" + "value": "this is jsdoc style function with param tag as well as inline parameter help" }, "parameters": [ { - "label": "a: number" + "label": "a: number", + "documentation": { + "kind": "markdown", + "value": "this is inline comment for a" + } }, { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "this is inline comment for b" + } }, { - "label": "c: number" + "label": "c: number", + "documentation": { + "kind": "markdown", + "value": "it is third parameter\n" + } }, { "label": "d: number" @@ -1881,17 +1814,29 @@ "label": "jsDocParamTest(a: number, b: number, c: number, d: number): number", "documentation": { "kind": "markdown", - "value": "this is jsdoc style function with param tag as well as inline parameter help\n\n*@param* `a` — it is first parameter\n\n\n*@param* `c` — it is third parameter\n" + "value": "this is jsdoc style function with param tag as well as inline parameter help" }, "parameters": [ { - "label": "a: number" + "label": "a: number", + "documentation": { + "kind": "markdown", + "value": "this is inline comment for a" + } }, { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "this is inline comment for b" + } }, { - "label": "c: number" + "label": "c: number", + "documentation": { + "kind": "markdown", + "value": "it is third parameter\n" + } }, { "label": "d: number" @@ -1919,17 +1864,29 @@ "label": "jsDocParamTest(a: number, b: number, c: number, d: number): number", "documentation": { "kind": "markdown", - "value": "this is jsdoc style function with param tag as well as inline parameter help\n\n*@param* `a` — it is first parameter\n\n\n*@param* `c` — it is third parameter\n" + "value": "this is jsdoc style function with param tag as well as inline parameter help" }, "parameters": [ { - "label": "a: number" + "label": "a: number", + "documentation": { + "kind": "markdown", + "value": "this is inline comment for a" + } }, { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "this is inline comment for b" + } }, { - "label": "c: number" + "label": "c: number", + "documentation": { + "kind": "markdown", + "value": "it is third parameter\n" + } }, { "label": "d: number" @@ -1957,17 +1914,29 @@ "label": "jsDocParamTest(a: number, b: number, c: number, d: number): number", "documentation": { "kind": "markdown", - "value": "this is jsdoc style function with param tag as well as inline parameter help\n\n*@param* `a` — it is first parameter\n\n\n*@param* `c` — it is third parameter\n" + "value": "this is jsdoc style function with param tag as well as inline parameter help" }, "parameters": [ { - "label": "a: number" + "label": "a: number", + "documentation": { + "kind": "markdown", + "value": "this is inline comment for a" + } }, { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "this is inline comment for b" + } }, { - "label": "c: number" + "label": "c: number", + "documentation": { + "kind": "markdown", + "value": "it is third parameter\n" + } }, { "label": "d: number" @@ -2043,17 +2012,29 @@ "label": "jsDocCommentAlignmentTest3(a: string, b: any, c: any): void", "documentation": { "kind": "markdown", - "value": "This is function comment\n And aligned with 4 space char margin\n\n*@param* `a` — this is info about a\nspanning on two lines and aligned perfectly\n\n\n*@param* `b` — this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin\n\n\n*@param* `c` — this is info about b\nnot aligned text about parameter will eat only one space\n" + "value": "This is function comment\n And aligned with 4 space char margin" }, "parameters": [ { - "label": "a: string" + "label": "a: string", + "documentation": { + "kind": "markdown", + "value": "this is info about a\nspanning on two lines and aligned perfectly\n" + } }, { - "label": "b: any" + "label": "b: any", + "documentation": { + "kind": "markdown", + "value": "this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin\n" + } }, { - "label": "c: any" + "label": "c: any", + "documentation": { + "kind": "markdown", + "value": "this is info about b\nnot aligned text about parameter will eat only one space\n" + } } ], "activeParameter": 0 @@ -2078,17 +2059,29 @@ "label": "jsDocCommentAlignmentTest3(a: string, b: any, c: any): void", "documentation": { "kind": "markdown", - "value": "This is function comment\n And aligned with 4 space char margin\n\n*@param* `a` — this is info about a\nspanning on two lines and aligned perfectly\n\n\n*@param* `b` — this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin\n\n\n*@param* `c` — this is info about b\nnot aligned text about parameter will eat only one space\n" + "value": "This is function comment\n And aligned with 4 space char margin" }, "parameters": [ { - "label": "a: string" + "label": "a: string", + "documentation": { + "kind": "markdown", + "value": "this is info about a\nspanning on two lines and aligned perfectly\n" + } }, { - "label": "b: any" + "label": "b: any", + "documentation": { + "kind": "markdown", + "value": "this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin\n" + } }, { - "label": "c: any" + "label": "c: any", + "documentation": { + "kind": "markdown", + "value": "this is info about b\nnot aligned text about parameter will eat only one space\n" + } } ], "activeParameter": 1 @@ -2113,17 +2106,29 @@ "label": "jsDocCommentAlignmentTest3(a: string, b: any, c: any): void", "documentation": { "kind": "markdown", - "value": "This is function comment\n And aligned with 4 space char margin\n\n*@param* `a` — this is info about a\nspanning on two lines and aligned perfectly\n\n\n*@param* `b` — this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin\n\n\n*@param* `c` — this is info about b\nnot aligned text about parameter will eat only one space\n" + "value": "This is function comment\n And aligned with 4 space char margin" }, "parameters": [ { - "label": "a: string" + "label": "a: string", + "documentation": { + "kind": "markdown", + "value": "this is info about a\nspanning on two lines and aligned perfectly\n" + } }, { - "label": "b: any" + "label": "b: any", + "documentation": { + "kind": "markdown", + "value": "this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin\n" + } }, { - "label": "c: any" + "label": "c: any", + "documentation": { + "kind": "markdown", + "value": "this is info about b\nnot aligned text about parameter will eat only one space\n" + } } ], "activeParameter": 2 diff --git a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsFunctionDeclaration.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsFunctionDeclaration.baseline index 66ecad0c6f..b2bb5b74a3 100644 --- a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsFunctionDeclaration.baseline +++ b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsFunctionDeclaration.baseline @@ -19,11 +19,13 @@ // ^ // | ---------------------------------------------------------------------- // | fooWithParameters(**a: string**, b: number): void +// | - `a: string`: this is comment about a // | This is comment for function signature // | ---------------------------------------------------------------------- // ^ // | ---------------------------------------------------------------------- // | fooWithParameters(a: string, **b: number**): void +// | - `b: number`: this is comment for b // | This is comment for function signature // | ---------------------------------------------------------------------- // /** @@ -35,10 +37,9 @@ // ^ // | ---------------------------------------------------------------------- // | fn(**a: string**): any +// | - `a: string`: a string + // | Does something -// | -// | *@param* `a` — a string -// | // | ---------------------------------------------------------------------- [ { @@ -85,10 +86,18 @@ }, "parameters": [ { - "label": "a: string" + "label": "a: string", + "documentation": { + "kind": "markdown", + "value": "this is comment about a" + } }, { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "this is comment for b" + } } ], "activeParameter": 0 @@ -117,10 +126,18 @@ }, "parameters": [ { - "label": "a: string" + "label": "a: string", + "documentation": { + "kind": "markdown", + "value": "this is comment about a" + } }, { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "this is comment for b" + } } ], "activeParameter": 1 @@ -145,11 +162,15 @@ "label": "fn(a: string): any", "documentation": { "kind": "markdown", - "value": "Does something\n\n*@param* `a` — a string\n" + "value": "Does something" }, "parameters": [ { - "label": "a: string" + "label": "a: string", + "documentation": { + "kind": "markdown", + "value": "a string\n" + } } ], "activeParameter": 0 diff --git a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsFunctionExpression.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsFunctionExpression.baseline index 9d140cdd06..8ed07113b8 100644 --- a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsFunctionExpression.baseline +++ b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpCommentsFunctionExpression.baseline @@ -7,11 +7,13 @@ // ^ // | ---------------------------------------------------------------------- // | lambdaFoo(**a: number**, b: number): number +// | - `a: number`: param a // | this is lambda comment // | ---------------------------------------------------------------------- // ^ // | ---------------------------------------------------------------------- // | lambdaFoo(a: number, **b: number**): number +// | - `b: number`: param b // | this is lambda comment // | ---------------------------------------------------------------------- // function anotherFunc(a: number) { @@ -39,13 +41,8 @@ // ^ // | ---------------------------------------------------------------------- // | assigned(**s: string**): number +// | - `s: string`: On parameter // | Summary on expression -// | -// | *@param* `s` — param on expression -// | -// | -// | *@returns* — return on expression -// | // | ---------------------------------------------------------------------- [ { @@ -68,10 +65,18 @@ }, "parameters": [ { - "label": "a: number" + "label": "a: number", + "documentation": { + "kind": "markdown", + "value": "param a" + } }, { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "param b" + } } ], "activeParameter": 0 @@ -100,10 +105,18 @@ }, "parameters": [ { - "label": "a: number" + "label": "a: number", + "documentation": { + "kind": "markdown", + "value": "param a" + } }, { - "label": "b: number" + "label": "b: number", + "documentation": { + "kind": "markdown", + "value": "param b" + } } ], "activeParameter": 1 @@ -128,11 +141,15 @@ "label": "assigned(s: string): number", "documentation": { "kind": "markdown", - "value": "Summary on expression\n\n*@param* `s` — param on expression\n\n\n*@returns* — return on expression\n" + "value": "Summary on expression" }, "parameters": [ { - "label": "s: string" + "label": "s: string", + "documentation": { + "kind": "markdown", + "value": "On parameter" + } } ], "activeParameter": 0 diff --git a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpConstructorCallParamProperties.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpConstructorCallParamProperties.baseline index 09d5ad8e9a..0133760842 100644 --- a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpConstructorCallParamProperties.baseline +++ b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpConstructorCallParamProperties.baseline @@ -12,10 +12,9 @@ // ^ // | ---------------------------------------------------------------------- // | Circle(**radius: number**): Circle +// | - `radius: number`: The radius of the circle. + // | Initialize a circle. -// | -// | *@param* `radius` — The radius of the circle. -// | // | ---------------------------------------------------------------------- [ { @@ -34,11 +33,15 @@ "label": "Circle(radius: number): Circle", "documentation": { "kind": "markdown", - "value": "Initialize a circle.\n\n*@param* `radius` — The radius of the circle.\n" + "value": "Initialize a circle." }, "parameters": [ { - "label": "radius: number" + "label": "radius: number", + "documentation": { + "kind": "markdown", + "value": "The radius of the circle.\n" + } } ], "activeParameter": 0 diff --git a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpInferenceJsDocImportTag.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpInferenceJsDocImportTag.baseline index a3c8672f13..6af7f1602a 100644 --- a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpInferenceJsDocImportTag.baseline +++ b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpInferenceJsDocImportTag.baseline @@ -14,9 +14,6 @@ // ^ // | ---------------------------------------------------------------------- // | foo(**a: Foo**): void -// | -// | -// | *@param* `a` // | ---------------------------------------------------------------------- [ { @@ -33,10 +30,6 @@ "signatures": [ { "label": "foo(a: Foo): void", - "documentation": { - "kind": "markdown", - "value": "\n\n*@param* `a`" - }, "parameters": [ { "label": "a: Foo" diff --git a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpJSDocCallbackTag.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpJSDocCallbackTag.baseline index 4b8bdc8fec..335bb0ee73 100644 --- a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpJSDocCallbackTag.baseline +++ b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpJSDocCallbackTag.baseline @@ -25,14 +25,20 @@ // ^ // | ---------------------------------------------------------------------- // | t(**eventName: string**, eventName2: string | number, eventName3: any): number +// | - `eventName: string`: - So many words + // | ---------------------------------------------------------------------- // ^ // | ---------------------------------------------------------------------- // | t(eventName: string, **eventName2: string | number**, eventName3: any): number +// | - `eventName2: string | number`: - Silence is golden + // | ---------------------------------------------------------------------- // ^ // | ---------------------------------------------------------------------- // | t(eventName: string, eventName2: string | number, **eventName3: any**): number +// | - `eventName3: any`: - Osterreich mos def + // | ---------------------------------------------------------------------- [ { @@ -51,13 +57,25 @@ "label": "t(eventName: string, eventName2: string | number, eventName3: any): number", "parameters": [ { - "label": "eventName: string" + "label": "eventName: string", + "documentation": { + "kind": "markdown", + "value": "- So many words\n" + } }, { - "label": "eventName2: string | number" + "label": "eventName2: string | number", + "documentation": { + "kind": "markdown", + "value": "- Silence is golden\n" + } }, { - "label": "eventName3: any" + "label": "eventName3: any", + "documentation": { + "kind": "markdown", + "value": "- Osterreich mos def\n" + } } ], "activeParameter": 0 @@ -82,13 +100,25 @@ "label": "t(eventName: string, eventName2: string | number, eventName3: any): number", "parameters": [ { - "label": "eventName: string" + "label": "eventName: string", + "documentation": { + "kind": "markdown", + "value": "- So many words\n" + } }, { - "label": "eventName2: string | number" + "label": "eventName2: string | number", + "documentation": { + "kind": "markdown", + "value": "- Silence is golden\n" + } }, { - "label": "eventName3: any" + "label": "eventName3: any", + "documentation": { + "kind": "markdown", + "value": "- Osterreich mos def\n" + } } ], "activeParameter": 1 @@ -113,13 +143,25 @@ "label": "t(eventName: string, eventName2: string | number, eventName3: any): number", "parameters": [ { - "label": "eventName: string" + "label": "eventName: string", + "documentation": { + "kind": "markdown", + "value": "- So many words\n" + } }, { - "label": "eventName2: string | number" + "label": "eventName2: string | number", + "documentation": { + "kind": "markdown", + "value": "- Silence is golden\n" + } }, { - "label": "eventName3: any" + "label": "eventName3: any", + "documentation": { + "kind": "markdown", + "value": "- Osterreich mos def\n" + } } ], "activeParameter": 2 diff --git a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpJSDocTags.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpJSDocTags.baseline index c8f35b8fdb..11b013bb57 100644 --- a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpJSDocTags.baseline +++ b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpJSDocTags.baseline @@ -54,35 +54,22 @@ // | ---------------------------------------------------------------------- // | Foo(**value: number**): Foo // | This is the constructor. -// | -// | *@myjsdoctag* — this is a comment -// | // | ---------------------------------------------------------------------- // Foo.method1(); // ^ // | ---------------------------------------------------------------------- // | method1(): void // | method1 documentation -// | -// | *@mytag* — comment1 comment2 -// | // | ---------------------------------------------------------------------- // foo.method2(); // ^ // | ---------------------------------------------------------------------- // | method2(): void -// | -// | -// | *@mytag* // | ---------------------------------------------------------------------- // foo.method3(); // ^ // | ---------------------------------------------------------------------- // | method3(): number -// | -// | -// | *@returns* — a value -// | // | ---------------------------------------------------------------------- // foo.method4(); // foo.property1; @@ -106,7 +93,7 @@ "label": "Foo(value: number): Foo", "documentation": { "kind": "markdown", - "value": "This is the constructor.\n\n*@myjsdoctag* — this is a comment\n" + "value": "This is the constructor." }, "parameters": [ { @@ -135,7 +122,7 @@ "label": "method1(): void", "documentation": { "kind": "markdown", - "value": "method1 documentation\n\n*@mytag* — comment1 comment2\n" + "value": "method1 documentation" }, "parameters": [] } @@ -157,10 +144,6 @@ "signatures": [ { "label": "method2(): void", - "documentation": { - "kind": "markdown", - "value": "\n\n*@mytag*" - }, "parameters": [] } ], @@ -181,10 +164,6 @@ "signatures": [ { "label": "method3(): number", - "documentation": { - "kind": "markdown", - "value": "\n\n*@returns* — a value\n" - }, "parameters": [] } ], diff --git a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpJSMissingPropertyAccess.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpJSMissingPropertyAccess.baseline index ba9dac6dbd..c46124de53 100644 --- a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpJSMissingPropertyAccess.baseline +++ b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpJSMissingPropertyAccess.baseline @@ -4,13 +4,9 @@ // ^ // | ---------------------------------------------------------------------- // | ReadonlyArray.filter(**predicate: (value: T, index: number, array: readonly T[]) => value is S**, thisArg?: any): S[] +// | - `predicate: (value: T, index: number, array: readonly T[]) => value is S`: A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + // | Returns the elements of an array that meet the condition specified in a callback function. -// | -// | *@param* `predicate` — A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. -// | -// | -// | *@param* `thisArg` — An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. -// | // | ---------------------------------------------------------------------- [ { @@ -29,14 +25,22 @@ "label": "ReadonlyArray.filter(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[]", "documentation": { "kind": "markdown", - "value": "Returns the elements of an array that meet the condition specified in a callback function.\n\n*@param* `predicate` — A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.\n\n\n*@param* `thisArg` — An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.\n" + "value": "Returns the elements of an array that meet the condition specified in a callback function." }, "parameters": [ { - "label": "predicate: (value: T, index: number, array: readonly T[]) => value is S" + "label": "predicate: (value: T, index: number, array: readonly T[]) => value is S", + "documentation": { + "kind": "markdown", + "value": "A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.\n" + } }, { - "label": "thisArg?: any" + "label": "thisArg?: any", + "documentation": { + "kind": "markdown", + "value": "An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.\n" + } } ], "activeParameter": 0 @@ -45,14 +49,22 @@ "label": "ReadonlyArray.filter(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T[]", "documentation": { "kind": "markdown", - "value": "Returns the elements of an array that meet the condition specified in a callback function.\n\n*@param* `predicate` — A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.\n\n\n*@param* `thisArg` — An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.\n" + "value": "Returns the elements of an array that meet the condition specified in a callback function." }, "parameters": [ { - "label": "predicate: (value: T, index: number, array: readonly T[]) => unknown" + "label": "predicate: (value: T, index: number, array: readonly T[]) => unknown", + "documentation": { + "kind": "markdown", + "value": "A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.\n" + } }, { - "label": "thisArg?: any" + "label": "thisArg?: any", + "documentation": { + "kind": "markdown", + "value": "An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.\n" + } } ], "activeParameter": 0 diff --git a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpRestArgs2.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpRestArgs2.baseline index 78c6b7c1f1..a1c6ff80d9 100644 --- a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpRestArgs2.baseline +++ b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpRestArgs2.baseline @@ -8,13 +8,9 @@ // ^ // | ---------------------------------------------------------------------- // | Function.call(thisArg: any, **...argArray: any[]**): any +// | - `...argArray: any[]`: A list of arguments to be passed to the method. + // | Calls a method of an object, substituting another object for the current object. -// | -// | *@param* `thisArg` — The object to be used as the current object. -// | -// | -// | *@param* `argArray` — A list of arguments to be passed to the method. -// | // | ---------------------------------------------------------------------- // }); // }; @@ -36,14 +32,22 @@ "label": "Function.call(thisArg: any, ...argArray: any[]): any", "documentation": { "kind": "markdown", - "value": "Calls a method of an object, substituting another object for the current object.\n\n*@param* `thisArg` — The object to be used as the current object.\n\n\n*@param* `argArray` — A list of arguments to be passed to the method.\n" + "value": "Calls a method of an object, substituting another object for the current object." }, "parameters": [ { - "label": "thisArg: any" + "label": "thisArg: any", + "documentation": { + "kind": "markdown", + "value": "The object to be used as the current object.\n" + } }, { - "label": "...argArray: any[]" + "label": "...argArray: any[]", + "documentation": { + "kind": "markdown", + "value": "A list of arguments to be passed to the method.\n" + } } ], "activeParameter": 1 diff --git a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpRestArgs3.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpRestArgs3.baseline index 07690179ef..93cbe60160 100644 --- a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpRestArgs3.baseline +++ b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpRestArgs3.baseline @@ -4,14 +4,10 @@ // ^ // | ---------------------------------------------------------------------- // | assign(target: object, **...sources: any[]**): any +// | - `...sources: any[]`: One or more source objects from which to copy properties + // | Copy the values of all of the enumerable own properties from one or more source objects to a // | target object. Returns the target object. -// | -// | *@param* `target` — The target object to copy to. -// | -// | -// | *@param* `sources` — One or more source objects from which to copy properties -// | // | ---------------------------------------------------------------------- [ { @@ -30,14 +26,22 @@ "label": "assign(target: T, source: U): T & U", "documentation": { "kind": "markdown", - "value": "Copy the values of all of the enumerable own properties from one or more source objects to a\ntarget object. Returns the target object.\n\n*@param* `target` — The target object to copy to.\n\n\n*@param* `source` — The source object from which to copy properties.\n" + "value": "Copy the values of all of the enumerable own properties from one or more source objects to a\ntarget object. Returns the target object." }, "parameters": [ { - "label": "target: T" + "label": "target: T", + "documentation": { + "kind": "markdown", + "value": "The target object to copy to.\n" + } }, { - "label": "source: U" + "label": "source: U", + "documentation": { + "kind": "markdown", + "value": "The source object from which to copy properties.\n" + } } ], "activeParameter": 1 @@ -46,17 +50,29 @@ "label": "assign(target: T, source1: U, source2: V): T & U & V", "documentation": { "kind": "markdown", - "value": "Copy the values of all of the enumerable own properties from one or more source objects to a\ntarget object. Returns the target object.\n\n*@param* `target` — The target object to copy to.\n\n\n*@param* `source1` — The first source object from which to copy properties.\n\n\n*@param* `source2` — The second source object from which to copy properties.\n" + "value": "Copy the values of all of the enumerable own properties from one or more source objects to a\ntarget object. Returns the target object." }, "parameters": [ { - "label": "target: T" + "label": "target: T", + "documentation": { + "kind": "markdown", + "value": "The target object to copy to.\n" + } }, { - "label": "source1: U" + "label": "source1: U", + "documentation": { + "kind": "markdown", + "value": "The first source object from which to copy properties.\n" + } }, { - "label": "source2: V" + "label": "source2: V", + "documentation": { + "kind": "markdown", + "value": "The second source object from which to copy properties.\n" + } } ], "activeParameter": 1 @@ -65,20 +81,36 @@ "label": "assign(target: T, source1: U, source2: V, source3: W): T & U & V & W", "documentation": { "kind": "markdown", - "value": "Copy the values of all of the enumerable own properties from one or more source objects to a\ntarget object. Returns the target object.\n\n*@param* `target` — The target object to copy to.\n\n\n*@param* `source1` — The first source object from which to copy properties.\n\n\n*@param* `source2` — The second source object from which to copy properties.\n\n\n*@param* `source3` — The third source object from which to copy properties.\n" + "value": "Copy the values of all of the enumerable own properties from one or more source objects to a\ntarget object. Returns the target object." }, "parameters": [ { - "label": "target: T" + "label": "target: T", + "documentation": { + "kind": "markdown", + "value": "The target object to copy to.\n" + } }, { - "label": "source1: U" + "label": "source1: U", + "documentation": { + "kind": "markdown", + "value": "The first source object from which to copy properties.\n" + } }, { - "label": "source2: V" + "label": "source2: V", + "documentation": { + "kind": "markdown", + "value": "The second source object from which to copy properties.\n" + } }, { - "label": "source3: W" + "label": "source3: W", + "documentation": { + "kind": "markdown", + "value": "The third source object from which to copy properties.\n" + } } ], "activeParameter": 1 @@ -87,14 +119,22 @@ "label": "assign(target: object, ...sources: any[]): any", "documentation": { "kind": "markdown", - "value": "Copy the values of all of the enumerable own properties from one or more source objects to a\ntarget object. Returns the target object.\n\n*@param* `target` — The target object to copy to.\n\n\n*@param* `sources` — One or more source objects from which to copy properties\n" + "value": "Copy the values of all of the enumerable own properties from one or more source objects to a\ntarget object. Returns the target object." }, "parameters": [ { - "label": "target: object" + "label": "target: object", + "documentation": { + "kind": "markdown", + "value": "The target object to copy to.\n" + } }, { - "label": "...sources: any[]" + "label": "...sources: any[]", + "documentation": { + "kind": "markdown", + "value": "One or more source objects from which to copy properties\n" + } } ], "activeParameter": 1 diff --git a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpTypeArguments2.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpTypeArguments2.baseline index 8fded6dda1..9103180f7d 100644 --- a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpTypeArguments2.baseline +++ b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpTypeArguments2.baseline @@ -13,80 +13,24 @@ // | ---------------------------------------------------------------------- // | f<**T**, U, V, W>(a: number, b: string, c: boolean): void // | some documentation -// | -// | *@template* `T` — some documentation 2 -// | -// | -// | *@template* `W` -// | -// | *@template* `U`, `V` — others -// | -// | -// | *@param* `a` — ok -// | -// | -// | *@param* `b` — not ok -// | // | ---------------------------------------------------------------------- // f(a: number, b: string, c: boolean): void // | some documentation -// | -// | *@template* `T` — some documentation 2 -// | -// | -// | *@template* `W` -// | -// | *@template* `U`, `V` — others -// | -// | -// | *@param* `a` — ok -// | -// | -// | *@param* `b` — not ok -// | // | ---------------------------------------------------------------------- // f(a: number, b: string, c: boolean): void // | some documentation -// | -// | *@template* `T` — some documentation 2 -// | -// | -// | *@template* `W` -// | -// | *@template* `U`, `V` — others -// | -// | -// | *@param* `a` — ok -// | -// | -// | *@param* `b` — not ok -// | // | ---------------------------------------------------------------------- // f(a: number, b: string, c: boolean): void // | some documentation -// | -// | *@template* `T` — some documentation 2 -// | -// | -// | *@template* `W` -// | -// | *@template* `U`, `V` — others -// | -// | -// | *@param* `a` — ok -// | -// | -// | *@param* `b` — not ok -// | // | ---------------------------------------------------------------------- [ { @@ -105,7 +49,7 @@ "label": "f(a: number, b: string, c: boolean): void", "documentation": { "kind": "markdown", - "value": "some documentation\n\n*@template* `T` — some documentation 2\n\n\n*@template* `W`\n\n*@template* `U`, `V` — others\n\n\n*@param* `a` — ok\n\n\n*@param* `b` — not ok\n" + "value": "some documentation" }, "parameters": [ { @@ -143,7 +87,7 @@ "label": "f(a: number, b: string, c: boolean): void", "documentation": { "kind": "markdown", - "value": "some documentation\n\n*@template* `T` — some documentation 2\n\n\n*@template* `W`\n\n*@template* `U`, `V` — others\n\n\n*@param* `a` — ok\n\n\n*@param* `b` — not ok\n" + "value": "some documentation" }, "parameters": [ { @@ -181,7 +125,7 @@ "label": "f(a: number, b: string, c: boolean): void", "documentation": { "kind": "markdown", - "value": "some documentation\n\n*@template* `T` — some documentation 2\n\n\n*@template* `W`\n\n*@template* `U`, `V` — others\n\n\n*@param* `a` — ok\n\n\n*@param* `b` — not ok\n" + "value": "some documentation" }, "parameters": [ { @@ -219,7 +163,7 @@ "label": "f(a: number, b: string, c: boolean): void", "documentation": { "kind": "markdown", - "value": "some documentation\n\n*@template* `T` — some documentation 2\n\n\n*@template* `W`\n\n*@template* `U`, `V` — others\n\n\n*@param* `a` — ok\n\n\n*@param* `b` — not ok\n" + "value": "some documentation" }, "parameters": [ { diff --git a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpWithUnknown.baseline b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpWithUnknown.baseline index fb0b57ecb9..29b43ecebe 100644 --- a/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpWithUnknown.baseline +++ b/testdata/baselines/reference/fourslash/signatureHelp/signatureHelpWithUnknown.baseline @@ -4,10 +4,9 @@ // ^ // | ---------------------------------------------------------------------- // | eval(**x: string**): any +// | - `x: string`: A String value that contains valid JavaScript code. + // | Evaluates JavaScript code and executes it. -// | -// | *@param* `x` — A String value that contains valid JavaScript code. -// | // | ---------------------------------------------------------------------- [ { @@ -26,11 +25,15 @@ "label": "eval(x: string): any", "documentation": { "kind": "markdown", - "value": "Evaluates JavaScript code and executes it.\n\n*@param* `x` — A String value that contains valid JavaScript code.\n" + "value": "Evaluates JavaScript code and executes it." }, "parameters": [ { - "label": "x: string" + "label": "x: string", + "documentation": { + "kind": "markdown", + "value": "A String value that contains valid JavaScript code.\n" + } } ], "activeParameter": 0 diff --git a/testdata/baselines/reference/fourslash/signatureHelp/trailingCommaSignatureHelp.baseline b/testdata/baselines/reference/fourslash/signatureHelp/trailingCommaSignatureHelp.baseline index 543be1ccc4..19c6743bec 100644 --- a/testdata/baselines/reference/fourslash/signatureHelp/trailingCommaSignatureHelp.baseline +++ b/testdata/baselines/reference/fourslash/signatureHelp/trailingCommaSignatureHelp.baseline @@ -12,10 +12,9 @@ // ^ // | ---------------------------------------------------------------------- // | str(n: number, **radix: number**): string +// | - `radix: number`: The radix + // | Stringifies a number with radix -// | -// | *@param* `radix` — The radix -// | // | ---------------------------------------------------------------------- // // declare function f(a: T): T; @@ -50,14 +49,18 @@ "label": "str(n: number, radix: number): string", "documentation": { "kind": "markdown", - "value": "Stringifies a number with radix\n\n*@param* `radix` — The radix\n" + "value": "Stringifies a number with radix" }, "parameters": [ { "label": "n: number" }, { - "label": "radix: number" + "label": "radix: number", + "documentation": { + "kind": "markdown", + "value": "The radix\n" + } } ], "activeParameter": 1