You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Can't use interfaces in .svelte files.
To Reproduce
Create a file with a TypeScript interface and import it in a .svelte file.
Expected behavior
Should work
Stacktraces
[!] Error: 'default' is not exported by src/MyInterface.ts, imported by src/App.svelte
https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module
Information about your project:
Your browser and the version: newest Safari
Your operating system: macOS 10.15
svelte-preprocess latest
Whether your project uses Webpack or Rollup: Rollup
The text was updated successfully, but these errors were encountered:
[!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
../../adapters/src/FooImpl.ts (1:12)
1: import type Foo from '@project/core/src/Foo';
^
2:
3: export default class FooImpl implements Foo {
Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
App.svelte
<script lang="ts">
import FooImpl from "@project/adapters/src/FooImpl";
import type Foo from '@project/core/src/Foo';
const foo: Foo = new FooImpl();
export let name: string;
</script>
<main>
<h1>Hello { name } and { foo.getFooBar() }!</h1>
</main>
<style lang="scss">
@import "./app";
</style>
Describe the bug
Can't use interfaces in .svelte files.
To Reproduce
Create a file with a TypeScript interface and import it in a .svelte file.
Expected behavior
Should work
Stacktraces
Information about your project:
Your browser and the version: newest Safari
Your operating system: macOS 10.15
svelte-preprocess
latestWhether your project uses Webpack or Rollup: Rollup
The text was updated successfully, but these errors were encountered: