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: allow any number of settings to be passed to a plugin #62

Merged
merged 1 commit into from
Jul 15, 2019

Conversation

ChristianMurphy
Copy link
Member

@ChristianMurphy ChristianMurphy commented Jul 13, 2019

uses variadic function with tuple based type checking to ensure settings and parameters match up.

resolves #60 by removing extra settings in favor of a variadic function.


There are some trade offs here, I've documented them to the best of my ability below.

@ChristianMurphy ChristianMurphy requested review from a team July 13, 2019 22:00
@ChristianMurphy
Copy link
Member Author

/cc @Rokt33r

@codecov-io

This comment has been minimized.

uses variadic function with tuple based type checking to ensure settings
and parameters match up.
Copy link
Member

@Rokt33r Rokt33r 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. :) I hope typescript could check the usage with PluginTuple one day.

@ChristianMurphy
Copy link
Member Author

ChristianMurphy commented Jul 15, 2019

This adds a new feature, if merged, it should go in a minor release.

@wooorm wooorm merged commit 12865ee into unifiedjs:master Jul 15, 2019
@ChristianMurphy ChristianMurphy deleted the types/many-settings branch July 15, 2019 17:38
wooorm pushed a commit to remarkjs/remark that referenced this pull request Jul 20, 2019
Related to unifiedjs/unified#53.
Related to unifiedjs/unified#54.
Related to unifiedjs/unified#56.
Related to unifiedjs/unified#57.
Related to unifiedjs/unified#58.
Related to unifiedjs/unified#59.
Related to unifiedjs/unified#60.
Related to unifiedjs/unified#61.
Related to unifiedjs/unified#62.
Related to unifiedjs/unified#63.
Related to unifiedjs/unified#64.
Related to #426.

Reviewed-by: Titus Wormer <tituswormer@gmail.com>
Reviewed-by: Junyoung Choi <fluke8259@gmail.com>
Reviewed-by: Christian Murphy <christian.murphy.42@gmail.com>

Co-authored-by: Junyoung Choi <fluke8259@gmail.com>
Co-authored-by: Christian Murphy <christian.murphy.42@gmail.com>
@wooorm wooorm added ☂️ area/types This affects typings ⛵️ status/released 🐛 type/bug This is a problem 👶 semver/patch This is a backwards-compatible fix labels Aug 10, 2019
@wooorm wooorm added the 💪 phase/solved Post is done label May 20, 2021
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 👶 semver/patch This is a backwards-compatible fix 🐛 type/bug This is a problem
Development

Successfully merging this pull request may close these issues.

Stop allowing extraSettings
4 participants