Skip to main content

SerializedElementNode

type

No type parameter for the children: a node cannot declare what kind of children it accepts, so any node may appear under any element and `SerializedLexicalNode` is the only type this can honestly give them. The parameter that used to be here promised a narrowing nothing enforces.

type SerializedElementNode = Spread<{ children: SerializedLexicalNode[]; direction: 'ltr' | 'rtl' | null; format: ElementFormatType; indent: number; textFormat?: number; textStyle?: string; }, SerializedLexicalNode>

Import

import { SerializedElementNode } from '@modular/sdk/editor';