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