10 "description": "Constructor"
16 "\tconstructor(${2:parameters}) {",
21 "description": "Class Definition"
23 "Public Method Definition": {
24 "prefix": "public method",
26 "public ${1:name}() {",
30 "description": "Public Method Definition"
32 "Private Method Definition": {
33 "prefix": "private method",
35 "private ${1:name}() {",
39 "description": "Private Method Definition"
41 "Import external module.": {
42 "prefix": "import statement",
44 "import {$0} from '${1:module}'"
46 "description": "Import external module."
51 "public get ${1:value}() : ${2:string} {",
55 "description": "Property getter"
57 "Log to the console": {
63 "description": "Log to the console"
65 "Log warning to console": {
71 "description": "Log warning to the console"
73 "Log error to console": {
79 "description": "Log error to the console"
81 "Define a full property": {
85 "private _${1:value} : ${2:string};",
86 "public get ${1:value}() : ${2:string} {",
87 "\treturn this._${1:value};",
89 "public set ${1:value}(v : ${2:string}) {",
90 "\tthis._${1:value} = v;",
94 "description": "Define a full property"
96 "Triple-slash reference": {
99 "/// <reference path=\"$1\" />",
102 "description": "Triple-slash reference"
108 "public set ${1:value}(v : ${2:string}) {",
113 "description": "Property setter"
121 "description": "Throw Exception"
126 "for (let ${1:index} = 0; ${1:index} < ${2:array}.length; ${1:index}++) {",
127 "\tconst ${3:element} = ${2:array}[${1:index}];",
131 "description": "For Loop"
133 "For-Each Loop using =>": {
134 "prefix": "foreach =>",
136 "${1:array}.forEach(${2:element} => {",
140 "description": "For-Each Loop using =>"
145 "for (const ${1:key} in ${2:object}) {",
146 "\tif (${2:object}.hasOwnProperty(${1:key})) {",
147 "\t\tconst ${3:element} = ${2:object}[${1:key}];",
152 "description": "For-In Loop"
157 "for (const ${1:iterator} of ${2:object}) {",
161 "description": "For-Of Loop"
163 "Function Statement": {
164 "prefix": "function",
166 "function ${1:name}(${2:params}:${3:type}) {",
170 "description": "Function Statement"
175 "if (${1:condition}) {",
179 "description": "If Statement"
181 "If-Else Statement": {
184 "if (${1:condition}) {",
190 "description": "If-Else Statement"
195 "const ${1:name} = new ${2:type}(${3:arguments});$0"
197 "description": "New Statement"
199 "Switch Statement": {
202 "switch (${1:key}) {",
203 "\tcase ${2:value}:",
211 "description": "Switch Statement"
216 "while (${1:condition}) {",
220 "description": "While Statement"
222 "Do-While Statement": {
227 "} while (${1:condition});"
229 "description": "Do-While Statement"
231 "Try-Catch Statement": {
232 "prefix": "trycatch",
236 "} catch (${1:error}) {",
240 "description": "Try-Catch Statement"
242 "Set Timeout Function": {
243 "prefix": "settimeout",
245 "setTimeout(() => {",
249 "description": "Set Timeout Function"
256 "description": "Folding Region Start"
259 "prefix": "#endregion",
263 "description": "Folding Region End"