@itzworking/decorated-class 0.0.139 → 0.0.140

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itzworking/decorated-class",
3
- "version": "0.0.139",
3
+ "version": "0.0.140",
4
4
  "private": false,
5
5
  "dependencies": {
6
6
  "tslib": "^2.3.0"
package/src/types.d.ts CHANGED
@@ -1,3 +1,5 @@
1
- export type OptionalProps<C> = ({
2
- [Key in keyof C as C[Key] extends Function ? never : Key]?: C[Key];
3
- } & Record<string, any>) | undefined;
1
+ export type ArrayType<T> = T extends (infer U)[] ? OptionalProps<U>[] : T;
2
+ export type ObjectType<T> = T extends object ? T extends Function ? never : OptionalProps<T> : T;
3
+ export type OptionalProps<C> = undefined extends C ? undefined : {
4
+ [Key in keyof C as C[Key] extends Function ? never : Key]?: C[Key] extends Array<any> ? ArrayType<C[Key]> : ObjectType<C[Key]>;
5
+ } & Record<string, any>;
package/src/types.js CHANGED
@@ -1,3 +1,4 @@
1
1
  "use strict";
2
+ /* eslint-disable @typescript-eslint/no-unsafe-function-type */
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
4
  //# sourceMappingURL=types.js.map
package/src/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../libs/decorated-class/src/types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../libs/decorated-class/src/types.ts"],"names":[],"mappings":";AAAA,+DAA+D"}