Skip to content
Source
Sign inSign up
TanStack/devtools

fix(svelte-devtools): add .js extension to ./types imports #565

Mergeddirgaydtm(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/565/headmerged by AlemTuzlak View on GitHub

Showing 4 changed files with 7 additions and 2 deletions (loading 1).

x
0 of 4 viewed, 4 left
5 additions and 0 deletions.changeset/svelte-devtools-types-js-extension.mdAdded
View file
@@ -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 `<TanStackDevtools />` props and the exported plugin types silently became `any`.
1 addition and 1 deletionpackages/svelte-devtools/src/TanStackDevtools.svelteModified
View file
@@ -1,7 +1,7 @@
<script lang="ts">
import { untrack } from 'svelte'
import { TanStackDevtoolsSvelteAdapter } from './devtools.js'
- import type { TanStackDevtoolsSvelteInit } from './types'
+ import type { TanStackDevtoolsSvelteInit } from './types.js'
​
let { plugins, config, eventBusConfig }: TanStackDevtoolsSvelteInit = $props()
​
1 addition and 1 deletionpackages/svelte-devtools/src/devtools.tsModified
View file
@@ -6,7 +6,7 @@
import type {
TanStackDevtoolsSvelteInit,
TanStackDevtoolsSveltePlugin,
-} from './types'
+} from './types.js'
​
type MountedComponent = ReturnType<typeof ComponentHost>
​