@@ -5,7 +5,7 @@ import { validateSplitExistence } from '../utils/inputValidation/splitExistence'
55import { validateTrafficTypeExistence } from '../utils/inputValidation/trafficTypeExistence' ;
66import { SDK_NOT_READY } from '../utils/labels' ;
77import { CONTROL , TREATMENT , TREATMENTS , TREATMENT_WITH_CONFIG , TREATMENTS_WITH_CONFIG , TRACK , TREATMENTS_WITH_CONFIG_BY_FLAGSETS , TREATMENTS_BY_FLAGSETS , TREATMENTS_BY_FLAGSET , TREATMENTS_WITH_CONFIG_BY_FLAGSET , GET_TREATMENTS_WITH_CONFIG , GET_TREATMENTS_BY_FLAG_SETS , GET_TREATMENTS_WITH_CONFIG_BY_FLAG_SETS , GET_TREATMENTS_BY_FLAG_SET , GET_TREATMENTS_WITH_CONFIG_BY_FLAG_SET , GET_TREATMENT_WITH_CONFIG , GET_TREATMENT , GET_TREATMENTS , TRACK_FN_LABEL } from '../utils/constants' ;
8- import { IEvaluationResult } from '../evaluator/types' ;
8+ import { IEvaluation , IEvaluationResult } from '../evaluator/types' ;
99import SplitIO from '../../types/splitio' ;
1010import { IMPRESSION , IMPRESSION_QUEUEING } from '../logger/constants' ;
1111import { ISdkFactoryContext } from '../sdkFactory/types' ;
@@ -72,7 +72,7 @@ export function clientFactory(params: ISdkFactoryContext): SplitIO.IClient | Spl
7272 const treatments : SplitIO . Treatments | SplitIO . TreatmentsWithConfig = { } ;
7373 const properties = stringify ( options ) ;
7474 Object . keys ( evaluationResults ) . forEach ( featureFlagName => {
75- treatments [ featureFlagName ] = processEvaluation ( evaluationResults [ featureFlagName ] , featureFlagName , key , properties , withConfig , methodName , queue ) ;
75+ treatments [ featureFlagName ] = processEvaluation ( evaluationResults [ featureFlagName ] , featureFlagName , key , properties , withConfig , methodName , queue ) as SplitIO . Treatment | SplitIO . TreatmentWithConfig ;
7676 } ) ;
7777 impressionsTracker . track ( queue , attributes ) ;
7878
@@ -101,7 +101,7 @@ export function clientFactory(params: ISdkFactoryContext): SplitIO.IClient | Spl
101101 const treatments : SplitIO . Treatments | SplitIO . TreatmentsWithConfig = { } ;
102102 const properties = stringify ( options ) ;
103103 Object . keys ( evaluationResults ) . forEach ( featureFlagName => {
104- treatments [ featureFlagName ] = processEvaluation ( evaluationResults [ featureFlagName ] , featureFlagName , key , properties , withConfig , methodName , queue ) ;
104+ treatments [ featureFlagName ] = processEvaluation ( evaluationResults [ featureFlagName ] , featureFlagName , key , properties , withConfig , methodName , queue ) as SplitIO . Treatment | SplitIO . TreatmentWithConfig ;
105105 } ) ;
106106 impressionsTracker . track ( queue , attributes ) ;
107107
@@ -139,7 +139,7 @@ export function clientFactory(params: ISdkFactoryContext): SplitIO.IClient | Spl
139139 withConfig : boolean ,
140140 invokingMethodName : string ,
141141 queue : ImpressionDecorated [ ]
142- ) : SplitIO . Treatment | SplitIO . TreatmentWithConfig {
142+ ) : SplitIO . Treatment | Pick < IEvaluation , 'treatment' | 'config' > {
143143 const matchingKey = getMatching ( key ) ;
144144 const bucketingKey = getBucketing ( key ) ;
145145
0 commit comments