Skip to content

Commit

Permalink
Fix flowtypes for insertBefore/after
Browse files Browse the repository at this point in the history
  • Loading branch information
fantactuka committed Mar 30, 2023
1 parent c0e999d commit 14d7c4d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/lexical/flow/Lexical.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ declare export class LexicalEditor {
_key: string;
_editable: boolean;
_headless: boolean;
_window: null | Window;
isComposing(): boolean;
registerUpdateListener(listener: UpdateListener): () => void;
registerRootListener(listener: RootListener): () => void;
Expand Down Expand Up @@ -375,8 +376,14 @@ declare export class LexicalNode {
): boolean;
remove(preserveEmptyParent?: boolean): void;
replace<N: LexicalNode>(replaceWith: N): N;
insertAfter(nodeToInsert: LexicalNode): LexicalNode;
insertBefore(nodeToInsert: LexicalNode): LexicalNode;
insertAfter(
nodeToInsert: LexicalNode,
restoreSelection?: boolean,
): LexicalNode;
insertBefore(
nodeToInsert: LexicalNode,
restoreSelection?: boolean,
): LexicalNode;
selectPrevious(anchorOffset?: number, focusOffset?: number): RangeSelection;
selectNext(anchorOffset?: number, focusOffset?: number): RangeSelection;
markDirty(): void;
Expand Down

0 comments on commit 14d7c4d

Please sign in to comment.