@itzworking/decorated-class 0.0.145 → 0.0.146
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/package.json +1 -1
- package/src/types.d.ts +1 -2
package/package.json
CHANGED
package/src/types.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export type ArrayType<T> = T extends (infer U)[] ? U extends undefined | null ? (undefined | null)[] : OptionalProps<U>[] : T;
|
|
2
1
|
export type ObjectType<T> = T extends object ? T extends Function ? never : T extends undefined | null ? undefined | null : OptionalProps<T> : T;
|
|
3
2
|
export type OptionalProps<C> = undefined | null extends C ? undefined | null : ({
|
|
4
|
-
[Key in keyof C as C[Key] extends Function ? never : Key]?: C[Key] extends Array<any> ?
|
|
3
|
+
[Key in keyof C as C[Key] extends Function ? never : Key]?: C[Key] extends Array<any> ? C[Key] : ObjectType<C[Key]>;
|
|
5
4
|
} & Record<string, any>) | undefined | null;
|