Page MenuHomePhorge

D15037.1765054916.diff
No OneTemporary

Size
5 KB
Referenced Files
None
Subscribers
None

D15037.1765054916.diff

diff --git a/lib/shared/markdown.js b/lib/shared/markdown.js
--- a/lib/shared/markdown.js
+++ b/lib/shared/markdown.js
@@ -45,7 +45,7 @@
prevCapture: string,
) => ?Capture);
-export type ReactElement = React$Element<any>;
+export type ReactElement = React.Node;
type ReactElements = React.Node;
export type Output<Result> = (node: ASTNode, state?: ?State) => Result;
diff --git a/native/account/logged-out-modal.react.js b/native/account/logged-out-modal.react.js
--- a/native/account/logged-out-modal.react.js
+++ b/native/account/logged-out-modal.react.js
@@ -439,7 +439,7 @@
return null;
}
- const signInButtons: Array<React.Element<any>> = [];
+ const signInButtons: Array<React.Node> = [];
if (!usingRestoreFlow) {
signInButtons.push(
<PromptButton
diff --git a/native/calendar/entry.react.js b/native/calendar/entry.react.js
--- a/native/calendar/entry.react.js
+++ b/native/calendar/entry.react.js
@@ -95,7 +95,7 @@
function dummyNodeForEntryHeightMeasurement(
entryText: string,
-): React.Element<typeof View> {
+): React.MixedElement {
const text = entryText === '' ? ' ' : entryText;
return (
<View style={[unboundStyles.entry, unboundStyles.textContainer]}>
diff --git a/native/chat/inline-engagement.react.js b/native/chat/inline-engagement.react.js
--- a/native/chat/inline-engagement.react.js
+++ b/native/chat/inline-engagement.react.js
@@ -35,7 +35,7 @@
sidebarInfo: ?ThreadInfo,
reactions: ReactionInfo,
deleted: boolean,
-): React.Element<typeof View> {
+): React.MixedElement {
return (
<View>
<DummyInlineEngagementNode
diff --git a/native/chat/inner-robotext-message.react.js b/native/chat/inner-robotext-message.react.js
--- a/native/chat/inner-robotext-message.react.js
+++ b/native/chat/inner-robotext-message.react.js
@@ -28,7 +28,7 @@
threadID: string,
sidebarInfo: ?ThreadInfo,
reactions: ReactionInfo,
-): React.Element<typeof View> {
+): React.MixedElement {
return (
<View>
<View style={unboundStyles.robotextContainer}>
diff --git a/native/chat/inner-text-message.react.js b/native/chat/inner-text-message.react.js
--- a/native/chat/inner-text-message.react.js
+++ b/native/chat/inner-text-message.react.js
@@ -32,7 +32,7 @@
sidebarInfo: ?ThreadInfo,
reactions: ReactionInfo,
deleted: boolean,
-): React.Element<typeof View> {
+): React.MixedElement {
return (
<View>
<DummyTextNode withoutMarkdown={deleted}>{text}</DummyTextNode>
diff --git a/native/chat/swipeable-message.react.js b/native/chat/swipeable-message.react.js
--- a/native/chat/swipeable-message.react.js
+++ b/native/chat/swipeable-message.react.js
@@ -1,6 +1,5 @@
// @flow
-import type { IconProps } from '@expo/vector-icons';
import * as Haptics from 'expo-haptics';
import * as React from 'react';
import { View } from 'react-native';
@@ -86,17 +85,15 @@
return interpolate(translateX, [0, 80, 120, 130], [0, 30, 120, 130]);
}
-type SwipeSnakeProps<IconGlyphs: string> = {
+type SwipeSnakeProps = {
+isViewer: boolean,
+translateX: SharedValue<number>,
+color: string,
- +children: React.Element<React.ComponentType<IconProps<IconGlyphs>>>,
+ +children: React.MixedElement,
+opacityInterpolator?: number => number, // must be worklet
+translateXInterpolator?: number => number, // must be worklet
};
-function SwipeSnake<IconGlyphs: string>(
- props: SwipeSnakeProps<IconGlyphs>,
-): React.Node {
+function SwipeSnake(props: SwipeSnakeProps): React.Node {
const { translateX, isViewer, opacityInterpolator, translateXInterpolator } =
props;
const transformStyle = useAnimatedStyle(() => {
@@ -146,6 +143,7 @@
: colors.light.listForegroundLabel;
const coloredIcon = React.useMemo(
() =>
+ // $FlowFixMe[incompatible-call]
React.cloneElement(children, {
color: iconColor,
}),
diff --git a/native/components/node-height-measurer.react.js b/native/components/node-height-measurer.react.js
--- a/native/components/node-height-measurer.react.js
+++ b/native/components/node-height-measurer.react.js
@@ -50,7 +50,7 @@
// These are the dummies currently being rendered
currentlyMeasuring: $ReadOnlyArray<{
+measureKey: string,
- +dummy: React.Element<any>,
+ +dummy: React.MixedElement,
}>,
// When certain parameters change we need to remeasure everything. In order to
// avoid considering any onLayouts that got queued before we issued the
@@ -504,10 +504,11 @@
render(): React.Node {
const { currentlyMeasuring, iteration } = this.state;
const dummies = currentlyMeasuring.map(({ measureKey, dummy }) => {
- const { children } = dummy.props;
- const style = [dummy.props.style, styles.dummy];
+ const { children } = (dummy as any).props;
+ const style = [(dummy as any).props.style, styles.dummy];
const onLayout = (event: LayoutChangeEvent) =>
this.onDummyLayout(measureKey, iteration, event);
+ // $FlowFixMe[incompatible-call]
const node = React.cloneElement(dummy, {
style,
onLayout,
diff --git a/web/navigation-panels/navigation-panel.react.js b/web/navigation-panels/navigation-panel.react.js
--- a/web/navigation-panels/navigation-panel.react.js
+++ b/web/navigation-panels/navigation-panel.react.js
@@ -20,7 +20,7 @@
type NavigationPanelContainerProps<T> = {
+tabSelector: AppState => T,
- +children: React.ChildrenArray<?React.Element<typeof NavigationPanelItem>>,
+ +children: React.ChildrenArray<?React.MixedElement>,
+horizontal?: boolean,
};
@@ -33,7 +33,7 @@
const items = React.useMemo(
() =>
- React.Children.map(children, child => {
+ React.Children.map(children, (child: any) => {
if (!child) {
return null;
}

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 6, 9:01 PM (4 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5840843
Default Alt Text
D15037.1765054916.diff (5 KB)

Event Timeline