Skip to content

Commit 26e87b5

Browse files
authored
Fix Flow issue from land race (facebook#34293)
A Flow upgrade removed the bundled library definitinos for SynthaticEvent and we probably want to use our internal definitions. Those are not properly typed at this point yet, but we can look into that as a followup.
1 parent 75dc002 commit 26e87b5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/react-devtools-shared/src/devtools/views/SuspenseTab/SuspenseTimeline.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ import {TreeDispatcherContext} from '../Components/TreeContext';
2424
import {useHighlightHostInstance} from '../hooks';
2525
import {SuspenseTreeStateContext} from './SuspenseTreeContext';
2626
import styles from './SuspenseTimeline.css';
27+
import typeof {
28+
SyntheticEvent,
29+
SyntheticPointerEvent,
30+
} from 'react-dom-bindings/src/events/SyntheticEvent';
2731

2832
// TODO: This returns the roots which would mean we attempt to suspend the shell.
2933
// Suspending the shell is currently not supported and we don't have a good view
@@ -126,7 +130,7 @@ export default function SuspenseTimeline(): React$Node {
126130
});
127131
}, [timeline, value]);
128132

129-
function handleChange(event: SyntheticEvent<HTMLInputElement>) {
133+
function handleChange(event: SyntheticEvent) {
130134
const pendingValue = +event.currentTarget.value;
131135
for (let i = 0; i < timeline.length; i++) {
132136
const forceFallback = i > pendingValue;
@@ -164,7 +168,7 @@ export default function SuspenseTimeline(): React$Node {
164168
highlightHostInstance(suspense.id);
165169
}
166170

167-
function handlePointerMove(event: SyntheticPointerEvent<HTMLInputElement>) {
171+
function handlePointerMove(event: SyntheticPointerEvent) {
168172
const bbox = inputBBox.current;
169173
if (bbox === null) {
170174
throw new Error('Bounding box of slider is unknown.');

0 commit comments

Comments
 (0)