@@ -281,33 +281,38 @@ namespace ts {
281
281
name : "declaration" ,
282
282
shortName : "d" ,
283
283
type : "boolean" ,
284
+ affectsEmit : true ,
284
285
showInSimplifiedHelpView : true ,
285
286
category : Diagnostics . Basic_Options ,
286
287
description : Diagnostics . Generates_corresponding_d_ts_file ,
287
288
} ,
288
289
{
289
290
name : "declarationMap" ,
290
291
type : "boolean" ,
292
+ affectsEmit : true ,
291
293
showInSimplifiedHelpView : true ,
292
294
category : Diagnostics . Basic_Options ,
293
295
description : Diagnostics . Generates_a_sourcemap_for_each_corresponding_d_ts_file ,
294
296
} ,
295
297
{
296
298
name : "emitDeclarationOnly" ,
297
299
type : "boolean" ,
300
+ affectsEmit : true ,
298
301
category : Diagnostics . Advanced_Options ,
299
302
description : Diagnostics . Only_emit_d_ts_declaration_files ,
300
303
} ,
301
304
{
302
305
name : "sourceMap" ,
303
306
type : "boolean" ,
307
+ affectsEmit : true ,
304
308
showInSimplifiedHelpView : true ,
305
309
category : Diagnostics . Basic_Options ,
306
310
description : Diagnostics . Generates_corresponding_map_file ,
307
311
} ,
308
312
{
309
313
name : "outFile" ,
310
314
type : "string" ,
315
+ affectsEmit : true ,
311
316
isFilePath : true ,
312
317
paramType : Diagnostics . FILE ,
313
318
showInSimplifiedHelpView : true ,
@@ -317,6 +322,7 @@ namespace ts {
317
322
{
318
323
name : "outDir" ,
319
324
type : "string" ,
325
+ affectsEmit : true ,
320
326
isFilePath : true ,
321
327
paramType : Diagnostics . DIRECTORY ,
322
328
showInSimplifiedHelpView : true ,
@@ -326,6 +332,7 @@ namespace ts {
326
332
{
327
333
name : "rootDir" ,
328
334
type : "string" ,
335
+ affectsEmit : true ,
329
336
isFilePath : true ,
330
337
paramType : Diagnostics . LOCATION ,
331
338
category : Diagnostics . Basic_Options ,
@@ -334,13 +341,15 @@ namespace ts {
334
341
{
335
342
name : "composite" ,
336
343
type : "boolean" ,
344
+ affectsEmit : true ,
337
345
isTSConfigOnly : true ,
338
346
category : Diagnostics . Basic_Options ,
339
347
description : Diagnostics . Enable_project_compilation ,
340
348
} ,
341
349
{
342
350
name : "tsBuildInfoFile" ,
343
351
type : "string" ,
352
+ affectsEmit : true ,
344
353
isFilePath : true ,
345
354
paramType : Diagnostics . FILE ,
346
355
category : Diagnostics . Basic_Options ,
@@ -349,26 +358,30 @@ namespace ts {
349
358
{
350
359
name : "removeComments" ,
351
360
type : "boolean" ,
361
+ affectsEmit : true ,
352
362
showInSimplifiedHelpView : true ,
353
363
category : Diagnostics . Basic_Options ,
354
364
description : Diagnostics . Do_not_emit_comments_to_output ,
355
365
} ,
356
366
{
357
367
name : "noEmit" ,
358
368
type : "boolean" ,
369
+ affectsEmit : true ,
359
370
showInSimplifiedHelpView : true ,
360
371
category : Diagnostics . Basic_Options ,
361
372
description : Diagnostics . Do_not_emit_outputs ,
362
373
} ,
363
374
{
364
375
name : "importHelpers" ,
365
376
type : "boolean" ,
377
+ affectsEmit : true ,
366
378
category : Diagnostics . Basic_Options ,
367
379
description : Diagnostics . Import_emit_helpers_from_tslib
368
380
} ,
369
381
{
370
382
name : "downlevelIteration" ,
371
383
type : "boolean" ,
384
+ affectsEmit : true ,
372
385
category : Diagnostics . Basic_Options ,
373
386
description : Diagnostics . Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3
374
387
} ,
@@ -580,26 +593,30 @@ namespace ts {
580
593
{
581
594
name : "sourceRoot" ,
582
595
type : "string" ,
596
+ affectsEmit : true ,
583
597
paramType : Diagnostics . LOCATION ,
584
598
category : Diagnostics . Source_Map_Options ,
585
599
description : Diagnostics . Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations ,
586
600
} ,
587
601
{
588
602
name : "mapRoot" ,
589
603
type : "string" ,
604
+ affectsEmit : true ,
590
605
paramType : Diagnostics . LOCATION ,
591
606
category : Diagnostics . Source_Map_Options ,
592
607
description : Diagnostics . Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations ,
593
608
} ,
594
609
{
595
610
name : "inlineSourceMap" ,
596
611
type : "boolean" ,
612
+ affectsEmit : true ,
597
613
category : Diagnostics . Source_Map_Options ,
598
614
description : Diagnostics . Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file
599
615
} ,
600
616
{
601
617
name : "inlineSources" ,
602
618
type : "boolean" ,
619
+ affectsEmit : true ,
603
620
category : Diagnostics . Source_Map_Options ,
604
621
description : Diagnostics . Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set
605
622
} ,
@@ -635,6 +652,7 @@ namespace ts {
635
652
{
636
653
name : "out" ,
637
654
type : "string" ,
655
+ affectsEmit : true ,
638
656
isFilePath : false , // This is intentionally broken to support compatability with existing tsconfig files
639
657
// for correct behaviour, please use outFile
640
658
category : Diagnostics . Advanced_Options ,
@@ -644,6 +662,7 @@ namespace ts {
644
662
{
645
663
name : "reactNamespace" ,
646
664
type : "string" ,
665
+ affectsEmit : true ,
647
666
category : Diagnostics . Advanced_Options ,
648
667
description : Diagnostics . Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit
649
668
} ,
@@ -662,6 +681,7 @@ namespace ts {
662
681
{
663
682
name : "emitBOM" ,
664
683
type : "boolean" ,
684
+ affectsEmit : true ,
665
685
category : Diagnostics . Advanced_Options ,
666
686
description : Diagnostics . Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files
667
687
} ,
@@ -677,6 +697,7 @@ namespace ts {
677
697
crlf : NewLineKind . CarriageReturnLineFeed ,
678
698
lf : NewLineKind . LineFeed
679
699
} ) ,
700
+ affectsEmit : true ,
680
701
paramType : Diagnostics . NEWLINE ,
681
702
category : Diagnostics . Advanced_Options ,
682
703
description : Diagnostics . Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix ,
@@ -704,6 +725,7 @@ namespace ts {
704
725
{
705
726
name : "stripInternal" ,
706
727
type : "boolean" ,
728
+ affectsEmit : true ,
707
729
category : Diagnostics . Advanced_Options ,
708
730
description : Diagnostics . Do_not_emit_declarations_for_code_that_has_an_internal_annotation ,
709
731
} ,
@@ -724,24 +746,28 @@ namespace ts {
724
746
{
725
747
name : "noEmitHelpers" ,
726
748
type : "boolean" ,
749
+ affectsEmit : true ,
727
750
category : Diagnostics . Advanced_Options ,
728
751
description : Diagnostics . Do_not_generate_custom_helper_functions_like_extends_in_compiled_output
729
752
} ,
730
753
{
731
754
name : "noEmitOnError" ,
732
755
type : "boolean" ,
756
+ affectsEmit : true ,
733
757
category : Diagnostics . Advanced_Options ,
734
758
description : Diagnostics . Do_not_emit_outputs_if_any_errors_were_reported ,
735
759
} ,
736
760
{
737
761
name : "preserveConstEnums" ,
738
762
type : "boolean" ,
763
+ affectsEmit : true ,
739
764
category : Diagnostics . Advanced_Options ,
740
765
description : Diagnostics . Do_not_erase_const_enum_declarations_in_generated_code
741
766
} ,
742
767
{
743
768
name : "declarationDir" ,
744
769
type : "string" ,
770
+ affectsEmit : true ,
745
771
isFilePath : true ,
746
772
paramType : Diagnostics . DIRECTORY ,
747
773
category : Diagnostics . Advanced_Options ,
@@ -826,6 +852,10 @@ namespace ts {
826
852
export const semanticDiagnosticsOptionDeclarations : ReadonlyArray < CommandLineOption > =
827
853
optionDeclarations . filter ( option => ! ! option . affectsSemanticDiagnostics ) ;
828
854
855
+ /* @internal */
856
+ export const affectsEmitOptionDeclarations : ReadonlyArray < CommandLineOption > =
857
+ optionDeclarations . filter ( option => ! ! option . affectsEmit ) ;
858
+
829
859
/* @internal */
830
860
export const moduleResolutionOptionDeclarations : ReadonlyArray < CommandLineOption > =
831
861
optionDeclarations . filter ( option => ! ! option . affectsModuleResolution ) ;
0 commit comments