You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use actions on an input component
this normally works without typescript, but with typescript it cannot recognize the events emitted from the action
//FILE: checkable.ts, these is the actionexportfunctioncheckable(node: HTMLElement): SvelteActionReturnType{functionhandleChange(e: Event&{target: {checked: boolean}}){if(e.target?.checked){node.dispatchEvent(newCustomEvent('checked'))}else{node.dispatchEvent(newCustomEvent('unchecked'));}}node.addEventListener('change',handleChangeas(e: Event)=>void);return{destroy(){node.removeEventListener('change',handleChangeas(e: Event)=>void);}};}
** Note the events "change" is translated to 2 events "checked" and "unchecked" **
### Reproduction
Not applicable
### Logs
Type '{ onchecked: undefined; onunchecked: undefined; type: string; }' is not assignable to type 'SvelteInputProps'.
Property 'onchecked' does not exist on type 'SvelteInputProps'. Did you mean 'checked'?ts(2322)
### System Info
```shell
Not applicable
Severity
blocking all usage of svelte
The text was updated successfully, but these errors were encountered:
Describe the bug
I am trying to use actions on an input component
this normally works without typescript, but with typescript it cannot recognize the events emitted from the action
** Note the events "change" is translated to 2 events "checked" and "unchecked" **
Severity
blocking all usage of svelte
The text was updated successfully, but these errors were encountered: