question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add type definitions for *.svx files by default

See original GitHub issue

Currently, MDsveX doesn’t provide a way for TypeScript to really understand *.svx files. The way Svelte deals with this issue is by declaring a global ambient module (in their ambient.d.ts file. Since *.svx files from what I can tell are just disguised Svelte components, this is what I’m using currently to workaround the IDE errors I’m getting:

global.d.ts

// Based on svelte/runtime/ambient.d.ts
declare module "*.svx" {
    export { SvelteComponentDev as default } from "svelte/internal";
}

But it’d be awesome if this could be included in the mdsvex package or something to not require this sort of thing. Thanks!

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:16 (13 by maintainers)

github_iconTop GitHub Comments

3reactions
pngwncommented, Jan 31, 2022

Resolved in #409 released in 0.10.5

1reaction
pngwncommented, Jan 28, 2022

Hero.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeScript: Adding Custom Type Definitions for Existing ...
In these circumstances, you have to add your own custom type definitions for the libraries. This article will show you how to that....
Read more >
Parcel - How do I add type definitions? - Stack Overflow
Parcel relies on the typescript compiler, which is configured by tsconfig.json. The relevant documentation can be found here.
Read more >
mdsvex docs!
The extensions option allows you to set custom file extensions for files written in mdsvex; the default value is ['.svx'] . Whatever value...
Read more >
How to Write Custom Workspace Nodes - TIBCO Software
A custom workspace node requires two files, an *.svx file that defines the operation of the node, and a *.dmi file that defines...
Read more >
Open .SVX File (Sound file) - File Extension
SVX extension are known as Sound files, however other file types may also use ... an SVX file is to simply double-click it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found