mirror of
https://github.com/react/react-native.git
synced 2026-09-29 16:58:04 +08:00
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:
committed by
Facebook GitHub Bot
parent
20da141f5f
commit
508610865b
+5
-1
@@ -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':
|
||||
|
||||
Reference in New Issue
Block a user