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

Function makeComp

packages/runtime-core/__tests__/apiSetupHelpers.spec.ts:294–309  ·  view source on GitHub ↗
(name: 'one' | 'two', wait: Promise<void>)

Source from the content-addressed store, hash-verified

292 }
293
294 const makeComp = (name: 'one' | 'two', wait: Promise<void>) =>
295 defineComponent({
296 async setup() {
297 let __temp: any, __restore: any
298 ;[__temp, __restore] = withAsyncContext(() => wait)
299 __temp = await __temp
300 __restore()
301
302 Promise.resolve().then(() => {
303 seenUid[name] = getCurrentInstance()?.uid ?? null
304 if (--pending === 0) done()
305 })
306
307 return () => ''
308 },
309 })
310
311 const oneReady = new Promise<void>(r => {
312 resolveOne = r

Callers 1

Calls 1

defineComponentFunction · 0.85

Tested by

no test coverage detected