SerializeContext
Type Stability: stable
recurse: serialize one child block. recurseAll (markdown only): serialize siblings in order, telling each its neighbours.
before / after (markdown only): the siblings around this block.
Definition
TypeScript
import type { SerializeContext } from '@aionbuilders/nabu/extend';TypeScript
type SerializeContext = {
after?: PasteBlock[];
before?: PasteBlock[];
recurse: (child: PasteBlock, ctx?: Record<string, any>) => string;
recurseAll?: (children: PasteBlock[], ctx?: Record<string, any>) => string[];
[field: string]: any;
}Properties
| Property | Type | Description |
|---|---|---|
afteroptional | PasteBlock[] | n/a |
beforeoptional | PasteBlock[] | n/a |
recurse | (child: PasteBlock, ctx?: Record<string, any>) => string | n/a |
recurseAlloptional | (children: PasteBlock[], ctx?: Record<string, any>) => string[] | n/a |
Source: src/lib/utils/extensions.js:109