Skip to content

Commit 874299e

Browse files
committed
Updating the onConfigUpdate method definition.
1 parent 006127b commit 874299e

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

common/api-review/remote-config.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export function isSupported(): Promise<boolean>;
8282
export type LogLevel = 'debug' | 'error' | 'silent';
8383

8484
// @public
85-
export function onConfigUpdate(remoteConfig: RemoteConfig, observer: ConfigUpdateObserver): Promise<Unsubscribe>;
85+
export function onConfigUpdate(remoteConfig: RemoteConfig, observer: ConfigUpdateObserver): Unsubscribe;
8686

8787
// @public
8888
export interface RemoteConfig {

docs-devsite/remote-config.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ Starts listening for real-time config updates from the Remote Config backend and
296296
<b>Signature:</b>
297297

298298
```typescript
299-
export declare function onConfigUpdate(remoteConfig: RemoteConfig, observer: ConfigUpdateObserver): Promise<Unsubscribe>;
299+
export declare function onConfigUpdate(remoteConfig: RemoteConfig, observer: ConfigUpdateObserver): Unsubscribe;
300300
```
301301

302302
#### Parameters
@@ -308,7 +308,7 @@ export declare function onConfigUpdate(remoteConfig: RemoteConfig, observer: Con
308308

309309
<b>Returns:</b>
310310

311-
Promise&lt;[Unsubscribe](./remote-config.md#unsubscribe)<!-- -->&gt;
311+
[Unsubscribe](./remote-config.md#unsubscribe)
312312

313313
An [Unsubscribe](./remote-config.md#unsubscribe) function to remove the listener.
314314

packages/remote-config/src/api.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,12 +376,12 @@ export async function setCustomSignals(
376376
*
377377
* @public
378378
*/
379-
export async function onConfigUpdate(
379+
export function onConfigUpdate(
380380
remoteConfig: RemoteConfig,
381381
observer: ConfigUpdateObserver
382-
): Promise<Unsubscribe> {
382+
): Unsubscribe {
383383
const rc = getModularInstance(remoteConfig) as RemoteConfigImpl;
384-
await rc._realtimeHandler.addObserver(observer);
384+
rc._realtimeHandler.addObserver(observer);
385385
return () => {
386386
rc._realtimeHandler.removeObserver(observer);
387387
};

packages/remote-config/src/client/realtime_handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ export class RealtimeHandler {
668668
if (this.httpRetriesRemaining > 0) {
669669
this.httpRetriesRemaining--;
670670
await new Promise(resolve => setTimeout(resolve, delayMillis));
671-
await this.prepareAndBeginRealtimeHttpStream();
671+
void this.prepareAndBeginRealtimeHttpStream();
672672
} else if (!this.isInBackground) {
673673
const error = ERROR_FACTORY.create(ErrorCode.CONFIG_UPDATE_STREAM_ERROR, {
674674
originalErrorMessage:

0 commit comments

Comments
 (0)