Skip to content
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

Typescript, types are not working and global module declarations (*.svx/*.svelte.md) are not working #669

Open
ericarthurc opened this issue Nov 1, 2024 · 4 comments

Comments

@ericarthurc
Copy link

ericarthurc commented Nov 1, 2024

mdsvex

Mdsvex version: "0.12.3"

So I know there was a fix to export the types in the package.json file, but that hasn't made its ways upstream yet, so in my picture I just manaully added that to my import of mdsvex in node_modules.

But importing *.svelte.mdx or *.svx files are not getting types in my app right now. Typescript is throwing red warnings that it cannot find the module or its corresponding type declarations.

I tried adding this snippet to my app.d.ts or an ambient.d.ts file under my /src folder and it doesn't do anything??

declare module '*.svelte.md' {
	import type { SvelteComponent } from 'svelte'

	export default class Comp extends SvelteComponent{}

	export const metadata: Record<string, unknown>
}

image

sidenote: #/ is just an alias path, I tried this also with a direct import

@github-project-automation github-project-automation bot moved this to Triage + Refine in mdsvex Nov 1, 2024
@GrungeElFz
Copy link

// Checking in
Same here

@Dylgod
Copy link

Dylgod commented Dec 2, 2024

Same

@christianhturner
Copy link

Same here

@atjn
Copy link

atjn commented Feb 13, 2025

This is still a problem on the latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Triage + Refine
Development

No branches or pull requests

5 participants