aboutsummaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
Diffstat (limited to 'template')
-rw-r--r--template/typescript/base-class.ts5
-rw-r--r--template/typescript/snip-class.ts5
-rw-r--r--template/typescript/snip-ctor.ts7
-rw-r--r--template/typescript/snip-dowhile.ts3
-rw-r--r--template/typescript/snip-endregion.ts1
-rw-r--r--template/typescript/snip-error.ts1
-rw-r--r--template/typescript/snip-for.ts4
-rw-r--r--template/typescript/snip-foreach-lambda.ts3
-rw-r--r--template/typescript/snip-forin.ts6
-rw-r--r--template/typescript/snip-forof.ts3
-rw-r--r--template/typescript/snip-function.ts3
-rw-r--r--template/typescript/snip-get.ts5
-rw-r--r--template/typescript/snip-if.ts3
-rw-r--r--template/typescript/snip-ifelse.ts5
-rw-r--r--template/typescript/snip-import-statement.ts1
-rw-r--r--template/typescript/snip-log.ts1
-rw-r--r--template/typescript/snip-new.ts1
-rw-r--r--template/typescript/snip-private-method.ts3
-rw-r--r--template/typescript/snip-prop.ts9
-rw-r--r--template/typescript/snip-public-method.ts6
-rw-r--r--template/typescript/snip-ref.ts1
-rw-r--r--template/typescript/snip-region.ts1
-rw-r--r--template/typescript/snip-set.ts5
-rw-r--r--template/typescript/snip-settimeout.ts3
-rw-r--r--template/typescript/snip-switch.ts8
-rw-r--r--template/typescript/snip-throw.ts1
-rw-r--r--template/typescript/snip-trycatch.ts5
-rw-r--r--template/typescript/snip-warn.ts1
-rw-r--r--template/typescript/snip-while.ts3
29 files changed, 103 insertions, 0 deletions
diff --git a/template/typescript/base-class.ts b/template/typescript/base-class.ts
new file mode 100644
index 0000000..f6acef4
--- /dev/null
+++ b/template/typescript/base-class.ts
@@ -0,0 +1,5 @@
+class {{_input_:name}} {
+ constructor({{_input_:parameters}}) {
+ {{_cursor_}}
+ }
+}
diff --git a/template/typescript/snip-class.ts b/template/typescript/snip-class.ts
new file mode 100644
index 0000000..f6acef4
--- /dev/null
+++ b/template/typescript/snip-class.ts
@@ -0,0 +1,5 @@
+class {{_input_:name}} {
+ constructor({{_input_:parameters}}) {
+ {{_cursor_}}
+ }
+}
diff --git a/template/typescript/snip-ctor.ts b/template/typescript/snip-ctor.ts
new file mode 100644
index 0000000..f77e911
--- /dev/null
+++ b/template/typescript/snip-ctor.ts
@@ -0,0 +1,7 @@
+/**
+ *
+ */
+constructor() {
+ super();
+ {{_cursor_}}
+}
diff --git a/template/typescript/snip-dowhile.ts b/template/typescript/snip-dowhile.ts
new file mode 100644
index 0000000..b9c2ac9
--- /dev/null
+++ b/template/typescript/snip-dowhile.ts
@@ -0,0 +1,3 @@
+do {
+ {{_cursor_}}
+} while ({{_input_:condition}});
diff --git a/template/typescript/snip-endregion.ts b/template/typescript/snip-endregion.ts
new file mode 100644
index 0000000..56ce7f5
--- /dev/null
+++ b/template/typescript/snip-endregion.ts
@@ -0,0 +1 @@
+//#endregion
diff --git a/template/typescript/snip-error.ts b/template/typescript/snip-error.ts
new file mode 100644
index 0000000..a520e5b
--- /dev/null
+++ b/template/typescript/snip-error.ts
@@ -0,0 +1 @@
+console.error({{_cursor_}});
diff --git a/template/typescript/snip-for.ts b/template/typescript/snip-for.ts
new file mode 100644
index 0000000..275290b
--- /dev/null
+++ b/template/typescript/snip-for.ts
@@ -0,0 +1,4 @@
+for (let {{_input_:index}} = 0; {{_input_:index}} < {{_input_:array}}.length; {{_input_:index}}++) {
+ const {{_input_:element}} = {{_input_:array}}[{{_input_:index}}];
+ {{_cursor_}}
+}
diff --git a/template/typescript/snip-foreach-lambda.ts b/template/typescript/snip-foreach-lambda.ts
new file mode 100644
index 0000000..5c3ed8a
--- /dev/null
+++ b/template/typescript/snip-foreach-lambda.ts
@@ -0,0 +1,3 @@
+{{_input_:array}}.forEach({{_input_:element}} => {
+ {{_cursor_}}
+});
diff --git a/template/typescript/snip-forin.ts b/template/typescript/snip-forin.ts
new file mode 100644
index 0000000..44ec674
--- /dev/null
+++ b/template/typescript/snip-forin.ts
@@ -0,0 +1,6 @@
+for (const {{_input_:key}} in {{_input_:object}}) {
+ if ({{_input_:object}}.hasOwnProperty({{_input_:key}})) {
+ const {{_input_:element}} = {{_input_:object}}[{{_input_:key}}];
+ {{_cursor_}}
+ }
+}
diff --git a/template/typescript/snip-forof.ts b/template/typescript/snip-forof.ts
new file mode 100644
index 0000000..70d6432
--- /dev/null
+++ b/template/typescript/snip-forof.ts
@@ -0,0 +1,3 @@
+for (const {{_input_:iterator}} of {{_input_:object}}) {
+ {{_cursor_}}
+}
diff --git a/template/typescript/snip-function.ts b/template/typescript/snip-function.ts
new file mode 100644
index 0000000..efe355d
--- /dev/null
+++ b/template/typescript/snip-function.ts
@@ -0,0 +1,3 @@
+function {{_input_:name}}({{_input_:params}}:{{_input_:type}}) {
+ {{_cursor_}}
+}
diff --git a/template/typescript/snip-get.ts b/template/typescript/snip-get.ts
new file mode 100644
index 0000000..12fce22
--- /dev/null
+++ b/template/typescript/snip-get.ts
@@ -0,0 +1,5 @@
+
+public get {{_input_:value}}() : {{_input_:string}} {
+ {{_input_:return {{_cursor_}}}}
+}
+
diff --git a/template/typescript/snip-if.ts b/template/typescript/snip-if.ts
new file mode 100644
index 0000000..8c0c27a
--- /dev/null
+++ b/template/typescript/snip-if.ts
@@ -0,0 +1,3 @@
+if ({{_input_:condition}}) {
+ {{_cursor_}}
+}
diff --git a/template/typescript/snip-ifelse.ts b/template/typescript/snip-ifelse.ts
new file mode 100644
index 0000000..7df2562
--- /dev/null
+++ b/template/typescript/snip-ifelse.ts
@@ -0,0 +1,5 @@
+if ({{_input_:condition}}) {
+ {{_cursor_}}
+} else {
+
+}
diff --git a/template/typescript/snip-import-statement.ts b/template/typescript/snip-import-statement.ts
new file mode 100644
index 0000000..fbf67d0
--- /dev/null
+++ b/template/typescript/snip-import-statement.ts
@@ -0,0 +1 @@
+import { {{_cursor_}} } from "{{_input_:module}}";
diff --git a/template/typescript/snip-log.ts b/template/typescript/snip-log.ts
new file mode 100644
index 0000000..dbd5b94
--- /dev/null
+++ b/template/typescript/snip-log.ts
@@ -0,0 +1 @@
+console.log({{_cursor_}});
diff --git a/template/typescript/snip-new.ts b/template/typescript/snip-new.ts
new file mode 100644
index 0000000..0a4c8ea
--- /dev/null
+++ b/template/typescript/snip-new.ts
@@ -0,0 +1 @@
+const {{_input_:name}} = new {{_input_:type}}({{_input_:arguments}});{{_cursor_}}
diff --git a/template/typescript/snip-private-method.ts b/template/typescript/snip-private-method.ts
new file mode 100644
index 0000000..f23dbb0
--- /dev/null
+++ b/template/typescript/snip-private-method.ts
@@ -0,0 +1,3 @@
+private {{_input_:name}}() {
+ {{_cursor_}}
+}
diff --git a/template/typescript/snip-prop.ts b/template/typescript/snip-prop.ts
new file mode 100644
index 0000000..7d8933e
--- /dev/null
+++ b/template/typescript/snip-prop.ts
@@ -0,0 +1,9 @@
+
+private _{{_input_:value}} : {{_input_:string}};
+public get {{_input_:value}}() : {{_input_:string}} {
+ return this._{{_input_:value}};
+}
+public set {{_input_:value}}(v : {{_input_:string}}) {
+ this._{{_input_:value}} = v;
+}
+
diff --git a/template/typescript/snip-public-method.ts b/template/typescript/snip-public-method.ts
new file mode 100644
index 0000000..7191874
--- /dev/null
+++ b/template/typescript/snip-public-method.ts
@@ -0,0 +1,6 @@
+/**
+ * {{_input_:name}}
+ */
+public {{_input_:name}}() {
+ {{_cursor_}}
+}
diff --git a/template/typescript/snip-ref.ts b/template/typescript/snip-ref.ts
new file mode 100644
index 0000000..83eee32
--- /dev/null
+++ b/template/typescript/snip-ref.ts
@@ -0,0 +1 @@
+/// <reference path="{{_cursor_}}" />
diff --git a/template/typescript/snip-region.ts b/template/typescript/snip-region.ts
new file mode 100644
index 0000000..45bd931
--- /dev/null
+++ b/template/typescript/snip-region.ts
@@ -0,0 +1 @@
+//#region {{_cursor_}}
diff --git a/template/typescript/snip-set.ts b/template/typescript/snip-set.ts
new file mode 100644
index 0000000..974dab1
--- /dev/null
+++ b/template/typescript/snip-set.ts
@@ -0,0 +1,5 @@
+
+public set {{_input_:value}}(v : {{_input_:string}}) {
+ this.{{_cursor_}} = v;
+}
+
diff --git a/template/typescript/snip-settimeout.ts b/template/typescript/snip-settimeout.ts
new file mode 100644
index 0000000..ee2c258
--- /dev/null
+++ b/template/typescript/snip-settimeout.ts
@@ -0,0 +1,3 @@
+setTimeout(() => {
+ {{_cursor_}}
+}, {{_input_:timeout}});
diff --git a/template/typescript/snip-switch.ts b/template/typescript/snip-switch.ts
new file mode 100644
index 0000000..625208e
--- /dev/null
+++ b/template/typescript/snip-switch.ts
@@ -0,0 +1,8 @@
+switch ({{_input_:key}}) {
+ case {{_input_:value}}:
+ {{_cursor_}}
+ break;
+
+ default:
+ break;
+}
diff --git a/template/typescript/snip-throw.ts b/template/typescript/snip-throw.ts
new file mode 100644
index 0000000..86ca9f6
--- /dev/null
+++ b/template/typescript/snip-throw.ts
@@ -0,0 +1 @@
+throw "{{_cursor_}}";
diff --git a/template/typescript/snip-trycatch.ts b/template/typescript/snip-trycatch.ts
new file mode 100644
index 0000000..9d8b2de
--- /dev/null
+++ b/template/typescript/snip-trycatch.ts
@@ -0,0 +1,5 @@
+try {
+ {{_cursor_}}
+} catch ({{_input_:error}}) {
+
+}
diff --git a/template/typescript/snip-warn.ts b/template/typescript/snip-warn.ts
new file mode 100644
index 0000000..213eecc
--- /dev/null
+++ b/template/typescript/snip-warn.ts
@@ -0,0 +1 @@
+console.warn({{_cursor_}});
diff --git a/template/typescript/snip-while.ts b/template/typescript/snip-while.ts
new file mode 100644
index 0000000..55d9298
--- /dev/null
+++ b/template/typescript/snip-while.ts
@@ -0,0 +1,3 @@
+while ({{_input_:condition}}) {
+ {{_cursor_}}
+}