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

Function getUnnormalizedProps

packages/compiler-core/src/utils.ts:371–389  ·  view source on GitHub ↗
(
  props: PropsExpression | '{}',
  callPath: CallExpression[] = [],
)

Source from the content-addressed store, hash-verified

369const propsHelperSet = new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS])
370
371function getUnnormalizedProps(
372 props: PropsExpression | '{}',
373 callPath: CallExpression[] = [],
374): [PropsExpression | '{}', CallExpression[]] {
375 if (
376 props &&
377 !isString(props) &&
378 props.type === NodeTypes.JS_CALL_EXPRESSION
379 ) {
380 const callee = props.callee
381 if (!isString(callee) && propsHelperSet.has(callee)) {
382 return getUnnormalizedProps(
383 props.arguments[0] as PropsExpression,
384 callPath.concat(props),
385 )
386 }
387 }
388 return [props, callPath]
389}
390export function injectProp(
391 node: VNodeCall | RenderSlotCall,
392 prop: Property,

Callers 1

injectPropFunction · 0.85

Calls 2

isStringFunction · 0.90
hasMethod · 0.80

Tested by

no test coverage detected