@@ -3184,6 +3184,9 @@ namespace ts {
31843184 if ( options . reactNamespace ) {
31853185 createDiagnosticForOptionName ( Diagnostics . Option_0_cannot_be_specified_with_option_1 , "reactNamespace" , "jsxFactory" ) ;
31863186 }
3187+ if ( options . jsx === JsxEmit . ReactJSX || options . jsx === JsxEmit . ReactJSXDev ) {
3188+ createDiagnosticForOptionName ( Diagnostics . Option_0_cannot_be_specified_when_option_jsx_is_1 , "jsxFactory" , inverseJsxOptionMap . get ( "" + options . jsx ) ) ;
3189+ }
31873190 if ( ! parseIsolatedEntityName ( options . jsxFactory , languageVersion ) ) {
31883191 createOptionValueDiagnostic ( "jsxFactory" , Diagnostics . Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name , options . jsxFactory ) ;
31893192 }
@@ -3196,11 +3199,26 @@ namespace ts {
31963199 if ( ! options . jsxFactory ) {
31973200 createDiagnosticForOptionName ( Diagnostics . Option_0_cannot_be_specified_without_specifying_option_1 , "jsxFragmentFactory" , "jsxFactory" ) ;
31983201 }
3202+ if ( options . jsx === JsxEmit . ReactJSX || options . jsx === JsxEmit . ReactJSXDev ) {
3203+ createDiagnosticForOptionName ( Diagnostics . Option_0_cannot_be_specified_when_option_jsx_is_1 , "jsxFragmentFactory" , inverseJsxOptionMap . get ( "" + options . jsx ) ) ;
3204+ }
31993205 if ( ! parseIsolatedEntityName ( options . jsxFragmentFactory , languageVersion ) ) {
32003206 createOptionValueDiagnostic ( "jsxFragmentFactory" , Diagnostics . Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name , options . jsxFragmentFactory ) ;
32013207 }
32023208 }
32033209
3210+ if ( options . reactNamespace ) {
3211+ if ( options . jsx === JsxEmit . ReactJSX || options . jsx === JsxEmit . ReactJSXDev ) {
3212+ createDiagnosticForOptionName ( Diagnostics . Option_0_cannot_be_specified_when_option_jsx_is_1 , "reactNamespace" , inverseJsxOptionMap . get ( "" + options . jsx ) ) ;
3213+ }
3214+ }
3215+
3216+ if ( options . jsxImportSource ) {
3217+ if ( options . jsx === JsxEmit . React ) {
3218+ createDiagnosticForOptionName ( Diagnostics . Option_0_cannot_be_specified_when_option_jsx_is_1 , "jsxImportSource" , inverseJsxOptionMap . get ( "" + options . jsx ) ) ;
3219+ }
3220+ }
3221+
32043222 // If the emit is enabled make sure that every output file is unique and not overwriting any of the input files
32053223 if ( ! options . noEmit && ! options . suppressOutputPathCheck ) {
32063224 const emitHost = getEmitHost ( ) ;
0 commit comments