Skip to content

Instantly share code, notes, and snippets.

@danielkellyio
Created March 9, 2022 20:51
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save danielkellyio/773d37ccc89ba069d650dcca09b402a1 to your computer and use it in GitHub Desktop.
Save danielkellyio/773d37ccc89ba069d650dcca09b402a1 to your computer and use it in GitHub Desktop.
Vue/TS defineEmits VS Code Snippet
{
"Vue defineEmits":{
"prefix": "defineEmits",
"body" : [
"defineEmits<{",
" (e: \"${1:event}\", ${2:payload}: { $3 }): void;",
"}>();",
],
"description": "defineEmits type declaration for Vue.js components"
},
}
@danielkellyio
Copy link
Author

Instructions for Use

  • Run VS Code Command "Preferences: Configure User Snippets"
  • Choose TypeScript from menu
  • Add snippet to typescript.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment