MCPcopy
hub / github.com/vuetifyjs/vuetify / inject

Function inject

packages/vuetify/src/framework.ts:153–161  ·  view source on GitHub ↗
(this: ComponentPublicInstance, key: InjectionKey<any> | string)

Source from the content-addressed store, hash-verified

151
152// Vue's inject() can only be used in setup
153function inject (this: ComponentPublicInstance, key: InjectionKey<any> | string) {
154 const vm = this.$
155
156 const provides = vm.parent?.provides ?? vm.vnode.appContext?.provides
157
158 if (provides && (key as any) in provides) {
159 return provides[(key as string)]
160 }
161}

Callers 15

useRulesFunction · 0.90
useCommandPaletteFunction · 0.90
setupFunction · 0.90
setupFunction · 0.90
setupFunction · 0.90
setupFunction · 0.90
setupFunction · 0.90
useActivatorFunction · 0.90
setupFunction · 0.90
setupFunction · 0.90
setupFunction · 0.90
setupFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…