• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

realm / realm-js / 7685289785

28 Jan 2024 11:05AM UTC coverage: 85.346%. Remained the same
7685289785

Pull #6379

github

web-flow
Update all of typescript-eslint to version 6.18.1
Pull Request #6379: Update all of typescript-eslint 5.62.0 → 6.18.1 (major)

942 of 1164 branches covered (0.0%)

Branch coverage included in aggregate %.

2372 of 2719 relevant lines covered (87.24%)

1015.97 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/packages/realm/src/app-services/PushClient.ts
1
////////////////////////////////////////////////////////////////////////////
2
//
3
// Copyright 2022 Realm Inc.
4
//
5
// Licensed under the Apache License, Version 2.0 (the "License");
6
// you may not use this file except in compliance with the License.
7
// You may obtain a copy of the License at
8
//
9
// http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing, software
12
// distributed under the License is distributed on an "AS IS" BASIS,
13
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
// See the License for the specific language governing permissions and
15
// limitations under the License.
16
//
17
////////////////////////////////////////////////////////////////////////////
18

19
import { binding } from "../internal";
20
/**
21
 * Authentication provider where users identify using an API-key.
22
 */
23
export class PushClient {
24
  /** @internal */
25
  private user: binding.SyncUser;
26
  /** @internal */
27
  public internal: binding.PushClient;
28

29
  /** @internal */
30
  public constructor(user: binding.SyncUser, internal: binding.PushClient) {
31
    this.user = user;
×
32
    this.internal = internal;
×
33
  }
34

35
  /**
36
   * Register this device with the user.
37
   * @param token - A Firebase Cloud Messaging (FCM) token, retrieved via the firebase SDK.
38
   * @returns A promise that resolves once the device has been registered.
39
   */
40
  async register(token: string): Promise<void> {
41
    await this.internal.registerDevice(token, this.user);
×
42
  }
43

44
  /**
45
   * Deregister this device with the user, to disable sending messages to this device.
46
   * @returns A promise that resolves once the device has been deregistered.
47
   */
48
  async deregister(): Promise<void> {
49
    await this.internal.deregisterDevice(this.user);
×
50
  }
51
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc