How to provide more specific type for certain data attributes? #11991
Unanswered
vnphanquang
asked this question in
Q&A
Replies: 1 comment
-
What is interesting is that if you define a variable with the type |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello lovely people. I'm looking for a way to effectively do something like this...
...as instructed in "Enhancing built-in DOM types" from Svelte docs. But because of this:
svelte/packages/svelte/elements.d.ts
Line 828 in f1c9edc
The user-defined type gets "swallowed" when merged with
svelte/elements
. I can surely use non data-* attributes instead, but in some case I would prefer data-* for non-standard attributes.Is there a way to get around this? Thanks all!
Beta Was this translation helpful? Give feedback.
All reactions