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

Function call

packages/reactivity/__tests__/watch.spec.ts:65–75  ·  view source on GitHub ↗
(fn, type, args)

Source from the content-addressed store, hash-verified

63 test('call option with error handling', () => {
64 const onError = vi.fn()
65 const call: WatchOptions['call'] = function call(fn, type, args) {
66 if (Array.isArray(fn)) {
67 fn.forEach(f => call(f, type, args))
68 return
69 }
70 try {
71 fn.apply(null, args)
72 } catch (e) {
73 onError(e, type)
74 }
75 }
76
77 watch(
78 () => {

Callers 2

watchFunction · 0.85
jobFunction · 0.85

Calls 2

forEachMethod · 0.80
onErrorFunction · 0.50

Tested by

no test coverage detected