defineSync
function defineSync<C>(sync: (ctx: SourceContext<C>) => Promise< | SourceSyncResult| Document[]>): TroveSource<C>;A source authored inline as a single sync function.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type | Description |
|---|---|---|
C | Record<string, unknown> | The shape of the source’s typed ctx.config preferences. |
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
sync | (ctx: SourceContext<C>) => Promise< | SourceSyncResult | Document[]> | The source’s sync(ctx) implementation. |
Returns
Section titled “Returns”TroveSource<C>
A TroveSource wrapping sync. No manifest, so not deployable
on its own — this is the shape a test or a local experiment uses.