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

Using on:input on an Input element in svelte I am getting a casting error

$
0
0

In svelte using on:input on an input element, I am trying to properly cast the type and it does work but I am getting a typescript error in the editor:

Property data does not exist on type Event & { currentTarget: EventTarget & HTMLInputElement; }. ts(2339)

on:input={(elm) => {    if (elm.data !== null) {        // not null    }}}

Viewing all articles
Browse latest Browse all 1879

Trending Articles



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