|
The signature of const html = marked.parse('...') as string; |
Answered by
UziTech
Mar 11, 2024
Replies: 2 comments 1 reply
|
You can send {async: false} as an option to the parse function, and the type will be fixed. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.