Home / Function/ getTypeSpec() — supabase Function Reference

getTypeSpec() — supabase Function Reference

Architecture documentation for the getTypeSpec() function in Reference.generated.singleton.ts from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  f6fdb326_7578_ab30_cfb3_855e5c138e6d["getTypeSpec()"]
  5df2c2c3_5161_a344_0c8e_a4d8e5d5d38e["functionDetails()"]
  5df2c2c3_5161_a344_0c8e_a4d8e5d5d38e -->|calls| f6fdb326_7578_ab30_cfb3_855e5c138e6d
  d0714c90_b2eb_810b_c046_3cb9bc737b59["FunctionSection()"]
  d0714c90_b2eb_810b_c046_3cb9bc737b59 -->|calls| f6fdb326_7578_ab30_cfb3_855e5c138e6d
  454d538a_be67_4781_d8d2_b33cc5ab5495["_typeSpecSingleton()"]
  f6fdb326_7578_ab30_cfb3_855e5c138e6d -->|calls| 454d538a_be67_4781_d8d2_b33cc5ab5495
  bd372304_1928_cee8_9784_b94a645c8868["normalizeRefPath()"]
  f6fdb326_7578_ab30_cfb3_855e5c138e6d -->|calls| bd372304_1928_cee8_9784_b94a645c8868
  style f6fdb326_7578_ab30_cfb3_855e5c138e6d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/docs/features/docs/Reference.generated.singleton.ts lines 34–44

export async function getTypeSpec(ref: string) {
  const modules = await _typeSpecSingleton()

  const normalizedRef = normalizeRefPath(ref)
  const delimiter = normalizedRef.indexOf('.')
  const refMod = normalizedRef.substring(0, delimiter)

  const mod = modules.find((mod) => mod.name === refMod)
  // Check methods first, then variables
  return mod?.methods.get(normalizedRef) ?? mod?.variables.get(normalizedRef)
}

Subdomains

Frequently Asked Questions

What does getTypeSpec() do?
getTypeSpec() is a function in the supabase codebase.
What does getTypeSpec() call?
getTypeSpec() calls 2 function(s): _typeSpecSingleton, normalizeRefPath.
What calls getTypeSpec()?
getTypeSpec() is called by 2 function(s): FunctionSection, functionDetails.

Analyze Your Own Codebase

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

Try Supermodel Free