lit-analyzer
lit-analyzer copied to clipboard
Feature Request: support type checking event listeners
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}>) => {...}}>`;
...
Related to #143