API / @aionbuilders/nabu/extend

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

Properties of SerializeContext
PropertyTypeDescription
afteroptionalPasteBlock[]n/a
beforeoptionalPasteBlock[]n/a
recurse(child: PasteBlock, ctx?: Record<string, any>) => stringn/a
recurseAlloptional(children: PasteBlock[], ctx?: Record<string, any>) => string[]n/a

Source: src/lib/utils/extensions.js:109