MCPcopy Create free account
hub / github.com/TanStack/query / visit

Function visit

scripts/generate-docs.ts:357–371  ·  view source on GitHub ↗
(node: ts.Node)

Source from the content-addressed store, hash-verified

355 }
356 let found: ts.SignatureDeclaration | undefined
357 const visit = (node: ts.Node) => {
358 if (found) {
359 return
360 }
361 if (
362 ts.isFunctionLike(node) &&
363 'parameters' in node &&
364 source.getLineAndCharacterOfPosition(node.getStart()).line ===
365 Number(line) - 1
366 ) {
367 found = node
368 return
369 }
370 ts.forEachChild(node, visit)
371 }
372 visit(source)
373 return found && { parameter: found.parameters[0]?.type, returns: found.type }
374}

Callers 1

declaredSignatureTypesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected