MCPcopy Create free account
hub / github.com/codeaashu/claude-code / hasRootNode

Function hasRootNode

src/native-ts/color-diff/index.ts:491–500  ·  view source on GitHub ↗
(emitter: unknown)

Source from the content-addressed store, hash-verified

489// prior `as unknown as` cast hid a version mismatch (_emitter vs emitter,
490// scope vs kind) behind a silent gray fallback.
491function hasRootNode(emitter: unknown): emitter is { rootNode: HljsNode } {
492 return (
493 typeof emitter === 'object' &&
494 emitter !== null &&
495 'rootNode' in emitter &&
496 typeof emitter.rootNode === 'object' &&
497 emitter.rootNode !== null &&
498 'children' in emitter.rootNode
499 )
500}
501
502let loggedEmitterShapeError = false
503

Callers 1

highlightLineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected