Skip to content
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

types: use typings provided by remark #24

Conversation

ChristianMurphy
Copy link
Member

Starting with remark version 11, remark has provided typings as part of the package.

@ChristianMurphy ChristianMurphy added ☂️ area/types This affects typings 👶 semver/patch This is a backwards-compatible fix labels Sep 1, 2020
@@ -158,7 +158,7 @@ async function runRemark(document: vscode.TextDocument, range: vscode.Range): Pr
if (result.messages.length !== 0) {
let message = '';

result.messages.forEach((value: string) => {
result.messages.forEach((value) => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this case, value is a VFileMessage

Copy link
Collaborator

@asbjornu asbjornu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, but if you have ideas for how to exercise the touched code in a test so we know for a fact that it works, that would be awesome!

@ChristianMurphy
Copy link
Member Author

but if you have ideas for how to exercise the touched code in a test so we know for a fact that it works

This corrects the typing, which is tested by tsc.
The implementation is the same as before.

Additional unit tests are wonderful, but would likely be out of scope of a typing fix. (?)

@asbjornu
Copy link
Collaborator

asbjornu commented Sep 2, 2020

This corrects the typing, which is tested by tsc.

Ok, fair enough.

@asbjornu asbjornu merged commit e8a2b1c into remarkjs:master Sep 2, 2020
@asbjornu
Copy link
Collaborator

asbjornu commented Sep 2, 2020

Thanks, @ChristianMurphy! 🙏

@ChristianMurphy ChristianMurphy deleted the types/leverage-remark-builtin-typings branch September 4, 2020 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☂️ area/types This affects typings 👶 semver/patch This is a backwards-compatible fix
Development

Successfully merging this pull request may close these issues.

None yet

2 participants