Function: extractContent()
extractContent(
root,extractor,renderer,transforms?,transformContext?):string[] |GroupedExtraction[] |Readonly<Record<string,string|string[]>>[]
Defined in: packages/core/src/domain/services/content-extraction.ts:369
Generic extraction engine — runs a single extractor against an AST root.
Pure function — no I/O. Handles single-value, array-value, grouped, and structured extraction modes based on the extractor configuration.
Parameters
root
The AST root node to extract from
extractor
The extraction configuration
renderer
Serializer for rendering AST subtrees to text
transforms?
Named transform callbacks (for example resolveSpecPath)
transformContext?
ExtractorTransformContext = EMPTY_TRANSFORM_CONTEXT
Opaque caller-owned transform context bag
Returns
string[] | GroupedExtraction[] | Readonly<Record<string, string | string[]>>[]
Extracted values as strings, grouped objects, or structured objects
Throws
When transform lookup or execution fails