Skip to content

Commit

Permalink
remove onesignal.d.ts
Browse files Browse the repository at this point in the history
OneSignal.on and OneSignal.emit were removed in User Model. Moved
PushSubscriptionState into it's own model file.
  • Loading branch information
jkasten2 committed Dec 1, 2023
1 parent 92aa878 commit 3c4e1fb
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
1 change: 1 addition & 0 deletions src/page/managers/slidedownManager/SlidedownManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import {
NotSubscribedReason,
} from '../../../shared/errors/NotSubscribedError';
import { CoreModuleDirector } from '../../../core/CoreModuleDirector';
import { PushSubscriptionState } from '../../../shared/models/PushSubscriptionState';

export class SlidedownManager {
private context: ContextInterface;
Expand Down
1 change: 1 addition & 0 deletions src/shared/managers/SubscriptionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import UserDirector from '../../onesignal/UserDirector';
import { OSModel } from '../../core/modelRepo/OSModel';
import { isCompleteSubscriptionObject } from '../../core/utils/typePredicates';
import { bowserCastle } from '../utils/bowserCastle';
import { PushSubscriptionState } from '../models/PushSubscriptionState';

export interface SubscriptionManagerConfig {
safariWebId?: string;
Expand Down
4 changes: 4 additions & 0 deletions src/shared/models/PushSubscriptionState.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export interface PushSubscriptionState {
subscribed: boolean;
optedOut: boolean;
}
10 changes: 0 additions & 10 deletions typings/globals/onesignal.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion typings/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/// <reference path="globals/onesignal.d.ts" />
/// <reference path="globals/serviceworker.d.ts" />
/// <reference path="globals/missing.d.ts" />

0 comments on commit 3c4e1fb

Please sign in to comment.