projectstorm / react-diagrams

a super simple, no-nonsense diagramming library written in react that just works
https://projectstorm.cloud/react-diagrams
MIT License
8.46k stars 1.16k forks source link

Improve type of baseListener #906

Closed Joecha95 closed 2 years ago

Joecha95 commented 2 years ago

Checklist

What?

The type for the BaseListener should be updated. It defines an index signature which enforces the return type for all properties to match the index signature return type. Nevertheless, the parameters of eventDidFire() and eventWillFire do not match this index type.

There is a small fix to this issue provided in this pr

Why?

Improves the type system

How?

Usage of union type

Feel good image:

FeelGood