Kaizen
Browse modulesReportsInterfaces

Interface: Compiler<Block, Inline>

Defined in: server/reports/compilers/compiler.ts:21

Shared interface that every format-specific compiler must satisfy.

Block is the output type for block-level content (pages, flow nodes). Inline is the output type for inline/phrasing content (text, images).

Compilers are created via a factory function that captures any internal state (counters, warning context, etc.) in a closure.

Only compilePage is called externally. The other methods are internal helpers that compilers may extend with format-specific parameters (e.g. the DOCX compiler threads ParagraphOverrides through compileFlowContent).

Type Parameters

Type Parameter
Block
Inline

Methods

compileFlowContent()

compileFlowContent(node: FlowContent): Block;

Defined in: server/reports/compilers/compiler.ts:24

Parameters

ParameterType
nodeFlowContent

Returns

Block


compileImage()

compileImage(node: ImageNode): Inline;

Defined in: server/reports/compilers/compiler.ts:23

Parameters

ParameterType
nodeImageNode

Returns

Inline


compilePage()

compilePage(page: PageNode, idx: number): Block;

Defined in: server/reports/compilers/compiler.ts:25

Parameters

ParameterType
pagePageNode
idxnumber

Returns

Block


compilePhrasingContent()

compilePhrasingContent(node: PhrasingContent): Inline;

Defined in: server/reports/compilers/compiler.ts:22

Parameters

ParameterType
nodePhrasingContent

Returns

Inline

On this page