vuejs / docs

πŸ“„ Documentation for Vue 3
https://vuejs.org
Other
2.81k stars 4.1k forks source link

πŸ’¬ Fix syntax error in defineEmits example #2809

Closed phillt closed 1 month ago

phillt commented 1 month ago

Description of Problem

Current documentation of Type-only props/emit declarations has a syntax error in the type parameters of defineEmits. It is missing a semi colon.

image

Proposed Solution

Add missing semi colon: image

Additional Information

N/A

netlify[bot] commented 1 month ago

Deploy Preview for vuejs ready!

Name Link
Latest commit 10f700ad3201e1e635c65580af1e9e75568c9124
Latest deploy log https://app.netlify.com/sites/vuejs/deploys/662178126e8dc30008a21794
Deploy Preview https://deploy-preview-2809--vuejs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

brc-dd commented 1 month ago

semi colon is not required there. It’s valid syntax.

phillt commented 4 weeks ago

compiler throws errors, are you sure? Perhaps the error is within the bundler and not the docs.

On Thu, Apr 18, 2024 at 12:53β€―PM Divyansh Singh @.***> wrote:

semi colon is not required there. It’s valid syntax.

β€” Reply to this email directly, view it on GitHub https://github.com/vuejs/docs/pull/2809#issuecomment-2065140450, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATXSOMH3S4DGMPWZ2BDIZDY6AQCFAVCNFSM6AAAAABGN5J2MKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRVGE2DANBVGA . You are receiving this because you authored the thread.Message ID: @.***>

brc-dd commented 4 weeks ago

You might not have specified lang="ts" on script block.

phillt commented 4 weeks ago

image

phillt commented 4 weeks ago

image

phillt commented 4 weeks ago

In all fairness, there could be something wrong with my setup.

phillt commented 4 weeks ago

If it's on my end, it's not that big of a deal. But I just wanted to make sure the docs were good. Thanks for taking the time to review.

brc-dd commented 4 weeks ago

You need newline there or comma or semi colon. The docs have newline. They are correct.

phillt commented 4 weeks ago

🀦🏻 the error is in me. What a twist. I didn't RTFM well. Thank you.

image