@@ -29,6 +29,7 @@ export class RunAction extends CommandLineAction {
2929 private _configFileParameter : CommandLineStringParameter ;
3030 private _localParameter : CommandLineFlagParameter ;
3131 private _typescriptCompilerFolder : CommandLineStringParameter ;
32+ private _skipLibCheck : CommandLineFlagParameter ;
3233
3334 constructor ( parser : ApiExtractorCommandLine ) {
3435 super ( {
@@ -63,6 +64,15 @@ export class RunAction extends CommandLineAction {
6364 + ' This can often cause compiler errors due to incompatibilities between different TS versions.'
6465 + ' Use "--typescript-compiler-folder" to specify the folder path for your compiler version.'
6566 } ) ;
67+
68+ this . _skipLibCheck = this . defineFlagParameter ( {
69+ parameterLongName : '--skip-lib-check' ,
70+ description : 'This flag causes the typechecker to be invoked with the --skipLibCheck option. This option is not'
71+ + ' recommended and may cause api-extractor to produce incomplete or incorrect declarations, but it '
72+ + ' may be required when dependencies contain declarations that are incompatible with newer versions'
73+ + ' of TypeScript. If this option is used, it is strongly recommended that broken dependencies be'
74+ + ' fixed or upgraded.'
75+ } ) ;
6676 }
6777
6878 protected onExecute ( ) : Promise < void > { // override
@@ -124,7 +134,8 @@ export class RunAction extends CommandLineAction {
124134 config ,
125135 {
126136 localBuild : this . _localParameter . value ,
127- typescriptCompilerFolder : typescriptCompilerFolder
137+ typescriptCompilerFolder : typescriptCompilerFolder ,
138+ skipLibCheck : this . _skipLibCheck . value
128139 }
129140 ) ;
130141
0 commit comments