File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 1
- import { TSDocTagDefinition , TSDocTagSyntaxKind } from '@microsoft/tsdoc' ;
1
+ import {
2
+ TSDocTagDefinition ,
3
+ TSDocTagSyntaxKind ,
4
+ TSDocConfiguration
5
+ } from '@microsoft/tsdoc' ;
2
6
import * as fs from 'fs' ;
3
7
import * as path from 'path' ;
4
8
import * as Ajv from 'ajv' ;
@@ -122,4 +126,21 @@ export class TSDocConfigFile {
122
126
public addExtendsFile ( otherFile : TSDocConfigFile ) : void {
123
127
this . _extendsFiles . push ( otherFile ) ;
124
128
}
129
+
130
+ /**
131
+ * Applies the settings from this config file to a TSDoc parser configuration.
132
+ * Any `extendsFile` settings will also applied.
133
+ */
134
+ public applyToParserConfiguration ( configuration : TSDocConfiguration ) : void {
135
+ // First apply the base config files
136
+ for ( const extendsFile of this . extendsFiles ) {
137
+ extendsFile . applyToParserConfiguration ( configuration ) ;
138
+ }
139
+
140
+ // The apply this one
141
+ for ( const tagDefinition of this . tagDefinitions ) {
142
+ configuration . addTagDefinition ( tagDefinition ) ;
143
+ configuration . setSupportForTag ( tagDefinition , true ) ;
144
+ }
145
+ }
125
146
}
You can’t perform that action at this time.
0 commit comments