@@ -17,6 +17,7 @@ import { IConfigurationStore } from '../configuration-store/configuration-store'
1717import { MemoryOnlyConfigurationStore } from '../configuration-store/memory.store' ;
1818import { MAX_EVENT_QUEUE_SIZE , DEFAULT_POLL_INTERVAL_MS , POLL_JITTER_PCT } from '../constants' ;
1919import { Flag , ObfuscatedFlag , VariationType } from '../interfaces' ;
20+ import { AttributeType } from '../types' ;
2021
2122import EppoClient , { FlagConfigurationRequestParameters , checkTypeMatch } from './eppo-client' ;
2223import { initConfiguration } from './test-utils' ;
@@ -214,7 +215,12 @@ describe('EppoClient E2E test', () => {
214215 [ VariationType . JSON ] : client . getJSONAssignment . bind ( client ) ,
215216 } ;
216217
217- const assignmentFn = typeAssignmentFunctions [ variationType ] ;
218+ const assignmentFn = typeAssignmentFunctions [ variationType ] as (
219+ flagKey : string ,
220+ subjectKey : string ,
221+ subjectAttributes : Record < string , AttributeType > ,
222+ defaultValue : boolean | string | number | object ,
223+ ) => never ;
218224 if ( ! assignmentFn ) {
219225 throw new Error ( `Unknown variation type: ${ variationType } ` ) ;
220226 }
@@ -258,7 +264,12 @@ describe('EppoClient E2E test', () => {
258264 [ VariationType . JSON ] : client . getJSONAssignment . bind ( client ) ,
259265 } ;
260266
261- const assignmentFn = typeAssignmentFunctions [ variationType ] ;
267+ const assignmentFn = typeAssignmentFunctions [ variationType ] as (
268+ flagKey : string ,
269+ subjectKey : string ,
270+ subjectAttributes : Record < string , AttributeType > ,
271+ defaultValue : boolean | string | number | object ,
272+ ) => never ;
262273 if ( ! assignmentFn ) {
263274 throw new Error ( `Unknown variation type: ${ variationType } ` ) ;
264275 }
0 commit comments