7
7
ExperimentConfigurationRequestParameters ,
8
8
} from '@eppo/js-client-sdk-common' ;
9
9
10
- import { EppoLocalStorage } from './local-storage' ;
10
+ import { EppoLocalStorage , hasWindowLocalStorage } from './local-storage' ;
11
11
import { LocalStorageAssignmentCache } from './local-storage-assignment-cache' ;
12
12
import { sdkName , sdkVersion } from './sdk-data' ;
13
13
@@ -76,6 +76,14 @@ export { IAssignmentLogger, IAssignmentEvent, IEppoClient } from '@eppo/js-clien
76
76
export class EppoJSClient extends EppoClient {
77
77
public static instance : EppoJSClient ;
78
78
79
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
80
+ public dumpStats ( ) : any {
81
+ return {
82
+ hasWindowLocalStorage : hasWindowLocalStorage ( ) ,
83
+ pollerStats : EppoJSClient . instance ?. _pollerStats ( ) ,
84
+ } ;
85
+ }
86
+
79
87
public getAssignment (
80
88
subjectKey : string ,
81
89
flagKey : string ,
@@ -86,6 +94,22 @@ export class EppoJSClient extends EppoClient {
86
94
return super . getAssignment ( subjectKey , flagKey , subjectAttributes , assignmentHooks , true ) ;
87
95
}
88
96
97
+ public _getStringAssignmentWithReason (
98
+ subjectKey : string ,
99
+ flagKey : string ,
100
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
101
+ subjectAttributes ?: Record < string , any > ,
102
+ assignmentHooks ?: IAssignmentHooks ,
103
+ ) : { assignment : string | null ; reason : string | null } {
104
+ return super . _getStringAssignmentWithReason (
105
+ subjectKey ,
106
+ flagKey ,
107
+ subjectAttributes ,
108
+ assignmentHooks ,
109
+ true ,
110
+ ) ;
111
+ }
112
+
89
113
public getStringAssignment (
90
114
subjectKey : string ,
91
115
flagKey : string ,
0 commit comments