wenay-common2 1.0.38 → 1.0.39

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.
@@ -19,9 +19,9 @@ export type DeepSocketListenAll<T> = {
19
19
  } ? ReturnType<typeof listenSocketAll<InferArgs<T[K]>>> : T[K] extends (...a: any[]) => any ? T[K] : T[K] extends typeof Promise ? T[K] : T[K] extends object ? DeepSocketListenAll<T[K]> : T[K];
20
20
  };
21
21
  export type DeepSocketListenSmart<T> = {
22
- [K in keyof T]: T[K] extends {
22
+ [K in keyof T]: NonNullable<T[K]> extends {
23
23
  addListen: Function;
24
- } ? ReturnType<typeof listenSocketSmart<InferArgs<T[K]>>> : T[K] extends (...a: any[]) => any ? T[K] : T[K] extends typeof Promise ? T[K] : T[K] extends object ? DeepSocketListenSmart<T[K]> : T[K];
24
+ } ? ReturnType<typeof listenSocketSmart<InferArgs<NonNullable<T[K]>>>> | Extract<T[K], undefined | null> : NonNullable<T[K]> extends (...a: any[]) => any ? T[K] : NonNullable<T[K]> extends typeof Promise ? T[K] : NonNullable<T[K]> extends object ? DeepSocketListenSmart<T[K]> : T[K];
25
25
  };
26
26
  export declare function matchKeys<T extends Obj, T2 extends Obj>(obj1: T, obj2: T2): boolean;
27
27
  export declare function matchKeysList<T extends Obj>(obj1: T, keys: string[]): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wenay-common2",
3
- "version": "1.0.38",
3
+ "version": "1.0.39",
4
4
  "description": "Common library",
5
5
  "strict": true,
6
6
  "main": "lib/index.js",