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

Add better type hints to generics defineComponent #9912

Closed
aibayanyu20 opened this issue Dec 25, 2023 · 1 comment
Closed

Add better type hints to generics defineComponent #9912

aibayanyu20 opened this issue Dec 25, 2023 · 1 comment

Comments

@aibayanyu20
Copy link

Vue version

3.3.13

Link to minimal reproduction

#7963

Steps to reproduce

  • Use defineComponent to write vue components
  • The first parameter uses functional programming
  • Compile using vue-tsc

What is expected?

Unable to support type hints for slots, events and generics

What is actually happening?

Hope to support slots, events and generic type hints
The final compiled type is:

(props:Type) => any

There is no way to provide corresponding prompts when using it in vue.

Or is there a better way to support it?

System Info

No response

Any additional comments?

No response

@pikax
Copy link
Member

pikax commented Dec 28, 2023

@aibayanyu20 The link to minimal reproduction is an PR, please provide exactly what issue you're having, since there's no reproduction there.

@pikax pikax closed this as completed Dec 28, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants