diff --git a/ReactCommon/fabric/core/events/EventPrimitives.h b/ReactCommon/fabric/core/events/EventPrimitives.h index ba12b23b1..46b715796 100644 --- a/ReactCommon/fabric/core/events/EventPrimitives.h +++ b/ReactCommon/fabric/core/events/EventPrimitives.h @@ -22,5 +22,11 @@ enum class EventPriority { Deferred = AsynchronousBatched, }; +// `InstanceHandler`, `EventTarget`, and `EventHandler` are all opaque +// raw pointers. We use `struct {} *` trick to differentiate them in compiler's +// eyes to ensure type safety. +using EventTarget = struct {} *; +using EventHandler = struct {} *; + } // namespace react } // namespace facebook