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

Function setup

packages/server-renderer/__tests__/ssrDirectives.spec.ts:601–610  ·  view source on GitHub ↗
(props, { expose })

Source from the content-addressed store, hash-verified

599 const renderString = await renderToString(
600 createApp({
601 setup(props, { expose }) {
602 const x = ref('foo')
603 expose({ x })
604 const __returned__ = { useTestDirective, vTest, ref, x }
605 Object.defineProperty(__returned__, '__isScriptSetup', {
606 enumerable: false,
607 value: true,
608 })
609 return __returned__
610 },
611 ssrRender(_ctx, _push, _parent, _attrs) {
612 _push(
613 `<div${ssrRenderAttrs(

Callers

nothing calls this directly

Calls 2

exposeFunction · 0.85
refFunction · 0.50

Tested by

no test coverage detected