Open jrencz opened 1 year ago
Code:
class MyElementWithDialog extends LitElement { override render() { return html`<dialog @click="${this.onDialogClick}" @close="${this.onDialogClose}" @cancel="${this.onDialogCancel}" >Content</dialog> } }
Reports
Unknown event 'cancel'. Did you mean '@change'? 6: @cancel="${this.onDialogCancel}" no-unknown-event Unknown event 'close'. 6: @close="${this.onDialogClose}" no-unknown-event
lit-analyzer@1.2.1
Both events exist and work
but they don't seem to be known to the tool.
Workaround:
declare global { /** * @emits cancel * @emits close */ interface HTMLDialogElement {} }
Code:
Reports
lit-analyzer@1.2.1
Both events exist and work
but they don't seem to be known to the tool.
Workaround: