Skip to content

Commit b46eddb

Browse files
committed
chore: pr comments
1 parent 815139a commit b46eddb

1 file changed

Lines changed: 21 additions & 6 deletions

File tree

packages/sdk/node-client/src/LDClient.ts

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,27 @@ export interface LDClient extends Omit<LDClientBase, 'identify'> {
1515
* Identifies a context to LaunchDarkly and returns a promise which resolves to an object
1616
* containing the result of the identify operation.
1717
*
18-
* @param context The context to identify @see {@link LDContext}
19-
* @param identifyOptions Optional configuration @see {@link LDIdentifyOptions}.
20-
* @returns an identify result @see {@link LDIdentifyResult}
18+
* Unlike the server-side SDKs, the client-side Node.js SDK maintains a current context
19+
* state, which is set when you call `identify()`.
20+
*
21+
* Changing the current context also causes all feature flag values to be reloaded. Until
22+
* that has finished, calls to variation methods will still return flag values for the
23+
* previous context. You can await the Promise to determine when the new flag values are
24+
* available.
25+
*
26+
* Use {@link start} to set the initial context at startup.
27+
*
28+
* @param context The context to identify. @see {@link LDContext}
29+
* @param identifyOptions Optional configuration. @see {@link LDIdentifyOptions}.
30+
* @returns A promise which resolves to an object containing the result of the identify operation.
2131
*/
2232
identify(context: LDContext, identifyOptions?: LDIdentifyOptions): Promise<LDIdentifyResult>;
2333

2434
/**
25-
* Starts the client by performing the first identify with the initial context. Must be
26-
* called after {@link createClient}. The returned promise resolves when the first
27-
* identify completes (or times out, or fails).
35+
* Starts the client and returns a promise that resolves to the initialization result.
36+
*
37+
* The promise will resolve to a {@link LDWaitForInitializationResult} object containing the
38+
* status of the waitForInitialization operation.
2839
*
2940
* @param options Optional configuration. See {@link LDStartOptions}.
3041
*/
@@ -33,6 +44,10 @@ export interface LDClient extends Omit<LDClientBase, 'identify'> {
3344
/**
3445
* Sets the data source connection mode.
3546
*
47+
* @remarks
48+
* Switches between 'offline', 'streaming', and 'polling' at runtime without restarting
49+
* the client. Use 'offline' to pause all LaunchDarkly network activity.
50+
*
3651
* @see {@link ConnectionMode}
3752
*/
3853
setConnectionMode(mode: ConnectionMode): Promise<void>;

0 commit comments

Comments
 (0)