react-native-notifications
Version:
Advanced Push Notifications (Silent, interactive notifications) for iOS & Android
34 lines (26 loc) • 539 B
text/typescript
export class Notification {
identifier: string;
payload: any;
constructor(payload: object) {
this.payload = payload;
this.identifier = this.payload.identifier;
}
get title(): string {
return this.payload.title;
}
get body(): string {
return this.payload.body;
}
get sound(): string {
return this.payload.sound;
}
get badge(): number {
return this.payload.badge;
}
get type(): string {
return this.payload.type;
}
get thread(): string {
return this.payload.thread;
}
}