Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS2345 type error when passing undefined to a HTML prop/attribute #6

Closed
btakita opened this issue Oct 30, 2023 · 2 comments · May be fixed by #7
Closed

TS2345 type error when passing undefined to a HTML prop/attribute #6

btakita opened this issue Oct 30, 2023 · 2 comments · May be fixed by #7

Comments

@btakita
Copy link

btakita commented Oct 30, 2023

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
btakita added a commit to btakita/mini-van that referenced this issue Oct 30, 2023
@Tao-VanJS
Copy link
Member

I think this is an intended behavior in VanJS. See vanjs-org/van#39 (comment) for relevant discussion.

btakita added a commit to btakita/mini-van that referenced this issue Oct 30, 2023
@btakita
Copy link
Author

btakita commented Oct 30, 2023

Thank you. Going to comment on that issue.

@btakita btakita closed this as completed Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants