@esportsplus/reactivity 0.16.6 → 0.16.7
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.
|
@@ -6,7 +6,7 @@ type API<T> = Prettify<{
|
|
|
6
6
|
} & {
|
|
7
7
|
dispose: VoidFunction;
|
|
8
8
|
}>;
|
|
9
|
-
type Infer<T> = T extends (...args: unknown[]) => Promise<infer R> ? R | undefined : T extends (...args: any[]) => infer R ? R : T extends
|
|
9
|
+
type Infer<T> = T extends (...args: unknown[]) => Promise<infer R> ? R | undefined : T extends (...args: any[]) => infer R ? R : T extends (infer U)[] ? ReactiveArray<U> : T extends ReactiveObject<any> ? T : T extends Record<PropertyKey, unknown> ? {
|
|
10
10
|
[K in keyof T]: T[K];
|
|
11
11
|
} : T;
|
|
12
12
|
declare class ReactiveObject<T extends Record<PropertyKey, unknown>> {
|
package/package.json
CHANGED
package/src/reactive/object.ts
CHANGED
|
@@ -12,8 +12,8 @@ type Infer<T> =
|
|
|
12
12
|
? R | undefined
|
|
13
13
|
: T extends (...args: any[]) => infer R
|
|
14
14
|
? R
|
|
15
|
-
: T extends
|
|
16
|
-
? ReactiveArray<
|
|
15
|
+
: T extends (infer U)[]
|
|
16
|
+
? ReactiveArray<U>
|
|
17
17
|
: T extends ReactiveObject<any>
|
|
18
18
|
? T
|
|
19
19
|
: T extends Record<PropertyKey, unknown>
|