customEvent.emit()
returns boolean instead of CustomEvent
#1996
Labels
customEvent.emit()
returns boolean instead of CustomEvent
#1996
Stencil version:
I'm submitting a:
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/
Current behavior:
this.customEvent.emit()
returns a boolean even though according to the declaration it should returnCustomEvent<T>
.Expected behavior:
Either
emit()
should return aCustomEvent
or the type declaration should be changed.Steps to reproduce:
Emit any custom event in a Stencil component and check its return type.
Related code:
Type declaration:
Other information:
The implementation of
emit()
returns the result ofdispatchEvent
which, according to MDN, is a boolean indicating whether the event was cancelled (i.e. at least one of the handlers calledevent.preventDefault()
).The text was updated successfully, but these errors were encountered: