diff --git a/snippets/vue-script.json b/snippets/vue-script.json index 8ebce00..0aa4695 100644 --- a/snippets/vue-script.json +++ b/snippets/vue-script.json @@ -321,14 +321,26 @@ "prefix": "v3emits", "body": [ "interface Emits {", - "\t(e: 'change', id: number): void", - "\t(e: 'update', value: string): void", + "\tfoo: [id: number]", + "\tbar: [name: string, ...rest: any[]]", "}", "", "const emit = defineEmits()" ], "description": "Vue Composition api - defineEmits with Interface" }, + "Vue Composition API - defineSlots with Interface": { + "prefix": "v3slots", + "body": [ + "interface Slots {", + "\tdefault?: (props: { msg: string }) => any", + "\titem?: (props: { id: number }) => any", + "}", + "", + "const slots = defineSlots()" + ], + "description": "Vue Composition api - defineEmits with Interface" + }, "Vue Composition API - Store using Provide / Inject": { "prefix": "v3store", "body": [ diff --git a/snippets/vue.json b/snippets/vue.json index d7c3e61..7068a76 100644 --- a/snippets/vue.json +++ b/snippets/vue.json @@ -285,6 +285,28 @@ ], "description": "Base for Vue File Setup Composition API - Typescript" }, + "Vue Single File Generic Component": { + "prefix": "vbase-3-generic", + "body": [ + "", + "", + "", + "", + "" + ] + }, "Vue Single File Component with Class based Typescript format": { "prefix": "vbase-ts-class", "body": [