lit-analyzer icon indicating copy to clipboard operation
lit-analyzer copied to clipboard

Feature Request: support type checking event listeners

Open e111077 opened this issue 4 years ago • 1 comments

Now that WCA supports event types, it would be great to have a flag to type check event listeners. e.g.

/**
 * @fires my-ev {CustomEvent<{foo: number}>}
 */
@customElement('my-el')
export class MyEl extends LitElement {...}
...
return html `
<!-- this should throw an incompatible type error -->
<my-el @my-ev=${(e: CustomEvent<{bar: boolean}>) => {...}}>`;
...

e111077 avatar Jun 11 '21 21:06 e111077

Related to #143

web-padawan avatar Jun 12 '21 07:06 web-padawan