Don't shadow EventListenerOptionsOrUseCapture and FocusOptions types (#32801)

These are built-in to Flow.
This commit is contained in:
Sebastian Markbåge
2025-04-01 14:22:57 -04:00
committed by GitHub
parent e5dd82a79d
commit 7a728dffd1
2 changed files with 2 additions and 15 deletions

View File

@@ -615,6 +615,8 @@ module.exports = {
GetAnimationsOptions: 'readonly',
Animatable: 'readonly',
ScrollTimeline: 'readonly',
EventListenerOptionsOrUseCapture: 'readonly',
FocusOptions: 'readonly',
spyOnDev: 'readonly',
spyOnDevAndProd: 'readonly',

View File

@@ -2258,27 +2258,12 @@ export function getCurrentGestureOffset(provider: GestureTimeline): number {
return typeof time === 'number' ? time : time.value;
}
type EventListenerOptionsOrUseCapture =
| boolean
| {
capture?: boolean,
once?: boolean,
passive?: boolean,
signal?: AbortSignal,
...
};
type StoredEventListener = {
type: string,
listener: EventListener,
optionsOrUseCapture: void | EventListenerOptionsOrUseCapture,
};
type FocusOptions = {
preventScroll?: boolean,
focusVisible?: boolean,
};
export type FragmentInstanceType = {
_fragmentFiber: Fiber,
_eventListeners: null | Array<StoredEventListener>,