Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#9921 - Case issue in jsx #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ function verifyNoTypeScript() {
return true;
}

type TsType = {
[key: string] : any;
JsxEmit: {
ReactJSX: string;
React: string,
}
}


function verifyTypeScriptSetup() {
let firstTimeSetup = false;

Expand All @@ -71,7 +80,7 @@ function verifyTypeScriptSetup() {
const isYarn = fs.existsSync(paths.yarnLockFile);

// Ensure typescript is installed
let ts;
let ts: TsType;
try {
// TODO: Remove this hack once `globalThis` issue is resolved
// https://github.com/jsdom/jsdom/issues/2961
Expand Down Expand Up @@ -112,6 +121,7 @@ function verifyTypeScriptSetup() {
console.error();
process.exit(1);
}


const compilerOptions = {
// These are suggested values and will be set when not present in the
Expand Down Expand Up @@ -148,7 +158,7 @@ function verifyTypeScriptSetup() {
jsx: {
parsedValue:
hasJsxRuntime && semver.gte(ts.version, '4.1.0-beta')
? ts.JsxEmit.ReactJSX
? ts.JsxEmit.ReactJsx
: ts.JsxEmit.React,
value:
hasJsxRuntime && semver.gte(ts.version, '4.1.0-beta')
Expand Down