Skip to content

Commit 0a1aa6d

Browse files
authored
Deemphasize old JSX transform (#61586)
1 parent 6afd0fb commit 0a1aa6d

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/compiler/commandLineParser.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ const compileOnSaveCommandLineOption: CommandLineOption = {
133133
const jsxOptionMap = new Map(Object.entries({
134134
"preserve": JsxEmit.Preserve,
135135
"react-native": JsxEmit.ReactNative,
136-
"react": JsxEmit.React,
137136
"react-jsx": JsxEmit.ReactJSX,
138137
"react-jsxdev": JsxEmit.ReactJSXDev,
138+
"react": JsxEmit.React,
139139
}));
140140

141141
/** @internal */

tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --jsx.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ FileNames::
77
0.ts
88
Errors::
99
error TS6044: Compiler option 'jsx' expects an argument.
10-
error TS6046: Argument for '--jsx' option must be: 'preserve', 'react-native', 'react', 'react-jsx', 'react-jsxdev'.
10+
error TS6046: Argument for '--jsx' option must be: 'preserve', 'react-native', 'react-jsx', 'react-jsxdev', 'react'.

tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of jsx to compiler-options with json api.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ CompilerOptions::
2727
"configFilePath": "/apath/tsconfig.json"
2828
}
2929
Errors::
30-
[91merror[0m[90m TS6046: [0mArgument for '--jsx' option must be: 'preserve', 'react-native', 'react', 'react-jsx', 'react-jsxdev'.
30+
[91merror[0m[90m TS6046: [0mArgument for '--jsx' option must be: 'preserve', 'react-native', 'react-jsx', 'react-jsxdev', 'react'.
3131

tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of jsx to compiler-options with jsonSourceFile api.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ CompilerOptions::
2727
"configFilePath": "/apath/tsconfig.json"
2828
}
2929
Errors::
30-
[96mtsconfig.json[0m:[93m7[0m:[93m12[0m - [91merror[0m[90m TS6046: [0mArgument for '--jsx' option must be: 'preserve', 'react-native', 'react', 'react-jsx', 'react-jsxdev'.
30+
[96mtsconfig.json[0m:[93m7[0m:[93m12[0m - [91merror[0m[90m TS6046: [0mArgument for '--jsx' option must be: 'preserve', 'react-native', 'react-jsx', 'react-jsxdev', 'react'.
3131

3232
7 "jsx": ""
3333
   ~~

0 commit comments

Comments
 (0)