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

fix: correct JsxEmit value typo from ReactJsx to ReactJSX #9920

Closed
wants to merge 1 commit into from

Conversation

n3tr
Copy link
Contributor

@n3tr n3tr commented Oct 27, 2020

Verify steps

@n3tr
Copy link
Contributor Author

n3tr commented Oct 27, 2020

There is another issue here -- By default, if parsedValue is undefined we will try to use value instead

const valueToCheck = parsedValue === undefined ? value : parsedValue;

but seems like immer() make the object frozen which will cause line

appTsConfig.compilerOptions[option] = value;

to throw an error

/Users/jirat.ki/Code/lab/cra-ts/node_modules/react-scripts/scripts/utils/verifyTypeScriptSetup.js:242
      appTsConfig.compilerOptions[option] = value;
                                          ^

TypeError: Cannot assign to read only property 'jsx' of object '#<Object>'

I debugged and found

console.log('Object.isFrozen(appTsConfig.compilerOptions)', Object.isFrozen(appTsConfig.compilerOptions))
// Object.isFrozen(appTsConfig.compilerOptions) true

@n3tr
Copy link
Contributor Author

n3tr commented Oct 27, 2020

Closed, duplicated #9921 and #9869

@n3tr n3tr closed this Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants