Skip to content

Commit

Permalink
Update Lexical.js.flow
Browse files Browse the repository at this point in the history
Missing variables and functions in Flow file.
  • Loading branch information
lytion authored Nov 25, 2024
1 parent 89af994 commit df24486
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/lexical/flow/Lexical.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ export type EditorThemeClasses = {
ulDepth?: Array<EditorThemeClassName>,
ol?: EditorThemeClassName,
olDepth?: Array<EditorThemeClassName>,
checklist?: EditorThemeClassName,
listitem?: EditorThemeClassName,
listitemChecked?: EditorThemeClassName,
listitemUnchecked?: EditorThemeClassName,
Expand Down Expand Up @@ -446,13 +447,17 @@ declare export function $isBlockElementNode(
): node is ElementNode;

export interface BaseSelection {
clone(): BaseSelection;
_cachedNodes: Array<LexicalNode> | null;
dirty: boolean;
clone(): BaseSelection;
extract(): Array<LexicalNode>;
getNodes(): Array<LexicalNode>;
getStartEndPoints(): null | [PointType, PointType];
getTextContent(): string;
insertRawText(text: string): void;
is(selection: null | BaseSelection): boolean;
isBackward(): boolean;
isCollapsed(): boolean;
insertText(text: string): void;
insertNodes(nodes: Array<LexicalNode>): void;
getCachedNodes(): null | Array<LexicalNode>;
Expand Down Expand Up @@ -528,6 +533,7 @@ declare export class RangeSelection implements BaseSelection {
}
export type TextPoint = TextPointType;
type TextPointType = {
_selection: BaseSelection,
key: NodeKey,
offset: number,
type: 'text',
Expand All @@ -539,6 +545,7 @@ type TextPointType = {
};
export type ElementPoint = ElementPointType;
type ElementPointType = {
_selection: BaseSelection,
key: NodeKey,
offset: number,
type: 'element',
Expand Down

0 comments on commit df24486

Please sign in to comment.