ESLint error "'svelte' is not defined" when using svelte.JSX.MouseEventHandler

Viewed 167

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?

0 Answers
Related