-
Notifications
You must be signed in to change notification settings - Fork 0
/
typescript.json
62 lines (62 loc) · 1.27 KB
/
typescript.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{
"DCI Context": {
"prefix": ["context", "dci"],
"body": [
"/**",
" * @DCI-context",
" * Ctrl+K Ctrl+8 folds all Roles.",
" * Ctrl+K Ctrl+- folds all Roles except the current.",
" */",
"function ${1:ContextName}(${2:FirstRole}) {",
" //#region Context state /////",
"",
" const Context = {}",
"",
" //#endregion",
"",
" //#region $2 /////",
"",
" function $2_method() {",
" // Access $2 here",
" $3_method()",
" }",
"",
" //#endregion",
"",
" //#region ${3:SecondRole} /////",
"",
" const $3 = {}",
"",
" function $3_method() {",
" // Access $3 here",
" }",
"",
" //#endregion",
"",
" return {",
" start: () => {",
" $2_method()",
" }",
" }",
"}"
]
},
"DCI Role": {
"prefix": ["role"],
"body": [
"//#region ${1:NewRole} /////",
"",
"const $1 = {}",
"",
"function $1_method() {",
" // Access $1 here",
"}",
"",
"//#endregion"
]
},
"DCI RoleMethod": {
"prefix": ["rm", "rolemethod"],
"body": ["function ${1:Role}_${2:method}() {", " $0", "}"]
}
}