Typing when using the .attr when binding attributes on customElemen
#5973
Unanswered
stefanonepanedap
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am having some struggles when type checking a customElement that has different types between the attribute (string) and the property which is different (eg. number or Date).
Apparently the types related to the properties cannot differe from the attributes. Which if I am not mistaken when using the
.attrmodifier the possible type should be only a subset of strings.There is the caveat of not having the modifier(.attr/.prop), which endup with checking the property type if the name exists or apply a string only.
Currently I am having to shortcut the check by forcing eslint to skip the entire attribute.
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions