diff --git a/js-client-sdk-common.api.md b/js-client-sdk-common.api.md index c10b46e9..31fa4466 100644 --- a/js-client-sdk-common.api.md +++ b/js-client-sdk-common.api.md @@ -25,7 +25,7 @@ export class EppoClient implements IEppoClient { // Warning: (ae-forgotten-export) The symbol "IConfigurationStore" needs to be exported by the entry point index.d.ts constructor(configurationStore: IConfigurationStore); // (undocumented) - getAssignment(subjectKey: string, experimentKey: string, subjectAttributes?: {}): string; + getAssignment(subjectKey: string, experimentKey: string, subjectAttributes?: {}): Promise; // (undocumented) setLogger(logger: IAssignmentLogger): void; } @@ -55,7 +55,7 @@ export interface IAssignmentLogger { // @public export interface IEppoClient { - getAssignment(subjectKey: string, experimentKey: string, subjectAttributes?: Record): string; + getAssignment(subjectKey: string, experimentKey: string, subjectAttributes?: Record): Promise; } // @public (undocumented) diff --git a/src/client/eppo-client.ts b/src/client/eppo-client.ts index d83dbdf5..3b32cb2c 100644 --- a/src/client/eppo-client.ts +++ b/src/client/eppo-client.ts @@ -38,7 +38,11 @@ export default class EppoClient implements IEppoClient { constructor(private configurationStore: IConfigurationStore) {} - async getAssignment(subjectKey: string, experimentKey: string, subjectAttributes = {}): string { + async getAssignment( + subjectKey: string, + experimentKey: string, + subjectAttributes = {}, + ): Promise { validateNotBlank(subjectKey, 'Invalid argument: subjectKey cannot be blank'); validateNotBlank(experimentKey, 'Invalid argument: experimentKey cannot be blank');