Skip to content

Commit f072ddb

Browse files
SamChou19815meta-codesync[bot]
authored andcommitted
Deploy 0.331.0 to xplat (#58332)
Summary: Pull Request resolved: #58332 [changelog](https://github.com/facebook/flow/blob/main/Changelog.md) Changelog: [Internal] Reviewed By: panagosg7 Differential Revision: D118823256 fbshipit-source-id: 11d1e53dad7985686fd97a2aa771cd5c5ece7e09
1 parent d5dcd2f commit f072ddb

7 files changed

Lines changed: 25 additions & 29 deletions

File tree

.flowconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,4 @@ untyped-import
8686
untyped-type-import
8787

8888
[version]
89-
^0.330.0
89+
^0.331.0

flow-typed/npm/react-dom_v17.x.x.js

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ declare module 'react-dom' {
77
componentOrElement: Element | ?Component<any, any>,
88
): null | Element | Text;
99

10-
declare function render<ElementType: React.ElementType>(
11-
element: ExactReactElement_DEPRECATED<ElementType>,
10+
declare function render(
11+
element: React.MixedElement,
1212
container: Element,
1313
callback?: () => void,
14-
): React.ElementRef<ElementType>;
14+
): unknown;
1515

16-
declare function hydrate<ElementType: React.ElementType>(
17-
element: ExactReactElement_DEPRECATED<ElementType>,
16+
declare function hydrate(
17+
element: React.MixedElement,
1818
container: Element,
1919
callback?: () => void,
20-
): React.ElementRef<ElementType>;
20+
): unknown;
2121

2222
declare function createPortal(
2323
node: React.Node,
@@ -35,14 +35,12 @@ declare module 'react-dom' {
3535
e: E,
3636
): void;
3737

38-
declare function unstable_renderSubtreeIntoContainer<
39-
ElementType: React.ElementType,
40-
>(
38+
declare function unstable_renderSubtreeIntoContainer(
4139
parentComponent: Component<any, any>,
42-
nextElement: ExactReactElement_DEPRECATED<ElementType>,
40+
nextElement: React.MixedElement,
4341
container: any,
4442
callback?: () => void,
45-
): React.ElementRef<ElementType>;
43+
): unknown;
4644
}
4745

4846
declare module 'react-dom/server' {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"eslint-plugin-relay": "^1.8.3",
8888
"fb-dotslash": "0.5.8",
8989
"flow-api-translator": "0.327.0",
90-
"flow-bin": "^0.330.0",
90+
"flow-bin": "^0.331.0",
9191
"flow-eslint": "0.327.0",
9292
"flow-parser": "0.327.0",
9393
"flow-transform": "0.327.0",

packages/react-native/Libraries/Animated/components/AnimatedScrollView.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import type {
1414
AnimatedProps,
1515
} from '../createAnimatedComponent';
1616

17-
import RefreshControl from '../../Components/RefreshControl/RefreshControl';
1817
import ScrollView, {
1918
type ScrollViewProps,
2019
} from '../../Components/ScrollView/ScrollView';
@@ -83,7 +82,7 @@ const AnimatedScrollViewWithInvertedRefreshControl =
8382
ref?: React.RefSetter<AnimatedScrollViewInstance>,
8483
...React.ElementConfig<typeof ScrollView>,
8584
// $FlowFixMe[unclear-type] Same Flow type as `refreshControl` in ScrollView
86-
refreshControl: ExactReactElement_DEPRECATED<any>,
85+
refreshControl: React.MixedElement,
8786
}) {
8887
// Split `props` into the animate-able props for the parent (RefreshControl)
8988
// and child (ScrollView).
@@ -105,11 +104,10 @@ const AnimatedScrollViewWithInvertedRefreshControl =
105104
>(intermediatePropsForRefreshControl);
106105
// NOTE: Assumes that refreshControl.ref` and `refreshControl.style` can be
107106
// safely clobbered.
108-
const refreshControl: ExactReactElement_DEPRECATED<typeof RefreshControl> =
109-
cloneElement(props.refreshControl, {
110-
...refreshControlAnimatedProps,
111-
ref: refreshControlRef,
112-
});
107+
const refreshControl = cloneElement(props.refreshControl, {
108+
...refreshControlAnimatedProps,
109+
ref: refreshControlRef,
110+
});
113111

114112
// Handle animated props on `NativeDirectionalScrollView`.
115113
const [scrollViewAnimatedProps, scrollViewRef] = useAnimatedProps<

packages/rn-tester/js/examples/ScrollView/ScrollViewExample.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ class EnableDisableList extends React.Component<{}, {scrollEnabled: boolean}> {
6464
let AppendingListItemCount = 6;
6565
class AppendingList extends React.Component<
6666
{},
67-
{items: Array<ExactReactElement_DEPRECATED<Class<Item>>>},
67+
{items: ReadonlyArray<React.MixedElement>},
6868
> {
69-
state: {items: Array<ExactReactElement_DEPRECATED<Class<Item>>>} = {
69+
state: {items: ReadonlyArray<React.MixedElement>} = {
7070
items: [...Array(AppendingListItemCount)].map((_, ii) => (
7171
<Item msg={`Item ${ii}`} />
7272
)),

packages/virtualized-lists/Lists/VirtualizedList.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ class VirtualizedList extends StateSafePureComponent<
910910
}
911911

912912
_renderEmptyComponent(
913-
element: ExactReactElement_DEPRECATED<any>,
913+
element: React.MixedElement,
914914
inversionStyle: StyleProp<ViewStyle>,
915915
): React.Node {
916916
// $FlowFixMe[prop-missing] React.Element internal inspection
@@ -985,7 +985,7 @@ class VirtualizedList extends StateSafePureComponent<
985985
// 2a. Add a cell for ListEmptyComponent if applicable
986986
const itemCount = this.props.getItemCount(data);
987987
if (itemCount === 0 && ListEmptyComponent) {
988-
const element: ExactReactElement_DEPRECATED<any> = (
988+
const element: React.MixedElement = (
989989
isValidElement(ListEmptyComponent) ? (
990990
ListEmptyComponent
991991
) : (
@@ -1154,7 +1154,7 @@ class VirtualizedList extends StateSafePureComponent<
11541154
)(
11551155
// $FlowExpectedError[incompatible-type] scrollProps is a superset of ScrollViewProps
11561156
scrollProps,
1157-
) as ExactReactElement_DEPRECATED<any>,
1157+
) as React.JSX.Element,
11581158
{
11591159
ref: this._captureScrollRef,
11601160
},

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4787,10 +4787,10 @@ flow-api-translator@0.327.0:
47874787
flow-transform "0.327.0"
47884788
typescript "5.3.2"
47894789

4790-
flow-bin@^0.330.0:
4791-
version "0.330.0"
4792-
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.330.0.tgz#4851fec2d41e8a871eebfd21beecf0c603068ddb"
4793-
integrity sha512-rlGZslBZBOPmMrm7mqtn0r1lZe2jbngmcSThVwThj8c49k4WQ46ZBLAyr98Bx9Smx6TqXPyam6piUKOcBBteKg==
4790+
flow-bin@^0.331.0:
4791+
version "0.331.0"
4792+
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.331.0.tgz#a9fb60c16a47084a081a6f5ea56e9f41c7e4e173"
4793+
integrity sha512-GRM2hiixc8gE2q6AoolTfgtS4tWS1sced0iQAbOmZ5jCD/GTsGSINoM/6ENu1oAjqmodWA4H+1qyNhVb+r3V3A==
47944794

47954795
flow-enums-runtime@^0.0.6:
47964796
version "0.0.6"

0 commit comments

Comments
 (0)