ivanhofer / sveltekit-typescript-showcase

This repository shows how Svelte and SvelteKit work together with TypeScript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

svelte is not defined

potty opened this issue · comments

Hi, thank you so much for lot of use cases how to use TS + Svelte. Unfortunately I have some problem with using this type when trying to type Button component:

svelte.JSX.HTMLAttributes<HTMLElementTagNameMap['button']>

I get TS error svelte is not defined: https://tppr.me/j8MxB. Do you have to setup something to make svelte.JSX work?

Ok, I found out I need to put globals: { svelte: true } to my eslint config. Closing this issue.