avatar
{🧪} +paoloricciuti.svelte @paolo.ricciuti.me

This is a local module but it seems the same behaviour

An editor with two split files, on the left a svelte component ```svelte <h1>Welcome to SvelteKit</h1> <p>Visit <a href=svelte.dev/docs/kit to read the documentation

``` on the right /lib/index.ts module ```ts // place files you want to import through the `$lib` alias in this folder. declare module 'svelte/elements' { interface SvelteHTMLElements { 'file-pond': { animations?: 'auto' | 'always' | 'never'; }; } } export {}; ``` the hover on `animations` shows ```ts (property) animations?: "auto" | "always" | "never" | undefined ``` which is the expected behaviour"> An editor with two split files, on the left a svelte component ```svelte <h1>Welcome to SvelteKit</h1> <p>Visit <a href=svelte.dev/docs/kit to read the documentation

``` on the right /lib/index.ts module ```ts // place files you want to import through the `$lib` alias in this folder. declare module 'svelte/elements' { interface SvelteHTMLElements { 'file-pond': { animations?: 'auto' | 'always' | 'never'; }; } } // export {}; ``` notice the extra commented export {} the hover on `animations` shows ```ts (property) "animations": string ``` which is not the expected behaviour">
aug 28, 2025, 4:15 pm • 0 0

Replies

avatar
Rik Schennink @rikschennink.com

Yeah locally it works but not when imported from a node module. The export {} statement is present in the .d.ts

aug 28, 2025, 6:26 pm • 0 0 • view
avatar
{🧪} +paoloricciuti.svelte @paolo.ricciuti.me

Are you sure about that? I've also created a library in another folder that exports the `.d.ts` and it also seems to work. If i remove the import it goes back to be just `string`. Also if i remove the export, re-package the application, remove and reinstall it goes back to be just `string`

Two editor with two files in separate folders, on the left a svelte component ```svelte <h1>Welcome to SvelteKit</h1> <p>Visit <a href=svelte.dev/docs/kit to read the documentation

``` on the right /lib/index.ts module ```ts // place files you want to import through the `$lib` alias in this folder. declare module 'svelte/elements' { interface SvelteHTMLElements { 'file-pond': { animations?: 'auto' | 'always' | 'never'; }; } } export {}; ``` the hover on `animations` shows ```ts (property) animations?: "auto" | "always" | "never" | undefined ``` which is the expected behaviour"> Two editor with two files in separate folders, on the left a svelte component ```svelte <h1>Welcome to SvelteKit</h1> <p>Visit <a href=svelte.dev/docs/kit to read the documentation

``` on the right /lib/index.ts module ```ts // place files you want to import through the `$lib` alias in this folder. declare module 'svelte/elements' { interface SvelteHTMLElements { 'file-pond': { animations?: 'auto' | 'always' | 'never'; }; } } // export {}; ``` notice the extra commented export {} the hover on `animations` shows ```ts (property) "animations": string ``` which is not the expected behaviour">
aug 28, 2025, 8:40 pm • 0 0 • view
avatar
Rik Schennink @rikschennink.com

appreciate the example. looking into it now

aug 29, 2025, 11:10 am • 0 0 • view
avatar
Rik Schennink @rikschennink.com

Argh looks like it's the symlink 🫠 so I installed the package ike this: `npm install ../filepond` Which worked great in two other test projects, apparently not in this one. `npm pack` and then `npm install filepond.tar` does work. Thanks! :D

aug 29, 2025, 11:17 am • 0 0 • view
avatar
{🧪} +paoloricciuti.svelte @paolo.ricciuti.me

Whenever I'm testing stuff I always pack things...it takes just a second but you get the actual experience and remove any variable from the game. Glad you sorted this out 🧡

aug 29, 2025, 11:30 am • 1 0 • view