PeerTube/server/typings/models/server/server.ts

17 lines
601 B
TypeScript
Raw Normal View History

2019-08-15 04:53:26 -05:00
import { ServerModel } from '../../../models/server/server'
import { PickWith } from '../../utils'
import { MAccountBlocklistId } from '../account'
2019-08-20 06:52:49 -05:00
type Use<K extends keyof ServerModel, M> = PickWith<ServerModel, K, M>
// ############################################################################
2019-08-15 04:53:26 -05:00
export type MServer = Omit<ServerModel, 'Actors' | 'BlockedByAccounts'>
2019-08-20 06:52:49 -05:00
// ############################################################################
2019-08-15 04:53:26 -05:00
export type MServerHost = Pick<MServer, 'host'>
export type MServerHostBlocks = MServerHost &
2019-08-20 06:52:49 -05:00
Use<'BlockedByAccounts', MAccountBlocklistId[]>