diff --git a/clientlibs/js/src/UpgradeClient.ts b/clientlibs/js/src/UpgradeClient.ts index fdfa2f3930..9f59d58a78 100644 --- a/clientlibs/js/src/UpgradeClient.ts +++ b/clientlibs/js/src/UpgradeClient.ts @@ -48,6 +48,31 @@ import Assignment from './Assignment'; * ``` */ +/** + * UpGradeClient is the main class for interacting with the UpGrade API. + * + * @example +* ```typescript +* import UpgradeClient from 'upgrade_client_lib/dist/browser'; +* ``` +* +* ```typescript +* import UpgradeClient from 'upgrade_client_lib/dist/node'; +* ``` +* +* General UpGrade types can also be accessed as named exports: +* ```typescript +* import UpgradeClient, { IExperimentAssignment } from 'upgrade_client_lib/dist/browser'; +* ``` +* +* SDK-Specific types can be accessed also: +* ```typescript +* import { Interfaces } from 'upgrade_client_lib/dist/clientlibs/js/src/identifiers'; +* +* const initResponse: Interfaces.IUser = await upgradeClient.init(); +* ``` +*/ + export default class UpgradeClient { // Endpoints URLs private api: UpGradeClientInterfaces.IEndpoints = {