typescript-exports.ts view source
(symbol: Symbol, sourceFile: SourceFile, checker: TypeChecker, diagnostics: ({ symbolName: string; file: string; message: string; severity: "error" | "warning"; kind: "type_extraction_failed"; line?: number | undefined; column?: number | undefined; } | ... 12 more ... | { ...; })[], isExternalFile: IsExternalFile): DeclarationAnalysis Analyze a TypeScript symbol and extract rich metadata.
This is a high-level function that combines TSDoc parsing with TypeScript type analysis to produce complete declaration metadata. Suitable for use in documentation generators, IDE integrations, and other tooling.
symbol
the TypeScript symbol to analyze
SymbolsourceFile
the source file containing the symbol
SourceFilechecker
the TypeScript type checker
TypeCheckerdiagnostics
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 ... | { ...; })[]isExternalFile
predicate for determining whether a source file is external to the project
returns
DeclarationAnalysis complete declaration metadata including docs, types, and parameters, plus nodocs flag