UNPKG

1.79 kBJavaScriptView Raw
1import { StringChecks } from '../parser/StringChecks';
2import { Standardization } from '../details/Standardization';
3/**
4 * Determines the type of syntax for a TSDocTagDefinition
5 */
6export var TSDocTagSyntaxKind;
7(function (TSDocTagSyntaxKind) {
8 /**
9 * The tag is intended to be an inline tag. For example: `{@link}`.
10 */
11 TSDocTagSyntaxKind[TSDocTagSyntaxKind["InlineTag"] = 0] = "InlineTag";
12 /**
13 * The tag is intended to be a block tag that starts a new documentation
14 * section. For example: `@remarks`
15 */
16 TSDocTagSyntaxKind[TSDocTagSyntaxKind["BlockTag"] = 1] = "BlockTag";
17 /**
18 * The tag is intended to be a modifier tag whose presence indicates
19 * an aspect of the associated API item. For example: `@internal`
20 */
21 TSDocTagSyntaxKind[TSDocTagSyntaxKind["ModifierTag"] = 2] = "ModifierTag";
22})(TSDocTagSyntaxKind || (TSDocTagSyntaxKind = {}));
23/**
24 * Defines a TSDoc tag that will be understood by the TSDocParser.
25 */
26var TSDocTagDefinition = /** @class */ (function () {
27 function TSDocTagDefinition(parameters) {
28 StringChecks.validateTSDocTagName(parameters.tagName);
29 this.tagName = parameters.tagName;
30 this.tagNameWithUpperCase = parameters.tagName.toUpperCase();
31 this.syntaxKind = parameters.syntaxKind;
32 this.standardization =
33 parameters.standardization || Standardization.None;
34 this.allowMultiple = !!parameters.allowMultiple;
35 }
36 /**
37 * Throws an exception if `tagName` is not a valid TSDoc tag name.
38 */
39 TSDocTagDefinition.validateTSDocTagName = function (tagName) {
40 StringChecks.validateTSDocTagName(tagName);
41 };
42 return TSDocTagDefinition;
43}());
44export { TSDocTagDefinition };
45//# sourceMappingURL=TSDocTagDefinition.js.map
\No newline at end of file