-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
async: true inconsistent return type (Promise | string) + docs update #2721
Labels
L2 - annoying
Similar to L1 - broken but there is a known workaround available for the issue
Comments
Nice catch. If you want to create a PR with those changes that would be much appreciated 😁👍 |
UziTech
added
the
L2 - annoying
Similar to L1 - broken but there is a known workaround available for the issue
label
Jan 29, 2023
I created #2728 which should fix both of these issues. |
5 tasks
webketje
added a commit
to jstransformers/jstransformer-marked
that referenced
this issue
Jul 18, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What pain point are you perceiving?.
marked provides an
async
option to enable asynchronouswalkTokens
.@types/marked
for version 4.x provides the following overload which looks perfectly logical/ reasonable:However, the
async
true option only returns a promise if there is an async walkTokens.Compare:
Additionally, in the docs it is said under the Walk Tokens section:
Evidently, this is not (or no longer) true
Describe the solution you'd like
When a user instructs marked to render
async: true
the API should consistently return a Promise, regardless of whether there is an async walkTokens extension included. Additionally, the docs should be updated to "The return value should be a promise for asynchronous walkTokens functions.Tested using the CJS build of marked 4.2.12
The text was updated successfully, but these errors were encountered: