MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getOwnerChain

Function getOwnerChain

src/ink/reconciler.ts:158–177  ·  view source on GitHub ↗
(fiber: unknown)

Source from the content-addressed store, hash-verified

156}
157
158export function getOwnerChain(fiber: unknown): string[] {
159 const chain: string[] = []
160 const seen = new Set<unknown>()
161 let cur = fiber as FiberLike | null | undefined
162 for (let i = 0; cur && i < 50; i++) {
163 if (seen.has(cur)) break
164 seen.add(cur)
165 const t = cur.elementType
166 const name =
167 typeof t === 'function'
168 ? (t as { displayName?: string; name?: string }).displayName ||
169 (t as { displayName?: string; name?: string }).name
170 : typeof t === 'string'
171 ? undefined // host element (ink-box etc) — skip
172 : t?.displayName || t?.name
173 if (name && name !== chain[chain.length - 1]) chain.push(name)
174 cur = cur._debugOwner ?? cur.return
175 }
176 return chain
177}
178
179let debugRepaints: boolean | undefined
180export function isDebugRepaintsEnabled(): boolean {

Callers 1

createInstanceFunction · 0.85

Calls 3

hasMethod · 0.45
addMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected