parseModInternal() — supabase Function Reference
Architecture documentation for the parseModInternal() function in Reference.typeSpec.ts from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD f6b7a4fb_ecfd_92ba_efea_5ac203d49fe1["parseModInternal()"] b960cff3_9820_d19a_a18b_203c3d139c93["parseMod()"] b960cff3_9820_d19a_a18b_203c3d139c93 -->|calls| f6b7a4fb_ecfd_92ba_efea_5ac203d49fe1 0833a3f0_6296_6d9b_2836_a3d390df1b64["parsePropertyReference()"] 0833a3f0_6296_6d9b_2836_a3d390df1b64 -->|calls| f6b7a4fb_ecfd_92ba_efea_5ac203d49fe1 a8ccd878_c279_c6e4_8b08_0e89492f323d["parseConstructor()"] f6b7a4fb_ecfd_92ba_efea_5ac203d49fe1 -->|calls| a8ccd878_c279_c6e4_8b08_0e89492f323d d6ac5122_a665_c6ed_6707_9a761c40ba05["parseMethod()"] f6b7a4fb_ecfd_92ba_efea_5ac203d49fe1 -->|calls| d6ac5122_a665_c6ed_6707_9a761c40ba05 ba929624_b9f4_b767_ce03_d9523a729ce8["parseVariable()"] f6b7a4fb_ecfd_92ba_efea_5ac203d49fe1 -->|calls| ba929624_b9f4_b767_ce03_d9523a729ce8 0833a3f0_6296_6d9b_2836_a3d390df1b64["parsePropertyReference()"] f6b7a4fb_ecfd_92ba_efea_5ac203d49fe1 -->|calls| 0833a3f0_6296_6d9b_2836_a3d390df1b64 style f6b7a4fb_ecfd_92ba_efea_5ac203d49fe1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/docs/features/docs/Reference.typeSpec.ts lines 326–394
function parseModInternal(
node: any,
map: Map<number, any>,
currentPath: Array<string>,
res: ModuleTypes,
processingRefs: Set<number>
) {
let updatedPath: Array<string>
switch ((node.kindString ?? node.variant)?.toLowerCase()) {
case 'module':
updatedPath = [...currentPath, node.name]
node.children?.forEach((child: any) =>
parseModInternal(child, map, updatedPath, res, processingRefs)
)
return
// Some libraries have undefined where others have Project or declaration // for the same type of top-level node.
case 'project':
case undefined:
updatedPath = [...currentPath, node.name]
node.children?.forEach((child: any) =>
parseModInternal(child, map, updatedPath, res, processingRefs)
)
return
case 'class':
updatedPath = [...currentPath, node.name]
node.children?.forEach((child: any) =>
parseModInternal(child, map, updatedPath, res, processingRefs)
)
return
case 'constructor':
return parseConstructor(node, map, currentPath, res)
case 'method':
return parseMethod(node, map, currentPath, res)
case 'interface':
updatedPath = [...currentPath, node.name]
node.children?.forEach((child: any) =>
parseModInternal(child, map, updatedPath, res, processingRefs)
)
return
case 'declaration':
if (node.kind === KIND_CLASS || node.kind === KIND_MODULE) {
updatedPath = [...currentPath, node.name]
node.children?.forEach((child: any) =>
parseModInternal(child, map, updatedPath, res, processingRefs)
)
} else if (node.kind === KIND_INTERFACE) {
updatedPath = [...currentPath, node.name]
node.children?.forEach((child: any) =>
parseModInternal(child, map, updatedPath, res, processingRefs)
)
} else if (node.kind === KIND_CONSTRUCTOR) {
parseConstructor(node, map, currentPath, res)
} else if (node.kind === KIND_METHOD) {
return parseMethod(node, map, currentPath, res)
} else if (node.kind === KIND_VARIABLE) {
return parseVariable(node, map, currentPath, res)
} else if (node.kind === KIND_PROPERTY) {
parsePropertyReference(node, map, currentPath, res, processingRefs)
}
return
case 'property':
parsePropertyReference(node, map, currentPath, res, processingRefs)
return
case 'reference':
default:
return
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does parseModInternal() do?
parseModInternal() is a function in the supabase codebase.
What does parseModInternal() call?
parseModInternal() calls 4 function(s): parseConstructor, parseMethod, parsePropertyReference, parseVariable.
What calls parseModInternal()?
parseModInternal() is called by 2 function(s): parseMod, parsePropertyReference.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free