fix: Place notifBody inside a body prop

The previous behaviour has issues with typescript expanding types.
This implementation does not, so we're gonna roll with that instead.
This commit is contained in:
zkldi
2022-04-24 15:35:02 +01:00
parent 415aa67bf1
commit 3f2a795229
+2 -2
View File
@@ -1500,7 +1500,7 @@ interface BaseNotification {
read: boolean;
}
export type NotificationTypes =
export type NotificationBody =
| {
// Emitted when the user is rivalled by someone.
type: "RIVALED_BY";
@@ -1518,4 +1518,4 @@ export type NotificationTypes =
};
};
export type NotificationDocument = BaseNotification & NotificationTypes;
export type NotificationDocument = BaseNotification & { body: NotificationBody };