Skip to content

Commit c42fd8c

Browse files
Replace @return with @returns, which is the correct JSDoc tag
1 parent 9d01751 commit c42fd8c

7 files changed

Lines changed: 11 additions & 7 deletions

File tree

src/useClient.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import { useSplitClient } from './useSplitClient';
55
* It uses the 'useContext' hook to access the context, which is updated by
66
* SplitFactory and SplitClient components in the hierarchy of components.
77
*
8-
* @return A Split Client instance, or null if used outside the scope of SplitFactory
8+
* @returns A Split Client instance, or null if used outside the scope of SplitFactory
9+
*
910
* @see {@link https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK#advanced-instantiate-multiple-sdk-clients}
1011
*
1112
* @deprecated Replace with the new `useSplitClient` hook.

src/useManager.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import { useSplitManager } from './useSplitManager';
55
* It uses the 'useContext' hook to access the factory at Split context, which is updated by
66
* the SplitFactory component.
77
*
8-
* @return A Split Manager instance, or null if used outside the scope of SplitFactory
8+
* @returns A Split Manager instance, or null if used outside the scope of SplitFactory
9+
*
910
* @see {@link https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK#manager}
1011
*
1112
* @deprecated Replace with the new `useSplitManager` hook.

src/useSplitClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const DEFAULT_UPDATE_OPTIONS = {
1414
* 'useSplitClient' is a hook that returns an Split Context object with the client and its status corresponding to the provided key and trafficType.
1515
* It uses the 'useContext' hook to access the context, which is updated by SplitFactory and SplitClient components in the hierarchy of components.
1616
*
17-
* @return A Split Context object
17+
* @returns A Split Context object
1818
*
1919
* @example
2020
* ```js

src/useSplitManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { ISplitContextValues } from './types';
66
* 'useSplitManager' is a hook that returns an Split Context object with the Manager instance from the Split factory.
77
* It uses the 'useContext' hook to access the factory at Split context, which is updated by the SplitFactory component.
88
*
9-
* @return An object containing the Split context and the Split Manager instance, which is null if used outside the scope of SplitFactory
9+
* @returns An object containing the Split context and the Split Manager instance, which is null if used outside the scope of SplitFactory
1010
*
1111
* @example
1212
* ```js

src/useSplitTreatments.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { useSplitClient } from './useSplitClient';
88
* 'useSplitTreatments' is a hook that returns an SplitContext object extended with a `treatments` property object that contains feature flag evaluations.
99
* It uses the 'useSplitClient' hook to access the client from the Split context, and invokes the 'getTreatmentsWithConfig' method.
1010
*
11-
* @return A Split Context object extended with a TreatmentsWithConfig instance, that might contain control treatments if the client is not available or ready, or if feature flag names do not exist.
11+
* @returns A Split Context object extended with a TreatmentsWithConfig instance, that might contain control treatments if the client is not available or ready, or if feature flag names do not exist.
1212
*
1313
* @example
1414
* ```js

src/useTrack.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ const noOpFalse = () => false;
77
* 'useTrack' is a hook that returns the track method from a Split client.
88
* It uses the 'useContext' hook to access the client from the Split context.
99
*
10-
* @return A track function bound to a Split client. If the client is not available, the result is a no-op function that returns false.
10+
* @returns A track function bound to a Split client. If the client is not available, the result is a no-op function that returns false.
11+
*
1112
* @see {@link https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK#track}
1213
*/
1314
export function useTrack(splitKey?: SplitIO.SplitKey, trafficType?: string): SplitIO.IBrowserClient['track'] {

src/useTreatments.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import { useSplitTreatments } from './useSplitTreatments';
55
* It uses the 'useContext' hook to access the client from the Split context,
66
* and invokes the 'getTreatmentsWithConfig' method.
77
*
8-
* @return A TreatmentsWithConfig instance, that might contain control treatments if the client is not available or ready, or if feature flag names do not exist.
8+
* @returns A TreatmentsWithConfig instance, that might contain control treatments if the client is not available or ready, or if feature flag names do not exist.
9+
*
910
* @see {@link https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK#get-treatments-with-configurations}
1011
*
1112
* @deprecated Replace with the new `useSplitTreatments` hook.

0 commit comments

Comments
 (0)