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

fix(types): add declaration for vuetify/lib/components #13395

Merged
merged 1 commit into from
Jun 13, 2021

Conversation

Djaler
Copy link
Contributor

@Djaler Djaler commented Apr 8, 2021

Description

Vuetify has separated declare module for vuetify/lib/directives. This add vuetify/lib/components too.

Motivation and Context

Now we can do something like import * as VuetifyComponents from 'vuetify/lib/components'; without typescript errors.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement/refactoring (non-breaking change that doesn't add any features but makes things better)

Checklist:

  • The PR title is no longer than 64 characters.
  • The PR is submitted to the correct branch (master for bug fixes and documentation updates, dev for new features and backwards compatible changes and next for non-backwards compatible changes).
  • My code follows the code style of this project.
  • I've added relevant changes to the documentation (applies to new features and breaking changes in core library)

@jacekkarczmarczyk
Copy link
Member

jacekkarczmarczyk commented Apr 20, 2021

I think it looks ok but not sure what is the best way to test it, after adding this to node_modules/vuetify/types/lib.d.ts i still have ts error (both in IDE and during compilation)
Also the components list was updated (#13409) so should be updated in this PR as well

EDIT: is there maybe a way to reexport if from vuetify/lib module instead of repeating everything?

@Djaler
Copy link
Contributor Author

Djaler commented Jun 11, 2021

Yeah, I'm able to reexport them (but still need to list them all.
We can make it vice versa - declare types in vuetify/lib/components and vuetify/lib/directives and then just do

export * from 'vuetify/lib/components'
export * from 'vuetify/lib/directives'

in vuetify/lib module.
What do you think about it? @johnleider @jacekkarczmarczyk

@jacekkarczmarczyk
Copy link
Member

Sounds good for me

@Djaler
Copy link
Contributor Author

Djaler commented Jun 11, 2021

So here it is

@KaelWD KaelWD removed the S: triage label Jun 13, 2021
@KaelWD KaelWD changed the title fix: add types declaration for vuetify/lib/components fix(types): add declaration for vuetify/lib/components Jun 13, 2021
@KaelWD KaelWD merged commit d8a6cff into vuetifyjs:master Jun 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants