@tsed/core 6.88.0 → 6.91.0

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 (504) hide show
  1. package/lib/{decorators → cjs/decorators}/configurable.d.ts +0 -0
  2. package/lib/cjs/decorators/configurable.js +18 -0
  3. package/lib/cjs/decorators/configurable.js.map +1 -0
  4. package/lib/{decorators → cjs/decorators}/deprecated.d.ts +0 -0
  5. package/lib/cjs/decorators/deprecated.js +43 -0
  6. package/lib/cjs/decorators/deprecated.js.map +1 -0
  7. package/lib/{decorators → cjs/decorators}/enumerable.d.ts +0 -0
  8. package/lib/cjs/decorators/enumerable.js +18 -0
  9. package/lib/cjs/decorators/enumerable.js.map +1 -0
  10. package/lib/{decorators → cjs/decorators}/index.d.ts +0 -0
  11. package/lib/cjs/decorators/index.js +18 -0
  12. package/lib/cjs/decorators/index.js.map +1 -0
  13. package/lib/{decorators → cjs/decorators}/notConfigurable.d.ts +0 -0
  14. package/lib/cjs/decorators/notConfigurable.js +13 -0
  15. package/lib/cjs/decorators/notConfigurable.js.map +1 -0
  16. package/lib/{decorators → cjs/decorators}/notEnumerable.d.ts +0 -0
  17. package/lib/cjs/decorators/notEnumerable.js +13 -0
  18. package/lib/cjs/decorators/notEnumerable.js.map +1 -0
  19. package/lib/{decorators → cjs/decorators}/readOnly.d.ts +0 -0
  20. package/lib/cjs/decorators/readOnly.js +13 -0
  21. package/lib/cjs/decorators/readOnly.js.map +1 -0
  22. package/lib/{decorators → cjs/decorators}/storeFn.d.ts +0 -0
  23. package/lib/cjs/decorators/storeFn.js +22 -0
  24. package/lib/cjs/decorators/storeFn.js.map +1 -0
  25. package/lib/{decorators → cjs/decorators}/storeMerge.d.ts +0 -0
  26. package/lib/cjs/decorators/storeMerge.js +11 -0
  27. package/lib/cjs/decorators/storeMerge.js.map +1 -0
  28. package/lib/{decorators → cjs/decorators}/storeSet.d.ts +0 -0
  29. package/lib/cjs/decorators/storeSet.js +11 -0
  30. package/lib/cjs/decorators/storeSet.js.map +1 -0
  31. package/lib/{decorators → cjs/decorators}/writable.d.ts +0 -0
  32. package/lib/cjs/decorators/writable.js +18 -0
  33. package/lib/cjs/decorators/writable.js.map +1 -0
  34. package/lib/{domain → cjs/domain}/AnyToPromise.d.ts +0 -0
  35. package/lib/cjs/domain/AnyToPromise.js +148 -0
  36. package/lib/cjs/domain/AnyToPromise.js.map +1 -0
  37. package/lib/{domain → cjs/domain}/DecoratorTypes.d.ts +0 -0
  38. package/lib/cjs/domain/DecoratorTypes.js +15 -0
  39. package/lib/cjs/domain/DecoratorTypes.js.map +1 -0
  40. package/lib/{domain → cjs/domain}/Env.d.ts +0 -0
  41. package/lib/cjs/domain/Env.js +19 -0
  42. package/lib/cjs/domain/Env.js.map +1 -0
  43. package/lib/{domain → cjs/domain}/Hooks.d.ts +0 -0
  44. package/lib/cjs/domain/Hooks.js +89 -0
  45. package/lib/cjs/domain/Hooks.js.map +1 -0
  46. package/lib/{domain → cjs/domain}/Metadata.d.ts +0 -0
  47. package/lib/cjs/domain/Metadata.js +508 -0
  48. package/lib/cjs/domain/Metadata.js.map +1 -0
  49. package/lib/{domain → cjs/domain}/Store.d.ts +0 -0
  50. package/lib/cjs/domain/Store.js +157 -0
  51. package/lib/cjs/domain/Store.js.map +1 -0
  52. package/lib/{domain → cjs/domain}/Type.d.ts +0 -0
  53. package/lib/cjs/domain/Type.js +7 -0
  54. package/lib/cjs/domain/Type.js.map +1 -0
  55. package/lib/{domain → cjs/domain}/index.d.ts +0 -0
  56. package/lib/cjs/domain/index.js +11 -0
  57. package/lib/cjs/domain/index.js.map +1 -0
  58. package/lib/{errors → cjs/errors}/UnsupportedDecoratorType.d.ts +0 -0
  59. package/lib/cjs/errors/UnsupportedDecoratorType.js +21 -0
  60. package/lib/cjs/errors/UnsupportedDecoratorType.js.map +1 -0
  61. package/lib/{index.d.ts → cjs/index.d.ts} +0 -0
  62. package/lib/cjs/index.js +9 -0
  63. package/lib/cjs/index.js.map +1 -0
  64. package/lib/{interfaces → cjs/interfaces}/AnyDecorator.d.ts +0 -0
  65. package/lib/cjs/interfaces/AnyDecorator.js +3 -0
  66. package/lib/cjs/interfaces/AnyDecorator.js.map +1 -0
  67. package/lib/{interfaces → cjs/interfaces}/DecoratorParameters.d.ts +0 -0
  68. package/lib/cjs/interfaces/DecoratorParameters.js +3 -0
  69. package/lib/cjs/interfaces/DecoratorParameters.js.map +1 -0
  70. package/lib/{interfaces → cjs/interfaces}/HashOf.d.ts +0 -0
  71. package/lib/cjs/interfaces/HashOf.js +3 -0
  72. package/lib/cjs/interfaces/HashOf.js.map +1 -0
  73. package/lib/{interfaces → cjs/interfaces}/MetadataTypes.d.ts +0 -0
  74. package/lib/cjs/interfaces/MetadataTypes.js +3 -0
  75. package/lib/cjs/interfaces/MetadataTypes.js.map +1 -0
  76. package/lib/{interfaces → cjs/interfaces}/ValueOf.d.ts +0 -0
  77. package/lib/cjs/interfaces/ValueOf.js +3 -0
  78. package/lib/cjs/interfaces/ValueOf.js.map +1 -0
  79. package/lib/{interfaces → cjs/interfaces}/index.d.ts +0 -0
  80. package/lib/cjs/interfaces/index.js +3 -0
  81. package/lib/cjs/interfaces/index.js.map +1 -0
  82. package/lib/{utils → cjs/utils}/catchError.d.ts +0 -0
  83. package/lib/cjs/utils/catchError.js +22 -0
  84. package/lib/cjs/utils/catchError.js.map +1 -0
  85. package/lib/{utils → cjs/utils}/decorators/decorateMethodsOf.d.ts +0 -0
  86. package/lib/cjs/utils/decorators/decorateMethodsOf.js +23 -0
  87. package/lib/cjs/utils/decorators/decorateMethodsOf.js.map +1 -0
  88. package/lib/{utils → cjs/utils}/decorators/decoratorArgs.d.ts +0 -0
  89. package/lib/cjs/utils/decorators/decoratorArgs.js +9 -0
  90. package/lib/cjs/utils/decorators/decoratorArgs.js.map +1 -0
  91. package/lib/{utils → cjs/utils}/decorators/decoratorTypeOf.d.ts +0 -0
  92. package/lib/cjs/utils/decorators/decoratorTypeOf.js +23 -0
  93. package/lib/cjs/utils/decorators/decoratorTypeOf.js.map +1 -0
  94. package/lib/{utils → cjs/utils}/decorators/inheritedDescriptorOf.d.ts +0 -0
  95. package/lib/cjs/utils/decorators/inheritedDescriptorOf.js +15 -0
  96. package/lib/cjs/utils/decorators/inheritedDescriptorOf.js.map +1 -0
  97. package/lib/{utils → cjs/utils}/decorators/useDecorators.d.ts +0 -0
  98. package/lib/cjs/utils/decorators/useDecorators.js +14 -0
  99. package/lib/cjs/utils/decorators/useDecorators.js.map +1 -0
  100. package/lib/{utils → cjs/utils}/decorators/useMethodDecorators.d.ts +0 -0
  101. package/lib/cjs/utils/decorators/useMethodDecorators.js +15 -0
  102. package/lib/cjs/utils/decorators/useMethodDecorators.js.map +1 -0
  103. package/lib/{utils → cjs/utils}/imports/importPackage.d.ts +0 -0
  104. package/lib/cjs/utils/imports/importPackage.js +35 -0
  105. package/lib/cjs/utils/imports/importPackage.js.map +1 -0
  106. package/lib/{utils → cjs/utils}/index.d.ts +0 -0
  107. package/lib/cjs/utils/index.js +18 -0
  108. package/lib/cjs/utils/index.js.map +1 -0
  109. package/lib/{utils → cjs/utils}/objects/ancestorOf.d.ts +0 -0
  110. package/lib/cjs/utils/objects/ancestorOf.js +12 -0
  111. package/lib/cjs/utils/objects/ancestorOf.js.map +1 -0
  112. package/lib/{utils → cjs/utils}/objects/ancestorsOf.d.ts +0 -0
  113. package/lib/cjs/utils/objects/ancestorsOf.js +22 -0
  114. package/lib/cjs/utils/objects/ancestorsOf.js.map +1 -0
  115. package/lib/{utils → cjs/utils}/objects/classOf.d.ts +0 -0
  116. package/lib/cjs/utils/objects/classOf.js +23 -0
  117. package/lib/cjs/utils/objects/classOf.js.map +1 -0
  118. package/lib/{utils → cjs/utils}/objects/cleanObject.d.ts +0 -0
  119. package/lib/cjs/utils/objects/cleanObject.js +24 -0
  120. package/lib/cjs/utils/objects/cleanObject.js.map +1 -0
  121. package/lib/{utils → cjs/utils}/objects/constructorOf.d.ts +0 -0
  122. package/lib/cjs/utils/objects/constructorOf.js +20 -0
  123. package/lib/cjs/utils/objects/constructorOf.js.map +1 -0
  124. package/lib/{utils → cjs/utils}/objects/createInstance.d.ts +0 -0
  125. package/lib/cjs/utils/objects/createInstance.js +9 -0
  126. package/lib/cjs/utils/objects/createInstance.js.map +1 -0
  127. package/lib/{utils → cjs/utils}/objects/deepClone.d.ts +0 -0
  128. package/lib/cjs/utils/objects/deepClone.js +57 -0
  129. package/lib/cjs/utils/objects/deepClone.js.map +1 -0
  130. package/lib/{utils → cjs/utils}/objects/deepExtends.d.ts +0 -0
  131. package/lib/cjs/utils/objects/deepExtends.js +79 -0
  132. package/lib/cjs/utils/objects/deepExtends.js.map +1 -0
  133. package/lib/{utils → cjs/utils}/objects/deepMerge.d.ts +0 -0
  134. package/lib/cjs/utils/objects/deepMerge.js +63 -0
  135. package/lib/cjs/utils/objects/deepMerge.js.map +1 -0
  136. package/lib/{utils → cjs/utils}/objects/descriptorOf.d.ts +0 -0
  137. package/lib/cjs/utils/objects/descriptorOf.js +19 -0
  138. package/lib/cjs/utils/objects/descriptorOf.js.map +1 -0
  139. package/lib/{utils → cjs/utils}/objects/getClassOrSymbol.d.ts +0 -0
  140. package/lib/cjs/utils/objects/getClassOrSymbol.js +10 -0
  141. package/lib/cjs/utils/objects/getClassOrSymbol.js.map +1 -0
  142. package/lib/{utils → cjs/utils}/objects/getConstructorArgNames.d.ts +0 -0
  143. package/lib/cjs/utils/objects/getConstructorArgNames.js +9 -0
  144. package/lib/cjs/utils/objects/getConstructorArgNames.js.map +1 -0
  145. package/lib/{utils → cjs/utils}/objects/getEnumerableKeys.d.ts +0 -0
  146. package/lib/cjs/utils/objects/getEnumerableKeys.js +20 -0
  147. package/lib/cjs/utils/objects/getEnumerableKeys.js.map +1 -0
  148. package/lib/{utils → cjs/utils}/objects/getValue.d.ts +0 -0
  149. package/lib/cjs/utils/objects/getValue.js +49 -0
  150. package/lib/cjs/utils/objects/getValue.js.map +1 -0
  151. package/lib/{utils → cjs/utils}/objects/index.d.ts +0 -0
  152. package/lib/cjs/utils/objects/index.js +47 -0
  153. package/lib/cjs/utils/objects/index.js.map +1 -0
  154. package/lib/{utils → cjs/utils}/objects/isArray.d.ts +0 -0
  155. package/lib/cjs/utils/objects/isArray.js +23 -0
  156. package/lib/cjs/utils/objects/isArray.js.map +1 -0
  157. package/lib/{utils → cjs/utils}/objects/isArrowFn.d.ts +0 -0
  158. package/lib/cjs/utils/objects/isArrowFn.js +9 -0
  159. package/lib/cjs/utils/objects/isArrowFn.js.map +1 -0
  160. package/lib/{utils → cjs/utils}/objects/isBoolean.d.ts +0 -0
  161. package/lib/cjs/utils/objects/isBoolean.js +17 -0
  162. package/lib/cjs/utils/objects/isBoolean.js.map +1 -0
  163. package/lib/{utils → cjs/utils}/objects/isClass.d.ts +0 -0
  164. package/lib/cjs/utils/objects/isClass.js +26 -0
  165. package/lib/cjs/utils/objects/isClass.js.map +1 -0
  166. package/lib/{utils → cjs/utils}/objects/isCollection.d.ts +0 -0
  167. package/lib/cjs/utils/objects/isCollection.js +22 -0
  168. package/lib/cjs/utils/objects/isCollection.js.map +1 -0
  169. package/lib/{utils → cjs/utils}/objects/isDate.d.ts +0 -0
  170. package/lib/cjs/utils/objects/isDate.js +13 -0
  171. package/lib/cjs/utils/objects/isDate.js.map +1 -0
  172. package/lib/{utils → cjs/utils}/objects/isEmpty.d.ts +0 -0
  173. package/lib/cjs/utils/objects/isEmpty.js +14 -0
  174. package/lib/cjs/utils/objects/isEmpty.js.map +1 -0
  175. package/lib/{utils → cjs/utils}/objects/isEnumerable.d.ts +0 -0
  176. package/lib/cjs/utils/objects/isEnumerable.js +22 -0
  177. package/lib/cjs/utils/objects/isEnumerable.js.map +1 -0
  178. package/lib/{utils → cjs/utils}/objects/isFunction.d.ts +0 -0
  179. package/lib/cjs/utils/objects/isFunction.js +8 -0
  180. package/lib/cjs/utils/objects/isFunction.js.map +1 -0
  181. package/lib/{utils → cjs/utils}/objects/isInheritedFrom.d.ts +0 -0
  182. package/lib/cjs/utils/objects/isInheritedFrom.js +26 -0
  183. package/lib/cjs/utils/objects/isInheritedFrom.js.map +1 -0
  184. package/lib/{utils → cjs/utils}/objects/isNil.d.ts +0 -0
  185. package/lib/cjs/utils/objects/isNil.js +8 -0
  186. package/lib/cjs/utils/objects/isNil.js.map +1 -0
  187. package/lib/{utils → cjs/utils}/objects/isNumber.d.ts +0 -0
  188. package/lib/cjs/utils/objects/isNumber.js +17 -0
  189. package/lib/cjs/utils/objects/isNumber.js.map +1 -0
  190. package/lib/{utils → cjs/utils}/objects/isObject.d.ts +0 -0
  191. package/lib/cjs/utils/objects/isObject.js +8 -0
  192. package/lib/cjs/utils/objects/isObject.js.map +1 -0
  193. package/lib/{utils → cjs/utils}/objects/isObservable.d.ts +0 -0
  194. package/lib/cjs/utils/objects/isObservable.js +8 -0
  195. package/lib/cjs/utils/objects/isObservable.js.map +1 -0
  196. package/lib/{utils → cjs/utils}/objects/isPlainObject.d.ts +0 -0
  197. package/lib/cjs/utils/objects/isPlainObject.js +18 -0
  198. package/lib/cjs/utils/objects/isPlainObject.js.map +1 -0
  199. package/lib/{utils → cjs/utils}/objects/isPrimitive.d.ts +0 -0
  200. package/lib/cjs/utils/objects/isPrimitive.js +30 -0
  201. package/lib/cjs/utils/objects/isPrimitive.js.map +1 -0
  202. package/lib/{utils → cjs/utils}/objects/isPromise.d.ts +0 -0
  203. package/lib/cjs/utils/objects/isPromise.js +16 -0
  204. package/lib/cjs/utils/objects/isPromise.js.map +1 -0
  205. package/lib/{utils → cjs/utils}/objects/isProtectedKey.d.ts +0 -0
  206. package/lib/cjs/utils/objects/isProtectedKey.js +12 -0
  207. package/lib/cjs/utils/objects/isProtectedKey.js.map +1 -0
  208. package/lib/{utils → cjs/utils}/objects/isSerializable.d.ts +0 -0
  209. package/lib/cjs/utils/objects/isSerializable.js +13 -0
  210. package/lib/cjs/utils/objects/isSerializable.js.map +1 -0
  211. package/lib/{utils → cjs/utils}/objects/isStream.d.ts +0 -0
  212. package/lib/cjs/utils/objects/isStream.js +8 -0
  213. package/lib/cjs/utils/objects/isStream.js.map +1 -0
  214. package/lib/{utils → cjs/utils}/objects/isString.d.ts +0 -0
  215. package/lib/cjs/utils/objects/isString.js +16 -0
  216. package/lib/cjs/utils/objects/isString.js.map +1 -0
  217. package/lib/{utils → cjs/utils}/objects/isSymbol.d.ts +0 -0
  218. package/lib/cjs/utils/objects/isSymbol.js +16 -0
  219. package/lib/cjs/utils/objects/isSymbol.js.map +1 -0
  220. package/lib/{utils → cjs/utils}/objects/methodsOf.d.ts +0 -0
  221. package/lib/cjs/utils/objects/methodsOf.js +25 -0
  222. package/lib/cjs/utils/objects/methodsOf.js.map +1 -0
  223. package/lib/{utils → cjs/utils}/objects/nameOf.d.ts +0 -0
  224. package/lib/cjs/utils/objects/nameOf.js +32 -0
  225. package/lib/cjs/utils/objects/nameOf.js.map +1 -0
  226. package/lib/{utils → cjs/utils}/objects/objectKeys.d.ts +0 -0
  227. package/lib/cjs/utils/objects/objectKeys.js +9 -0
  228. package/lib/cjs/utils/objects/objectKeys.js.map +1 -0
  229. package/lib/{utils → cjs/utils}/objects/primitiveOf.d.ts +0 -0
  230. package/lib/cjs/utils/objects/primitiveOf.js +20 -0
  231. package/lib/cjs/utils/objects/primitiveOf.js.map +1 -0
  232. package/lib/{utils → cjs/utils}/objects/prototypeOf.d.ts +0 -0
  233. package/lib/cjs/utils/objects/prototypeOf.js +14 -0
  234. package/lib/cjs/utils/objects/prototypeOf.js.map +1 -0
  235. package/lib/{utils → cjs/utils}/objects/setValue.d.ts +0 -0
  236. package/lib/cjs/utils/objects/setValue.js +34 -0
  237. package/lib/cjs/utils/objects/setValue.js.map +1 -0
  238. package/lib/{utils → cjs/utils}/objects/toMap.d.ts +0 -0
  239. package/lib/cjs/utils/objects/toMap.js +32 -0
  240. package/lib/cjs/utils/objects/toMap.js.map +1 -0
  241. package/lib/{utils → cjs/utils}/objects/toStringConstructor.d.ts +0 -0
  242. package/lib/cjs/utils/objects/toStringConstructor.js +12 -0
  243. package/lib/cjs/utils/objects/toStringConstructor.js.map +1 -0
  244. package/lib/{utils → cjs/utils}/proxyDelegation.d.ts +0 -0
  245. package/lib/cjs/utils/proxyDelegation.js +54 -0
  246. package/lib/cjs/utils/proxyDelegation.js.map +1 -0
  247. package/lib/{utils → cjs/utils}/uniq.d.ts +0 -0
  248. package/lib/cjs/utils/uniq.js +16 -0
  249. package/lib/cjs/utils/uniq.js.map +1 -0
  250. package/lib/esm/decorators/configurable.js +14 -0
  251. package/lib/esm/decorators/configurable.js.map +1 -0
  252. package/lib/esm/decorators/deprecated.js +39 -0
  253. package/lib/esm/decorators/deprecated.js.map +1 -0
  254. package/lib/esm/decorators/enumerable.js +14 -0
  255. package/lib/esm/decorators/enumerable.js.map +1 -0
  256. package/lib/esm/decorators/index.js +15 -0
  257. package/lib/esm/decorators/index.js.map +1 -0
  258. package/lib/esm/decorators/notConfigurable.js +9 -0
  259. package/lib/esm/decorators/notConfigurable.js.map +1 -0
  260. package/lib/esm/decorators/notEnumerable.js +9 -0
  261. package/lib/esm/decorators/notEnumerable.js.map +1 -0
  262. package/lib/esm/decorators/readOnly.js +9 -0
  263. package/lib/esm/decorators/readOnly.js.map +1 -0
  264. package/lib/esm/decorators/storeFn.js +18 -0
  265. package/lib/esm/decorators/storeFn.js.map +1 -0
  266. package/lib/esm/decorators/storeMerge.js +7 -0
  267. package/lib/esm/decorators/storeMerge.js.map +1 -0
  268. package/lib/esm/decorators/storeSet.js +7 -0
  269. package/lib/esm/decorators/storeSet.js.map +1 -0
  270. package/lib/esm/decorators/writable.js +14 -0
  271. package/lib/esm/decorators/writable.js.map +1 -0
  272. package/lib/esm/domain/AnyToPromise.js +144 -0
  273. package/lib/esm/domain/AnyToPromise.js.map +1 -0
  274. package/lib/esm/domain/DecoratorTypes.js +12 -0
  275. package/lib/esm/domain/DecoratorTypes.js.map +1 -0
  276. package/lib/esm/domain/Env.js +16 -0
  277. package/lib/esm/domain/Env.js.map +1 -0
  278. package/lib/esm/domain/Hooks.js +85 -0
  279. package/lib/esm/domain/Hooks.js.map +1 -0
  280. package/lib/esm/domain/Metadata.js +504 -0
  281. package/lib/esm/domain/Metadata.js.map +1 -0
  282. package/lib/esm/domain/Store.js +153 -0
  283. package/lib/esm/domain/Store.js.map +1 -0
  284. package/lib/esm/domain/Type.js +4 -0
  285. package/lib/esm/domain/Type.js.map +1 -0
  286. package/lib/esm/domain/index.js +8 -0
  287. package/lib/esm/domain/index.js.map +1 -0
  288. package/lib/esm/errors/UnsupportedDecoratorType.js +17 -0
  289. package/lib/esm/errors/UnsupportedDecoratorType.js.map +1 -0
  290. package/lib/esm/index.js +6 -0
  291. package/lib/esm/index.js.map +1 -0
  292. package/lib/esm/interfaces/AnyDecorator.js +2 -0
  293. package/lib/esm/interfaces/AnyDecorator.js.map +1 -0
  294. package/lib/esm/interfaces/DecoratorParameters.js +2 -0
  295. package/lib/esm/interfaces/DecoratorParameters.js.map +1 -0
  296. package/lib/esm/interfaces/HashOf.js +2 -0
  297. package/lib/esm/interfaces/HashOf.js.map +1 -0
  298. package/lib/esm/interfaces/MetadataTypes.js +2 -0
  299. package/lib/esm/interfaces/MetadataTypes.js.map +1 -0
  300. package/lib/esm/interfaces/ValueOf.js +2 -0
  301. package/lib/esm/interfaces/ValueOf.js.map +1 -0
  302. package/lib/esm/interfaces/index.js +2 -0
  303. package/lib/esm/interfaces/index.js.map +1 -0
  304. package/lib/esm/utils/catchError.js +17 -0
  305. package/lib/esm/utils/catchError.js.map +1 -0
  306. package/lib/esm/utils/decorators/decorateMethodsOf.js +19 -0
  307. package/lib/esm/utils/decorators/decorateMethodsOf.js.map +1 -0
  308. package/lib/esm/utils/decorators/decoratorArgs.js +5 -0
  309. package/lib/esm/utils/decorators/decoratorArgs.js.map +1 -0
  310. package/lib/esm/utils/decorators/decoratorTypeOf.js +19 -0
  311. package/lib/esm/utils/decorators/decoratorTypeOf.js.map +1 -0
  312. package/lib/esm/utils/decorators/inheritedDescriptorOf.js +11 -0
  313. package/lib/esm/utils/decorators/inheritedDescriptorOf.js.map +1 -0
  314. package/lib/esm/utils/decorators/useDecorators.js +10 -0
  315. package/lib/esm/utils/decorators/useDecorators.js.map +1 -0
  316. package/lib/esm/utils/decorators/useMethodDecorators.js +10 -0
  317. package/lib/esm/utils/decorators/useMethodDecorators.js.map +1 -0
  318. package/lib/esm/utils/imports/importPackage.js +12 -0
  319. package/lib/esm/utils/imports/importPackage.js.map +1 -0
  320. package/lib/esm/utils/index.js +15 -0
  321. package/lib/esm/utils/index.js.map +1 -0
  322. package/lib/esm/utils/objects/ancestorOf.js +7 -0
  323. package/lib/esm/utils/objects/ancestorOf.js.map +1 -0
  324. package/lib/esm/utils/objects/ancestorsOf.js +18 -0
  325. package/lib/esm/utils/objects/ancestorsOf.js.map +1 -0
  326. package/lib/esm/utils/objects/classOf.js +18 -0
  327. package/lib/esm/utils/objects/classOf.js.map +1 -0
  328. package/lib/esm/utils/objects/cleanObject.js +20 -0
  329. package/lib/esm/utils/objects/cleanObject.js.map +1 -0
  330. package/lib/esm/utils/objects/constructorOf.js +15 -0
  331. package/lib/esm/utils/objects/constructorOf.js.map +1 -0
  332. package/lib/esm/utils/objects/createInstance.js +5 -0
  333. package/lib/esm/utils/objects/createInstance.js.map +1 -0
  334. package/lib/esm/utils/objects/deepClone.js +53 -0
  335. package/lib/esm/utils/objects/deepClone.js.map +1 -0
  336. package/lib/esm/utils/objects/deepExtends.js +75 -0
  337. package/lib/esm/utils/objects/deepExtends.js.map +1 -0
  338. package/lib/esm/utils/objects/deepMerge.js +58 -0
  339. package/lib/esm/utils/objects/deepMerge.js.map +1 -0
  340. package/lib/esm/utils/objects/descriptorOf.js +14 -0
  341. package/lib/esm/utils/objects/descriptorOf.js.map +1 -0
  342. package/lib/esm/utils/objects/getClassOrSymbol.js +6 -0
  343. package/lib/esm/utils/objects/getClassOrSymbol.js.map +1 -0
  344. package/lib/esm/utils/objects/getConstructorArgNames.js +5 -0
  345. package/lib/esm/utils/objects/getConstructorArgNames.js.map +1 -0
  346. package/lib/esm/utils/objects/getEnumerableKeys.js +16 -0
  347. package/lib/esm/utils/objects/getEnumerableKeys.js.map +1 -0
  348. package/lib/esm/utils/objects/getValue.js +45 -0
  349. package/lib/esm/utils/objects/getValue.js.map +1 -0
  350. package/lib/esm/utils/objects/index.js +44 -0
  351. package/lib/esm/utils/objects/index.js.map +1 -0
  352. package/lib/esm/utils/objects/isArray.js +18 -0
  353. package/lib/esm/utils/objects/isArray.js.map +1 -0
  354. package/lib/esm/utils/objects/isArrowFn.js +5 -0
  355. package/lib/esm/utils/objects/isArrowFn.js.map +1 -0
  356. package/lib/esm/utils/objects/isBoolean.js +12 -0
  357. package/lib/esm/utils/objects/isBoolean.js.map +1 -0
  358. package/lib/esm/utils/objects/isClass.js +22 -0
  359. package/lib/esm/utils/objects/isClass.js.map +1 -0
  360. package/lib/esm/utils/objects/isCollection.js +18 -0
  361. package/lib/esm/utils/objects/isCollection.js.map +1 -0
  362. package/lib/esm/utils/objects/isDate.js +9 -0
  363. package/lib/esm/utils/objects/isDate.js.map +1 -0
  364. package/lib/esm/utils/objects/isEmpty.js +10 -0
  365. package/lib/esm/utils/objects/isEmpty.js.map +1 -0
  366. package/lib/esm/utils/objects/isEnumerable.js +18 -0
  367. package/lib/esm/utils/objects/isEnumerable.js.map +1 -0
  368. package/lib/esm/utils/objects/isFunction.js +4 -0
  369. package/lib/esm/utils/objects/isFunction.js.map +1 -0
  370. package/lib/esm/utils/objects/isInheritedFrom.js +22 -0
  371. package/lib/esm/utils/objects/isInheritedFrom.js.map +1 -0
  372. package/lib/esm/utils/objects/isNil.js +4 -0
  373. package/lib/esm/utils/objects/isNil.js.map +1 -0
  374. package/lib/esm/utils/objects/isNumber.js +12 -0
  375. package/lib/esm/utils/objects/isNumber.js.map +1 -0
  376. package/lib/esm/utils/objects/isObject.js +4 -0
  377. package/lib/esm/utils/objects/isObject.js.map +1 -0
  378. package/lib/esm/utils/objects/isObservable.js +4 -0
  379. package/lib/esm/utils/objects/isObservable.js.map +1 -0
  380. package/lib/esm/utils/objects/isPlainObject.js +13 -0
  381. package/lib/esm/utils/objects/isPlainObject.js.map +1 -0
  382. package/lib/esm/utils/objects/isPrimitive.js +24 -0
  383. package/lib/esm/utils/objects/isPrimitive.js.map +1 -0
  384. package/lib/esm/utils/objects/isPromise.js +12 -0
  385. package/lib/esm/utils/objects/isPromise.js.map +1 -0
  386. package/lib/esm/utils/objects/isProtectedKey.js +8 -0
  387. package/lib/esm/utils/objects/isProtectedKey.js.map +1 -0
  388. package/lib/esm/utils/objects/isSerializable.js +9 -0
  389. package/lib/esm/utils/objects/isSerializable.js.map +1 -0
  390. package/lib/esm/utils/objects/isStream.js +4 -0
  391. package/lib/esm/utils/objects/isStream.js.map +1 -0
  392. package/lib/esm/utils/objects/isString.js +11 -0
  393. package/lib/esm/utils/objects/isString.js.map +1 -0
  394. package/lib/esm/utils/objects/isSymbol.js +11 -0
  395. package/lib/esm/utils/objects/isSymbol.js.map +1 -0
  396. package/lib/esm/utils/objects/methodsOf.js +21 -0
  397. package/lib/esm/utils/objects/methodsOf.js.map +1 -0
  398. package/lib/esm/utils/objects/nameOf.js +26 -0
  399. package/lib/esm/utils/objects/nameOf.js.map +1 -0
  400. package/lib/esm/utils/objects/objectKeys.js +5 -0
  401. package/lib/esm/utils/objects/objectKeys.js.map +1 -0
  402. package/lib/esm/utils/objects/primitiveOf.js +16 -0
  403. package/lib/esm/utils/objects/primitiveOf.js.map +1 -0
  404. package/lib/esm/utils/objects/prototypeOf.js +10 -0
  405. package/lib/esm/utils/objects/prototypeOf.js.map +1 -0
  406. package/lib/esm/utils/objects/setValue.js +30 -0
  407. package/lib/esm/utils/objects/setValue.js.map +1 -0
  408. package/lib/esm/utils/objects/toMap.js +28 -0
  409. package/lib/esm/utils/objects/toMap.js.map +1 -0
  410. package/lib/esm/utils/objects/toStringConstructor.js +8 -0
  411. package/lib/esm/utils/objects/toStringConstructor.js.map +1 -0
  412. package/lib/esm/utils/proxyDelegation.js +50 -0
  413. package/lib/esm/utils/proxyDelegation.js.map +1 -0
  414. package/lib/esm/utils/uniq.js +11 -0
  415. package/lib/esm/utils/uniq.js.map +1 -0
  416. package/lib/types/decorators/configurable.d.ts +2 -0
  417. package/lib/types/decorators/deprecated.d.ts +32 -0
  418. package/lib/types/decorators/enumerable.d.ts +2 -0
  419. package/lib/types/decorators/index.d.ts +14 -0
  420. package/lib/types/decorators/notConfigurable.d.ts +2 -0
  421. package/lib/types/decorators/notEnumerable.d.ts +2 -0
  422. package/lib/types/decorators/readOnly.d.ts +2 -0
  423. package/lib/types/decorators/storeFn.d.ts +9 -0
  424. package/lib/types/decorators/storeMerge.d.ts +1 -0
  425. package/lib/types/decorators/storeSet.d.ts +1 -0
  426. package/lib/types/decorators/writable.d.ts +2 -0
  427. package/lib/types/domain/AnyToPromise.d.ts +42 -0
  428. package/lib/types/domain/DecoratorTypes.d.ts +10 -0
  429. package/lib/types/domain/Env.d.ts +13 -0
  430. package/lib/types/domain/Hooks.d.ts +45 -0
  431. package/lib/types/domain/Metadata.d.ts +442 -0
  432. package/lib/types/domain/Store.d.ts +69 -0
  433. package/lib/types/domain/Type.d.ts +11 -0
  434. package/lib/types/domain/index.d.ts +7 -0
  435. package/lib/types/errors/UnsupportedDecoratorType.d.ts +5 -0
  436. package/lib/types/index.d.ts +6 -0
  437. package/lib/types/interfaces/AnyDecorator.d.ts +1 -0
  438. package/lib/types/interfaces/DecoratorParameters.d.ts +3 -0
  439. package/lib/types/interfaces/HashOf.d.ts +1 -0
  440. package/lib/types/interfaces/MetadataTypes.d.ts +5 -0
  441. package/lib/types/interfaces/ValueOf.d.ts +1 -0
  442. package/lib/types/interfaces/index.d.ts +4 -0
  443. package/lib/types/utils/catchError.d.ts +2 -0
  444. package/lib/types/utils/decorators/decorateMethodsOf.d.ts +1 -0
  445. package/lib/types/utils/decorators/decoratorArgs.d.ts +2 -0
  446. package/lib/types/utils/decorators/decoratorTypeOf.d.ts +2 -0
  447. package/lib/types/utils/decorators/inheritedDescriptorOf.d.ts +1 -0
  448. package/lib/types/utils/decorators/useDecorators.d.ts +2 -0
  449. package/lib/types/utils/decorators/useMethodDecorators.d.ts +3 -0
  450. package/lib/types/utils/imports/importPackage.d.ts +1 -0
  451. package/lib/types/utils/index.d.ts +12 -0
  452. package/lib/types/utils/objects/ancestorOf.d.ts +2 -0
  453. package/lib/types/utils/objects/ancestorsOf.d.ts +6 -0
  454. package/lib/types/utils/objects/classOf.d.ts +13 -0
  455. package/lib/types/utils/objects/cleanObject.d.ts +6 -0
  456. package/lib/types/utils/objects/constructorOf.d.ts +11 -0
  457. package/lib/types/utils/objects/createInstance.d.ts +1 -0
  458. package/lib/types/utils/objects/deepClone.d.ts +6 -0
  459. package/lib/types/utils/objects/deepExtends.d.ts +10 -0
  460. package/lib/types/utils/objects/deepMerge.d.ts +9 -0
  461. package/lib/types/utils/objects/descriptorOf.d.ts +8 -0
  462. package/lib/types/utils/objects/getClassOrSymbol.d.ts +1 -0
  463. package/lib/types/utils/objects/getConstructorArgNames.d.ts +1 -0
  464. package/lib/types/utils/objects/getEnumerableKeys.d.ts +5 -0
  465. package/lib/types/utils/objects/getValue.d.ts +32 -0
  466. package/lib/types/utils/objects/index.d.ts +43 -0
  467. package/lib/types/utils/objects/isArray.d.ts +13 -0
  468. package/lib/types/utils/objects/isArrowFn.d.ts +1 -0
  469. package/lib/types/utils/objects/isBoolean.d.ts +7 -0
  470. package/lib/types/utils/objects/isClass.d.ts +1 -0
  471. package/lib/types/utils/objects/isCollection.d.ts +6 -0
  472. package/lib/types/utils/objects/isDate.d.ts +6 -0
  473. package/lib/types/utils/objects/isEmpty.d.ts +6 -0
  474. package/lib/types/utils/objects/isEnumerable.d.ts +6 -0
  475. package/lib/types/utils/objects/isFunction.d.ts +1 -0
  476. package/lib/types/utils/objects/isInheritedFrom.d.ts +1 -0
  477. package/lib/types/utils/objects/isNil.d.ts +1 -0
  478. package/lib/types/utils/objects/isNumber.d.ts +7 -0
  479. package/lib/types/utils/objects/isObject.d.ts +1 -0
  480. package/lib/types/utils/objects/isObservable.d.ts +1 -0
  481. package/lib/types/utils/objects/isPlainObject.d.ts +7 -0
  482. package/lib/types/utils/objects/isPrimitive.d.ts +14 -0
  483. package/lib/types/utils/objects/isPromise.d.ts +7 -0
  484. package/lib/types/utils/objects/isProtectedKey.d.ts +5 -0
  485. package/lib/types/utils/objects/isSerializable.d.ts +1 -0
  486. package/lib/types/utils/objects/isStream.d.ts +1 -0
  487. package/lib/types/utils/objects/isString.d.ts +6 -0
  488. package/lib/types/utils/objects/isSymbol.d.ts +6 -0
  489. package/lib/types/utils/objects/methodsOf.d.ts +5 -0
  490. package/lib/types/utils/objects/nameOf.d.ts +14 -0
  491. package/lib/types/utils/objects/objectKeys.d.ts +1 -0
  492. package/lib/types/utils/objects/primitiveOf.d.ts +1 -0
  493. package/lib/types/utils/objects/prototypeOf.d.ts +6 -0
  494. package/lib/types/utils/objects/setValue.d.ts +1 -0
  495. package/lib/types/utils/objects/toMap.d.ts +3 -0
  496. package/lib/types/utils/objects/toStringConstructor.d.ts +1 -0
  497. package/lib/types/utils/proxyDelegation.d.ts +33 -0
  498. package/lib/types/utils/uniq.d.ts +2 -0
  499. package/package.json +10 -6
  500. package/tsconfig.compile.esm.json +23 -0
  501. package/lib/index.js +0 -2317
  502. package/lib/index.js.map +0 -1
  503. package/lib/index.modern.js +0 -2207
  504. package/lib/index.modern.js.map +0 -1
