Skip to content

Commit 0b07a8f

Browse files
authored
feat: Allow FlagEvaluationDetails to be a public API (#79)
## This PR Small change to enable `FlagEvaluationOptions` to be used during flag evaluations. Currently the constructor and params were internal APIs so custom options couldn't be passed in. --------- Signed-off-by: jescriba <[email protected]> Signed-off-by: Joshua E. <[email protected]>
1 parent 869b90a commit 0b07a8f

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed
Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
import Foundation
22

3+
/// FlagEvaluationOptions is a struct that enables passing in custom hooks and hints to the flag evaluation process.
34
public struct FlagEvaluationOptions {
4-
var hooks: [any Hook] = []
5-
var hookHints: [String: Any] = [:]
5+
public let hooks: [any Hook]
6+
public let hookHints: [String: Any]
7+
8+
public init(
9+
hooks: [any Hook] = [],
10+
hookHints: [String: Any] = [:]
11+
) {
12+
self.hooks = hooks
13+
self.hookHints = hookHints
14+
}
615
}

0 commit comments

Comments
 (0)