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

feat(types): infer options in plugins #282

Merged
merged 2 commits into from
Dec 22, 2020

Conversation

posva
Copy link
Member

@posva posva commented Dec 22, 2020

Close #269

config.plugins.VueWrapper.install(PluginWithOptionalOptions2, { msg: 'hello' })

// FIXME: not sure if this one is possible
// expectError(config.plugins.VueWrapper.install(PluginWithoutOptions, {}))
Copy link
Member

Choose a reason for hiding this comment

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

I guess this is fine?
The FIXME needs to be removed before merging.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it's fine too but I thought I might have overlooked a way of doing it in TS. If there is nothing to fix, yeah, better remove it 😆

Copy link
Member

Choose a reason for hiding this comment

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

We could probably do something, but I'm not sure it's worth the time, the hassle and the maintenance cost 😉 Thanks for the PR!

test-dts/plugins.d-test.ts Outdated Show resolved Hide resolved
Copy link
Member

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

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

great, thanks!

@lmiller1990 lmiller1990 merged commit abe3be0 into master Dec 22, 2020
@lmiller1990 lmiller1990 deleted the feat/plugin-option-inferring branch December 22, 2020 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose typings for Plugins
3 participants