codefeathers / rollup-plugin-svelte-svg

Import SVG files as Svelte Components
MIT License
75 stars 13 forks source link

(doc) added a tip for TypeScript developers #27

Closed GauBen closed 3 years ago

GauBen commented 3 years ago

Hello, I added some documentation for a problem I encountered today.

Have a nice day!

GauBen commented 3 years ago

This is no longer necessary thanks to https://www.npmjs.com/package/@types/rollup-plugin-svelte-svg

MKRhere commented 3 years ago

I'd been reluctant to merge since I wasn't sure about Svelte2TsxComponent, but new definitions look great. I notice it's been updated to reflect new API as well. Thanks @GauBen.

GauBen commented 3 years ago

You're welcome! There are indeed several classes used to type svelte components, and Svelte2TsxComponent is used for .svelte files, providing auto-completion in both js and html. This is however not usable in DefinitelyTyped, so I picked SvelteComponent.