@@ -3184,6 +3184,9 @@ namespace ts {
3184
3184
if ( options . reactNamespace ) {
3185
3185
createDiagnosticForOptionName ( Diagnostics . Option_0_cannot_be_specified_with_option_1 , "reactNamespace" , "jsxFactory" ) ;
3186
3186
}
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
+ }
3187
3190
if ( ! parseIsolatedEntityName ( options . jsxFactory , languageVersion ) ) {
3188
3191
createOptionValueDiagnostic ( "jsxFactory" , Diagnostics . Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name , options . jsxFactory ) ;
3189
3192
}
@@ -3196,11 +3199,26 @@ namespace ts {
3196
3199
if ( ! options . jsxFactory ) {
3197
3200
createDiagnosticForOptionName ( Diagnostics . Option_0_cannot_be_specified_without_specifying_option_1 , "jsxFragmentFactory" , "jsxFactory" ) ;
3198
3201
}
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
+ }
3199
3205
if ( ! parseIsolatedEntityName ( options . jsxFragmentFactory , languageVersion ) ) {
3200
3206
createOptionValueDiagnostic ( "jsxFragmentFactory" , Diagnostics . Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name , options . jsxFragmentFactory ) ;
3201
3207
}
3202
3208
}
3203
3209
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
+
3204
3222
// If the emit is enabled make sure that every output file is unique and not overwriting any of the input files
3205
3223
if ( ! options . noEmit && ! options . suppressOutputPathCheck ) {
3206
3224
const emitHost = getEmitHost ( ) ;
0 commit comments