[type] Conservatively type return values from reanimated
Typing them as mixed read only seems safe because the fields are primitives but lets be conservative and type as Poly.
Sathya Gunasekaran committed
Mar 28, 2024 at 12:32 UTC
fd3ae0ca0a548df5e77b16bf993dd7cc4feb4fe3
1 file changed
+1
-2
compiler/packages/babel-plugin-react-forget/src/HIR/Globals.ts
+1
-2
@@ -9,7 +9,6 @@ import { Effect, ValueKind, ValueReason } from "./HIR";
9
import {
10
BUILTIN_SHAPES,
11
BuiltInArrayId,
12
- BuiltInMixedReadonlyId,
12
BuiltInUseEffectHookId,
13
BuiltInUseInsertionEffectHookId,
14
BuiltInUseLayoutEffectHookId,
@@ -434,7 +433,7 @@ export function installReAnimatedTypes(
433
addHook(registry, {
434
positionalParams: [],
435
restParam: Effect.Freeze,
437
- returnType: { kind: "Object", shapeId: BuiltInMixedReadonlyId },
436
+ returnType: { kind: "Poly" },
437
returnValueKind: ValueKind.Frozen,
438
noAlias: true,
439
calleeEffect: Effect.Read,