remarkjs / remark-rehype

plugin that turns markdown into HTML to support rehype
https://remark.js.org
MIT License
266 stars 18 forks source link

Fix to turn of `this` error introduced in TS 4.9 #29

Closed ChristianMurphy closed 1 year ago

ChristianMurphy commented 1 year ago

Initial checklist

Description of changes

I tried a few combinations of adding @this {import('unified').Processor} annotations to the plugin, as well as explicitly binding bridge.bind(this). Neither appeared to work, temporarily ignore the error. Suggestions on a solution that gets TS to recognize this are welcome.

/cc @remcohaszing

codecov-commenter commented 1 year ago

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage :thumbsup:

Coverage data is based on head (017d082) compared to base (5261894). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #29 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 2 2 Lines 79 81 +2 ========================================= + Hits 79 81 +2 ``` | [Impacted Files](https://codecov.io/gh/remarkjs/remark-rehype/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=remarkjs) | Coverage Δ | | |---|---|---| | [lib/index.js](https://codecov.io/gh/remarkjs/remark-rehype/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=remarkjs#diff-bGliL2luZGV4Lmpz) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=remarkjs). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=remarkjs)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

wooorm commented 1 year ago

Something like this {import('unified').Processor} should work, if it doesn’t, perhaps it needs explicit type parameters? I dunno. Let’s merge this first and revisit it some time :)

github-actions[bot] commented 1 year ago

Hi! This was closed. Team: If this was merged, please describe when this is likely to be released. Otherwise, please add one of the no/* labels.