pangea-helpers 1.3.71 → 1.3.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/index.d.ts +6 -0
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -2,10 +2,16 @@ export type Arrayify<T> = T extends T ? T[] : never;
|
|
|
2
2
|
export type PlainObject = Record<string, any> & {
|
|
3
3
|
[Symbol.iterator]?: never;
|
|
4
4
|
};
|
|
5
|
+
export type EmptyObject = NonNullable<unknown>;
|
|
5
6
|
export type PartialDeep<T> = {
|
|
6
7
|
[P in keyof T]?: T[P] extends object ? PartialDeep<T[P]> : T[P];
|
|
7
8
|
};
|
|
8
9
|
export type OptionalFields<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
10
|
+
export type OptionalIfNullable<T> = {
|
|
11
|
+
[K in keyof T as null extends T[K] ? K : never]?: Exclude<T[K], null>;
|
|
12
|
+
} & {
|
|
13
|
+
[K in keyof T as null extends T[K] ? never : K]: T[K];
|
|
14
|
+
};
|
|
9
15
|
export type ExtractConstructor<T> = T extends {
|
|
10
16
|
new (...args: any): any;
|
|
11
17
|
} ? T : never;
|