dillon1000/react
Commit
Browse files [compiler] Emit more specific error when making identifiers with reserved words (#34080)
This currently throws an invariant which may be misleading. I checked the ecma262 spec and used the same list of reserved words in our check. To err on the side of being conservative, we also error when strict mode reserved words are used.
Changed paths4 files
First-parent comparisoncompiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts ModifiedA compiler/packages/babel-plugin-react-compiler/src/Utils/Keyword.ts AddedA compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/ecma/error.reserved-words.expect.md AddedA compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/ecma/error.reserved-words.ts AddedPatch
Files changed
Rendering syntax-highlighted changes…