Skip to content

Commit

Permalink
fix(messaging): typings
Browse files Browse the repository at this point in the history
  • Loading branch information
triniwiz committed Aug 2, 2022
1 parent d63e7aa commit c7e024d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/firebase-messaging-core/index.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { AndroidActivityNewIntentEventData, AndroidApplication, Application, Dev
import { IMessagingCore } from '.';
import { AuthorizationStatus } from './common';

export { AuthorizationStatus };

let defaultInstance: MessagingCore;

let Callback;
Expand Down Expand Up @@ -292,3 +290,5 @@ export class MessagingCore implements IMessagingCore {
return org.nativescript.firebase.messaging.FirebaseMessaging.hasPermission(Utils.android.getApplicationContext());
}
}

export { AuthorizationStatus } from './common';
4 changes: 3 additions & 1 deletion packages/firebase-messaging-core/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export * from './common';

import { AuthorizationStatus } from './common';

export interface AndroidPermissions {}

export interface IOSPermissions {
Expand All @@ -17,7 +19,7 @@ export interface Permissions {
}

export interface IMessagingCore {
isDeviceRegisteredForRemoteMessages: boolean;
readonly isDeviceRegisteredForRemoteMessages: boolean;

showNotificationsWhenInForeground: boolean;

Expand Down
4 changes: 2 additions & 2 deletions packages/firebase-messaging-core/index.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { Application, ApplicationSettings, Device } from '@nativescript/core';
import { IMessagingCore, Permissions } from '.';
import { AuthorizationStatus } from './common';

export { AuthorizationStatus };

declare const TNSFirebaseCore;

let _registerDeviceForRemoteMessages = {
Expand Down Expand Up @@ -324,3 +322,5 @@ export class MessagingCore implements IMessagingCore {
return UIApplication.sharedApplication.registeredForRemoteNotifications;
}
}

export { AuthorizationStatus } from './common';
6 changes: 3 additions & 3 deletions packages/firebase-messaging/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export interface IMessaging {

autoInitEnabled: boolean;

isDeviceRegisteredForRemoteMessages: boolean;
readonly isDeviceRegisteredForRemoteMessages: boolean;

showNotificationsWhenInForeground: boolean;

Expand Down Expand Up @@ -106,11 +106,11 @@ export declare class Messaging implements IMessaging {

deleteToken(): Promise<void>;

isDeviceRegisteredForRemoteMessages(): boolean;

isAutoInitEnabled: boolean;
showNotificationsWhenInForeground: boolean;

readonly isDeviceRegisteredForRemoteMessages: boolean;

readonly app: FirebaseApp;

readonly native;
Expand Down

0 comments on commit c7e024d

Please sign in to comment.