import { TEditor, Value } from "../editor/TEditor"; import { ElementOf, TElement } from "../element/TElement"; import { TextOf, TText } from "../text/TText"; import { TNode } from "./TNode"; /** * The `Descendant` union type represents nodes that are descendants in the * tree. It is returned as a convenience in certain cases to narrow a value * further than the more generic `Node` union. */ export type TDescendant = TElement | TText; /** * Descendant of an editor. */ export type EDescendant = DescendantOf>; /** * A utility type to get all the descendant node types from a root node type. */ export type DescendantOf = N extends TEditor ? ElementOf | TextOf : N extends TElement ? ElementOf | TextOf : never; /** * A utility type to get the child node types from a root node type. */ export type ChildOf = N extends TEditor ? N["children"][I] : N extends TElement ? N["children"][I] : never; export declare const isDescendant: (value: any) => value is TDescendant; //# sourceMappingURL=TDescendant.d.ts.map