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(jsx-directive): add v-slot directive #463

Merged
merged 7 commits into from Aug 18, 2023

Conversation

zhiyuanzmj
Copy link
Member

image

@stackblitz
Copy link

stackblitz bot commented Aug 16, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@changeset-bot
Copy link

changeset-bot bot commented Aug 16, 2023

🦋 Changeset detected

Latest commit: f914611

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

This PR includes changesets to release 5 packages
Name Type
@vue-macros/jsx-directive Minor
@vue-macros/volar Patch
unplugin-vue-macros Patch
@vue-macros/nuxt Patch
@vue-macros/astro 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

@louiss0
Copy link

louiss0 commented Aug 16, 2023

I was wondering about the JSX. There is no type-safety for Object slots or events.

@zhiyuanzmj
Copy link
Member Author

I was wondering about the JSX. There is no type-safety for Object slots or events.

Volar does not handle jsx, You need to set as InstanceType<typeof Child['$slots'] } manually.

<Child>
{
 {
   bottom: (props)=> <div>{props}</div>
 } as InstanceType<typeof Child>['$slots']
}
</Child>

@zhiyuanzmj zhiyuanzmj merged commit 8ad8454 into vue-macros:main Aug 18, 2023
9 checks passed
@github-actions github-actions bot mentioned this pull request Aug 18, 2023
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

2 participants