1 | export declare type PropOr<T extends object | undefined, P extends string | symbol | number, D = undefined> = T extends Partial<Record<P, unknown>> ? T[P] : D;
|
2 | export declare type UnionKeys<T> = T extends unknown ? keyof T : never;
|
3 | declare type AddOptionalKeys<K extends PropertyKey> = {
|
4 | readonly [P in K]?: undefined;
|
5 | };
|
6 |
|
7 |
|
8 |
|
9 | export declare type Deunionize<B extends object | undefined, T extends B = B> = T extends object ? T & AddOptionalKeys<Exclude<UnionKeys<B>, keyof T>> : T;
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | export declare function deunionize<T extends object | undefined>(t: T): Deunionize<T, T>;
|
16 | export {};
|
17 |
|
\ | No newline at end of file |