Files
react-native-devtools-frontend/front_end/models/extensions
Simon Zünd d5ac841870 Introduce 'GenericEvents' for settings and simplify event types
This CL introduces a new `GenericEvents` type that can be used in
cases where the set of events is not known at compile time. An
example are settings, where the setting name is used as the
event name.

With `GenericEvents` in place, we can greatly reduce the type magic
required to make type-safe event listeners work for all cases. More
specifically the event name is now a simple `keyof Events` and the
payload for a specific event `Foo` is `Events[Foo]`.

This CL is the final step for type-safe event listeners.

R=pfaffe@chromium.org

Fixed: 1228674
Change-Id: I095c6bd388d55848bde2776f88beec6d89a618c2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3175290
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2021-09-23 08:10:02 +00:00
..
2021-04-26 13:51:40 +00:00