sendou.ink/utils/types.ts
Kalle (Sendou) 5079f0e571 Closes #627
2021-08-08 16:18:44 +03:00

10 lines
331 B
TypeScript

import { Ability } from "@prisma/client";
export type Unpacked<T> = T extends (infer U)[] ? U : T;
export type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
export type Serialized<T> = {
[P in keyof T]: T[P] extends Date ? string : Serialized<T[P]>;
};
export type AbilityOrUnknown = Ability | "UNKNOWN";