extractRuntimeProps() — vue Function Reference
Architecture documentation for the extractRuntimeProps() function in compileScript.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 055d772e_d763_3b26_fcda_751e2ef7f1ef["extractRuntimeProps()"] b9f12a63_b611_1b00_0717_3ff21d7ce156["compileScript.ts"] 055d772e_d763_3b26_fcda_751e2ef7f1ef -->|defined in| b9f12a63_b611_1b00_0717_3ff21d7ce156 6195696d_b4e9_b5d7_3dd5_1966a03d855f["compileScript()"] 6195696d_b4e9_b5d7_3dd5_1966a03d855f -->|calls| 055d772e_d763_3b26_fcda_751e2ef7f1ef f5615e57_27e2_c277_36a9_ca880b809a96["inferRuntimeType()"] 055d772e_d763_3b26_fcda_751e2ef7f1ef -->|calls| f5615e57_27e2_c277_36a9_ca880b809a96 style 055d772e_d763_3b26_fcda_751e2ef7f1ef 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
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does extractRuntimeProps() do?
extractRuntimeProps() is a function in the vue codebase, defined in packages/compiler-sfc/src/compileScript.ts.
Where is extractRuntimeProps() defined?
extractRuntimeProps() is defined in packages/compiler-sfc/src/compileScript.ts at line 1442.
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