|
1 | 1 | {
|
2 | 2 | "Constructor": {
|
3 | 3 | "prefix": "ctor",
|
4 |
| - "body": ["/**", " *", " */", "constructor() {", "\tsuper();", "\t$0", "}"], |
| 4 | + "body": [ |
| 5 | + "/**", |
| 6 | + " *", |
| 7 | + " */", |
| 8 | + "constructor() {", |
| 9 | + "\tsuper();", |
| 10 | + "\t$0", |
| 11 | + "}" |
| 12 | + ], |
5 | 13 | "description": "Constructor"
|
6 | 14 | },
|
7 | 15 | "Class Definition": {
|
|
17 | 25 | },
|
18 | 26 | "Public Method Definition": {
|
19 | 27 | "prefix": "public method",
|
20 |
| - "body": ["/**", " * ${1:name}", " */", "public ${1:name}() {", "\t$0", "}"], |
| 28 | + "body": [ |
| 29 | + "/**", |
| 30 | + " * ${1:name}", |
| 31 | + " */", |
| 32 | + "public ${1:name}() {", |
| 33 | + "\t$0", |
| 34 | + "}" |
| 35 | + ], |
21 | 36 | "description": "Public Method Definition"
|
22 | 37 | },
|
23 | 38 | "Private Method Definition": {
|
24 | 39 | "prefix": "private method",
|
25 |
| - "body": ["private ${1:name}() {", "\t$0", "}"], |
| 40 | + "body": [ |
| 41 | + "private ${1:name}() {", |
| 42 | + "\t$0", |
| 43 | + "}" |
| 44 | + ], |
26 | 45 | "description": "Private Method Definition"
|
27 | 46 | },
|
28 | 47 | "Import external module.": {
|
29 | 48 | "prefix": "import statement",
|
30 |
| - "body": ["import { $0 } from \"${1:module}\";"], |
| 49 | + "body": [ |
| 50 | + "import { $0 } from \"${1:module}\";" |
| 51 | + ], |
31 | 52 | "description": "Import external module."
|
32 | 53 | },
|
33 | 54 | "Property getter": {
|
|
43 | 64 | },
|
44 | 65 | "Log to the console": {
|
45 | 66 | "prefix": "log",
|
46 |
| - "body": ["console.log($1);", "$0"], |
| 67 | + "body": [ |
| 68 | + "console.log($1);", |
| 69 | + "$0" |
| 70 | + ], |
47 | 71 | "description": "Log to the console"
|
48 | 72 | },
|
49 | 73 | "Log warning to console": {
|
50 | 74 | "prefix": "warn",
|
51 |
| - "body": ["console.warn($1);", "$0"], |
| 75 | + "body": [ |
| 76 | + "console.warn($1);", |
| 77 | + "$0" |
| 78 | + ], |
52 | 79 | "description": "Log warning to the console"
|
53 | 80 | },
|
54 | 81 | "Log error to console": {
|
55 | 82 | "prefix": "error",
|
56 |
| - "body": ["console.error($1);", "$0"], |
| 83 | + "body": [ |
| 84 | + "console.error($1);", |
| 85 | + "$0" |
| 86 | + ], |
57 | 87 | "description": "Log error to the console"
|
58 | 88 | },
|
59 | 89 | "Define a full property": {
|
|
73 | 103 | },
|
74 | 104 | "Triple-slash reference": {
|
75 | 105 | "prefix": "ref",
|
76 |
| - "body": ["/// <reference path=\"$1\" />", "$0"], |
| 106 | + "body": [ |
| 107 | + "/// <reference path=\"$1\" />", |
| 108 | + "$0" |
| 109 | + ], |
77 | 110 | "description": "Triple-slash reference"
|
78 | 111 | },
|
79 | 112 | "Property setter": {
|
|
89 | 122 | },
|
90 | 123 | "Throw Exception": {
|
91 | 124 | "prefix": "throw",
|
92 |
| - "body": ["throw \"$1\";", "$0"], |
| 125 | + "body": [ |
| 126 | + "throw \"$1\";", |
| 127 | + "$0" |
| 128 | + ], |
93 | 129 | "description": "Throw Exception"
|
94 | 130 | },
|
95 | 131 | "For Loop": {
|
|
104 | 140 | },
|
105 | 141 | "For-Each Loop using =>": {
|
106 | 142 | "prefix": "foreach =>",
|
107 |
| - "body": ["${1:array}.forEach(${2:element} => {", "\t$0", "});"], |
| 143 | + "body": [ |
| 144 | + "${1:array}.forEach(${2:element} => {", |
| 145 | + "\t$0", |
| 146 | + "});" |
| 147 | + ], |
108 | 148 | "description": "For-Each Loop using =>"
|
109 | 149 | },
|
110 | 150 | "For-In Loop": {
|
|
121 | 161 | },
|
122 | 162 | "For-Of Loop": {
|
123 | 163 | "prefix": "forof",
|
124 |
| - "body": ["for (const ${1:iterator} of ${2:object}) {", "\t$0", "}"], |
| 164 | + "body": [ |
| 165 | + "for (const ${1:iterator} of ${2:object}) {", |
| 166 | + "\t$0", |
| 167 | + "}" |
| 168 | + ], |
125 | 169 | "description": "For-Of Loop"
|
126 | 170 | },
|
127 | 171 | "Function Statement": {
|
128 | 172 | "prefix": "function",
|
129 |
| - "body": ["function ${1:name}(${2:params}:${3:type}) {", "\t$0", "}"], |
| 173 | + "body": [ |
| 174 | + "function ${1:name}(${2:params}:${3:type}) {", |
| 175 | + "\t$0", |
| 176 | + "}" |
| 177 | + ], |
130 | 178 | "description": "Function Statement"
|
131 | 179 | },
|
132 | 180 | "If Statement": {
|
133 | 181 | "prefix": "if",
|
134 |
| - "body": ["if (${1:condition}) {", "\t$0", "}"], |
| 182 | + "body": [ |
| 183 | + "if (${1:condition}) {", |
| 184 | + "\t$0", |
| 185 | + "}" |
| 186 | + ], |
135 | 187 | "description": "If Statement"
|
136 | 188 | },
|
137 | 189 | "If-Else Statement": {
|
138 | 190 | "prefix": "ifelse",
|
139 |
| - "body": ["if (${1:condition}) {", "\t$0", "} else {", "\t", "}"], |
| 191 | + "body": [ |
| 192 | + "if (${1:condition}) {", |
| 193 | + "\t$0", |
| 194 | + "} else {", |
| 195 | + "\t", |
| 196 | + "}" |
| 197 | + ], |
140 | 198 | "description": "If-Else Statement"
|
141 | 199 | },
|
142 | 200 | "New Statement": {
|
143 | 201 | "prefix": "new",
|
144 |
| - "body": ["const ${1:name} = new ${2:type}(${3:arguments});$0"], |
| 202 | + "body": [ |
| 203 | + "const ${1:name} = new ${2:type}(${3:arguments});$0" |
| 204 | + ], |
145 | 205 | "description": "New Statement"
|
146 | 206 | },
|
147 | 207 | "Switch Statement": {
|
|
160 | 220 | },
|
161 | 221 | "While Statement": {
|
162 | 222 | "prefix": "while",
|
163 |
| - "body": ["while (${1:condition}) {", "\t$0", "}"], |
| 223 | + "body": [ |
| 224 | + "while (${1:condition}) {", |
| 225 | + "\t$0", |
| 226 | + "}" |
| 227 | + ], |
164 | 228 | "description": "While Statement"
|
165 | 229 | },
|
166 | 230 | "Do-While Statement": {
|
167 | 231 | "prefix": "dowhile",
|
168 |
| - "body": ["do {", "\t$0", "} while (${1:condition});"], |
| 232 | + "body": [ |
| 233 | + "do {", |
| 234 | + "\t$0", |
| 235 | + "} while (${1:condition});" |
| 236 | + ], |
169 | 237 | "description": "Do-While Statement"
|
170 | 238 | },
|
171 | 239 | "Try-Catch Statement": {
|
172 | 240 | "prefix": "trycatch",
|
173 |
| - "body": ["try {", "\t$0", "} catch (${1:error}) {", "\t", "}"], |
| 241 | + "body": [ |
| 242 | + "try {", |
| 243 | + "\t$0", |
| 244 | + "} catch (${1:error}) {", |
| 245 | + "\t", |
| 246 | + "}" |
| 247 | + ], |
174 | 248 | "description": "Try-Catch Statement"
|
175 | 249 | },
|
176 | 250 | "Set Timeout Function": {
|
177 | 251 | "prefix": "settimeout",
|
178 |
| - "body": ["setTimeout(() => {", "\t$0", "}, ${1:timeout});"], |
| 252 | + "body": [ |
| 253 | + "setTimeout(() => {", |
| 254 | + "\t$0", |
| 255 | + "}, ${1:timeout});" |
| 256 | + ], |
179 | 257 | "description": "Set Timeout Function"
|
180 | 258 | },
|
181 | 259 | "Region Start": {
|
182 | 260 | "prefix": "#region",
|
183 |
| - "body": ["//#region $0"], |
| 261 | + "body": [ |
| 262 | + "//#region $0" |
| 263 | + ], |
184 | 264 | "description": "Folding Region Start"
|
185 | 265 | },
|
186 | 266 | "Region End": {
|
187 | 267 | "prefix": "#endregion",
|
188 |
| - "body": ["//#endregion"], |
| 268 | + "body": [ |
| 269 | + "//#endregion" |
| 270 | + ], |
189 | 271 | "description": "Folding Region End"
|
190 | 272 | }
|
191 | 273 | }
|
0 commit comments