lit-analyzer
lit-analyzer copied to clipboard
Assignment incorrectly flagged as invalid
Repro:
import {LitElement, html} from 'lit';
import {customElement, property} from 'lit/decorators.js';
interface A {
a: number;
}
interface B {
b: number;
}
@customElement('test-element')
export class Test extends LitElement {
@property({attribute: false}) prop?: A & B;
override render() {
return html` <test-element .prop=${this.prop!}></test-element> `;
}
}
Error:
Type 'A & B' is not assignable to 'A & B | undefined'
16: n html` <test-element .prop=${this.prop!}></test-e
no-incompatible-type-binding