@enjoys/context-engine 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/data/commands/adb.json +322 -0
  2. package/data/commands/alembic.json +301 -0
  3. package/data/commands/artisan.json +277 -0
  4. package/data/commands/atlas.json +426 -0
  5. package/data/commands/auth0.json +648 -0
  6. package/data/commands/bat.json +84 -0
  7. package/data/commands/bundle.json +321 -0
  8. package/data/commands/composer.json +507 -0
  9. package/data/commands/dart.json +216 -0
  10. package/data/commands/dbmate.json +257 -0
  11. package/data/commands/docker-compose.json +384 -0
  12. package/data/commands/drizzle-kit.json +217 -0
  13. package/data/commands/expo.json +65 -0
  14. package/data/commands/fastlane.json +243 -0
  15. package/data/commands/fd.json +86 -0
  16. package/data/commands/flutter.json +298 -0
  17. package/data/commands/flyway.json +261 -0
  18. package/data/commands/fzf.json +103 -0
  19. package/data/commands/gem.json +267 -0
  20. package/data/commands/jq.json +100 -0
  21. package/data/commands/k9s.json +62 -0
  22. package/data/commands/liquibase.json +399 -0
  23. package/data/commands/manifest.json +619 -0
  24. package/data/commands/minikube.json +60 -0
  25. package/data/commands/ng.json +64 -0
  26. package/data/commands/nuxt.json +60 -0
  27. package/data/commands/php.json +157 -0
  28. package/data/commands/pm2.json +259 -0
  29. package/data/commands/pod.json +175 -0
  30. package/data/commands/prisma.json +257 -0
  31. package/data/commands/rails.json +372 -0
  32. package/data/commands/rake.json +360 -0
  33. package/data/commands/react-native.json +57 -0
  34. package/data/commands/rg.json +103 -0
  35. package/data/commands/rspec.json +257 -0
  36. package/data/commands/ruby.json +108 -0
  37. package/data/commands/sequelize.json +342 -0
  38. package/data/commands/snyk.json +442 -0
  39. package/data/commands/sonar-scanner.json +219 -0
  40. package/data/commands/stripe.json +314 -0
  41. package/data/commands/symfony.json +449 -0
  42. package/data/commands/tmux.json +197 -0
  43. package/data/commands/trivy.json +367 -0
  44. package/data/commands/twilio.json +382 -0
  45. package/data/commands/typeorm.json +262 -0
  46. package/data/commands/vue.json +60 -0
  47. package/data/commands/wp.json +857 -0
  48. package/data/commands/xcodebuild.json +141 -0
  49. package/data/commands/yq.json +57 -0
  50. package/data/completion/bash.json +1184 -0
  51. package/data/completion/c.json +1067 -0
  52. package/data/completion/cpp.json +824 -0
  53. package/data/completion/csharp.json +860 -0
  54. package/data/completion/dockerfile.json +536 -0
  55. package/data/completion/go.json +1346 -0
  56. package/data/completion/html.json +806 -0
  57. package/data/completion/java.json +1112 -0
  58. package/data/completion/javascript.json +914 -0
  59. package/data/completion/lua.json +968 -0
  60. package/data/completion/php.json +1535 -0
  61. package/data/completion/python.json +1427 -0
  62. package/data/completion/ruby.json +1531 -0
  63. package/data/completion/rust.json +698 -0
  64. package/data/completion/sql.json +887 -0
  65. package/data/completion/toml.json +428 -0
  66. package/data/completion/typescript.json +338 -0
  67. package/data/completion/yaml.json +563 -0
  68. package/data/defination/bash.json +565 -0
  69. package/data/defination/c.json +865 -0
  70. package/data/defination/cpp.json +348 -0
  71. package/data/defination/csharp.json +144 -0
  72. package/data/defination/dockerfile.json +113 -0
  73. package/data/defination/go.json +561 -0
  74. package/data/defination/html.json +559 -0
  75. package/data/defination/java.json +184 -0
  76. package/data/defination/javascript.json +265 -0
  77. package/data/defination/lua.json +181 -0
  78. package/data/defination/php.json +726 -0
  79. package/data/defination/python.json +717 -0
  80. package/data/defination/ruby.json +670 -0
  81. package/data/defination/rust.json +207 -0
  82. package/data/defination/sql.json +473 -0
  83. package/data/defination/toml.json +251 -0
  84. package/data/defination/typescript.json +29 -0
  85. package/data/defination/yaml.json +197 -0
  86. package/data/hover/bash.json +245 -0
  87. package/data/hover/c.json +265 -0
  88. package/data/hover/cpp.json +210 -0
  89. package/data/hover/csharp.json +290 -0
  90. package/data/hover/dockerfile.json +145 -0
  91. package/data/hover/go.json +580 -0
  92. package/data/hover/html.json +250 -0
  93. package/data/hover/java.json +395 -0
  94. package/data/hover/javascript.json +330 -0
  95. package/data/hover/lua.json +265 -0
  96. package/data/hover/php.json +300 -0
  97. package/data/hover/python.json +380 -0
  98. package/data/hover/ruby.json +265 -0
  99. package/data/hover/rust.json +275 -0
  100. package/data/hover/sql.json +230 -0
  101. package/data/hover/toml.json +145 -0
  102. package/data/hover/typescript.json +120 -0
  103. package/data/hover/yaml.json +165 -0
  104. package/data/manifest.json +242 -0
  105. package/package.json +1 -1
@@ -0,0 +1,338 @@
1
+ {
2
+ "language": "typescript",
3
+ "completions": [
4
+ {
5
+ "label": "interface",
6
+ "kind": 14,
7
+ "detail": "Interface declaration",
8
+ "documentation": { "value": "Defines the shape of an object.\n\n```typescript\ninterface User {\n id: number;\n name: string;\n email?: string;\n}\n```" },
9
+ "insertText": "interface ${1:Name} {\n\t${2:prop}: ${3:type};\n}",
10
+ "insertTextRules": 4,
11
+ "sortText": "00_interface"
12
+ },
13
+ {
14
+ "label": "type",
15
+ "kind": 14,
16
+ "detail": "Type alias declaration",
17
+ "documentation": { "value": "Creates a type alias for complex types.\n\n```typescript\ntype StringOrNumber = string | number;\ntype User = { id: number; name: string };\ntype Result<T> = { data: T } | { error: string };\n```" },
18
+ "insertText": "type ${1:Name} = ${2:type};",
19
+ "insertTextRules": 4,
20
+ "sortText": "00_type"
21
+ },
22
+ {
23
+ "label": "enum",
24
+ "kind": 13,
25
+ "detail": "Enum declaration",
26
+ "documentation": { "value": "Defines a set of named constants.\n\n```typescript\nenum Direction {\n Up = 'UP',\n Down = 'DOWN',\n Left = 'LEFT',\n Right = 'RIGHT'\n}\n```" },
27
+ "insertText": "enum ${1:Name} {\n\t${2:Member} = '${3:value}',\n}",
28
+ "insertTextRules": 4,
29
+ "sortText": "00_enum"
30
+ },
31
+ {
32
+ "label": "Record",
33
+ "kind": 7,
34
+ "detail": "Record<Keys, Type>",
35
+ "documentation": { "value": "Constructs an object type whose property keys are `Keys` and values are `Type`.\n\n```typescript\ntype PageInfo = Record<string, { title: string; url: string }>;\nconst pages: Record<'home' | 'about', number> = { home: 1, about: 2 };\n```" },
36
+ "insertText": "Record<${1:string}, ${2:any}>",
37
+ "insertTextRules": 4,
38
+ "sortText": "01_Record"
39
+ },
40
+ {
41
+ "label": "Partial",
42
+ "kind": 7,
43
+ "detail": "Partial<Type>",
44
+ "documentation": { "value": "Constructs a type with all properties of `Type` set to optional.\n\n```typescript\ninterface Todo { title: string; description: string; }\nfunction updateTodo(todo: Todo, fields: Partial<Todo>) { ... }\n```" },
45
+ "insertText": "Partial<${1:Type}>",
46
+ "insertTextRules": 4,
47
+ "sortText": "01_Partial"
48
+ },
49
+ {
50
+ "label": "Required",
51
+ "kind": 7,
52
+ "detail": "Required<Type>",
53
+ "documentation": { "value": "Constructs a type with all properties of `Type` set to required.\n\n```typescript\ninterface Props { a?: number; b?: string; }\nconst obj: Required<Props> = { a: 5, b: 'hello' };\n```" },
54
+ "insertText": "Required<${1:Type}>",
55
+ "insertTextRules": 4,
56
+ "sortText": "01_Required"
57
+ },
58
+ {
59
+ "label": "Readonly",
60
+ "kind": 7,
61
+ "detail": "Readonly<Type>",
62
+ "documentation": { "value": "Constructs a type with all properties set to `readonly`.\n\n```typescript\nconst config: Readonly<Config> = { port: 3000 };\nconfig.port = 8080; // Error!\n```" },
63
+ "insertText": "Readonly<${1:Type}>",
64
+ "insertTextRules": 4,
65
+ "sortText": "01_Readonly"
66
+ },
67
+ {
68
+ "label": "Pick",
69
+ "kind": 7,
70
+ "detail": "Pick<Type, Keys>",
71
+ "documentation": { "value": "Constructs a type by picking the set of properties `Keys` from `Type`.\n\n```typescript\ntype TodoPreview = Pick<Todo, 'title' | 'completed'>;\n```" },
72
+ "insertText": "Pick<${1:Type}, ${2:Keys}>",
73
+ "insertTextRules": 4,
74
+ "sortText": "01_Pick"
75
+ },
76
+ {
77
+ "label": "Omit",
78
+ "kind": 7,
79
+ "detail": "Omit<Type, Keys>",
80
+ "documentation": { "value": "Constructs a type by removing the set of properties `Keys` from `Type`.\n\n```typescript\ntype TodoInfo = Omit<Todo, 'completed' | 'createdAt'>;\n```" },
81
+ "insertText": "Omit<${1:Type}, ${2:Keys}>",
82
+ "insertTextRules": 4,
83
+ "sortText": "01_Omit"
84
+ },
85
+ {
86
+ "label": "Exclude",
87
+ "kind": 7,
88
+ "detail": "Exclude<UnionType, Excluded>",
89
+ "documentation": { "value": "Constructs a type by excluding from `UnionType` all members that are assignable to `Excluded`.\n\n```typescript\ntype T = Exclude<'a' | 'b' | 'c', 'a'>; // 'b' | 'c'\n```" },
90
+ "insertText": "Exclude<${1:UnionType}, ${2:Excluded}>",
91
+ "insertTextRules": 4,
92
+ "sortText": "01_Exclude"
93
+ },
94
+ {
95
+ "label": "Extract",
96
+ "kind": 7,
97
+ "detail": "Extract<Type, Union>",
98
+ "documentation": { "value": "Constructs a type by extracting from `Type` all union members assignable to `Union`.\n\n```typescript\ntype T = Extract<'a' | 'b' | 'c', 'a' | 'f'>; // 'a'\n```" },
99
+ "insertText": "Extract<${1:Type}, ${2:Union}>",
100
+ "insertTextRules": 4,
101
+ "sortText": "01_Extract"
102
+ },
103
+ {
104
+ "label": "NonNullable",
105
+ "kind": 7,
106
+ "detail": "NonNullable<Type>",
107
+ "documentation": { "value": "Constructs a type by excluding `null` and `undefined` from `Type`.\n\n```typescript\ntype T = NonNullable<string | null | undefined>; // string\n```" },
108
+ "insertText": "NonNullable<${1:Type}>",
109
+ "insertTextRules": 4,
110
+ "sortText": "01_NonNullable"
111
+ },
112
+ {
113
+ "label": "ReturnType",
114
+ "kind": 7,
115
+ "detail": "ReturnType<Type>",
116
+ "documentation": { "value": "Constructs a type from the return type of a function type.\n\n```typescript\nfunction getUser() { return { id: 1, name: 'Alice' }; }\ntype User = ReturnType<typeof getUser>; // { id: number; name: string }\n```" },
117
+ "insertText": "ReturnType<typeof ${1:fn}>",
118
+ "insertTextRules": 4,
119
+ "sortText": "01_ReturnType"
120
+ },
121
+ {
122
+ "label": "Parameters",
123
+ "kind": 7,
124
+ "detail": "Parameters<Type>",
125
+ "documentation": { "value": "Constructs a tuple type from the types of the parameters of a function type.\n\n```typescript\ntype T = Parameters<(a: string, b: number) => void>; // [string, number]\n```" },
126
+ "insertText": "Parameters<typeof ${1:fn}>",
127
+ "insertTextRules": 4,
128
+ "sortText": "01_Parameters"
129
+ },
130
+ {
131
+ "label": "Awaited",
132
+ "kind": 7,
133
+ "detail": "Awaited<Type>",
134
+ "documentation": { "value": "Recursively unwraps the `Awaited` type of a `Promise`.\n\n```typescript\ntype A = Awaited<Promise<string>>; // string\ntype B = Awaited<Promise<Promise<number>>>; // number\n```" },
135
+ "insertText": "Awaited<${1:Type}>",
136
+ "insertTextRules": 4,
137
+ "sortText": "01_Awaited"
138
+ },
139
+ {
140
+ "label": "keyof",
141
+ "kind": 14,
142
+ "detail": "keyof operator",
143
+ "documentation": { "value": "Produces a union of the property names (keys) of a type.\n\n```typescript\ninterface User { id: number; name: string; }\ntype UserKeys = keyof User; // 'id' | 'name'\n```" },
144
+ "insertText": "keyof ${1:Type}",
145
+ "insertTextRules": 4,
146
+ "sortText": "00_keyof"
147
+ },
148
+ {
149
+ "label": "typeof",
150
+ "kind": 14,
151
+ "detail": "typeof type operator",
152
+ "documentation": { "value": "Obtains the type of a variable or property in a type context.\n\n```typescript\nconst config = { port: 3000, host: 'localhost' };\ntype Config = typeof config; // { port: number; host: string }\n```" },
153
+ "insertText": "typeof ${1:variable}",
154
+ "insertTextRules": 4,
155
+ "sortText": "00_typeof"
156
+ },
157
+ {
158
+ "label": "as const",
159
+ "kind": 14,
160
+ "detail": "Const assertion",
161
+ "documentation": { "value": "Asserts that an expression should be inferred as its most specific (literal) type.\n\n```typescript\nconst colors = ['red', 'green', 'blue'] as const;\n// readonly ['red', 'green', 'blue']\n```" },
162
+ "insertText": "as const",
163
+ "insertTextRules": 1,
164
+ "sortText": "00_as_const"
165
+ },
166
+ {
167
+ "label": "satisfies",
168
+ "kind": 14,
169
+ "detail": "satisfies operator (TS 4.9+)",
170
+ "documentation": { "value": "Validates that a value matches a type without widening the inferred type.\n\n```typescript\ntype Colors = Record<string, [number, number, number] | string>;\nconst palette = {\n red: [255, 0, 0],\n green: '#00ff00',\n} satisfies Colors;\n```" },
171
+ "insertText": "satisfies ${1:Type}",
172
+ "insertTextRules": 4,
173
+ "sortText": "00_satisfies"
174
+ },
175
+ {
176
+ "label": { "label": "generic function", "detail": " declaration", "description": "TypeScript" },
177
+ "kind": 15,
178
+ "detail": "Generic function snippet",
179
+ "documentation": { "value": "Declares a generic function with type parameter.\n\n```typescript\nfunction identity<T>(arg: T): T {\n return arg;\n}\n```" },
180
+ "insertText": "function ${1:name}<${2:T}>(${3:arg}: ${2:T}): ${4:ReturnType} {\n\t${5}\n}",
181
+ "insertTextRules": 4,
182
+ "sortText": "00_generic_function"
183
+ },
184
+ {
185
+ "label": { "label": "type guard", "detail": " function", "description": "TypeScript" },
186
+ "kind": 15,
187
+ "detail": "Type guard function",
188
+ "documentation": { "value": "A function that narrows a type via a type predicate.\n\n```typescript\nfunction isString(value: unknown): value is string {\n return typeof value === 'string';\n}\n```" },
189
+ "insertText": "function ${1:isType}(${2:value}: unknown): ${2:value} is ${3:Type} {\n\treturn ${4:condition};\n}",
190
+ "insertTextRules": 4,
191
+ "sortText": "00_type_guard"
192
+ },
193
+ {
194
+ "label": { "label": "mapped type", "detail": " declaration", "description": "TypeScript" },
195
+ "kind": 15,
196
+ "detail": "Mapped type",
197
+ "documentation": { "value": "Creates a new type by transforming each property of an existing type.\n\n```typescript\ntype Optional<T> = {\n [K in keyof T]?: T[K];\n};\n```" },
198
+ "insertText": "type ${1:Name}<T> = {\n\t[K in keyof T]${2:: T[K]};\n};",
199
+ "insertTextRules": 4,
200
+ "sortText": "00_mapped_type"
201
+ },
202
+ {
203
+ "label": { "label": "conditional type", "detail": " expression", "description": "TypeScript" },
204
+ "kind": 15,
205
+ "detail": "Conditional type",
206
+ "documentation": { "value": "Selects one of two types based on a condition.\n\n```typescript\ntype IsString<T> = T extends string ? true : false;\ntype A = IsString<'hello'>; // true\ntype B = IsString<42>; // false\n```" },
207
+ "insertText": "type ${1:Name}<T> = T extends ${2:Condition} ? ${3:TrueType} : ${4:FalseType};",
208
+ "insertTextRules": 4,
209
+ "sortText": "00_conditional_type"
210
+ },
211
+ {
212
+ "label": { "label": "infer", "detail": " in conditional type", "description": "TypeScript" },
213
+ "kind": 15,
214
+ "detail": "Infer keyword in conditional type",
215
+ "documentation": { "value": "Infers a type within a conditional type.\n\n```typescript\ntype UnpackPromise<T> = T extends Promise<infer U> ? U : T;\ntype A = UnpackPromise<Promise<string>>; // string\n```" },
216
+ "insertText": "T extends ${1:Type}<infer ${2:U}> ? ${2:U} : ${3:never}",
217
+ "insertTextRules": 4,
218
+ "sortText": "00_infer"
219
+ },
220
+ {
221
+ "label": { "label": "template literal type", "detail": "", "description": "TS 4.1+" },
222
+ "kind": 15,
223
+ "detail": "Template literal type",
224
+ "documentation": { "value": "Build string types using template literal syntax.\n\n```typescript\ntype EventName = `on${Capitalize<string>}`;\ntype Color = 'red' | 'blue';\ntype Size = 'sm' | 'lg';\ntype Token = `${Color}-${Size}`; // 'red-sm' | 'red-lg' | 'blue-sm' | 'blue-lg'\n```" },
225
+ "insertText": "`${${1:Prefix}}${${2:Type}}`",
226
+ "insertTextRules": 4,
227
+ "sortText": "00_template_literal_type"
228
+ },
229
+ {
230
+ "label": "Uppercase",
231
+ "kind": 7,
232
+ "detail": "Uppercase<StringType>",
233
+ "documentation": { "value": "Converts each character in the string to uppercase.\n\n```typescript\ntype T = Uppercase<'hello'>; // 'HELLO'\n```" },
234
+ "insertText": "Uppercase<${1:StringType}>",
235
+ "insertTextRules": 4,
236
+ "sortText": "01_Uppercase"
237
+ },
238
+ {
239
+ "label": "Lowercase",
240
+ "kind": 7,
241
+ "detail": "Lowercase<StringType>",
242
+ "documentation": { "value": "Converts each character in the string to lowercase.\n\n```typescript\ntype T = Lowercase<'HELLO'>; // 'hello'\n```" },
243
+ "insertText": "Lowercase<${1:StringType}>",
244
+ "insertTextRules": 4,
245
+ "sortText": "01_Lowercase"
246
+ },
247
+ {
248
+ "label": "Capitalize",
249
+ "kind": 7,
250
+ "detail": "Capitalize<StringType>",
251
+ "documentation": { "value": "Converts the first character in the string to uppercase.\n\n```typescript\ntype T = Capitalize<'hello'>; // 'Hello'\n```" },
252
+ "insertText": "Capitalize<${1:StringType}>",
253
+ "insertTextRules": 4,
254
+ "sortText": "01_Capitalize"
255
+ },
256
+ {
257
+ "label": "ConstructorParameters",
258
+ "kind": 7,
259
+ "detail": "ConstructorParameters<Type>",
260
+ "documentation": { "value": "Extracts parameter types from a constructor function type.\n\n```typescript\ntype T = ConstructorParameters<typeof Date>;\n```" },
261
+ "insertText": "ConstructorParameters<typeof ${1:Class}>",
262
+ "insertTextRules": 4,
263
+ "sortText": "01_ConstructorParameters"
264
+ },
265
+ {
266
+ "label": "InstanceType",
267
+ "kind": 7,
268
+ "detail": "InstanceType<Type>",
269
+ "documentation": { "value": "Constructs a type consisting of the instance type of a constructor function.\n\n```typescript\ntype D = InstanceType<typeof Date>; // Date\n```" },
270
+ "insertText": "InstanceType<typeof ${1:Class}>",
271
+ "insertTextRules": 4,
272
+ "sortText": "01_InstanceType"
273
+ },
274
+ {
275
+ "label": "NoInfer",
276
+ "kind": 7,
277
+ "detail": "NoInfer<Type> (TS 5.4+)",
278
+ "documentation": { "value": "Prevents TypeScript from inferring a type parameter from this position.\n\n```typescript\nfunction createFSM<S extends string>(init: S, transitions: Record<S, NoInfer<S>[]>) { }\n```" },
279
+ "insertText": "NoInfer<${1:Type}>",
280
+ "insertTextRules": 4,
281
+ "sortText": "01_NoInfer"
282
+ },
283
+ {
284
+ "label": { "label": "readonly array", "detail": "", "description": "TypeScript" },
285
+ "kind": 15,
286
+ "detail": "Readonly array type",
287
+ "documentation": { "value": "Immutable array that cannot be modified.\n\n```typescript\nconst items: readonly string[] = ['a', 'b'];\nconst items2: ReadonlyArray<string> = ['a', 'b'];\n```" },
288
+ "insertText": "readonly ${1:Type}[]",
289
+ "insertTextRules": 4,
290
+ "sortText": "01_readonly_array"
291
+ },
292
+ {
293
+ "label": { "label": "assertion function", "detail": "", "description": "TS 3.7+" },
294
+ "kind": 15,
295
+ "detail": "Assertion function",
296
+ "documentation": { "value": "Function that asserts a condition and narrows the type.\n\n```typescript\nfunction assertDefined<T>(val: T): asserts val is NonNullable<T> {\n if (val === undefined || val === null) {\n throw new Error('Value is not defined');\n }\n}\n```" },
297
+ "insertText": "function ${1:assert}(${2:value}: unknown): asserts ${2:value} is ${3:Type} {\n\tif (!${4:condition}) {\n\t\tthrow new Error('${5:Assertion failed}');\n\t}\n}",
298
+ "insertTextRules": 4,
299
+ "sortText": "00_assertion_function"
300
+ },
301
+ {
302
+ "label": { "label": "namespace", "detail": " declaration", "description": "TypeScript" },
303
+ "kind": 15,
304
+ "detail": "Namespace declaration",
305
+ "documentation": { "value": "Organizes code in a logical grouping.\n\n```typescript\nnamespace Validation {\n export function isValid(s: string): boolean { ... }\n}\n```" },
306
+ "insertText": "namespace ${1:Name} {\n\texport ${2}\n}",
307
+ "insertTextRules": 4,
308
+ "sortText": "00_namespace"
309
+ },
310
+ {
311
+ "label": { "label": "abstract class", "detail": "", "description": "TypeScript" },
312
+ "kind": 15,
313
+ "detail": "Abstract class declaration",
314
+ "documentation": { "value": "Base class that cannot be instantiated directly.\n\n```typescript\nabstract class Shape {\n abstract area(): number;\n toString(): string { return `Area: ${this.area()}`; }\n}\n```" },
315
+ "insertText": "abstract class ${1:Name} {\n\tabstract ${2:method}(${3}): ${4:void};\n}",
316
+ "insertTextRules": 4,
317
+ "sortText": "00_abstract_class"
318
+ },
319
+ {
320
+ "label": { "label": "decorator", "detail": " (TS 5.0+)", "description": "Stage 3 Decorators" },
321
+ "kind": 15,
322
+ "detail": "Decorator function",
323
+ "documentation": { "value": "A special declaration that can be attached to class declarations, methods, accessors, properties, or parameters.\n\n```typescript\nfunction log(target: any, context: ClassMethodDecoratorContext) {\n return function (...args: any[]) {\n console.log(`Calling ${String(context.name)}`);\n return target.apply(this, args);\n };\n}\n```" },
324
+ "insertText": "function ${1:decorator}(target: any, context: ${2:ClassMethodDecoratorContext}) {\n\t${3}\n}",
325
+ "insertTextRules": 4,
326
+ "sortText": "00_decorator"
327
+ },
328
+ {
329
+ "label": { "label": "using declaration", "detail": " (TS 5.2+)", "description": "Explicit Resource Management" },
330
+ "kind": 15,
331
+ "detail": "using declaration for resource management",
332
+ "documentation": { "value": "Declares a resource that is automatically disposed when it goes out of scope.\n\n```typescript\nclass FileHandle implements Disposable {\n [Symbol.dispose]() { this.close(); }\n}\n{\n using handle = new FileHandle();\n // handle disposed automatically\n}\n```" },
333
+ "insertText": "using ${1:resource} = ${2:expression};",
334
+ "insertTextRules": 4,
335
+ "sortText": "00_using"
336
+ }
337
+ ]
338
+ }