Skip to content

Commit 0c93e86

Browse files
committed
Added documentation note on definition generic parameters
1 parent ada9955 commit 0c93e86

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Diff for: Dip/Dip/Definition.swift

+8-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,14 @@ public enum ComponentScope {
5656
case Singleton
5757
}
5858

59-
///Definition of type T describes how instances of this type should be created when they are resolved by container.
59+
/**
60+
Definition of type T describes how instances of this type should be created when this type is resolved by container.
61+
62+
- Generic parameter `T` is the type of the instance to resolve
63+
- Generic parameter `F` is the type of block-factory that creates an instance of T.
64+
65+
For example `DefinitionOf<Service,(String)->Service>` is the type of definition that during resolution will produce instance of type `Service` using closure that accepts `String` argument.
66+
*/
6067
public struct DefinitionOf<T, F>: Definition {
6168

6269
/**

0 commit comments

Comments
 (0)