Skip to content

Conversation

zhiyuanzmj
Copy link
Member

image

@bolt-new-by-stackblitz
Copy link

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>

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.

2 participants