mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix bad utility type definitions (#37662)
Reviewed By: panagosg7 Differential Revision: D46364595 fbshipit-source-id: 5dcd484cd292d5b83b0b114675ec3c8059aefe6b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d9b3339ef8
commit
0191d16712
Vendored
+3
-5
@@ -21,6 +21,7 @@ import type {
|
||||
Int32TypeAnnotation,
|
||||
PropTypeAnnotation,
|
||||
MixedTypeAnnotation,
|
||||
ArrayTypeAnnotation,
|
||||
} from '../../../CodegenSchema';
|
||||
|
||||
const {capitalize} = require('../../Utils');
|
||||
@@ -110,11 +111,8 @@ class PojoCollector {
|
||||
}
|
||||
case 'ArrayTypeAnnotation': {
|
||||
const arrayTypeAnnotation = typeAnnotation;
|
||||
// TODO: Flow assumes elementType can be any. Fix this.
|
||||
const elementType: $PropertyType<
|
||||
typeof arrayTypeAnnotation,
|
||||
'elementType',
|
||||
> = arrayTypeAnnotation.elementType;
|
||||
const elementType: $PropertyType<ArrayTypeAnnotation, 'elementType'> =
|
||||
arrayTypeAnnotation.elementType;
|
||||
|
||||
const pojoElementType = (() => {
|
||||
switch (elementType.type) {
|
||||
|
||||
Reference in New Issue
Block a user