Skip to content

Commit 08adeb3

Browse files
committed
Update on "[compiler] Special-case phi inference for mixed readonly type"
This allows us to handle common operations such as `useFragment(...).edges.nodes ?? []` where we have a `Phi(MixedReadonly, Array)`. The underlying pattern remains general-purpose and not Relay-specific, and any API that returns transitively "mixed" data (primitives, arrays, plain objects) can benefit from the same type refinement. [ghstack-poisoned]
1 parent e291fc3 commit 08adeb3

File tree

1 file changed

+0
-2
lines changed
  • compiler/packages/babel-plugin-react-compiler/src/TypeInference

1 file changed

+0
-2
lines changed

compiler/packages/babel-plugin-react-compiler/src/TypeInference/InferTypes.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ import {
1414
Identifier,
1515
IdentifierId,
1616
Instruction,
17-
isArrayType,
1817
makeType,
19-
ObjectType,
2018
PropType,
2119
Type,
2220
typeEquals,

0 commit comments

Comments
 (0)