Skip to content

Commit 6da3782

Browse files
Mohit TejaniMohit Tejani
authored andcommitted
fix(types): add missing listenToBrowserNetworkEvents config option
1 parent 6d5d12c commit 6da3782

3 files changed

Lines changed: 25 additions & 2 deletions

File tree

lib/types/index.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2667,6 +2667,18 @@ declare namespace PubNub {
26672667
* @default `false`
26682668
*/
26692669
autoNetworkDetection?: boolean;
2670+
2671+
/**
2672+
* If the browser fails to detect the network changes from Wi-Fi to LAN and vice versa, or you
2673+
* get reconnection issues, set the flag to `false`. This allows the SDK reconnection logic to
2674+
* take over.
2675+
*
2676+
* **Note:** This option is available only in the **browser** environment.
2677+
*
2678+
* @default `true`
2679+
*/
2680+
listenToBrowserNetworkEvents?: boolean;
2681+
26702682
/**
26712683
* Whether to use the standardized workflows for subscribe and presence.
26722684
*

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/interfaces/configuration.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,17 @@ export type UserConfiguration = {
284284
*/
285285
autoNetworkDetection?: boolean;
286286

287+
/**
288+
* If the browser fails to detect the network changes from Wi-Fi to LAN and vice versa, or you
289+
* get reconnection issues, set the flag to `false`. This allows the SDK reconnection logic to
290+
* take over.
291+
*
292+
* **Note:** This option is available only in the **browser** environment.
293+
*
294+
* @default `true`
295+
*/
296+
listenToBrowserNetworkEvents?: boolean;
297+
287298
/**
288299
* Whether to use the standardized workflows for subscribe and presence.
289300
*

0 commit comments

Comments
 (0)