mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
98b03fa1b9
Summary: This diff switches the native codegen over to the flow parser It does this by: - Creating a new e2e directory - Migrating the schema.js fixtures to flow types in e2e/ - Updating the buck tests to use the flow type fixtures - Finally, updating the rest of rn_codegen to use *NativeComponent instead of *Schema.js Removing all of the schemas in the next diff to keep this one clean Reviewed By: cpojer Differential Revision: D15960603 fbshipit-source-id: 3df28b31e618491301578ab7f6e28a80f55404b2
41 lines
1.1 KiB
JavaScript
41 lines
1.1 KiB
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
* @flow
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
import type {
|
|
PointValue,
|
|
ColorValue,
|
|
} from '../../../../Libraries/StyleSheet/StyleSheetTypes';
|
|
import type {ImageSource} from '../../../../Libraries/Image/ImageSource';
|
|
import type {
|
|
Int32,
|
|
Float,
|
|
WithDefault,
|
|
} from '../../../../Libraries/Types/CodegenTypes';
|
|
import type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';
|
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
|
|
type NativeProps = $ReadOnly<{|
|
|
...ViewProps,
|
|
|
|
// Props
|
|
names?: $ReadOnlyArray<string>,
|
|
disableds?: $ReadOnlyArray<boolean>,
|
|
progress?: $ReadOnlyArray<Int32>,
|
|
radii?: $ReadOnlyArray<Float>,
|
|
colors?: $ReadOnlyArray<ColorValue>,
|
|
srcs?: $ReadOnlyArray<ImageSource>,
|
|
points?: $ReadOnlyArray<PointValue>,
|
|
sizes?: WithDefault<$ReadOnlyArray<'small' | 'large'>, 'small'>,
|
|
|}>;
|
|
|
|
export default codegenNativeComponent<NativeProps>('ArrayPropsNativeComponent');
|