@carno.js/core 0.2.3

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 (214) hide show
  1. package/LICENSE +674 -0
  2. package/dist/Carno.d.ts +65 -0
  3. package/dist/Carno.js +307 -0
  4. package/dist/Cheetah.d.ts +65 -0
  5. package/dist/Cheetah.js +307 -0
  6. package/dist/cache/bento-cache.driver.d.ts +13 -0
  7. package/dist/cache/bento-cache.driver.js +55 -0
  8. package/dist/cache/cache.service.d.ts +8 -0
  9. package/dist/cache/cache.service.js +6 -0
  10. package/dist/commons/decorators/Injectable.decorator.d.ts +20 -0
  11. package/dist/commons/decorators/Injectable.decorator.js +33 -0
  12. package/dist/commons/decorators/controller.decorator.d.ts +8 -0
  13. package/dist/commons/decorators/controller.decorator.js +22 -0
  14. package/dist/commons/decorators/http.decorators.d.ts +13 -0
  15. package/dist/commons/decorators/http.decorators.js +44 -0
  16. package/dist/commons/decorators/index.d.ts +5 -0
  17. package/dist/commons/decorators/index.js +21 -0
  18. package/dist/commons/decorators/inject.decorator.d.ts +1 -0
  19. package/dist/commons/decorators/inject.decorator.js +5 -0
  20. package/dist/commons/decorators/middleware.decorator.d.ts +2 -0
  21. package/dist/commons/decorators/middleware.decorator.js +30 -0
  22. package/dist/commons/decorators/service.decorator.d.ts +2 -0
  23. package/dist/commons/decorators/service.decorator.js +7 -0
  24. package/dist/commons/http-code.enum.d.ts +50 -0
  25. package/dist/commons/http-code.enum.js +54 -0
  26. package/dist/commons/index.d.ts +3 -0
  27. package/dist/commons/index.js +19 -0
  28. package/dist/commons/registries/ProviderControl.d.ts +77 -0
  29. package/dist/commons/registries/ProviderControl.js +112 -0
  30. package/dist/commons/registries/ProviderRegistry.d.ts +7 -0
  31. package/dist/commons/registries/ProviderRegistry.js +20 -0
  32. package/dist/constants.d.ts +7 -0
  33. package/dist/constants.js +10 -0
  34. package/dist/container/ContainerConfiguration.d.ts +45 -0
  35. package/dist/container/ContainerConfiguration.js +121 -0
  36. package/dist/container/DependencyResolver.d.ts +18 -0
  37. package/dist/container/DependencyResolver.js +81 -0
  38. package/dist/container/InjectorService.d.ts +34 -0
  39. package/dist/container/InjectorService.js +157 -0
  40. package/dist/container/MethodInvoker.d.ts +17 -0
  41. package/dist/container/MethodInvoker.js +69 -0
  42. package/dist/container/RouteResolver.d.ts +27 -0
  43. package/dist/container/RouteResolver.js +173 -0
  44. package/dist/container/container.d.ts +41 -0
  45. package/dist/container/container.js +71 -0
  46. package/dist/container/createContainer.d.ts +3 -0
  47. package/dist/container/createContainer.js +12 -0
  48. package/dist/container/createInjector.d.ts +2 -0
  49. package/dist/container/createInjector.js +7 -0
  50. package/dist/container/index.d.ts +6 -0
  51. package/dist/container/index.js +22 -0
  52. package/dist/container/middleware.resolver.d.ts +9 -0
  53. package/dist/container/middleware.resolver.js +35 -0
  54. package/dist/default-routes-carno.d.ts +3 -0
  55. package/dist/default-routes-carno.js +29 -0
  56. package/dist/default-routes-cheetah.d.ts +3 -0
  57. package/dist/default-routes-cheetah.js +29 -0
  58. package/dist/domain/CarnoClosure.d.ts +1 -0
  59. package/dist/domain/CarnoClosure.js +2 -0
  60. package/dist/domain/CarnoMiddleware.d.ts +5 -0
  61. package/dist/domain/CarnoMiddleware.js +2 -0
  62. package/dist/domain/CheetahClosure.d.ts +1 -0
  63. package/dist/domain/CheetahClosure.js +2 -0
  64. package/dist/domain/CheetahMiddleware.d.ts +5 -0
  65. package/dist/domain/CheetahMiddleware.js +2 -0
  66. package/dist/domain/Context.d.ts +26 -0
  67. package/dist/domain/Context.js +107 -0
  68. package/dist/domain/LocalsContainer.d.ts +4 -0
  69. package/dist/domain/LocalsContainer.js +10 -0
  70. package/dist/domain/Metadata.d.ts +449 -0
  71. package/dist/domain/Metadata.js +511 -0
  72. package/dist/domain/cors-config.d.ts +12 -0
  73. package/dist/domain/cors-config.js +18 -0
  74. package/dist/domain/http-method.d.ts +7 -0
  75. package/dist/domain/http-method.js +11 -0
  76. package/dist/domain/index.d.ts +10 -0
  77. package/dist/domain/index.js +26 -0
  78. package/dist/domain/provider-scope.d.ts +5 -0
  79. package/dist/domain/provider-scope.js +9 -0
  80. package/dist/domain/provider-type.d.ts +6 -0
  81. package/dist/domain/provider-type.js +10 -0
  82. package/dist/domain/provider.d.ts +37 -0
  83. package/dist/domain/provider.js +70 -0
  84. package/dist/events/hooks.decorator.d.ts +3 -0
  85. package/dist/events/hooks.decorator.js +29 -0
  86. package/dist/events/index.d.ts +2 -0
  87. package/dist/events/index.js +18 -0
  88. package/dist/events/on-event.d.ts +13 -0
  89. package/dist/events/on-event.js +11 -0
  90. package/dist/exceptions/HttpException.d.ts +9 -0
  91. package/dist/exceptions/HttpException.js +26 -0
  92. package/dist/exceptions/index.d.ts +1 -0
  93. package/dist/exceptions/index.js +17 -0
  94. package/dist/index.d.ts +16 -0
  95. package/dist/index.js +32 -0
  96. package/dist/route/Matcher.d.ts +16 -0
  97. package/dist/route/Matcher.js +48 -0
  98. package/dist/route/RouteExecutor.d.ts +13 -0
  99. package/dist/route/RouteExecutor.js +70 -0
  100. package/dist/route/memoirist.d.ts +25 -0
  101. package/dist/route/memoirist.js +250 -0
  102. package/dist/services/logger.service.d.ts +23 -0
  103. package/dist/services/logger.service.js +54 -0
  104. package/dist/services/request-logger.service.d.ts +15 -0
  105. package/dist/services/request-logger.service.js +50 -0
  106. package/dist/testing/core-testing.d.ts +24 -0
  107. package/dist/testing/core-testing.js +98 -0
  108. package/dist/testing/index.d.ts +1 -0
  109. package/dist/testing/index.js +17 -0
  110. package/dist/utils/ancestorOf.d.ts +2 -0
  111. package/dist/utils/ancestorOf.js +10 -0
  112. package/dist/utils/ancestorsOf.d.ts +6 -0
  113. package/dist/utils/ancestorsOf.js +20 -0
  114. package/dist/utils/classOf.d.ts +13 -0
  115. package/dist/utils/classOf.js +21 -0
  116. package/dist/utils/cleanObject.d.ts +6 -0
  117. package/dist/utils/cleanObject.js +22 -0
  118. package/dist/utils/constructorOf.d.ts +11 -0
  119. package/dist/utils/constructorOf.js +18 -0
  120. package/dist/utils/createInstance.d.ts +1 -0
  121. package/dist/utils/createInstance.js +7 -0
  122. package/dist/utils/decoratorTypeOf.d.ts +11 -0
  123. package/dist/utils/decoratorTypeOf.js +32 -0
  124. package/dist/utils/deepClone.d.ts +6 -0
  125. package/dist/utils/deepClone.js +63 -0
  126. package/dist/utils/deepMerge.d.ts +9 -0
  127. package/dist/utils/deepMerge.js +62 -0
  128. package/dist/utils/descriptorOf.d.ts +8 -0
  129. package/dist/utils/descriptorOf.js +16 -0
  130. package/dist/utils/getClassOrSymbol.d.ts +1 -0
  131. package/dist/utils/getClassOrSymbol.js +8 -0
  132. package/dist/utils/getConstructorArgNames.d.ts +1 -0
  133. package/dist/utils/getConstructorArgNames.js +12 -0
  134. package/dist/utils/getMethodArgTypes.d.ts +1 -0
  135. package/dist/utils/getMethodArgTypes.js +9 -0
  136. package/dist/utils/getValue.d.ts +32 -0
  137. package/dist/utils/getValue.js +47 -0
  138. package/dist/utils/hasJsonMethod.d.ts +1 -0
  139. package/dist/utils/hasJsonMethod.js +6 -0
  140. package/dist/utils/index.d.ts +15 -0
  141. package/dist/utils/index.js +31 -0
  142. package/dist/utils/isArray.d.ts +13 -0
  143. package/dist/utils/isArray.js +21 -0
  144. package/dist/utils/isArrowFn.d.ts +1 -0
  145. package/dist/utils/isArrowFn.js +7 -0
  146. package/dist/utils/isBoolean.d.ts +7 -0
  147. package/dist/utils/isBoolean.js +15 -0
  148. package/dist/utils/isBuffer.d.ts +7 -0
  149. package/dist/utils/isBuffer.js +19 -0
  150. package/dist/utils/isClass.d.ts +1 -0
  151. package/dist/utils/isClass.js +26 -0
  152. package/dist/utils/isClassValidator.d.ts +6 -0
  153. package/dist/utils/isClassValidator.js +13 -0
  154. package/dist/utils/isCollection.d.ts +6 -0
  155. package/dist/utils/isCollection.js +20 -0
  156. package/dist/utils/isDate.d.ts +6 -0
  157. package/dist/utils/isDate.js +11 -0
  158. package/dist/utils/isEmpty.d.ts +6 -0
  159. package/dist/utils/isEmpty.js +12 -0
  160. package/dist/utils/isFunction.d.ts +1 -0
  161. package/dist/utils/isFunction.js +6 -0
  162. package/dist/utils/isInheritedFrom.d.ts +1 -0
  163. package/dist/utils/isInheritedFrom.js +24 -0
  164. package/dist/utils/isMomentObject.d.ts +1 -0
  165. package/dist/utils/isMomentObject.js +6 -0
  166. package/dist/utils/isMongooseObject.d.ts +2 -0
  167. package/dist/utils/isMongooseObject.js +11 -0
  168. package/dist/utils/isNil.d.ts +1 -0
  169. package/dist/utils/isNil.js +6 -0
  170. package/dist/utils/isNumber.d.ts +7 -0
  171. package/dist/utils/isNumber.js +15 -0
  172. package/dist/utils/isObject.d.ts +1 -0
  173. package/dist/utils/isObject.js +6 -0
  174. package/dist/utils/isObservable.d.ts +1 -0
  175. package/dist/utils/isObservable.js +6 -0
  176. package/dist/utils/isPlainObject.d.ts +7 -0
  177. package/dist/utils/isPlainObject.js +16 -0
  178. package/dist/utils/isPrimitive.d.ts +14 -0
  179. package/dist/utils/isPrimitive.js +28 -0
  180. package/dist/utils/isPrimitiveType.d.ts +1 -0
  181. package/dist/utils/isPrimitiveType.js +11 -0
  182. package/dist/utils/isPromise.d.ts +7 -0
  183. package/dist/utils/isPromise.js +14 -0
  184. package/dist/utils/isProtectedKey.d.ts +5 -0
  185. package/dist/utils/isProtectedKey.js +10 -0
  186. package/dist/utils/isRegExp.d.ts +1 -0
  187. package/dist/utils/isRegExp.js +6 -0
  188. package/dist/utils/isRequestScope.d.ts +11 -0
  189. package/dist/utils/isRequestScope.js +23 -0
  190. package/dist/utils/isSerializable.d.ts +1 -0
  191. package/dist/utils/isSerializable.js +11 -0
  192. package/dist/utils/isStream.d.ts +1 -0
  193. package/dist/utils/isStream.js +6 -0
  194. package/dist/utils/isString.d.ts +6 -0
  195. package/dist/utils/isString.js +14 -0
  196. package/dist/utils/isSymbol.d.ts +6 -0
  197. package/dist/utils/isSymbol.js +14 -0
  198. package/dist/utils/methodsOf.d.ts +9 -0
  199. package/dist/utils/methodsOf.js +24 -0
  200. package/dist/utils/nameOf.d.ts +14 -0
  201. package/dist/utils/nameOf.js +31 -0
  202. package/dist/utils/objectKeys.d.ts +1 -0
  203. package/dist/utils/objectKeys.js +7 -0
  204. package/dist/utils/primitiveOf.d.ts +1 -0
  205. package/dist/utils/primitiveOf.js +18 -0
  206. package/dist/utils/prototypeOf.d.ts +6 -0
  207. package/dist/utils/prototypeOf.js +12 -0
  208. package/dist/utils/setValue.d.ts +1 -0
  209. package/dist/utils/setValue.js +32 -0
  210. package/dist/utils/toMap.d.ts +3 -0
  211. package/dist/utils/toMap.js +34 -0
  212. package/dist/utils/toStringConstructor.d.ts +1 -0
  213. package/dist/utils/toStringConstructor.js +10 -0
  214. package/package.json +55 -0
@@ -0,0 +1,449 @@
1
+ import 'reflect-metadata';
2
+ import { Type } from '../commons/registries/ProviderControl';
3
+ /**
4
+ * @stable
5
+ */
6
+ export declare class Metadata {
7
+ /**
8
+ * Gets the metadata value for the provided metadata key on the target object or its prototype chain.
9
+ * @param key A key used to store and retrieve metadata.
10
+ * @param target The target object on which the metadata is defined.
11
+ * @param propertyKey The property key for the target.
12
+ * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
13
+ * @example
14
+ *
15
+ * ```typescript
16
+ * class Example {
17
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
18
+ * // static staticProperty;
19
+ * // property;
20
+ *
21
+ * static staticMethod(p) { }
22
+ * method(p) { }
23
+ * }
24
+ *
25
+ * // constructor
26
+ * result = Metadata.get("custom:annotation", Example);
27
+ *
28
+ * // property (on constructor)
29
+ * result = Metadata.get("custom:annotation", Example, "staticProperty");
30
+ *
31
+ * // property (on prototype)
32
+ * result = Metadata.get("custom:annotation", Example.prototype, "property");
33
+ *
34
+ * // method (on constructor)
35
+ * result = Metadata.get("custom:annotation", Example, "staticMethod");
36
+ *
37
+ * // method (on prototype)
38
+ * result = Metadata.get("custom:annotation", Example.prototype, "method");
39
+ * ```
40
+ *
41
+ */
42
+ static get(key: string, target: any, propertyKey?: string | symbol): any;
43
+ /**
44
+ * Gets the metadata value for the provided metadata key on the target object or its prototype chain.
45
+ * @param key A key used to store and retrieve metadata.
46
+ * @param target The target object on which the metadata is defined.
47
+ * @param propertyKey The property key for the target.
48
+ * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
49
+ * @example
50
+ *
51
+ * ```typescript
52
+ * class Example {
53
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
54
+ * // static staticProperty;
55
+ * // property;
56
+ *
57
+ * static staticMethod(p) { }
58
+ * method(p) { }
59
+ * }
60
+ *
61
+ * // constructor
62
+ * result = Metadata.getOwn("custom:annotation", Example);
63
+ *
64
+ * // property (on constructor)
65
+ * result = Metadata.getOwn("custom:annotation", Example, "staticProperty");
66
+ *
67
+ * // property (on prototype)
68
+ * result = Metadata.getOwn("custom:annotation", Example.prototype, "property");
69
+ *
70
+ * // method (on constructor)
71
+ * result = Metadata.getOwn("custom:annotation", Example, "staticMethod");
72
+ *
73
+ * // method (on prototype)
74
+ * result = Metadata.getOwn("custom:annotation", Example.prototype, "method");
75
+ * ```
76
+ *
77
+ */
78
+ static getOwn(key: string, target: any, propertyKey?: string | symbol): any;
79
+ /**
80
+ * Gets the metadata value for the provided metadata DESIGN_TYPE on the target object or its prototype chain.
81
+ * @param target The target object on which the metadata is defined.
82
+ * @param propertyKey The property key for the target.
83
+ * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
84
+ * @example
85
+ *
86
+ * ```typescript
87
+ * class Example {
88
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
89
+ * // static staticProperty;
90
+ * // property;
91
+ *
92
+ * static staticMethod(p) { }
93
+ * method(p) { }
94
+ * }
95
+ *
96
+ * // on contructor
97
+ * result = Metadata.getType(Example);
98
+ *
99
+ * // property (on constructor)
100
+ * result = Metadata.getType(Example, "staticProperty");
101
+ *
102
+ * // method (on constructor)
103
+ * result = Metadata.getType(Example, "staticMethod");
104
+ * ```
105
+ *
106
+ */
107
+ static getType(target: any, propertyKey?: string | symbol): any;
108
+ /**
109
+ * Gets the metadata value for the provided metadata DESIGN_TYPE on the target object or its prototype chain.
110
+ * @param target The target object on which the metadata is defined.
111
+ * @param propertyKey The property key for the target.
112
+ * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
113
+ * @example
114
+ *
115
+ * ```typescript
116
+ * class Example {
117
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
118
+ * // static staticProperty;
119
+ * // property;
120
+ *
121
+ * static staticMethod(p) { }
122
+ * method(p) { }
123
+ * }
124
+ *
125
+ * // on contructor
126
+ * result = Metadata.getOwnType(Example);
127
+ *
128
+ * // property (on constructor)
129
+ * result = Metadata.getOwnType(Example, "staticProperty");
130
+ *
131
+ * // method (on constructor)
132
+ * result = Metadata.getOwnType(Example, "staticMethod");
133
+ * ```
134
+ *
135
+ */
136
+ static getOwnType(target: any, propertyKey?: string | symbol): any;
137
+ /**
138
+ * Gets the metadata value for the provided metadata DESIGN_RETURN_TYPE on the target object or its prototype chain.
139
+ * @param target The target object on which the metadata is defined.
140
+ * @param propertyKey The property key for the target.
141
+ * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
142
+ * @example
143
+ *
144
+ * ```typescript
145
+ * class Example {
146
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
147
+ * // static staticProperty;
148
+ * // property;
149
+ *
150
+ * static staticMethod(p) { }
151
+ * method(p) { }
152
+ * }
153
+ *
154
+ * // on contructor
155
+ * result = Metadata.getReturnType(Example);
156
+ *
157
+ * // property (on constructor)
158
+ * result = Metadata.getReturnType(Example, "staticProperty");
159
+ *
160
+ * // method (on constructor)
161
+ * result = Metadata.getReturnType(Example, "staticMethod");
162
+ * ```
163
+ *
164
+ */
165
+ static getReturnType(target: any, propertyKey?: string | symbol): any;
166
+ /**
167
+ * Gets the metadata value for the provided metadata DESIGN_RETURN_TYPE on the target object or its prototype chain.
168
+ * @param target The target object on which the metadata is defined.
169
+ * @param propertyKey The property key for the target.
170
+ * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
171
+ * @example
172
+ *
173
+ * ```typescript
174
+ * class Example {
175
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
176
+ * // static staticProperty;
177
+ * // property;
178
+ *
179
+ * static staticMethod(p) { }
180
+ * method(p) { }
181
+ * }
182
+ *
183
+ * // on contructor
184
+ * result = Metadata.getOwnReturnType(Example);
185
+ *
186
+ * // property (on constructor)
187
+ * result = Metadata.getOwnReturnType(Example, "staticProperty");
188
+ *
189
+ * // method (on constructor)
190
+ * result = Metadata.getOwnReturnType(Example, "staticMethod");
191
+ * ```
192
+ *
193
+ */
194
+ static getOwnReturnType(target: any, propertyKey?: string | symbol): any;
195
+ /**
196
+ * Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
197
+ * @param key A key used to store and retrieve metadata.
198
+ * @param target The target object on which the metadata is defined.
199
+ * @param propertyKey The property key for the target.
200
+ * @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.
201
+ * @example
202
+ *
203
+ * ```typescript
204
+ * class Example {
205
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
206
+ * // static staticProperty;
207
+ * // property;
208
+ *
209
+ * static staticMethod(p) { }
210
+ * method(p) { }
211
+ * }
212
+ *
213
+ * // constructor
214
+ * result = Metadata.has("custom:annotation", Example);
215
+ *
216
+ * // property (on constructor)
217
+ * result = Metadata.has("custom:annotation", Example, "staticProperty");
218
+ *
219
+ * // property (on prototype)
220
+ * result = Metadata.has("custom:annotation", Example.prototype, "property");
221
+ *
222
+ * // method (on constructor)
223
+ * result = Metadata.has("custom:annotation", Example, "staticMethod");
224
+ *
225
+ * // method (on prototype)
226
+ * result = Metadata.has("custom:annotation", Example.prototype, "method");
227
+ * ```
228
+ *
229
+ */
230
+ static has(key: string, target: any, propertyKey?: string | symbol): boolean;
231
+ /**
232
+ * Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
233
+ * @param key A key used to store and retrieve metadata.
234
+ * @param target The target object on which the metadata is defined.
235
+ * @param propertyKey The property key for the target.
236
+ * @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.
237
+ * @example
238
+ *
239
+ * ```typescript
240
+ * class Example {
241
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
242
+ * // static staticProperty;
243
+ * // property;
244
+ *
245
+ * static staticMethod(p) { }
246
+ * method(p) { }
247
+ * }
248
+ *
249
+ * // constructor
250
+ * result = Metadata.has("custom:annotation", Example);
251
+ *
252
+ * // property (on constructor)
253
+ * result = Metadata.hasOwn("custom:annotation", Example, "staticProperty");
254
+ *
255
+ * // property (on prototype)
256
+ * result = Metadata.hasOwn("custom:annotation", Example.prototype, "property");
257
+ *
258
+ * // method (on constructor)
259
+ * result = Metadata.hasOwn("custom:annotation", Example, "staticMethod");
260
+ *
261
+ * // method (on prototype)
262
+ * result = Metadata.hasOwn("custom:annotation", Example.prototype, "method");
263
+ * ```
264
+ *
265
+ */
266
+ static hasOwn(key: string, target: any, propertyKey?: string | symbol): boolean;
267
+ /**
268
+ * Deletes the metadata entry from the target object with the provided key.
269
+ * @param key A key used to store and retrieve metadata.
270
+ * @param target The target object on which the metadata is defined.
271
+ * @param propertyKey The property key for the target.
272
+ * @returns `true` if the metadata entry was found and deleted; otherwise, false.
273
+ * @example
274
+ *
275
+ * ```typescript
276
+ * class Example {
277
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
278
+ * // static staticProperty;
279
+ * // property;
280
+ *
281
+ * static staticMethod(p) { }
282
+ * method(p) { }
283
+ * }
284
+ *
285
+ * // constructor
286
+ * result = Metadata.delete("custom:annotation", Example);
287
+ *
288
+ * // property (on constructor)
289
+ * result = Metadata.delete("custom:annotation", Example, "staticProperty");
290
+ *
291
+ * // property (on prototype)
292
+ * result = Metadata.delete("custom:annotation", Example.prototype, "property");
293
+ *
294
+ * // method (on constructor)
295
+ * result = Metadata.delete("custom:annotation", Example, "staticMethod");
296
+ *
297
+ * // method (on prototype)
298
+ * result = Metadata.delete("custom:annotation", Example.prototype, "method");
299
+ * ```
300
+ *
301
+ */
302
+ static delete(key: string, target: any, propertyKey?: string | symbol): boolean;
303
+ /**
304
+ * Set the metadata value for the provided metadata DESIGN_PARAM_TYPES on the target object or its prototype chain.
305
+ * @param target The target object on which the metadata is defined.
306
+ * @param propertyKey The property key for the target.
307
+ * @param value A value that contains attached metadata.
308
+ * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
309
+ * @example
310
+ *
311
+ * ```typescript
312
+ * class Example {
313
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
314
+ * // static staticProperty;
315
+ * // property;
316
+ *
317
+ * static staticMethod(p) { }
318
+ * method(p) { }
319
+ * }
320
+ *
321
+ * // on contructor
322
+ * result = Metadata.setParamTypes(Example, undefined, [Object]);
323
+ *
324
+ * // property (on constructor)
325
+ * result = Metadata.setParamTypes(Example, "staticProperty", [Object]);
326
+ *
327
+ * // property (on prototype)
328
+ * result = Metadata.setParamTypes(Example.prototype, "property", [Object]);
329
+ *
330
+ * // method (on constructor)
331
+ * result = Metadata.setParamTypes(Example, "staticMethod", [Object]);
332
+ *
333
+ * // method (on prototype)
334
+ * result = Metadata.setParamTypes(Example.prototype, "method", [Object]);
335
+ * ```
336
+ *
337
+ */
338
+ static setParamTypes(target: any, propertyKey: string | symbol, value: any): void;
339
+ /**
340
+ * Get all metadata for a metadataKey.
341
+ * @param metadataKey
342
+ */
343
+ static getTargetsFromPropertyKey: (metadataKey: string | symbol) => any[];
344
+ /**
345
+ * Define a unique metadata entry on the target.
346
+ * @param key A key used to store and retrieve metadata.
347
+ * @param value A value that contains attached metadata.
348
+ * @param target The target object on which to define metadata.
349
+ * @param propertyKey The property key for the target.
350
+ * @example
351
+ *
352
+ * ```typescript
353
+ * class Example {
354
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
355
+ * // static staticProperty;
356
+ * // property;
357
+ *
358
+ * static staticMethod(p) { }
359
+ * method(p) { }
360
+ * }
361
+ *
362
+ * // constructor
363
+ * Reflect.defineMetadata("custom:annotation", options, Example);
364
+ *
365
+ * // property (on constructor)
366
+ * Reflect.defineMetadata("custom:annotation", Number, Example, "staticProperty");
367
+ *
368
+ * // property (on prototype)
369
+ * Reflect.defineMetadata("custom:annotation", Number, Example.prototype, "property");
370
+ *
371
+ * // method (on constructor)
372
+ * Reflect.defineMetadata("custom:annotation", Number, Example, "staticMethod");
373
+ *
374
+ * // method (on prototype)
375
+ * Reflect.defineMetadata("custom:annotation", Number, Example.prototype, "method");
376
+ *
377
+ * // decorator factory as metadata-producing annotation.
378
+ * function MyAnnotation(options): PropertyDecorator {
379
+ * return (target, key) => Reflect.defineMetadata("custom:annotation", options, target, key);
380
+ * }
381
+ * ```
382
+ *
383
+ */
384
+ static set(key: string, value: any, target: any, propertyKey?: string | symbol): void;
385
+ /**
386
+ * Gets the metadata value for the provided metadata DESIGN_PARAM_TYPES on the target object or its prototype chain.
387
+ * @param targetPrototype
388
+ * @param propertyKey The property key for the target.
389
+ * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
390
+ * @example
391
+ *
392
+ * ```typescript
393
+ * class Example {
394
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
395
+ * // static staticProperty;
396
+ * // property;
397
+ *
398
+ * static staticMethod(p) { }
399
+ * method(p) { }
400
+ * }
401
+ *
402
+ * // on contructor
403
+ * result = Metadata.getParamTypes(Example.prototype);
404
+ *
405
+ * // property (on constructor)
406
+ * result = Metadata.getParamTypes(Example.prototype, "staticProperty");
407
+ *
408
+ * // method (on constructor)
409
+ * result = Metadata.getParamTypes(Example.prototype, "staticMethod");
410
+ * ```
411
+ *
412
+ */
413
+ static getParamTypes(targetPrototype: any, propertyKey?: string | symbol): any[];
414
+ /**
415
+ * Gets the metadata value for the provided metadata DESIGN_PARAM_TYPES on the target object or its prototype chain.
416
+ * @param target The target object on which the metadata is defined.
417
+ * @param propertyKey The property key for the target.
418
+ * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
419
+ * @example
420
+ *
421
+ * ```typescript
422
+ * class Example {
423
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
424
+ * // static staticProperty;
425
+ * // property;
426
+ *
427
+ * static staticMethod(p) { }
428
+ * method(p) { }
429
+ * }
430
+ *
431
+ * // on contructor
432
+ * result = Metadata.getParamTypes(Example);
433
+ *
434
+ * // property (on constructor)
435
+ * result = Metadata.getParamTypes(Example, "staticProperty");
436
+ *
437
+ * // method (on constructor)
438
+ * result = Metadata.getParamTypes(Example, "staticMethod");
439
+ * ```
440
+ *
441
+ */
442
+ static getOwnParamTypes(target: any, propertyKey?: string | symbol): any[];
443
+ static getParamDecoratorFunc(target: Type, propertyKey: string): {
444
+ [key: number]: {
445
+ fun: Function;
446
+ param?: any;
447
+ };
448
+ };
449
+ }