-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use interfaces #1
Comments
think this is cause by rollup plugin typescript.... i tried to use parcel it works , @codechips any reason this is not working on your set up? i hate compile time of parcel but the no config saves me headache for this stuffs... if that work then i can move out of parcel |
@benkeil you should use
then on your App.svelte
The reason behind is the compiler automatically stripped TYPE (Interfaces that is imported) so it throws an error, on typescript documentation it is sited there that you need to use import type... |
Exactly. I've read somewhere (don't remember now) that exporting interfaces does not work very well. Maybe this one? pyoner/svelte-typescript#23 |
been studying typescript together with rust this lockdown for months, all this static analysis is killing me lol I have actually preparing myself for building a hugo site manager with rust , svelte and typescript... @codechips can you sugguest your best set up? :) |
Hmm .. Hugo like in static site generator written in Go? If going down that route parcel is probably the best because it only needs one entry file in your main html file. However, I do not recommend you to use parcel as it produces large and not that optimal production bundles compared to Rollup. I would probably use pure Vitejs myself here with its Svelte plugin. Vitejs supports HMR, PostCSS, TS and other nice things, plus it uses Rollup for production bundles. Currently it also uses esbuild for Typescript, but see here vitejs/vite#788 As of Rust and WASM, I have no knowledge here except that Vite can import precompiled WASM files. Snowpack is also an option, but I would personally stay away from it for now. |
I have a file
Foo.ts
and want to include it into
App.svelte
and get an error:
The text was updated successfully, but these errors were encountered: