dillon1000/react

Commit

compiler: getGlobalDeclaration() takes a NonLocalBinding

No-op refactor to make Environment#getGlobalDeclaration() take a NonLocalBinding instead of just a name. The idea is that in subsequent PRs we can use information about the binding to resolve a type more accurately. For example, we can resolve `Array` differently if its an import or local and not the global Array. Similar for resolving local `useState` differently than the one from React.

ghstack-source-id: c8063e6fb8acdd347a56477d6b06238dd54979b1
Pull Request resolved: https://github.com/facebook/react/pull/29189
Browse files
Changed paths4 files
First-parent comparison
M compiler/packages/babel-plugin-react-compiler/src/HIR/Environment.ts ModifiedM compiler/packages/babel-plugin-react-compiler/src/HIR/HIRBuilder.ts ModifiedM compiler/packages/babel-plugin-react-compiler/src/Inference/DropManualMemoization.ts ModifiedM compiler/packages/babel-plugin-react-compiler/src/TypeInference/InferTypes.ts Modified
Patch

Files changed

Rendering syntax-highlighted changes…