Assert ImageRequest is not used as a prop in codegen (#51642)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51642

This diff asserts that ImageRequest won't be used as prop type

changelog: [internal] internal

Reviewed By: mlord93

Differential Revision: D75469453

fbshipit-source-id: e9e46bc8806e00c104b76825445fe72779106220
This commit is contained in:
David Vacca
2025-05-27 17:55:11 -07:00
committed by Facebook GitHub Bot
parent 20da141f5f
commit 508610865b
@@ -102,8 +102,12 @@ function generatePropsDiffString(
if (${prop.name} != oldProps->${prop.name}) {
result["${prop.name}"] = *${prop.name};
}`;
case 'ImageSourcePrimitive':
case 'ImageRequestPrimitive':
// Shouldn't be used in props
throw new Error(
'ImageRequestPrimitive should not be used in Props',
);
case 'ImageSourcePrimitive':
case 'PointPrimitive':
case 'EdgeInsetsPrimitive':
case 'DimensionPrimitive':