Skip to content

Commit 44cf2cc

Browse files
Update comments
1 parent 8b7b2bb commit 44cf2cc

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

src/types.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ export type GetTreatmentsOptions = ({
193193
}
194194

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

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

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

0 commit comments

Comments
 (0)