Skip to main content

$isTextPointCaretSlice

function

Guard to check for a TextPointCaretSlice

function $isTextPointCaretSlice<D extends CaretDirection>(caretOrSlice: null | undefined | PointCaret<D> | TextPointCaretSlice<TextNode, D>): caretOrSlice is TextPointCaretSlice<TextNode, D>

Import

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

Notes

returns
true if caretOrSlice is a TextPointCaretSlice