From 535ef4c7bdaf9d8e11576288f027e7d94910b2d4 Mon Sep 17 00:00:00 2001 From: FlowUpgradeInFbsource Bot Date: Tue, 21 Jul 2026 07:15:39 -0700 Subject: [PATCH] Upgrade Flow in fbsource Reviewed By: SamChou19815 Differential Revision: D112967104 --- .../src/private/webapis/dom/abort-api/AbortController.js | 1 + .../src/private/webapis/dom/abort-api/AbortSignal.js | 2 ++ .../react-native/src/private/webapis/dom/events/Event.js | 8 ++++++++ .../src/private/webapis/dom/events/EventTarget.js | 3 +++ .../src/private/webapis/dom/nodes/ReactNativeElement.js | 1 + 5 files changed, 15 insertions(+) diff --git a/packages/react-native/src/private/webapis/dom/abort-api/AbortController.js b/packages/react-native/src/private/webapis/dom/abort-api/AbortController.js index f093e25ee54e..4cd657e6c6ca 100644 --- a/packages/react-native/src/private/webapis/dom/abort-api/AbortController.js +++ b/packages/react-native/src/private/webapis/dom/abort-api/AbortController.js @@ -42,6 +42,7 @@ export class AbortController { * Initialize this controller. */ // $FlowExpectedError[unsupported-syntax] + // $FlowFixMe[illegal-key] [SIGNAL_KEY]: AbortSignal; constructor() { diff --git a/packages/react-native/src/private/webapis/dom/abort-api/AbortSignal.js b/packages/react-native/src/private/webapis/dom/abort-api/AbortSignal.js index 9b0e42cd30db..e7fac1f26d7b 100644 --- a/packages/react-native/src/private/webapis/dom/abort-api/AbortSignal.js +++ b/packages/react-native/src/private/webapis/dom/abort-api/AbortSignal.js @@ -132,8 +132,10 @@ export class AbortSignal extends EventTarget { } // $FlowExpectedError[unsupported-syntax] + // $FlowFixMe[illegal-key] [ABORTED_KEY]: boolean = false; // $FlowExpectedError[unsupported-syntax] + // $FlowFixMe[illegal-key] [REASON_KEY]: unknown; /** diff --git a/packages/react-native/src/private/webapis/dom/events/Event.js b/packages/react-native/src/private/webapis/dom/events/Event.js index 4202d774c8aa..0a5a15e01e10 100644 --- a/packages/react-native/src/private/webapis/dom/events/Event.js +++ b/packages/react-native/src/private/webapis/dom/events/Event.js @@ -71,27 +71,35 @@ export default class Event { _timeStamp: number; // $FlowExpectedError[unsupported-syntax] + // $FlowFixMe[illegal-key] [COMPOSED_PATH_KEY]: boolean = []; // $FlowExpectedError[unsupported-syntax] + // $FlowFixMe[illegal-key] [CURRENT_TARGET_KEY]: EventTarget | null = null; // $FlowExpectedError[unsupported-syntax] + // $FlowFixMe[illegal-key] [EVENT_PHASE_KEY]: boolean = Event.NONE; // $FlowExpectedError[unsupported-syntax] + // $FlowFixMe[illegal-key] [IN_PASSIVE_LISTENER_FLAG_KEY]: boolean = false; // $FlowExpectedError[unsupported-syntax] + // $FlowFixMe[illegal-key] [IS_TRUSTED_KEY]: boolean = false; // $FlowExpectedError[unsupported-syntax] + // $FlowFixMe[illegal-key] [STOP_IMMEDIATE_PROPAGATION_FLAG_KEY]: boolean = false; // $FlowExpectedError[unsupported-syntax] + // $FlowFixMe[illegal-key] [STOP_PROPAGATION_FLAG_KEY]: boolean = false; // $FlowExpectedError[unsupported-syntax] + // $FlowFixMe[illegal-key] [TARGET_KEY]: EventTarget | null = null; constructor(type: string, options?: ?EventInit) { diff --git a/packages/react-native/src/private/webapis/dom/events/EventTarget.js b/packages/react-native/src/private/webapis/dom/events/EventTarget.js index 4d879810205a..936626aac150 100644 --- a/packages/react-native/src/private/webapis/dom/events/EventTarget.js +++ b/packages/react-native/src/private/webapis/dom/events/EventTarget.js @@ -224,6 +224,7 @@ export default class EventTarget { * which is `AT_TARGET` during both passes through the target node. */ // $FlowExpectedError[unsupported-syntax] + // $FlowFixMe[illegal-key] [EVENT_TARGET_GET_DECLARATIVE_LISTENER_KEY]( event: Event, isCapture: boolean, @@ -239,6 +240,7 @@ export default class EventTarget { * (see https://dom.spec.whatwg.org/#get-the-parent). */ // $FlowExpectedError[unsupported-syntax] + // $FlowFixMe[illegal-key] [EVENT_TARGET_GET_THE_PARENT_KEY](): EventTarget | null { return null; } @@ -249,6 +251,7 @@ export default class EventTarget { * canceled (i.e. `event.defaultPrevented`), otherwise `true`. */ // $FlowExpectedError[unsupported-syntax] + // $FlowFixMe[illegal-key] [INTERNAL_DISPATCH_METHOD_KEY]( event: Event, rethrowListenerErrors?: boolean, diff --git a/packages/react-native/src/private/webapis/dom/nodes/ReactNativeElement.js b/packages/react-native/src/private/webapis/dom/nodes/ReactNativeElement.js index 9fef664f4004..0d2d66fef2d7 100644 --- a/packages/react-native/src/private/webapis/dom/nodes/ReactNativeElement.js +++ b/packages/react-native/src/private/webapis/dom/nodes/ReactNativeElement.js @@ -286,6 +286,7 @@ class ReactNativeElement extends ReadOnlyElement { // avoids the `getEventTypePropName(eventType, isCapture)` hash lookup per // ancestor per phase. // $FlowExpectedError[unsupported-syntax] + // $FlowFixMe[illegal-key] [EVENT_TARGET_GET_DECLARATIVE_LISTENER_KEY]( event: Event, isCapture: boolean,