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

Function normalizeRef

packages/runtime-core/src/vnode.ts:439–454  ·  view source on GitHub ↗
({
  ref,
  ref_key,
  ref_for,
}: VNodeProps)

Source from the content-addressed store, hash-verified

437 key != null ? key : null
438
439const normalizeRef = ({
440 ref,
441 ref_key,
442 ref_for,
443}: VNodeProps): VNodeNormalizedRefAtom | null => {
444 if (typeof ref === 'number') {
445 ref = '' + ref
446 }
447 return (
448 ref != null
449 ? isString(ref) || isRef(ref) || isFunction(ref)
450 ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for }
451 : ref
452 : null
453 ) as any
454}
455
456function createBaseVNode(
457 type: VNodeTypes | ClassComponent | typeof NULL_DYNAMIC_COMPONENT,

Callers 2

createBaseVNodeFunction · 0.85
cloneVNodeFunction · 0.85

Calls 3

isStringFunction · 0.90
isRefFunction · 0.90
isFunctionFunction · 0.90

Tested by

no test coverage detected