TS2345 type error when passing `undefined` to a HTML prop/attribute
btakita opened this issue · comments
Brian Takita commented
import van from 'mini-van-plate'
const { a } = van.tags
a({ id: undefined })
results in a TS2345 error
TS2345: Argument of type { id:undefined; } is not assignable to parameter of type ChildDom<Element, Text>|Props
Type { id:undefined; } is not assignable to type undefined
Tao Xin commented
I think this is an intended behavior in VanJS. See vanjs-org/van#39 (comment) for relevant discussion.
Brian Takita commented
Thank you. Going to comment on that issue.