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

Function mergeModels

packages/runtime-core/src/apiSetupHelpers.ts:481–488  ·  view source on GitHub ↗
(
  a: ComponentPropsOptions | EmitsOptions,
  b: ComponentPropsOptions | EmitsOptions,
)

Source from the content-addressed store, hash-verified

479 * @internal
480 */
481export function mergeModels(
482 a: ComponentPropsOptions | EmitsOptions,
483 b: ComponentPropsOptions | EmitsOptions,
484): ComponentPropsOptions | EmitsOptions {
485 if (!a || !b) return a || b
486 if (isArray(a) && isArray(b)) return a.concat(b)
487 return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b))
488}
489
490/**
491 * Used to create a proxy for the rest element when destructuring props with

Callers 1

Calls 1

normalizePropsOrEmitsFunction · 0.85

Tested by

no test coverage detected