inversify 6.1.4 → 6.1.5-beta.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 (529) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/README.md +6 -15
  3. package/{amd → lib/cjs}/annotation/decorator_utils.d.ts +1 -0
  4. package/lib/cjs/annotation/decorator_utils.d.ts.map +1 -0
  5. package/{es6 → lib/cjs}/annotation/decorator_utils.js +25 -7
  6. package/lib/cjs/annotation/decorator_utils.js.map +1 -0
  7. package/{es6 → lib/cjs}/annotation/inject.d.ts +1 -0
  8. package/lib/cjs/annotation/inject.d.ts.map +1 -0
  9. package/{es6 → lib/cjs}/annotation/inject.js +18 -7
  10. package/lib/cjs/annotation/inject.js.map +1 -0
  11. package/{amd → lib/cjs}/annotation/inject_base.d.ts +1 -0
  12. package/lib/cjs/annotation/inject_base.d.ts.map +1 -0
  13. package/{es6 → lib/cjs}/annotation/inject_base.js +2 -0
  14. package/lib/cjs/annotation/inject_base.js.map +1 -0
  15. package/{amd → lib/cjs}/annotation/injectable.d.ts +1 -0
  16. package/lib/cjs/annotation/injectable.d.ts.map +1 -0
  17. package/{es6 → lib/cjs}/annotation/injectable.js +19 -7
  18. package/lib/cjs/annotation/injectable.js.map +1 -0
  19. package/{es → lib/cjs}/annotation/multi_inject.d.ts +1 -0
  20. package/lib/cjs/annotation/multi_inject.d.ts.map +1 -0
  21. package/{es6 → lib/cjs}/annotation/multi_inject.js +18 -7
  22. package/lib/cjs/annotation/multi_inject.js.map +1 -0
  23. package/{amd → lib/cjs}/annotation/named.d.ts +1 -0
  24. package/lib/cjs/annotation/named.d.ts.map +1 -0
  25. package/{es6 → lib/cjs}/annotation/named.js +19 -7
  26. package/lib/cjs/annotation/named.js.map +1 -0
  27. package/{amd → lib/cjs}/annotation/optional.d.ts +1 -0
  28. package/lib/cjs/annotation/optional.d.ts.map +1 -0
  29. package/{es6 → lib/cjs}/annotation/optional.js +18 -7
  30. package/lib/cjs/annotation/optional.js.map +1 -0
  31. package/{amd → lib/cjs}/annotation/post_construct.d.ts +1 -0
  32. package/lib/cjs/annotation/post_construct.d.ts.map +1 -0
  33. package/{es6 → lib/cjs}/annotation/post_construct.js +18 -7
  34. package/lib/cjs/annotation/post_construct.js.map +1 -0
  35. package/{es6 → lib/cjs}/annotation/pre_destroy.d.ts +1 -0
  36. package/lib/cjs/annotation/pre_destroy.d.ts.map +1 -0
  37. package/{es6 → lib/cjs}/annotation/pre_destroy.js +18 -7
  38. package/lib/cjs/annotation/pre_destroy.js.map +1 -0
  39. package/{es → lib/cjs}/annotation/property_event_decorator.d.ts +1 -0
  40. package/lib/cjs/annotation/property_event_decorator.d.ts.map +1 -0
  41. package/{es6 → lib/cjs}/annotation/property_event_decorator.js +1 -0
  42. package/lib/cjs/annotation/property_event_decorator.js.map +1 -0
  43. package/{amd → lib/cjs}/annotation/tagged.d.ts +1 -0
  44. package/lib/cjs/annotation/tagged.d.ts.map +1 -0
  45. package/{es6 → lib/cjs}/annotation/tagged.js +2 -0
  46. package/lib/cjs/annotation/tagged.js.map +1 -0
  47. package/{es6 → lib/cjs}/annotation/target_name.d.ts +1 -0
  48. package/lib/cjs/annotation/target_name.d.ts.map +1 -0
  49. package/{es6 → lib/cjs}/annotation/target_name.js +18 -7
  50. package/lib/cjs/annotation/target_name.js.map +1 -0
  51. package/{es6 → lib/cjs}/annotation/unmanaged.d.ts +1 -0
  52. package/lib/cjs/annotation/unmanaged.d.ts.map +1 -0
  53. package/{es6 → lib/cjs}/annotation/unmanaged.js +18 -7
  54. package/lib/cjs/annotation/unmanaged.js.map +1 -0
  55. package/{es6 → lib/cjs}/bindings/binding.d.ts +1 -0
  56. package/lib/cjs/bindings/binding.d.ts.map +1 -0
  57. package/{es6 → lib/cjs}/bindings/binding.js +29 -0
  58. package/lib/cjs/bindings/binding.js.map +1 -0
  59. package/{amd → lib/cjs}/bindings/binding_count.d.ts +1 -0
  60. package/lib/cjs/bindings/binding_count.d.ts.map +1 -0
  61. package/lib/{bindings → cjs/bindings}/binding_count.js +1 -0
  62. package/lib/cjs/bindings/binding_count.js.map +1 -0
  63. package/{amd → lib/cjs}/constants/error_msgs.d.ts +1 -0
  64. package/lib/cjs/constants/error_msgs.d.ts.map +1 -0
  65. package/{es6 → lib/cjs}/constants/error_msgs.js +2 -0
  66. package/lib/cjs/constants/error_msgs.js.map +1 -0
  67. package/{es → lib/cjs}/constants/literal_types.d.ts +1 -0
  68. package/lib/cjs/constants/literal_types.d.ts.map +1 -0
  69. package/{es6 → lib/cjs}/constants/literal_types.js +4 -0
  70. package/lib/cjs/constants/literal_types.js.map +1 -0
  71. package/{amd → lib/cjs}/constants/metadata_keys.d.ts +1 -0
  72. package/lib/cjs/constants/metadata_keys.d.ts.map +1 -0
  73. package/{es6 → lib/cjs}/constants/metadata_keys.js +13 -0
  74. package/lib/cjs/constants/metadata_keys.js.map +1 -0
  75. package/{es6 → lib/cjs}/container/container.d.ts +3 -0
  76. package/lib/cjs/container/container.d.ts.map +1 -0
  77. package/{es6 → lib/cjs}/container/container.js +157 -147
  78. package/lib/cjs/container/container.js.map +1 -0
  79. package/{amd → lib/cjs}/container/container_module.d.ts +1 -0
  80. package/lib/cjs/container/container_module.d.ts.map +1 -0
  81. package/{es6 → lib/cjs}/container/container_module.js +5 -0
  82. package/lib/cjs/container/container_module.js.map +1 -0
  83. package/{es → lib/cjs}/container/container_snapshot.d.ts +1 -0
  84. package/lib/cjs/container/container_snapshot.d.ts.map +1 -0
  85. package/{es6 → lib/cjs}/container/container_snapshot.js +6 -0
  86. package/lib/cjs/container/container_snapshot.js.map +1 -0
  87. package/{es → lib/cjs}/container/lookup.d.ts +1 -0
  88. package/lib/cjs/container/lookup.d.ts.map +1 -0
  89. package/{es6 → lib/cjs}/container/lookup.js +26 -7
  90. package/lib/cjs/container/lookup.js.map +1 -0
  91. package/{es6 → lib/cjs}/container/module_activation_store.d.ts +3 -2
  92. package/lib/cjs/container/module_activation_store.d.ts.map +1 -0
  93. package/{es6 → lib/cjs}/container/module_activation_store.js +2 -3
  94. package/lib/cjs/container/module_activation_store.js.map +1 -0
  95. package/{amd/inversify.d.ts → lib/cjs/index.d.ts} +2 -0
  96. package/lib/cjs/index.d.ts.map +1 -0
  97. package/{es6/inversify.js → lib/cjs/index.js} +20 -7
  98. package/lib/cjs/index.js.map +1 -0
  99. package/{amd → lib/cjs}/interfaces/interfaces.d.ts +3 -2
  100. package/lib/cjs/interfaces/interfaces.d.ts.map +1 -0
  101. package/lib/{interfaces → cjs/interfaces}/interfaces.js +1 -0
  102. package/lib/cjs/interfaces/interfaces.js.map +1 -0
  103. package/lib/cjs/package.json +3 -0
  104. package/{es6 → lib/cjs}/planning/context.d.ts +1 -0
  105. package/lib/cjs/planning/context.d.ts.map +1 -0
  106. package/{es6 → lib/cjs}/planning/context.js +5 -0
  107. package/lib/cjs/planning/context.js.map +1 -0
  108. package/{es6 → lib/cjs}/planning/metadata.d.ts +1 -0
  109. package/lib/cjs/planning/metadata.d.ts.map +1 -0
  110. package/{es6 → lib/cjs}/planning/metadata.js +20 -7
  111. package/lib/cjs/planning/metadata.js.map +1 -0
  112. package/{es → lib/cjs}/planning/metadata_reader.d.ts +1 -0
  113. package/lib/cjs/planning/metadata_reader.d.ts.map +1 -0
  114. package/{es6 → lib/cjs}/planning/metadata_reader.js +24 -12
  115. package/lib/cjs/planning/metadata_reader.js.map +1 -0
  116. package/{amd → lib/cjs}/planning/plan.d.ts +1 -0
  117. package/lib/cjs/planning/plan.d.ts.map +1 -0
  118. package/{es6 → lib/cjs}/planning/plan.js +3 -0
  119. package/lib/cjs/planning/plan.js.map +1 -0
  120. package/{amd → lib/cjs}/planning/planner.d.ts +1 -0
  121. package/lib/cjs/planning/planner.d.ts.map +1 -0
  122. package/{es6 → lib/cjs}/planning/planner.js +27 -7
  123. package/lib/cjs/planning/planner.js.map +1 -0
  124. package/{amd → lib/cjs}/planning/queryable_string.d.ts +1 -0
  125. package/lib/cjs/planning/queryable_string.d.ts.map +1 -0
  126. package/{es6 → lib/cjs}/planning/queryable_string.js +3 -0
  127. package/lib/cjs/planning/queryable_string.js.map +1 -0
  128. package/{amd → lib/cjs}/planning/reflection_utils.d.ts +1 -0
  129. package/lib/cjs/planning/reflection_utils.d.ts.map +1 -0
  130. package/{es6 → lib/cjs}/planning/reflection_utils.js +25 -8
  131. package/lib/cjs/planning/reflection_utils.js.map +1 -0
  132. package/{amd → lib/cjs}/planning/request.d.ts +1 -0
  133. package/lib/cjs/planning/request.d.ts.map +1 -0
  134. package/{es6 → lib/cjs}/planning/request.js +13 -1
  135. package/lib/cjs/planning/request.js.map +1 -0
  136. package/{es → lib/cjs}/resolution/instantiation.d.ts +1 -0
  137. package/lib/cjs/resolution/instantiation.d.ts.map +1 -0
  138. package/{es6 → lib/cjs}/resolution/instantiation.js +40 -37
  139. package/lib/cjs/resolution/instantiation.js.map +1 -0
  140. package/{amd → lib/cjs}/resolution/resolver.d.ts +1 -0
  141. package/lib/cjs/resolution/resolver.d.ts.map +1 -0
  142. package/{es6 → lib/cjs}/resolution/resolver.js +39 -20
  143. package/lib/cjs/resolution/resolver.js.map +1 -0
  144. package/{amd → lib/cjs}/scope/scope.d.ts +1 -0
  145. package/lib/cjs/scope/scope.d.ts.map +1 -0
  146. package/{es6 → lib/cjs}/scope/scope.js +10 -12
  147. package/lib/cjs/scope/scope.js.map +1 -0
  148. package/{amd → lib/cjs}/syntax/binding_in_syntax.d.ts +1 -0
  149. package/lib/cjs/syntax/binding_in_syntax.d.ts.map +1 -0
  150. package/{es6 → lib/cjs}/syntax/binding_in_syntax.js +2 -0
  151. package/lib/cjs/syntax/binding_in_syntax.js.map +1 -0
  152. package/{es6 → lib/cjs}/syntax/binding_in_when_on_syntax.d.ts +1 -0
  153. package/lib/cjs/syntax/binding_in_when_on_syntax.d.ts.map +1 -0
  154. package/{es6 → lib/cjs}/syntax/binding_in_when_on_syntax.js +5 -0
  155. package/lib/cjs/syntax/binding_in_when_on_syntax.js.map +1 -0
  156. package/{es6 → lib/cjs}/syntax/binding_on_syntax.d.ts +1 -0
  157. package/lib/cjs/syntax/binding_on_syntax.d.ts.map +1 -0
  158. package/{es6 → lib/cjs}/syntax/binding_on_syntax.js +2 -0
  159. package/lib/cjs/syntax/binding_on_syntax.js.map +1 -0
  160. package/{es → lib/cjs}/syntax/binding_to_syntax.d.ts +1 -0
  161. package/lib/cjs/syntax/binding_to_syntax.d.ts.map +1 -0
  162. package/{es6 → lib/cjs}/syntax/binding_to_syntax.js +43 -8
  163. package/lib/cjs/syntax/binding_to_syntax.js.map +1 -0
  164. package/{amd → lib/cjs}/syntax/binding_when_on_syntax.d.ts +1 -0
  165. package/lib/cjs/syntax/binding_when_on_syntax.d.ts.map +1 -0
  166. package/{es6 → lib/cjs}/syntax/binding_when_on_syntax.js +4 -0
  167. package/lib/cjs/syntax/binding_when_on_syntax.js.map +1 -0
  168. package/{es6 → lib/cjs}/syntax/binding_when_syntax.d.ts +1 -0
  169. package/lib/cjs/syntax/binding_when_syntax.d.ts.map +1 -0
  170. package/{es6 → lib/cjs}/syntax/binding_when_syntax.js +5 -1
  171. package/lib/cjs/syntax/binding_when_syntax.js.map +1 -0
  172. package/{amd → lib/cjs}/syntax/constraint_helpers.d.ts +1 -0
  173. package/lib/cjs/syntax/constraint_helpers.d.ts.map +1 -0
  174. package/{es6 → lib/cjs}/syntax/constraint_helpers.js +22 -7
  175. package/lib/cjs/syntax/constraint_helpers.js.map +1 -0
  176. package/{amd → lib/cjs}/utils/async.d.ts +1 -0
  177. package/lib/cjs/utils/async.d.ts.map +1 -0
  178. package/{es6 → lib/cjs}/utils/async.js +1 -0
  179. package/lib/cjs/utils/async.js.map +1 -0
  180. package/{es6 → lib/cjs}/utils/binding_utils.d.ts +1 -0
  181. package/lib/cjs/utils/binding_utils.d.ts.map +1 -0
  182. package/{es6 → lib/cjs}/utils/binding_utils.js +21 -7
  183. package/lib/cjs/utils/binding_utils.js.map +1 -0
  184. package/{es6 → lib/cjs}/utils/clonable.d.ts +1 -0
  185. package/lib/cjs/utils/clonable.d.ts.map +1 -0
  186. package/{es6 → lib/cjs}/utils/clonable.js +1 -0
  187. package/lib/cjs/utils/clonable.js.map +1 -0
  188. package/{amd → lib/cjs}/utils/exceptions.d.ts +1 -0
  189. package/lib/cjs/utils/exceptions.d.ts.map +1 -0
  190. package/{es6 → lib/cjs}/utils/exceptions.js +18 -7
  191. package/lib/cjs/utils/exceptions.js.map +1 -0
  192. package/{es6 → lib/cjs}/utils/factory_type.d.ts +1 -0
  193. package/lib/cjs/utils/factory_type.d.ts.map +1 -0
  194. package/{es6 → lib/cjs}/utils/factory_type.js +1 -0
  195. package/lib/cjs/utils/factory_type.js.map +1 -0
  196. package/{amd → lib/cjs}/utils/id.d.ts +1 -0
  197. package/lib/cjs/utils/id.d.ts.map +1 -0
  198. package/{es6 → lib/cjs}/utils/id.js +1 -0
  199. package/lib/cjs/utils/id.js.map +1 -0
  200. package/{amd → lib/cjs}/utils/js.d.ts +1 -0
  201. package/lib/cjs/utils/js.d.ts.map +1 -0
  202. package/{es6 → lib/cjs}/utils/js.js +1 -0
  203. package/lib/cjs/utils/js.js.map +1 -0
  204. package/{amd → lib/cjs}/utils/serialization.d.ts +1 -0
  205. package/lib/cjs/utils/serialization.d.ts.map +1 -0
  206. package/{es6 → lib/cjs}/utils/serialization.js +23 -7
  207. package/lib/cjs/utils/serialization.js.map +1 -0
  208. package/{es6/interfaces/interfaces.d.ts → lib/esm/index.d.ts} +207 -8
  209. package/lib/esm/index.d.ts.map +1 -0
  210. package/lib/esm/index.js +2 -0
  211. package/lib/esm/index.js.map +1 -0
  212. package/package.json +30 -34
  213. package/amd/annotation/decorator_utils.js +0 -119
  214. package/amd/annotation/inject.d.ts +0 -5
  215. package/amd/annotation/inject.js +0 -31
  216. package/amd/annotation/inject_base.js +0 -16
  217. package/amd/annotation/injectable.js +0 -40
  218. package/amd/annotation/lazy_service_identifier.js +0 -4
  219. package/amd/annotation/multi_inject.d.ts +0 -5
  220. package/amd/annotation/multi_inject.js +0 -31
  221. package/amd/annotation/named.js +0 -32
  222. package/amd/annotation/optional.js +0 -32
  223. package/amd/annotation/post_construct.js +0 -32
  224. package/amd/annotation/pre_destroy.d.ts +0 -4
  225. package/amd/annotation/pre_destroy.js +0 -32
  226. package/amd/annotation/property_event_decorator.d.ts +0 -4
  227. package/amd/annotation/property_event_decorator.js +0 -16
  228. package/amd/annotation/tagged.js +0 -8
  229. package/amd/annotation/target_name.d.ts +0 -3
  230. package/amd/annotation/target_name.js +0 -35
  231. package/amd/annotation/unmanaged.d.ts +0 -3
  232. package/amd/annotation/unmanaged.js +0 -35
  233. package/amd/bindings/binding.d.ts +0 -20
  234. package/amd/bindings/binding.js +0 -40
  235. package/amd/bindings/binding_count.js +0 -11
  236. package/amd/constants/error_msgs.js +0 -75
  237. package/amd/constants/literal_types.d.ts +0 -5
  238. package/amd/constants/literal_types.js +0 -28
  239. package/amd/constants/metadata_keys.js +0 -28
  240. package/amd/container/container.d.ts +0 -73
  241. package/amd/container/container.js +0 -766
  242. package/amd/container/container_module.js +0 -21
  243. package/amd/container/container_snapshot.d.ts +0 -10
  244. package/amd/container/container_snapshot.js +0 -20
  245. package/amd/container/lookup.d.ts +0 -17
  246. package/amd/container/lookup.js +0 -132
  247. package/amd/container/module_activation_store.d.ts +0 -10
  248. package/amd/container/module_activation_store.js +0 -51
  249. package/amd/interfaces/interfaces.js +0 -4
  250. package/amd/inversify.js +0 -57
  251. package/amd/planning/context.d.ts +0 -11
  252. package/amd/planning/context.js +0 -19
  253. package/amd/planning/metadata.d.ts +0 -8
  254. package/amd/planning/metadata.js +0 -45
  255. package/amd/planning/metadata_reader.d.ts +0 -6
  256. package/amd/planning/metadata_reader.js +0 -49
  257. package/amd/planning/plan.js +0 -13
  258. package/amd/planning/planner.js +0 -187
  259. package/amd/planning/queryable_string.js +0 -33
  260. package/amd/planning/reflection_utils.js +0 -55
  261. package/amd/planning/request.js +0 -24
  262. package/amd/planning/target.js +0 -111
  263. package/amd/resolution/instantiation.d.ts +0 -3
  264. package/amd/resolution/instantiation.js +0 -219
  265. package/amd/resolution/resolver.js +0 -234
  266. package/amd/scope/scope.js +0 -93
  267. package/amd/syntax/binding_in_syntax.js +0 -24
  268. package/amd/syntax/binding_in_when_on_syntax.d.ts +0 -29
  269. package/amd/syntax/binding_in_when_on_syntax.js +0 -75
  270. package/amd/syntax/binding_on_syntax.d.ts +0 -8
  271. package/amd/syntax/binding_on_syntax.js +0 -20
  272. package/amd/syntax/binding_to_syntax.d.ts +0 -18
  273. package/amd/syntax/binding_to_syntax.js +0 -116
  274. package/amd/syntax/binding_when_on_syntax.js +0 -65
  275. package/amd/syntax/binding_when_syntax.d.ts +0 -21
  276. package/amd/syntax/binding_when_syntax.js +0 -107
  277. package/amd/syntax/constraint_helpers.js +0 -66
  278. package/amd/utils/async.js +0 -17
  279. package/amd/utils/binding_utils.d.ts +0 -4
  280. package/amd/utils/binding_utils.js +0 -86
  281. package/amd/utils/clonable.d.ts +0 -3
  282. package/amd/utils/clonable.js +0 -11
  283. package/amd/utils/exceptions.js +0 -46
  284. package/amd/utils/factory_type.d.ts +0 -5
  285. package/amd/utils/factory_type.js +0 -11
  286. package/amd/utils/id.js +0 -9
  287. package/amd/utils/js.js +0 -18
  288. package/amd/utils/serialization.js +0 -135
  289. package/es/annotation/decorator_utils.d.ts +0 -16
  290. package/es/annotation/decorator_utils.js +0 -90
  291. package/es/annotation/inject.d.ts +0 -5
  292. package/es/annotation/inject.js +0 -4
  293. package/es/annotation/inject_base.d.ts +0 -4
  294. package/es/annotation/inject_base.js +0 -14
  295. package/es/annotation/injectable.d.ts +0 -2
  296. package/es/annotation/injectable.js +0 -13
  297. package/es/annotation/lazy_service_identifier.js +0 -1
  298. package/es/annotation/multi_inject.js +0 -4
  299. package/es/annotation/named.d.ts +0 -2
  300. package/es/annotation/named.js +0 -7
  301. package/es/annotation/optional.d.ts +0 -2
  302. package/es/annotation/optional.js +0 -7
  303. package/es/annotation/post_construct.d.ts +0 -4
  304. package/es/annotation/post_construct.js +0 -5
  305. package/es/annotation/pre_destroy.d.ts +0 -4
  306. package/es/annotation/pre_destroy.js +0 -5
  307. package/es/annotation/property_event_decorator.js +0 -13
  308. package/es/annotation/tagged.d.ts +0 -2
  309. package/es/annotation/tagged.js +0 -6
  310. package/es/annotation/target_name.d.ts +0 -3
  311. package/es/annotation/target_name.js +0 -10
  312. package/es/annotation/unmanaged.d.ts +0 -3
  313. package/es/annotation/unmanaged.js +0 -10
  314. package/es/bindings/binding.d.ts +0 -20
  315. package/es/bindings/binding.js +0 -37
  316. package/es/bindings/binding_count.d.ts +0 -5
  317. package/es/bindings/binding_count.js +0 -6
  318. package/es/constants/error_msgs.d.ts +0 -30
  319. package/es/constants/error_msgs.js +0 -62
  320. package/es/constants/literal_types.js +0 -21
  321. package/es/constants/metadata_keys.d.ts +0 -13
  322. package/es/constants/metadata_keys.js +0 -23
  323. package/es/container/container.d.ts +0 -73
  324. package/es/container/container.js +0 -750
  325. package/es/container/container_module.d.ts +0 -11
  326. package/es/container/container_module.js +0 -17
  327. package/es/container/container_snapshot.js +0 -15
  328. package/es/container/lookup.js +0 -105
  329. package/es/container/module_activation_store.d.ts +0 -10
  330. package/es/container/module_activation_store.js +0 -47
  331. package/es/interfaces/interfaces.d.ts +0 -269
  332. package/es/interfaces/interfaces.js +0 -1
  333. package/es/inversify.d.ts +0 -24
  334. package/es/inversify.js +0 -2
  335. package/es/planning/context.d.ts +0 -11
  336. package/es/planning/context.js +0 -15
  337. package/es/planning/metadata.d.ts +0 -8
  338. package/es/planning/metadata.js +0 -17
  339. package/es/planning/metadata_reader.js +0 -21
  340. package/es/planning/plan.d.ts +0 -7
  341. package/es/planning/plan.js +0 -8
  342. package/es/planning/planner.d.ts +0 -5
  343. package/es/planning/planner.js +0 -168
  344. package/es/planning/queryable_string.d.ts +0 -10
  345. package/es/planning/queryable_string.js +0 -28
  346. package/es/planning/reflection_utils.d.ts +0 -5
  347. package/es/planning/reflection_utils.js +0 -27
  348. package/es/planning/request.d.ts +0 -14
  349. package/es/planning/request.js +0 -20
  350. package/es/planning/target.js +0 -87
  351. package/es/resolution/instantiation.js +0 -195
  352. package/es/resolution/resolver.d.ts +0 -3
  353. package/es/resolution/resolver.js +0 -214
  354. package/es/scope/scope.d.ts +0 -3
  355. package/es/scope/scope.js +0 -88
  356. package/es/syntax/binding_in_syntax.d.ts +0 -9
  357. package/es/syntax/binding_in_syntax.js +0 -21
  358. package/es/syntax/binding_in_when_on_syntax.d.ts +0 -29
  359. package/es/syntax/binding_in_when_on_syntax.js +0 -73
  360. package/es/syntax/binding_on_syntax.d.ts +0 -8
  361. package/es/syntax/binding_on_syntax.js +0 -16
  362. package/es/syntax/binding_to_syntax.js +0 -91
  363. package/es/syntax/binding_when_on_syntax.d.ts +0 -25
  364. package/es/syntax/binding_when_on_syntax.js +0 -62
  365. package/es/syntax/binding_when_syntax.d.ts +0 -21
  366. package/es/syntax/binding_when_syntax.js +0 -104
  367. package/es/syntax/constraint_helpers.d.ts +0 -6
  368. package/es/syntax/constraint_helpers.js +0 -36
  369. package/es/utils/async.d.ts +0 -3
  370. package/es/utils/async.js +0 -12
  371. package/es/utils/binding_utils.d.ts +0 -4
  372. package/es/utils/binding_utils.js +0 -58
  373. package/es/utils/clonable.d.ts +0 -3
  374. package/es/utils/clonable.js +0 -7
  375. package/es/utils/exceptions.d.ts +0 -2
  376. package/es/utils/exceptions.js +0 -16
  377. package/es/utils/factory_type.d.ts +0 -5
  378. package/es/utils/factory_type.js +0 -6
  379. package/es/utils/id.d.ts +0 -2
  380. package/es/utils/id.js +0 -5
  381. package/es/utils/js.d.ts +0 -1
  382. package/es/utils/js.js +0 -13
  383. package/es/utils/serialization.d.ts +0 -10
  384. package/es/utils/serialization.js +0 -103
  385. package/es6/annotation/decorator_utils.d.ts +0 -16
  386. package/es6/annotation/inject_base.d.ts +0 -4
  387. package/es6/annotation/injectable.d.ts +0 -2
  388. package/es6/annotation/lazy_service_identifier.js +0 -2
  389. package/es6/annotation/multi_inject.d.ts +0 -5
  390. package/es6/annotation/named.d.ts +0 -2
  391. package/es6/annotation/optional.d.ts +0 -2
  392. package/es6/annotation/post_construct.d.ts +0 -4
  393. package/es6/annotation/property_event_decorator.d.ts +0 -4
  394. package/es6/annotation/tagged.d.ts +0 -2
  395. package/es6/bindings/binding_count.d.ts +0 -5
  396. package/es6/bindings/binding_count.js +0 -9
  397. package/es6/constants/error_msgs.d.ts +0 -30
  398. package/es6/constants/literal_types.d.ts +0 -5
  399. package/es6/constants/metadata_keys.d.ts +0 -13
  400. package/es6/container/container_module.d.ts +0 -11
  401. package/es6/container/container_snapshot.d.ts +0 -10
  402. package/es6/container/lookup.d.ts +0 -17
  403. package/es6/interfaces/interfaces.js +0 -2
  404. package/es6/inversify.d.ts +0 -24
  405. package/es6/planning/metadata_reader.d.ts +0 -6
  406. package/es6/planning/plan.d.ts +0 -7
  407. package/es6/planning/planner.d.ts +0 -5
  408. package/es6/planning/queryable_string.d.ts +0 -10
  409. package/es6/planning/reflection_utils.d.ts +0 -5
  410. package/es6/planning/request.d.ts +0 -14
  411. package/es6/planning/target.js +0 -105
  412. package/es6/resolution/instantiation.d.ts +0 -3
  413. package/es6/resolution/resolver.d.ts +0 -3
  414. package/es6/scope/scope.d.ts +0 -3
  415. package/es6/syntax/binding_in_syntax.d.ts +0 -9
  416. package/es6/syntax/binding_to_syntax.d.ts +0 -18
  417. package/es6/syntax/binding_when_on_syntax.d.ts +0 -25
  418. package/es6/syntax/constraint_helpers.d.ts +0 -6
  419. package/es6/utils/async.d.ts +0 -3
  420. package/es6/utils/exceptions.d.ts +0 -2
  421. package/es6/utils/id.d.ts +0 -2
  422. package/es6/utils/js.d.ts +0 -1
  423. package/es6/utils/serialization.d.ts +0 -10
  424. package/lib/annotation/decorator_utils.d.ts +0 -16
  425. package/lib/annotation/decorator_utils.js +0 -118
  426. package/lib/annotation/inject.d.ts +0 -5
  427. package/lib/annotation/inject.js +0 -30
  428. package/lib/annotation/inject_base.d.ts +0 -4
  429. package/lib/annotation/inject_base.js +0 -17
  430. package/lib/annotation/injectable.d.ts +0 -2
  431. package/lib/annotation/injectable.js +0 -38
  432. package/lib/annotation/lazy_service_identifier.d.ts +0 -3
  433. package/lib/annotation/lazy_service_identifier.js +0 -2
  434. package/lib/annotation/multi_inject.d.ts +0 -5
  435. package/lib/annotation/multi_inject.js +0 -30
  436. package/lib/annotation/named.d.ts +0 -2
  437. package/lib/annotation/named.js +0 -32
  438. package/lib/annotation/optional.d.ts +0 -2
  439. package/lib/annotation/optional.js +0 -32
  440. package/lib/annotation/post_construct.d.ts +0 -4
  441. package/lib/annotation/post_construct.js +0 -31
  442. package/lib/annotation/pre_destroy.d.ts +0 -4
  443. package/lib/annotation/pre_destroy.js +0 -31
  444. package/lib/annotation/property_event_decorator.d.ts +0 -4
  445. package/lib/annotation/property_event_decorator.js +0 -15
  446. package/lib/annotation/tagged.d.ts +0 -2
  447. package/lib/annotation/tagged.js +0 -8
  448. package/lib/annotation/target_name.d.ts +0 -3
  449. package/lib/annotation/target_name.js +0 -35
  450. package/lib/annotation/unmanaged.d.ts +0 -3
  451. package/lib/annotation/unmanaged.js +0 -35
  452. package/lib/bindings/binding.d.ts +0 -20
  453. package/lib/bindings/binding.js +0 -40
  454. package/lib/bindings/binding_count.d.ts +0 -5
  455. package/lib/constants/error_msgs.d.ts +0 -30
  456. package/lib/constants/error_msgs.js +0 -73
  457. package/lib/constants/literal_types.d.ts +0 -5
  458. package/lib/constants/literal_types.js +0 -26
  459. package/lib/constants/metadata_keys.d.ts +0 -13
  460. package/lib/constants/metadata_keys.js +0 -26
  461. package/lib/container/container.d.ts +0 -73
  462. package/lib/container/container.js +0 -776
  463. package/lib/container/container_module.d.ts +0 -11
  464. package/lib/container/container_module.js +0 -20
  465. package/lib/container/container_snapshot.d.ts +0 -10
  466. package/lib/container/container_snapshot.js +0 -18
  467. package/lib/container/lookup.d.ts +0 -17
  468. package/lib/container/lookup.js +0 -131
  469. package/lib/container/module_activation_store.d.ts +0 -10
  470. package/lib/container/module_activation_store.js +0 -50
  471. package/lib/interfaces/interfaces.d.ts +0 -269
  472. package/lib/inversify.d.ts +0 -24
  473. package/lib/inversify.js +0 -76
  474. package/lib/planning/context.d.ts +0 -11
  475. package/lib/planning/context.js +0 -18
  476. package/lib/planning/metadata.d.ts +0 -8
  477. package/lib/planning/metadata.js +0 -43
  478. package/lib/planning/metadata_reader.d.ts +0 -6
  479. package/lib/planning/metadata_reader.js +0 -47
  480. package/lib/planning/plan.d.ts +0 -7
  481. package/lib/planning/plan.js +0 -11
  482. package/lib/planning/planner.d.ts +0 -5
  483. package/lib/planning/planner.js +0 -195
  484. package/lib/planning/queryable_string.d.ts +0 -10
  485. package/lib/planning/queryable_string.js +0 -31
  486. package/lib/planning/reflection_utils.d.ts +0 -5
  487. package/lib/planning/reflection_utils.js +0 -55
  488. package/lib/planning/request.d.ts +0 -14
  489. package/lib/planning/request.js +0 -23
  490. package/lib/planning/target.d.ts +0 -23
  491. package/lib/planning/target.js +0 -113
  492. package/lib/resolution/instantiation.d.ts +0 -3
  493. package/lib/resolution/instantiation.js +0 -220
  494. package/lib/resolution/resolver.d.ts +0 -3
  495. package/lib/resolution/resolver.js +0 -239
  496. package/lib/scope/scope.d.ts +0 -3
  497. package/lib/scope/scope.js +0 -93
  498. package/lib/syntax/binding_in_syntax.d.ts +0 -9
  499. package/lib/syntax/binding_in_syntax.js +0 -24
  500. package/lib/syntax/binding_in_when_on_syntax.d.ts +0 -29
  501. package/lib/syntax/binding_in_when_on_syntax.js +0 -76
  502. package/lib/syntax/binding_on_syntax.d.ts +0 -8
  503. package/lib/syntax/binding_on_syntax.js +0 -19
  504. package/lib/syntax/binding_to_syntax.d.ts +0 -18
  505. package/lib/syntax/binding_to_syntax.js +0 -117
  506. package/lib/syntax/binding_when_on_syntax.d.ts +0 -25
  507. package/lib/syntax/binding_when_on_syntax.js +0 -65
  508. package/lib/syntax/binding_when_syntax.d.ts +0 -21
  509. package/lib/syntax/binding_when_syntax.js +0 -107
  510. package/lib/syntax/constraint_helpers.d.ts +0 -6
  511. package/lib/syntax/constraint_helpers.js +0 -65
  512. package/lib/tsconfig.tsbuildinfo +0 -1
  513. package/lib/utils/async.d.ts +0 -3
  514. package/lib/utils/async.js +0 -15
  515. package/lib/utils/binding_utils.d.ts +0 -4
  516. package/lib/utils/binding_utils.js +0 -87
  517. package/lib/utils/clonable.d.ts +0 -3
  518. package/lib/utils/clonable.js +0 -9
  519. package/lib/utils/exceptions.d.ts +0 -2
  520. package/lib/utils/exceptions.js +0 -44
  521. package/lib/utils/factory_type.d.ts +0 -5
  522. package/lib/utils/factory_type.js +0 -9
  523. package/lib/utils/id.d.ts +0 -2
  524. package/lib/utils/id.js +0 -7
  525. package/lib/utils/js.d.ts +0 -1
  526. package/lib/utils/js.js +0 -16
  527. package/lib/utils/serialization.d.ts +0 -10
  528. package/lib/utils/serialization.js +0 -133
  529. /package/{es → lib/esm}/package.json +0 -0
@@ -1,24 +0,0 @@
1
- import * as keys from './constants/metadata_keys';
2
- export { LazyServiceIdentifier } from '@inversifyjs/common';
3
- export declare const METADATA_KEY: typeof keys;
4
- export { Container } from './container/container';
5
- export { BindingScopeEnum, BindingTypeEnum, TargetTypeEnum, } from './constants/literal_types';
6
- export { AsyncContainerModule, ContainerModule, } from './container/container_module';
7
- export { createTaggedDecorator } from './annotation/decorator_utils';
8
- export { injectable } from './annotation/injectable';
9
- export { tagged } from './annotation/tagged';
10
- export { named } from './annotation/named';
11
- export { inject } from './annotation/inject';
12
- export { optional } from './annotation/optional';
13
- export { unmanaged } from './annotation/unmanaged';
14
- export { multiInject } from './annotation/multi_inject';
15
- export { targetName } from './annotation/target_name';
16
- export { postConstruct } from './annotation/post_construct';
17
- export { preDestroy } from './annotation/pre_destroy';
18
- export { MetadataReader } from './planning/metadata_reader';
19
- export { id } from './utils/id';
20
- export type { interfaces } from './interfaces/interfaces';
21
- export { decorate } from './annotation/decorator_utils';
22
- export { traverseAncerstors, taggedConstraint, namedConstraint, typeConstraint, } from './syntax/constraint_helpers';
23
- export { getServiceIdentifierAsString } from './utils/serialization';
24
- export { multiBindToService } from './utils/binding_utils';
@@ -1,6 +0,0 @@
1
- import { interfaces } from '../interfaces/interfaces';
2
- declare class MetadataReader implements interfaces.MetadataReader {
3
- getConstructorMetadata(constructorFunc: NewableFunction): interfaces.ConstructorMetadata;
4
- getPropertiesMetadata(constructorFunc: NewableFunction): interfaces.MetadataMap;
5
- }
6
- export { MetadataReader };
@@ -1,7 +0,0 @@
1
- import { interfaces } from '../interfaces/interfaces';
2
- declare class Plan implements interfaces.Plan {
3
- parentContext: interfaces.Context;
4
- rootRequest: interfaces.Request;
5
- constructor(parentContext: interfaces.Context, rootRequest: interfaces.Request);
6
- }
7
- export { Plan };
@@ -1,5 +0,0 @@
1
- import { interfaces } from '../interfaces/interfaces';
2
- declare function getBindingDictionary(cntnr: interfaces.Container): interfaces.Lookup<interfaces.Binding<unknown>>;
3
- declare function plan(metadataReader: interfaces.MetadataReader, container: interfaces.Container, isMultiInject: boolean, targetType: interfaces.TargetType, serviceIdentifier: interfaces.ServiceIdentifier, key?: string | number | symbol, value?: unknown, avoidConstraints?: boolean): interfaces.Context;
4
- declare function createMockRequest(container: interfaces.Container, serviceIdentifier: interfaces.ServiceIdentifier, key: string | number | symbol, value: unknown): interfaces.Request;
5
- export { plan, createMockRequest, getBindingDictionary };
@@ -1,10 +0,0 @@
1
- import { interfaces } from '../interfaces/interfaces';
2
- export declare class QueryableString implements interfaces.QueryableString {
3
- private readonly str;
4
- constructor(str: string);
5
- startsWith(searchString: string): boolean;
6
- endsWith(searchString: string): boolean;
7
- contains(searchString: string): boolean;
8
- equals(compareString: string): boolean;
9
- value(): string;
10
- }
@@ -1,5 +0,0 @@
1
- import { interfaces } from '../interfaces/interfaces';
2
- import { getFunctionName } from '../utils/serialization';
3
- declare function getDependencies(metadataReader: interfaces.MetadataReader, func: NewableFunction): interfaces.Target[];
4
- declare function getBaseClassDependencyCount(metadataReader: interfaces.MetadataReader, func: NewableFunction): number;
5
- export { getDependencies, getBaseClassDependencyCount, getFunctionName };
@@ -1,14 +0,0 @@
1
- import { interfaces } from '../interfaces/interfaces';
2
- declare class Request implements interfaces.Request {
3
- id: number;
4
- serviceIdentifier: interfaces.ServiceIdentifier;
5
- parentContext: interfaces.Context;
6
- parentRequest: interfaces.Request | null;
7
- bindings: interfaces.Binding<unknown>[];
8
- childRequests: interfaces.Request[];
9
- target: interfaces.Target;
10
- requestScope: interfaces.RequestScope | null;
11
- constructor(serviceIdentifier: interfaces.ServiceIdentifier, parentContext: interfaces.Context, parentRequest: interfaces.Request | null, bindings: interfaces.Binding<any> | interfaces.Binding<any>[], target: interfaces.Target);
12
- addChildRequest(serviceIdentifier: interfaces.ServiceIdentifier, bindings: interfaces.Binding<unknown> | interfaces.Binding<unknown>[], target: interfaces.Target): interfaces.Request;
13
- }
14
- export { Request };
@@ -1,105 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.Target = void 0;
27
- const METADATA_KEY = __importStar(require("../constants/metadata_keys"));
28
- const id_1 = require("../utils/id");
29
- const serialization_1 = require("../utils/serialization");
30
- const metadata_1 = require("./metadata");
31
- const queryable_string_1 = require("./queryable_string");
32
- class Target {
33
- constructor(type, identifier, serviceIdentifier, namedOrTagged) {
34
- this.id = (0, id_1.id)();
35
- this.type = type;
36
- this.serviceIdentifier = serviceIdentifier;
37
- const queryableName = typeof identifier === 'symbol'
38
- ? (0, serialization_1.getSymbolDescription)(identifier)
39
- : identifier;
40
- this.name = new queryable_string_1.QueryableString(queryableName || '');
41
- this.identifier = identifier;
42
- this.metadata = new Array();
43
- let metadataItem = null;
44
- if (typeof namedOrTagged === 'string') {
45
- metadataItem = new metadata_1.Metadata(METADATA_KEY.NAMED_TAG, namedOrTagged);
46
- }
47
- else if (namedOrTagged instanceof metadata_1.Metadata) {
48
- metadataItem = namedOrTagged;
49
- }
50
- if (metadataItem !== null) {
51
- this.metadata.push(metadataItem);
52
- }
53
- }
54
- hasTag(key) {
55
- for (const m of this.metadata) {
56
- if (m.key === key) {
57
- return true;
58
- }
59
- }
60
- return false;
61
- }
62
- isArray() {
63
- return this.hasTag(METADATA_KEY.MULTI_INJECT_TAG);
64
- }
65
- matchesArray(name) {
66
- return this.matchesTag(METADATA_KEY.MULTI_INJECT_TAG)(name);
67
- }
68
- isNamed() {
69
- return this.hasTag(METADATA_KEY.NAMED_TAG);
70
- }
71
- isTagged() {
72
- return this.metadata.some((metadata) => METADATA_KEY.NON_CUSTOM_TAG_KEYS.every((key) => metadata.key !== key));
73
- }
74
- isOptional() {
75
- return this.matchesTag(METADATA_KEY.OPTIONAL_TAG)(true);
76
- }
77
- getNamedTag() {
78
- if (this.isNamed()) {
79
- return this.metadata.filter((m) => m.key === METADATA_KEY.NAMED_TAG)[0];
80
- }
81
- return null;
82
- }
83
- getCustomTags() {
84
- if (this.isTagged()) {
85
- return this.metadata.filter((metadata) => METADATA_KEY.NON_CUSTOM_TAG_KEYS.every((key) => metadata.key !== key));
86
- }
87
- else {
88
- return null;
89
- }
90
- }
91
- matchesNamedTag(name) {
92
- return this.matchesTag(METADATA_KEY.NAMED_TAG)(name);
93
- }
94
- matchesTag(key) {
95
- return (value) => {
96
- for (const m of this.metadata) {
97
- if (m.key === key && m.value === value) {
98
- return true;
99
- }
100
- }
101
- return false;
102
- };
103
- }
104
- }
105
- exports.Target = Target;
@@ -1,3 +0,0 @@
1
- import { interfaces } from '../interfaces/interfaces';
2
- declare function resolveInstance<T>(binding: interfaces.Binding<T>, constr: interfaces.Newable<T>, childRequests: interfaces.Request[], resolveRequest: interfaces.ResolveRequestHandler): T | Promise<T>;
3
- export { resolveInstance };
@@ -1,3 +0,0 @@
1
- import { interfaces } from '../interfaces/interfaces';
2
- declare function resolve<T>(context: interfaces.Context): T | Promise<T> | (T | Promise<T>)[];
3
- export { resolve };
@@ -1,3 +0,0 @@
1
- import type { interfaces } from '../interfaces/interfaces';
2
- export declare const tryGetFromScope: <T>(requestScope: interfaces.RequestScope, binding: interfaces.Binding<T>) => T | Promise<T> | null;
3
- export declare const saveToScope: <T>(requestScope: interfaces.RequestScope, binding: interfaces.Binding<T>, result: T | Promise<T>) => void;
@@ -1,9 +0,0 @@
1
- import { interfaces } from '../interfaces/interfaces';
2
- declare class BindingInSyntax<T> implements interfaces.BindingInSyntax<T> {
3
- private readonly _binding;
4
- constructor(binding: interfaces.Binding<T>);
5
- inRequestScope(): interfaces.BindingWhenOnSyntax<T>;
6
- inSingletonScope(): interfaces.BindingWhenOnSyntax<T>;
7
- inTransientScope(): interfaces.BindingWhenOnSyntax<T>;
8
- }
9
- export { BindingInSyntax };
@@ -1,18 +0,0 @@
1
- import { interfaces } from '../interfaces/interfaces';
2
- import { BindingWhenOnSyntax } from './binding_when_on_syntax';
3
- declare class BindingToSyntax<T> implements interfaces.BindingToSyntax<T> {
4
- private readonly _binding;
5
- constructor(binding: interfaces.Binding<T>);
6
- to(constructor: interfaces.Newable<T>): interfaces.BindingInWhenOnSyntax<T>;
7
- toSelf(): interfaces.BindingInWhenOnSyntax<T>;
8
- toConstantValue(value: T): interfaces.BindingWhenOnSyntax<T>;
9
- toDynamicValue(func: interfaces.DynamicValue<T>): interfaces.BindingInWhenOnSyntax<T>;
10
- toConstructor<T2>(constructor: interfaces.Newable<T2>): interfaces.BindingWhenOnSyntax<T>;
11
- toFactory<T2>(factory: interfaces.FactoryCreator<T2>): interfaces.BindingWhenOnSyntax<T>;
12
- toFunction(func: T): interfaces.BindingWhenOnSyntax<T>;
13
- toAutoFactory<T2>(serviceIdentifier: interfaces.ServiceIdentifier<T2>): interfaces.BindingWhenOnSyntax<T>;
14
- toAutoNamedFactory<T2>(serviceIdentifier: interfaces.ServiceIdentifier<T2>): BindingWhenOnSyntax<T>;
15
- toProvider<T2>(provider: interfaces.ProviderCreator<T2>): interfaces.BindingWhenOnSyntax<T>;
16
- toService(service: interfaces.ServiceIdentifier<T>): void;
17
- }
18
- export { BindingToSyntax };
@@ -1,25 +0,0 @@
1
- import { interfaces } from '../interfaces/interfaces';
2
- declare class BindingWhenOnSyntax<T> implements interfaces.BindingWhenSyntax<T>, interfaces.BindingOnSyntax<T> {
3
- private readonly _bindingWhenSyntax;
4
- private readonly _bindingOnSyntax;
5
- private readonly _binding;
6
- constructor(binding: interfaces.Binding<T>);
7
- when(constraint: (request: interfaces.Request) => boolean): interfaces.BindingOnSyntax<T>;
8
- whenTargetNamed(name: string): interfaces.BindingOnSyntax<T>;
9
- whenTargetIsDefault(): interfaces.BindingOnSyntax<T>;
10
- whenTargetTagged(tag: string, value: unknown): interfaces.BindingOnSyntax<T>;
11
- whenInjectedInto(parent: NewableFunction | string): interfaces.BindingOnSyntax<T>;
12
- whenParentNamed(name: string): interfaces.BindingOnSyntax<T>;
13
- whenParentTagged(tag: string, value: unknown): interfaces.BindingOnSyntax<T>;
14
- whenAnyAncestorIs(ancestor: NewableFunction | string): interfaces.BindingOnSyntax<T>;
15
- whenNoAncestorIs(ancestor: NewableFunction | string): interfaces.BindingOnSyntax<T>;
16
- whenAnyAncestorNamed(name: string): interfaces.BindingOnSyntax<T>;
17
- whenAnyAncestorTagged(tag: string, value: unknown): interfaces.BindingOnSyntax<T>;
18
- whenNoAncestorNamed(name: string): interfaces.BindingOnSyntax<T>;
19
- whenNoAncestorTagged(tag: string, value: unknown): interfaces.BindingOnSyntax<T>;
20
- whenAnyAncestorMatches(constraint: (request: interfaces.Request) => boolean): interfaces.BindingOnSyntax<T>;
21
- whenNoAncestorMatches(constraint: (request: interfaces.Request) => boolean): interfaces.BindingOnSyntax<T>;
22
- onActivation(handler: (context: interfaces.Context, injectable: T) => T): interfaces.BindingWhenSyntax<T>;
23
- onDeactivation(handler: (injectable: T) => Promise<void> | void): interfaces.BindingWhenSyntax<T>;
24
- }
25
- export { BindingWhenOnSyntax };
@@ -1,6 +0,0 @@
1
- import { interfaces } from '../interfaces/interfaces';
2
- declare const traverseAncerstors: (request: interfaces.Request, constraint: interfaces.ConstraintFunction) => boolean;
3
- declare const taggedConstraint: (key: string | number | symbol) => (value: unknown) => interfaces.ConstraintFunction;
4
- declare const namedConstraint: (value: unknown) => interfaces.ConstraintFunction;
5
- declare const typeConstraint: (type: NewableFunction | string) => (request: interfaces.Request | null) => boolean;
6
- export { traverseAncerstors, taggedConstraint, namedConstraint, typeConstraint, };
@@ -1,3 +0,0 @@
1
- declare function isPromise<T>(object: unknown): object is Promise<T>;
2
- declare function isPromiseOrContainsPromise<T>(object: unknown): object is Promise<T> | (T | Promise<T>)[];
3
- export { isPromise, isPromiseOrContainsPromise };
@@ -1,2 +0,0 @@
1
- export declare function isStackOverflowException(error: unknown): error is RangeError;
2
- export declare const tryAndThrowErrorIfStackOverflow: <T>(fn: () => T, errorCallback: () => Error) => T;
package/es6/utils/id.d.ts DELETED
@@ -1,2 +0,0 @@
1
- declare function id(): number;
2
- export { id };
package/es6/utils/js.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare function getFirstArrayDuplicate<T>(array: T[]): T | undefined;
@@ -1,10 +0,0 @@
1
- import { interfaces } from '../interfaces/interfaces';
2
- declare function getServiceIdentifierAsString(serviceIdentifier: interfaces.ServiceIdentifier): string;
3
- declare function listRegisteredBindingsForServiceIdentifier(container: interfaces.Container, serviceIdentifier: string, getBindings: <T>(container: interfaces.Container, serviceIdentifier: interfaces.ServiceIdentifier<T>) => interfaces.Binding<T>[]): string;
4
- declare function circularDependencyToException(request: interfaces.Request): void;
5
- declare function listMetadataForTarget(serviceIdentifierString: string, target: interfaces.Target): string;
6
- declare function getFunctionName(func: {
7
- name: string | null | undefined;
8
- }): string;
9
- declare function getSymbolDescription(symbol: symbol): string;
10
- export { getFunctionName, getServiceIdentifierAsString, listRegisteredBindingsForServiceIdentifier, listMetadataForTarget, circularDependencyToException, getSymbolDescription, };
@@ -1,16 +0,0 @@
1
- import { interfaces } from '../interfaces/interfaces';
2
- type Prototype<T> = {
3
- [Property in keyof T]: T[Property] extends NewableFunction ? T[Property] : T[Property] | undefined;
4
- } & {
5
- constructor: NewableFunction;
6
- };
7
- interface ConstructorFunction<T = Record<string, unknown>> {
8
- prototype: Prototype<T>;
9
- new (...args: unknown[]): T;
10
- }
11
- export type DecoratorTarget<T = unknown> = ConstructorFunction<T> | Prototype<T>;
12
- declare function tagParameter(annotationTarget: DecoratorTarget, parameterName: string | symbol | undefined, parameterIndex: number, metadata: interfaces.MetadataOrMetadataArray): void;
13
- declare function tagProperty(annotationTarget: DecoratorTarget, propertyName: string | symbol, metadata: interfaces.MetadataOrMetadataArray): void;
14
- declare function createTaggedDecorator(metadata: interfaces.MetadataOrMetadataArray): <T>(target: DecoratorTarget, targetKey?: string | symbol, indexOrPropertyDescriptor?: number | TypedPropertyDescriptor<T>) => void;
15
- declare function decorate(decorator: DecoratorTarget | ParameterDecorator | MethodDecorator, target: object, parameterIndexOrProperty?: number | string): void;
16
- export { decorate, tagParameter, tagProperty, createTaggedDecorator };
@@ -1,118 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.decorate = decorate;
27
- exports.tagParameter = tagParameter;
28
- exports.tagProperty = tagProperty;
29
- exports.createTaggedDecorator = createTaggedDecorator;
30
- var ERROR_MSGS = __importStar(require("../constants/error_msgs"));
31
- var METADATA_KEY = __importStar(require("../constants/metadata_keys"));
32
- var js_1 = require("../utils/js");
33
- function targetIsConstructorFunction(target) {
34
- return target.prototype !== undefined;
35
- }
36
- function _throwIfMethodParameter(parameterName) {
37
- if (parameterName !== undefined) {
38
- throw new Error(ERROR_MSGS.INVALID_DECORATOR_OPERATION);
39
- }
40
- }
41
- function tagParameter(annotationTarget, parameterName, parameterIndex, metadata) {
42
- _throwIfMethodParameter(parameterName);
43
- _tagParameterOrProperty(METADATA_KEY.TAGGED, annotationTarget, parameterIndex.toString(), metadata);
44
- }
45
- function tagProperty(annotationTarget, propertyName, metadata) {
46
- if (targetIsConstructorFunction(annotationTarget)) {
47
- throw new Error(ERROR_MSGS.INVALID_DECORATOR_OPERATION);
48
- }
49
- _tagParameterOrProperty(METADATA_KEY.TAGGED_PROP, annotationTarget.constructor, propertyName, metadata);
50
- }
51
- function _ensureNoMetadataKeyDuplicates(metadata) {
52
- var metadatas = [];
53
- if (Array.isArray(metadata)) {
54
- metadatas = metadata;
55
- var duplicate = (0, js_1.getFirstArrayDuplicate)(metadatas.map(function (md) { return md.key; }));
56
- if (duplicate !== undefined) {
57
- throw new Error("".concat(ERROR_MSGS.DUPLICATED_METADATA, " ").concat(duplicate.toString()));
58
- }
59
- }
60
- else {
61
- metadatas = [metadata];
62
- }
63
- return metadatas;
64
- }
65
- function _tagParameterOrProperty(metadataKey, annotationTarget, key, metadata) {
66
- var metadatas = _ensureNoMetadataKeyDuplicates(metadata);
67
- var paramsOrPropertiesMetadata = {};
68
- if (Reflect.hasOwnMetadata(metadataKey, annotationTarget)) {
69
- paramsOrPropertiesMetadata = Reflect.getMetadata(metadataKey, annotationTarget);
70
- }
71
- var paramOrPropertyMetadata = paramsOrPropertiesMetadata[key];
72
- if (paramOrPropertyMetadata === undefined) {
73
- paramOrPropertyMetadata = [];
74
- }
75
- else {
76
- var _loop_1 = function (m) {
77
- if (metadatas.some(function (md) { return md.key === m.key; })) {
78
- throw new Error("".concat(ERROR_MSGS.DUPLICATED_METADATA, " ").concat(m.key.toString()));
79
- }
80
- };
81
- for (var _i = 0, paramOrPropertyMetadata_1 = paramOrPropertyMetadata; _i < paramOrPropertyMetadata_1.length; _i++) {
82
- var m = paramOrPropertyMetadata_1[_i];
83
- _loop_1(m);
84
- }
85
- }
86
- paramOrPropertyMetadata.push.apply(paramOrPropertyMetadata, metadatas);
87
- paramsOrPropertiesMetadata[key] = paramOrPropertyMetadata;
88
- Reflect.defineMetadata(metadataKey, paramsOrPropertiesMetadata, annotationTarget);
89
- }
90
- function createTaggedDecorator(metadata) {
91
- return function (target, targetKey, indexOrPropertyDescriptor) {
92
- if (typeof indexOrPropertyDescriptor === 'number') {
93
- tagParameter(target, targetKey, indexOrPropertyDescriptor, metadata);
94
- }
95
- else {
96
- tagProperty(target, targetKey, metadata);
97
- }
98
- };
99
- }
100
- function _decorate(decorators, target) {
101
- Reflect.decorate(decorators, target);
102
- }
103
- function _param(paramIndex, decorator) {
104
- return function (target, key) {
105
- decorator(target, key, paramIndex);
106
- };
107
- }
108
- function decorate(decorator, target, parameterIndexOrProperty) {
109
- if (typeof parameterIndexOrProperty === 'number') {
110
- _decorate([_param(parameterIndexOrProperty, decorator)], target);
111
- }
112
- else if (typeof parameterIndexOrProperty === 'string') {
113
- Reflect.decorate([decorator], target, parameterIndexOrProperty);
114
- }
115
- else {
116
- _decorate([decorator], target);
117
- }
118
- }
@@ -1,5 +0,0 @@
1
- import { LazyServiceIdentifier } from '@inversifyjs/common';
2
- import { interfaces } from '../interfaces/interfaces';
3
- import { DecoratorTarget } from './decorator_utils';
4
- declare const inject: <T = unknown>(serviceIdentifier: interfaces.ServiceIdentifier<T> | LazyServiceIdentifier<T>) => (target: DecoratorTarget, targetKey?: string | symbol, indexOrPropertyDescriptor?: number | TypedPropertyDescriptor<T>) => void;
5
- export { inject };
@@ -1,30 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.inject = void 0;
27
- var METADATA_KEY = __importStar(require("../constants/metadata_keys"));
28
- var inject_base_1 = require("./inject_base");
29
- var inject = (0, inject_base_1.injectBase)(METADATA_KEY.INJECT_TAG);
30
- exports.inject = inject;
@@ -1,4 +0,0 @@
1
- import { LazyServiceIdentifier } from '@inversifyjs/common';
2
- import { interfaces } from '../interfaces/interfaces';
3
- import { DecoratorTarget } from './decorator_utils';
4
- export declare function injectBase(metadataKey: string): <T = unknown>(serviceIdentifier: interfaces.ServiceIdentifier<T> | LazyServiceIdentifier<T>) => (target: DecoratorTarget, targetKey?: string | symbol, indexOrPropertyDescriptor?: number | TypedPropertyDescriptor<T>) => void;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.injectBase = injectBase;
4
- var error_msgs_1 = require("../constants/error_msgs");
5
- var metadata_1 = require("../planning/metadata");
6
- var decorator_utils_1 = require("./decorator_utils");
7
- function injectBase(metadataKey) {
8
- return function (serviceIdentifier) {
9
- return function (target, targetKey, indexOrPropertyDescriptor) {
10
- if (serviceIdentifier === undefined) {
11
- var className = typeof target === 'function' ? target.name : target.constructor.name;
12
- throw new Error((0, error_msgs_1.UNDEFINED_INJECT_ANNOTATION)(className));
13
- }
14
- (0, decorator_utils_1.createTaggedDecorator)(new metadata_1.Metadata(metadataKey, serviceIdentifier))(target, targetKey, indexOrPropertyDescriptor);
15
- };
16
- };
17
- }
@@ -1,2 +0,0 @@
1
- declare function injectable(): <T extends abstract new (...args: any) => unknown>(target: T) => T;
2
- export { injectable };
@@ -1,38 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.injectable = injectable;
27
- var ERRORS_MSGS = __importStar(require("../constants/error_msgs"));
28
- var METADATA_KEY = __importStar(require("../constants/metadata_keys"));
29
- function injectable() {
30
- return function (target) {
31
- if (Reflect.hasOwnMetadata(METADATA_KEY.PARAM_TYPES, target)) {
32
- throw new Error(ERRORS_MSGS.DUPLICATED_INJECTABLE_DECORATOR);
33
- }
34
- var types = Reflect.getMetadata(METADATA_KEY.DESIGN_PARAM_TYPES, target) || [];
35
- Reflect.defineMetadata(METADATA_KEY.PARAM_TYPES, types, target);
36
- return target;
37
- };
38
- }
@@ -1,3 +0,0 @@
1
- import { LazyServiceIdentifier } from '@inversifyjs/common';
2
- import { interfaces } from '../interfaces/interfaces';
3
- export type ServiceIdentifierOrFunc<T> = interfaces.ServiceIdentifier<T> | LazyServiceIdentifier<T>;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +0,0 @@
1
- import { LazyServiceIdentifier } from '@inversifyjs/common';
2
- import { interfaces } from '../interfaces/interfaces';
3
- import { DecoratorTarget } from './decorator_utils';
4
- declare const multiInject: <T = unknown>(serviceIdentifier: interfaces.ServiceIdentifier<T> | LazyServiceIdentifier<T>) => (target: DecoratorTarget, targetKey?: string | symbol, indexOrPropertyDescriptor?: number | TypedPropertyDescriptor<T>) => void;
5
- export { multiInject };
@@ -1,30 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.multiInject = void 0;
27
- var METADATA_KEY = __importStar(require("../constants/metadata_keys"));
28
- var inject_base_1 = require("./inject_base");
29
- var multiInject = (0, inject_base_1.injectBase)(METADATA_KEY.MULTI_INJECT_TAG);
30
- exports.multiInject = multiInject;
@@ -1,2 +0,0 @@
1
- declare function named(name: string | number | symbol): <T>(target: import("./decorator_utils").DecoratorTarget, targetKey?: string | symbol, indexOrPropertyDescriptor?: number | TypedPropertyDescriptor<T>) => void;
2
- export { named };
@@ -1,32 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.named = named;
27
- var METADATA_KEY = __importStar(require("../constants/metadata_keys"));
28
- var metadata_1 = require("../planning/metadata");
29
- var decorator_utils_1 = require("./decorator_utils");
30
- function named(name) {
31
- return (0, decorator_utils_1.createTaggedDecorator)(new metadata_1.Metadata(METADATA_KEY.NAMED_TAG, name));
32
- }
@@ -1,2 +0,0 @@
1
- declare function optional(): <T>(target: import("./decorator_utils").DecoratorTarget, targetKey?: string | symbol, indexOrPropertyDescriptor?: number | TypedPropertyDescriptor<T>) => void;
2
- export { optional };