fuzzc0re / electron-svelte-typescript

Advanced template for Electron apps with Svelte and Typescript.
MIT License
44 stars 4 forks source link

svelte(missing-declaration) #6

Closed el3um4s closed 3 years ago

el3um4s commented 3 years ago

I have created a Test.svelte component

<script lang="ts">
    export let hello:string = "World"
</script>

<div>{hello}</div>

I have this worning in VScode

image

Then I imported the component into App.svelte

<script lang="ts">
  import Test from "./Test.svelte";
  export let name: string;
</script>

<main>
  <h1>Hello {name}!</h1>
  <p>Visit the <a href="https://svelte.dev/tutorial">Svelte tutorial</a> to learn how to build Svelte apps.</p>
  <Test />
</main>

I have this worning in VScode

image

By searching I found this hypothesis for a solution

Getting svelte(missing-declaration) warnings for props

But I don't know how to do it.

SilentEchoGM commented 3 years ago

Accidentally fixed this while resolving a path aliasing problem that had the same root cause so submitted a pull request that appears to solve it without affecting anything else by just shuffling the config files around

fuzzc0re commented 3 years ago

Thanks for the help @SilentEchoUK Closing the issue due to 7aee0f9