Argument of type '(editor: grapesjs.Editor) => string' is not assignable to parameter of type '(editor: Editor) => void | { run: (editor: Editor, sender?: any) => void; stop: (editor: Editor, sender?: any) => void; }'.
Type 'string' is not assignable to type 'void | { run: (editor: Editor, sender?: any) => void; stop: (editor: Editor, sender?: any) => void; }'.
I'm having difficulty making the example work with the
GrapesJS version
What browser are you using?
Any
Reproducible demo link
https://grapesjs.com/docs/modules/Commands.html#stateful-commands
Describe the bug
How to reproduce the bug?
in a typescript setup,
What is the expected behavior?
it is allowed, as in the "Let's return something" example at https://grapesjs.com/docs/modules/Commands.html#stateful-commands
What is the current behavior?
I'm having difficulty making the example work with the
definitions as well - (in addition to the
(editor: Editor) => void
definition, as described above)Should all 3 of these
void
declarations in fact beany
?Code of Conduct