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,11 +0,0 @@
1
- import { interfaces } from '../interfaces/interfaces';
2
- export declare class ContainerModule implements interfaces.ContainerModule {
3
- id: number;
4
- registry: interfaces.ContainerModuleCallBack;
5
- constructor(registry: interfaces.ContainerModuleCallBack);
6
- }
7
- export declare class AsyncContainerModule implements interfaces.AsyncContainerModule {
8
- id: number;
9
- registry: interfaces.AsyncContainerModuleCallBack;
10
- constructor(registry: interfaces.AsyncContainerModuleCallBack);
11
- }
@@ -1,17 +0,0 @@
1
- import { id } from '../utils/id';
2
- var ContainerModule = (function () {
3
- function ContainerModule(registry) {
4
- this.id = id();
5
- this.registry = registry;
6
- }
7
- return ContainerModule;
8
- }());
9
- export { ContainerModule };
10
- var AsyncContainerModule = (function () {
11
- function AsyncContainerModule(registry) {
12
- this.id = id();
13
- this.registry = registry;
14
- }
15
- return AsyncContainerModule;
16
- }());
17
- export { AsyncContainerModule };
@@ -1,15 +0,0 @@
1
- var ContainerSnapshot = (function () {
2
- function ContainerSnapshot() {
3
- }
4
- ContainerSnapshot.of = function (bindings, middleware, activations, deactivations, moduleActivationStore) {
5
- var snapshot = new ContainerSnapshot();
6
- snapshot.bindings = bindings;
7
- snapshot.middleware = middleware;
8
- snapshot.deactivations = deactivations;
9
- snapshot.activations = activations;
10
- snapshot.moduleActivationStore = moduleActivationStore;
11
- return snapshot;
12
- };
13
- return ContainerSnapshot;
14
- }());
15
- export { ContainerSnapshot };
@@ -1,105 +0,0 @@
1
- import * as ERROR_MSGS from '../constants/error_msgs';
2
- import { isClonable } from '../utils/clonable';
3
- var Lookup = (function () {
4
- function Lookup() {
5
- this._map = new Map();
6
- }
7
- Lookup.prototype.getMap = function () {
8
- return this._map;
9
- };
10
- Lookup.prototype.add = function (serviceIdentifier, value) {
11
- this._checkNonNulish(serviceIdentifier);
12
- if (value === null || value === undefined) {
13
- throw new Error(ERROR_MSGS.NULL_ARGUMENT);
14
- }
15
- var entry = this._map.get(serviceIdentifier);
16
- if (entry !== undefined) {
17
- entry.push(value);
18
- }
19
- else {
20
- this._map.set(serviceIdentifier, [value]);
21
- }
22
- };
23
- Lookup.prototype.get = function (serviceIdentifier) {
24
- this._checkNonNulish(serviceIdentifier);
25
- var entry = this._map.get(serviceIdentifier);
26
- if (entry !== undefined) {
27
- return entry;
28
- }
29
- else {
30
- throw new Error(ERROR_MSGS.KEY_NOT_FOUND);
31
- }
32
- };
33
- Lookup.prototype.remove = function (serviceIdentifier) {
34
- this._checkNonNulish(serviceIdentifier);
35
- if (!this._map.delete(serviceIdentifier)) {
36
- throw new Error(ERROR_MSGS.KEY_NOT_FOUND);
37
- }
38
- };
39
- Lookup.prototype.removeIntersection = function (lookup) {
40
- var _this = this;
41
- this.traverse(function (serviceIdentifier, value) {
42
- var lookupActivations = lookup.hasKey(serviceIdentifier)
43
- ? lookup.get(serviceIdentifier)
44
- : undefined;
45
- if (lookupActivations !== undefined) {
46
- var filteredValues = value.filter(function (lookupValue) {
47
- return !lookupActivations.some(function (moduleActivation) { return lookupValue === moduleActivation; });
48
- });
49
- _this._setValue(serviceIdentifier, filteredValues);
50
- }
51
- });
52
- };
53
- Lookup.prototype.removeByCondition = function (condition) {
54
- var _this = this;
55
- var removals = [];
56
- this._map.forEach(function (entries, key) {
57
- var updatedEntries = [];
58
- for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
59
- var entry = entries_1[_i];
60
- var remove = condition(entry);
61
- if (remove) {
62
- removals.push(entry);
63
- }
64
- else {
65
- updatedEntries.push(entry);
66
- }
67
- }
68
- _this._setValue(key, updatedEntries);
69
- });
70
- return removals;
71
- };
72
- Lookup.prototype.hasKey = function (serviceIdentifier) {
73
- this._checkNonNulish(serviceIdentifier);
74
- return this._map.has(serviceIdentifier);
75
- };
76
- Lookup.prototype.clone = function () {
77
- var copy = new Lookup();
78
- this._map.forEach(function (value, key) {
79
- value.forEach(function (b) {
80
- copy.add(key, isClonable(b) ? b.clone() : b);
81
- });
82
- });
83
- return copy;
84
- };
85
- Lookup.prototype.traverse = function (func) {
86
- this._map.forEach(function (value, key) {
87
- func(key, value);
88
- });
89
- };
90
- Lookup.prototype._checkNonNulish = function (value) {
91
- if (value == null) {
92
- throw new Error(ERROR_MSGS.NULL_ARGUMENT);
93
- }
94
- };
95
- Lookup.prototype._setValue = function (serviceIdentifier, value) {
96
- if (value.length > 0) {
97
- this._map.set(serviceIdentifier, value);
98
- }
99
- else {
100
- this._map.delete(serviceIdentifier);
101
- }
102
- };
103
- return Lookup;
104
- }());
105
- export { Lookup };
@@ -1,10 +0,0 @@
1
- import { interfaces } from '../interfaces/interfaces';
2
- export declare class ModuleActivationStore implements interfaces.ModuleActivationStore {
3
- private readonly _map;
4
- remove(moduleId: number): interfaces.ModuleActivationHandlers;
5
- addDeactivation(moduleId: number, serviceIdentifier: interfaces.ServiceIdentifier<unknown>, onDeactivation: interfaces.BindingDeactivation<unknown>): void;
6
- addActivation(moduleId: number, serviceIdentifier: interfaces.ServiceIdentifier<unknown>, onActivation: interfaces.BindingActivation<unknown>): void;
7
- clone(): interfaces.ModuleActivationStore;
8
- private _getModuleActivationHandlers;
9
- private _getEmptyHandlersStore;
10
- }
@@ -1,47 +0,0 @@
1
- import { Lookup } from './lookup';
2
- var ModuleActivationStore = (function () {
3
- function ModuleActivationStore() {
4
- this._map = new Map();
5
- }
6
- ModuleActivationStore.prototype.remove = function (moduleId) {
7
- var handlers = this._map.get(moduleId);
8
- if (handlers === undefined) {
9
- return this._getEmptyHandlersStore();
10
- }
11
- this._map.delete(moduleId);
12
- return handlers;
13
- };
14
- ModuleActivationStore.prototype.addDeactivation = function (moduleId, serviceIdentifier, onDeactivation) {
15
- this._getModuleActivationHandlers(moduleId).onDeactivations.add(serviceIdentifier, onDeactivation);
16
- };
17
- ModuleActivationStore.prototype.addActivation = function (moduleId, serviceIdentifier, onActivation) {
18
- this._getModuleActivationHandlers(moduleId).onActivations.add(serviceIdentifier, onActivation);
19
- };
20
- ModuleActivationStore.prototype.clone = function () {
21
- var clone = new ModuleActivationStore();
22
- this._map.forEach(function (handlersStore, moduleId) {
23
- clone._map.set(moduleId, {
24
- onActivations: handlersStore.onActivations.clone(),
25
- onDeactivations: handlersStore.onDeactivations.clone(),
26
- });
27
- });
28
- return clone;
29
- };
30
- ModuleActivationStore.prototype._getModuleActivationHandlers = function (moduleId) {
31
- var moduleActivationHandlers = this._map.get(moduleId);
32
- if (moduleActivationHandlers === undefined) {
33
- moduleActivationHandlers = this._getEmptyHandlersStore();
34
- this._map.set(moduleId, moduleActivationHandlers);
35
- }
36
- return moduleActivationHandlers;
37
- };
38
- ModuleActivationStore.prototype._getEmptyHandlersStore = function () {
39
- var handlersStore = {
40
- onActivations: new Lookup(),
41
- onDeactivations: new Lookup(),
42
- };
43
- return handlersStore;
44
- };
45
- return ModuleActivationStore;
46
- }());
47
- export { ModuleActivationStore };
@@ -1,269 +0,0 @@
1
- import { Newable as CommonNewable, ServiceIdentifier as CommonServiceIdentifier } from '@inversifyjs/common';
2
- import { LegacyTarget } from '@inversifyjs/core';
3
- import { FactoryType } from '../utils/factory_type';
4
- declare namespace interfaces {
5
- export type DynamicValue<T> = (context: interfaces.Context) => T | Promise<T>;
6
- export type ContainerResolution<T> = T | Promise<T> | (T | Promise<T>)[];
7
- type AsyncCallback<TCallback> = TCallback extends (...args: infer TArgs) => infer TResult ? (...args: TArgs) => Promise<TResult> : never;
8
- export type BindingScope = 'Singleton' | 'Transient' | 'Request';
9
- export type BindingType = 'ConstantValue' | 'Constructor' | 'DynamicValue' | 'Factory' | 'Function' | 'Instance' | 'Invalid' | 'Provider';
10
- export type TargetType = 'ConstructorArgument' | 'ClassProperty' | 'Variable';
11
- export interface BindingScopeEnum {
12
- Request: interfaces.BindingScope;
13
- Singleton: interfaces.BindingScope;
14
- Transient: interfaces.BindingScope;
15
- }
16
- export interface BindingTypeEnum {
17
- ConstantValue: interfaces.BindingType;
18
- Constructor: interfaces.BindingType;
19
- DynamicValue: interfaces.BindingType;
20
- Factory: interfaces.BindingType;
21
- Function: interfaces.BindingType;
22
- Instance: interfaces.BindingType;
23
- Invalid: interfaces.BindingType;
24
- Provider: interfaces.BindingType;
25
- }
26
- export interface TargetTypeEnum {
27
- ConstructorArgument: interfaces.TargetType;
28
- ClassProperty: interfaces.TargetType;
29
- Variable: interfaces.TargetType;
30
- }
31
- export type Newable<TInstance = unknown> = CommonNewable<TInstance>;
32
- export type Instance<T> = T & Record<string, () => void>;
33
- export interface Abstract<T> {
34
- prototype: T;
35
- }
36
- export type ServiceIdentifier<T = unknown> = CommonServiceIdentifier<T>;
37
- export interface Clonable<T> {
38
- clone(): T;
39
- }
40
- export type BindingActivation<T = unknown> = (context: interfaces.Context, injectable: T) => T | Promise<T>;
41
- export type BindingDeactivation<T = unknown> = (injectable: T) => void | Promise<void>;
42
- export interface Binding<TActivated = unknown> extends Clonable<Binding<TActivated>> {
43
- id: number;
44
- moduleId: ContainerModuleBase['id'];
45
- activated: boolean;
46
- serviceIdentifier: ServiceIdentifier<TActivated>;
47
- constraint: ConstraintFunction;
48
- dynamicValue: DynamicValue<TActivated> | null;
49
- scope: BindingScope;
50
- type: BindingType;
51
- implementationType: Newable<TActivated> | TActivated | null;
52
- factory: FactoryCreator<unknown> | null;
53
- provider: ProviderCreator<unknown> | null;
54
- onActivation: BindingActivation<TActivated> | null;
55
- onDeactivation: BindingDeactivation<TActivated> | null;
56
- cache: null | TActivated | Promise<TActivated>;
57
- }
58
- export type SimpleFactory<T, U extends unknown[] = unknown[]> = (...args: U) => T;
59
- export type MultiFactory<T, U extends unknown[] = unknown[], V extends unknown[] = unknown[]> = (...args: U) => SimpleFactory<T, V>;
60
- export type Factory<T, U extends unknown[] = unknown[], V extends unknown[] = unknown[]> = SimpleFactory<T, U> | MultiFactory<T, U, V>;
61
- export type FactoryCreator<T, U extends unknown[] = unknown[], V extends unknown[] = unknown[]> = (context: Context) => Factory<T, U, V>;
62
- export type AutoNamedFactory<T> = SimpleFactory<T, [string]>;
63
- export type AutoFactory<T> = SimpleFactory<T, []>;
64
- export type FactoryTypeFunction<T = unknown> = (context: interfaces.Context) => T | Promise<T>;
65
- export interface FactoryDetails {
66
- factoryType: FactoryType;
67
- factory: FactoryTypeFunction | null;
68
- }
69
- export type Provider<T> = (...args: any[]) => ((...args: any[]) => Promise<T>) | Promise<T>;
70
- export type ProviderCreator<T> = (context: Context) => Provider<T>;
71
- export interface NextArgs<T = unknown> {
72
- avoidConstraints: boolean;
73
- contextInterceptor: (contexts: Context) => Context;
74
- isMultiInject: boolean;
75
- targetType: TargetType;
76
- serviceIdentifier: interfaces.ServiceIdentifier<T>;
77
- key?: string | number | symbol | undefined;
78
- value?: unknown;
79
- }
80
- export type Next = (args: NextArgs) => unknown | unknown[];
81
- export type Middleware = (next: Next) => Next;
82
- export type ContextInterceptor = (context: interfaces.Context) => interfaces.Context;
83
- export interface Context {
84
- id: number;
85
- container: Container;
86
- plan: Plan;
87
- currentRequest: Request;
88
- addPlan(plan: Plan): void;
89
- setCurrentRequest(request: Request): void;
90
- }
91
- export type MetadataOrMetadataArray = Metadata | Metadata[];
92
- export interface Metadata<TValue = unknown> {
93
- key: string | number | symbol;
94
- value: TValue;
95
- }
96
- export interface Plan {
97
- parentContext: Context;
98
- rootRequest: Request;
99
- }
100
- export interface QueryableString {
101
- startsWith(searchString: string): boolean;
102
- endsWith(searchString: string): boolean;
103
- contains(searchString: string): boolean;
104
- equals(compareString: string): boolean;
105
- value(): string;
106
- }
107
- export type ResolveRequestHandler = (request: interfaces.Request) => unknown;
108
- export type RequestScope = Map<unknown, unknown>;
109
- export interface Request {
110
- id: number;
111
- serviceIdentifier: ServiceIdentifier;
112
- parentContext: Context;
113
- parentRequest: Request | null;
114
- childRequests: Request[];
115
- target: Target;
116
- bindings: Binding<unknown>[];
117
- requestScope: RequestScope | null;
118
- addChildRequest(serviceIdentifier: ServiceIdentifier, bindings: Binding<unknown> | Binding<unknown>[], target: Target): Request;
119
- }
120
- export type Target = LegacyTarget;
121
- export interface ContainerOptions {
122
- autoBindInjectable?: boolean;
123
- defaultScope?: BindingScope | undefined;
124
- skipBaseClassChecks?: boolean;
125
- }
126
- export interface Container {
127
- id: number;
128
- parent: Container | null;
129
- options: ContainerOptions;
130
- bind<T>(serviceIdentifier: ServiceIdentifier<T>): BindingToSyntax<T>;
131
- rebind<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): interfaces.BindingToSyntax<T>;
132
- rebindAsync<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): Promise<interfaces.BindingToSyntax<T>>;
133
- unbind(serviceIdentifier: ServiceIdentifier): void;
134
- unbindAsync(serviceIdentifier: interfaces.ServiceIdentifier): Promise<void>;
135
- unbindAll(): void;
136
- unbindAllAsync(): Promise<void>;
137
- isBound(serviceIdentifier: ServiceIdentifier): boolean;
138
- isCurrentBound<T>(serviceIdentifier: ServiceIdentifier<T>): boolean;
139
- isBoundNamed(serviceIdentifier: ServiceIdentifier, named: string | number | symbol): boolean;
140
- isBoundTagged(serviceIdentifier: ServiceIdentifier, key: string | number | symbol, value: unknown): boolean;
141
- get<T>(serviceIdentifier: ServiceIdentifier<T>): T;
142
- getNamed<T>(serviceIdentifier: ServiceIdentifier<T>, named: string | number | symbol): T;
143
- getTagged<T>(serviceIdentifier: ServiceIdentifier<T>, key: string | number | symbol, value: unknown): T;
144
- getAll<T>(serviceIdentifier: ServiceIdentifier<T>): T[];
145
- getAllTagged<T>(serviceIdentifier: ServiceIdentifier<T>, key: string | number | symbol, value: unknown): T[];
146
- getAllNamed<T>(serviceIdentifier: ServiceIdentifier<T>, named: string | number | symbol): T[];
147
- getAsync<T>(serviceIdentifier: ServiceIdentifier<T>): Promise<T>;
148
- getNamedAsync<T>(serviceIdentifier: ServiceIdentifier<T>, named: string | number | symbol): Promise<T>;
149
- getTaggedAsync<T>(serviceIdentifier: ServiceIdentifier<T>, key: string | number | symbol, value: unknown): Promise<T>;
150
- getAllAsync<T>(serviceIdentifier: ServiceIdentifier<T>): Promise<T[]>;
151
- getAllTaggedAsync<T>(serviceIdentifier: ServiceIdentifier<T>, key: string | number | symbol, value: unknown): Promise<T[]>;
152
- getAllNamedAsync<T>(serviceIdentifier: ServiceIdentifier<T>, named: string | number | symbol): Promise<T[]>;
153
- onActivation<T>(serviceIdentifier: ServiceIdentifier<T>, onActivation: BindingActivation<T>): void;
154
- onDeactivation<T>(serviceIdentifier: ServiceIdentifier<T>, onDeactivation: BindingDeactivation<T>): void;
155
- resolve<T>(constructorFunction: interfaces.Newable<T>): T;
156
- load(...modules: ContainerModule[]): void;
157
- loadAsync(...modules: AsyncContainerModule[]): Promise<void>;
158
- unload(...modules: ContainerModuleBase[]): void;
159
- unloadAsync(...modules: ContainerModuleBase[]): Promise<void>;
160
- applyCustomMetadataReader(metadataReader: MetadataReader): void;
161
- applyMiddleware(...middleware: Middleware[]): void;
162
- snapshot(): void;
163
- restore(): void;
164
- createChild(): Container;
165
- }
166
- export type Bind = <T = unknown>(serviceIdentifier: ServiceIdentifier<T>) => BindingToSyntax<T>;
167
- export type Rebind = <T = unknown>(serviceIdentifier: ServiceIdentifier<T>) => BindingToSyntax<T>;
168
- export type Unbind = <T = unknown>(serviceIdentifier: ServiceIdentifier<T>) => void;
169
- export type UnbindAsync = <T = unknown>(serviceIdentifier: ServiceIdentifier<T>) => Promise<void>;
170
- export type IsBound = <T = unknown>(serviceIdentifier: ServiceIdentifier<T>) => boolean;
171
- export interface ContainerModuleBase {
172
- id: number;
173
- }
174
- export interface ContainerModule extends ContainerModuleBase {
175
- registry: ContainerModuleCallBack;
176
- }
177
- export interface AsyncContainerModule extends ContainerModuleBase {
178
- registry: AsyncContainerModuleCallBack;
179
- }
180
- export interface ModuleActivationHandlers {
181
- onActivations: Lookup<BindingActivation<unknown>>;
182
- onDeactivations: Lookup<BindingDeactivation<unknown>>;
183
- }
184
- export interface ModuleActivationStore extends Clonable<ModuleActivationStore> {
185
- addDeactivation(moduleId: ContainerModuleBase['id'], serviceIdentifier: ServiceIdentifier<unknown>, onDeactivation: interfaces.BindingDeactivation<unknown>): void;
186
- addActivation(moduleId: ContainerModuleBase['id'], serviceIdentifier: ServiceIdentifier<unknown>, onActivation: interfaces.BindingActivation<unknown>): void;
187
- remove(moduleId: ContainerModuleBase['id']): ModuleActivationHandlers;
188
- }
189
- export type ContainerModuleCallBack = (bind: interfaces.Bind, unbind: interfaces.Unbind, isBound: interfaces.IsBound, rebind: interfaces.Rebind, unbindAsync: interfaces.UnbindAsync, onActivation: interfaces.Container['onActivation'], onDeactivation: interfaces.Container['onDeactivation']) => void;
190
- export type AsyncContainerModuleCallBack = AsyncCallback<ContainerModuleCallBack>;
191
- export interface ContainerSnapshot {
192
- bindings: Lookup<Binding<unknown>>;
193
- activations: Lookup<BindingActivation<unknown>>;
194
- deactivations: Lookup<BindingDeactivation<unknown>>;
195
- middleware: Next | null;
196
- moduleActivationStore: interfaces.ModuleActivationStore;
197
- }
198
- export interface Lookup<T> extends Clonable<Lookup<T>> {
199
- add(serviceIdentifier: ServiceIdentifier, value: T): void;
200
- getMap(): Map<interfaces.ServiceIdentifier, T[]>;
201
- get(serviceIdentifier: ServiceIdentifier): T[];
202
- remove(serviceIdentifier: interfaces.ServiceIdentifier): void;
203
- removeByCondition(condition: (item: T) => boolean): T[];
204
- removeIntersection(lookup: interfaces.Lookup<T>): void;
205
- hasKey(serviceIdentifier: ServiceIdentifier): boolean;
206
- clone(): Lookup<T>;
207
- traverse(func: (key: interfaces.ServiceIdentifier, value: T[]) => void): void;
208
- }
209
- export interface BindingOnSyntax<T> {
210
- onActivation(fn: (context: Context, injectable: T) => T | Promise<T>): BindingWhenSyntax<T>;
211
- onDeactivation(fn: (injectable: T) => void | Promise<void>): BindingWhenSyntax<T>;
212
- }
213
- export interface BindingWhenSyntax<T> {
214
- when(constraint: (request: Request) => boolean): BindingOnSyntax<T>;
215
- whenTargetNamed(name: string | number | symbol): BindingOnSyntax<T>;
216
- whenTargetIsDefault(): BindingOnSyntax<T>;
217
- whenTargetTagged(tag: string | number | symbol, value: unknown): BindingOnSyntax<T>;
218
- whenInjectedInto(parent: NewableFunction | string): BindingOnSyntax<T>;
219
- whenParentNamed(name: string | number | symbol): BindingOnSyntax<T>;
220
- whenParentTagged(tag: string | number | symbol, value: unknown): BindingOnSyntax<T>;
221
- whenAnyAncestorIs(ancestor: NewableFunction | string): BindingOnSyntax<T>;
222
- whenNoAncestorIs(ancestor: NewableFunction | string): BindingOnSyntax<T>;
223
- whenAnyAncestorNamed(name: string | number | symbol): BindingOnSyntax<T>;
224
- whenAnyAncestorTagged(tag: string | number | symbol, value: unknown): BindingOnSyntax<T>;
225
- whenNoAncestorNamed(name: string | number | symbol): BindingOnSyntax<T>;
226
- whenNoAncestorTagged(tag: string | number | symbol, value: unknown): BindingOnSyntax<T>;
227
- whenAnyAncestorMatches(constraint: (request: Request) => boolean): BindingOnSyntax<T>;
228
- whenNoAncestorMatches(constraint: (request: Request) => boolean): BindingOnSyntax<T>;
229
- }
230
- export interface BindingWhenOnSyntax<T> extends BindingWhenSyntax<T>, BindingOnSyntax<T> {
231
- }
232
- export interface BindingInSyntax<T> {
233
- inSingletonScope(): BindingWhenOnSyntax<T>;
234
- inTransientScope(): BindingWhenOnSyntax<T>;
235
- inRequestScope(): BindingWhenOnSyntax<T>;
236
- }
237
- export interface BindingInWhenOnSyntax<T> extends BindingInSyntax<T>, BindingWhenOnSyntax<T> {
238
- }
239
- export interface BindingToSyntax<T> {
240
- to(constructor: Newable<T>): BindingInWhenOnSyntax<T>;
241
- toSelf(): BindingInWhenOnSyntax<T>;
242
- toConstantValue(value: T): BindingWhenOnSyntax<T>;
243
- toDynamicValue(func: DynamicValue<T>): BindingInWhenOnSyntax<T>;
244
- toConstructor<T2>(constructor: Newable<T2>): BindingWhenOnSyntax<T>;
245
- toFactory<T2, T3 extends unknown[] = unknown[], T4 extends unknown[] = unknown[]>(factory: FactoryCreator<T2, T3, T4>): BindingWhenOnSyntax<T>;
246
- toFunction(func: T): BindingWhenOnSyntax<T>;
247
- toAutoFactory<T2>(serviceIdentifier: ServiceIdentifier<T2>): BindingWhenOnSyntax<T>;
248
- toAutoNamedFactory<T2>(serviceIdentifier: ServiceIdentifier<T2>): BindingWhenOnSyntax<T>;
249
- toProvider<T2>(provider: ProviderCreator<T2>): BindingWhenOnSyntax<T>;
250
- toService(service: ServiceIdentifier<T>): void;
251
- }
252
- export interface ConstraintFunction {
253
- (request: Request | null): boolean;
254
- metaData?: Metadata;
255
- }
256
- export interface MetadataReader {
257
- getConstructorMetadata(constructorFunc: NewableFunction): ConstructorMetadata;
258
- getPropertiesMetadata(constructorFunc: NewableFunction): MetadataMap;
259
- }
260
- export interface MetadataMap {
261
- [propertyNameOrArgumentIndex: string | symbol]: Metadata[];
262
- }
263
- export interface ConstructorMetadata {
264
- compilerGeneratedMetadata: NewableFunction[] | undefined;
265
- userGeneratedMetadata: MetadataMap;
266
- }
267
- export {};
268
- }
269
- export type { interfaces };
@@ -1 +0,0 @@
1
- export {};
package/es/inversify.d.ts DELETED
@@ -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';