@codefast/di 0.5.0-canary.2 → 0.5.0-canary.4

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.
package/src/types.ts CHANGED
@@ -5,7 +5,7 @@ import type { Token } from "#/token";
5
5
  export type { Constructor } from "#/constructor-type";
6
6
 
7
7
  /**
8
- * A single [tag, value] pair used in slot constraints and resolve hints.
8
+ * A single [tag, value] pair used in slot constraints and resolve options.
9
9
  *
10
10
  * @since 0.3.16-canary.0
11
11
  */
@@ -93,7 +93,7 @@ export interface ConstraintContext {
93
93
  readonly resolutionStack: ReadonlyArray<ResolutionFrame>;
94
94
  readonly parent: ResolutionFrame | undefined;
95
95
  readonly ancestors: ReadonlyArray<ResolutionFrame>;
96
- readonly currentResolveHint: ResolveOptions | undefined;
96
+ readonly currentResolveOptions: ResolveOptions | undefined;
97
97
  }
98
98
 
99
99
  // ── ResolutionContext ─────────────────────────────────────────────────────────
@@ -102,15 +102,18 @@ export interface ConstraintContext {
102
102
  * @since 0.3.16-canary.0
103
103
  */
104
104
  export interface ResolutionContext {
105
- resolve<const Value>(token: Token<Value> | Constructor<Value>, hint?: ResolveOptions): Value;
106
- resolveAsync<const Value>(token: Token<Value> | Constructor<Value>, hint?: ResolveOptions): Promise<Value>;
107
- resolveOptional<const Value>(token: Token<Value> | Constructor<Value>, hint?: ResolveOptions): Value | undefined;
105
+ resolve<const Value>(token: Token<Value> | Constructor<Value>, options?: ResolveOptions): Value;
106
+ resolveAsync<const Value>(token: Token<Value> | Constructor<Value>, options?: ResolveOptions): Promise<Value>;
107
+ resolveOptional<const Value>(token: Token<Value> | Constructor<Value>, options?: ResolveOptions): Value | undefined;
108
108
  resolveOptionalAsync<const Value>(
109
109
  token: Token<Value> | Constructor<Value>,
110
- hint?: ResolveOptions,
110
+ options?: ResolveOptions,
111
111
  ): Promise<Value | undefined>;
112
- resolveAll<const Value>(token: Token<Value> | Constructor<Value>, hint?: ResolveOptions): Array<Value>;
113
- resolveAllAsync<const Value>(token: Token<Value> | Constructor<Value>, hint?: ResolveOptions): Promise<Array<Value>>;
112
+ resolveAll<const Value>(token: Token<Value> | Constructor<Value>, options?: ResolveOptions): Array<Value>;
113
+ resolveAllAsync<const Value>(
114
+ token: Token<Value> | Constructor<Value>,
115
+ options?: ResolveOptions,
116
+ ): Promise<Array<Value>>;
114
117
  readonly graph: ConstraintContext;
115
118
  }
116
119