UNPKG

2.17 kBTypeScriptView Raw
1import { Standardization } from '../details/Standardization';
2/**
3 * Determines the type of syntax for a TSDocTagDefinition
4 */
5export declare enum TSDocTagSyntaxKind {
6 /**
7 * The tag is intended to be an inline tag. For example: `{@link}`.
8 */
9 InlineTag = 0,
10 /**
11 * The tag is intended to be a block tag that starts a new documentation
12 * section. For example: `@remarks`
13 */
14 BlockTag = 1,
15 /**
16 * The tag is intended to be a modifier tag whose presence indicates
17 * an aspect of the associated API item. For example: `@internal`
18 */
19 ModifierTag = 2
20}
21/**
22 * Constructor parameters for {@link TSDocTagDefinition}
23 */
24export interface ITSDocTagDefinitionParameters {
25 tagName: string;
26 syntaxKind: TSDocTagSyntaxKind;
27 allowMultiple?: boolean;
28}
29/**
30 * @internal
31 */
32export interface ITSDocTagDefinitionInternalParameters extends ITSDocTagDefinitionParameters {
33 standardization: Standardization;
34}
35/**
36 * Defines a TSDoc tag that will be understood by the TSDocParser.
37 */
38export declare class TSDocTagDefinition {
39 /**
40 * The TSDoc tag name. TSDoc tag names start with an at-sign (`@`) followed
41 * by ASCII letters using "camelCase" capitalization.
42 */
43 readonly tagName: string;
44 /**
45 * The TSDoc tag name in all capitals, which is used for performing
46 * case-insensitive comparisons or lookups.
47 */
48 readonly tagNameWithUpperCase: string;
49 /**
50 * Specifies the expected syntax for this tag.
51 */
52 readonly syntaxKind: TSDocTagSyntaxKind;
53 /**
54 * Indicates the level of support expected from documentation tools that implement
55 * the standard.
56 */
57 readonly standardization: Standardization;
58 /**
59 * If true, then this TSDoc tag may appear multiple times in a doc comment.
60 * By default, a tag may only appear once.
61 */
62 readonly allowMultiple: boolean;
63 constructor(parameters: ITSDocTagDefinitionParameters);
64 /**
65 * Throws an exception if `tagName` is not a valid TSDoc tag name.
66 */
67 static validateTSDocTagName(tagName: string): void;
68}
69//# sourceMappingURL=TSDocTagDefinition.d.ts.map
\No newline at end of file