An extension can set marked in async mode so it returns a promise. docs
\nIf you don't use extensions, or know none of them are async, it is safe to cast to string.
","upvoteCount":4,"url":"https://github.com/markedjs/marked/discussions/3219#discussioncomment-8746697"}}}-
The signature of const html = marked.parse('...') as string; |
Beta Was this translation helpful? Give feedback.
-
An extension can set marked in async mode so it returns a promise. docs If you don't use extensions, or know none of them are async, it is safe to cast to string. |
Beta Was this translation helpful? Give feedback.
-
You can send {async: false} as an option to the parse function, and the type will be fixed. |
Beta Was this translation helpful? Give feedback.
An extension can set marked in async mode so it returns a promise. docs
If you don't use extensions, or know none of them are async, it is safe to cast to string.