@@ -3196,6 +3196,9 @@ namespace ts {
31963196 if ( options . reactNamespace ) {
31973197 createDiagnosticForOptionName ( Diagnostics . Option_0_cannot_be_specified_with_option_1 , "reactNamespace" , "jsxFactory" ) ;
31983198 }
3199+ if ( options . jsx === JsxEmit . ReactJSX || options . jsx === JsxEmit . ReactJSXDev ) {
3200+ createDiagnosticForOptionName ( Diagnostics . Option_0_cannot_be_specified_when_option_jsx_is_1 , "jsxFactory" , inverseJsxOptionMap . get ( "" + options . jsx ) ) ;
3201+ }
31993202 if ( ! parseIsolatedEntityName ( options . jsxFactory , languageVersion ) ) {
32003203 createOptionValueDiagnostic ( "jsxFactory" , Diagnostics . Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name , options . jsxFactory ) ;
32013204 }
@@ -3208,11 +3211,26 @@ namespace ts {
32083211 if ( ! options . jsxFactory ) {
32093212 createDiagnosticForOptionName ( Diagnostics . Option_0_cannot_be_specified_without_specifying_option_1 , "jsxFragmentFactory" , "jsxFactory" ) ;
32103213 }
3214+ if ( options . jsx === JsxEmit . ReactJSX || options . jsx === JsxEmit . ReactJSXDev ) {
3215+ createDiagnosticForOptionName ( Diagnostics . Option_0_cannot_be_specified_when_option_jsx_is_1 , "jsxFragmentFactory" , inverseJsxOptionMap . get ( "" + options . jsx ) ) ;
3216+ }
32113217 if ( ! parseIsolatedEntityName ( options . jsxFragmentFactory , languageVersion ) ) {
32123218 createOptionValueDiagnostic ( "jsxFragmentFactory" , Diagnostics . Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name , options . jsxFragmentFactory ) ;
32133219 }
32143220 }
32153221
3222+ if ( options . reactNamespace ) {
3223+ if ( options . jsx === JsxEmit . ReactJSX || options . jsx === JsxEmit . ReactJSXDev ) {
3224+ createDiagnosticForOptionName ( Diagnostics . Option_0_cannot_be_specified_when_option_jsx_is_1 , "reactNamespace" , inverseJsxOptionMap . get ( "" + options . jsx ) ) ;
3225+ }
3226+ }
3227+
3228+ if ( options . jsxImportSource ) {
3229+ if ( options . jsx === JsxEmit . React ) {
3230+ createDiagnosticForOptionName ( Diagnostics . Option_0_cannot_be_specified_when_option_jsx_is_1 , "jsxImportSource" , inverseJsxOptionMap . get ( "" + options . jsx ) ) ;
3231+ }
3232+ }
3233+
32163234 // If the emit is enabled make sure that every output file is unique and not overwriting any of the input files
32173235 if ( ! options . noEmit && ! options . suppressOutputPathCheck ) {
32183236 const emitHost = getEmitHost ( ) ;
0 commit comments