parseSignature() — supabase Function Reference
Architecture documentation for the parseSignature() function in Reference.typeSpec.ts from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD 0ebbf781_9122_475b_4149_017f2ce9e2eb["parseSignature()"] a8ccd878_c279_c6e4_8b08_0e89492f323d["parseConstructor()"] a8ccd878_c279_c6e4_8b08_0e89492f323d -->|calls| 0ebbf781_9122_475b_4149_017f2ce9e2eb d6ac5122_a665_c6ed_6707_9a761c40ba05["parseMethod()"] d6ac5122_a665_c6ed_6707_9a761c40ba05 -->|calls| 0ebbf781_9122_475b_4149_017f2ce9e2eb d92b9cf8_5353_8348_7da5_f0a2ee5203bc["parseTypeLiteral()"] d92b9cf8_5353_8348_7da5_f0a2ee5203bc -->|calls| 0ebbf781_9122_475b_4149_017f2ce9e2eb a2ee5574_56fa_afb2_fc20_7c07cd7a7dba["parseTypeInternals()"] a2ee5574_56fa_afb2_fc20_7c07cd7a7dba -->|calls| 0ebbf781_9122_475b_4149_017f2ce9e2eb ba4cce53_051e_d69f_25a4_55d567b053b3["parseType()"] 0ebbf781_9122_475b_4149_017f2ce9e2eb -->|calls| ba4cce53_051e_d69f_25a4_55d567b053b3 f273b0f2_482b_4163_b404_13bc5e9aca2a["nameOrAnonymous()"] 0ebbf781_9122_475b_4149_017f2ce9e2eb -->|calls| f273b0f2_482b_4163_b404_13bc5e9aca2a 95c1d699_db8a_dd96_1436_bf88ec23669b["normalizeComment()"] 0ebbf781_9122_475b_4149_017f2ce9e2eb -->|calls| 95c1d699_db8a_dd96_1436_bf88ec23669b style 0ebbf781_9122_475b_4149_017f2ce9e2eb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/docs/features/docs/Reference.typeSpec.ts lines 529–571
function parseSignature(
signature: any,
map: Map<number, any>
): {
params: Array<FunctionParameterType>
ret: ReturnType | undefined
comment?: Comment
} {
const params: Array<FunctionParameterType> = (signature.parameters ?? []).map((param: any) => {
const type = parseType(param.type, map)
const res: FunctionParameterType = {
name: nameOrAnonymous(param),
type,
}
if (param.flags?.isOptional) {
res.isOptional = true
}
if (param.comment) {
res.comment = normalizeComment(param.comment)
}
return res
})
let ret: ReturnType | undefined
if ('type' in signature) {
const retType = parseType(signature.type, map)
if (retType) {
ret = {
type: retType,
}
}
}
return {
params,
ret,
comment: normalizeComment(signature.comment),
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does parseSignature() do?
parseSignature() is a function in the supabase codebase.
What does parseSignature() call?
parseSignature() calls 3 function(s): nameOrAnonymous, normalizeComment, parseType.
What calls parseSignature()?
parseSignature() is called by 4 function(s): parseConstructor, parseMethod, parseTypeInternals, parseTypeLiteral.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free