Explicitly type options of `Controller.dispatch()` method by marcoroth · Pull Request #643 · hotwired/stimulus

This pull request explicitly types the options of the Controller.dispatch() method, so that the types don't need to be inferred.

In the case of #642 the type for the target option was just inferred from this.element, which lead to the issue that you weren't able to dispatch the event on any other target element unless it's type matched the defined type in the generic of the controller.

Resolves #642