Skip to content

Importing in a .ts file what was exported in the context="module" script tag of a .svelte file shows a reg squiggly #914

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

Closed
aradalvand opened this issue Mar 24, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@aradalvand
Copy link

aradalvand commented Mar 24, 2021

SomeComp.svelte:

<script lang="ts" context="module">
    export const foo = {
        a: 'b',
        c: 'd',
    }
</script>

someFile.ts:

import { foo } from './SomeComp.svelte'; // ERROR

A red squiggly would appear under foo, saying:

Module '"*.svelte"' has no exported member 'foo'.

Note that this actually works in practice, so VS Code is wrongly showing a red squiggly.

@aradalvand aradalvand added the bug Something isn't working label Mar 24, 2021
@aradalvand aradalvand changed the title Importing in a .ts file what was exported in the context="module" script tag of a .svelte shows a reg squiggly Importing in a .ts file what was exported in the context="module" script tag of a .svelte file shows a reg squiggly Mar 24, 2021
@dummdidumm
Copy link
Member

Duplicate of #550

@dummdidumm dummdidumm marked this as a duplicate of #550 Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants