Skip to content

Commit

Permalink
Update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilianoSanchez committed May 21, 2024
1 parent 5a41433 commit 69bdc3d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ export const defaultGetSplitState = getStateSlice(DEFAULT_SPLIT_STATE_SLICE);

/**
* This function extracts a treatment evaluation from the Split state. It returns the treatment string value.
* If a treatment is not found, for example, due to passing an invalid Split state or a nonexistent feature flag name or key, it returns the default value, which is `'control'` if not provided.
* If a treatment is not found, it returns the default value, which is `'control'` if not specified.
* A treatment is not found if an invalid Split state is passed or if a `getTreatments` action has not been dispatched for the provided feature flag name and key.
*
* @param {ISplitState} splitState
* @param {string} featureFlagName
Expand All @@ -23,7 +24,8 @@ export function selectTreatmentValue(splitState: ISplitState, featureFlagName: s

/**
* This function extracts a treatment evaluation from the Split state. It returns a treatment object containing its value and configuration.
* If a treatment is not found, for example, due to passing an invalid Split state or a nonexistent feature flag name or key, it returns the default value, which is `{ treatment: 'control', configuration: null }` if not provided.
* If a treatment is not found, it returns the default value, which is `{ treatment: 'control', configuration: null }` if not specified.
* A treatment is not found if an invalid Split state is passed or if a `getTreatments` action has not been dispatched for the provided feature flag name and key.
*
* @param {string} featureFlagName
* @param {SplitIO.SplitKey} key
Expand All @@ -43,7 +45,8 @@ export function selectTreatmentWithConfig(splitState: ISplitState, featureFlagNa

/**
* This function extracts a treatment evaluation from the Split state. It returns an object that contains the treatment string value and the status properties of the client: `isReady`, `isReadyFromCache`, `hasTimedout`, `isDestroyed`.
* If a treatment is not found, for example, due to passing an invalid Split state or a nonexistent feature flag name or key, it returns the default value, which is `'control'` if not provided.
* If a treatment is not found, it returns the default value, which is `'control'` if not specified.
* A treatment is not found if an invalid Split state is passed or if a `getTreatments` action has not been dispatched for the provided feature flag name and key.
*
* @param {ISplitState} splitState
* @param {string} featureFlagName
Expand All @@ -60,7 +63,8 @@ export function selectSplitTreatment(splitState: ISplitState, featureFlagName: s

/**
* This function extracts a treatment evaluation from the Split state. It returns an object that contains the treatment object and the status properties of the client: `isReady`, `isReadyFromCache`, `hasTimedout`, `isDestroyed`.
* If a treatment is not found, for example, due to passing an invalid Split state or a nonexistent feature flag name or key, it returns the default value as treatment, which is `{ treatment: 'control', configuration: null }` if not provided.
* If a treatment is not found, it returns the default value as treatment, which is `{ treatment: 'control', configuration: null }` if not specified.
* A treatment is not found if an invalid Split state is passed or if a `getTreatments` action has not been dispatched for the provided feature flag name and key.
*
* @param {ISplitState} splitState
* @param {string} featureFlagName
Expand Down

0 comments on commit 69bdc3d

Please sign in to comment.