Skip to content

Commit a0d70aa

Browse files
fix: restore instance-level Event phase declarations without readonly
Flow needs the instance-level field declarations (NONE, CAPTURING_PHASE, AT_TARGET, BUBBLING_PHASE) to know these properties exist on Event instances. The previous commit removed them entirely, causing 12 Flow prop-missing errors. This restores them without the `readonly` modifier so Hermes won't create non-writable properties that conflict with the Object.defineProperty calls. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 2dafc35 commit a0d70aa

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • packages/react-native/src/private/webapis/dom/events

packages/react-native/src/private/webapis/dom/events/Event.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ export default class Event {
5050
static readonly AT_TARGET: 2;
5151
static readonly BUBBLING_PHASE: 3;
5252

53+
NONE: 0;
54+
CAPTURING_PHASE: 1;
55+
AT_TARGET: 2;
56+
BUBBLING_PHASE: 3;
57+
5358
_bubbles: boolean;
5459
_cancelable: boolean;
5560
_composed: boolean;

0 commit comments

Comments
 (0)