@@ -912,12 +912,12 @@ namespace ts {
912
912
/** Tuple with error messages for 'unknown compiler option', 'option requires type' */
913
913
type ParseCommandLineWorkerDiagnostics = [ DiagnosticMessage , DiagnosticMessage ] ;
914
914
915
- function parseCommandLineWorker < T extends OptionsBase > (
915
+ function parseCommandLineWorker (
916
916
getOptionNameMap : ( ) => OptionNameMap ,
917
917
[ unknownOptionDiagnostic , optionTypeMismatchDiagnostic ] : ParseCommandLineWorkerDiagnostics ,
918
918
commandLine : ReadonlyArray < string > ,
919
919
readFile ?: ( path : string ) => string | undefined ) {
920
- const options = { } as T ;
920
+ const options = { } as OptionsBase ;
921
921
const fileNames : string [ ] = [ ] ;
922
922
const errors : Diagnostic [ ] = [ ] ;
923
923
@@ -1061,10 +1061,11 @@ namespace ts {
1061
1061
export function parseBuildCommand ( args : string [ ] ) : ParsedBuildCommand {
1062
1062
let buildOptionNameMap : OptionNameMap | undefined ;
1063
1063
const returnBuildOptionNameMap = ( ) => ( buildOptionNameMap || ( buildOptionNameMap = createOptionNameMap ( buildOpts ) ) ) ;
1064
- const { options : buildOptions , fileNames : projects , errors } = parseCommandLineWorker < BuildOptions > ( returnBuildOptionNameMap , [
1064
+ const { options, fileNames : projects , errors } = parseCommandLineWorker ( returnBuildOptionNameMap , [
1065
1065
Diagnostics . Unknown_build_option_0 ,
1066
1066
Diagnostics . Build_option_0_requires_a_value_of_type_1
1067
1067
] , args ) ;
1068
+ const buildOptions = options as BuildOptions ;
1068
1069
1069
1070
if ( projects . length === 0 ) {
1070
1071
// tsc -b invoked with no extra arguments; act as if invoked with "tsc -b ."
0 commit comments