Skip to content

Commit

Permalink
Add flow declarations in LexicalDevtoolsCore.js.flow (#6037)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sahejkm authored May 6, 2024
1 parent 92c4721 commit c8e45fe
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions packages/lexical-devtools-core/flow/LexicalDevtoolsCore.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,28 @@
/**
* LexicalDevtoolsCore
*/

import type {
LexicalEditor,
LexicalCommand
} from 'lexical';

export type LexicalCommandLog = $ReadOnlyArray<LexicalCommand<mixed> | {payload: mixed}>;

declare export function generateContent(
editor: LexicalEditor,
commandsLog: $ReadOnlyArray<LexicalCommandLog>,
exportDOM: boolean,
obfuscateText?: boolean,
): string;

declare export function registerLexicalCommandLogger(
editor: LexicalEditor,
setLoggedCommands: (
v: (oldValue: LexicalCommandLog) => LexicalCommandLog,
) => void,
): () => void;

declare export function useLexicalCommandsLog(
editor: LexicalEditor,
): LexicalCommandLog;

0 comments on commit c8e45fe

Please sign in to comment.