@@ -4,11 +4,11 @@ import type {
4
4
FlagValue ,
5
5
FlagValueType ,
6
6
OpenFeatureError ,
7
- Provider ,
8
7
ResolutionDetails ,
9
8
TrackingEventDetails ,
10
- } from '@openfeature/web-sdk' ;
11
- import { ProviderStatus } from '@openfeature/web-sdk' ;
9
+ } from '@openfeature/core' ;
10
+ import type { Provider } from '../../provider' ;
11
+ import { ProviderStatus } from '../../provider' ;
12
12
import { ErrorWithCode } from '../errors' ;
13
13
14
14
export type StrategyEvaluationContext = {
@@ -54,7 +54,10 @@ export type FinalResult<T extends FlagValue> = {
54
54
* Contains default implementations for `shouldEvaluateThisProvider` and `shouldEvaluateNextProvider`
55
55
*/
56
56
export abstract class BaseEvaluationStrategy {
57
- shouldEvaluateThisProvider ( strategyContext : StrategyPerProviderContext , evalContext : EvaluationContext ) : boolean {
57
+ public runMode : 'parallel' | 'sequential' = 'sequential' ;
58
+
59
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
60
+ shouldEvaluateThisProvider ( strategyContext : StrategyPerProviderContext , _evalContext ?: EvaluationContext ) : boolean {
58
61
if (
59
62
strategyContext . providerStatus === ProviderStatus . NOT_READY ||
60
63
strategyContext . providerStatus === ProviderStatus . FATAL
@@ -64,19 +67,21 @@ export abstract class BaseEvaluationStrategy {
64
67
return true ;
65
68
}
66
69
70
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
67
71
shouldEvaluateNextProvider < T extends FlagValue > (
68
- strategyContext : StrategyPerProviderContext ,
69
- context : EvaluationContext ,
70
- result : ProviderResolutionResult < T > ,
72
+ _strategyContext ? : StrategyPerProviderContext ,
73
+ _context ? : EvaluationContext ,
74
+ _result ? : ProviderResolutionResult < T > ,
71
75
) : boolean {
72
76
return true ;
73
77
}
74
78
79
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
75
80
shouldTrackWithThisProvider (
76
81
strategyContext : StrategyProviderContext ,
77
- context : EvaluationContext ,
78
- trackingEventName : string ,
79
- trackingEventDetails : TrackingEventDetails ,
82
+ _context ? : EvaluationContext ,
83
+ _trackingEventName ? : string ,
84
+ _trackingEventDetails ? : TrackingEventDetails ,
80
85
) : boolean {
81
86
if (
82
87
strategyContext . providerStatus === ProviderStatus . NOT_READY ||
0 commit comments