ivue 1.2.0 → 1.2.2
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/coverage/clover.xml +181 -174
- package/coverage/coverage-final.json +2 -1
- package/coverage/index.html +33 -18
- package/coverage/index.ts.html +88 -0
- package/coverage/ivue.ts.html +136 -55
- package/dist/index.es.js +40 -40
- package/dist/index.umd.js +1 -1
- package/dist/src/ivue.d.ts +23 -12
- package/docs/docs/.vitepress/dist/404.html +2 -2
- package/docs/docs/.vitepress/dist/api/ivue.html +3 -3
- package/docs/docs/.vitepress/dist/api/propsWithDefaults.html +3 -3
- package/docs/docs/.vitepress/dist/assets/{app.Cnbc-twM.js → app.2nR_jJ6K.js} +1 -1
- package/docs/docs/.vitepress/dist/assets/chunks/@localSearchIndexroot.yrRWVEzw.js +1 -0
- package/docs/docs/.vitepress/dist/assets/chunks/{VPLocalSearchBox.BrRdnkds.js → VPLocalSearchBox.DkPjtbh1.js} +1 -1
- package/docs/docs/.vitepress/dist/assets/chunks/index.es.CUL6WvM-.js +1 -0
- package/docs/docs/.vitepress/dist/assets/chunks/{theme.qh_SBkj1.js → theme.DoTp8yA-.js} +2 -2
- package/docs/docs/.vitepress/dist/assets/{pages_browse-code.md.BXwbCBZ0.js → pages_browse-code.md.D-gTrMhG.js} +61 -38
- package/docs/docs/.vitepress/dist/assets/{pages_browse-code.md.BXwbCBZ0.lean.js → pages_browse-code.md.D-gTrMhG.lean.js} +1 -1
- package/docs/docs/.vitepress/dist/assets/{pages_getting-started.md.BqHPrEWq.js → pages_getting-started.md.COvbcFGT.js} +61 -38
- package/docs/docs/.vitepress/dist/assets/{pages_guidelines.md.Dkyp5V72.lean.js → pages_guidelines.md.BI1PexCc.js} +2 -2
- package/docs/docs/.vitepress/dist/assets/{pages_guidelines.md.Dkyp5V72.js → pages_guidelines.md.BI1PexCc.lean.js} +2 -2
- package/docs/docs/.vitepress/dist/assets/{pages_how-it-works.md.Bf_7UZG9.js → pages_how-it-works.md.NImDvDby.js} +61 -38
- package/docs/docs/.vitepress/dist/assets/{pages_how-it-works.md.Bf_7UZG9.lean.js → pages_how-it-works.md.NImDvDby.lean.js} +61 -38
- package/docs/docs/.vitepress/dist/assets/{pages_usage.md.C-dTtOlJ.js → pages_usage.md.DRJXyExt.js} +124 -74
- package/docs/docs/.vitepress/dist/assets/{pages_usage.md.C-dTtOlJ.lean.js → pages_usage.md.DRJXyExt.lean.js} +124 -74
- package/docs/docs/.vitepress/dist/hashmap.json +1 -1
- package/docs/docs/.vitepress/dist/index.html +3 -3
- package/docs/docs/.vitepress/dist/pages/advanced-usage.html +3 -3
- package/docs/docs/.vitepress/dist/pages/api.html +3 -3
- package/docs/docs/.vitepress/dist/pages/browse-code.html +65 -42
- package/docs/docs/.vitepress/dist/pages/getting-started.html +65 -42
- package/docs/docs/.vitepress/dist/pages/guidelines.html +6 -6
- package/docs/docs/.vitepress/dist/pages/how-it-works.html +65 -42
- package/docs/docs/.vitepress/dist/pages/how-its-made.html +3 -3
- package/docs/docs/.vitepress/dist/pages/introduction.html +3 -3
- package/docs/docs/.vitepress/dist/pages/usage.html +128 -78
- package/docs/docs/components/usage/CounterComposables.vue +2 -2
- package/docs/docs/components/usage/CounterComposablesDestructuring.vue +1 -1
- package/docs/docs/components/usage/CounterComposablesIvue.vue +26 -0
- package/docs/docs/components/usage/CounterComposablesIvueDestructuring.vue +7 -6
- package/docs/docs/components/usage/classes/CustomMouse.ts +2 -2
- package/docs/docs/pages/usage.md +38 -13
- package/docs/package.json +1 -1
- package/package.json +1 -1
- package/src/ivue.ts +59 -34
- package/docs/docs/.vitepress/dist/assets/chunks/@localSearchIndexroot.DVtkHDuS.js +0 -1
- package/docs/docs/.vitepress/dist/assets/chunks/index.es.BJUrCfJB.js +0 -1
- /package/docs/docs/.vitepress/dist/assets/{pages_getting-started.md.BqHPrEWq.lean.js → pages_getting-started.md.COvbcFGT.lean.js} +0 -0
package/coverage/ivue.ts.html
CHANGED
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">92.09% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>163/177</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
33
|
<span class="strong">100% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>70/70</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">90.9% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>11
|
|
42
|
+
<span class='fraction'>10/11</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">92.09% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>163/177</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -582,7 +582,34 @@
|
|
|
582
582
|
<a name='L517'></a><a href='#L517'>517</a>
|
|
583
583
|
<a name='L518'></a><a href='#L518'>518</a>
|
|
584
584
|
<a name='L519'></a><a href='#L519'>519</a>
|
|
585
|
-
<a name='L520'></a><a href='#L520'>520</a
|
|
585
|
+
<a name='L520'></a><a href='#L520'>520</a>
|
|
586
|
+
<a name='L521'></a><a href='#L521'>521</a>
|
|
587
|
+
<a name='L522'></a><a href='#L522'>522</a>
|
|
588
|
+
<a name='L523'></a><a href='#L523'>523</a>
|
|
589
|
+
<a name='L524'></a><a href='#L524'>524</a>
|
|
590
|
+
<a name='L525'></a><a href='#L525'>525</a>
|
|
591
|
+
<a name='L526'></a><a href='#L526'>526</a>
|
|
592
|
+
<a name='L527'></a><a href='#L527'>527</a>
|
|
593
|
+
<a name='L528'></a><a href='#L528'>528</a>
|
|
594
|
+
<a name='L529'></a><a href='#L529'>529</a>
|
|
595
|
+
<a name='L530'></a><a href='#L530'>530</a>
|
|
596
|
+
<a name='L531'></a><a href='#L531'>531</a>
|
|
597
|
+
<a name='L532'></a><a href='#L532'>532</a>
|
|
598
|
+
<a name='L533'></a><a href='#L533'>533</a>
|
|
599
|
+
<a name='L534'></a><a href='#L534'>534</a>
|
|
600
|
+
<a name='L535'></a><a href='#L535'>535</a>
|
|
601
|
+
<a name='L536'></a><a href='#L536'>536</a>
|
|
602
|
+
<a name='L537'></a><a href='#L537'>537</a>
|
|
603
|
+
<a name='L538'></a><a href='#L538'>538</a>
|
|
604
|
+
<a name='L539'></a><a href='#L539'>539</a>
|
|
605
|
+
<a name='L540'></a><a href='#L540'>540</a>
|
|
606
|
+
<a name='L541'></a><a href='#L541'>541</a>
|
|
607
|
+
<a name='L542'></a><a href='#L542'>542</a>
|
|
608
|
+
<a name='L543'></a><a href='#L543'>543</a>
|
|
609
|
+
<a name='L544'></a><a href='#L544'>544</a>
|
|
610
|
+
<a name='L545'></a><a href='#L545'>545</a>
|
|
611
|
+
<a name='L546'></a><a href='#L546'>546</a>
|
|
612
|
+
<a name='L547'></a><a href='#L547'>547</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
|
586
613
|
<span class="cline-any cline-neutral"> </span>
|
|
587
614
|
<span class="cline-any cline-neutral"> </span>
|
|
588
615
|
<span class="cline-any cline-yes">1x</span>
|
|
@@ -747,6 +774,18 @@
|
|
|
747
774
|
<span class="cline-any cline-neutral"> </span>
|
|
748
775
|
<span class="cline-any cline-neutral"> </span>
|
|
749
776
|
<span class="cline-any cline-neutral"> </span>
|
|
777
|
+
<span class="cline-any cline-neutral"> </span>
|
|
778
|
+
<span class="cline-any cline-neutral"> </span>
|
|
779
|
+
<span class="cline-any cline-neutral"> </span>
|
|
780
|
+
<span class="cline-any cline-neutral"> </span>
|
|
781
|
+
<span class="cline-any cline-neutral"> </span>
|
|
782
|
+
<span class="cline-any cline-neutral"> </span>
|
|
783
|
+
<span class="cline-any cline-neutral"> </span>
|
|
784
|
+
<span class="cline-any cline-neutral"> </span>
|
|
785
|
+
<span class="cline-any cline-neutral"> </span>
|
|
786
|
+
<span class="cline-any cline-neutral"> </span>
|
|
787
|
+
<span class="cline-any cline-neutral"> </span>
|
|
788
|
+
<span class="cline-any cline-neutral"> </span>
|
|
750
789
|
<span class="cline-any cline-yes">1x</span>
|
|
751
790
|
<span class="cline-any cline-neutral"> </span>
|
|
752
791
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -902,8 +941,10 @@
|
|
|
902
941
|
<span class="cline-any cline-neutral"> </span>
|
|
903
942
|
<span class="cline-any cline-neutral"> </span>
|
|
904
943
|
<span class="cline-any cline-yes">1x</span>
|
|
905
|
-
<span class="cline-any cline-
|
|
906
|
-
<span class="cline-any cline-
|
|
944
|
+
<span class="cline-any cline-neutral"> </span>
|
|
945
|
+
<span class="cline-any cline-neutral"> </span>
|
|
946
|
+
<span class="cline-any cline-neutral"> </span>
|
|
947
|
+
<span class="cline-any cline-neutral"> </span>
|
|
907
948
|
<span class="cline-any cline-neutral"> </span>
|
|
908
949
|
<span class="cline-any cline-neutral"> </span>
|
|
909
950
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -919,6 +960,18 @@
|
|
|
919
960
|
<span class="cline-any cline-yes">1x</span>
|
|
920
961
|
<span class="cline-any cline-no"> </span>
|
|
921
962
|
<span class="cline-any cline-no"> </span>
|
|
963
|
+
<span class="cline-any cline-neutral"> </span>
|
|
964
|
+
<span class="cline-any cline-neutral"> </span>
|
|
965
|
+
<span class="cline-any cline-neutral"> </span>
|
|
966
|
+
<span class="cline-any cline-neutral"> </span>
|
|
967
|
+
<span class="cline-any cline-neutral"> </span>
|
|
968
|
+
<span class="cline-any cline-neutral"> </span>
|
|
969
|
+
<span class="cline-any cline-neutral"> </span>
|
|
970
|
+
<span class="cline-any cline-neutral"> </span>
|
|
971
|
+
<span class="cline-any cline-no"> </span>
|
|
972
|
+
<span class="cline-any cline-no"> </span>
|
|
973
|
+
<span class="cline-any cline-no"> </span>
|
|
974
|
+
<span class="cline-any cline-no"> </span>
|
|
922
975
|
<span class="cline-any cline-no"> </span>
|
|
923
976
|
<span class="cline-any cline-no"> </span>
|
|
924
977
|
<span class="cline-any cline-no"> </span>
|
|
@@ -936,7 +989,7 @@
|
|
|
936
989
|
<span class="cline-any cline-neutral"> </span>
|
|
937
990
|
<span class="cline-any cline-neutral"> </span>
|
|
938
991
|
<span class="cline-any cline-neutral"> </span>
|
|
939
|
-
<span class="cline-any cline-yes">
|
|
992
|
+
<span class="cline-any cline-yes">17x</span>
|
|
940
993
|
<span class="cline-any cline-yes">17x</span>
|
|
941
994
|
<span class="cline-any cline-yes">17x</span>
|
|
942
995
|
<span class="cline-any cline-yes">17x</span>
|
|
@@ -944,6 +997,7 @@
|
|
|
944
997
|
<span class="cline-any cline-yes">17x</span>
|
|
945
998
|
<span class="cline-any cline-yes">9x</span>
|
|
946
999
|
<span class="cline-any cline-yes">9x</span>
|
|
1000
|
+
<span class="cline-any cline-yes">9x</span>
|
|
947
1001
|
<span class="cline-any cline-neutral"> </span>
|
|
948
1002
|
<span class="cline-any cline-yes">9x</span>
|
|
949
1003
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -1104,7 +1158,7 @@
|
|
|
1104
1158
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">/* eslint-disable @typescript-eslint/ban-types */
|
|
1105
1159
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1106
1160
|
import type { ComputedRef, ExtractPropTypes, Ref, ToRef } from 'vue';
|
|
1107
|
-
import {
|
|
1161
|
+
import { computed, reactive, ref, toRef } from 'vue';
|
|
1108
1162
|
import type { Ref as DemiRef } from 'vue-demi';
|
|
1109
1163
|
|
|
1110
1164
|
/** Types */
|
|
@@ -1121,11 +1175,20 @@ export interface ExtendWithToRefs<T extends AnyClass> {
|
|
|
1121
1175
|
}
|
|
1122
1176
|
|
|
1123
1177
|
/**
|
|
1124
|
-
*
|
|
1178
|
+
* Type definition for `.toRefs()` method converts reactive class properties to composable .value properties.
|
|
1179
|
+
* But if unwrap = true is specified, the refs will be unwrapped refs available to be merged with the the root class properties.
|
|
1125
1180
|
*/
|
|
1126
|
-
export
|
|
1127
|
-
|
|
1128
|
-
|
|
1181
|
+
export interface IVueToRefsFn<T extends AnyClass> {
|
|
1182
|
+
<P extends keyof InstanceType<T>, B extends boolean>(
|
|
1183
|
+
props: P[],
|
|
1184
|
+
unwrap?: B
|
|
1185
|
+
): B extends true
|
|
1186
|
+
? Pick<InstanceType<T>, P>
|
|
1187
|
+
: Pick<IVueRefs<InstanceType<T>>, P>;
|
|
1188
|
+
(props: true): InstanceType<T>;
|
|
1189
|
+
(props: false): IVueRefs<InstanceType<T>>;
|
|
1190
|
+
(): IVueRefs<InstanceType<T>>;
|
|
1191
|
+
}
|
|
1129
1192
|
|
|
1130
1193
|
/**
|
|
1131
1194
|
* Converts a class properties to a composable .value Refs using ToRef vue type,
|
|
@@ -1147,7 +1210,7 @@ export type UnwrapRefRecursively<T = any> = T extends Ref | DemiRef
|
|
|
1147
1210
|
: T;
|
|
1148
1211
|
|
|
1149
1212
|
/**
|
|
1150
|
-
* Helper type for UseComposable.
|
|
1213
|
+
* Helper type for UseComposable, unwraps any type of Vue 3 composable down to its bare types.
|
|
1151
1214
|
*/
|
|
1152
1215
|
export type UnwrapComposableReturn<T> = T extends Ref | DemiRef
|
|
1153
1216
|
? UnwrapRefRecursively<T>
|
|
@@ -1160,8 +1223,9 @@ export type UnwrapComposableReturn<T> = T extends Ref | DemiRef
|
|
|
1160
1223
|
/**
|
|
1161
1224
|
* Fully unwraps to bare value types any Vue 3 composable return definition type.
|
|
1162
1225
|
*/
|
|
1163
|
-
export type UseComposable<T extends
|
|
1164
|
-
|
|
1226
|
+
export type UseComposable<T extends AnyFn> = UnwrapComposableReturn<
|
|
1227
|
+
ReturnType<T>
|
|
1228
|
+
>;
|
|
1165
1229
|
|
|
1166
1230
|
/**
|
|
1167
1231
|
* Extracts object defined emit types by converting them to a plain interface
|
|
@@ -1188,18 +1252,23 @@ export type ExtendSlots<T> = PrefixKeys<T, 'before--'> &
|
|
|
1188
1252
|
PrefixKeys<T, 'after--'>;
|
|
1189
1253
|
|
|
1190
1254
|
/** Helper Types. */
|
|
1255
|
+
/**
|
|
1256
|
+
* Any JavaScript function of any type.
|
|
1257
|
+
*/
|
|
1258
|
+
export type AnyFn = (...args: any[]) => any;
|
|
1259
|
+
|
|
1191
1260
|
/**
|
|
1192
1261
|
* Any JavaScript class of any type.
|
|
1193
1262
|
*/
|
|
1194
1263
|
export type AnyClass = abstract new (...args: any[]) => any;
|
|
1195
1264
|
|
|
1196
1265
|
/**
|
|
1197
|
-
* Descriptors map.
|
|
1266
|
+
* Descriptors map type.
|
|
1198
1267
|
*/
|
|
1199
1268
|
export type Descriptors = Map<string, PropertyDescriptor>;
|
|
1200
1269
|
|
|
1201
1270
|
/**
|
|
1202
|
-
* Computeds hash map.
|
|
1271
|
+
* Computeds hash map type.
|
|
1203
1272
|
*/
|
|
1204
1273
|
export type Computeds = Record<string, ComputedRef>;
|
|
1205
1274
|
|
|
@@ -1237,10 +1306,7 @@ export type IFnParameter<
|
|
|
1237
1306
|
/**
|
|
1238
1307
|
* Get function arguments Parmeters<F> parameter by key K
|
|
1239
1308
|
*/
|
|
1240
|
-
export type FnParameter<
|
|
1241
|
-
F extends (...args: any[]) => any,
|
|
1242
|
-
K extends number
|
|
1243
|
-
> = Parameters<F>[K];
|
|
1309
|
+
export type FnParameter<F extends AnyFn, K extends number> = Parameters<F>[K];
|
|
1244
1310
|
|
|
1245
1311
|
/**
|
|
1246
1312
|
* Convert Union Type to Intersection Type.
|
|
@@ -1415,36 +1481,50 @@ export function getAllClassProperties(obj: object): Set<string> {
|
|
|
1415
1481
|
}
|
|
1416
1482
|
|
|
1417
1483
|
/**
|
|
1418
|
-
* `iref()` is an alias for Vue ref() function but returns an
|
|
1419
|
-
* `iref()` does not alter the behavior of ref(), but simply transforms the type to an
|
|
1484
|
+
* `iref()` is an alias for Vue ref() function but returns an unwrap type without the .value
|
|
1485
|
+
* `iref()` does not alter the behavior of ref(), but simply transforms the type to an unwrap raw value.
|
|
1420
1486
|
* @param val T
|
|
1421
1487
|
* @returns {UnwrapRef<T>}
|
|
1422
1488
|
*/
|
|
1423
|
-
export
|
|
1424
|
-
return ref(val) as unknown as UnwrapRef<T>;
|
|
1425
|
-
}
|
|
1489
|
+
export const iref = ref as <T = any>(value?: T) => T;
|
|
1426
1490
|
|
|
1427
1491
|
/**
|
|
1428
|
-
*
|
|
1429
|
-
* 1. `iuse()` converts the types of a Composable / Ref to pure raw type definition.
|
|
1430
|
-
* Returns for all properties of an object an
|
|
1431
|
-
* unwraps direct Refs & ComputedRefs as well.
|
|
1432
|
-
*
|
|
1433
|
-
* 2.
|
|
1434
|
-
*
|
|
1435
|
-
*
|
|
1436
|
-
*
|
|
1492
|
+
* Three modes of operation:
|
|
1493
|
+
* 1. `iuse(useComposable(arg, arg2, arg3, ...))` converts the return types of a Composable / Ref to pure raw type definition.
|
|
1494
|
+
* Returns for all properties of an object an unwrap raw type definition,
|
|
1495
|
+
* unwraps direct Refs & ComputedRefs as well down to their raw types.
|
|
1496
|
+
*
|
|
1497
|
+
* 2. `iuse(useComposable, arg, arg2, arg3, ...)` for cleaner syntax for #1, it does exactly the same thing but
|
|
1498
|
+
* here the TypeScript inference works for composable function arguments to assist you with intellisence,
|
|
1499
|
+
* like they work for constructor arguments in the cause of `ivue()` core function,
|
|
1500
|
+
* making the API cleaner to look at and make it compatible with how this function operates with classes, see #3.
|
|
1501
|
+
*
|
|
1502
|
+
* 3. `iuse(AnyClass, ...args)` If AnyClass is supplied and that class's arguments into `iuse(AnyClass, ...args)`,
|
|
1503
|
+
* it returns an 'ivue(AnyClass, ...args).toRefs()` object for all properties but casts
|
|
1504
|
+
* their types as raw (no-Ref) types to fit with reactive() structure of the ivue class context.
|
|
1437
1505
|
*/
|
|
1438
|
-
export <span class="fstat-no" title="function not covered" >function iuse<T extends AnyClass | Object>(</span>
|
|
1439
|
-
<span class="cstat-no" title="statement not covered" >
|
|
1440
|
-
<span class="cstat-no" title="statement not covered" > ...args:
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1506
|
+
export <span class="fstat-no" title="function not covered" >function iuse<T extends AnyClass | AnyFn | Object | any>(</span>
|
|
1507
|
+
<span class="cstat-no" title="statement not covered" > classFunctionObject?: T,</span>
|
|
1508
|
+
<span class="cstat-no" title="statement not covered" > ...args: T extends AnyClass</span>
|
|
1509
|
+
? InferredArgs<T>
|
|
1510
|
+
: T extends AnyFn
|
|
1511
|
+
? Parameters<T extends (...args: any[]) => any ? T : any>
|
|
1512
|
+
: any
|
|
1513
|
+
): T extends AnyClass
|
|
1514
|
+
? InstanceType<T>
|
|
1515
|
+
: T extends AnyFn
|
|
1516
|
+
? UseComposable<T>
|
|
1517
|
+
<span class="cstat-no" title="statement not covered" > : UnwrapComposableReturn<T> {</span>
|
|
1518
|
+
<span class="cstat-no" title="statement not covered" > return typeof classFunctionObject === 'function'</span>
|
|
1519
|
+
<span class="cstat-no" title="statement not covered" > ? isClass(classFunctionObject)</span>
|
|
1520
|
+
<span class="cstat-no" title="statement not covered" > ? ivue(</span>
|
|
1521
|
+
<span class="cstat-no" title="statement not covered" > classFunctionObject as T extends AnyClass ? T : any,</span>
|
|
1522
|
+
<span class="cstat-no" title="statement not covered" > ...(args as InferredArgs<T extends AnyClass ? T : any>)</span>
|
|
1523
|
+
<span class="cstat-no" title="statement not covered" > ).toRefs()</span>
|
|
1524
|
+
<span class="cstat-no" title="statement not covered" > : (classFunctionObject as AnyFn)(</span>
|
|
1525
|
+
<span class="cstat-no" title="statement not covered" > ...(args as Parameters<T extends AnyFn ? AnyFn : any>)</span>
|
|
1526
|
+
<span class="cstat-no" title="statement not covered" > )</span>
|
|
1527
|
+
<span class="cstat-no" title="statement not covered" > : (classFunctionObject as unknown as UnwrapComposableReturn<T>);</span>
|
|
1448
1528
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
1449
1529
|
|
|
1450
1530
|
/**
|
|
@@ -1455,19 +1535,20 @@ export <span class="fstat-no" title="function not covered" >function iuse<T e
|
|
|
1455
1535
|
* @param computeds @see Computeds
|
|
1456
1536
|
* @returns {ExtendWithToRefs<T>['toRefs']}
|
|
1457
1537
|
*/
|
|
1458
|
-
|
|
1538
|
+
function ivueToRefs<T extends AnyClass>(
|
|
1459
1539
|
vue: IVue<T>,
|
|
1460
1540
|
descriptors: Descriptors,
|
|
1461
1541
|
computeds: Computeds
|
|
1462
1542
|
): ExtendWithToRefs<T>['toRefs'] {
|
|
1463
1543
|
return function (
|
|
1464
|
-
props?: (keyof InstanceType<T>)[]
|
|
1465
|
-
|
|
1544
|
+
props?: (keyof InstanceType<T>)[] | boolean,
|
|
1545
|
+
unwrap?: boolean
|
|
1546
|
+
): any /** @see {ReturnType<IVueToRefsFn<T>>} */ {
|
|
1466
1547
|
/** Resulting refs store. */
|
|
1467
1548
|
const result: Record<string | number | symbol, any> = {};
|
|
1468
1549
|
|
|
1469
1550
|
/** Output specific props only, if props are specified. */
|
|
1470
|
-
if (Array.isArray(props)
|
|
1551
|
+
if (Array.isArray(props)) {
|
|
1471
1552
|
for (let i = 0; i < props.length; i++) {
|
|
1472
1553
|
const prop = props[i] as any;
|
|
1473
1554
|
/** Handle descriptors. */
|
|
@@ -1528,7 +1609,7 @@ export function ivueToRefs<T extends AnyClass>(
|
|
|
1528
1609
|
allProps = null;
|
|
1529
1610
|
}
|
|
1530
1611
|
|
|
1531
|
-
return result as
|
|
1612
|
+
return result as any;
|
|
1532
1613
|
};
|
|
1533
1614
|
}
|
|
1534
1615
|
|
|
@@ -1627,7 +1708,7 @@ export {};
|
|
|
1627
1708
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1628
1709
|
Code coverage generated by
|
|
1629
1710
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1630
|
-
at 2024-08-
|
|
1711
|
+
at 2024-08-20T04:10:40.468Z
|
|
1631
1712
|
</div>
|
|
1632
1713
|
<script src="prettify.js"></script>
|
|
1633
1714
|
<script>
|
package/dist/index.es.js
CHANGED
|
@@ -3,50 +3,50 @@ const d = /* @__PURE__ */ new Map();
|
|
|
3
3
|
function D(e) {
|
|
4
4
|
if (d.has(e))
|
|
5
5
|
return d.get(e);
|
|
6
|
-
const
|
|
6
|
+
const n = /* @__PURE__ */ new Map();
|
|
7
7
|
let t = e.prototype;
|
|
8
8
|
for (; t.constructor !== Object; )
|
|
9
9
|
Object.entries(Object.getOwnPropertyDescriptors(t)).forEach(([f, r]) => {
|
|
10
|
-
const i =
|
|
11
|
-
i !== r && (r != null && r.get || r != null && r.set) && (i != null && i.get && (r.get = i == null ? void 0 : i.get), i != null && i.set && (r.set = i == null ? void 0 : i.set),
|
|
10
|
+
const i = n.get(f);
|
|
11
|
+
i !== r && (r != null && r.get || r != null && r.set) && (i != null && i.get && (r.get = i == null ? void 0 : i.get), i != null && i.set && (r.set = i == null ? void 0 : i.set), n.set(f, r));
|
|
12
12
|
}), t = Object.getPrototypeOf(t);
|
|
13
|
-
return d.set(e,
|
|
13
|
+
return d.set(e, n), n;
|
|
14
14
|
}
|
|
15
|
-
function E(e, ...
|
|
15
|
+
function E(e, ...n) {
|
|
16
16
|
var i, O;
|
|
17
|
-
const t = D(e), f = t != null && t.size ? {} : null, r = v(new e(...
|
|
18
|
-
for (const [
|
|
19
|
-
((i = e == null ? void 0 : e.ivue) == null ? void 0 : i[
|
|
17
|
+
const t = D(e), f = t != null && t.size ? {} : null, r = v(new e(...n));
|
|
18
|
+
for (const [o, p] of t)
|
|
19
|
+
((i = e == null ? void 0 : e.ivue) == null ? void 0 : i[o]) !== !1 && Object.defineProperty(r, o, { get: p.get ? () => {
|
|
20
20
|
var u, g;
|
|
21
|
-
return
|
|
22
|
-
} : void 0, set: (O =
|
|
23
|
-
return Object.defineProperty(r, "toRefs", { get: () => function(
|
|
24
|
-
return function(g) {
|
|
25
|
-
var
|
|
26
|
-
const
|
|
27
|
-
if (Array.isArray(g)
|
|
21
|
+
return o in f ? f[o] : f[o] = b({ get: (u = p.get) == null ? void 0 : u.bind(r), set: (g = p.set) == null ? void 0 : g.bind(r) });
|
|
22
|
+
} : void 0, set: (O = p.set) == null ? void 0 : O.bind(r), enumerable: !1 });
|
|
23
|
+
return Object.defineProperty(r, "toRefs", { get: () => function(o, p, u) {
|
|
24
|
+
return function(g, R) {
|
|
25
|
+
var j, w;
|
|
26
|
+
const l = {};
|
|
27
|
+
if (Array.isArray(g))
|
|
28
28
|
for (let a = 0; a < g.length; a++) {
|
|
29
29
|
const s = g[a];
|
|
30
|
-
if (
|
|
30
|
+
if (p.has(s))
|
|
31
31
|
if (s in u)
|
|
32
|
-
|
|
32
|
+
l[s] = u[s];
|
|
33
33
|
else {
|
|
34
|
-
const c =
|
|
35
|
-
|
|
34
|
+
const c = p.get(s);
|
|
35
|
+
l[s] = u[s] = b({ get: (j = c == null ? void 0 : c.get) == null ? void 0 : j.bind(o), set: (w = c == null ? void 0 : c.set) == null ? void 0 : w.bind(o) });
|
|
36
36
|
}
|
|
37
37
|
else
|
|
38
|
-
typeof
|
|
38
|
+
typeof o[s] == "function" ? l[s] = o[s].bind(o) : l[s] = m(o, s);
|
|
39
39
|
}
|
|
40
40
|
else {
|
|
41
|
-
let a = new Set(C(
|
|
42
|
-
|
|
43
|
-
var
|
|
44
|
-
|
|
41
|
+
let a = new Set(C(o));
|
|
42
|
+
p.forEach((s, c) => {
|
|
43
|
+
var h, P;
|
|
44
|
+
l[c] = c in u ? u[c] : u[c] = b({ get: (h = s.get) == null ? void 0 : h.bind(o), set: (P = s.set) == null ? void 0 : P.bind(o) }), a == null || a.delete(c);
|
|
45
45
|
}), a.forEach((s) => {
|
|
46
|
-
typeof
|
|
46
|
+
typeof o[s] == "function" ? l[s] = o[s].bind(o) : l[s] = m(o, s);
|
|
47
47
|
}), a = null;
|
|
48
48
|
}
|
|
49
|
-
return
|
|
49
|
+
return l;
|
|
50
50
|
};
|
|
51
51
|
}(r, t, f), enumerable: !1 }), "init" in r && r.init(), r;
|
|
52
52
|
}
|
|
@@ -54,35 +54,35 @@ const y = /* @__PURE__ */ new Map();
|
|
|
54
54
|
function C(e) {
|
|
55
55
|
if (y.has(e.constructor))
|
|
56
56
|
return y.get(e.constructor);
|
|
57
|
-
const
|
|
57
|
+
const n = e.constructor, t = /* @__PURE__ */ new Set();
|
|
58
58
|
do
|
|
59
59
|
Object.getOwnPropertyNames(e).forEach((f) => {
|
|
60
60
|
["caller", "callee", "arguments", "constructor"].includes(f) || t.add(f);
|
|
61
61
|
}), e = Object.getPrototypeOf(e);
|
|
62
62
|
while (e.constructor !== Object);
|
|
63
|
-
return y.set(
|
|
63
|
+
return y.set(n, t), t;
|
|
64
64
|
}
|
|
65
|
-
const
|
|
66
|
-
function
|
|
67
|
-
return M(e) ? E(e, ...
|
|
65
|
+
const x = A;
|
|
66
|
+
function z(e, ...n) {
|
|
67
|
+
return typeof e == "function" ? M(e) ? E(e, ...n).toRefs() : e(...n) : e;
|
|
68
68
|
}
|
|
69
69
|
function M(e) {
|
|
70
|
-
var
|
|
71
|
-
return typeof e == "function" && !!e.prototype && !((
|
|
70
|
+
var n;
|
|
71
|
+
return typeof e == "function" && !!e.prototype && !((n = Object.getOwnPropertyDescriptor(e, "prototype")) != null && n.writable);
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
for (const t in
|
|
75
|
-
typeof (e == null ? void 0 : e[t]) == "object" && (e == null ? void 0 : e[t]) !== null || M(e == null ? void 0 : e[t]) ?
|
|
76
|
-
return
|
|
73
|
+
function N(e, n) {
|
|
74
|
+
for (const t in n)
|
|
75
|
+
typeof (e == null ? void 0 : e[t]) == "object" && (e == null ? void 0 : e[t]) !== null || M(e == null ? void 0 : e[t]) ? n[t].default = () => e == null ? void 0 : e[t] : n[t].default = e == null ? void 0 : e[t];
|
|
76
|
+
return n;
|
|
77
77
|
}
|
|
78
78
|
export {
|
|
79
79
|
d as descriptorsMap,
|
|
80
80
|
D as getAllClassDescriptors,
|
|
81
81
|
C as getAllClassProperties,
|
|
82
|
-
|
|
82
|
+
x as iref,
|
|
83
83
|
M as isClass,
|
|
84
|
-
|
|
84
|
+
z as iuse,
|
|
85
85
|
E as ivue,
|
|
86
86
|
y as propsMap,
|
|
87
|
-
|
|
87
|
+
N as propsWithDefaults
|
|
88
88
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(c,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],u):u((c=typeof globalThis<"u"?globalThis:c||self).ivue={},c.Vue)})(this,function(c,u){"use strict";const y=new Map;function j(t){if(y.has(t))return y.get(t);const r=new Map;let e=t.prototype;for(;e.constructor!==Object;)Object.entries(Object.getOwnPropertyDescriptors(e)).forEach(([p,n])=>{const i=r.get(p);i!==n&&(n!=null&&n.get||n!=null&&n.set)&&(i!=null&&i.get&&(n.get=i==null?void 0:i.get),i!=null&&i.set&&(n.set=i==null?void 0:i.set),r.set(p,n))}),e=Object.getPrototypeOf(e);return y.set(t,r),r}function w(t,...r){var i,P;const e=j(t),p=e!=null&&e.size?{}:null,n=u.reactive(new t(...r));for(const[s,d]of e)((i=t==null?void 0:t.ivue)==null?void 0:i[s])!==!1&&Object.defineProperty(n,s,{get:d.get?()=>{var l,b;return s in p?p[s]:p[s]=u.computed({get:(l=d.get)==null?void 0:l.bind(n),set:(b=d.set)==null?void 0:b.bind(n)})}:void 0,set:(P=d.set)==null?void 0:P.bind(n),enumerable:!1});return Object.defineProperty(n,"toRefs",{get:()=>function(s,d,l){return function(b,R){var v,M;const g={};if(Array.isArray(b))for(let a=0;a<b.length;a++){const o=b[a];if(d.has(o))if(o in l)g[o]=l[o];else{const f=d.get(o);g[o]=l[o]=u.computed({get:(v=f==null?void 0:f.get)==null?void 0:v.bind(s),set:(M=f==null?void 0:f.set)==null?void 0:M.bind(s)})}else typeof s[o]=="function"?g[o]=s[o].bind(s):g[o]=u.toRef(s,o)}else{let a=new Set(m(s));d.forEach((o,f)=>{var A,D;g[f]=f in l?l[f]:l[f]=u.computed({get:(A=o.get)==null?void 0:A.bind(s),set:(D=o.set)==null?void 0:D.bind(s)}),a==null||a.delete(f)}),a.forEach(o=>{typeof s[o]=="function"?g[o]=s[o].bind(s):g[o]=u.toRef(s,o)}),a=null}return g}}(n,e,p),enumerable:!1}),"init"in n&&n.init(),n}const O=new Map;function m(t){if(O.has(t.constructor))return O.get(t.constructor);const r=t.constructor,e=new Set;do Object.getOwnPropertyNames(t).forEach(p=>{["caller","callee","arguments","constructor"].includes(p)||e.add(p)}),t=Object.getPrototypeOf(t);while(t.constructor!==Object);return O.set(r,e),e}const E=u.ref;function h(t){var r;return typeof t=="function"&&!!t.prototype&&!((r=Object.getOwnPropertyDescriptor(t,"prototype"))!=null&&r.writable)}c.descriptorsMap=y,c.getAllClassDescriptors=j,c.getAllClassProperties=m,c.iref=E,c.isClass=h,c.iuse=function(t,...r){return typeof t=="function"?h(t)?w(t,...r).toRefs():t(...r):t},c.ivue=w,c.propsMap=O,c.propsWithDefaults=function(t,r){for(const e in r)typeof(t==null?void 0:t[e])=="object"&&(t==null?void 0:t[e])!==null||h(t==null?void 0:t[e])?r[e].default=()=>t==null?void 0:t[e]:r[e].default=t==null?void 0:t[e];return r},Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
|
package/dist/src/ivue.d.ts
CHANGED
|
@@ -12,9 +12,15 @@ export interface ExtendWithToRefs<T extends AnyClass> {
|
|
|
12
12
|
toRefs: IVueToRefsFn<T>;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
* Type definition for `.toRefs()` method converts reactive class properties to composable .value properties.
|
|
16
|
+
* But if unwrap = true is specified, the refs will be unwrapped refs available to be merged with the the root class properties.
|
|
17
|
+
*/
|
|
18
|
+
export interface IVueToRefsFn<T extends AnyClass> {
|
|
19
|
+
<P extends keyof InstanceType<T>, B extends boolean>(props: P[], unwrap?: B): B extends true ? Pick<InstanceType<T>, P> : Pick<IVueRefs<InstanceType<T>>, P>;
|
|
20
|
+
(props: true): InstanceType<T>;
|
|
21
|
+
(props: false): IVueRefs<InstanceType<T>>;
|
|
22
|
+
(): IVueRefs<InstanceType<T>>;
|
|
23
|
+
}
|
|
18
24
|
/**
|
|
19
25
|
* Converts a class properties to a composable .value Refs using ToRef vue type,
|
|
20
26
|
* also knows NOT to convert functions to .value Refs but to leave them as is.
|
|
@@ -154,23 +160,28 @@ export declare const propsMap: Map<object, Set<string> | any>;
|
|
|
154
160
|
*/
|
|
155
161
|
export declare function getAllClassProperties(obj: object): Set<string>;
|
|
156
162
|
/**
|
|
157
|
-
* `iref()` is an alias for Vue ref() function but returns an
|
|
158
|
-
* `iref()` does not alter the behavior of ref(), but simply transforms the type to an
|
|
163
|
+
* `iref()` is an alias for Vue ref() function but returns an unwrap type without the .value
|
|
164
|
+
* `iref()` does not alter the behavior of ref(), but simply transforms the type to an unwrap raw value.
|
|
159
165
|
* @param val T
|
|
160
166
|
* @returns {UnwrapRef<T>}
|
|
161
167
|
*/
|
|
162
|
-
export declare const iref: <T = any>(value
|
|
168
|
+
export declare const iref: <T = any>(value?: T | undefined) => T;
|
|
163
169
|
/**
|
|
164
|
-
*
|
|
170
|
+
* Three modes of operation:
|
|
165
171
|
* 1. `iuse(useComposable(arg, arg2, arg3, ...))` converts the return types of a Composable / Ref to pure raw type definition.
|
|
166
|
-
* Returns for all properties of an object an
|
|
172
|
+
* Returns for all properties of an object an unwrap raw type definition,
|
|
167
173
|
* unwraps direct Refs & ComputedRefs as well down to their raw types.
|
|
168
174
|
*
|
|
169
|
-
* 2. `iuse(
|
|
170
|
-
*
|
|
171
|
-
*
|
|
175
|
+
* 2. `iuse(useComposable, arg, arg2, arg3, ...)` for cleaner syntax for #1, it does exactly the same thing but
|
|
176
|
+
* here the TypeScript inference works for composable function arguments to assist you with intellisence,
|
|
177
|
+
* like they work for constructor arguments in the cause of `ivue()` core function,
|
|
178
|
+
* making the API cleaner to look at and make it compatible with how this function operates with classes, see #3.
|
|
179
|
+
*
|
|
180
|
+
* 3. `iuse(AnyClass, ...args)` If AnyClass is supplied and that class's arguments into `iuse(AnyClass, ...args)`,
|
|
181
|
+
* it returns an 'ivue(AnyClass, ...args).toRefs()` object for all properties but casts
|
|
182
|
+
* their types as raw (no-Ref) types to fit with reactive() structure of the ivue class context.
|
|
172
183
|
*/
|
|
173
|
-
export declare function iuse<T extends AnyClass | Object>(
|
|
184
|
+
export declare function iuse<T extends AnyClass | AnyFn | Object | any>(classFunctionObject?: T, ...args: T extends AnyClass ? InferredArgs<T> : T extends AnyFn ? Parameters<T extends (...args: any[]) => any ? T : any> : any): T extends AnyClass ? InstanceType<T> : T extends AnyFn ? UseComposable<T> : UnwrapComposableReturn<T>;
|
|
174
185
|
/**
|
|
175
186
|
* Vue props interface in defineComponent() style.
|
|
176
187
|
*/
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
<meta name="generator" content="VitePress v1.3.2">
|
|
9
9
|
<link rel="preload stylesheet" href="/ivue/assets/style.Dtxde_a0.css" as="style">
|
|
10
10
|
|
|
11
|
-
<script type="module" src="/ivue/assets/app.
|
|
11
|
+
<script type="module" src="/ivue/assets/app.2nR_jJ6K.js"></script>
|
|
12
12
|
<link rel="preload" href="/ivue/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
|
|
13
13
|
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
|
|
14
14
|
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
17
17
|
<div id="app"></div>
|
|
18
|
-
<script>window.__VP_HASH_MAP__=JSON.parse("{\"api_ivue.md\":\"DyFbv52x\",\"api_propswithdefaults.md\":\"C6C7ZBZl\",\"index.md\":\"D-9TpgnJ\",\"pages_advanced-usage.md\":\"DsU0E8Oi\",\"pages_api.md\":\"CElVfYwg\",\"pages_browse-code.md\":\"
|
|
18
|
+
<script>window.__VP_HASH_MAP__=JSON.parse("{\"api_ivue.md\":\"DyFbv52x\",\"api_propswithdefaults.md\":\"C6C7ZBZl\",\"index.md\":\"D-9TpgnJ\",\"pages_advanced-usage.md\":\"DsU0E8Oi\",\"pages_api.md\":\"CElVfYwg\",\"pages_browse-code.md\":\"D-gTrMhG\",\"pages_getting-started.md\":\"COvbcFGT\",\"pages_guidelines.md\":\"BI1PexCc\",\"pages_how-it-works.md\":\"NImDvDby\",\"pages_how-its-made.md\":\"CCol99CD\",\"pages_introduction.md\":\"CCkiQtfX\",\"pages_usage.md\":\"DRJXyExt\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"VitePress\",\"titleTemplate\":\":title | Infinite Vue ∞ ivue\",\"description\":\"A VitePress site\",\"base\":\"/ivue/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"outline\":\"deep\",\"siteTitle\":\"ivue ∞ Infinite Vue\",\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/infinite-system/ivue\"},{\"icon\":\"twitter\",\"link\":\"https://x.com/evgenykalash\"}],\"search\":{\"provider\":\"local\"},\"sidebar\":[{\"collapsed\":false,\"text\":\"Guide\",\"items\":[{\"text\":\"What is ivue?\",\"link\":\"/pages/introduction\"},{\"text\":\"How it works?\",\"link\":\"/pages/how-it-works\"},{\"text\":\"Getting Started\",\"link\":\"/pages/getting-started\"}]},{\"collapsed\":false,\"text\":\"Usage\",\"items\":[{\"text\":\"Basic Usage\",\"link\":\"/pages/usage#basic-usage\"},{\"text\":\"Using Props\",\"link\":\"/pages/usage#using-props\"},{\"text\":\"Using Emits\",\"link\":\"/pages/usage#using-emits\"},{\"text\":\"Using Refs\",\"link\":\"/pages/usage#using-refs\"},{\"text\":\"Using Define Expose\",\"link\":\"/pages/usage#using-define-expose\"},{\"text\":\"Using Composables\",\"link\":\"/pages/usage#using-composables\"},{\"text\":\"Using Inside Composables\",\"link\":\"/pages/usage#using-inside-composables\"},{\"text\":\"Using Computeds\",\"link\":\"/pages/usage#using-computeds\"},{\"text\":\"Using Watch\",\"link\":\"/pages/usage#using-watch\"},{\"text\":\"Using Lifecycle Hooks\",\"link\":\"/pages/usage#using-lifecycle-hooks\"},{\"text\":\"Using Pinia Store\",\"link\":\"/pages/usage#using-pinia-store\"},{\"text\":\"Using Quasar Framework\",\"link\":\"/pages/usage#using-quasar-framework\"}]},{\"collapsed\":false,\"text\":\"Guidelines\",\"items\":[{\"text\":\"Dos and Don'ts\",\"link\":\"/pages/guidelines#dos-and-don-ts\"},{\"text\":\"constructor() vs .init()\",\"link\":\"/pages/guidelines#constructor-vs-init\"},{\"text\":\"Unwrapping Refs\",\"link\":\"/pages/guidelines#unwrapping-refs\"},{\"text\":\"Naming Conventions\",\"link\":\"/pages/guidelines#naming-conventions\"}]},{\"collapsed\":false,\"text\":\"Advanced Usage\",\"items\":[{\"text\":\"Extend Props Defaults\",\"link\":\"/pages/advanced-usage#extend-props-defaults\"},{\"text\":\"Extend Props\",\"link\":\"/pages/advanced-usage#extend-props\"},{\"text\":\"Extend Emits\",\"link\":\"/pages/advanced-usage#extend-emits\"},{\"text\":\"Extend Slots\",\"link\":\"/pages/advanced-usage#extend-slots\"},{\"text\":\"Extend Classes\",\"link\":\"/pages/advanced-usage#extend-classes\"},{\"text\":\"Extend Components\",\"link\":\"/pages/advanced-usage#extend-components\"}]},{\"text\":\"API\"},{\"collapsed\":false,\"text\":\"Core Functions\",\"items\":[{\"text\":\"ivue()\",\"link\":\"/pages/api#ivue\"},{\"text\":\"iref()\",\"link\":\"/pages/api#iref\"},{\"text\":\"iuse()\",\"link\":\"/pages/api#iuse\"},{\"text\":\".init()\",\"link\":\"/pages/api#init\"},{\"text\":\".toRefs()\",\"link\":\"/pages/api#torefs\"}]},{\"collapsed\":false,\"text\":\"Utility Functions\",\"items\":[{\"text\":\"propsWithDefaults()\",\"link\":\"/pages/api#propswithdefaults\"}]},{\"collapsed\":false,\"text\":\"Utility Types\",\"items\":[{\"text\":\"ExtractPropDefaultTypes\",\"link\":\"/pages/api#extractpropdefaulttypes\"},{\"text\":\"ExtractEmitTypes\",\"link\":\"/pages/api#extractemittypes\"},{\"text\":\"ExtendSlots\",\"link\":\"/pages/api#extendslots\"},{\"text\":\"UseComposable\",\"link\":\"/pages/api#UseComposable\"}]},{\"collapsed\":false,\"text\":\"Source Code\",\"items\":[{\"text\":\"Browse Code\",\"link\":\"/pages/browse-code\"}]}]},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
|
19
19
|
|
|
20
20
|
</body>
|
|
21
21
|
</html>
|