Skip to content

jsDoc tags are not available from the language service API #12863

@Knagis

Description

@Knagis

The earlier versions (before 2.1) returned all tags (except for @param) when symbol.getDocumentationComment() was called. The new parser is smarter and parses all tags. However they cannot be retrieved by using the public API.

In my case this is needed so that the tags can be analysed by a build script that generates code and documentation. I am using a mixture of standard and custom jsdoc tags that control how a type or property is represented in the documentation.

The typescript.d.ts file does not expose the jsDoc property of nodes. I can do <ts.NodeArray<ts.JSDoc>>(<any>node).jsDoc - this works but I would prefer if this was officially exposed in the API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: APIRelates to the public API for TypeScriptSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions