exportfunctionhandleSetupResult(
instance: ComponentInternalInstance,
setupResult:unknown,
isSSR:boolean){if(isFunction(setupResult)){// setup returned an inline render functionif(__SSR__ &&(instance.typeas ComponentOptions).__ssrInlineRender){// when the function's name is `ssrRender` (compiled by SFC inline mode),// set it as ssrRender instead.
instance.ssrRender = setupResult
}else{
instance.render = setupResult as InternalRenderFunction
}}elseif(isObject(setupResult)){if(__DEV__ &&isVNode(setupResult)){warn(`setup() should not return VNodes directly - `+`return a render function instead.`)}// setup returned bindings.// assuming a render function compiled from template is present.if(__DEV__ || __FEATURE_PROD_DEVTOOLS__){
instance.devtoolsRawSetupState = setupResult
}
instance.setupState =proxyRefs(setupResult)if(__DEV__){exposeSetupStateOnRenderContext(instance)}}elseif(__DEV__ && setupResult !==undefined){warn(`setup() should return an object. Received: ${
setupResult ===null?'null':typeof setupResult
}`)}finishComponentSetup(instance, isSSR)}exportfunctionproxyRefs<Textends object>(
objectWithRefs:T): ShallowUnwrapRef<T>{returnisReactive(objectWithRefs)? objectWithRefs
:newProxy(objectWithRefs, shallowUnwrapHandlers)}