Replies: 1 comment 1 reply
-
|
Yes, you are missing that typescript cannot know if an extension changes async to true marked.use({async: true});
marked.parse(...) // returns Promise<string> |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am using marked with default options. Async is false by default. When using it in TypeScript I get
Type 'string | Promise<string>' is not assignable to type 'string'It seems that the type signature should return
stringwhenasync: falseandPromise<string>whenasync: true.Am I misunderstanding something about this?
Beta Was this translation helpful? Give feedback.
All reactions