Type of parent argument to open() and close() of MarkdownSerializer

Hi, I would like to know something about MarkdownSerializer.

According to the README of prosemirror-markdown, open and close of the marks can be defined as functions that take the following arguments

(state: MarkdownSerializerState, mark: Mark, parent: Fragment, index: number) → string

However, after reading the source code, I think that the parent argument passed to open() and close() is the parent: Node of renderInline(parent: Node).

So I’m thinking that the type of parent is likely to be of type Node, but there may be some information I’m not aware of, so if you could let me know, that would be great!

1 Like

Yeah, you are right. I’m actually in the process of converting the code to TypeScript to avoid this kind of desynchronization between the types and the actual code, and I see I had already fixed that without noticing.

1 Like

Thank you for your answer. I see that the type of parent should be Node. I understand. I am looking forward to the future since you are converting to TypeScript.