'ESLint error "'svelte' is not defined" when using svelte.JSX.MouseEventHandler
In a SvelteKit project, I have included the a svelte type. My problem is that my linting (ESLint) throws an error saying that 'svelte' is not defined. My code is as follows:
<script lang="ts">
export let action: svelte.JSX.MouseEventHandler<HTMLButtonElement> | string;
</script>
I can of course change the typing to the more generic void, but is there any way to keep it as is?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|