Parameter menuContent is too strictly typed #16

Closed
opened 2023-08-30 15:15:45 +02:00 by SamMousa · 0 comments
SamMousa commented 2023-08-30 15:15:45 +02:00 (Migrated from github.com)

The type definition for the parameter references the implementing class not the interface.

github.com/ProseMirror/prosemirror-example-setup@c3ac29c599/src/index.ts (L58-L70)

If you look at the implementation it passes the menuContent, or if not set the the generated menu.
The generated menu is typed less strictly:
github.com/ProseMirror/prosemirror-example-setup@c3ac29c599/src/menu.ts (L167)

The type definition for the parameter references the implementing class not the interface. https://github.com/ProseMirror/prosemirror-example-setup/blob/c3ac29c5998e1b6aa48883f7faf88e8094fb56aa/src/index.ts#L58-L70 If you look at the implementation it passes the `menuContent`, or if not set the the generated menu. The generated menu is typed less strictly: https://github.com/ProseMirror/prosemirror-example-setup/blob/c3ac29c5998e1b6aa48883f7faf88e8094fb56aa/src/menu.ts#L167
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
prosemirror/prosemirror-example-setup#16
No description provided.