ivue 1.1.7 → 1.1.9
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
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ComputedRef, ExtractPropTypes, Ref, ToRef, UnwrapNestedRefs } from 'vue';
|
|
2
|
+
import type { Ref as DemiRef } from 'vue-demi';
|
|
2
3
|
import { UnwrapRef } from 'vue';
|
|
3
4
|
/** Types */
|
|
4
5
|
/**
|
|
@@ -25,11 +26,9 @@ export declare type IVueRefs<T = any> = {
|
|
|
25
26
|
/**
|
|
26
27
|
* Unwraps the returned Refs of composable method T to a reactive type definition.
|
|
27
28
|
*/
|
|
28
|
-
export declare type UseComposableReturn<T
|
|
29
|
-
[K in keyof T]: T[K] extends Ref ? T[K]['value']
|
|
30
|
-
|
|
31
|
-
} ? T[K]['value'] : T[K];
|
|
32
|
-
};
|
|
29
|
+
export declare type UseComposableReturn<T> = {
|
|
30
|
+
[K in keyof T]: T[K] extends Ref | DemiRef ? T[K]['value'] | (T[K]['value'] extends object ? UseComposableReturn<T[K]> : never) : T[K];
|
|
31
|
+
}[keyof T];
|
|
33
32
|
export declare type UseComposable<T extends (...args: any[]) => any> = UseComposableReturn<ReturnType<T>>;
|
|
34
33
|
/**
|
|
35
34
|
* Extracts object defined emit types by converting them to a plain interface
|
package/docs/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ivue",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.9",
|
|
4
4
|
"description": "Infinite Vue – Class Based Architecture for Vue 3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -80,5 +80,6 @@
|
|
|
80
80
|
"name": "Evgeny Kalashnikov",
|
|
81
81
|
"email": "ekalashnikov@gmail.com"
|
|
82
82
|
},
|
|
83
|
-
"license": "MIT"
|
|
83
|
+
"license": "MIT",
|
|
84
|
+
"dependencies": {}
|
|
84
85
|
}
|
package/src/ivue.ts
CHANGED
|
@@ -41,16 +41,14 @@ 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
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
: T[K]; // Handle non Ref property or method
|
|
53
|
-
};
|
|
44
|
+
|
|
45
|
+
export type UseComposableReturn<T> = {
|
|
46
|
+
[K in keyof T]: T[K] extends Ref | DemiRef
|
|
47
|
+
?
|
|
48
|
+
| T[K]['value']
|
|
49
|
+
| (T[K]['value'] extends object ? UseComposableReturn<T[K]> : never)
|
|
50
|
+
: T[K];
|
|
51
|
+
}[keyof T];
|
|
54
52
|
|
|
55
53
|
export type UseComposable<T extends (...args: any[]) => any> =
|
|
56
54
|
UseComposableReturn<ReturnType<T>>;
|