-
The signature of const html = marked.parse('...') as string; |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
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.