Skip to content

Commit 490de2b

Browse files
committed
fix
1 parent 7ae959f commit 490de2b

7 files changed

Lines changed: 29 additions & 27 deletions

File tree

packages/devtools-ui/src/types.ts

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,5 @@
1-
import type {} from 'react'
2-
import type {} from 'solid-js'
31

4-
declare module 'react' {
5-
// eslint-disable-next-line @typescript-eslint/no-namespace
6-
namespace JSX {
7-
interface IntrinsicElements {
8-
'tsd-json-tree': { value: any }
9-
}
10-
}
2+
export interface CustomElements {
3+
"tsd-json-tree": { value: any }
114
}
125

13-
declare module 'solid-js' {
14-
// eslint-disable-next-line @typescript-eslint/no-namespace
15-
namespace JSX {
16-
interface IntrinsicElements {
17-
'tsd-json-tree': { value: any }
18-
}
19-
}
20-
}
21-
22-
type _ = string
23-
export type { _ }

packages/devtools/src/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { _ } from '@tanstack/devtools-ui/types'
21

32
export { PLUGIN_CONTAINER_ID, PLUGIN_TITLE_CONTAINER_ID } from './constants'
43
export { TanStackDevtoolsCore } from './core'
@@ -7,5 +6,3 @@ export type {
76
TanStackDevtoolsPlugin,
87
TanStackDevtoolsConfig,
98
} from './context/devtools-context'
10-
11-
export type { _ }

packages/react-devtools/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
},
6868
"devDependencies": {
6969
"@eslint-react/eslint-plugin": "^1.48.5",
70+
"@tanstack/devtools-ui": "workspace:*",
7071
"@types/react": "19.1.10",
7172
"@vitejs/plugin-react": "^4.5.2",
7273
"eslint-plugin-react-compiler": "19.1.0-rc.1",

packages/react-devtools/src/index.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
'use client'
22

33
import * as Devtools from './devtools'
4+
import type { CustomElements } from "@tanstack/devtools-ui/types"
45

6+
declare module 'react' {
7+
// eslint-disable-next-line @typescript-eslint/no-namespace
8+
namespace JSX {
9+
interface IntrinsicElements extends CustomElements { }
10+
}
11+
}
512
export const TanStackDevtools: (typeof Devtools)['TanStackDevtools'] =
613
process.env.NODE_ENV !== 'development'
714
? function () {
8-
return null
9-
}
15+
return null
16+
}
1017
: Devtools.TanStackDevtools
1118

1219
export type {

packages/solid-devtools/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
"@tanstack/devtools": "workspace:*"
6767
},
6868
"devDependencies": {
69+
"@tanstack/devtools-ui": "workspace:*",
6970
"solid-js": "^1.9.7",
7071
"vite-plugin-solid": "^2.11.6"
7172
},
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
import { isDev } from 'solid-js/web'
22
import * as Devtools from './devtools'
3+
import type { CustomElements } from '@tanstack/devtools-ui/types'
4+
5+
declare module 'solid-js' {
6+
// eslint-disable-next-line @typescript-eslint/no-namespace
7+
namespace JSX {
8+
interface IntrinsicElements extends CustomElements { }
9+
}
10+
}
311

412
export const TanStackDevtools: (typeof Devtools)['TanStackDevtools'] = isDev
513
? Devtools.TanStackDevtools
614
: function () {
7-
return null
8-
}
15+
return null
16+
}
917

1018
export type { TanStackDevtoolsSolidPlugin } from './core'

pnpm-lock.yaml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)