@@ -0,0 +1,10 @@
1
+ export declare enum DecoratorTypes {
2
+ PARAM = "parameter",
3
+ PARAM_CTOR = "parameter.constructor",
4
+ PARAM_STC = "parameter.static",
5
+ PROP = "property",
6
+ PROP_STC = "property.static",
7
+ METHOD = "method",
8
+ METHOD_STC = "method.static",
9
+ CLASS = "class"
10
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ *
3
+ */
4
+ export declare enum Env {
5
+ PROD = "production",
6
+ DEV = "development",
7
+ TEST = "test"
8
+ }
9
+ /**
10
+ * Fallback
11
+ * @type {Env}
12
+ */
13
+ export declare const EnvTypes: typeof Env;
@@ -0,0 +1,45 @@
1
+ export declare class Hooks {
2
+ private listeners;
3
+ /**
4
+ * Listen a hook event
5
+ * @param event
6
+ * @param cb
7
+ */
8
+ on(event: string, cb: Function): this;
9
+ /**
10
+ * Remove a listener attached to an event
11
+ * @param event
12
+ * @param cb
13
+ */
14
+ off(event: string, cb: Function): this;
15
+ /**
16
+ * Trigger an event and call listener.
17
+ * @param event
18
+ * @param args
19
+ * @param callThis
20
+ */
21
+ emit(event: string, args?: any[], callThis?: any): void;
22
+ /**
23
+ * Trigger an event, listener alter given value and return it.
24
+ * @param event
25
+ * @param value
26
+ * @param args
27
+ * @param callThis
28
+ */
29
+ alter(event: string, value: any, args?: any[], callThis?: any): any;
30
+ /**
31
+ * Trigger an event and call async listener.
32
+ * @param event
33
+ * @param args
34
+ * @param callThis
35
+ */
36
+ asyncEmit(event: string, args?: any[], callThis?: any): Promise<void>;
37
+ /**
38
+ * Trigger an event, async listener alter given value and return it.
39
+ * @param event
40
+ * @param value
41
+ * @param args
42
+ * @param callThis
43
+ */
44
+ asyncAlter(event: string, value: any, args?: string[], callThis?: any): Promise<any>;
45
+ }
@@ -0,0 +1,442 @@
1
+ import "reflect-metadata";
2
+ /**
3
+ * @stable
4
+ */
5
+ export declare class Metadata {
6
+ /**
7
+ * Gets the metadata value for the provided metadata key on the target object or its prototype chain.
8
+ * @param key A key used to store and retrieve metadata.
9
+ * @param target The target object on which the metadata is defined.
10
+ * @param propertyKey The property key for the target.
11
+ * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
12
+ * @example
13
+ *
14
+ * ```typescript
15
+ * class Example {
16
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
17
+ * // static staticProperty;
18
+ * // property;
19
+ *
20
+ * static staticMethod(p) { }
21
+ * method(p) { }
22
+ * }
23
+ *
24
+ * // constructor
25
+ * result = Metadata.get("custom:annotation", Example);
26
+ *
27
+ * // property (on constructor)
28
+ * result = Metadata.get("custom:annotation", Example, "staticProperty");
29
+ *
30
+ * // property (on prototype)
31
+ * result = Metadata.get("custom:annotation", Example.prototype, "property");
32
+ *
33
+ * // method (on constructor)
34
+ * result = Metadata.get("custom:annotation", Example, "staticMethod");
35
+ *
36
+ * // method (on prototype)
37
+ * result = Metadata.get("custom:annotation", Example.prototype, "method");
38
+ * ```
39
+ *
40
+ */
41
+ static get(key: string, target: any, propertyKey?: string | symbol): any;
42
+ /**
43
+ * Gets the metadata value for the provided metadata key on the target object or its prototype chain.
44
+ * @param key A key used to store and retrieve metadata.
45
+ * @param target The target object on which the metadata is defined.
46
+ * @param propertyKey The property key for the target.
47
+ * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
48
+ * @example
49
+ *
50
+ * ```typescript
51
+ * class Example {
52
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
53
+ * // static staticProperty;
54
+ * // property;
55
+ *
56
+ * static staticMethod(p) { }
57
+ * method(p) { }
58
+ * }
59
+ *
60
+ * // constructor
61
+ * result = Metadata.getOwn("custom:annotation", Example);
62
+ *
63
+ * // property (on constructor)
64
+ * result = Metadata.getOwn("custom:annotation", Example, "staticProperty");
65
+ *
66
+ * // property (on prototype)
67
+ * result = Metadata.getOwn("custom:annotation", Example.prototype, "property");
68
+ *
69
+ * // method (on constructor)
70
+ * result = Metadata.getOwn("custom:annotation", Example, "staticMethod");
71
+ *
72
+ * // method (on prototype)
73
+ * result = Metadata.getOwn("custom:annotation", Example.prototype, "method");
74
+ * ```
75
+ *
76
+ */
77
+ static getOwn(key: string, target: any, propertyKey?: string | symbol): any;
78
+ /**
79
+ * Gets the metadata value for the provided metadata DESIGN_TYPE on the target object or its prototype chain.
80
+ * @param target The target object on which the metadata is defined.
81
+ * @param propertyKey The property key for the target.
82
+ * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
83
+ * @example
84
+ *
85
+ * ```typescript
86
+ * class Example {
87
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
88
+ * // static staticProperty;
89
+ * // property;
90
+ *
91
+ * static staticMethod(p) { }
92
+ * method(p) { }
93
+ * }
94
+ *
95
+ * // on contructor
96
+ * result = Metadata.getType(Example);
97
+ *
98
+ * // property (on constructor)
99
+ * result = Metadata.getType(Example, "staticProperty");
100
+ *
101
+ * // method (on constructor)
102
+ * result = Metadata.getType(Example, "staticMethod");
103
+ * ```
104
+ *
105
+ */
106
+ static getType(target: any, propertyKey?: string | symbol): any;
107
+ /**
108
+ * Gets the metadata value for the provided metadata DESIGN_TYPE on the target object or its prototype chain.
109
+ * @param target The target object on which the metadata is defined.
110
+ * @param propertyKey The property key for the target.
111
+ * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
112
+ * @example
113
+ *
114
+ * ```typescript
115
+ * class Example {
116
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
117
+ * // static staticProperty;
118
+ * // property;
119
+ *
120
+ * static staticMethod(p) { }
121
+ * method(p) { }
122
+ * }
123
+ *
124
+ * // on contructor
125
+ * result = Metadata.getOwnType(Example);
126
+ *
127
+ * // property (on constructor)
128
+ * result = Metadata.getOwnType(Example, "staticProperty");
129
+ *
130
+ * // method (on constructor)
131
+ * result = Metadata.getOwnType(Example, "staticMethod");
132
+ * ```
133
+ *
134
+ */
135
+ static getOwnType(target: any, propertyKey?: string | symbol): any;
136
+ /**
137
+ * Gets the metadata value for the provided metadata DESIGN_RETURN_TYPE on the target object or its prototype chain.
138
+ * @param target The target object on which the metadata is defined.
139
+ * @param propertyKey The property key for the target.
140
+ * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
141
+ * @example
142
+ *
143
+ * ```typescript
144
+ * class Example {
145
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
146
+ * // static staticProperty;
147
+ * // property;
148
+ *
149
+ * static staticMethod(p) { }
150
+ * method(p) { }
151
+ * }
152
+ *
153
+ * // on contructor
154
+ * result = Metadata.getReturnType(Example);
155
+ *
156
+ * // property (on constructor)
157
+ * result = Metadata.getReturnType(Example, "staticProperty");
158
+ *
159
+ * // method (on constructor)
160
+ * result = Metadata.getReturnType(Example, "staticMethod");
161
+ * ```
162
+ *
163
+ */
164
+ static getReturnType(target: any, propertyKey?: string | symbol): any;
165
+ /**
166
+ * Gets the metadata value for the provided metadata DESIGN_RETURN_TYPE on the target object or its prototype chain.
167
+ * @param target The target object on which the metadata is defined.
168
+ * @param propertyKey The property key for the target.
169
+ * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
170
+ * @example
171
+ *
172
+ * ```typescript
173
+ * class Example {
174
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
175
+ * // static staticProperty;
176
+ * // property;
177
+ *
178
+ * static staticMethod(p) { }
179
+ * method(p) { }
180
+ * }
181
+ *
182
+ * // on contructor
183
+ * result = Metadata.getOwnReturnType(Example);
184
+ *
185
+ * // property (on constructor)
186
+ * result = Metadata.getOwnReturnType(Example, "staticProperty");
187
+ *
188
+ * // method (on constructor)
189
+ * result = Metadata.getOwnReturnType(Example, "staticMethod");
190
+ * ```
191
+ *
192
+ */
193
+ static getOwnReturnType(target: any, propertyKey?: string | symbol): any;
194
+ /**
195
+ * Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
196
+ * @param key A key used to store and retrieve metadata.
197
+ * @param target The target object on which the metadata is defined.
198
+ * @param propertyKey The property key for the target.
199
+ * @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.
200
+ * @example
201
+ *
202
+ * ```typescript
203
+ * class Example {
204
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
205
+ * // static staticProperty;
206
+ * // property;
207
+ *
208
+ * static staticMethod(p) { }
209
+ * method(p) { }
210
+ * }
211
+ *
212
+ * // constructor
213
+ * result = Metadata.has("custom:annotation", Example);
214
+ *
215
+ * // property (on constructor)
216
+ * result = Metadata.has("custom:annotation", Example, "staticProperty");
217
+ *
218
+ * // property (on prototype)
219
+ * result = Metadata.has("custom:annotation", Example.prototype, "property");
220
+ *
221
+ * // method (on constructor)
222
+ * result = Metadata.has("custom:annotation", Example, "staticMethod");
223
+ *
224
+ * // method (on prototype)
225
+ * result = Metadata.has("custom:annotation", Example.prototype, "method");
226
+ * ```
227
+ *
228
+ */
229
+ static has(key: string, target: any, propertyKey?: string | symbol): boolean;
230
+ /**
231
+ * Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
232
+ * @param key A key used to store and retrieve metadata.
233
+ * @param target The target object on which the metadata is defined.
234
+ * @param propertyKey The property key for the target.
235
+ * @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.
236
+ * @example
237
+ *
238
+ * ```typescript
239
+ * class Example {
240
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
241
+ * // static staticProperty;
242
+ * // property;
243
+ *
244
+ * static staticMethod(p) { }
245
+ * method(p) { }
246
+ * }
247
+ *
248
+ * // constructor
249
+ * result = Metadata.has("custom:annotation", Example);
250
+ *
251
+ * // property (on constructor)
252
+ * result = Metadata.hasOwn("custom:annotation", Example, "staticProperty");
253
+ *
254
+ * // property (on prototype)
255
+ * result = Metadata.hasOwn("custom:annotation", Example.prototype, "property");
256
+ *
257
+ * // method (on constructor)
258
+ * result = Metadata.hasOwn("custom:annotation", Example, "staticMethod");
259
+ *
260
+ * // method (on prototype)
261
+ * result = Metadata.hasOwn("custom:annotation", Example.prototype, "method");
262
+ * ```
263
+ *
264
+ */
265
+ static hasOwn(key: string, target: any, propertyKey?: string | symbol): boolean;
266
+ /**
267
+ * Deletes the metadata entry from the target object with the provided key.
268
+ * @param key A key used to store and retrieve metadata.
269
+ * @param target The target object on which the metadata is defined.
270
+ * @param propertyKey The property key for the target.
271
+ * @returns `true` if the metadata entry was found and deleted; otherwise, false.
272
+ * @example
273
+ *
274
+ * ```typescript
275
+ * class Example {
276
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
277
+ * // static staticProperty;
278
+ * // property;
279
+ *
280
+ * static staticMethod(p) { }
281
+ * method(p) { }
282
+ * }
283
+ *
284
+ * // constructor
285
+ * result = Metadata.delete("custom:annotation", Example);
286
+ *
287
+ * // property (on constructor)
288
+ * result = Metadata.delete("custom:annotation", Example, "staticProperty");
289
+ *
290
+ * // property (on prototype)
291
+ * result = Metadata.delete("custom:annotation", Example.prototype, "property");
292
+ *
293
+ * // method (on constructor)
294
+ * result = Metadata.delete("custom:annotation", Example, "staticMethod");
295
+ *
296
+ * // method (on prototype)
297
+ * result = Metadata.delete("custom:annotation", Example.prototype, "method");
298
+ * ```
299
+ *
300
+ */
301
+ static delete(key: string, target: any, propertyKey?: string | symbol): boolean;
302
+ /**
303
+ * Set the metadata value for the provided metadata DESIGN_PARAM_TYPES on the target object or its prototype chain.
304
+ * @param target The target object on which the metadata is defined.
305
+ * @param propertyKey The property key for the target.
306
+ * @param value A value that contains attached metadata.
307
+ * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
308
+ * @example
309
+ *
310
+ * ```typescript
311
+ * class Example {
312
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
313
+ * // static staticProperty;
314
+ * // property;
315
+ *
316
+ * static staticMethod(p) { }
317
+ * method(p) { }
318
+ * }
319
+ *
320
+ * // on contructor
321
+ * result = Metadata.setParamTypes(Example, undefined, [Object]);
322
+ *
323
+ * // property (on constructor)
324
+ * result = Metadata.setParamTypes(Example, "staticProperty", [Object]);
325
+ *
326
+ * // property (on prototype)
327
+ * result = Metadata.setParamTypes(Example.prototype, "property", [Object]);
328
+ *
329
+ * // method (on constructor)
330
+ * result = Metadata.setParamTypes(Example, "staticMethod", [Object]);
331
+ *
332
+ * // method (on prototype)
333
+ * result = Metadata.setParamTypes(Example.prototype, "method", [Object]);
334
+ * ```
335
+ *
336
+ */
337
+ static setParamTypes(target: any, propertyKey: string | symbol, value: any): void;
338
+ /**
339
+ * Get all metadata for a metadataKey.
340
+ * @param metadataKey
341
+ */
342
+ static getTargetsFromPropertyKey: (metadataKey: string | symbol) => any[];
343
+ /**
344
+ * Define a unique metadata entry on the target.
345
+ * @param key A key used to store and retrieve metadata.
346
+ * @param value A value that contains attached metadata.
347
+ * @param target The target object on which to define metadata.
348
+ * @param propertyKey The property key for the target.
349
+ * @example
350
+ *
351
+ * ```typescript
352
+ * class Example {
353
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
354
+ * // static staticProperty;
355
+ * // property;
356
+ *
357
+ * static staticMethod(p) { }
358
+ * method(p) { }
359
+ * }
360
+ *
361
+ * // constructor
362
+ * Reflect.defineMetadata("custom:annotation", options, Example);
363
+ *
364
+ * // property (on constructor)
365
+ * Reflect.defineMetadata("custom:annotation", Number, Example, "staticProperty");
366
+ *
367
+ * // property (on prototype)
368
+ * Reflect.defineMetadata("custom:annotation", Number, Example.prototype, "property");
369
+ *
370
+ * // method (on constructor)
371
+ * Reflect.defineMetadata("custom:annotation", Number, Example, "staticMethod");
372
+ *
373
+ * // method (on prototype)
374
+ * Reflect.defineMetadata("custom:annotation", Number, Example.prototype, "method");
375
+ *
376
+ * // decorator factory as metadata-producing annotation.
377
+ * function MyAnnotation(options): PropertyDecorator {
378
+ * return (target, key) => Reflect.defineMetadata("custom:annotation", options, target, key);
379
+ * }
380
+ * ```
381
+ *
382
+ */
383
+ static set(key: string, value: any, target: any, propertyKey?: string | symbol): void;
384
+ /**
385
+ * Gets the metadata value for the provided metadata DESIGN_PARAM_TYPES on the target object or its prototype chain.
386
+ * @param targetPrototype
387
+ * @param propertyKey The property key for the target.
388
+ * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
389
+ * @example
390
+ *
391
+ * ```typescript
392
+ * class Example {
393
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
394
+ * // static staticProperty;
395
+ * // property;
396
+ *
397
+ * static staticMethod(p) { }
398
+ * method(p) { }
399
+ * }
400
+ *
401
+ * // on contructor
402
+ * result = Metadata.getParamTypes(Example.prototype);
403
+ *
404
+ * // property (on constructor)
405
+ * result = Metadata.getParamTypes(Example.prototype, "staticProperty");
406
+ *
407
+ * // method (on constructor)
408
+ * result = Metadata.getParamTypes(Example.prototype, "staticMethod");
409
+ * ```
410
+ *
411
+ */
412
+ static getParamTypes(targetPrototype: any, propertyKey?: string | symbol): any[];
413
+ /**
414
+ * Gets the metadata value for the provided metadata DESIGN_PARAM_TYPES on the target object or its prototype chain.
415
+ * @param target The target object on which the metadata is defined.
416
+ * @param propertyKey The property key for the target.
417
+ * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
418
+ * @example
419
+ *
420
+ * ```typescript
421
+ * class Example {
422
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
423
+ * // static staticProperty;
424
+ * // property;
425
+ *
426
+ * static staticMethod(p) { }
427
+ * method(p) { }
428
+ * }
429
+ *
430
+ * // on contructor
431
+ * result = Metadata.getParamTypes(Example);
432
+ *
433
+ * // property (on constructor)
434
+ * result = Metadata.getParamTypes(Example, "staticProperty");
435
+ *
436
+ * // method (on constructor)
437
+ * result = Metadata.getParamTypes(Example, "staticMethod");
438
+ * ```
439
+ *
440
+ */
441
+ static getOwnParamTypes(target: any, propertyKey?: string | symbol): any[];
442
+ }
@@ -0,0 +1,69 @@
1
+ import type { Type } from "./Type";
2
+ /**
3
+ * @ignore
4
+ */
5
+ export declare const CLASS_STORE = "tsed:class:store";
6
+ /**
7
+ * @ignore
8
+ */
9
+ export declare const METHOD_STORE = "tsed:method:store";
10
+ /**
11
+ * @ignore
12
+ */
13
+ export declare const PROPERTY_STORE = "tsed:property:store";
14
+ /**
15
+ * @ignore
16
+ */
17
+ export declare const PARAM_STORE = "tsed:param:store";
18
+ export declare class Store {
19
+ private _entries;
20
+ /**
21
+ * Create or get a Store from args {target + methodName + descriptor}
22
+ * @param args
23
+ * @returns {Store}
24
+ */
25
+ static from(...args: any[]): Store;
26
+ /**
27
+ * Create store on the method.
28
+ * @param target
29
+ * @param {string} propertyKey
30
+ * @returns {Store}
31
+ */
32
+ static fromMethod(target: any, propertyKey: string | symbol): Store;
33
+ static mergeStoreFrom(target: Type<any>, source: Type<any>, ...args: any[]): Store;
34
+ static mergeStoreMethodFrom(target: Type<any>, source: Type<any>, propertyKey: string | symbol): Store;
35
+ /**
36
+ * The get() method returns a specified element from a Map object.
37
+ * @param key Required. The key of the element to return from the Map object.
38
+ * @param defaultValue
39
+ * @returns {T} Returns the element associated with the specified key or undefined if the key can't be found in the Map object.
40
+ */
41
+ get<T = any>(key: any, defaultValue?: any): T;
42
+ /**
43
+ * The has() method returns a boolean indicating whether an element with the specified key exists or not.
44
+ * @param key
45
+ * @returns {boolean}
46
+ */
47
+ has(key: any): boolean;
48
+ /**
49
+ * The set() method adds or updates an element with a specified key and value to a Map object.
50
+ * @param key Required. The key of the element to add to the Map object.
51
+ * @param metadata Required. The value of the element to add to the Map object.
52
+ */
53
+ set(key: any, metadata: any): Store;
54
+ /**
55
+ * The delete() method removes the specified element from a Map object.
56
+ * @param key Required. The key of the element to remove from the Map object.
57
+ * @returns {boolean} Returns true if an element in the Map object existed and has been removed, or false if the element does not exist.
58
+ */
59
+ delete(key: string): boolean;
60
+ /**
61
+ * Merge given value with existing value.
62
+ * @param key
63
+ * @param value
64
+ * @param inverse Change the merge order. Get the existing value and apply over given value
65
+ * @returns {Store}
66
+ */
67
+ merge(key: any, value: any, inverse?: boolean): Store;
68
+ toJson(): {};
69
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * An example of a `Type` is `MyCustomComponent` filters, which in JavaScript is be represented by
3
+ * the `MyCustomComponent` constructor function.
4
+ */
5
+ /**
6
+ *
7
+ */
8
+ export interface Type<T = any> extends Function {
9
+ new (...args: any[]): T;
10
+ }
11
+ export declare const Type: FunctionConstructor;
@@ -0,0 +1,7 @@
1
+ export * from "./DecoratorTypes";
2
+ export * from "./Env";
3
+ export * from "./Hooks";
4
+ export * from "./Metadata";
5
+ export * from "./Store";
6
+ export * from "./Type";
7
+ export * from "./AnyToPromise";
@@ -0,0 +1,5 @@
1
+ export declare class UnsupportedDecoratorType extends Error {
2
+ name: "UNSUPPORTED_DECORATOR_TYPE";
3
+ constructor(decorator: any, args: any[]);
4
+ private static buildMessage;
5
+ }
@@ -0,0 +1,6 @@
1
+ import "reflect-metadata";
2
+ export type { DecoratorParameters, DecoratorMethodParameters, StaticMethodDecorator, MetadataTypes, ValueOf, HashOf } from "./interfaces";
3
+ export * from "./utils";
4
+ export * from "./domain";
5
+ export * from "./errors/UnsupportedDecoratorType";
6
+ export * from "./decorators";
@@ -0,0 +1 @@
1
+ export declare type AnyDecorator = any | ClassDecorator | MethodDecorator | PropertyDescriptor | ParameterDecorator;
@@ -0,0 +1,3 @@
1
+ export declare type DecoratorParameters = [any, string | symbol, number | PropertyDescriptor];
2
+ export declare type DecoratorMethodParameters = [any, string | symbol, PropertyDescriptor];
3
+ export declare type StaticMethodDecorator = <TFunction extends Function, T>(target: TFunction, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
@@ -0,0 +1 @@
1
+ export declare type HashOf<T> = Record<string, T>;
@@ -0,0 +1,5 @@
1
+ import type { Type } from "../domain/Type";
2
+ export interface MetadataTypes<T = any, C = any> {
3
+ type?: Type<T> | T;
4
+ collectionType?: Type<C> | C;
5
+ }
@@ -0,0 +1 @@
1
+ export declare type ValueOf<T> = T[keyof T];
@@ -0,0 +1,4 @@
1
+ export type { DecoratorParameters, DecoratorMethodParameters, StaticMethodDecorator } from "./DecoratorParameters";
2
+ export type { MetadataTypes } from "./MetadataTypes";
3
+ export type { ValueOf } from "./ValueOf";
4
+ export type { HashOf } from "./HashOf";
@@ -0,0 +1,2 @@
1
+ export declare function catchError<T extends Error>(cb: Function): T | undefined;
2
+ export declare function catchAsyncError<T extends Error>(cb: Function): Promise<T | undefined>;
@@ -0,0 +1 @@
1
+ export declare function decorateMethodsOf(klass: any, decorator: any): void;
@@ -0,0 +1,2 @@
1
+ import { DecoratorParameters } from "../../interfaces/DecoratorParameters";
2
+ export declare function decoratorArgs(target: any, propertyKey: string): DecoratorParameters;
@@ -0,0 +1,2 @@
1
+ import { DecoratorTypes } from "../../domain/DecoratorTypes";
2
+ export declare function decoratorTypeOf(args: any[]): DecoratorTypes;
@@ -0,0 +1 @@
1
+ export declare function inheritedDescriptorOf(target: any, propertyKey: string): PropertyDescriptor | undefined;
@@ -0,0 +1,2 @@
1
+ import { AnyDecorator } from "../../interfaces/AnyDecorator";
2
+ export declare function useDecorators(...decorators: AnyDecorator[]): any;
@@ -0,0 +1,3 @@
1
+ import { AnyDecorator } from "../../interfaces/AnyDecorator";
2
+ export declare function useMethodDecorator(decorator: AnyDecorator): (target: any, propertyKey: string | symbol) => any;
3
+ export declare function useMethodDecorators(...decorators: AnyDecorator[]): (target: any, propertyKey: string | symbol) => void;
@@ -0,0 +1 @@
1
+ export declare function importPackage(packageName: string, loaderFn?: Function, optional?: boolean): Promise<any>;