You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// - scope: Scope of the dependency. If `.new` is used, the `factory` closure is called on each `resolve` call. If `.shared` is used, the `factory` closure is called only the first time, the instance is cached and it is returned for all subsequent `resolve` calls, i.e. it is a singleton
23
23
/// - factory: Closure that is called when the dependency is being resolved
24
-
func register<Dependency>(type:Dependency.Type, in scope:DependencyScope, factory:@escapingFactory<Dependency>)async
24
+
func register<Dependency:Sendable>(type:Dependency.Type, in scope:DependencyScope, factory:@escapingFactory<Dependency>)async
25
25
26
26
/// Register a dependency with a variable argument
27
27
///
@@ -37,7 +37,7 @@ public protocol AsyncDependencyRegistering {
37
37
/// - Parameters:
38
38
/// - type: Type of the dependency to register
39
39
/// - factory: Closure that is called when the dependency is being resolved
@@ -63,15 +63,15 @@ public extension AsyncDependencyRegistering {
63
63
/// - Parameters:
64
64
/// - scope: Scope of the dependency. If `.new` is used, the `factory` closure is called on each `resolve` call. If `.shared` is used, the `factory` closure is called only the first time, the instance is cached and it is returned for all subsequent `resolve` calls, i.e. it is a singleton
65
65
/// - factory: Closure that is called when the dependency is being resolved
/// Register a dependency with an implicit type determined by the factory closure return type and in the default ``DependencyScope``, i.e. in the `shared` scope
71
71
///
72
72
/// - Parameters:
73
73
/// - factory: Closure that is called when the dependency is being resolved
0 commit comments