1 | type AllowedAny = any;
|
2 | type Cloned<T> = DeepExecWith<T, {
|
3 | [K in keyof T]: Cloned<T[K]>;
|
4 | }>;
|
5 | export type Constructor<T> = new (...args: AllowedAny[]) => T;
|
6 | type DeepExecWith<T, Condition> = T extends Record<infer _Key, unknown> ? Condition : T extends (...args: AllowedAny) => unknown ? T : Condition;
|
7 | type DeepNonNullable<T> = Cloned<DeepExecWith<T, NonNullable<{
|
8 | [K in keyof T]: DeepNonNullable<T[K]>;
|
9 | }>>>;
|
10 | export type DeepNonNullableAndRequired<T> = DeepNonNullable<DeepRequired<T>>;
|
11 | type DeepRequired<T> = Cloned<DeepExecWith<T, {
|
12 | [K in keyof T]-?: DeepRequired<T[K]>;
|
13 | }>>;
|
14 | export type OmitKey<T, K extends keyof T> = Omit<T, K>;
|
15 | export {};
|
16 |
|
\ | No newline at end of file |