Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ untyped-import
untyped-type-import

[version]
^0.330.0
^0.331.0
20 changes: 9 additions & 11 deletions flow-typed/npm/react-dom_v17.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ declare module 'react-dom' {
componentOrElement: Element | ?Component<any, any>,
): null | Element | Text;

declare function render<ElementType: React.ElementType>(
element: ExactReactElement_DEPRECATED<ElementType>,
declare function render(
element: React.MixedElement,
container: Element,
callback?: () => void,
): React.ElementRef<ElementType>;
): unknown;

declare function hydrate<ElementType: React.ElementType>(
element: ExactReactElement_DEPRECATED<ElementType>,
declare function hydrate(
element: React.MixedElement,
container: Element,
callback?: () => void,
): React.ElementRef<ElementType>;
): unknown;

declare function createPortal(
node: React.Node,
Expand All @@ -35,14 +35,12 @@ declare module 'react-dom' {
e: E,
): void;

declare function unstable_renderSubtreeIntoContainer<
ElementType: React.ElementType,
>(
declare function unstable_renderSubtreeIntoContainer(
parentComponent: Component<any, any>,
nextElement: ExactReactElement_DEPRECATED<ElementType>,
nextElement: React.MixedElement,
container: any,
callback?: () => void,
): React.ElementRef<ElementType>;
): unknown;
}

declare module 'react-dom/server' {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"eslint-plugin-relay": "^1.8.3",
"fb-dotslash": "0.5.8",
"flow-api-translator": "0.327.0",
"flow-bin": "^0.330.0",
"flow-bin": "^0.331.0",
"flow-eslint": "0.327.0",
"flow-parser": "0.327.0",
"flow-transform": "0.327.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import type {
AnimatedProps,
} from '../createAnimatedComponent';

import RefreshControl from '../../Components/RefreshControl/RefreshControl';
import ScrollView, {
type ScrollViewProps,
} from '../../Components/ScrollView/ScrollView';
Expand Down Expand Up @@ -83,7 +82,7 @@ const AnimatedScrollViewWithInvertedRefreshControl =
ref?: React.RefSetter<AnimatedScrollViewInstance>,
...React.ElementConfig<typeof ScrollView>,
// $FlowFixMe[unclear-type] Same Flow type as `refreshControl` in ScrollView
refreshControl: ExactReactElement_DEPRECATED<any>,
refreshControl: React.MixedElement,
}) {
// Split `props` into the animate-able props for the parent (RefreshControl)
// and child (ScrollView).
Expand All @@ -105,11 +104,10 @@ const AnimatedScrollViewWithInvertedRefreshControl =
>(intermediatePropsForRefreshControl);
// NOTE: Assumes that refreshControl.ref` and `refreshControl.style` can be
// safely clobbered.
const refreshControl: ExactReactElement_DEPRECATED<typeof RefreshControl> =
cloneElement(props.refreshControl, {
...refreshControlAnimatedProps,
ref: refreshControlRef,
});
const refreshControl = cloneElement(props.refreshControl, {
...refreshControlAnimatedProps,
ref: refreshControlRef,
});

// Handle animated props on `NativeDirectionalScrollView`.
const [scrollViewAnimatedProps, scrollViewRef] = useAnimatedProps<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ class EnableDisableList extends React.Component<{}, {scrollEnabled: boolean}> {
let AppendingListItemCount = 6;
class AppendingList extends React.Component<
{},
{items: Array<ExactReactElement_DEPRECATED<Class<Item>>>},
{items: ReadonlyArray<React.MixedElement>},
> {
state: {items: Array<ExactReactElement_DEPRECATED<Class<Item>>>} = {
state: {items: ReadonlyArray<React.MixedElement>} = {
items: [...Array(AppendingListItemCount)].map((_, ii) => (
<Item msg={`Item ${ii}`} />
)),
Expand Down
6 changes: 3 additions & 3 deletions packages/virtualized-lists/Lists/VirtualizedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ class VirtualizedList extends StateSafePureComponent<
}

_renderEmptyComponent(
element: ExactReactElement_DEPRECATED<any>,
element: React.MixedElement,
inversionStyle: StyleProp<ViewStyle>,
): React.Node {
// $FlowFixMe[prop-missing] React.Element internal inspection
Expand Down Expand Up @@ -985,7 +985,7 @@ class VirtualizedList extends StateSafePureComponent<
// 2a. Add a cell for ListEmptyComponent if applicable
const itemCount = this.props.getItemCount(data);
if (itemCount === 0 && ListEmptyComponent) {
const element: ExactReactElement_DEPRECATED<any> = (
const element: React.MixedElement = (
isValidElement(ListEmptyComponent) ? (
ListEmptyComponent
) : (
Expand Down Expand Up @@ -1154,7 +1154,7 @@ class VirtualizedList extends StateSafePureComponent<
)(
// $FlowExpectedError[incompatible-type] scrollProps is a superset of ScrollViewProps
scrollProps,
) as ExactReactElement_DEPRECATED<any>,
) as React.JSX.Element,
{
ref: this._captureScrollRef,
},
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4787,10 +4787,10 @@ flow-api-translator@0.327.0:
flow-transform "0.327.0"
typescript "5.3.2"

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

flow-enums-runtime@^0.0.6:
version "0.0.6"
Expand Down
Loading