Skip to content

Commit

Permalink
fix: Fixed types for slash commands by inspecting generics
Browse files Browse the repository at this point in the history
  • Loading branch information
Palanikannan1437 committed Dec 22, 2023
1 parent 98b7a94 commit b652d1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/editor/extensions/src/extensions/slash-commands.tsx
Original file line number Diff line number Diff line change
@@ -317,7 +317,7 @@ const renderItems = () => {
let popup: any | null = null;

return {
onStart: (props: { editor: Editor; clientRect: DOMRect }) => {
onStart: (props: { editor: Editor; clientRect?: (() => DOMRect | null) | null }) => {
component = new ReactRenderer(CommandList, {
props,
// @ts-ignore
@@ -335,7 +335,7 @@ const renderItems = () => {
placement: "bottom-start",
});
},
onUpdate: (props: { editor: Editor; clientRect: DOMRect }) => {
onUpdate: (props: { editor: Editor; clientRect?: (() => DOMRect | null) | null }) => {
component?.updateProps(props);

popup &&

0 comments on commit b652d1a

Please sign in to comment.