mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-05 03:21:16 +08:00
Previously, it was possible to dispatch events on ObjectWrapper<void>, which could introduce bugs. This CL introduces special handling for void in the types in EventTarget to make it work. It relies on the fact that the conditional type any extends Foo ? A : B evaluates to A | B and that any[x] is any. Bug: chromium:1228674 Change-Id: I826439837884c6626a1423c4cfc5b57e3a534e75 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3067422 Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Reviewed-by: Simon Zünd <szuend@chromium.org>