-
-
Notifications
You must be signed in to change notification settings - Fork 600
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
feat(dsv,dynamic-import-vars,image,legacy,multi-entry,strip,sucrase,url,yaml): add missing typings #898
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend making the options parameter optional because this will result in an TS error if no own configuration or an empty object is set inside the plugin function.
--- ERROR
plugins: [url()]
--- PASS
plugins: [url({})]
Since a few of the official plugins are using no option parameters in their examples
(url or multi as example) & having unnecessary empty objects just to "fix" typing errors, i think it's better to let the user decide if they want to declare additional options.
Of course, why didn't I think of that |
Thanks for putting in this work. While I haven't had a chance to look it over (yet. I will) I did want to pop in and mention that this will force me to finally get around to improving our publish-release pipeline so it can handle more than one plugin per Pull Request. It'll probably be a week or so, so don't be discouraged if your PR sits for a bit. |
Hm, didn't think you could test types, but I'll look into it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to leave out the files that only have lint changes. I'll double check and see if CI passes without it.
This is awesome! I use TS for my config so this really helps. |
@Luke-zhang-04 the repo is now prepared for automatic publishing, and handling more than one plugin per commit. however, it required some refactoring, which has caused conflicts with your branch. could you please pull from upstream/master and resolve the conflicts in your branch? |
486cc69
to
34ba4ce
Compare
Rollup Plugin Name: dsv, dynamic-import-vars, image, legacy, multi-entry, strip, sucrase, url, yaml
This PR contains:
Are tests included?
Breaking Changes?
Description
Adds typings for plugins which were missing them, including dsv, dynamic-import-vars, image, legacy, multi-entry, strip, sucrase, url, and yaml.