vue 3.2.23 → 3.2.27
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/vue.esm-browser.js +6535 -6483
- package/dist/vue.esm-browser.prod.js +1 -1
- package/dist/vue.global.js +6534 -6482
- package/dist/vue.global.prod.js +1 -1
- package/dist/vue.runtime.esm-browser.js +6475 -6430
- package/dist/vue.runtime.esm-browser.prod.js +1 -1
- package/dist/vue.runtime.global.js +6475 -6430
- package/dist/vue.runtime.global.prod.js +1 -1
- package/macros-global.d.ts +19 -0
- package/macros.d.ts +106 -0
- package/package.json +12 -8
- package/ref-macros.d.ts +2 -98
package/ref-macros.d.ts
CHANGED
|
@@ -1,98 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
UnwrapRef,
|
|
4
|
-
ComputedRef,
|
|
5
|
-
WritableComputedOptions,
|
|
6
|
-
DebuggerOptions,
|
|
7
|
-
WritableComputedRef
|
|
8
|
-
} from '@vue/runtime-dom'
|
|
9
|
-
|
|
10
|
-
declare const RefType: unique symbol
|
|
11
|
-
|
|
12
|
-
declare const enum RefTypes {
|
|
13
|
-
Ref = 1,
|
|
14
|
-
ComputedRef = 2,
|
|
15
|
-
WritableComputedRef = 3
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
type RefValue<T> = T extends null | undefined
|
|
19
|
-
? T
|
|
20
|
-
: T & { [RefType]?: RefTypes.Ref }
|
|
21
|
-
|
|
22
|
-
type ComputedRefValue<T> = T extends null | undefined
|
|
23
|
-
? T
|
|
24
|
-
: T & { [RefType]?: RefTypes.ComputedRef }
|
|
25
|
-
|
|
26
|
-
type WritableComputedRefValue<T> = T extends null | undefined
|
|
27
|
-
? T
|
|
28
|
-
: T & { [RefType]?: RefTypes.WritableComputedRef }
|
|
29
|
-
|
|
30
|
-
type NormalObject<T extends object> = T & { [RefType]?: never }
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Vue ref transform macro for binding refs as reactive variables.
|
|
34
|
-
*/
|
|
35
|
-
declare function _$<T>(arg: ComputedRef<T>): ComputedRefValue<T>
|
|
36
|
-
declare function _$<T>(arg: WritableComputedRef<T>): WritableComputedRefValue<T>
|
|
37
|
-
declare function _$<T>(arg: Ref<T>): RefValue<T>
|
|
38
|
-
declare function _$<T extends object>(arg?: T): DestructureRefs<T>
|
|
39
|
-
|
|
40
|
-
type DestructureRefs<T extends object> = {
|
|
41
|
-
[K in keyof T]: T[K] extends ComputedRef<infer V>
|
|
42
|
-
? ComputedRefValue<V>
|
|
43
|
-
: T[K] extends WritableComputedRef<infer V>
|
|
44
|
-
? WritableComputedRefValue<V>
|
|
45
|
-
: T[K] extends Ref<infer V>
|
|
46
|
-
? RefValue<V>
|
|
47
|
-
: T[K]
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Vue ref transform macro for accessing underlying refs of reactive varaibles.
|
|
52
|
-
*/
|
|
53
|
-
declare function _$$<T extends object>(arg: NormalObject<T>): ToRawRefs<T>
|
|
54
|
-
declare function _$$<T>(value: RefValue<T>): Ref<T>
|
|
55
|
-
declare function _$$<T>(value: ComputedRefValue<T>): ComputedRef<T>
|
|
56
|
-
declare function _$$<T>(
|
|
57
|
-
value: WritableComputedRefValue<T>
|
|
58
|
-
): WritableComputedRef<T>
|
|
59
|
-
|
|
60
|
-
type ToRawRefs<T extends object> = {
|
|
61
|
-
[K in keyof T]: T[K] extends RefValue<infer V>
|
|
62
|
-
? Ref<V>
|
|
63
|
-
: T[K] extends ComputedRefValue<infer V>
|
|
64
|
-
? ComputedRef<V>
|
|
65
|
-
: T[K] extends WritableComputedRefValue<infer V>
|
|
66
|
-
? WritableComputedRef<V>
|
|
67
|
-
: T[K] extends object
|
|
68
|
-
? T[K] extends
|
|
69
|
-
| Function
|
|
70
|
-
| Map<any, any>
|
|
71
|
-
| Set<any>
|
|
72
|
-
| WeakMap<any, any>
|
|
73
|
-
| WeakSet<any>
|
|
74
|
-
? T[K]
|
|
75
|
-
: ToRawRefs<T[K]>
|
|
76
|
-
: T[K]
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
declare function _$ref<T>(arg?: T | Ref<T>): RefValue<UnwrapRef<T>>
|
|
80
|
-
|
|
81
|
-
declare function _$shallowRef<T>(arg?: T): RefValue<T>
|
|
82
|
-
|
|
83
|
-
declare function _$computed<T>(
|
|
84
|
-
getter: () => T,
|
|
85
|
-
debuggerOptions?: DebuggerOptions
|
|
86
|
-
): ComputedRefValue<T>
|
|
87
|
-
declare function _$computed<T>(
|
|
88
|
-
options: WritableComputedOptions<T>,
|
|
89
|
-
debuggerOptions?: DebuggerOptions
|
|
90
|
-
): WritableComputedRefValue<T>
|
|
91
|
-
|
|
92
|
-
declare global {
|
|
93
|
-
const $: typeof _$
|
|
94
|
-
const $$: typeof _$$
|
|
95
|
-
const $ref: typeof _$ref
|
|
96
|
-
const $shallowRef: typeof _$shallowRef
|
|
97
|
-
const $computed: typeof _$computed
|
|
98
|
-
}
|
|
1
|
+
// TODO deprecated file - to be removed when out of experimental
|
|
2
|
+
import './macros-global'
|