runem / lit-analyzer

Monorepository for tools that analyze lit-html templates
MIT License
314 stars 35 forks source link

False positive for no-incompatible-property-type with converter passed in #349

Open bgotink opened 6 months ago

bgotink commented 6 months ago

I've got a factory function creating attribute converters, but when passing these into @property they don't seem to be picked up by the no-incompatible-property-type check

// causes warning
@property({converter: convert(Iban)})
declare warning: Iban;

// doesn't cause warning
@property({converter: {...convert(Iban)}})
declare noWarning: Iban;

// doesn't cause warning either
@property({converter: ibanConverter}) // with const ibanConverter = convert(Iban) 
declare alsoNoWarning: Iban;