diff options
author | Chocobozzz <me@florianbigard.com> | 2019-08-20 13:52:49 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-08-20 14:53:42 +0200 |
commit | 0283eaac2a8e73006c66df3cf5bb9012e37450e5 (patch) | |
tree | 1fb73aeef57f984a77f47828ade23c6365ce8eb0 /server/typings/models/account/account-blocklist.ts | |
parent | 96ca24f00e5ae5471dee9ee596489fe50af2b46f (diff) | |
download | PeerTube-0283eaac2a8e73006c66df3cf5bb9012e37450e5.tar.gz PeerTube-0283eaac2a8e73006c66df3cf5bb9012e37450e5.tar.zst PeerTube-0283eaac2a8e73006c66df3cf5bb9012e37450e5.zip |
Cleanup model types
Diffstat (limited to 'server/typings/models/account/account-blocklist.ts')
-rw-r--r-- | server/typings/models/account/account-blocklist.ts | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/server/typings/models/account/account-blocklist.ts b/server/typings/models/account/account-blocklist.ts index 6d1771de8..d20d97aa8 100644 --- a/server/typings/models/account/account-blocklist.ts +++ b/server/typings/models/account/account-blocklist.ts | |||
@@ -2,10 +2,16 @@ import { AccountBlocklistModel } from '../../../models/account/account-blocklist | |||
2 | import { PickWith } from '../../utils' | 2 | import { PickWith } from '../../utils' |
3 | import { MAccountDefault } from './account' | 3 | import { MAccountDefault } from './account' |
4 | 4 | ||
5 | type Use<K extends keyof AccountBlocklistModel, M> = PickWith<AccountBlocklistModel, K, M> | ||
6 | |||
7 | // ############################################################################ | ||
8 | |||
5 | export type MAccountBlocklist = Omit<AccountBlocklistModel, 'ByAccount' | 'BlockedAccount'> | 9 | export type MAccountBlocklist = Omit<AccountBlocklistModel, 'ByAccount' | 'BlockedAccount'> |
6 | 10 | ||
11 | // ############################################################################ | ||
12 | |||
7 | export type MAccountBlocklistId = Pick<AccountBlocklistModel, 'id'> | 13 | export type MAccountBlocklistId = Pick<AccountBlocklistModel, 'id'> |
8 | 14 | ||
9 | export type MAccountBlocklistAccounts = MAccountBlocklist & | 15 | export type MAccountBlocklistAccounts = MAccountBlocklist & |
10 | PickWith<AccountBlocklistModel, 'ByAccount', MAccountDefault> & | 16 | Use<'ByAccount', MAccountDefault> & |
11 | PickWith<AccountBlocklistModel, 'BlockedAccount', MAccountDefault> | 17 | Use<'BlockedAccount', MAccountDefault> |