dillon1000/react

Commit

[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.
Browse files
Changed paths4 files
First-parent comparison
M compiler/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 Added
Patch

Files changed

Rendering syntax-highlighted changes…