Skip to main content

$isLeafNode

function

Returns true if the given node is a leaf (TextNode, LineBreakNode, or DecoratorNode).

function $isLeafNode(node: LexicalNode | null | undefined): node is TextNode | LineBreakNode | DecoratorNode<unknown>

Import

import { $isLeafNode } from '@modular/sdk/editor';