Pull out ReservedPropTypeAnnotation into type alias

Summary:
This type annotation was declared inline twice. Just pulling it out into a type alias in this diff.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D24723191

fbshipit-source-id: 9f2061087172979ea838dfdf2533e17b9b559c71
This commit is contained in:
Ramanpreet Nara
2020-11-05 18:30:09 -08:00
committed by Facebook GitHub Bot
parent 0de4b514be
commit 1ee406b9cc
+11 -16
View File
@@ -153,14 +153,7 @@ export type PropTypeAnnotation =
default: number,
options: $ReadOnlyArray<number>,
|}>
| $ReadOnly<{|
type: 'ReservedPropTypeAnnotation',
name:
| 'ColorPrimitive'
| 'ImageSourcePrimitive'
| 'PointPrimitive'
| 'EdgeInsetsPrimitive',
|}>
| ReservedPropTypeAnnotation
| ObjectTypeAnnotation<PropTypeAnnotation>
| $ReadOnly<{|
type: 'ArrayTypeAnnotation',
@@ -176,20 +169,22 @@ export type PropTypeAnnotation =
options: $ReadOnlyArray<string>,
|}>
| ObjectTypeAnnotation<PropTypeAnnotation>
| $ReadOnly<{|
type: 'ReservedPropTypeAnnotation',
name:
| 'ColorPrimitive'
| 'ImageSourcePrimitive'
| 'PointPrimitive'
| 'EdgeInsetsPrimitive',
|}>
| ReservedPropTypeAnnotation
| $ReadOnly<{|
type: 'ArrayTypeAnnotation',
elementType: ObjectTypeAnnotation<PropTypeAnnotation>,
|}>,
|}>;
type ReservedPropTypeAnnotation = $ReadOnly<{|
type: 'ReservedPropTypeAnnotation',
name:
| 'ColorPrimitive'
| 'ImageSourcePrimitive'
| 'PointPrimitive'
| 'EdgeInsetsPrimitive',
|}>;
export type CommandTypeAnnotation = FunctionTypeAnnotation<
CommandParamTypeAnnotation,
VoidTypeAnnotation,