typescript-extract-function.ts view source
(node: Node, symbol: Symbol, checker: TypeChecker, declaration: DeclarationJsonBuild, tsdoc: TsdocParsedComment | undefined, diagnostics: ({ ...; } | ... 12 more ... | { ...; })[]): void import {extractFunctionInfo} from 'svelte-docinfo/typescript-extract-function.js'; Extract function/method information including parameters with descriptions and default values.
node
the declaration AST node
Nodesymbol
the TypeScript symbol
Symbolchecker
TypeScript type checker
TypeCheckerdeclaration
the declaration to populate
tsdoc
parsed TSDoc comment (if available)
TsdocParsedComment | undefineddiagnostics
diagnostics collector for non-fatal issues
({ symbolName: string; file: string; message: string; severity: "error" | "warning"; kind: "type_extraction_failed"; line?: number | undefined; column?: number | undefined; } | { functionName: string; ... 5 more ...; column?: number | undefined; } | ... 11 more ... | { ...; })[]returns
void mutates
declaration— adds typeSignature, returnType, returnDescription, parameters, genericParams, overloads (and `partial: true` on signature failure)diagnostics— adds `signature_analysis_failed` diagnostic on checker error