Add support for JSDoc markup
Closed this issue · 1 comments
wooorm commented
From the JSDoc site:
Inline tags also begin with an at sign. However, inline tags and their text must be enclosed in curly braces (
{
and}
). The{
denotes the start of the inline tag, and the}
denotes the end of the inline tag. If your tag's text includes a closing curly brace (}
), you must escape it with a leading backslash (\
). You do not need to use a line break after inline tags.
From the TS AST:
type JSDocComment = JSDocText | JSDocLink | JSDocLinkCode | JSDocLinkPlain;
interface JSDocText extends Node {
readonly kind: SyntaxKind.JSDocText;
text: string;
}
interface JSDocLink extends Node {
readonly kind: SyntaxKind.JSDocLink;
readonly name?: EntityName | JSDocMemberName;
text: string;
}
interface JSDocLinkCode extends Node {
readonly kind: SyntaxKind.JSDocLinkCode;
readonly name?: EntityName | JSDocMemberName;
text: string;
}
interface JSDocLinkPlain extends Node {
readonly kind: SyntaxKind.JSDocLinkPlain;
readonly name?: EntityName | JSDocMemberName;
text: string;
}
/** Class#method reference in JSDoc */
interface JSDocMemberName extends Node {
readonly kind: SyntaxKind.JSDocMemberName;
readonly left: EntityName | JSDocMemberName;
readonly right: Identifier;
}