@codefast/di 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/CHANGELOG.md +151 -0
  2. package/README.md +128 -31
  3. package/dist/container/{binding-builders.d.ts → binding-chain.d.ts} +21 -28
  4. package/dist/container/{binding-builders.js → binding-chain.js} +53 -163
  5. package/dist/container/container.d.ts +11 -3
  6. package/dist/container/container.js +176 -102
  7. package/dist/core/binding-builders.d.ts +117 -0
  8. package/dist/core/binding-declaration.d.ts +9 -2
  9. package/dist/core/binding-declaration.js +5 -4
  10. package/dist/core/binding.d.ts +21 -149
  11. package/dist/core/binding.js +15 -25
  12. package/dist/core/module.d.ts +1 -1
  13. package/dist/core/registry.d.ts +9 -24
  14. package/dist/core/registry.js +30 -155
  15. package/dist/core/tag.js +1 -1
  16. package/dist/decorators/inject.d.ts +3 -1
  17. package/dist/decorators/inject.js +5 -5
  18. package/dist/decorators/injectable.js +2 -2
  19. package/dist/decorators/lifecycle.d.ts +20 -0
  20. package/dist/decorators/{lifecycle-decorators.js → lifecycle.js} +7 -3
  21. package/dist/decorators/{decorator-metadata.js → metadata-record.js} +1 -1
  22. package/dist/{errors/errors.d.ts → errors.d.ts} +29 -19
  23. package/dist/{errors/errors.js → errors.js} +43 -25
  24. package/dist/index.d.ts +12 -10
  25. package/dist/index.js +6 -6
  26. package/dist/injection/descriptor.d.ts +1 -1
  27. package/dist/introspection/dependency-graph.d.ts +1 -1
  28. package/dist/introspection/dependency-graph.js +3 -4
  29. package/dist/introspection/explanation.d.ts +101 -0
  30. package/dist/introspection/explanation.js +169 -0
  31. package/dist/introspection/inspector.d.ts +9 -2
  32. package/dist/introspection/inspector.js +25 -20
  33. package/dist/lifecycle/{lifecycle-manager.d.ts → hooks.d.ts} +11 -2
  34. package/dist/lifecycle/{lifecycle-manager.js → hooks.js} +51 -28
  35. package/dist/lifecycle/{scope-manager.d.ts → scopes.d.ts} +23 -6
  36. package/dist/lifecycle/{scope-manager.js → scopes.js} +93 -20
  37. package/dist/metadata/{metadata-keys.d.ts → keys.d.ts} +1 -1
  38. package/dist/metadata/{metadata-keys.js → keys.js} +1 -1
  39. package/dist/metadata/{metadata-reader-token.d.ts → reader-token.d.ts} +1 -1
  40. package/dist/metadata/{symbol-metadata-reader.d.ts → symbol-reader.d.ts} +1 -1
  41. package/dist/metadata/{symbol-metadata-reader.js → symbol-reader.js} +1 -1
  42. package/dist/metadata/{metadata-types.d.ts → types.d.ts} +1 -1
  43. package/dist/metadata/types.js +1 -0
  44. package/dist/metadata/verify.d.ts +43 -0
  45. package/dist/metadata/verify.js +133 -0
  46. package/dist/metadata/{verifying-metadata-reader.d.ts → verifying-reader.d.ts} +1 -1
  47. package/dist/metadata/{verifying-metadata-reader.js → verifying-reader.js} +2 -2
  48. package/dist/resolution/cache/activation-need.d.ts +1 -1
  49. package/dist/resolution/cache/activation-need.js +5 -1
  50. package/dist/resolution/cache/class-introspector.d.ts +27 -36
  51. package/dist/resolution/cache/class-introspector.js +61 -159
  52. package/dist/resolution/cache/{binding-lookup-cache.d.ts → lookup.d.ts} +7 -2
  53. package/dist/resolution/cache/{binding-lookup-cache.js → lookup.js} +40 -8
  54. package/dist/resolution/context.d.ts +1 -1
  55. package/dist/resolution/context.js +1 -1
  56. package/dist/resolution/{path/resolution-path.d.ts → path.d.ts} +12 -2
  57. package/dist/resolution/{path/resolution-path.js → path.js} +23 -3
  58. package/dist/resolution/plan/{plan-codegen.d.ts → codegen.d.ts} +2 -4
  59. package/dist/resolution/plan/{plan-codegen.js → codegen.js} +2 -4
  60. package/dist/resolution/plan/{instantiation-plan.d.ts → compiler.d.ts} +1 -1
  61. package/dist/resolution/plan/{instantiation-plan.js → compiler.js} +4 -4
  62. package/dist/resolution/resolver.d.ts +19 -7
  63. package/dist/resolution/resolver.js +343 -125
  64. package/dist/resolution/select/{binding-select.d.ts → candidates.d.ts} +30 -0
  65. package/dist/resolution/select/{binding-select.js → candidates.js} +51 -10
  66. package/dist/resolution/select/constraints.js +1 -1
  67. package/package.json +80 -72
  68. package/dist/core/binding-scope.d.ts +0 -12
  69. package/dist/core/binding-scope.js +0 -12
  70. package/dist/decorators/lifecycle-decorators.d.ts +0 -14
  71. /package/dist/{ambient/active-container.d.ts → ambient-container.d.ts} +0 -0
  72. /package/dist/{ambient/active-container.js → ambient-container.js} +0 -0
  73. /package/dist/{metadata/metadata-types.js → core/binding-builders.js} +0 -0
  74. /package/dist/decorators/{decorator-metadata.d.ts → metadata-record.d.ts} +0 -0
  75. /package/dist/injection/{resolve-options.d.ts → dependency-slot.d.ts} +0 -0
  76. /package/dist/injection/{resolve-options.js → dependency-slot.js} +0 -0
  77. /package/dist/{errors → introspection}/diagnostics.d.ts +0 -0
  78. /package/dist/{errors → introspection}/diagnostics.js +0 -0
  79. /package/dist/metadata/{metadata-reader-token.js → reader-token.js} +0 -0
@@ -9,6 +9,36 @@ import type { ConstraintContext, ResolveOptions } from "#core/types";
9
9
  * @since 0.3.16-canary.0
10
10
  */
11
11
  export declare function selectBinding(bindings: ReadonlyArray<Binding>, options: ResolveOptions | undefined, ctx: ConstraintContext, tokenDisplayName: string): Binding | undefined;
12
+ /**
13
+ * The rule that settles a request's eligible candidates, in the order selection applies them.
14
+ *
15
+ * @remarks `sole-candidate`: one candidate is eligible. `sole-predicate`: the only candidate carrying a `when()`
16
+ * predicate beats those without. `most-criteria`: the slot declaring more criteria than every other wins.
17
+ * `ambiguous`: a tie, which `resolve` reports as `AmbiguousBindingError`.
18
+ *
19
+ * @since 0.12.0
20
+ */
21
+ export type CandidateRule = "sole-candidate" | "sole-predicate" | "most-criteria" | "ambiguous";
22
+ /**
23
+ * The candidate a non-empty eligible list settles on, or `undefined` for a tie — the one decision `resolve` and
24
+ * `explain()` share.
25
+ *
26
+ * @remarks Most specific wins, predicate before criterion count: a lone predicate-carrying candidate
27
+ * is a deliberate specialization of the default, and a slot declaring more of what the request
28
+ * carries is the more specific match, so an over-specified request resolves instead of tying.
29
+ *
30
+ * @since 0.12.0
31
+ */
32
+ export declare function chooseCandidate(candidates: ReadonlyArray<Binding>): Binding | undefined;
33
+ /**
34
+ * The rule behind what {@link chooseCandidate} returned for the same list, read off its answer.
35
+ *
36
+ * @remarks Kept beside the decision and derived from it, so the order lives in one function and resolve
37
+ * pays nothing for the label.
38
+ *
39
+ * @since 0.12.0
40
+ */
41
+ export declare function candidateRuleOf(candidates: ReadonlyArray<Binding>, chosen: Binding | undefined): CandidateRule;
12
42
  /**
13
43
  * Selects all candidates matching options + predicates.
14
44
  *
@@ -1,5 +1,5 @@
1
1
  import { coversTagKeys, NO_TAG_KEYS, slotName, slotNameCriterionOf } from "#core/tag";
2
- import { AmbiguousBindingError } from "#errors/errors";
2
+ import { AmbiguousBindingError } from "#errors";
3
3
  /**
4
4
  * The single candidate a request selects from a list, by slot match then predicate.
5
5
  *
@@ -15,9 +15,26 @@ export function selectBinding(bindings, options, ctx, tokenDisplayName) {
15
15
  if (candidates.length === 1) {
16
16
  return candidates[0];
17
17
  }
18
- // Most specific wins, predicate before tag count: a lone predicate-carrying candidate beats
19
- // predicate-less ones, a predicate being a deliberate specialization of the default. This order is
20
- // what keeps every resolution that already succeeds deciding the same way.
18
+ const chosen = chooseCandidate(candidates);
19
+ if (chosen !== undefined) {
20
+ return chosen;
21
+ }
22
+ throw new AmbiguousBindingError(tokenDisplayName, candidates.map((c) => c.identifier));
23
+ }
24
+ /**
25
+ * The candidate a non-empty eligible list settles on, or `undefined` for a tie — the one decision `resolve` and
26
+ * `explain()` share.
27
+ *
28
+ * @remarks Most specific wins, predicate before criterion count: a lone predicate-carrying candidate
29
+ * is a deliberate specialization of the default, and a slot declaring more of what the request
30
+ * carries is the more specific match, so an over-specified request resolves instead of tying.
31
+ *
32
+ * @since 0.12.0
33
+ */
34
+ export function chooseCandidate(candidates) {
35
+ if (candidates.length === 1) {
36
+ return candidates[0];
37
+ }
21
38
  let predicatedCandidate;
22
39
  for (const candidate of candidates) {
23
40
  if (candidate.predicate !== undefined) {
@@ -31,13 +48,37 @@ export function selectBinding(bindings, options, ctx, tokenDisplayName) {
31
48
  if (predicatedCandidate !== undefined) {
32
49
  return predicatedCandidate;
33
50
  }
34
- // Reached only where the throw was: a slot declaring more of what the request carries is the more
35
- // specific match, so an over-specified request resolves instead of being ambiguous.
36
- const mostSpecific = mostSpecificByCriterionCount(candidates);
37
- if (mostSpecific !== undefined) {
38
- return mostSpecific;
51
+ return mostSpecificByCriterionCount(candidates);
52
+ }
53
+ /**
54
+ * The rule behind what {@link chooseCandidate} returned for the same list, read off its answer.
55
+ *
56
+ * @remarks Kept beside the decision and derived from it, so the order lives in one function and resolve
57
+ * pays nothing for the label.
58
+ *
59
+ * @since 0.12.0
60
+ */
61
+ export function candidateRuleOf(candidates, chosen) {
62
+ if (chosen === undefined) {
63
+ return "ambiguous";
39
64
  }
40
- throw new AmbiguousBindingError(tokenDisplayName, candidates.map((c) => c.identifier));
65
+ if (candidates.length === 1) {
66
+ return "sole-candidate";
67
+ }
68
+ return solePredicatedCandidate(candidates) === chosen ? "sole-predicate" : "most-criteria";
69
+ }
70
+ /** The one candidate carrying a predicate, or `undefined` when none or several do. */
71
+ function solePredicatedCandidate(candidates) {
72
+ let predicatedCandidate;
73
+ for (const candidate of candidates) {
74
+ if (candidate.predicate !== undefined) {
75
+ if (predicatedCandidate !== undefined) {
76
+ return undefined;
77
+ }
78
+ predicatedCandidate = candidate;
79
+ }
80
+ }
81
+ return predicatedCandidate;
41
82
  }
42
83
  /** The lone candidate declaring more criteria than every other, or `undefined` when that is a tie. */
43
84
  function mostSpecificByCriterionCount(candidates) {
@@ -1,7 +1,7 @@
1
1
  import { requiringAncestorSlotName, requiringAncestorSlotNames } from "#core/constraint-requirement";
2
2
  import { coversTagKeys, slotName, tagKeyMaskOf } from "#core/tag";
3
3
  import { tokenName } from "#core/token";
4
- import { EmptyTagCriteriaError } from "#errors/errors";
4
+ import { EmptyTagCriteriaError } from "#errors";
5
5
  /**
6
6
  * Matches when the direct parent frame resolves the given token.
7
7
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@codefast/di",
3
- "version": "0.11.0",
4
- "description": "Lightweight dependency injection primitives for Codefast",
3
+ "version": "0.13.0",
4
+ "description": "Type-safe, zero-dependency dependency injection for TypeScript, on standard decorators",
5
5
  "keywords": [
6
6
  "codefast",
7
7
  "dependency-injection",
@@ -42,13 +42,13 @@
42
42
  "types": "./dist/index.d.ts",
43
43
  "import": "./dist/index.js"
44
44
  },
45
- "./ambient/active-container": {
46
- "types": "./dist/ambient/active-container.d.ts",
47
- "import": "./dist/ambient/active-container.js"
45
+ "./ambient-container": {
46
+ "types": "./dist/ambient-container.d.ts",
47
+ "import": "./dist/ambient-container.js"
48
48
  },
49
- "./container/binding-builders": {
50
- "types": "./dist/container/binding-builders.d.ts",
51
- "import": "./dist/container/binding-builders.js"
49
+ "./container/binding-chain": {
50
+ "types": "./dist/container/binding-chain.d.ts",
51
+ "import": "./dist/container/binding-chain.js"
52
52
  },
53
53
  "./container/container": {
54
54
  "types": "./dist/container/container.d.ts",
@@ -58,14 +58,14 @@
58
58
  "types": "./dist/core/binding.d.ts",
59
59
  "import": "./dist/core/binding.js"
60
60
  },
61
+ "./core/binding-builders": {
62
+ "types": "./dist/core/binding-builders.d.ts",
63
+ "import": "./dist/core/binding-builders.js"
64
+ },
61
65
  "./core/binding-declaration": {
62
66
  "types": "./dist/core/binding-declaration.d.ts",
63
67
  "import": "./dist/core/binding-declaration.js"
64
68
  },
65
- "./core/binding-scope": {
66
- "types": "./dist/core/binding-scope.d.ts",
67
- "import": "./dist/core/binding-scope.js"
68
- },
69
69
  "./core/constraint-requirement": {
70
70
  "types": "./dist/core/constraint-requirement.d.ts",
71
71
  "import": "./dist/core/constraint-requirement.js"
@@ -102,10 +102,6 @@
102
102
  "types": "./dist/core/types.d.ts",
103
103
  "import": "./dist/core/types.js"
104
104
  },
105
- "./decorators/decorator-metadata": {
106
- "types": "./dist/decorators/decorator-metadata.d.ts",
107
- "import": "./dist/decorators/decorator-metadata.js"
108
- },
109
105
  "./decorators/inject": {
110
106
  "types": "./dist/decorators/inject.d.ts",
111
107
  "import": "./dist/decorators/inject.js"
@@ -114,77 +110,89 @@
114
110
  "types": "./dist/decorators/injectable.d.ts",
115
111
  "import": "./dist/decorators/injectable.js"
116
112
  },
117
- "./decorators/lifecycle-decorators": {
118
- "types": "./dist/decorators/lifecycle-decorators.d.ts",
119
- "import": "./dist/decorators/lifecycle-decorators.js"
113
+ "./decorators/lifecycle": {
114
+ "types": "./dist/decorators/lifecycle.d.ts",
115
+ "import": "./dist/decorators/lifecycle.js"
120
116
  },
121
- "./errors/diagnostics": {
122
- "types": "./dist/errors/diagnostics.d.ts",
123
- "import": "./dist/errors/diagnostics.js"
117
+ "./decorators/metadata-record": {
118
+ "types": "./dist/decorators/metadata-record.d.ts",
119
+ "import": "./dist/decorators/metadata-record.js"
124
120
  },
125
- "./errors/errors": {
126
- "types": "./dist/errors/errors.d.ts",
127
- "import": "./dist/errors/errors.js"
121
+ "./errors": {
122
+ "types": "./dist/errors.d.ts",
123
+ "import": "./dist/errors.js"
124
+ },
125
+ "./injection/dependency-slot": {
126
+ "types": "./dist/injection/dependency-slot.d.ts",
127
+ "import": "./dist/injection/dependency-slot.js"
128
128
  },
129
129
  "./injection/descriptor": {
130
130
  "types": "./dist/injection/descriptor.d.ts",
131
131
  "import": "./dist/injection/descriptor.js"
132
132
  },
133
- "./injection/resolve-options": {
134
- "types": "./dist/injection/resolve-options.d.ts",
135
- "import": "./dist/injection/resolve-options.js"
136
- },
137
- "./dependency-graph": {
133
+ "./introspection/dependency-graph": {
138
134
  "types": "./dist/introspection/dependency-graph.d.ts",
139
135
  "import": "./dist/introspection/dependency-graph.js"
140
136
  },
141
- "./graph-adapters/cytoscape": {
137
+ "./introspection/diagnostics": {
138
+ "types": "./dist/introspection/diagnostics.d.ts",
139
+ "import": "./dist/introspection/diagnostics.js"
140
+ },
141
+ "./introspection/explanation": {
142
+ "types": "./dist/introspection/explanation.d.ts",
143
+ "import": "./dist/introspection/explanation.js"
144
+ },
145
+ "./introspection/graph-adapters/cytoscape": {
142
146
  "types": "./dist/introspection/graph-adapters/cytoscape.d.ts",
143
147
  "import": "./dist/introspection/graph-adapters/cytoscape.js"
144
148
  },
145
- "./graph-adapters/dot": {
149
+ "./introspection/graph-adapters/dot": {
146
150
  "types": "./dist/introspection/graph-adapters/dot.d.ts",
147
151
  "import": "./dist/introspection/graph-adapters/dot.js"
148
152
  },
149
- "./graph-adapters/mermaid": {
153
+ "./introspection/graph-adapters/mermaid": {
150
154
  "types": "./dist/introspection/graph-adapters/mermaid.d.ts",
151
155
  "import": "./dist/introspection/graph-adapters/mermaid.js"
152
156
  },
153
- "./graph-adapters/reactflow": {
157
+ "./introspection/graph-adapters/reactflow": {
154
158
  "types": "./dist/introspection/graph-adapters/reactflow.d.ts",
155
159
  "import": "./dist/introspection/graph-adapters/reactflow.js"
156
160
  },
157
- "./inspector": {
161
+ "./introspection/inspector": {
158
162
  "types": "./dist/introspection/inspector.d.ts",
159
163
  "import": "./dist/introspection/inspector.js"
160
164
  },
161
- "./lifecycle/lifecycle-manager": {
162
- "types": "./dist/lifecycle/lifecycle-manager.d.ts",
163
- "import": "./dist/lifecycle/lifecycle-manager.js"
165
+ "./lifecycle/hooks": {
166
+ "types": "./dist/lifecycle/hooks.d.ts",
167
+ "import": "./dist/lifecycle/hooks.js"
168
+ },
169
+ "./lifecycle/scopes": {
170
+ "types": "./dist/lifecycle/scopes.d.ts",
171
+ "import": "./dist/lifecycle/scopes.js"
164
172
  },
165
- "./lifecycle/scope-manager": {
166
- "types": "./dist/lifecycle/scope-manager.d.ts",
167
- "import": "./dist/lifecycle/scope-manager.js"
173
+ "./metadata/keys": {
174
+ "types": "./dist/metadata/keys.d.ts",
175
+ "import": "./dist/metadata/keys.js"
168
176
  },
169
- "./metadata/metadata-keys": {
170
- "types": "./dist/metadata/metadata-keys.d.ts",
171
- "import": "./dist/metadata/metadata-keys.js"
177
+ "./metadata/reader-token": {
178
+ "types": "./dist/metadata/reader-token.d.ts",
179
+ "import": "./dist/metadata/reader-token.js"
172
180
  },
173
- "./metadata/metadata-reader-token": {
174
- "types": "./dist/metadata/metadata-reader-token.d.ts",
175
- "import": "./dist/metadata/metadata-reader-token.js"
181
+ "./metadata/symbol-reader": {
182
+ "types": "./dist/metadata/symbol-reader.d.ts",
183
+ "import": "./dist/metadata/symbol-reader.js"
176
184
  },
177
- "./metadata/metadata-types": {
178
- "types": "./dist/metadata/metadata-types.d.ts",
179
- "import": "./dist/metadata/metadata-types.js"
185
+ "./metadata/types": {
186
+ "types": "./dist/metadata/types.d.ts",
187
+ "import": "./dist/metadata/types.js"
180
188
  },
181
- "./metadata/symbol-metadata-reader": {
182
- "types": "./dist/metadata/symbol-metadata-reader.d.ts",
183
- "import": "./dist/metadata/symbol-metadata-reader.js"
189
+ "./metadata/verify": {
190
+ "types": "./dist/metadata/verify.d.ts",
191
+ "import": "./dist/metadata/verify.js"
184
192
  },
185
- "./metadata/verifying-metadata-reader": {
186
- "types": "./dist/metadata/verifying-metadata-reader.d.ts",
187
- "import": "./dist/metadata/verifying-metadata-reader.js"
193
+ "./metadata/verifying-reader": {
194
+ "types": "./dist/metadata/verifying-reader.d.ts",
195
+ "import": "./dist/metadata/verifying-reader.js"
188
196
  },
189
197
  "./resolution/async-fan-out": {
190
198
  "types": "./dist/resolution/async-fan-out.d.ts",
@@ -194,37 +202,37 @@
194
202
  "types": "./dist/resolution/cache/activation-need.d.ts",
195
203
  "import": "./dist/resolution/cache/activation-need.js"
196
204
  },
197
- "./resolution/cache/binding-lookup-cache": {
198
- "types": "./dist/resolution/cache/binding-lookup-cache.d.ts",
199
- "import": "./dist/resolution/cache/binding-lookup-cache.js"
200
- },
201
205
  "./resolution/cache/class-introspector": {
202
206
  "types": "./dist/resolution/cache/class-introspector.d.ts",
203
207
  "import": "./dist/resolution/cache/class-introspector.js"
204
208
  },
209
+ "./resolution/cache/lookup": {
210
+ "types": "./dist/resolution/cache/lookup.d.ts",
211
+ "import": "./dist/resolution/cache/lookup.js"
212
+ },
205
213
  "./resolution/context": {
206
214
  "types": "./dist/resolution/context.d.ts",
207
215
  "import": "./dist/resolution/context.js"
208
216
  },
209
- "./resolution/path/resolution-path": {
210
- "types": "./dist/resolution/path/resolution-path.d.ts",
211
- "import": "./dist/resolution/path/resolution-path.js"
217
+ "./resolution/path": {
218
+ "types": "./dist/resolution/path.d.ts",
219
+ "import": "./dist/resolution/path.js"
212
220
  },
213
- "./resolution/plan/instantiation-plan": {
214
- "types": "./dist/resolution/plan/instantiation-plan.d.ts",
215
- "import": "./dist/resolution/plan/instantiation-plan.js"
221
+ "./resolution/plan/codegen": {
222
+ "types": "./dist/resolution/plan/codegen.d.ts",
223
+ "import": "./dist/resolution/plan/codegen.js"
216
224
  },
217
- "./resolution/plan/plan-codegen": {
218
- "types": "./dist/resolution/plan/plan-codegen.d.ts",
219
- "import": "./dist/resolution/plan/plan-codegen.js"
225
+ "./resolution/plan/compiler": {
226
+ "types": "./dist/resolution/plan/compiler.d.ts",
227
+ "import": "./dist/resolution/plan/compiler.js"
220
228
  },
221
229
  "./resolution/resolver": {
222
230
  "types": "./dist/resolution/resolver.d.ts",
223
231
  "import": "./dist/resolution/resolver.js"
224
232
  },
225
- "./resolution/select/binding-select": {
226
- "types": "./dist/resolution/select/binding-select.d.ts",
227
- "import": "./dist/resolution/select/binding-select.js"
233
+ "./resolution/select/candidates": {
234
+ "types": "./dist/resolution/select/candidates.d.ts",
235
+ "import": "./dist/resolution/select/candidates.js"
228
236
  },
229
237
  "./resolution/select/constraints": {
230
238
  "types": "./dist/resolution/select/constraints.d.ts",
@@ -1,12 +0,0 @@
1
- import type { Binding } from "#core/binding";
2
- import type { BindingScope } from "#core/types";
3
- /**
4
- * The scope a binding resolves under.
5
- *
6
- * @remarks Every kind declares one — an alias declares `transient`, since it defers scoping to the
7
- * binding it points at — so this is a field read, kept as a named function because it is the
8
- * vocabulary validation and introspection speak.
9
- *
10
- * @since 0.3.16-canary.0
11
- */
12
- export declare function effectiveBindingScope(binding: Binding): BindingScope;
@@ -1,12 +0,0 @@
1
- /**
2
- * The scope a binding resolves under.
3
- *
4
- * @remarks Every kind declares one — an alias declares `transient`, since it defers scoping to the
5
- * binding it points at — so this is a field read, kept as a named function because it is the
6
- * vocabulary validation and introspection speak.
7
- *
8
- * @since 0.3.16-canary.0
9
- */
10
- export function effectiveBindingScope(binding) {
11
- return binding.scope;
12
- }
@@ -1,14 +0,0 @@
1
- type MethodDecorator = (target: unknown, context: ClassMethodDecoratorContext) => void;
2
- /**
3
- * Marks an instance method to run after the container constructs and wires the instance.
4
- *
5
- * @since 0.3.16-canary.0
6
- */
7
- export declare function postConstruct(): MethodDecorator;
8
- /**
9
- * Marks an instance method to run when the instance's container or scope is disposed.
10
- *
11
- * @since 0.3.16-canary.0
12
- */
13
- export declare function preDestroy(): MethodDecorator;
14
- export {};
File without changes
File without changes