@@ -81,7 +81,7 @@ export class Extractor {
8181 logError : ( message : string ) => console . error ( colors . red ( message ) )
8282 } ;
8383
84- private readonly _config : IExtractorConfig ;
84+ private readonly _actualConfig : IExtractorConfig ;
8585 private readonly _program : ts . Program ;
8686 private readonly _localBuild : boolean ;
8787 private readonly _monitoredLogger : MonitoredLogger ;
@@ -104,24 +104,24 @@ export class Extractor {
104104 }
105105 this . _monitoredLogger = new MonitoredLogger ( mergedLogger ) ;
106106
107- this . _config = Extractor . _applyConfigDefaults ( config ) ;
107+ this . _actualConfig = Extractor . _applyConfigDefaults ( config ) ;
108108
109109 if ( ! options ) {
110110 options = { } ;
111111 }
112112
113113 this . _localBuild = options . localBuild || false ;
114114
115- switch ( this . _config . compiler . configType ) {
115+ switch ( this . _actualConfig . compiler . configType ) {
116116 case 'tsconfig' :
117- const rootFolder : string = this . _config . compiler . rootFolder ;
117+ const rootFolder : string = this . _actualConfig . compiler . rootFolder ;
118118 if ( ! fsx . existsSync ( rootFolder ) ) {
119119 throw new Error ( 'The root folder does not exist: ' + rootFolder ) ;
120120 }
121121
122122 this . _absoluteRootFolder = path . normalize ( path . resolve ( rootFolder ) ) ;
123123
124- let tsconfig : { } | undefined = this . _config . compiler . overrideTsconfig ;
124+ let tsconfig : { } | undefined = this . _actualConfig . compiler . overrideTsconfig ;
125125 if ( ! tsconfig ) {
126126 // If it wasn't overridden, then load it from disk
127127 tsconfig = JsonFile . load ( path . join ( this . _absoluteRootFolder , 'tsconfig.json' ) ) ;
@@ -167,8 +167,8 @@ export class Extractor {
167167 * It is provided for diagnostic purposes. For example, a build script could write
168168 * this object to a JSON file to report the final configuration options used by API Extractor.
169169 */
170- public get config ( ) : IExtractorConfig {
171- return this . _config ;
170+ public get actualConfig ( ) : IExtractorConfig {
171+ return this . _actualConfig ;
172172 }
173173
174174 /**
@@ -193,20 +193,20 @@ export class Extractor {
193193 }
194194
195195 const projectConfig : IExtractorProjectConfig = options . projectConfig ?
196- options . projectConfig : this . _config . project ;
196+ options . projectConfig : this . _actualConfig . project ;
197197
198198 // This helps strict-null-checks to understand that _applyConfigDefaults() eliminated
199199 // any undefined members
200- if ( ! ( this . _config . policies && this . _config . apiJsonFile && this . _config . apiReviewFile
201- && this . _config . packageTypings ) ) {
200+ if ( ! ( this . _actualConfig . policies && this . _actualConfig . apiJsonFile && this . _actualConfig . apiReviewFile
201+ && this . _actualConfig . packageTypings ) ) {
202202 throw new Error ( 'The configuration object wasn\'t normalized properly' ) ;
203203 }
204204
205205 const context : ExtractorContext = new ExtractorContext ( {
206206 program : this . _program ,
207207 entryPointFile : path . resolve ( this . _absoluteRootFolder , projectConfig . entryPointSourceFile ) ,
208208 logger : this . _monitoredLogger ,
209- policies : this . _config . policies
209+ policies : this . _actualConfig . policies
210210 } ) ;
211211
212212 for ( const externalJsonFileFolder of projectConfig . externalJsonFileFolders || [ ] ) {
@@ -215,7 +215,7 @@ export class Extractor {
215215
216216 const packageBaseName : string = path . basename ( context . packageName ) ;
217217
218- const apiJsonFileConfig : IExtractorApiJsonFileConfig = this . _config . apiJsonFile ;
218+ const apiJsonFileConfig : IExtractorApiJsonFileConfig = this . _actualConfig . apiJsonFile ;
219219
220220 if ( apiJsonFileConfig . enabled ) {
221221 const outputFolder : string = path . resolve ( this . _absoluteRootFolder ,
@@ -229,16 +229,16 @@ export class Extractor {
229229 jsonGenerator . writeJsonFile ( apiJsonFilename , context ) ;
230230 }
231231
232- if ( this . _config . apiReviewFile . enabled ) {
232+ if ( this . _actualConfig . apiReviewFile . enabled ) {
233233 const generator : ApiFileGenerator = new ApiFileGenerator ( ) ;
234234 const apiReviewFilename : string = packageBaseName + '.api.ts' ;
235235
236236 const actualApiReviewPath : string = path . resolve ( this . _absoluteRootFolder ,
237- this . _config . apiReviewFile . tempFolder , apiReviewFilename ) ;
237+ this . _actualConfig . apiReviewFile . tempFolder , apiReviewFilename ) ;
238238 const actualApiReviewShortPath : string = this . _getShortFilePath ( actualApiReviewPath ) ;
239239
240240 const expectedApiReviewPath : string = path . resolve ( this . _absoluteRootFolder ,
241- this . _config . apiReviewFile . apiReviewFolder , apiReviewFilename ) ;
241+ this . _actualConfig . apiReviewFile . apiReviewFolder , apiReviewFilename ) ;
242242 const expectedApiReviewShortPath : string = this . _getShortFilePath ( expectedApiReviewPath ) ;
243243
244244 const actualApiReviewContent : string = generator . generateApiFileContent ( context ) ;
@@ -280,11 +280,11 @@ export class Extractor {
280280 }
281281 }
282282
283- if ( this . _config . packageTypings . enabled ) {
283+ if ( this . _actualConfig . packageTypings . enabled ) {
284284 const packageTypingsGenerator : PackageTypingsGenerator = new PackageTypingsGenerator ( context ) ;
285285
286286 const dtsFilename : string = path . resolve ( this . _absoluteRootFolder ,
287- this . _config . packageTypings . outputFolder , this . _config . packageTypings . internalFilename ) ;
287+ this . _actualConfig . packageTypings . outputFolder , this . _actualConfig . packageTypings . internalFilename ) ;
288288 this . _monitoredLogger . logVerbose ( `Writing package typings: ${ dtsFilename } ` ) ;
289289
290290 fsx . mkdirsSync ( path . dirname ( dtsFilename ) ) ;
0 commit comments