Home / Function/ extractRuntimeEmits() — vue Function Reference

extractRuntimeEmits() — vue Function Reference

Architecture documentation for the extractRuntimeEmits() function in compileScript.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  f18d0d77_a105_150e_afc9_0fbde80a6a72["extractRuntimeEmits()"]
  af57cd20_c4ce_0877_c02c_52056ca04d4a["compileScript()"]
  af57cd20_c4ce_0877_c02c_52056ca04d4a -->|calls| f18d0d77_a105_150e_afc9_0fbde80a6a72
  7a13ff4e_4260_4a99_9589_83a4aaf232c3["extractEventNames()"]
  f18d0d77_a105_150e_afc9_0fbde80a6a72 -->|calls| 7a13ff4e_4260_4a99_9589_83a4aaf232c3
  style f18d0d77_a105_150e_afc9_0fbde80a6a72 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/compiler-sfc/src/compileScript.ts lines 1560–1575

function extractRuntimeEmits(
  node: TSFunctionType | TSTypeLiteral | TSInterfaceBody,
  emits: Set<string>
) {
  if (node.type === 'TSTypeLiteral' || node.type === 'TSInterfaceBody') {
    const members = node.type === 'TSTypeLiteral' ? node.members : node.body
    for (let t of members) {
      if (t.type === 'TSCallSignatureDeclaration') {
        extractEventNames(t.parameters[0], emits)
      }
    }
    return
  } else {
    extractEventNames(node.parameters[0], emits)
  }
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does extractRuntimeEmits() do?
extractRuntimeEmits() is a function in the vue codebase.
What does extractRuntimeEmits() call?
extractRuntimeEmits() calls 1 function(s): extractEventNames.
What calls extractRuntimeEmits()?
extractRuntimeEmits() is called by 1 function(s): compileScript.

Analyze Your Own Codebase

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

Try Supermodel Free