From 32aa889f2ab2b7dabf0cd37f43e48c18e67b8a0d Mon Sep 17 00:00:00 2001 From: Bob Ippolito Date: Wed, 15 Jan 2025 21:54:14 -0800 Subject: [PATCH] fix docs --- packages/lexical/src/LexicalCaret.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/lexical/src/LexicalCaret.ts b/packages/lexical/src/LexicalCaret.ts index 4b3e286df33..db6e68f2be1 100644 --- a/packages/lexical/src/LexicalCaret.ts +++ b/packages/lexical/src/LexicalCaret.ts @@ -25,6 +25,7 @@ const FLIP_DIRECTION = { previous: 'next', } as const; +/** @noInheritDoc */ export interface BaseNodeCaret< T extends LexicalNode, D extends CaretDirection, @@ -544,14 +545,14 @@ export function $getTextSliceCaret< * @returns null if origin is null or not an ElementNode, otherwise a DepthNodeCaret for this origin and direction */ export function $getDepthCaret( - node: T, + origin: T, direction: D, ): DepthNodeCaret; export function $getDepthCaret( - node: LexicalNode | null, + origin: null | LexicalNode, direction: CaretDirection, ): null | DepthNodeCaret { - return $isElementNode(node) ? new DEPTH_CTOR[direction](node) : null; + return $isElementNode(origin) ? new DEPTH_CTOR[direction](origin) : null; } /** @@ -572,9 +573,9 @@ export function $getChildCaretOrSelf< * @param caret The caret to start at */ export function $getAdjacentDepthCaret( - origin: null | NodeCaret, + caret: null | NodeCaret, ): null | NodeCaret { - return origin && $getChildCaretOrSelf(origin.getAdjacentCaret()); + return caret && $getChildCaretOrSelf(caret.getAdjacentCaret()); } /**