Interface: ConvertCapability
Defined in: src/batteries/media/contracts.ts:291
One uniform block of an engine's conversion matrix: every format token in to is producible from every input matching from.
Remarks
Declarations are plain data — the registry reads them without calling engine code. An input-dependent matrix (LibreOffice: docx→pdf yes, docx→xlsx no, ods→xlsx yes) is expressed as several capability groups, each a uniform from×to block.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
from | readonly string[] | Input patterns this block accepts. | src/batteries/media/contracts.ts:293 |
to | readonly string[] | Format tokens producible from every from member. | src/batteries/media/contracts.ts:295 |
Methods
convert()
ts
convert(request: ConvertRequest): Promise<ConvertResult>;Defined in: src/batteries/media/contracts.ts:302
Perform the conversion.
Parameters
| Parameter | Type | Description |
|---|---|---|
request | ConvertRequest | The input bytes, target token, and options. |
Returns
Promise<ConvertResult>
The conversion outputs.