Improve typing
This commit is contained in:
parent
05c7cacdd1
commit
9bee9d20f7
9 changed files with 24 additions and 10 deletions
|
@ -4,6 +4,7 @@ import { readNotification } from '../../common/read-notification';
|
|||
import define from '../../define';
|
||||
import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||
import { Notifications, Followings, Mutings, Users } from '../../../../models';
|
||||
import { notificationTypes } from '../../../../types';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -42,12 +43,12 @@ export const meta = {
|
|||
},
|
||||
|
||||
includeTypes: {
|
||||
validator: $.optional.arr($.str.or(['follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted'])),
|
||||
validator: $.optional.arr($.str.or(notificationTypes as unknown as string[])),
|
||||
default: [] as string[]
|
||||
},
|
||||
|
||||
excludeTypes: {
|
||||
validator: $.optional.arr($.str.or(['follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted'])),
|
||||
validator: $.optional.arr($.str.or(notificationTypes as unknown as string[])),
|
||||
default: [] as string[]
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue