Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilianoSanchez committed Nov 16, 2023
1 parent 8b7b2bb commit 44cf2cc
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ export type GetTreatmentsOptions = ({
}

/**
* useSplitTreatments options interface. This is the options object accepted by useSplitTreatments hook,
* used to call 'client.getTreatmentsWithConfig()', or 'client.getTreatmentsWithConfigByFlagSets()', and retrieve the result together with the Split context.
* useSplitTreatments options interface. This is the options object accepted by useSplitTreatments hook, used to call 'client.getTreatmentsWithConfig()', or 'client.getTreatmentsWithConfigByFlagSets()',
* depending on whether `names` or `flagSets` options are provided, and to retrieve the result along with the Split context.
*/
export type IUseSplitTreatmentsOptions = GetTreatmentsOptions & IUseSplitClientOptions;

Expand All @@ -206,17 +206,20 @@ export interface ISplitTreatmentsChildProps extends ISplitContextValues {
/**
* An object with the treatments with configs for a bulk of feature flags, returned by client.getTreatmentsWithConfig().
* Each existing configuration is a stringified version of the JSON you defined on the Split user interface. For example:
*
* ```js
* {
* feature1: { treatment: 'on', config: null }
* feature1: { treatment: 'on', config: null },
* feature2: { treatment: 'off', config: '{"bannerText":"Click here."}' }
* }
* ```
*/
treatments: SplitIO.TreatmentsWithConfig;
}

/**
* SplitTreatments Props interface. These are the props accepted by SplitTreatments component,
* used to call 'client.getTreatmentsWithConfig()', or 'client.getTreatmentsWithConfigByFlagSets()', and pass the result to the child component.
* SplitTreatments Props interface. These are the props accepted by SplitTreatments component, used to call 'client.getTreatmentsWithConfig()', or 'client.getTreatmentsWithConfigByFlagSets()',
* depending on whether `names` or `flagSets` props are provided, and to pass the result to the child component.
*/
export type ISplitTreatmentsProps = GetTreatmentsOptions & {

Expand Down

0 comments on commit 44cf2cc

Please sign in to comment.