Skip to content

Commit 7408e3d

Browse files
authored
Merge pull request #1 from hasparus/default-jsx-mode-react-remove-precondition
Allow to use JSX without '--jsx' flag
2 parents 3382d82 + 61e14f3 commit 7408e3d

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

src/compiler/checker.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18280,10 +18280,6 @@ namespace ts {
1828018280

1828118281
function checkJsxPreconditions(errorNode: Node) {
1828218282
// Preconditions for using JSX
18283-
if ((compilerOptions.jsx || JsxEmit.None) === JsxEmit.None) {
18284-
error(errorNode, Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided);
18285-
}
18286-
1828718283
if (getJsxElementTypeAt(errorNode) === undefined) {
1828818284
if (noImplicitAny) {
1828918285
error(errorNode, Diagnostics.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist);

src/compiler/diagnosticMessages.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4189,10 +4189,6 @@
41894189
"category": "Error",
41904190
"code": 17003
41914191
},
4192-
"Cannot use JSX unless the '--jsx' flag is provided.": {
4193-
"category": "Error",
4194-
"code": 17004
4195-
},
41964192
"A constructor cannot contain a 'super' call when its class extends 'null'.": {
41974193
"category": "Error",
41984194
"code": 17005

0 commit comments

Comments
 (0)