kopia lustrzana https://github.com/Stopka/fedisearch
14 wiersze
291 B
TypeScript
14 wiersze
291 B
TypeScript
|
import { z } from 'zod'
|
||
|
|
||
|
export const createSortingInputSchema = (members:z.ZodEnum<[string, ...string[]]>) => {
|
||
|
return z.object({
|
||
|
sortBy: members,
|
||
|
sortWay: z.enum(['asc', 'desc'])
|
||
|
})
|
||
|
}
|
||
|
|
||
|
export type SortingInputType<TMembers> = {
|
||
|
sortBy: TMembers
|
||
|
sortWay: 'asc'|'desc'
|
||
|
}
|