ivue 1.1.3 → 1.1.4
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 +1 -1
- package/docs/package.json +1 -1
- package/package.json +1 -1
- package/src/ivue.ts +2 -2
package/dist/src/ivue.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export declare type IVueRefs<T = any> = {
|
|
|
25
25
|
/**
|
|
26
26
|
* Unwraps the returned Refs of composable method T to a reactive type definition.
|
|
27
27
|
*/
|
|
28
|
-
export declare type UseComposableReturn<T extends Record<string, Ref | any>> =
|
|
28
|
+
export declare type UseComposableReturn<T extends Record<string, Ref | any>> = {
|
|
29
29
|
[K in keyof T]: T[K] extends Ref ? T[K]['value'] extends Ref ? T[K]['value']['value'] : T[K]['value'] : T[K];
|
|
30
30
|
};
|
|
31
31
|
export declare type UseComposable<T extends (...args: any[]) => any> = UseComposableReturn<ReturnType<T>>;
|
package/docs/package.json
CHANGED
package/package.json
CHANGED
package/src/ivue.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type {
|
|
|
5
5
|
ExtractPropTypes,
|
|
6
6
|
Ref,
|
|
7
7
|
ToRef,
|
|
8
|
-
UnwrapNestedRefs
|
|
8
|
+
UnwrapNestedRefs,
|
|
9
9
|
} from 'vue';
|
|
10
10
|
import { UnwrapRef, computed, reactive, ref, toRef } from 'vue';
|
|
11
11
|
|
|
@@ -40,7 +40,7 @@ export type IVueRefs<T = any> = {
|
|
|
40
40
|
/**
|
|
41
41
|
* Unwraps the returned Refs of composable method T to a reactive type definition.
|
|
42
42
|
*/
|
|
43
|
-
export type UseComposableReturn<T extends Record<string, Ref | any>> =
|
|
43
|
+
export type UseComposableReturn<T extends Record<string, Ref | any>> = {
|
|
44
44
|
[K in keyof T]: T[K] extends Ref // Handle Ref
|
|
45
45
|
? T[K]['value'] extends Ref // Handle Double Wrapped Ref: Most often a Ref that is inside a Computed Ref
|
|
46
46
|
? T[K]['value']['value'] // Return doubly wrapped internal value
|