glint
glint copied to clipboard
Custom Events and Typescript
I don’t know if this is Glint or Ember related.
When creating a function to handle a custom event, Glint complains that the signature doesn’t match. The signature expects an Event rather than a CustomEvent
When creating a function to handle a mouse event {{on "click" this.handler}}
, the signature for this.handler
correctly expects a MouseEvent
@andrewtimberlake actually I think this is not related to Glint nor Ember, this is just a problem in Typescript in general. You can see https://github.com/microsoft/TypeScript/issues/28357#issuecomment-748550734 for a possible solution