Conflicting documentation on how to define emits with typescript
Nobody has claimed this yet.
- Dominant language
- Vue
- Stars
- 3.2k
- Forks
- 5k
- Avg merge
- 14d 17h
- Merged PRs (30d)
- 1
Description
This is a follow-up to https://github.com/vuejs/core/issues/5696, see it for reference
What I was googling: "vue 3 define emits typescript"
This is the first result: vuejs.org/guide/typescript/composition-api.html
This is second: vuejs.org/guide/typescript/overview.html
And they don't have an example of usage with TSX that I was looking for. Instead, they misled me into using defineEmits() where I didn't need it.
I checked the first 5 pages, and the desired link isn't on any of them...
Another major confusion: the "Typing Component Emits" section here: vuejs.org/guide/typescript/composition-api.html#typing-component-emits is completely different from the section with exactly the same name here: vuejs.org/guide/typescript/options-api.html#typing-component-emits
Would be great to at least link these two sections with each other so that someone having the same query as I did would have slightest chance of finding desired info :) Thank you!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the “Typing Component Emits” sections in composition-api.html and options-api.html, then read the linked issue 5696 for context. Check how the TypeScript overview and Composition API pages guide readers toward emits usage. Done means the relevant sections cross-link clearly and the TSX-related guidance is discoverable without the current confusion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100