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

Function legacyResolveScopedSlots

packages/runtime-core/src/compat/renderHelpers.ts:90–101  ·  view source on GitHub ↗
(
  fns: LegacyScopedSlotsData,
  raw?: Record<string, Slot>,
  // the following are added in 2.6
  hasDynamicKeys?: boolean,
)

Source from the content-addressed store, hash-verified

88>
89
90export function legacyResolveScopedSlots(
91 fns: LegacyScopedSlotsData,
92 raw?: Record<string, Slot>,
93 // the following are added in 2.6
94 hasDynamicKeys?: boolean,
95): ReturnType<typeof createSlots> {
96 // v2 default slot doesn't have name
97 return createSlots(
98 raw || ({ $stable: !hasDynamicKeys } as any),
99 mapKeyToName(fns),
100 )
101}
102
103function mapKeyToName(slots: LegacyScopedSlotsData) {
104 for (let i = 0; i < slots.length; i++) {

Callers

nothing calls this directly

Calls 2

createSlotsFunction · 0.90
mapKeyToNameFunction · 0.85

Tested by

no test coverage detected