Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

How to use a custom svelte element with typescript?

$
0
0

I want to use svelte:element as label and set the "for" attribute. then I get a ts error message, that '"for"' does not exist in type 'HTMLAttributes'How can I type the svelte:element correctly?

ts error

 Object literal may only specify known properties,  and '"for"' does not exist in type 'HTMLAttributes<any>'.

dynamic svelte element, as label

<svelte:element    this="label"    for="labelOfInput">   My label</svelte:element>

Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>