
"Print to console with variable": {
"scope": "typescript",
"prefix": "csLog",
"body": ["console.log('$1: ', $2)$0"],
"description": "Log output to console"
}
"If else": {
"scope": "typescript",
"prefix": "csIfElse",
"body": ["if ($1) {", "\t$2", "}", " else {", "\t$3", "}", "", "$0"],
"description": "If / else statement"
}"If": {
"scope": "typescript",
"prefix": "csIf",
"body": ["if ($1) {", "\t$0", "}"],
"description": "If statement"
}"Else": {
"scope": "typescript",
"prefix": "csElse",
"body": [" else $1{", "\t$0", "}"],
"description": "Else statement"
}"Property with a backing field": {
"scope": "typescript",
"prefix": "csProp",
"body": [
"private $1Private: $0",
"",
"public get $1(): $0 {",
"\treturn this.$1Private",
"}",
"",
"public set $1(value: $0) {",
"\tthis.$1Private = value",
"}"
],
"description": "Property with a backing field"
}"Field": {
"scope": "typescript",
"prefix": "csField",
"body": ["${1|private,public|} ${2:FieldName}${3|: boolean,: string|,: number|,: date|}"],
"description": "Field (class level)"
}"Constructor": {
"scope": "typescript",
"prefix": "csConstructor",
"body": ["constructor() {", "\tsuper()", "\t$0", "}"],
"description": "Constructor statement"
}"Export class": {
"scope": "typescript",
"prefix": "csClass",
"body": [
"/**",
" *",
" *",
" * @export",
" * @class $1",
" */",
"export class $1 {",
"\tconstructor() {",
"\t\t$0",
"\t}",
"",
"}"
],
"description": "Export class"
}"Import node module": {
"scope": "typescript",
"prefix": "csImport",
"body": ["import * as $2 from '$1'$0"],
"description": "Import node module"
}"For loop": {
"scope": "typescript",
"prefix": "csFor",
"body": ["for (let ${1:i} = 0; ${1:i} < $2; ${1:i}++) {", "\t$0", "}"],
"description": "For loop"
}"Method": {
"scope": "typescript",
"prefix": "csMethod",
"body": [
"${1|private,public|} ${2| ,async|} ${3:MethodName}($4)${5| ,: Promise|} {",
"\t$0",
"}"
],
"description": "Method"
} "Try / catch": {
"scope": "typescript",
"prefix": "csTryCatch",
"body": ["try {", "\t$1", "}", "catch (error) {", "\t$0", "}"],
"description": "Try / catch block"
}"Try / finally": {
"scope": "typescript",
"prefix": "csTryFinally",
"body": ["try {", "\t$1", "}", "finally {", "\t$0", "}"],
"description": "Try / finally"
}Designed to improve your software development life, this is a full list of our coding help pages.
There's more to assist you, with Git tips and best software development practices, on our resources page.

