@@ -147,6 +147,7 @@ namespace ts {
147147 type : "boolean" ,
148148 category : Diagnostics . Basic_Options ,
149149 description : Diagnostics . Enable_incremental_compilation ,
150+ transpileOptionValue : undefined
150151 } ,
151152 {
152153 name : "locale" ,
@@ -262,7 +263,8 @@ namespace ts {
262263 affectsModuleResolution : true ,
263264 showInSimplifiedHelpView : true ,
264265 category : Diagnostics . Basic_Options ,
265- description : Diagnostics . Specify_library_files_to_be_included_in_the_compilation
266+ description : Diagnostics . Specify_library_files_to_be_included_in_the_compilation ,
267+ transpileOptionValue : undefined
266268 } ,
267269 {
268270 name : "allowJs" ,
@@ -299,6 +301,7 @@ namespace ts {
299301 showInSimplifiedHelpView : true ,
300302 category : Diagnostics . Basic_Options ,
301303 description : Diagnostics . Generates_corresponding_d_ts_file ,
304+ transpileOptionValue : undefined
302305 } ,
303306 {
304307 name : "declarationMap" ,
@@ -307,13 +310,15 @@ namespace ts {
307310 showInSimplifiedHelpView : true ,
308311 category : Diagnostics . Basic_Options ,
309312 description : Diagnostics . Generates_a_sourcemap_for_each_corresponding_d_ts_file ,
313+ transpileOptionValue : undefined
310314 } ,
311315 {
312316 name : "emitDeclarationOnly" ,
313317 type : "boolean" ,
314318 affectsEmit : true ,
315319 category : Diagnostics . Advanced_Options ,
316320 description : Diagnostics . Only_emit_d_ts_declaration_files ,
321+ transpileOptionValue : undefined
317322 } ,
318323 {
319324 name : "sourceMap" ,
@@ -332,6 +337,7 @@ namespace ts {
332337 showInSimplifiedHelpView : true ,
333338 category : Diagnostics . Basic_Options ,
334339 description : Diagnostics . Concatenate_and_emit_output_to_single_file ,
340+ transpileOptionValue : undefined
335341 } ,
336342 {
337343 name : "outDir" ,
@@ -359,6 +365,7 @@ namespace ts {
359365 isTSConfigOnly : true ,
360366 category : Diagnostics . Basic_Options ,
361367 description : Diagnostics . Enable_project_compilation ,
368+ transpileOptionValue : undefined
362369 } ,
363370 {
364371 name : "tsBuildInfoFile" ,
@@ -368,6 +375,7 @@ namespace ts {
368375 paramType : Diagnostics . FILE ,
369376 category : Diagnostics . Basic_Options ,
370377 description : Diagnostics . Specify_file_to_store_incremental_compilation_information ,
378+ transpileOptionValue : undefined
371379 } ,
372380 {
373381 name : "removeComments" ,
@@ -384,6 +392,7 @@ namespace ts {
384392 showInSimplifiedHelpView : true ,
385393 category : Diagnostics . Basic_Options ,
386394 description : Diagnostics . Do_not_emit_outputs ,
395+ transpileOptionValue : undefined
387396 } ,
388397 {
389398 name : "importHelpers" ,
@@ -403,7 +412,8 @@ namespace ts {
403412 name : "isolatedModules" ,
404413 type : "boolean" ,
405414 category : Diagnostics . Basic_Options ,
406- description : Diagnostics . Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule
415+ description : Diagnostics . Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule ,
416+ transpileOptionValue : true
407417 } ,
408418
409419 // Strict Type Checks
@@ -540,7 +550,8 @@ namespace ts {
540550 affectsModuleResolution : true ,
541551 isTSConfigOnly : true ,
542552 category : Diagnostics . Module_Resolution_Options ,
543- description : Diagnostics . A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl
553+ description : Diagnostics . A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl ,
554+ transpileOptionValue : undefined
544555 } ,
545556 {
546557 // this option can only be specified in tsconfig.json
@@ -555,7 +566,8 @@ namespace ts {
555566 } ,
556567 affectsModuleResolution : true ,
557568 category : Diagnostics . Module_Resolution_Options ,
558- description : Diagnostics . List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime
569+ description : Diagnostics . List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime ,
570+ transpileOptionValue : undefined
559571 } ,
560572 {
561573 name : "typeRoots" ,
@@ -579,7 +591,8 @@ namespace ts {
579591 affectsModuleResolution : true ,
580592 showInSimplifiedHelpView : true ,
581593 category : Diagnostics . Module_Resolution_Options ,
582- description : Diagnostics . Type_declaration_files_to_be_included_in_compilation
594+ description : Diagnostics . Type_declaration_files_to_be_included_in_compilation ,
595+ transpileOptionValue : undefined
583596 } ,
584597 {
585598 name : "allowSyntheticDefaultImports" ,
@@ -680,6 +693,7 @@ namespace ts {
680693 category : Diagnostics . Advanced_Options ,
681694 paramType : Diagnostics . FILE ,
682695 description : Diagnostics . Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file ,
696+ transpileOptionValue : undefined
683697 } ,
684698 {
685699 name : "reactNamespace" ,
@@ -729,14 +743,20 @@ namespace ts {
729743 type : "boolean" ,
730744 affectsModuleResolution : true ,
731745 category : Diagnostics . Advanced_Options ,
732- description : Diagnostics . Do_not_include_the_default_library_file_lib_d_ts
746+ description : Diagnostics . Do_not_include_the_default_library_file_lib_d_ts ,
747+ // We are not returning a sourceFile for lib file when asked by the program,
748+ // so pass --noLib to avoid reporting a file not found error.
749+ transpileOptionValue : true
733750 } ,
734751 {
735752 name : "noResolve" ,
736753 type : "boolean" ,
737754 affectsModuleResolution : true ,
738755 category : Diagnostics . Advanced_Options ,
739- description : Diagnostics . Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files
756+ description : Diagnostics . Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files ,
757+ // We are not doing a full typecheck, we are not resolving the whole context,
758+ // so pass --noResolve to avoid reporting missing file errors.
759+ transpileOptionValue : true
740760 } ,
741761 {
742762 name : "stripInternal" ,
@@ -772,6 +792,7 @@ namespace ts {
772792 affectsEmit : true ,
773793 category : Diagnostics . Advanced_Options ,
774794 description : Diagnostics . Do_not_emit_outputs_if_any_errors_were_reported ,
795+ transpileOptionValue : undefined
775796 } ,
776797 {
777798 name : "preserveConstEnums" ,
@@ -787,7 +808,8 @@ namespace ts {
787808 isFilePath : true ,
788809 paramType : Diagnostics . DIRECTORY ,
789810 category : Diagnostics . Advanced_Options ,
790- description : Diagnostics . Output_directory_for_generated_declaration_files
811+ description : Diagnostics . Output_directory_for_generated_declaration_files ,
812+ transpileOptionValue : undefined
791813 } ,
792814 {
793815 name : "skipLibCheck" ,
@@ -880,6 +902,10 @@ namespace ts {
880902 export const sourceFileAffectingCompilerOptions : ReadonlyArray < CommandLineOption > = optionDeclarations . filter ( option =>
881903 ! ! option . affectsSourceFile || ! ! option . affectsModuleResolution || ! ! option . affectsBindDiagnostics ) ;
882904
905+ /* @internal */
906+ export const transpileOptionValueCompilerOptions : ReadonlyArray < CommandLineOption > = optionDeclarations . filter ( option =>
907+ hasProperty ( option , "transpileOptionValue" ) ) ;
908+
883909 /* @internal */
884910 export const buildOpts : CommandLineOption [ ] = [
885911 ...commonOptionsWithBuild ,
0 commit comments