diff --git a/.changeset/tall-cycles-allow.md b/.changeset/tall-cycles-allow.md new file mode 100644 index 00000000..18434230 --- /dev/null +++ b/.changeset/tall-cycles-allow.md @@ -0,0 +1,5 @@ +--- +'@tanstack/devtools-utils': patch +--- + +fix types for the vue NoOp devtools diff --git a/packages/devtools-utils/src/vue/plugin.ts b/packages/devtools-utils/src/vue/plugin.ts index a2c20586..2fbb0467 100644 --- a/packages/devtools-utils/src/vue/plugin.ts +++ b/packages/devtools-utils/src/vue/plugin.ts @@ -1,9 +1,18 @@ -import { Fragment } from 'vue' +import { defineComponent } from 'vue' import type { DefineComponent } from 'vue' -export function createVuePlugin>( +const EmptyComponent = defineComponent({ + name: 'EmptyComponent', + setup() { + return () => null + }, +}) + +export function createVuePlugin< + TComponentProps extends Record, +>( name: string, - component: DefineComponent, + component: DefineComponent, unknown>, ) { function Plugin(props: TComponentProps) { return { @@ -15,7 +24,7 @@ export function createVuePlugin>( function NoOpPlugin(props: TComponentProps) { return { name, - component: Fragment, + component: EmptyComponent, props, } }