MCPcopy
hub / github.com/vuejs/devtools-v6 / getComponentInstance

Function getComponentInstance

packages/app-backend-core/src/component.ts:134–146  ·  view source on GitHub ↗
(appRecord: AppRecord, instanceId: string, _ctx: BackendContext)

Source from the content-addressed store, hash-verified

132}
133
134export function getComponentInstance(appRecord: AppRecord, instanceId: string, _ctx: BackendContext) {
135 if (instanceId === '_root') {
136 instanceId = `${appRecord.id}:root`
137 }
138 const instance = appRecord.instanceMap.get(instanceId)
139 if (!instance) {
140 appRecord.missingInstanceQueue.add(instanceId)
141 if (SharedData.debugInfo) {
142 console.warn(`Instance uid=${instanceId} not found`)
143 }
144 }
145 return instance
146}
147
148export async function refreshComponentTreeSearch(ctx: BackendContext) {
149 if (!ctx.currentAppRecord.componentFilter) {

Callers 4

connectBridgeFunction · 0.90
sendComponentTreeDataFunction · 0.85
editComponentStateFunction · 0.85

Calls 2

getMethod · 0.80
addMethod · 0.80

Tested by

no test coverage detected