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

[FR] Function style declaration of defineEmits #8595

Closed
wenfangdu opened this issue Jun 17, 2023 · 1 comment
Closed

[FR] Function style declaration of defineEmits #8595

wenfangdu opened this issue Jun 17, 2023 · 1 comment
Labels
✨ feature request New feature or request

Comments

@wenfangdu
Copy link

What problem does this feature solve?

Now that tuple style declaration is supported, can we also add function style declaration? It's closer to how we write defineProps<T>(), and unlike tuple labels, the arguments have to be named, therefore more constraints.

What does the proposed API look like?

const emit = defineEmits<{
  update(val: string): void
}>()
@wenfangdu wenfangdu added the ✨ feature request New feature or request label Jun 17, 2023
@yyx990803
Copy link
Member

This has been discussed in the RFC repo: vuejs/rfcs#500

@github-actions github-actions bot locked and limited conversation to collaborators Sep 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
✨ feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants