@codefast/di 0.3.15 → 0.3.16-canary.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 (55) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/binding-scope.d.mts +2 -0
  3. package/dist/binding-scope.mjs +2 -0
  4. package/dist/binding-select.d.mts +4 -0
  5. package/dist/binding-select.mjs +4 -0
  6. package/dist/binding.d.mts +68 -1
  7. package/dist/binding.mjs +12 -0
  8. package/dist/constraints.d.mts +24 -0
  9. package/dist/constraints.mjs +24 -0
  10. package/dist/constructor-type.d.mts +4 -0
  11. package/dist/container.d.mts +9 -0
  12. package/dist/container.mjs +3 -0
  13. package/dist/decorators/inject.d.mts +24 -0
  14. package/dist/decorators/inject.mjs +15 -0
  15. package/dist/decorators/injectable.d.mts +12 -0
  16. package/dist/decorators/injectable.mjs +6 -0
  17. package/dist/decorators/lifecycle-decorators.d.mts +6 -0
  18. package/dist/decorators/lifecycle-decorators.mjs +6 -0
  19. package/dist/dependency-graph.d.mts +15 -0
  20. package/dist/dependency-graph.mjs +3 -0
  21. package/dist/environment.d.mts +15 -0
  22. package/dist/environment.mjs +12 -0
  23. package/dist/errors.d.mts +51 -0
  24. package/dist/errors.mjs +48 -0
  25. package/dist/graph-adapters/cytoscape.d.mts +12 -0
  26. package/dist/graph-adapters/cytoscape.mjs +3 -0
  27. package/dist/graph-adapters/dot.d.mts +3 -0
  28. package/dist/graph-adapters/dot.mjs +3 -0
  29. package/dist/graph-adapters/reactflow.d.mts +12 -0
  30. package/dist/graph-adapters/reactflow.mjs +3 -0
  31. package/dist/inspector.d.mts +9 -0
  32. package/dist/inspector.mjs +3 -0
  33. package/dist/lifecycle.d.mts +3 -0
  34. package/dist/lifecycle.mjs +3 -0
  35. package/dist/metadata/metadata-keys.d.mts +18 -0
  36. package/dist/metadata/metadata-keys.mjs +18 -0
  37. package/dist/metadata/metadata-reader-token.d.mts +3 -0
  38. package/dist/metadata/metadata-reader-token.mjs +3 -0
  39. package/dist/metadata/metadata-types.d.mts +17 -1
  40. package/dist/metadata/symbol-metadata-reader.d.mts +6 -0
  41. package/dist/metadata/symbol-metadata-reader.mjs +6 -0
  42. package/dist/module.d.mts +24 -0
  43. package/dist/module.mjs +12 -0
  44. package/dist/registry.d.mts +3 -0
  45. package/dist/registry.mjs +3 -0
  46. package/dist/resolve-options.d.mts +4 -0
  47. package/dist/resolve-options.mjs +4 -0
  48. package/dist/resolver.d.mts +3 -0
  49. package/dist/resolver.mjs +3 -0
  50. package/dist/scope.d.mts +3 -0
  51. package/dist/scope.mjs +3 -0
  52. package/dist/token.d.mts +12 -0
  53. package/dist/token.mjs +9 -0
  54. package/dist/types.d.mts +35 -1
  55. package/package.json +3 -3
@@ -4,8 +4,17 @@ import { BindingIdentifier, BindingKind, BindingScope, ConstraintContext, Materi
4
4
  import { Container } from "./container.mjs";
5
5
 
6
6
  //#region src/environment.d.ts
7
+ /**
8
+ * @since 0.3.16-canary.0
9
+ */
7
10
  declare function runWithContainer<Result>(container: Container, fn: () => Result): Result;
11
+ /**
12
+ * @since 0.3.16-canary.0
13
+ */
8
14
  declare function getActiveContainer(): Container | undefined;
15
+ /**
16
+ * @since 0.3.16-canary.0
17
+ */
9
18
  interface ResolverCallbacks {
10
19
  resolveFromContext<const Value>(token: Token<Value> | Constructor<Value>, path: string[], stack: MaterializationFrame[]): Value;
11
20
  resolve<const Value>(token: Token<Value> | Constructor<Value>, hint: ResolveOptions | undefined, path: string[], stack: MaterializationFrame[]): Value;
@@ -16,6 +25,9 @@ interface ResolverCallbacks {
16
25
  resolveAll<const Value>(token: Token<Value> | Constructor<Value>, hint: ResolveOptions | undefined, path: string[], stack: MaterializationFrame[]): Value[];
17
26
  resolveAllAsync<const Value>(token: Token<Value> | Constructor<Value>, hint: ResolveOptions | undefined, path: string[], stack: MaterializationFrame[]): Promise<Value[]>;
18
27
  }
28
+ /**
29
+ * @since 0.3.16-canary.0
30
+ */
19
31
  declare class DefaultResolutionContext implements ResolutionContext {
20
32
  private _resolver;
21
33
  private _resolutionPath;
@@ -32,6 +44,9 @@ declare class DefaultResolutionContext implements ResolutionContext {
32
44
  resolveAll<const Value>(token: Token<Value> | Constructor<Value>, hint?: ResolveOptions): Value[];
33
45
  resolveAllAsync<const Value>(token: Token<Value> | Constructor<Value>, hint?: ResolveOptions): Promise<Value[]>;
34
46
  }
47
+ /**
48
+ * @since 0.3.16-canary.0
49
+ */
35
50
  declare function buildMaterializationFrame(tokenName: string, scope: BindingScope, bindingId: BindingIdentifier, kind: BindingKind, slot: {
36
51
  name: string | undefined;
37
52
  tags: ReadonlyArray<readonly [string, unknown]>;
@@ -1,5 +1,8 @@
1
1
  //#region src/environment.ts
2
2
  let _activeContainer;
3
+ /**
4
+ * @since 0.3.16-canary.0
5
+ */
3
6
  function runWithContainer(container, fn) {
4
7
  const prev = _activeContainer;
5
8
  _activeContainer = container;
@@ -9,9 +12,15 @@ function runWithContainer(container, fn) {
9
12
  _activeContainer = prev;
10
13
  }
11
14
  }
15
+ /**
16
+ * @since 0.3.16-canary.0
17
+ */
12
18
  function getActiveContainer() {
13
19
  return _activeContainer;
14
20
  }
21
+ /**
22
+ * @since 0.3.16-canary.0
23
+ */
15
24
  var DefaultResolutionContext = class {
16
25
  _resolver;
17
26
  _resolutionPath;
@@ -73,6 +82,9 @@ var DefaultConstraintContext = class {
73
82
  return this._ancestors;
74
83
  }
75
84
  };
85
+ /**
86
+ * @since 0.3.16-canary.0
87
+ */
76
88
  function buildMaterializationFrame(tokenName, scope, bindingId, kind, slot) {
77
89
  return {
78
90
  tokenName,
package/dist/errors.d.mts CHANGED
@@ -1,19 +1,31 @@
1
1
  import { BindingIdentifier, BindingScope, ResolveOptions } from "./types.mjs";
2
2
 
3
3
  //#region src/errors.d.ts
4
+ /**
5
+ * @since 0.3.16-canary.0
6
+ */
4
7
  declare abstract class DiError extends Error {
5
8
  abstract readonly code: string;
6
9
  constructor(message: string);
7
10
  }
11
+ /**
12
+ * @since 0.3.16-canary.0
13
+ */
8
14
  declare class InternalError extends DiError {
9
15
  readonly code = "INTERNAL_ERROR";
10
16
  constructor(message: string);
11
17
  }
18
+ /**
19
+ * @since 0.3.16-canary.0
20
+ */
12
21
  declare class TokenNotBoundError extends DiError {
13
22
  readonly code = "TOKEN_NOT_BOUND";
14
23
  readonly tokenName: string;
15
24
  constructor(tokenName: string);
16
25
  }
26
+ /**
27
+ * @since 0.3.16-canary.0
28
+ */
17
29
  declare class NoMatchingBindingError extends DiError {
18
30
  readonly code = "NO_MATCHING_BINDING";
19
31
  readonly tokenName: string;
@@ -21,28 +33,43 @@ declare class NoMatchingBindingError extends DiError {
21
33
  readonly availableSlots: string[];
22
34
  constructor(tokenName: string, hint: ResolveOptions, availableSlots: string[]);
23
35
  }
36
+ /**
37
+ * @since 0.3.16-canary.0
38
+ */
24
39
  declare class AmbiguousBindingError extends DiError {
25
40
  readonly code = "AMBIGUOUS_BINDING";
26
41
  readonly tokenName: string;
27
42
  readonly candidateIds: readonly BindingIdentifier[];
28
43
  constructor(tokenName: string, candidateIds: readonly BindingIdentifier[]);
29
44
  }
45
+ /**
46
+ * @since 0.3.16-canary.0
47
+ */
30
48
  declare class CircularDependencyError extends DiError {
31
49
  readonly code = "CIRCULAR_DEPENDENCY";
32
50
  readonly cycle: string[];
33
51
  constructor(cycle: string[]);
34
52
  }
53
+ /**
54
+ * @since 0.3.16-canary.0
55
+ */
35
56
  declare class AsyncResolutionError extends DiError {
36
57
  readonly code = "ASYNC_RESOLUTION";
37
58
  readonly tokenName: string;
38
59
  readonly asyncSourceToken: string;
39
60
  constructor(tokenName: string, asyncSourceToken: string);
40
61
  }
62
+ /**
63
+ * @since 0.3.16-canary.0
64
+ */
41
65
  declare class AsyncDeactivationError extends DiError {
42
66
  readonly code = "ASYNC_DEACTIVATION";
43
67
  readonly tokenName: string;
44
68
  constructor(tokenName: string);
45
69
  }
70
+ /**
71
+ * @since 0.3.16-canary.0
72
+ */
46
73
  interface ScopeViolationDetails {
47
74
  readonly consumerToken: string;
48
75
  readonly consumerScope: BindingScope;
@@ -50,40 +77,64 @@ interface ScopeViolationDetails {
50
77
  readonly dependencyScope: BindingScope;
51
78
  readonly path: string[];
52
79
  }
80
+ /**
81
+ * @since 0.3.16-canary.0
82
+ */
53
83
  declare class ScopeViolationError extends DiError {
54
84
  readonly code = "SCOPE_VIOLATION";
55
85
  readonly details: ScopeViolationDetails;
56
86
  constructor(details: ScopeViolationDetails);
57
87
  }
88
+ /**
89
+ * @since 0.3.16-canary.0
90
+ */
58
91
  declare class MissingMetadataError extends DiError {
59
92
  readonly code = "MISSING_METADATA";
60
93
  readonly targetName: string;
61
94
  constructor(targetName: string);
62
95
  }
96
+ /**
97
+ * @since 0.3.16-canary.0
98
+ */
63
99
  declare class AsyncModuleLoadError extends DiError {
64
100
  readonly code = "ASYNC_MODULE_LOAD";
65
101
  readonly moduleName: string;
66
102
  constructor(moduleName: string);
67
103
  }
104
+ /**
105
+ * @since 0.3.16-canary.0
106
+ */
68
107
  declare class SyncDisposalNotSupportedError extends DiError {
69
108
  readonly code = "SYNC_DISPOSAL_NOT_SUPPORTED";
70
109
  constructor();
71
110
  }
111
+ /**
112
+ * @since 0.3.16-canary.0
113
+ */
72
114
  declare class MissingScopeContextError extends DiError {
73
115
  readonly code = "MISSING_SCOPE_CONTEXT";
74
116
  readonly tokenName: string;
75
117
  constructor(tokenName: string);
76
118
  }
119
+ /**
120
+ * @since 0.3.16-canary.0
121
+ */
77
122
  declare class MissingContainerContextError extends DiError {
78
123
  readonly code = "MISSING_CONTAINER_CONTEXT";
79
124
  readonly targetName: string;
80
125
  constructor(targetName: string);
81
126
  }
127
+ /**
128
+ * @since 0.3.16-canary.0
129
+ */
82
130
  declare class RebindUnboundTokenError extends DiError {
83
131
  readonly code = "REBIND_UNBOUND_TOKEN";
84
132
  readonly tokenName: string;
85
133
  constructor(tokenName: string);
86
134
  }
135
+ /**
136
+ * @since 0.3.16-canary.0
137
+ */
87
138
  declare class DisposedContainerError extends DiError {
88
139
  readonly code = "DISPOSED_CONTAINER";
89
140
  constructor();
package/dist/errors.mjs CHANGED
@@ -1,16 +1,25 @@
1
1
  //#region src/errors.ts
2
+ /**
3
+ * @since 0.3.16-canary.0
4
+ */
2
5
  var DiError = class extends Error {
3
6
  constructor(message) {
4
7
  super(message);
5
8
  this.name = this.constructor.name;
6
9
  }
7
10
  };
11
+ /**
12
+ * @since 0.3.16-canary.0
13
+ */
8
14
  var InternalError = class extends DiError {
9
15
  code = "INTERNAL_ERROR";
10
16
  constructor(message) {
11
17
  super(message);
12
18
  }
13
19
  };
20
+ /**
21
+ * @since 0.3.16-canary.0
22
+ */
14
23
  var TokenNotBoundError = class extends DiError {
15
24
  code = "TOKEN_NOT_BOUND";
16
25
  tokenName;
@@ -19,6 +28,9 @@ var TokenNotBoundError = class extends DiError {
19
28
  this.tokenName = tokenName;
20
29
  }
21
30
  };
31
+ /**
32
+ * @since 0.3.16-canary.0
33
+ */
22
34
  var NoMatchingBindingError = class extends DiError {
23
35
  code = "NO_MATCHING_BINDING";
24
36
  tokenName;
@@ -33,6 +45,9 @@ var NoMatchingBindingError = class extends DiError {
33
45
  this.availableSlots = availableSlots;
34
46
  }
35
47
  };
48
+ /**
49
+ * @since 0.3.16-canary.0
50
+ */
36
51
  var AmbiguousBindingError = class extends DiError {
37
52
  code = "AMBIGUOUS_BINDING";
38
53
  tokenName;
@@ -43,6 +58,9 @@ var AmbiguousBindingError = class extends DiError {
43
58
  this.candidateIds = candidateIds;
44
59
  }
45
60
  };
61
+ /**
62
+ * @since 0.3.16-canary.0
63
+ */
46
64
  var CircularDependencyError = class extends DiError {
47
65
  code = "CIRCULAR_DEPENDENCY";
48
66
  cycle;
@@ -51,6 +69,9 @@ var CircularDependencyError = class extends DiError {
51
69
  this.cycle = cycle;
52
70
  }
53
71
  };
72
+ /**
73
+ * @since 0.3.16-canary.0
74
+ */
54
75
  var AsyncResolutionError = class extends DiError {
55
76
  code = "ASYNC_RESOLUTION";
56
77
  tokenName;
@@ -61,6 +82,9 @@ var AsyncResolutionError = class extends DiError {
61
82
  this.asyncSourceToken = asyncSourceToken;
62
83
  }
63
84
  };
85
+ /**
86
+ * @since 0.3.16-canary.0
87
+ */
64
88
  var AsyncDeactivationError = class extends DiError {
65
89
  code = "ASYNC_DEACTIVATION";
66
90
  tokenName;
@@ -69,6 +93,9 @@ var AsyncDeactivationError = class extends DiError {
69
93
  this.tokenName = tokenName;
70
94
  }
71
95
  };
96
+ /**
97
+ * @since 0.3.16-canary.0
98
+ */
72
99
  var ScopeViolationError = class extends DiError {
73
100
  code = "SCOPE_VIOLATION";
74
101
  details;
@@ -77,6 +104,9 @@ var ScopeViolationError = class extends DiError {
77
104
  this.details = details;
78
105
  }
79
106
  };
107
+ /**
108
+ * @since 0.3.16-canary.0
109
+ */
80
110
  var MissingMetadataError = class extends DiError {
81
111
  code = "MISSING_METADATA";
82
112
  targetName;
@@ -85,6 +115,9 @@ var MissingMetadataError = class extends DiError {
85
115
  this.targetName = targetName;
86
116
  }
87
117
  };
118
+ /**
119
+ * @since 0.3.16-canary.0
120
+ */
88
121
  var AsyncModuleLoadError = class extends DiError {
89
122
  code = "ASYNC_MODULE_LOAD";
90
123
  moduleName;
@@ -93,12 +126,18 @@ var AsyncModuleLoadError = class extends DiError {
93
126
  this.moduleName = moduleName;
94
127
  }
95
128
  };
129
+ /**
130
+ * @since 0.3.16-canary.0
131
+ */
96
132
  var SyncDisposalNotSupportedError = class extends DiError {
97
133
  code = "SYNC_DISPOSAL_NOT_SUPPORTED";
98
134
  constructor() {
99
135
  super("Container cannot be disposed synchronously because onDeactivation handlers may be async. Use `await using` or call container.dispose() explicitly.");
100
136
  }
101
137
  };
138
+ /**
139
+ * @since 0.3.16-canary.0
140
+ */
102
141
  var MissingScopeContextError = class extends DiError {
103
142
  code = "MISSING_SCOPE_CONTEXT";
104
143
  tokenName;
@@ -107,6 +146,9 @@ var MissingScopeContextError = class extends DiError {
107
146
  this.tokenName = tokenName;
108
147
  }
109
148
  };
149
+ /**
150
+ * @since 0.3.16-canary.0
151
+ */
110
152
  var MissingContainerContextError = class extends DiError {
111
153
  code = "MISSING_CONTAINER_CONTEXT";
112
154
  targetName;
@@ -115,6 +157,9 @@ var MissingContainerContextError = class extends DiError {
115
157
  this.targetName = targetName;
116
158
  }
117
159
  };
160
+ /**
161
+ * @since 0.3.16-canary.0
162
+ */
118
163
  var RebindUnboundTokenError = class extends DiError {
119
164
  code = "REBIND_UNBOUND_TOKEN";
120
165
  tokenName;
@@ -123,6 +168,9 @@ var RebindUnboundTokenError = class extends DiError {
123
168
  this.tokenName = tokenName;
124
169
  }
125
170
  };
171
+ /**
172
+ * @since 0.3.16-canary.0
173
+ */
126
174
  var DisposedContainerError = class extends DiError {
127
175
  code = "DISPOSED_CONTAINER";
128
176
  constructor() {
@@ -1,6 +1,9 @@
1
1
  import { ContainerGraphJson } from "../dependency-graph.mjs";
2
2
 
3
3
  //#region src/graph-adapters/cytoscape.d.ts
4
+ /**
5
+ * @since 0.3.16-canary.0
6
+ */
4
7
  interface CytoscapeNode {
5
8
  data: {
6
9
  id: string;
@@ -10,6 +13,9 @@ interface CytoscapeNode {
10
13
  fromParent: boolean;
11
14
  };
12
15
  }
16
+ /**
17
+ * @since 0.3.16-canary.0
18
+ */
13
19
  interface CytoscapeEdge {
14
20
  data: {
15
21
  id: string;
@@ -18,7 +24,13 @@ interface CytoscapeEdge {
18
24
  label?: string;
19
25
  };
20
26
  }
27
+ /**
28
+ * @since 0.3.16-canary.0
29
+ */
21
30
  type CytoscapeElements = Array<CytoscapeNode | CytoscapeEdge>;
31
+ /**
32
+ * @since 0.3.16-canary.0
33
+ */
22
34
  declare function toCytoscapeGraph(graph: ContainerGraphJson): CytoscapeElements;
23
35
  //#endregion
24
36
  export { CytoscapeEdge, CytoscapeElements, CytoscapeNode, toCytoscapeGraph };
@@ -1,4 +1,7 @@
1
1
  //#region src/graph-adapters/cytoscape.ts
2
+ /**
3
+ * @since 0.3.16-canary.0
4
+ */
2
5
  function toCytoscapeGraph(graph) {
3
6
  const elements = [];
4
7
  for (const node of graph.nodes) elements.push({ data: {
@@ -1,6 +1,9 @@
1
1
  import { ContainerGraphJson } from "../dependency-graph.mjs";
2
2
 
3
3
  //#region src/graph-adapters/dot.d.ts
4
+ /**
5
+ * @since 0.3.16-canary.0
6
+ */
4
7
  declare function toDotGraph(graph: ContainerGraphJson): string;
5
8
  //#endregion
6
9
  export { toDotGraph };
@@ -1,4 +1,7 @@
1
1
  //#region src/graph-adapters/dot.ts
2
+ /**
3
+ * @since 0.3.16-canary.0
4
+ */
2
5
  function toDotGraph(graph) {
3
6
  const lines = ["digraph DI {", " rankdir=TB;"];
4
7
  for (const node of graph.nodes) {
@@ -1,6 +1,9 @@
1
1
  import { ContainerGraphJson } from "../dependency-graph.mjs";
2
2
 
3
3
  //#region src/graph-adapters/reactflow.d.ts
4
+ /**
5
+ * @since 0.3.16-canary.0
6
+ */
4
7
  interface ReactFlowNode {
5
8
  id: string;
6
9
  data: {
@@ -14,16 +17,25 @@ interface ReactFlowNode {
14
17
  y: number;
15
18
  };
16
19
  }
20
+ /**
21
+ * @since 0.3.16-canary.0
22
+ */
17
23
  interface ReactFlowEdge {
18
24
  id: string;
19
25
  source: string;
20
26
  target: string;
21
27
  label?: string;
22
28
  }
29
+ /**
30
+ * @since 0.3.16-canary.0
31
+ */
23
32
  interface ReactFlowGraph {
24
33
  nodes: ReactFlowNode[];
25
34
  edges: ReactFlowEdge[];
26
35
  }
36
+ /**
37
+ * @since 0.3.16-canary.0
38
+ */
27
39
  declare function toReactFlowGraph(graph: ContainerGraphJson): ReactFlowGraph;
28
40
  //#endregion
29
41
  export { ReactFlowEdge, ReactFlowGraph, ReactFlowNode, toReactFlowGraph };
@@ -1,4 +1,7 @@
1
1
  //#region src/graph-adapters/reactflow.ts
2
+ /**
3
+ * @since 0.3.16-canary.0
4
+ */
2
5
  function toReactFlowGraph(graph) {
3
6
  return {
4
7
  nodes: graph.nodes.map((node, idx) => ({
@@ -5,6 +5,9 @@ import { BindingRegistry } from "./registry.mjs";
5
5
  import { ScopeManager } from "./scope.mjs";
6
6
 
7
7
  //#region src/inspector.d.ts
8
+ /**
9
+ * @since 0.3.16-canary.0
10
+ */
8
11
  interface BindingSnapshot {
9
12
  readonly tokenName: string;
10
13
  readonly kind: BindingKind;
@@ -15,6 +18,9 @@ interface BindingSnapshot {
15
18
  };
16
19
  readonly id: BindingIdentifier;
17
20
  }
21
+ /**
22
+ * @since 0.3.16-canary.0
23
+ */
18
24
  interface ContainerSnapshot {
19
25
  readonly ownBindings: readonly BindingSnapshot[];
20
26
  readonly bindings: readonly BindingSnapshot[];
@@ -22,6 +28,9 @@ interface ContainerSnapshot {
22
28
  readonly hasParent: boolean;
23
29
  readonly isDisposed: boolean;
24
30
  }
31
+ /**
32
+ * @since 0.3.16-canary.0
33
+ */
25
34
  declare class Inspector {
26
35
  private readonly _registry;
27
36
  private readonly _scope;
@@ -2,6 +2,9 @@ import { effectiveBindingScope } from "./binding-scope.mjs";
2
2
  import { selectBinding } from "./binding-select.mjs";
3
3
  import { tokenName } from "./token.mjs";
4
4
  //#region src/inspector.ts
5
+ /**
6
+ * @since 0.3.16-canary.0
7
+ */
5
8
  var Inspector = class {
6
9
  constructor(_registry, _scope, _hasParent, _isDisposed) {
7
10
  this._registry = _registry;
@@ -5,6 +5,9 @@ import { Binding } from "./binding.mjs";
5
5
  import { MetadataReader } from "./metadata/metadata-types.mjs";
6
6
 
7
7
  //#region src/lifecycle.d.ts
8
+ /**
9
+ * @since 0.3.16-canary.0
10
+ */
8
11
  declare class LifecycleManager {
9
12
  private readonly _activationHooks;
10
13
  private readonly _deactivationHooks;
@@ -1,6 +1,9 @@
1
1
  import { AsyncDeactivationError } from "./errors.mjs";
2
2
  import { tokenName } from "./token.mjs";
3
3
  //#region src/lifecycle.ts
4
+ /**
5
+ * @since 0.3.16-canary.0
6
+ */
4
7
  var LifecycleManager = class {
5
8
  _activationHooks = /* @__PURE__ */ new Map();
6
9
  _deactivationHooks = /* @__PURE__ */ new Map();
@@ -1,11 +1,29 @@
1
1
  import { ConstructorMetadata, MutableLifecycleMetadata } from "./metadata-types.mjs";
2
2
 
3
3
  //#region src/metadata/metadata-keys.d.ts
4
+ /**
5
+ * @since 0.3.16-canary.0
6
+ */
4
7
  declare const INJECTABLE_KEY: unique symbol;
8
+ /**
9
+ * @since 0.3.16-canary.0
10
+ */
5
11
  declare const LIFECYCLE_KEY: unique symbol;
12
+ /**
13
+ * @since 0.3.16-canary.0
14
+ */
6
15
  declare const INJECT_ACCESSOR_KEY: unique symbol;
16
+ /**
17
+ * @since 0.3.16-canary.0
18
+ */
7
19
  declare const constructorMetadataMap: WeakMap<object, ConstructorMetadata>;
20
+ /**
21
+ * @since 0.3.16-canary.0
22
+ */
8
23
  declare const lifecycleMetadataMap: WeakMap<object, MutableLifecycleMetadata>;
24
+ /**
25
+ * @since 0.3.16-canary.0
26
+ */
9
27
  declare const lifecycleByConstructorMetadataMap: WeakMap<object, MutableLifecycleMetadata>;
10
28
  //#endregion
11
29
  export { INJECTABLE_KEY, INJECT_ACCESSOR_KEY, LIFECYCLE_KEY, constructorMetadataMap, lifecycleByConstructorMetadataMap, lifecycleMetadataMap };
@@ -1,9 +1,27 @@
1
1
  //#region src/metadata/metadata-keys.ts
2
+ /**
3
+ * @since 0.3.16-canary.0
4
+ */
2
5
  const INJECTABLE_KEY = Symbol("di:injectable");
6
+ /**
7
+ * @since 0.3.16-canary.0
8
+ */
3
9
  const LIFECYCLE_KEY = Symbol("di:lifecycle");
10
+ /**
11
+ * @since 0.3.16-canary.0
12
+ */
4
13
  const INJECT_ACCESSOR_KEY = Symbol("di:inject-accessor");
14
+ /**
15
+ * @since 0.3.16-canary.0
16
+ */
5
17
  const constructorMetadataMap = /* @__PURE__ */ new WeakMap();
18
+ /**
19
+ * @since 0.3.16-canary.0
20
+ */
6
21
  const lifecycleMetadataMap = /* @__PURE__ */ new WeakMap();
22
+ /**
23
+ * @since 0.3.16-canary.0
24
+ */
7
25
  const lifecycleByConstructorMetadataMap = /* @__PURE__ */ new WeakMap();
8
26
  //#endregion
9
27
  export { INJECTABLE_KEY, INJECT_ACCESSOR_KEY, LIFECYCLE_KEY, constructorMetadataMap, lifecycleByConstructorMetadataMap, lifecycleMetadataMap };
@@ -2,6 +2,9 @@ import { Token } from "../token.mjs";
2
2
  import { MetadataReader } from "./metadata-types.mjs";
3
3
 
4
4
  //#region src/metadata/metadata-reader-token.d.ts
5
+ /**
6
+ * @since 0.3.16-canary.0
7
+ */
5
8
  declare const MetadataReaderToken: Token<MetadataReader>;
6
9
  //#endregion
7
10
  export { MetadataReaderToken };
@@ -1,5 +1,8 @@
1
1
  import { token } from "../token.mjs";
2
2
  //#region src/metadata/metadata-reader-token.ts
3
+ /**
4
+ * @since 0.3.16-canary.0
5
+ */
3
6
  const MetadataReaderToken = token("MetadataReader");
4
7
  //#endregion
5
8
  export { MetadataReaderToken };
@@ -2,6 +2,9 @@ import { Constructor } from "../constructor-type.mjs";
2
2
  import { Token } from "../token.mjs";
3
3
 
4
4
  //#region src/metadata/metadata-types.d.ts
5
+ /**
6
+ * @since 0.3.16-canary.0
7
+ */
5
8
  interface ParamMetadata {
6
9
  readonly index: number;
7
10
  readonly token: Token<unknown> | Constructor;
@@ -10,18 +13,31 @@ interface ParamMetadata {
10
13
  readonly name?: string;
11
14
  readonly tags?: ReadonlyArray<readonly [string, unknown]>;
12
15
  }
16
+ /**
17
+ * @since 0.3.16-canary.0
18
+ */
13
19
  interface ConstructorMetadata {
14
20
  readonly params: readonly ParamMetadata[];
15
21
  }
22
+ /**
23
+ * @since 0.3.16-canary.0
24
+ */
16
25
  interface LifecycleMetadata {
17
26
  readonly postConstruct: readonly string[];
18
27
  readonly preDestroy: readonly string[];
19
28
  }
20
- /** Mutable buckets used while aggregating decorator metadata (same keys as {@link LifecycleMetadata}). */
29
+ /**
30
+ * Mutable buckets used while aggregating decorator metadata (same keys as {@link LifecycleMetadata}).
31
+ *
32
+ * @since 0.3.16-canary.0
33
+ */
21
34
  interface MutableLifecycleMetadata {
22
35
  postConstruct: string[];
23
36
  preDestroy: string[];
24
37
  }
38
+ /**
39
+ * @since 0.3.16-canary.0
40
+ */
25
41
  interface MetadataReader {
26
42
  getConstructorMetadata(target: Constructor): ConstructorMetadata | undefined;
27
43
  getLifecycleMetadata(target: Constructor): LifecycleMetadata | undefined;
@@ -3,6 +3,9 @@ import { InjectionDescriptor } from "../decorators/inject.mjs";
3
3
  import { ConstructorMetadata, LifecycleMetadata, MetadataReader } from "./metadata-types.mjs";
4
4
 
5
5
  //#region src/metadata/symbol-metadata-reader.d.ts
6
+ /**
7
+ * @since 0.3.16-canary.0
8
+ */
6
9
  declare class SymbolMetadataReader implements MetadataReader {
7
10
  getConstructorMetadata(target: Constructor): ConstructorMetadata | undefined;
8
11
  getLifecycleMetadata(target: Constructor): LifecycleMetadata | undefined;
@@ -11,6 +14,9 @@ declare class SymbolMetadataReader implements MetadataReader {
11
14
  descriptor: InjectionDescriptor;
12
15
  }> | undefined;
13
16
  }
17
+ /**
18
+ * @since 0.3.16-canary.0
19
+ */
14
20
  declare const defaultMetadataReader: SymbolMetadataReader;
15
21
  //#endregion
16
22
  export { SymbolMetadataReader, defaultMetadataReader };