@@ -30,6 +30,10 @@ declare module '@optimizely/optimizely-sdk' {
30
30
31
31
export const eventDispatcher : EventDispatcher ;
32
32
33
+ export type UserAttributes = import ( './shared_types' ) . UserAttributes ;
34
+
35
+ export type OptimizelyConfig = import ( './shared_types' ) . OptimizelyConfig ;
36
+
33
37
interface DatafileOptions {
34
38
autoUpdate ?: boolean ;
35
39
updateInterval ?: number ;
@@ -66,72 +70,72 @@ declare module '@optimizely/optimizely-sdk' {
66
70
activate (
67
71
experimentKey : string ,
68
72
userId : string ,
69
- attributes ?: import ( './shared_types' ) . UserAttributes
73
+ attributes ?: UserAttributes
70
74
) : string | null ;
71
75
track (
72
76
eventKey : string ,
73
77
userId : string ,
74
- attributes ?: import ( './shared_types' ) . UserAttributes ,
78
+ attributes ?: UserAttributes ,
75
79
eventTags ?: EventTags
76
80
) : void ;
77
81
getVariation (
78
82
experimentKey : string ,
79
83
userId : string ,
80
- attributes ?: import ( './shared_types' ) . UserAttributes
84
+ attributes ?: UserAttributes
81
85
) : string | null ;
82
86
setForcedVariation ( experimentKey : string , userId : string , variationKey : string | null ) : boolean ;
83
87
getForcedVariation ( experimentKey : string , userId : string ) : string | null ;
84
88
isFeatureEnabled (
85
89
featureKey : string ,
86
90
userId : string ,
87
- attributes ?: import ( './shared_types' ) . UserAttributes
91
+ attributes ?: UserAttributes
88
92
) : boolean ;
89
93
getEnabledFeatures (
90
94
userId : string ,
91
- attributes ?: import ( './shared_types' ) . UserAttributes
95
+ attributes ?: UserAttributes
92
96
) : string [ ] ;
93
97
getFeatureVariable (
94
98
featureKey : string ,
95
99
variableKey : string ,
96
100
userId : string ,
97
- attributes ?: import ( './shared_types' ) . UserAttributes
101
+ attributes ?: UserAttributes
98
102
) : unknown ;
99
103
getFeatureVariableBoolean (
100
104
featureKey : string ,
101
105
variableKey : string ,
102
106
userId : string ,
103
- attributes ?: import ( './shared_types' ) . UserAttributes
107
+ attributes ?: UserAttributes
104
108
) : boolean | null ;
105
109
getFeatureVariableDouble (
106
110
featureKey : string ,
107
111
variableKey : string ,
108
112
userId : string ,
109
- attributes ?: import ( './shared_types' ) . UserAttributes
113
+ attributes ?: UserAttributes
110
114
) : number | null ;
111
115
getFeatureVariableInteger (
112
116
featureKey : string ,
113
117
variableKey : string ,
114
118
userId : string ,
115
- attributes ?: import ( './shared_types' ) . UserAttributes
119
+ attributes ?: UserAttributes
116
120
) : number | null ;
117
121
getFeatureVariableString (
118
122
featureKey : string ,
119
123
variableKey : string ,
120
124
userId : string ,
121
- attributes ?: import ( './shared_types' ) . UserAttributes
125
+ attributes ?: UserAttributes
122
126
) : string | null ;
123
127
getFeatureVariableJSON (
124
128
featureKey : string ,
125
129
variableKey : string ,
126
130
userId : string ,
127
- attributes ?: import ( './shared_types' ) . UserAttributes
131
+ attributes ?: UserAttributes
128
132
) : unknown ;
129
133
getAllFeatureVariables (
130
134
featureKey : string ,
131
135
userId : string ,
132
- attributes ?: import ( './shared_types' ) . UserAttributes
136
+ attributes ?: UserAttributes
133
137
) : { [ variableKey : string ] : unknown } ;
134
- getOptimizelyConfig ( ) : import ( './shared_types' ) . OptimizelyConfig | null ;
138
+ getOptimizelyConfig ( ) : OptimizelyConfig | null ;
135
139
onReady ( options ?: { timeout ?: number } ) : Promise < { success : boolean ; reason ?: string } > ;
136
140
close ( ) : Promise < { success : boolean ; reason ?: string } > ;
137
141
}
@@ -175,7 +179,7 @@ declare module '@optimizely/optimizely-sdk' {
175
179
176
180
export interface ListenerPayload {
177
181
userId : string ;
178
- attributes : import ( './shared_types' ) . UserAttributes ;
182
+ attributes : UserAttributes ;
179
183
}
180
184
181
185
export interface ActivateListenerPayload extends ListenerPayload {
0 commit comments