@@ -35,6 +35,7 @@ import {
3535 FeatureVariable ,
3636 OptimizelyOptions ,
3737 OptimizelyDecideOption ,
38+ FeatureVariableValue ,
3839 OptimizelyDecision ,
3940 Client ,
4041} from '../shared_types' ;
@@ -777,7 +778,7 @@ export default class Optimizely implements Client {
777778 * type, or null if the feature key is invalid or
778779 * the variable key is invalid
779780 */
780- getFeatureVariable ( featureKey : string , variableKey : string , userId : string , attributes ?: UserAttributes ) : unknown {
781+ getFeatureVariable ( featureKey : string , variableKey : string , userId : string , attributes ?: UserAttributes ) : FeatureVariableValue {
781782 try {
782783 if ( ! this . isValidInstance ( ) ) {
783784 this . logger . log ( LOG_LEVEL . ERROR , LOG_MESSAGES . INVALID_OBJECT , MODULE_NAME , 'getFeatureVariable' ) ;
@@ -819,7 +820,7 @@ export default class Optimizely implements Client {
819820 variableType : string | null ,
820821 userId : string ,
821822 attributes ?: UserAttributes
822- ) : unknown {
823+ ) : FeatureVariableValue {
823824 if ( ! this . validateInputs ( { feature_key : featureKey , variable_key : variableKey , user_id : userId } , attributes ) ) {
824825 return null ;
825826 }
@@ -911,7 +912,7 @@ export default class Optimizely implements Client {
911912 variation : Variation | null ,
912913 variable : FeatureVariable ,
913914 userId : string
914- ) : unknown {
915+ ) : FeatureVariableValue {
915916 const configObj = this . projectConfigManager . getConfig ( ) ;
916917 if ( ! configObj ) {
917918 return null ;
0 commit comments