Skip to content

types: use typings provided by remark#24

Merged
asbjornu merged 1 commit intoremarkjs:masterfrom
ChristianMurphy:types/leverage-remark-builtin-typings
Sep 2, 2020
Merged

types: use typings provided by remark#24
asbjornu merged 1 commit intoremarkjs:masterfrom
ChristianMurphy:types/leverage-remark-builtin-typings

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
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.

2 participants