Home / File/ resolve-scoped-slots.ts — vue Source File

resolve-scoped-slots.ts — vue Source File

Architecture documentation for resolve-scoped-slots.ts, a typescript file in the vue codebase. 2 imports, 1 dependents.

File typescript VueCore Instance 2 imports 1 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  dd8dfe4b_a02b_1bc3_09c9_3c17eb0dcb1c["resolve-scoped-slots.ts"]
  ba925ef2_b0f4_efe3_c23d_fe293c46b2c1["vnode"]
  dd8dfe4b_a02b_1bc3_09c9_3c17eb0dcb1c --> ba925ef2_b0f4_efe3_c23d_fe293c46b2c1
  6d8f8976_7066_720b_0d45_45fe42921eaf["util"]
  dd8dfe4b_a02b_1bc3_09c9_3c17eb0dcb1c --> 6d8f8976_7066_720b_0d45_45fe42921eaf
  8ffc8513_97a6_feaa_6bc2_e31c949e66cd["index.ts"]
  8ffc8513_97a6_feaa_6bc2_e31c949e66cd --> dd8dfe4b_a02b_1bc3_09c9_3c17eb0dcb1c
  style dd8dfe4b_a02b_1bc3_09c9_3c17eb0dcb1c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import type { ScopedSlotsData } from 'types/vnode'
import { isArray } from 'core/util'

export function resolveScopedSlots(
  fns: ScopedSlotsData,
  res?: Record<string, any>,
  // the following are added in 2.6
  hasDynamicKeys?: boolean,
  contentHashKey?: number
): { $stable: boolean } & { [key: string]: Function } {
  res = res || { $stable: !hasDynamicKeys }
  for (let i = 0; i < fns.length; i++) {
    const slot = fns[i]
    if (isArray(slot)) {
      resolveScopedSlots(slot, res, hasDynamicKeys)
    } else if (slot) {
      // marker for reverse proxying v-slot without scope on this.$slots
      // @ts-expect-error
      if (slot.proxy) {
        // @ts-expect-error
        slot.fn.proxy = true
      }
      res[slot.key] = slot.fn
    }
  }
  if (contentHashKey) {
    ;(res as any).$key = contentHashKey
  }
  return res as any
}

Domain

Subdomains

Dependencies

  • util
  • vnode

Frequently Asked Questions

What does resolve-scoped-slots.ts do?
resolve-scoped-slots.ts is a source file in the vue codebase, written in typescript. It belongs to the VueCore domain, Instance subdomain.
What functions are defined in resolve-scoped-slots.ts?
resolve-scoped-slots.ts defines 1 function(s): resolveScopedSlots.
What does resolve-scoped-slots.ts depend on?
resolve-scoped-slots.ts imports 2 module(s): util, vnode.
What files import resolve-scoped-slots.ts?
resolve-scoped-slots.ts is imported by 1 file(s): index.ts.
Where is resolve-scoped-slots.ts in the architecture?
resolve-scoped-slots.ts is located at src/core/instance/render-helpers/resolve-scoped-slots.ts (domain: VueCore, subdomain: Instance, directory: src/core/instance/render-helpers).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free