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(ts): Introduce Volar support and event types #10839

Conversation

yusufkandemir
Copy link
Member

What kind of change does this PR introduce?

  • Type support improvements

Does this PR introduce a breaking change?

  • No

The PR fulfills these requirements:

  • It's submitted to the dev branch

Other information:

I added some logic to provide components to the GlobalComponents interface in @vue/runtime-core. This is mainly for Volar support ATM, but it will soon be shipped officially(vuejs/core#3399), so it could become even more useful. Also, I extracted props definitions to separate interfaces, it's nice for reusability(h(), TSX, or extending components), it's a really common practice in Vue's and its official packages(e.g. vue-router) source code. (e.g. https://github.com/vuejs/vue-router-next/blob/5dd5f47515186ce34efb9118dda5aad0bb773439/src/RouterView.ts#L31-L35)

Screenshots

Component name auto completion:
image

Props auto completion:
image

Prop types and description:
image

Required prop missing errors:
image

Event auto completion:
image

Event description and payload types:
image

See #10619

…initions as separate interfaces

These changes aims to improve Volar support and increase the reusability of types
@IlCallo IlCallo merged commit 76c0c84 into quasarframework:dev Sep 29, 2021
@soulsam480
Copy link
Contributor

@yusufkandemir Hey, is it inside the latest release ?

@yusufkandemir yusufkandemir deleted the feat-ts-add-volar-support-and-handle-event-types branch October 6, 2021 04:22
@yusufkandemir
Copy link
Member Author

@soulsam480 we haven't released it yet. But it will be on the next release of the quasar package.

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.

3 participants