@esportsplus/reactivity 0.0.9 → 0.0.10

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/build/types.d.ts CHANGED
@@ -2,7 +2,8 @@ import { CLEAN, CHECK, DIRTY } from './symbols';
2
2
  import Reactive from './reactive';
3
3
  type Fn = () => Promise<unknown> | unknown;
4
4
  type Infer<T> = T extends (...args: any[]) => any ? Reactive<T> : T extends Record<string, any> ? InferNested<T> : Reactive<T>;
5
- type InferNested<T> = T extends (...args: any[]) => any ? ReturnType<T> : T extends Record<string, any> ? {
5
+ type Primitives = any[] | boolean | number | string | null | undefined | ((...args: any[]) => any);
6
+ type InferNested<T> = T extends (...args: any[]) => any ? ReturnType<T> : T extends Record<string, Primitives> ? {
6
7
  [K in keyof T]: InferNested<T[K]>;
7
8
  } : T;
8
9
  type Scheduler = {
package/package.json CHANGED
@@ -15,5 +15,5 @@
15
15
  "prepublishOnly": "npm run build"
16
16
  },
17
17
  "types": "./build/index.d.ts",
18
- "version": "0.0.9"
18
+ "version": "0.0.10"
19
19
  }
package/src/types.ts CHANGED
@@ -11,10 +11,12 @@ type Infer<T> =
11
11
  ? InferNested<T>
12
12
  : Reactive<T>;
13
13
 
14
+ type Primitives = any[] | boolean | number | string | null | undefined | ((...args: any[]) => any);
15
+
14
16
  type InferNested<T> =
15
17
  T extends (...args: any[]) => any
16
18
  ? ReturnType<T>
17
- : T extends Record<string, any>
19
+ : T extends Record<string, Primitives>
18
20
  ? { [K in keyof T]: InferNested<T[K]> }
19
21
  : T;
20
22