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

Function callHook

packages/runtime-core/src/componentOptions.ts:835–847  ·  view source on GitHub ↗
(
  hook: Function,
  instance: ComponentInternalInstance,
  type: LifecycleHooks,
)

Source from the content-addressed store, hash-verified

833}
834
835function callHook(
836 hook: Function,
837 instance: ComponentInternalInstance,
838 type: LifecycleHooks,
839) {
840 callWithAsyncErrorHandling(
841 isArray(hook)
842 ? hook.map(h => h.bind(instance.proxy!))
843 : hook.bind(instance.proxy!),
844 instance,
845 type,
846 )
847}
848
849export function createWatcher(
850 raw: ComponentWatchOptionItem,

Callers 1

applyOptionsFunction · 0.70

Calls 2

mapMethod · 0.80

Tested by

no test coverage detected