ivue 1.1.13 → 1.1.14
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/dist/src/ivue.d.ts +4 -3
- package/docs/package.json +1 -1
- package/package.json +1 -1
- package/src/ivue.ts +6 -7
package/dist/src/ivue.d.ts
CHANGED
|
@@ -26,9 +26,10 @@ export declare type IVueRefs<T = any> = {
|
|
|
26
26
|
/**
|
|
27
27
|
* Unwraps the returned Refs of composable method T to a reactive type definition.
|
|
28
28
|
*/
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
declare type ResolveRef<T = any> = T extends Ref | DemiRef ? ResolveRef<T['value']> : T;
|
|
30
|
+
export declare type UseComposableReturn<T> = T extends Ref | DemiRef ? ResolveRef<T> : {
|
|
31
|
+
[K in keyof T]: T[K] extends Ref | DemiRef ? ResolveRef<T[K]> : T[K];
|
|
32
|
+
};
|
|
32
33
|
export declare type UseComposable<T extends (...args: any[]) => any> = UseComposableReturn<ReturnType<T>>;
|
|
33
34
|
/**
|
|
34
35
|
* Extracts object defined emit types by converting them to a plain interface
|
package/docs/package.json
CHANGED
package/package.json
CHANGED
package/src/ivue.ts
CHANGED
|
@@ -41,14 +41,13 @@ export type IVueRefs<T = any> = {
|
|
|
41
41
|
/**
|
|
42
42
|
* Unwraps the returned Refs of composable method T to a reactive type definition.
|
|
43
43
|
*/
|
|
44
|
+
type ResolveRef<T = any> = T extends Ref | DemiRef ? ResolveRef<T['value']> : T;
|
|
44
45
|
|
|
45
|
-
export type UseComposableReturn<T> = T extends Ref | DemiRef
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
: T[K];
|
|
51
|
-
}[keyof T];
|
|
46
|
+
export type UseComposableReturn<T> = T extends Ref | DemiRef
|
|
47
|
+
? ResolveRef<T>
|
|
48
|
+
: {
|
|
49
|
+
[K in keyof T]: T[K] extends Ref | DemiRef ? ResolveRef<T[K]> : T[K];
|
|
50
|
+
};
|
|
52
51
|
|
|
53
52
|
export type UseComposable<T extends (...args: any[]) => any> =
|
|
54
53
|
UseComposableReturn<ReturnType<T>>;
|