UNPKG

2.13 kBTypeScriptView Raw
1import { DocBlockTag } from '../nodes/DocBlockTag';
2import { TSDocTagDefinition } from '../configuration/TSDocTagDefinition';
3/**
4 * Represents a set of modifier tags that were extracted from a doc comment.
5 *
6 * @remarks
7 * TSDoc modifier tags are block tags that do not have any associated rich text content.
8 * Instead, their presence or absence acts as an on/off switch, indicating some aspect
9 * of the underlying API item. For example, the `@internal` modifier indicates that a
10 * signature is internal (i.e. not part of the public API contract).
11 */
12export declare class ModifierTagSet {
13 private readonly _nodes;
14 private readonly _nodesByName;
15 /**
16 * The original block tag nodes that defined the modifiers in this set, excluding duplicates.
17 */
18 get nodes(): ReadonlyArray<DocBlockTag>;
19 /**
20 * Returns true if the set contains a DocBlockTag with the specified tag name.
21 * Note that synonyms are not considered. The comparison is case-insensitive.
22 * @param modifierTagName - The name of the tag, including the `@` prefix For example, `@internal`
23 */
24 hasTagName(modifierTagName: string): boolean;
25 /**
26 * Returns true if the set contains a DocBlockTag matching the specified tag definition.
27 * Note that synonyms are not considered. The comparison is case-insensitive.
28 * The TSDocTagDefinition must be a modifier tag.
29 * @param tagName - The name of the tag, including the `@` prefix For example, `@internal`
30 */
31 hasTag(modifierTagDefinition: TSDocTagDefinition): boolean;
32 /**
33 * Returns a DocBlockTag matching the specified tag definition, or undefined if no such
34 * tag was added to the set. If there were multiple instances, returned object will be
35 * the first one to be added.
36 */
37 tryGetTag(modifierTagDefinition: TSDocTagDefinition): DocBlockTag | undefined;
38 /**
39 * Adds a new modifier tag to the set. If a tag already exists with the same name,
40 * then no change is made, and the return value is false.
41 */
42 addTag(blockTag: DocBlockTag): boolean;
43}
44//# sourceMappingURL=ModifierTagSet.d.ts.map
\No newline at end of file