1 | import type { TSDocTagDefinition } from './TSDocTagDefinition';
|
2 | import { TSDocValidationConfiguration } from './TSDocValidationConfiguration';
|
3 | import { DocNodeManager } from './DocNodeManager';
|
4 | import { type TSDocMessageId } from '../parser/TSDocMessageId';
|
5 | /**
|
6 | * Configuration for the TSDocParser.
|
7 | */
|
8 | export declare class TSDocConfiguration {
|
9 | private readonly _tagDefinitions;
|
10 | private readonly _tagDefinitionsByName;
|
11 | private readonly _supportedTagDefinitions;
|
12 | private readonly _validation;
|
13 | private readonly _docNodeManager;
|
14 | private readonly _supportedHtmlElements;
|
15 | constructor();
|
16 | /**
|
17 | * Resets the `TSDocConfiguration` object to its initial empty state.
|
18 | * @param noStandardTags - The `TSDocConfiguration` constructor normally adds definitions for the
|
19 | * standard TSDoc tags. Set `noStandardTags` to true for a completely empty `tagDefinitions` collection.
|
20 | */
|
21 | clear(noStandardTags?: boolean): void;
|
22 | /**
|
23 | * The TSDoc tags that are defined in this configuration.
|
24 | *
|
25 | * @remarks
|
26 | * The subset of "supported" tags is tracked by {@link TSDocConfiguration.supportedTagDefinitions}.
|
27 | */
|
28 | get tagDefinitions(): ReadonlyArray<TSDocTagDefinition>;
|
29 | /**
|
30 | * Returns the subset of { TSDocConfiguration.tagDefinitions}
|
31 | * that are supported in this configuration.
|
32 | *
|
33 | *
|
34 | * This property is only used when
|
35 | * { TSDocValidationConfiguration.reportUnsupportedTags} is enabled.
|
36 | */
|
37 | get supportedTagDefinitions(): ReadonlyArray<TSDocTagDefinition>;
|
38 | /**
|
39 | * Enable/disable validation checks performed by the parser.
|
40 | */
|
41 | get validation(): TSDocValidationConfiguration;
|
42 | /**
|
43 | * The HTML element names that are supported in this configuration. Used in conjunction with the `reportUnsupportedHtmlElements` setting.
|
44 | */
|
45 | get supportedHtmlElements(): string[];
|
46 | /**
|
47 | * Register custom DocNode subclasses.
|
48 | */
|
49 | get docNodeManager(): DocNodeManager;
|
50 | /**
|
51 | * Return the tag that was defined with the specified name, or undefined
|
52 | * if not found.
|
53 | */
|
54 | tryGetTagDefinition(tagName: string): TSDocTagDefinition | undefined;
|
55 | /**
|
56 | * Return the tag that was defined with the specified name, or undefined
|
57 | * if not found.
|
58 | */
|
59 | tryGetTagDefinitionWithUpperCase(alreadyUpperCaseTagName: string): TSDocTagDefinition | undefined;
|
60 | /**
|
61 | * Define a new TSDoc tag to be recognized by the TSDocParser, and mark it as unsupported.
|
62 | * Use {@link TSDocConfiguration.setSupportForTag} to mark it as supported.
|
63 | *
|
64 | * @remarks
|
65 | * If a tag is "defined" this means that the parser recognizes it and understands its syntax.
|
66 | * Whereas if a tag is "supported", this means it is defined AND the application implements the tag.
|
67 | */
|
68 | addTagDefinition(tagDefinition: TSDocTagDefinition): void;
|
69 | /**
|
70 | * Calls {@link TSDocConfiguration.addTagDefinition} for a list of definitions,
|
71 | * and optionally marks them as supported.
|
72 | * @param tagDefinitions - the definitions to be added
|
73 | * @param supported - if specified, calls the {@link TSDocConfiguration.setSupportForTag}
|
74 | * method to mark the definitions as supported or unsupported
|
75 | */
|
76 | addTagDefinitions(tagDefinitions: ReadonlyArray<TSDocTagDefinition>, supported?: boolean | undefined): void;
|
77 | /**
|
78 | * Returns true if the tag is supported in this configuration.
|
79 | */
|
80 | isTagSupported(tagDefinition: TSDocTagDefinition): boolean;
|
81 | /**
|
82 | * Specifies whether the tag definition is supported in this configuration.
|
83 | * The parser may issue warnings for unsupported tags.
|
84 | *
|
85 | * @remarks
|
86 | * If a tag is "defined" this means that the parser recognizes it and understands its syntax.
|
87 | * Whereas if a tag is "supported", this means it is defined AND the application implements the tag.
|
88 | *
|
89 | * This function automatically sets {@link TSDocValidationConfiguration.reportUnsupportedTags}
|
90 | * to true.
|
91 | */
|
92 | setSupportForTag(tagDefinition: TSDocTagDefinition, supported: boolean): void;
|
93 | /**
|
94 | * Specifies whether the tag definition is supported in this configuration.
|
95 | * This operation sets {@link TSDocValidationConfiguration.reportUnsupportedTags} to `true`.
|
96 | *
|
97 | * @remarks
|
98 | * The parser may issue warnings for unsupported tags.
|
99 | * If a tag is "defined" this means that the parser recognizes it and understands its syntax.
|
100 | * Whereas if a tag is "supported", this means it is defined AND the application implements the tag.
|
101 | */
|
102 | setSupportForTags(tagDefinitions: ReadonlyArray<TSDocTagDefinition>, supported: boolean): void;
|
103 | /**
|
104 | * Assigns the `supportedHtmlElements` property, replacing any previous elements.
|
105 | * This operation sets {@link TSDocValidationConfiguration.reportUnsupportedHtmlElements} to `true`.
|
106 | */
|
107 | setSupportedHtmlElements(htmlTags: string[]): void;
|
108 | /**
|
109 | * Returns true if the html element is supported in this configuration.
|
110 | */
|
111 | isHtmlElementSupported(htmlTag: string): boolean;
|
112 | /**
|
113 | * Returns true if the specified {@link TSDocMessageId} string is implemented by this release of the TSDoc parser.
|
114 | * This can be used to detect misspelled identifiers.
|
115 | *
|
116 | * @privateRemarks
|
117 | *
|
118 | * Why this API is associated with TSDocConfiguration: In the future, if we enable support for custom extensions
|
119 | * of the TSDoc parser, we may provide a way to register custom message identifiers.
|
120 | */
|
121 | isKnownMessageId(messageId: TSDocMessageId | string): boolean;
|
122 | /**
|
123 | * Returns the list of {@link TSDocMessageId} strings that are implemented by this release of the TSDoc parser.
|
124 | *
|
125 | * @privateRemarks
|
126 | *
|
127 | * Why this API is associated with TSDocConfiguration: In the future, if we enable support for custom extensions
|
128 | * of the TSDoc parser, we may provide a way to register custom message identifiers.
|
129 | */
|
130 | get allTsdocMessageIds(): ReadonlyArray<TSDocMessageId>;
|
131 | private _requireTagToBeDefined;
|
132 | }
|
133 | //# sourceMappingURL=TSDocConfiguration.d.ts.map |
\ | No newline at end of file |