MCPcopy
hub / github.com/vuejs/core / getPublicInstance

Function getPublicInstance

packages/runtime-core/src/componentPublicInstance.ts:353–359  ·  view source on GitHub ↗
(
  i: ComponentInternalInstance | null,
)

Source from the content-addressed store, hash-verified

351 * public $parent chains, skip functional ones and go to the parent instead.
352 */
353const getPublicInstance = (
354 i: ComponentInternalInstance | null,
355): ComponentPublicInstance | ComponentInternalInstance['exposed'] | null => {
356 if (!i) return null
357 if (isStatefulComponent(i)) return getComponentPublicInstance(i)
358 return getPublicInstance(i.parent)
359}
360
361export const publicPropertiesMap: PublicPropertiesMap =
362 // Move PURE marker to new line to workaround compiler discarding it

Callers 1

Calls 2

isStatefulComponentFunction · 0.90

Tested by

no test coverage detected