We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The original snippet was:
@change="emit('change', event.target.value)"
I guess you are trying to type $emit but the $ was recognized as a symbol for placeholder. You can use \\$ in the snippet body instead.
$emit
$
\\$
The text was updated successfully, but these errors were encountered:
This is correct syntax. In Vue 3 you can define emits with the defineEmits compiler macro. E.g.:
defineEmits
<script setup lang="ts"> const emit = defineEmits<{ (event: 'eventName', id: string): void }>() </script> <template> <button @click="emit('eventName', 'abc')" /> </template>
You can find more information here: https://vuejs.org/guide/typescript/composition-api.html#typing-component-emits I would keep it this way, as $emit would probably only be used with the options API that is not the recommended default anymore with Vue 3.
Sorry, something went wrong.
No branches or pull requests
The original snippet was:
I guess you are trying to type
$emit
but the$
was recognized as a symbol for placeholder. You can use\\$
in the snippet body instead.The text was updated successfully, but these errors were encountered: