Skip to content

Commit 2d39181

Browse files
committed
feat: make target to use generic
1 parent 4c37c10 commit 2d39181

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/lexical/src/LexicalEditor.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,11 @@ export type LexicalNodeReplacement = {
169169
export type HTMLConfig = {
170170
export?: Map<
171171
Klass<LexicalNode>,
172-
(editor: LexicalEditor, target: LexicalNode) => DOMExportOutput
172+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
173+
<T extends {new (...args: any): any}>(
174+
editor: LexicalEditor,
175+
target: InstanceType<T>,
176+
) => DOMExportOutput
173177
>;
174178
import?: DOMConversionMap;
175179
};

0 commit comments

Comments
 (0)