tianji/src/types/utils.ts

7 lines
223 B
TypeScript
Raw Normal View History

2023-10-05 21:09:03 +08:00
export type ExactType<T, U extends Partial<T>> = Omit<T, keyof U> & U;
2023-10-16 22:34:01 +08:00
export type PickRequired<T, U extends keyof T> = Omit<T, keyof U> &
Required<Pick<T, U>>;
export type MaybePromise<TType> = Promise<TType> | TType;