summaryrefslogtreecommitdiff
path: root/src/models/entities/notification.ts
diff options
context:
space:
mode:
authortamaina <tamaina@hotmail.co.jp>2020-05-26 14:33:55 +0900
committertamaina <tamaina@hotmail.co.jp>2020-05-26 14:33:55 +0900
commit9bee9d20f751d2cf5833c5b2cf8be875496250c2 (patch)
tree200771d0da80c63cfa5609d7d73141be25f0b0b1 /src/models/entities/notification.ts
parentResolve https://github.com/syuilo/misskey/pull/6406#issuecomment-633203670 (diff)
downloadmisskey-9bee9d20f751d2cf5833c5b2cf8be875496250c2.tar.gz
misskey-9bee9d20f751d2cf5833c5b2cf8be875496250c2.tar.bz2
misskey-9bee9d20f751d2cf5833c5b2cf8be875496250c2.zip
Improve typing
Diffstat (limited to 'src/models/entities/notification.ts')
-rw-r--r--src/models/entities/notification.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/models/entities/notification.ts b/src/models/entities/notification.ts
index 565645a5d6..988fdb341f 100644
--- a/src/models/entities/notification.ts
+++ b/src/models/entities/notification.ts
@@ -5,6 +5,7 @@ import { Note } from './note';
import { FollowRequest } from './follow-request';
import { UserGroupInvitation } from './user-group-invitation';
import { AccessToken } from './access-token';
+import { notificationTypes } from '../../types';
@Entity()
export class Notification {
@@ -66,10 +67,10 @@ export class Notification {
*/
@Index()
@Column('enum', {
- enum: ['follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app'],
+ enum: notificationTypes,
comment: 'The type of the Notification.'
})
- public type: 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollVote' | 'receiveFollowRequest' | 'followRequestAccepted' | 'groupInvited' | 'app';
+ public type: typeof notificationTypes[number];
/**
* 通知が読まれたかどうか