extractRuntimeProps() — vue Function Reference
Architecture documentation for the extractRuntimeProps() function in compileScript.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD a8566671_e002_8ae9_3bc7_100a437aa527["extractRuntimeProps()"] af57cd20_c4ce_0877_c02c_52056ca04d4a["compileScript()"] af57cd20_c4ce_0877_c02c_52056ca04d4a -->|calls| a8566671_e002_8ae9_3bc7_100a437aa527 8ac9093c_a35a_8ea9_859b_a447347824e3["inferRuntimeType()"] a8566671_e002_8ae9_3bc7_100a437aa527 -->|calls| 8ac9093c_a35a_8ea9_859b_a447347824e3 style a8566671_e002_8ae9_3bc7_100a437aa527 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/compiler-sfc/src/compileScript.ts lines 1442–1467
function extractRuntimeProps(
node: TSTypeLiteral | TSInterfaceBody,
props: Record<string, PropTypeData>,
declaredTypes: Record<string, string[]>,
isProd: boolean
) {
const members = node.type === 'TSTypeLiteral' ? node.members : node.body
for (const m of members) {
if (
(m.type === 'TSPropertySignature' || m.type === 'TSMethodSignature') &&
m.key.type === 'Identifier'
) {
let type
if (m.type === 'TSMethodSignature') {
type = ['Function']
} else if (m.typeAnnotation) {
type = inferRuntimeType(m.typeAnnotation.typeAnnotation, declaredTypes)
}
props[m.key.name] = {
key: m.key.name,
required: !m.optional,
type: type || [`null`]
}
}
}
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does extractRuntimeProps() do?
extractRuntimeProps() is a function in the vue codebase.
What does extractRuntimeProps() call?
extractRuntimeProps() calls 1 function(s): inferRuntimeType.
What calls extractRuntimeProps()?
extractRuntimeProps() 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