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

Type-safe severity/options normalization #287

Merged
merged 1 commit into from
Apr 4, 2022
Merged

Conversation

jablko
Copy link
Contributor

@jablko jablko commented Apr 1, 2022

Initial checklist

  • I read the support docs
  • I read the contributing guide
  • I agree to follow the code of conduct
  • I searched issues and couldn’t find anything (or linked relevant results below)
  • If applicable, I’ve added docs and tests

Description of changes

What do you think of this cosmetic change to the coerce() function?

It's not an important change. As I see it the advantage is it eliminates the // @ts-expect-error: it’s now a valid tuple. exception, so the type checker confirms it actually returns a SeverityTuple.

I'm happy to make any stylistic changes you suggest!

@github-actions github-actions bot added the 👋 phase/new Post is being triaged automatically label Apr 1, 2022
@github-actions

This comment has been minimized.

Copy link
Member

@wooorm wooorm left a comment

Choose a reason for hiding this comment

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

Looks much better, so if the tests pass, 👍

@codecov-commenter

This comment was marked as resolved.

@github-actions github-actions bot added 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Apr 1, 2022
@wooorm
Copy link
Member

wooorm commented Apr 1, 2022

Can you fill out the checklist in the template? :)

@wooorm wooorm merged commit 29bb3b7 into remarkjs:main Apr 4, 2022
@wooorm wooorm added ☂️ area/types This affects typings 💪 phase/solved Post is done labels Apr 4, 2022
@github-actions

This comment has been minimized.

@github-actions github-actions bot removed the 🤞 phase/open Post is being triaged manually label Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☂️ area/types This affects typings 💪 phase/solved Post is done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants