UNPKG

1.93 kBTypeScriptView Raw
1import { DocNodeKind, DocNode } from './DocNode';
2import { TokenSequence } from '../parser/TokenSequence';
3import { IDocInlineTagBaseParameters, IDocInlineTagBaseParsedParameters, DocInlineTagBase } from './DocInlineTagBase';
4/**
5 * Constructor parameters for {@link DocInlineTag}.
6 */
7export interface IDocInlineTagParameters extends IDocInlineTagBaseParameters {
8 tagContent: string;
9}
10/**
11 * Constructor parameters for {@link DocInlineTag}.
12 */
13export interface IDocInlineTagParsedParameters extends IDocInlineTagBaseParsedParameters {
14 tagContentExcerpt?: TokenSequence;
15}
16/**
17 * Represents a generic TSDoc inline tag, including custom tags.
18 *
19 * @remarks
20 * NOTE: Certain tags such as `{@link}` and `{@inheritDoc}` have specialized structures and parser rules,
21 * and thus are represented using {@link DocLinkTag} or {@link DocInheritDocTag} instead. However, if the
22 * specialized parser rule encounters a syntax error, but the outer framing is correct, then the parser constructs
23 * a generic `DocInlineTag` instead of `DocErrorText`. This means, for example, that it is possible sometimes for
24 * `DocInlineTag.tagName` to be `"@link"`.
25 */
26export declare class DocInlineTag extends DocInlineTagBase {
27 private _tagContent;
28 private readonly _tagContentExcerpt;
29 /**
30 * Don't call this directly. Instead use {@link TSDocParser}
31 * @internal
32 */
33 constructor(parameters: IDocInlineTagParameters | IDocInlineTagParsedParameters);
34 /** @override */
35 get kind(): DocNodeKind | string;
36 /**
37 * The tag content.
38 * @remarks
39 * For example, if the tag is `{@myTag x=12.34 y=56.78 }` then the tag content
40 * would be `x=12.34 y=56.78 `, including the trailing space but not the leading space.
41 */
42 get tagContent(): string;
43 /** @override */
44 protected getChildNodesForContent(): ReadonlyArray<DocNode | undefined>;
45}
46//# sourceMappingURL=DocInlineTag.d.ts.map
\No newline at end of file