Skip to content

Commit

Permalink
Deprecate unused methods on ElementNode (#5782)
Browse files Browse the repository at this point in the history
  • Loading branch information
thorn0 authored May 21, 2024
1 parent 6b4c1dc commit bccb3c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/lexical-list/src/LexicalListItemNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,12 @@ export class ListItemNode extends ElementNode {
return this;
}

/** @deprecated @internal */
canInsertAfter(node: LexicalNode): boolean {
return $isListItemNode(node);
}

/** @deprecated @internal */
canReplaceWith(replacement: LexicalNode): boolean {
return $isListItemNode(replacement);
}
Expand Down
3 changes: 3 additions & 0 deletions packages/lexical/src/nodes/LexicalElementNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -525,9 +525,11 @@ export class ElementNode extends LexicalNode {
excludeFromCopy(destination?: 'clone' | 'html'): boolean {
return false;
}
/** @deprecated @internal */
canReplaceWith(replacement: LexicalNode): boolean {
return true;
}
/** @deprecated @internal */
canInsertAfter(node: LexicalNode): boolean {
return true;
}
Expand All @@ -550,6 +552,7 @@ export class ElementNode extends LexicalNode {
isShadowRoot(): boolean {
return false;
}
/** @deprecated @internal */
canMergeWith(node: ElementNode): boolean {
return false;
}
Expand Down

0 comments on commit bccb3c0

Please sign in to comment.