glint icon indicating copy to clipboard operation
glint copied to clipboard

Custom Events and Typescript

Open andrewtimberlake opened this issue 1 year ago • 1 comments

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 CleanShot 2024-01-10 at 11 13 07@2x

andrewtimberlake avatar Jan 10 '24 09:01 andrewtimberlake

@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

vstefanovic97 avatar Apr 25 '24 12:04 vstefanovic97