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

next-plugin: add types to plugin config #912

Merged
merged 2 commits into from
Apr 4, 2023
Merged

next-plugin: add types to plugin config #912

merged 2 commits into from
Apr 4, 2023

Conversation

nix6839
Copy link
Contributor

@nix6839 nix6839 commented Nov 12, 2022

Next plugin doesn't currently have d.ts file. So user can't use intellisense for options. This PR provides that.

@changeset-bot
Copy link

changeset-bot bot commented Nov 12, 2022

🦋 Changeset detected

Latest commit: 68ae8aa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@vanilla-extract/next-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@graup
Copy link
Collaborator

graup commented Apr 3, 2023

Hi @nix6839! 👋

Is adding @vanilla-extract/integration as a dependency just for the type really necessary? Maybe it would it be possible to pull out the type for the plugin options from the plugin, e.g. something like

type PluginOptions = ConstructorParameters<VanillaExtractPlugin>[0];

This way, we don't create another type to maintain. Could you test if that works?

.changeset/good-cats-boil.md Outdated Show resolved Hide resolved
@nix6839 nix6839 changed the title next-plugin: provide intellisense for user next-plugin: add types to next plugin configu Apr 3, 2023
@nix6839 nix6839 changed the title next-plugin: add types to next plugin configu next-plugin: add types to next plugin config Apr 3, 2023
@nix6839 nix6839 changed the title next-plugin: add types to next plugin config next-plugin: add types to plugin config Apr 3, 2023
nix6839 and others added 2 commits April 3, 2023 16:48
Co-authored-by: Paul Grau <graup@users.noreply.github.com>
@nix6839 nix6839 requested a review from graup April 3, 2023 07:54
Copy link
Collaborator

@graup graup left a comment

Choose a reason for hiding this comment

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

LGTM

@mattcompiles mattcompiles merged commit 9cefba8 into vanilla-extract-css:master Apr 4, 2023
4 checks passed
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.

None yet

3 participants