File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -142,6 +142,29 @@ export interface IExtractorApiJsonFileConfig {
142142 outputFolder ?: string ;
143143}
144144
145+ /**
146+ * Configures how the package typings (*.d.ts) will be generated.
147+ * @remarks
148+ * API Extractor can generate a single unified *.d.ts file that contains all
149+ * the exported typings for the package entry point. It can also remove
150+ * \@alpha \@beta \@internal definitions depending on the release type.
151+ *
152+ * @beta
153+ */
154+ export interface IExtractorPackageTypingsConfig {
155+ /**
156+ * Whether to generate package typings. The default is false.
157+ */
158+ enabled : boolean ;
159+
160+ /**
161+ * Specifies where the *.d.ts files should be written.
162+ *
163+ * The default value is "./dist"
164+ */
165+ outputFolder ?: string ;
166+ }
167+
145168/**
146169 * Configuration options for the API Extractor tool. These options can be loaded
147170 * from a JSON config file.
@@ -175,4 +198,10 @@ export interface IExtractorConfig {
175198 * {@inheritdoc IExtractorApiJsonFileConfig }
176199 */
177200 apiJsonFile ?: IExtractorApiJsonFileConfig ;
201+
202+ /**
203+ * {@inheritdoc IExtractorPackageTypingsConfig }
204+ * @beta
205+ */
206+ packageTypings ?: IExtractorPackageTypingsConfig ;
178207}
Original file line number Diff line number Diff line change 2020 "apiJsonFile" : {
2121 "enabled" : true ,
2222 "outputFolder" : " ./dist"
23+ },
24+
25+ "packageTypings" : {
26+ "enabled" : false ,
27+ "outputFolder" : " ./dist"
2328 }
2429}
Original file line number Diff line number Diff line change 113113 },
114114 "required" : [ " enabled" ],
115115 "additionalProperties" : false
116+ },
117+
118+ "packageTypings" : {
119+ "description" : " Configures how the package typings (*.d.ts) will be generated." ,
120+ "type" : " object" ,
121+ "properties" : {
122+ "enabled" : {
123+ "description" : " Whether to generate package typings. The default is false." ,
124+ "type" : " boolean"
125+ },
126+ "outputFolder" : {
127+ "description" : " Specifies where the *.d.ts files should be written. The default value is \" ./dist\" " ,
128+ "type" : " string"
129+ }
130+ },
131+ "required" : [ " enabled" ],
132+ "additionalProperties" : false
116133 }
117134 },
118135 "required" : [ " compiler" , " project" ],
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ export {
1818 IExtractorPoliciesConfig ,
1919 IExtractorApiReviewFileConfig ,
2020 IExtractorApiJsonFileConfig ,
21+ IExtractorPackageTypingsConfig ,
2122 IExtractorConfig
2223} from './extractor/IExtractorConfig' ;
2324
Original file line number Diff line number Diff line change @@ -175,6 +175,8 @@ interface IExtractorConfig {
175175 apiJsonFile ?: IExtractorApiJsonFileConfig ;
176176 apiReviewFile ?: IExtractorApiReviewFileConfig ;
177177 compiler : IExtractorTsconfigCompilerConfig | IExtractorRuntimeCompilerConfig ;
178+ // @beta
179+ packageTypings ?: IExtractorPackageTypingsConfig ;
178180 policies ?: IExtractorPoliciesConfig ;
179181 project : IExtractorProjectConfig ;
180182}
@@ -186,6 +188,12 @@ interface IExtractorOptions {
186188 localBuild ?: boolean ;
187189}
188190
191+ // @beta
192+ interface IExtractorPackageTypingsConfig {
193+ enabled : boolean ;
194+ outputFolder ?: string ;
195+ }
196+
189197// @public
190198interface IExtractorPoliciesConfig {
191199 namespaceSupport : 'conservative' | 'permissive' ;
You can’t perform that action at this time.
0 commit comments