Skip to content

Commit cd1ef97

Browse files
committed
Add TS Class snippet
1 parent b74c537 commit cd1ef97

File tree

2 files changed

+38
-13
lines changed

2 files changed

+38
-13
lines changed

README.md

+13-12
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,19 @@ You can enable tab completion (recommended) by opening `Code > Preferences > Set
3232

3333
### Vue
3434

35-
| Snippet | Purpose |
36-
| ------------ | ----------------------------------------------------- |
37-
| `vbase` | Single file component base with SCSS |
38-
| `vbase-3` | Single File component Composition API with SCSS |
39-
| `vbase-css` | Single file component base with CSS |
40-
| `vbase-pcss` | Single file component base with PostCSS |
41-
| `vbase-styl` | Single file component base with Stylus |
42-
| `vbase-ts` | Single file component base with Typescript |
43-
| `vbase-3-ts` | Single File component Composition API with Typescript |
44-
| `vbase-ns` | Single file component with no styles |
45-
| `vbase-sass` | Single file component base with SASS |
46-
| `vbase-less` | Single file component base with LESS |
35+
| Snippet | Purpose |
36+
| ---------------- | ------------------------------------------------------- |
37+
| `vbase` | Single file component base with SCSS |
38+
| `vbase-3` | Single File component Composition API with SCSS |
39+
| `vbase-css` | Single file component base with CSS |
40+
| `vbase-pcss` | Single file component base with PostCSS |
41+
| `vbase-styl` | Single file component base with Stylus |
42+
| `vbase-ts` | Single file component base with Typescript |
43+
| `vbase-ts-class` | Single file component base with Typescript Class Format |
44+
| `vbase-3-ts` | Single File component Composition API with Typescript |
45+
| `vbase-ns` | Single file component with no styles |
46+
| `vbase-sass` | Single file component base with SASS |
47+
| `vbase-less` | Single file component base with LESS |
4748

4849
### Template
4950

snippets/vue.json

+25-1
Original file line numberDiff line numberDiff line change
@@ -215,5 +215,29 @@
215215
"</style>"
216216
],
217217
"description": "Base for Vue File Composition API - Typescript"
218-
}
218+
},
219+
"Vue Single File Component with Class based Typescript format": {
220+
"prefix": "vbase-ts-class",
221+
"body": [
222+
"<template>",
223+
"\t<div>",
224+
"",
225+
"\t</div>",
226+
"</template>",
227+
"",
228+
"<script lang=\"ts\">",
229+
"\timport { Component, Vue } from 'vue-property-decorator';",
230+
"",
231+
"\t@Component",
232+
"\texport default class ${0} extends Vue {",
233+
"\t\t",
234+
"\t}",
235+
"</script>",
236+
"",
237+
"<style scoped>",
238+
"",
239+
"</style>"
240+
],
241+
"description": "Base for Vue File with Class based Typescript format"
242+
}
219243
}

0 commit comments

Comments
 (0)