From 0e8da6490a99907b4bf57f7fbb1fad82b721dd28 Mon Sep 17 00:00:00 2001 From: Dirgaaa Date: Tue, 17 Nov 2026 17:23:02 +0700 Subject: [PATCH] fix(svelte-devtools): add .js extension to ./types imports svelte-package keeps relative import specifiers as written, so the published declarations imported './types' without an extension. Under NodeNext or Node16 resolution, TypeScript rejects that with TS2835 when skipLibCheck is off. With skipLibCheck on, the import silently fails and the TanStackDevtools props and the exported plugin types turn into any. Fixes #564 --- .changeset/svelte-devtools-types-js-extension.md | 5 +++++ packages/svelte-devtools/src/TanStackDevtools.svelte | 2 +- packages/svelte-devtools/src/devtools.ts | 2 +- packages/svelte-devtools/src/index.ts | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changeset/svelte-devtools-types-js-extension.md diff --git a/.changeset/svelte-devtools-types-js-extension.md b/.changeset/svelte-devtools-types-js-extension.md new file mode 100644 index 000000000..ff5250814 --- /dev/null +++ b/.changeset/svelte-devtools-types-js-extension.md @@ -0,0 +1,5 @@ +--- +'@tanstack/svelte-devtools': patch +--- + +Import `./types` with a `.js` extension so the published declarations resolve under `moduleResolution: "NodeNext"` and `"Node16"`. Before this fix, those setups reported `TS2835` with `skipLibCheck: false`, and with `skipLibCheck: true` the `` props and the exported plugin types silently became `any`. diff --git a/packages/svelte-devtools/src/TanStackDevtools.svelte b/packages/svelte-devtools/src/TanStackDevtools.svelte index e2410ae66..ffd493101 100644 --- a/packages/svelte-devtools/src/TanStackDevtools.svelte +++ b/packages/svelte-devtools/src/TanStackDevtools.svelte @@ -1,7 +1,7 @@