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

Error in VueJS defineEmitsTS snippet #475

Open
Haerezis opened this issue Jul 8, 2024 · 0 comments
Open

Error in VueJS defineEmitsTS snippet #475

Haerezis opened this issue Jul 8, 2024 · 0 comments
Labels
good first issue Good for newcomers

Comments

@Haerezis
Copy link

Haerezis commented Jul 8, 2024

Hello,

Maybe i'm mistaken but it seems to me like there's an error in the snippet defineEmitsTS.

Currently, you have :

      "const ${1:emit} = defineEmits<{",
      "\t(e: '${2:event}', ${3:id}: ${4:type}: ${5:type}) ",
      "\t$0",
      "}>()"

The problem is the ": ${5:type}" :

the line should be IMO like this :

      "\t(e: '${2:event}', ${3:id}: ${4:type}): void ",

I've removed the incorrect portion, and added a ": void" to complete the function signature (if not, typescript throw a 7020 error) for an implicit "any" return type)

Thanks in advance !

@OkelleyDevelopment OkelleyDevelopment added the good first issue Good for newcomers label Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants