import { Element } from "slate"; import { UnknownObject } from "../../types/misc/AnyObject"; import { TEditor, Value } from "../editor/TEditor"; import { TDescendant } from "../node/TDescendant"; import { TNode } from "../node/TNode"; import { EText } from "../text/TText"; /** * `Element` objects are a type of node in a Slate document that contain other * element nodes or text nodes. They can be either "blocks" or "inlines" * depending on the Slate editor's configuration. */ export interface TElement extends Element, UnknownObject { children: TDescendant[]; type: string; } /** * Element of an editor. */ export type EElement = ElementOf>; /** * Element or text of an editor. Differs from EDescendant. */ export type EElementOrText = EElement | EText; /** * `ElementEntry` objects refer to an `Element` and the `Path` where it can be * found inside a root node. */ /** * A utility type to get all the element nodes type from a root node. */ export type ElementOf = TEditor extends N ? TElement : TElement extends N ? TElement : N extends TEditor ? Extract | ElementOf : N extends TElement ? N | Extract | ElementOf : never; //# sourceMappingURL=TElement.d.ts.map