@@ -2582,12 +2582,21 @@ namespace ts {
2582
2582
2583
2583
function writeConfigurations ( ) {
2584
2584
// Filter applicable options to place in the file
2585
- const categorizedOptions = createMultiMap < CommandLineOption > ( ) ;
2585
+ const categorizedOptions = new Map < DiagnosticMessage , CommandLineOption [ ] > ( ) ;
2586
+ // Set allowed categories in order
2587
+ categorizedOptions . set ( Diagnostics . Projects , [ ] ) ;
2588
+ categorizedOptions . set ( Diagnostics . Language_and_Environment , [ ] ) ;
2589
+ categorizedOptions . set ( Diagnostics . Modules , [ ] ) ;
2590
+ categorizedOptions . set ( Diagnostics . JavaScript_Support , [ ] ) ;
2591
+ categorizedOptions . set ( Diagnostics . Emit , [ ] ) ;
2592
+ categorizedOptions . set ( Diagnostics . Interop_Constraints , [ ] ) ;
2593
+ categorizedOptions . set ( Diagnostics . Type_Checking , [ ] ) ;
2594
+ categorizedOptions . set ( Diagnostics . Completeness , [ ] ) ;
2586
2595
for ( const option of optionDeclarations ) {
2587
- const { category } = option ;
2588
-
2589
2596
if ( isAllowedOptionForOutput ( option ) ) {
2590
- categorizedOptions . add ( getLocaleSpecificMessage ( category ! ) , option ) ;
2597
+ let listForCategory = categorizedOptions . get ( option . category ! ) ;
2598
+ if ( ! listForCategory ) categorizedOptions . set ( option . category ! , listForCategory = [ ] ) ;
2599
+ listForCategory . push ( option ) ;
2591
2600
}
2592
2601
}
2593
2602
@@ -2599,7 +2608,7 @@ namespace ts {
2599
2608
if ( entries . length !== 0 ) {
2600
2609
entries . push ( { value : "" } ) ;
2601
2610
}
2602
- entries . push ( { value : `/* ${ category } */` } ) ;
2611
+ entries . push ( { value : `/* ${ getLocaleSpecificMessage ( category ) } */` } ) ;
2603
2612
for ( const option of options ) {
2604
2613
let optionName ;
2605
2614
if ( compilerOptionsMap . has ( option . name ) ) {
0 commit comments