MCPcopy Create free account
hub / github.com/TanStack/devtools / createVuePlugin

Function createVuePlugin

packages/devtools-utils/src/vue/plugin.ts:4–23  ·  view source on GitHub ↗
(
  name: string,
  component: DefineComponent<TComponentProps, {}, unknown>,
)

Source from the content-addressed store, hash-verified

2import type { DefineComponent } from 'vue'
3
4export function createVuePlugin<TComponentProps extends Record<string, any>>(
5 name: string,
6 component: DefineComponent<TComponentProps, {}, unknown>,
7) {
8 function Plugin(props: TComponentProps) {
9 return {
10 name,
11 component,
12 props,
13 }
14 }
15 function NoOpPlugin(props: TComponentProps) {
16 return {
17 name,
18 component: Fragment,
19 props,
20 }
21 }
22 return [Plugin, NoOpPlugin] as const
23}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected