@vue/runtime-core 3.6.0-rc.1 → 3.6.0-rc.10
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/runtime-core.cjs.js +673 -457
- package/dist/runtime-core.cjs.prod.js +527 -378
- package/dist/runtime-core.d.ts +608 -608
- package/dist/runtime-core.esm-bundler.js +688 -459
- package/package.json +3 -3
package/dist/runtime-core.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComputedGetter, ComputedGetter as ComputedGetter$1, ComputedRef, ComputedSetter, CustomRefFactory, DebuggerEvent, DebuggerEvent as DebuggerEvent$1, DebuggerEventExtraInfo, DebuggerOptions, DebuggerOptions as DebuggerOptions$1, DeepReadonly, EffectScheduler, EffectScope, MaybeRef, MaybeRefOrGetter, OnCleanup, Raw, Reactive, ReactiveEffect, ReactiveEffect as ReactiveEffect$1, ReactiveEffectOptions, ReactiveEffectRunner, ReactiveFlags, ReactiveMarker, Ref, Ref as Ref$1, ShallowReactive, ShallowRef, ShallowRef as ShallowRef$1, ShallowUnwrapRef, ShallowUnwrapRef as ShallowUnwrapRef$1, ToRef, ToRefs, TrackOpTypes, TriggerOpTypes, UnwrapNestedRefs, UnwrapNestedRefs as UnwrapNestedRefs$1, UnwrapRef, WatchCallback, WatchCallback as WatchCallback$1, WatchEffect, WatchEffect as WatchEffect$1, WatchErrorCodes, WatchHandle, WatchHandle as WatchHandle$1, WatchSource, WatchSource as WatchSource$1, WatchStopHandle, WritableComputedOptions, WritableComputedOptions as WritableComputedOptions$1, WritableComputedRef, computed as computed$1, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, reactive as reactive$1, readonly, ref as ref$1, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from "@vue/reactivity";
|
|
2
2
|
import { IfAny, IsKeyValues, LooseRequired, OverloadParameters, Prettify, UnionToIntersection, camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from "@vue/shared";
|
|
3
|
-
|
|
4
3
|
//#region temp/packages/runtime-core/src/apiComputed.d.ts
|
|
5
4
|
export declare const computed: typeof computed$1;
|
|
6
5
|
//#endregion
|
|
@@ -15,7 +14,7 @@ export type SlotsType<T extends Record<string, any> = Record<string, any>> = {
|
|
|
15
14
|
[SlotSymbol]?: T;
|
|
16
15
|
};
|
|
17
16
|
type StrictUnwrapSlotsType<S extends SlotsType, T = NonNullable<S[typeof SlotSymbol]>> = [keyof S] extends [never] ? Slots : Readonly<T> & T;
|
|
18
|
-
type UnwrapSlotsType<S extends SlotsType, T = NonNullable<S[typeof SlotSymbol]>> = [keyof S] extends [never] ? Slots : Readonly<Prettify<{ [K in keyof T]: NonNullable<T[K]> extends ((...args: any[]) => any) ? T[K] : Slot<T[K]
|
|
17
|
+
type UnwrapSlotsType<S extends SlotsType, T = NonNullable<S[typeof SlotSymbol]>> = [keyof S] extends [never] ? Slots : Readonly<Prettify<{ [K in keyof T]: NonNullable<T[K]> extends ((...args: any[]) => any) ? T[K] : Slot<T[K]>; }>>;
|
|
19
18
|
type RawSlots = {
|
|
20
19
|
[name: string]: unknown;
|
|
21
20
|
$stable?: boolean;
|
|
@@ -25,34 +24,39 @@ type RawSlots = {
|
|
|
25
24
|
declare enum SchedulerJobFlags {
|
|
26
25
|
QUEUED = 1,
|
|
27
26
|
/**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
27
|
+
* Indicates whether the effect is allowed to recursively trigger itself
|
|
28
|
+
* when managed by the scheduler.
|
|
29
|
+
*
|
|
30
|
+
* By default, a job cannot trigger itself because some built-in method calls,
|
|
31
|
+
* e.g. Array.prototype.push actually performs reads as well (#1740) which
|
|
32
|
+
* can lead to confusing infinite loops.
|
|
33
|
+
* The allowed cases are component update functions and watch callbacks.
|
|
34
|
+
* Component update functions may update child component props, which in turn
|
|
35
|
+
* trigger flush: "pre" watch callbacks that mutates state that the parent
|
|
36
|
+
* relies on (#1801). Watch callbacks doesn't track its dependencies so if it
|
|
37
|
+
* triggers itself again, it's likely intentional and it is the user's
|
|
38
|
+
* responsibility to perform recursive state mutation that eventually
|
|
39
|
+
* stabilizes (#1727).
|
|
40
|
+
*/
|
|
42
41
|
ALLOW_RECURSE = 2,
|
|
43
|
-
DISPOSED = 4
|
|
42
|
+
DISPOSED = 4,
|
|
43
|
+
/**
|
|
44
|
+
* Requeue a Suspense effect if its pending branch is discarded.
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
REQUEUE_ON_SUSPENSE_DISCARD = 8
|
|
44
48
|
}
|
|
45
49
|
export interface SchedulerJob extends Function {
|
|
46
50
|
order?: number;
|
|
47
51
|
/**
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
52
|
+
* flags can technically be undefined, but it can still be used in bitwise
|
|
53
|
+
* operations just like 0.
|
|
54
|
+
*/
|
|
51
55
|
flags?: SchedulerJobFlags;
|
|
52
56
|
/**
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
57
|
+
* Attached by renderer.ts when setting up a component's render effect
|
|
58
|
+
* Used to obtain component information when reporting max recursive updates.
|
|
59
|
+
*/
|
|
56
60
|
i?: GenericComponentInstance;
|
|
57
61
|
}
|
|
58
62
|
type SchedulerJobs = SchedulerJob | SchedulerJob[];
|
|
@@ -62,7 +66,7 @@ export declare function queuePostFlushCb(jobs: SchedulerJobs, id?: number): void
|
|
|
62
66
|
//#endregion
|
|
63
67
|
//#region temp/packages/runtime-core/src/componentProps.d.ts
|
|
64
68
|
export type ComponentPropsOptions<P = Data> = ComponentObjectPropsOptions<P> | string[];
|
|
65
|
-
export type ComponentObjectPropsOptions<P = Data> = { [K in keyof P]: Prop<P[K]> | null };
|
|
69
|
+
export type ComponentObjectPropsOptions<P = Data> = { [K in keyof P]: Prop<P[K]> | null; };
|
|
66
70
|
export type Prop<T, D = T> = PropOptions<T, D> | PropType<T>;
|
|
67
71
|
type DefaultFactory<T> = (props: Data) => T | null | undefined;
|
|
68
72
|
interface PropOptions<T = any, D = T> {
|
|
@@ -77,11 +81,11 @@ type PropConstructor<T = any> = {
|
|
|
77
81
|
} | {
|
|
78
82
|
(): T;
|
|
79
83
|
} | PropMethod<T>;
|
|
80
|
-
type PropMethod<T, TConstructor = any> =
|
|
84
|
+
type PropMethod<T, TConstructor = any> = {
|
|
81
85
|
new (): TConstructor;
|
|
82
86
|
(): T;
|
|
83
87
|
readonly prototype: TConstructor;
|
|
84
|
-
}
|
|
88
|
+
};
|
|
85
89
|
type RequiredKeys<T> = { [K in keyof T]: T[K] extends {
|
|
86
90
|
required: true;
|
|
87
91
|
} | {
|
|
@@ -90,7 +94,7 @@ type RequiredKeys<T> = { [K in keyof T]: T[K] extends {
|
|
|
90
94
|
type: BooleanConstructor;
|
|
91
95
|
} ? T[K] extends {
|
|
92
96
|
default: undefined | (() => undefined);
|
|
93
|
-
} ? never : K : never }[keyof T];
|
|
97
|
+
} ? never : K : never; }[keyof T];
|
|
94
98
|
type OptionalKeys<T> = Exclude<keyof T, RequiredKeys<T>>;
|
|
95
99
|
type DefaultKeys<T> = { [K in keyof T]: T[K] extends {
|
|
96
100
|
default: any;
|
|
@@ -99,7 +103,7 @@ type DefaultKeys<T> = { [K in keyof T]: T[K] extends {
|
|
|
99
103
|
} ? T[K] extends {
|
|
100
104
|
type: BooleanConstructor;
|
|
101
105
|
required: true;
|
|
102
|
-
} ? never : K : never }[keyof T];
|
|
106
|
+
} ? never : K : never; }[keyof T];
|
|
103
107
|
type InferPropType<T, NullAsAny = true> = [T] extends [null] ? NullAsAny extends true ? any : null : [T] extends [{
|
|
104
108
|
type: null | true;
|
|
105
109
|
}] ? any : [T] extends [ObjectConstructor | {
|
|
@@ -110,171 +114,171 @@ type InferPropType<T, NullAsAny = true> = [T] extends [null] ? NullAsAny extends
|
|
|
110
114
|
type: DateConstructor;
|
|
111
115
|
}] ? Date : [T] extends [(infer U)[] | {
|
|
112
116
|
type: (infer U)[];
|
|
113
|
-
}] ? U extends DateConstructor ? Date | InferPropType<U, false> : InferPropType<U, false> : [T] extends [Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? IfAny<V, V, D> : V : V : T;
|
|
117
|
+
}] ? U extends DateConstructor ? Date | InferPropType<U, false> : InferPropType<U, false> : [T] extends [Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? IfAny<V, V, unknown extends D ? V : D> : V : V : T;
|
|
114
118
|
/**
|
|
115
|
-
* Extract prop types from a runtime props options object.
|
|
116
|
-
* The extracted types are **internal** - i.e. the resolved props received by
|
|
117
|
-
* the component.
|
|
118
|
-
* - Boolean props are always present
|
|
119
|
-
* - Props with default values are always present
|
|
120
|
-
*
|
|
121
|
-
* To extract accepted props from the parent, use {@link ExtractPublicPropTypes}.
|
|
122
|
-
*/
|
|
119
|
+
* Extract prop types from a runtime props options object.
|
|
120
|
+
* The extracted types are **internal** - i.e. the resolved props received by
|
|
121
|
+
* the component.
|
|
122
|
+
* - Boolean props are always present
|
|
123
|
+
* - Props with default values are always present
|
|
124
|
+
*
|
|
125
|
+
* To extract accepted props from the parent, use {@link ExtractPublicPropTypes}.
|
|
126
|
+
*/
|
|
123
127
|
export type ExtractPropTypes<O> = { [K in keyof Pick<O, RequiredKeys<O>>]: O[K] extends {
|
|
124
128
|
default: any;
|
|
125
|
-
} ? Exclude<InferPropType<O[K]>, undefined> : InferPropType<O[K]
|
|
129
|
+
} ? Exclude<InferPropType<O[K]>, undefined> : InferPropType<O[K]>; } & { [K in keyof Pick<O, OptionalKeys<O>>]?: InferPropType<O[K]>; };
|
|
126
130
|
type PublicRequiredKeys<T> = { [K in keyof T]: T[K] extends {
|
|
127
131
|
required: true;
|
|
128
|
-
} ? K : never }[keyof T];
|
|
132
|
+
} ? K : never; }[keyof T];
|
|
129
133
|
type PublicOptionalKeys<T> = Exclude<keyof T, PublicRequiredKeys<T>>;
|
|
130
134
|
/**
|
|
131
|
-
* Extract prop types from a runtime props options object.
|
|
132
|
-
* The extracted types are **public** - i.e. the expected props that can be
|
|
133
|
-
* passed to component.
|
|
134
|
-
*/
|
|
135
|
-
export type ExtractPublicPropTypes<O> = { [K in keyof Pick<O, PublicRequiredKeys<O>>]: InferPropType<O[K]
|
|
135
|
+
* Extract prop types from a runtime props options object.
|
|
136
|
+
* The extracted types are **public** - i.e. the expected props that can be
|
|
137
|
+
* passed to component.
|
|
138
|
+
*/
|
|
139
|
+
export type ExtractPublicPropTypes<O> = { [K in keyof Pick<O, PublicRequiredKeys<O>>]: InferPropType<O[K]>; } & { [K in keyof Pick<O, PublicOptionalKeys<O>>]?: InferPropType<O[K]>; };
|
|
136
140
|
declare enum BooleanFlags {
|
|
137
141
|
shouldCast = 0,
|
|
138
142
|
shouldCastTrue = 1
|
|
139
143
|
}
|
|
140
|
-
export type ExtractDefaultPropTypes<O> = O extends object ? { [K in keyof Pick<O, DefaultKeys<O>>]: InferPropType<O[K]
|
|
144
|
+
export type ExtractDefaultPropTypes<O> = O extends object ? { [K in keyof Pick<O, DefaultKeys<O>>]: InferPropType<O[K]>; } : {};
|
|
141
145
|
type NormalizedProp = PropOptions & {
|
|
142
146
|
[BooleanFlags.shouldCast]?: boolean;
|
|
143
147
|
[BooleanFlags.shouldCastTrue]?: boolean;
|
|
144
148
|
};
|
|
145
149
|
/**
|
|
146
|
-
* normalized value is a tuple of the actual normalized options
|
|
147
|
-
* and an array of prop keys that need value casting (booleans and defaults)
|
|
148
|
-
*/
|
|
150
|
+
* normalized value is a tuple of the actual normalized options
|
|
151
|
+
* and an array of prop keys that need value casting (booleans and defaults)
|
|
152
|
+
*/
|
|
149
153
|
type NormalizedProps = Record<string, NormalizedProp>;
|
|
150
154
|
export type NormalizedPropsOptions = [NormalizedProps, string[]] | [];
|
|
151
155
|
//#endregion
|
|
152
156
|
//#region temp/packages/runtime-core/src/apiSetupHelpers.d.ts
|
|
153
157
|
/**
|
|
154
|
-
* Vue `<script setup>` compiler macro for declaring component props. The
|
|
155
|
-
* expected argument is the same as the component `props` option.
|
|
156
|
-
*
|
|
157
|
-
* Example runtime declaration:
|
|
158
|
-
* ```js
|
|
159
|
-
* // using Array syntax
|
|
160
|
-
* const props = defineProps(['foo', 'bar'])
|
|
161
|
-
* // using Object syntax
|
|
162
|
-
* const props = defineProps({
|
|
163
|
-
* foo: String,
|
|
164
|
-
* bar: {
|
|
165
|
-
* type: Number,
|
|
166
|
-
* required: true
|
|
167
|
-
* }
|
|
168
|
-
* })
|
|
169
|
-
* ```
|
|
170
|
-
*
|
|
171
|
-
* Equivalent type-based declaration:
|
|
172
|
-
* ```ts
|
|
173
|
-
* // will be compiled into equivalent runtime declarations
|
|
174
|
-
* const props = defineProps<{
|
|
175
|
-
* foo?: string
|
|
176
|
-
* bar: number
|
|
177
|
-
* }>()
|
|
178
|
-
* ```
|
|
179
|
-
*
|
|
180
|
-
* @see {@link https://vuejs.org/api/sfc-script-setup.html#defineprops-defineemits}
|
|
181
|
-
*
|
|
182
|
-
* This is only usable inside `<script setup>`, is compiled away in the
|
|
183
|
-
* output and should **not** be actually called at runtime.
|
|
184
|
-
*/
|
|
185
|
-
export declare function defineProps<PropNames extends string = string>(props: PropNames[]): Prettify<Readonly<{ [key in PropNames]?: any }>>;
|
|
158
|
+
* Vue `<script setup>` compiler macro for declaring component props. The
|
|
159
|
+
* expected argument is the same as the component `props` option.
|
|
160
|
+
*
|
|
161
|
+
* Example runtime declaration:
|
|
162
|
+
* ```js
|
|
163
|
+
* // using Array syntax
|
|
164
|
+
* const props = defineProps(['foo', 'bar'])
|
|
165
|
+
* // using Object syntax
|
|
166
|
+
* const props = defineProps({
|
|
167
|
+
* foo: String,
|
|
168
|
+
* bar: {
|
|
169
|
+
* type: Number,
|
|
170
|
+
* required: true
|
|
171
|
+
* }
|
|
172
|
+
* })
|
|
173
|
+
* ```
|
|
174
|
+
*
|
|
175
|
+
* Equivalent type-based declaration:
|
|
176
|
+
* ```ts
|
|
177
|
+
* // will be compiled into equivalent runtime declarations
|
|
178
|
+
* const props = defineProps<{
|
|
179
|
+
* foo?: string
|
|
180
|
+
* bar: number
|
|
181
|
+
* }>()
|
|
182
|
+
* ```
|
|
183
|
+
*
|
|
184
|
+
* @see {@link https://vuejs.org/api/sfc-script-setup.html#defineprops-defineemits}
|
|
185
|
+
*
|
|
186
|
+
* This is only usable inside `<script setup>`, is compiled away in the
|
|
187
|
+
* output and should **not** be actually called at runtime.
|
|
188
|
+
*/
|
|
189
|
+
export declare function defineProps<PropNames extends string = string>(props: PropNames[]): Prettify<Readonly<{ [key in PropNames]?: any; }>>;
|
|
186
190
|
export declare function defineProps<PP extends ComponentObjectPropsOptions = ComponentObjectPropsOptions>(props: PP): Prettify<Readonly<ExtractPropTypes<PP>>>;
|
|
187
191
|
export declare function defineProps<TypeProps>(): DefineProps<LooseRequired<TypeProps>, BooleanKey<TypeProps>>;
|
|
188
|
-
export type DefineProps<T, BKeys extends keyof T> = Readonly<T> & { readonly [K in BKeys]-?: boolean };
|
|
192
|
+
export type DefineProps<T, BKeys extends keyof T> = Readonly<T> & { readonly [K in BKeys]-?: boolean; };
|
|
189
193
|
type BooleanKey<T, K extends keyof T = keyof T> = K extends any ? T[K] extends boolean | undefined ? T[K] extends never | undefined ? never : K : never : never;
|
|
190
194
|
/**
|
|
191
|
-
* Vue `<script setup>` compiler macro for declaring a component's emitted
|
|
192
|
-
* events. The expected argument is the same as the component `emits` option.
|
|
193
|
-
*
|
|
194
|
-
* Example runtime declaration:
|
|
195
|
-
* ```js
|
|
196
|
-
* const emit = defineEmits(['change', 'update'])
|
|
197
|
-
* ```
|
|
198
|
-
*
|
|
199
|
-
* Example type-based declaration:
|
|
200
|
-
* ```ts
|
|
201
|
-
* const emit = defineEmits<{
|
|
202
|
-
* // <eventName>: <expected arguments>
|
|
203
|
-
* change: []
|
|
204
|
-
* update: [value: number] // named tuple syntax
|
|
205
|
-
* }>()
|
|
206
|
-
*
|
|
207
|
-
* emit('change')
|
|
208
|
-
* emit('update', 1)
|
|
209
|
-
* ```
|
|
210
|
-
*
|
|
211
|
-
* This is only usable inside `<script setup>`, is compiled away in the
|
|
212
|
-
* output and should **not** be actually called at runtime.
|
|
213
|
-
*
|
|
214
|
-
* @see {@link https://vuejs.org/api/sfc-script-setup.html#defineprops-defineemits}
|
|
215
|
-
*/
|
|
195
|
+
* Vue `<script setup>` compiler macro for declaring a component's emitted
|
|
196
|
+
* events. The expected argument is the same as the component `emits` option.
|
|
197
|
+
*
|
|
198
|
+
* Example runtime declaration:
|
|
199
|
+
* ```js
|
|
200
|
+
* const emit = defineEmits(['change', 'update'])
|
|
201
|
+
* ```
|
|
202
|
+
*
|
|
203
|
+
* Example type-based declaration:
|
|
204
|
+
* ```ts
|
|
205
|
+
* const emit = defineEmits<{
|
|
206
|
+
* // <eventName>: <expected arguments>
|
|
207
|
+
* change: []
|
|
208
|
+
* update: [value: number] // named tuple syntax
|
|
209
|
+
* }>()
|
|
210
|
+
*
|
|
211
|
+
* emit('change')
|
|
212
|
+
* emit('update', 1)
|
|
213
|
+
* ```
|
|
214
|
+
*
|
|
215
|
+
* This is only usable inside `<script setup>`, is compiled away in the
|
|
216
|
+
* output and should **not** be actually called at runtime.
|
|
217
|
+
*
|
|
218
|
+
* @see {@link https://vuejs.org/api/sfc-script-setup.html#defineprops-defineemits}
|
|
219
|
+
*/
|
|
216
220
|
export declare function defineEmits<EE extends string = string>(emitOptions: EE[]): EmitFn<EE[]>;
|
|
217
221
|
export declare function defineEmits<E extends EmitsOptions = EmitsOptions>(emitOptions: E): EmitFn<E>;
|
|
218
222
|
export declare function defineEmits<T extends ComponentTypeEmits>(): T extends ((...args: any[]) => any) ? T : ShortEmits<T>;
|
|
219
223
|
export type ComponentTypeEmits = ((...args: any[]) => any) | Record<string, any>;
|
|
220
224
|
type RecordToUnion<T extends Record<string, any>> = T[keyof T];
|
|
221
|
-
type ShortEmits<T extends Record<string, any>> = UnionToIntersection<RecordToUnion<{ [K in keyof T]: (evt: K, ...args: T[K]) => void }>>;
|
|
225
|
+
type ShortEmits<T extends Record<string, any>> = UnionToIntersection<RecordToUnion<{ [K in keyof T]: (evt: K, ...args: T[K]) => void; }>>;
|
|
222
226
|
/**
|
|
223
|
-
* Vue `<script setup>` compiler macro for declaring a component's exposed
|
|
224
|
-
* instance properties when it is accessed by a parent component via template
|
|
225
|
-
* refs.
|
|
226
|
-
*
|
|
227
|
-
* `<script setup>` components are closed by default - i.e. variables inside
|
|
228
|
-
* the `<script setup>` scope is not exposed to parent unless explicitly exposed
|
|
229
|
-
* via `defineExpose`.
|
|
230
|
-
*
|
|
231
|
-
* This is only usable inside `<script setup>`, is compiled away in the
|
|
232
|
-
* output and should **not** be actually called at runtime.
|
|
233
|
-
*
|
|
234
|
-
* @see {@link https://vuejs.org/api/sfc-script-setup.html#defineexpose}
|
|
235
|
-
*/
|
|
227
|
+
* Vue `<script setup>` compiler macro for declaring a component's exposed
|
|
228
|
+
* instance properties when it is accessed by a parent component via template
|
|
229
|
+
* refs.
|
|
230
|
+
*
|
|
231
|
+
* `<script setup>` components are closed by default - i.e. variables inside
|
|
232
|
+
* the `<script setup>` scope is not exposed to parent unless explicitly exposed
|
|
233
|
+
* via `defineExpose`.
|
|
234
|
+
*
|
|
235
|
+
* This is only usable inside `<script setup>`, is compiled away in the
|
|
236
|
+
* output and should **not** be actually called at runtime.
|
|
237
|
+
*
|
|
238
|
+
* @see {@link https://vuejs.org/api/sfc-script-setup.html#defineexpose}
|
|
239
|
+
*/
|
|
236
240
|
export declare function defineExpose<Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed): void;
|
|
237
241
|
/**
|
|
238
|
-
* Vue `<script setup>` compiler macro for declaring a component's additional
|
|
239
|
-
* options. This should be used only for options that cannot be expressed via
|
|
240
|
-
* Composition API - e.g. `inheritAttrs`.
|
|
241
|
-
*
|
|
242
|
-
* @see {@link https://vuejs.org/api/sfc-script-setup.html#defineoptions}
|
|
243
|
-
*/
|
|
242
|
+
* Vue `<script setup>` compiler macro for declaring a component's additional
|
|
243
|
+
* options. This should be used only for options that cannot be expressed via
|
|
244
|
+
* Composition API - e.g. `inheritAttrs`.
|
|
245
|
+
*
|
|
246
|
+
* @see {@link https://vuejs.org/api/sfc-script-setup.html#defineoptions}
|
|
247
|
+
*/
|
|
244
248
|
export declare function defineOptions<RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin>(options?: ComponentOptionsBase<{}, RawBindings, D, C, M, Mixin, Extends, {}> & {
|
|
245
249
|
/**
|
|
246
|
-
|
|
247
|
-
|
|
250
|
+
* props should be defined via defineProps().
|
|
251
|
+
*/
|
|
248
252
|
props?: never;
|
|
249
253
|
/**
|
|
250
|
-
|
|
251
|
-
|
|
254
|
+
* emits should be defined via defineEmits().
|
|
255
|
+
*/
|
|
252
256
|
emits?: never;
|
|
253
257
|
/**
|
|
254
|
-
|
|
255
|
-
|
|
258
|
+
* expose should be defined via defineExpose().
|
|
259
|
+
*/
|
|
256
260
|
expose?: never;
|
|
257
261
|
/**
|
|
258
|
-
|
|
259
|
-
|
|
262
|
+
* slots should be defined via defineSlots().
|
|
263
|
+
*/
|
|
260
264
|
slots?: never;
|
|
261
265
|
}): void;
|
|
262
266
|
/**
|
|
263
|
-
* Vue `<script setup>` compiler macro for providing type hints to IDEs for
|
|
264
|
-
* slot name and slot props type checking.
|
|
265
|
-
*
|
|
266
|
-
* Example usage:
|
|
267
|
-
* ```ts
|
|
268
|
-
* const slots = defineSlots<{
|
|
269
|
-
* default(props: { msg: string }): any
|
|
270
|
-
* }>()
|
|
271
|
-
* ```
|
|
272
|
-
*
|
|
273
|
-
* This is only usable inside `<script setup>`, is compiled away in the
|
|
274
|
-
* output and should **not** be actually called at runtime.
|
|
275
|
-
*
|
|
276
|
-
* @see {@link https://vuejs.org/api/sfc-script-setup.html#defineslots}
|
|
277
|
-
*/
|
|
267
|
+
* Vue `<script setup>` compiler macro for providing type hints to IDEs for
|
|
268
|
+
* slot name and slot props type checking.
|
|
269
|
+
*
|
|
270
|
+
* Example usage:
|
|
271
|
+
* ```ts
|
|
272
|
+
* const slots = defineSlots<{
|
|
273
|
+
* default(props: { msg: string }): any
|
|
274
|
+
* }>()
|
|
275
|
+
* ```
|
|
276
|
+
*
|
|
277
|
+
* This is only usable inside `<script setup>`, is compiled away in the
|
|
278
|
+
* output and should **not** be actually called at runtime.
|
|
279
|
+
*
|
|
280
|
+
* @see {@link https://vuejs.org/api/sfc-script-setup.html#defineslots}
|
|
281
|
+
*/
|
|
278
282
|
export declare function defineSlots<S extends Record<string, any> = Record<string, any>>(): StrictUnwrapSlotsType<SlotsType<S>>;
|
|
279
283
|
export type ModelRef<T, M extends PropertyKey = string, G = T, S = T> = Ref$1<G, S> & [ModelRef<T, M, G, S>, Record<M, true | undefined>];
|
|
280
284
|
type DefineModelOptions<T = any, G = T, S = T> = {
|
|
@@ -284,76 +288,76 @@ type DefineModelOptions<T = any, G = T, S = T> = {
|
|
|
284
288
|
type DefineModelRuntimeOptions<T, G, S> = Omit<PropOptions<T>, "default"> & DefineModelOptions<T, G, S>;
|
|
285
289
|
type DefineModelDefault<T> = InferDefault<Data, T>;
|
|
286
290
|
/**
|
|
287
|
-
* Vue `<script setup>` compiler macro for declaring a
|
|
288
|
-
* two-way binding prop that can be consumed via `v-model` from the parent
|
|
289
|
-
* component. This will declare a prop with the same name and a corresponding
|
|
290
|
-
* `update:propName` event.
|
|
291
|
-
*
|
|
292
|
-
* If the first argument is a string, it will be used as the prop name;
|
|
293
|
-
* Otherwise the prop name will default to "modelValue". In both cases, you
|
|
294
|
-
* can also pass an additional object which will be used as the prop's options.
|
|
295
|
-
*
|
|
296
|
-
* The returned ref behaves differently depending on whether the parent
|
|
297
|
-
* provided the corresponding v-model props or not:
|
|
298
|
-
* - If yes, the returned ref's value will always be in sync with the parent
|
|
299
|
-
* prop.
|
|
300
|
-
* - If not, the returned ref will behave like a normal local ref.
|
|
301
|
-
*
|
|
302
|
-
* @example
|
|
303
|
-
* ```ts
|
|
304
|
-
* // default model (consumed via `v-model`)
|
|
305
|
-
* const modelValue = defineModel<string>()
|
|
306
|
-
* modelValue.value = "hello"
|
|
307
|
-
*
|
|
308
|
-
* // default model with options
|
|
309
|
-
* const modelValue = defineModel<string>({ required: true })
|
|
310
|
-
*
|
|
311
|
-
* // with specified name (consumed via `v-model:count`)
|
|
312
|
-
* const count = defineModel<number>('count')
|
|
313
|
-
* count.value++
|
|
314
|
-
*
|
|
315
|
-
* // with specified name and default value
|
|
316
|
-
* const count = defineModel<number>('count', { default: 0 })
|
|
317
|
-
* ```
|
|
318
|
-
*/
|
|
319
|
-
export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(options: ({
|
|
291
|
+
* Vue `<script setup>` compiler macro for declaring a
|
|
292
|
+
* two-way binding prop that can be consumed via `v-model` from the parent
|
|
293
|
+
* component. This will declare a prop with the same name and a corresponding
|
|
294
|
+
* `update:propName` event.
|
|
295
|
+
*
|
|
296
|
+
* If the first argument is a string, it will be used as the prop name;
|
|
297
|
+
* Otherwise the prop name will default to "modelValue". In both cases, you
|
|
298
|
+
* can also pass an additional object which will be used as the prop's options.
|
|
299
|
+
*
|
|
300
|
+
* The returned ref behaves differently depending on whether the parent
|
|
301
|
+
* provided the corresponding v-model props or not:
|
|
302
|
+
* - If yes, the returned ref's value will always be in sync with the parent
|
|
303
|
+
* prop.
|
|
304
|
+
* - If not, the returned ref will behave like a normal local ref.
|
|
305
|
+
*
|
|
306
|
+
* @example
|
|
307
|
+
* ```ts
|
|
308
|
+
* // default model (consumed via `v-model`)
|
|
309
|
+
* const modelValue = defineModel<string>()
|
|
310
|
+
* modelValue.value = "hello"
|
|
311
|
+
*
|
|
312
|
+
* // default model with options
|
|
313
|
+
* const modelValue = defineModel<string>({ required: true })
|
|
314
|
+
*
|
|
315
|
+
* // with specified name (consumed via `v-model:count`)
|
|
316
|
+
* const count = defineModel<number>('count')
|
|
317
|
+
* count.value++
|
|
318
|
+
*
|
|
319
|
+
* // with specified name and default value
|
|
320
|
+
* const count = defineModel<number>('count', { default: 0 })
|
|
321
|
+
* ```
|
|
322
|
+
*/
|
|
323
|
+
export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(options: DefineModelRuntimeOptions<T, G, S> & ({
|
|
320
324
|
default: DefineModelDefault<T>;
|
|
321
325
|
} | {
|
|
322
326
|
required: true;
|
|
323
|
-
})
|
|
327
|
+
})): ModelRef<T, M, G, S>;
|
|
324
328
|
export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(options?: DefineModelRuntimeOptions<T, G, S>): ModelRef<T | undefined, M, G | undefined, S | undefined>;
|
|
325
|
-
export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(name: string, options: ({
|
|
329
|
+
export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(name: string, options: DefineModelRuntimeOptions<T, G, S> & ({
|
|
326
330
|
default: DefineModelDefault<T>;
|
|
327
331
|
} | {
|
|
328
332
|
required: true;
|
|
329
|
-
})
|
|
333
|
+
})): ModelRef<T, M, G, S>;
|
|
330
334
|
export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(name: string, options?: DefineModelRuntimeOptions<T, G, S>): ModelRef<T | undefined, M, G | undefined, S | undefined>;
|
|
331
335
|
type NotUndefined<T> = T extends undefined ? never : T;
|
|
332
|
-
type MappedOmit<T, K extends keyof any> = { [P in keyof T as P extends K ? never : P]: T[P] };
|
|
333
|
-
type InferDefaults<T> = { [K in keyof T]?: InferDefault<T, T[K]
|
|
336
|
+
type MappedOmit<T, K extends keyof any> = { [P in keyof T as P extends K ? never : P]: T[P]; };
|
|
337
|
+
type InferDefaults<T> = { [K in keyof T]?: InferDefault<T, T[K]>; };
|
|
334
338
|
type NativeType = null | undefined | number | string | boolean | symbol | Function;
|
|
335
339
|
type InferDefault<P, T> = ((props: P) => T & {}) | (T extends NativeType ? T : never);
|
|
336
|
-
type PropsWithDefaults<T, Defaults extends InferDefaults<T>, BKeys extends keyof T> = T extends unknown ? Readonly<MappedOmit<T, keyof Defaults>> & { readonly [K in keyof Defaults as K extends keyof T ? K : never]-?: K extends keyof T ? Defaults[K] extends undefined ? IfAny<Defaults[K], NotUndefined<T[K]>, T[K]> : NotUndefined<T[K]> : never } & { readonly [K in BKeys]-?: K extends keyof Defaults ? Defaults[K] extends undefined ? boolean | undefined : boolean : boolean } : never;
|
|
340
|
+
type PropsWithDefaults<T, Defaults extends InferDefaults<T>, BKeys extends keyof T> = T extends unknown ? Readonly<MappedOmit<T, keyof Defaults>> & { readonly [K in keyof Defaults as K extends keyof T ? K : never]-?: K extends keyof T ? Defaults[K] extends undefined ? IfAny<Defaults[K], NotUndefined<T[K]>, T[K]> : NotUndefined<T[K]> : never; } & { readonly [K in BKeys]-?: K extends keyof Defaults ? Defaults[K] extends undefined ? boolean | undefined : boolean : boolean; } : never;
|
|
337
341
|
/**
|
|
338
|
-
* Vue `<script setup>` compiler macro for providing props default values when
|
|
339
|
-
* using type-based `defineProps` declaration.
|
|
340
|
-
*
|
|
341
|
-
* Example usage:
|
|
342
|
-
* ```ts
|
|
343
|
-
* withDefaults(defineProps<{
|
|
344
|
-
* size?: number
|
|
345
|
-
* labels?: string[]
|
|
346
|
-
* }>(), {
|
|
347
|
-
* size: 3,
|
|
348
|
-
* labels: () => ['default label']
|
|
349
|
-
* })
|
|
350
|
-
* ```
|
|
351
|
-
*
|
|
352
|
-
* This is only usable inside `<script setup>`, is compiled away in the output
|
|
353
|
-
* and should **not** be actually called at runtime.
|
|
354
|
-
*
|
|
355
|
-
* @see {@link https://vuejs.org/guide/typescript/composition-api.html#typing-component-props}
|
|
356
|
-
*/
|
|
342
|
+
* Vue `<script setup>` compiler macro for providing props default values when
|
|
343
|
+
* using type-based `defineProps` declaration.
|
|
344
|
+
*
|
|
345
|
+
* Example usage:
|
|
346
|
+
* ```ts
|
|
347
|
+
* withDefaults(defineProps<{
|
|
348
|
+
* size?: number
|
|
349
|
+
* labels?: string[]
|
|
350
|
+
* }>(), {
|
|
351
|
+
* size: 3,
|
|
352
|
+
* labels: () => ['default label']
|
|
353
|
+
* })
|
|
354
|
+
* ```
|
|
355
|
+
*
|
|
356
|
+
* This is only usable inside `<script setup>`, is compiled away in the output
|
|
357
|
+
* and should **not** be actually called at runtime.
|
|
358
|
+
*
|
|
359
|
+
* @see {@link https://vuejs.org/guide/typescript/composition-api.html#typing-component-props}
|
|
360
|
+
*/
|
|
357
361
|
export declare function withDefaults<T, BKeys extends keyof T, Defaults extends InferDefaults<T>>(props: DefineProps<T, BKeys>, defaults: Defaults): PropsWithDefaults<T, Defaults, BKeys>;
|
|
358
362
|
export declare function useSlots(): SetupContext["slots"];
|
|
359
363
|
export declare function useAttrs(): SetupContext["attrs"];
|
|
@@ -361,12 +365,12 @@ export declare function useAttrs(): SetupContext["attrs"];
|
|
|
361
365
|
//#region temp/packages/runtime-core/src/componentEmits.d.ts
|
|
362
366
|
export type ObjectEmitsOptions = Record<string, ((...args: any[]) => any) | null | any[]>;
|
|
363
367
|
export type EmitsOptions = ObjectEmitsOptions | string[];
|
|
364
|
-
export type EmitsToProps<T extends EmitsOptions | ComponentTypeEmits> = T extends string[] ? { [K in `on${Capitalize<T[number]>}`]?: (...args: any[]) => any } : T extends ObjectEmitsOptions ? { [K in string & keyof T as `on${Capitalize<K>}`]?: (...args: T[K] extends ((...args: infer P) => any) ? P : T[K] extends null ? any[] : T[K] extends any[] ? T[K] : never) => any } : {};
|
|
365
|
-
export type TypeEmitsToOptions<T extends ComponentTypeEmits> = { [K in keyof T & string]: T[K] extends [...args: infer Args] ? (...args: Args) => any : () => any } & (T extends ((...args: any[]) => any) ? ParametersToFns<OverloadParameters<T>> : {});
|
|
366
|
-
type ParametersToFns<T extends any[]> = { [K in T[0]]: IsStringLiteral<K> extends true ? (...args: T extends [e: infer E, ...args: infer P] ? K extends E ? P : never : never) => any : never };
|
|
368
|
+
export type EmitsToProps<T extends EmitsOptions | ComponentTypeEmits> = T extends string[] ? { [K in `on${Capitalize<T[number]>}`]?: (...args: any[]) => any; } : T extends ObjectEmitsOptions ? { [K in string & keyof T as `on${Capitalize<K>}`]?: (...args: T[K] extends ((...args: infer P) => any) ? P : T[K] extends null ? any[] : T[K] extends any[] ? T[K] : never) => any; } : {};
|
|
369
|
+
export type TypeEmitsToOptions<T extends ComponentTypeEmits> = { [K in keyof T & string]: T[K] extends [...args: infer Args] ? (...args: Args) => any : () => any; } & (T extends ((...args: any[]) => any) ? ParametersToFns<OverloadParameters<T>> : {});
|
|
370
|
+
type ParametersToFns<T extends any[]> = { [K in T[0]]: IsStringLiteral<K> extends true ? (...args: T extends [e: infer E, ...args: infer P] ? K extends E ? P : never : never) => any : never; };
|
|
367
371
|
type IsStringLiteral<T> = T extends string ? string extends T ? false : true : false;
|
|
368
|
-
export type ShortEmitsToObject<E> = E extends Record<string, any[]> ? { [K in keyof E]: (...args: E[K]) => any } : E;
|
|
369
|
-
export type EmitFn<Options = ObjectEmitsOptions, Event extends keyof Options = keyof Options> = Options extends Array<infer V> ? (event: V, ...args: any[]) => void : {} extends Options ? (event: string, ...args: any[]) => void : UnionToIntersection<{ [key in Event]: Options[key] extends ((...args: infer Args) => any) ? (event: key, ...args: Args) => void : Options[key] extends any[] ? (event: key, ...args: Options[key]) => void : (event: key, ...args: any[]) => void }[Event]>;
|
|
372
|
+
export type ShortEmitsToObject<E> = E extends Record<string, any[]> ? { [K in keyof E]: (...args: E[K]) => any; } : E;
|
|
373
|
+
export type EmitFn<Options = ObjectEmitsOptions, Event extends keyof Options = keyof Options> = Options extends Array<infer V> ? (event: V, ...args: any[]) => void : {} extends Options ? (event: string, ...args: any[]) => void : UnionToIntersection<{ [key in Event]: Options[key] extends ((...args: infer Args) => any) ? (event: key, ...args: Args) => void : Options[key] extends any[] ? (event: key, ...args: Options[key]) => void : (event: key, ...args: any[]) => void; }[Event]>;
|
|
370
374
|
//#endregion
|
|
371
375
|
//#region temp/packages/runtime-core/src/directives.d.ts
|
|
372
376
|
export interface DirectiveBinding<Value = any, Modifiers extends string = string, Arg = any> {
|
|
@@ -395,36 +399,36 @@ export type Directive<HostElement = any, Value = any, Modifiers extends string =
|
|
|
395
399
|
export type DirectiveModifiers<K extends string = string> = Partial<Record<K, boolean>>;
|
|
396
400
|
export type DirectiveArguments = Array<[Directive | undefined] | [Directive | undefined, any] | [Directive | undefined, any, any] | [Directive | undefined, any, any, DirectiveModifiers]>;
|
|
397
401
|
/**
|
|
398
|
-
* Adds directives to a VNode.
|
|
399
|
-
*/
|
|
402
|
+
* Adds directives to a VNode.
|
|
403
|
+
*/
|
|
400
404
|
export declare function withDirectives<T extends VNode>(vnode: T, directives: DirectiveArguments): T;
|
|
401
405
|
//#endregion
|
|
402
406
|
//#region temp/packages/runtime-core/src/componentPublicInstance.d.ts
|
|
403
407
|
/**
|
|
404
|
-
* Custom properties added to component instances in any way and can be accessed through `this`
|
|
405
|
-
*
|
|
406
|
-
* @example
|
|
407
|
-
* Here is an example of adding a property `$router` to every component instance:
|
|
408
|
-
* ```ts
|
|
409
|
-
* import { createApp } from 'vue'
|
|
410
|
-
* import { Router, createRouter } from 'vue-router'
|
|
411
|
-
*
|
|
412
|
-
* declare module 'vue' {
|
|
413
|
-
* interface ComponentCustomProperties {
|
|
414
|
-
* $router: Router
|
|
415
|
-
* }
|
|
416
|
-
* }
|
|
417
|
-
*
|
|
418
|
-
* // effectively adding the router to every component instance
|
|
419
|
-
* const app = createApp({})
|
|
420
|
-
* const router = createRouter()
|
|
421
|
-
* app.config.globalProperties.$router = router
|
|
422
|
-
*
|
|
423
|
-
* const vm = app.mount('#app')
|
|
424
|
-
* // we can access the router from the instance
|
|
425
|
-
* vm.$router.push('/')
|
|
426
|
-
* ```
|
|
427
|
-
*/
|
|
408
|
+
* Custom properties added to component instances in any way and can be accessed through `this`
|
|
409
|
+
*
|
|
410
|
+
* @example
|
|
411
|
+
* Here is an example of adding a property `$router` to every component instance:
|
|
412
|
+
* ```ts
|
|
413
|
+
* import { createApp } from 'vue'
|
|
414
|
+
* import { Router, createRouter } from 'vue-router'
|
|
415
|
+
*
|
|
416
|
+
* declare module 'vue' {
|
|
417
|
+
* interface ComponentCustomProperties {
|
|
418
|
+
* $router: Router
|
|
419
|
+
* }
|
|
420
|
+
* }
|
|
421
|
+
*
|
|
422
|
+
* // effectively adding the router to every component instance
|
|
423
|
+
* const app = createApp({})
|
|
424
|
+
* const router = createRouter()
|
|
425
|
+
* app.config.globalProperties.$router = router
|
|
426
|
+
*
|
|
427
|
+
* const vm = app.mount('#app')
|
|
428
|
+
* // we can access the router from the instance
|
|
429
|
+
* vm.$router.push('/')
|
|
430
|
+
* ```
|
|
431
|
+
*/
|
|
428
432
|
export interface ComponentCustomProperties {}
|
|
429
433
|
type IsDefaultMixinComponent<T> = T extends ComponentOptionsMixin ? ComponentOptionsMixin extends T ? true : false : false;
|
|
430
434
|
type MixinToOptionTypes<T> = T extends ComponentOptionsBase<infer P, infer B, infer D, infer C, infer M, infer Mixin, infer Extends, any, any, infer Defaults, any, any, any, any, any, any, any> ? OptionTypesType<P & {}, B & {}, D & {}, C & {}, M & {}, Defaults & {}> & IntersectionMixin<Mixin> & IntersectionMixin<Extends> : never;
|
|
@@ -441,17 +445,17 @@ type ComponentPublicInstanceConstructor<T extends ComponentPublicInstance<Props,
|
|
|
441
445
|
new (...args: any[]): T;
|
|
442
446
|
};
|
|
443
447
|
/**
|
|
444
|
-
* @deprecated This is no longer used internally, but exported and relied on by
|
|
445
|
-
* existing library types generated by vue-tsc.
|
|
446
|
-
*/
|
|
448
|
+
* @deprecated This is no longer used internally, but exported and relied on by
|
|
449
|
+
* existing library types generated by vue-tsc.
|
|
450
|
+
*/
|
|
447
451
|
export type CreateComponentPublicInstance<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, PublicProps = P, Defaults = {}, MakeDefaultsOptional extends boolean = false, I extends ComponentInjectOptions = {}, S extends SlotsType = {}, PublicMixin = IntersectionMixin<Mixin> & IntersectionMixin<Extends>, PublicP = UnwrapMixinsType<PublicMixin, "P"> & EnsureNonVoid<P>, PublicB = UnwrapMixinsType<PublicMixin, "B"> & EnsureNonVoid<B>, PublicD = UnwrapMixinsType<PublicMixin, "D"> & EnsureNonVoid<D>, PublicC extends ComputedOptions = UnwrapMixinsType<PublicMixin, "C"> & EnsureNonVoid<C>, PublicM extends MethodOptions = UnwrapMixinsType<PublicMixin, "M"> & EnsureNonVoid<M>, PublicDefaults = UnwrapMixinsType<PublicMixin, "Defaults"> & EnsureNonVoid<Defaults>> = ComponentPublicInstance<PublicP, PublicB, PublicD, PublicC, PublicM, E, PublicProps, PublicDefaults, MakeDefaultsOptional, ComponentOptionsBase<P, B, D, C, M, Mixin, Extends, E, string, Defaults, {}, string, S>, I, S>;
|
|
448
452
|
/**
|
|
449
|
-
* This is the same as `CreateComponentPublicInstance` but adds local components,
|
|
450
|
-
* global directives, exposed, and provide inference.
|
|
451
|
-
* It changes the arguments order so that we don't need to repeat mixin
|
|
452
|
-
* inference everywhere internally, but it has to be a new type to avoid
|
|
453
|
-
* breaking types that relies on previous arguments order (#10842)
|
|
454
|
-
*/
|
|
453
|
+
* This is the same as `CreateComponentPublicInstance` but adds local components,
|
|
454
|
+
* global directives, exposed, and provide inference.
|
|
455
|
+
* It changes the arguments order so that we don't need to repeat mixin
|
|
456
|
+
* inference everywhere internally, but it has to be a new type to avoid
|
|
457
|
+
* breaking types that relies on previous arguments order (#10842)
|
|
458
|
+
*/
|
|
455
459
|
export type CreateComponentPublicInstanceWithMixins<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, PublicProps = P, Defaults = {}, MakeDefaultsOptional extends boolean = false, I extends ComponentInjectOptions = {}, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, TypeRefs extends Data = {}, TypeEl = any, Provide extends ComponentProvideOptions = ComponentProvideOptions, PublicMixin = IntersectionMixin<Mixin> & IntersectionMixin<Extends>, PublicP = UnwrapMixinsType<PublicMixin, "P"> & EnsureNonVoid<P>, PublicB = UnwrapMixinsType<PublicMixin, "B"> & EnsureNonVoid<B>, PublicD = UnwrapMixinsType<PublicMixin, "D"> & EnsureNonVoid<D>, PublicC extends ComputedOptions = UnwrapMixinsType<PublicMixin, "C"> & EnsureNonVoid<C>, PublicM extends MethodOptions = UnwrapMixinsType<PublicMixin, "M"> & EnsureNonVoid<M>, PublicDefaults = UnwrapMixinsType<PublicMixin, "Defaults"> & EnsureNonVoid<Defaults>> = ComponentPublicInstance<PublicP, PublicB, PublicD, PublicC, PublicM, E, PublicProps, PublicDefaults, MakeDefaultsOptional, ComponentOptionsBase<P, B, D, C, M, Mixin, Extends, E, string, Defaults, {}, string, S, LC, Directives, Exposed, Provide>, I, S, Exposed, TypeRefs, TypeEl>;
|
|
456
460
|
type ExposedKeys<T, Exposed extends string & keyof T> = "" extends Exposed ? T : Pick<T, Exposed>;
|
|
457
461
|
export type ComponentPublicInstance<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, E extends EmitsOptions = {}, PublicProps = {}, Defaults = {}, MakeDefaultsOptional extends boolean = false, Options = ComponentOptionsBase<any, any, any, any, any, any, any, any, any>, I extends ComponentInjectOptions = {}, S extends SlotsType = {}, Exposed extends string = "", TypeRefs extends Data = {}, TypeEl = any> = {
|
|
@@ -500,15 +504,15 @@ export interface SuspenseProps {
|
|
|
500
504
|
onPending?: () => void;
|
|
501
505
|
onFallback?: () => void;
|
|
502
506
|
/**
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
507
|
+
* Switch to fallback content if it takes longer than `timeout` milliseconds to render the new default content.
|
|
508
|
+
* A `timeout` value of `0` will cause the fallback content to be displayed immediately when default content is replaced.
|
|
509
|
+
*/
|
|
506
510
|
timeout?: string | number;
|
|
507
511
|
/**
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
+
* Allow suspense to be captured by parent suspense
|
|
513
|
+
*
|
|
514
|
+
* @default false
|
|
515
|
+
*/
|
|
512
516
|
suspensible?: boolean;
|
|
513
517
|
}
|
|
514
518
|
declare const SuspenseImpl: {
|
|
@@ -620,10 +624,10 @@ export interface TransitionHooksContext {
|
|
|
620
624
|
setLeavingNodeCache: (node: any) => void;
|
|
621
625
|
unsetLeavingNodeCache: (node: any) => void;
|
|
622
626
|
earlyRemove: () => void;
|
|
623
|
-
cloneHooks
|
|
627
|
+
cloneHooks?: (node: any) => TransitionHooks;
|
|
624
628
|
}
|
|
625
629
|
export declare function resolveTransitionHooks(vnode: VNode, props: BaseTransitionProps<any>, state: TransitionState, instance: GenericComponentInstance, postClone?: (hooks: TransitionHooks) => void): TransitionHooks;
|
|
626
|
-
export declare function setTransitionHooks(vnode: VNode, hooks: TransitionHooks):
|
|
630
|
+
export declare function setTransitionHooks(vnode: VNode, hooks: TransitionHooks): TransitionHooks;
|
|
627
631
|
export declare function getTransitionRawChildren(children: VNode[], keepComment?: boolean, parentKey?: VNode["key"]): VNode[];
|
|
628
632
|
//#endregion
|
|
629
633
|
//#region temp/packages/runtime-core/src/renderer.d.ts
|
|
@@ -689,20 +693,20 @@ export declare enum MoveType {
|
|
|
689
693
|
REORDER = 2
|
|
690
694
|
}
|
|
691
695
|
/**
|
|
692
|
-
* The createRenderer function accepts two generic arguments:
|
|
693
|
-
* HostNode and HostElement, corresponding to Node and Element types in the
|
|
694
|
-
* host environment. For example, for runtime-dom, HostNode would be the DOM
|
|
695
|
-
* `Node` interface and HostElement would be the DOM `Element` interface.
|
|
696
|
-
*
|
|
697
|
-
* Custom renderers can pass in the platform specific types like this:
|
|
698
|
-
*
|
|
699
|
-
* ``` js
|
|
700
|
-
* const { render, createApp } = createRenderer<Node, Element>({
|
|
701
|
-
* patchProp,
|
|
702
|
-
* ...nodeOps
|
|
703
|
-
* })
|
|
704
|
-
* ```
|
|
705
|
-
*/
|
|
696
|
+
* The createRenderer function accepts two generic arguments:
|
|
697
|
+
* HostNode and HostElement, corresponding to Node and Element types in the
|
|
698
|
+
* host environment. For example, for runtime-dom, HostNode would be the DOM
|
|
699
|
+
* `Node` interface and HostElement would be the DOM `Element` interface.
|
|
700
|
+
*
|
|
701
|
+
* Custom renderers can pass in the platform specific types like this:
|
|
702
|
+
*
|
|
703
|
+
* ``` js
|
|
704
|
+
* const { render, createApp } = createRenderer<Node, Element>({
|
|
705
|
+
* patchProp,
|
|
706
|
+
* ...nodeOps
|
|
707
|
+
* })
|
|
708
|
+
* ```
|
|
709
|
+
*/
|
|
706
710
|
export declare function createRenderer<HostNode = RendererNode, HostElement = RendererElement>(options: RendererOptions<HostNode, HostElement>): Renderer<HostElement>;
|
|
707
711
|
export declare function createHydrationRenderer(options: RendererOptions<Node, Element>): HydrationRenderer;
|
|
708
712
|
//#endregion
|
|
@@ -799,23 +803,39 @@ declare function configureCompat(config: CompatConfig): void;
|
|
|
799
803
|
//#endregion
|
|
800
804
|
//#region temp/packages/runtime-core/src/componentOptions.d.ts
|
|
801
805
|
/**
|
|
802
|
-
* Interface for declaring custom options.
|
|
803
|
-
*
|
|
804
|
-
* @example
|
|
805
|
-
* ```ts
|
|
806
|
-
* declare module 'vue' {
|
|
807
|
-
* interface ComponentCustomOptions {
|
|
808
|
-
* beforeRouteUpdate?(
|
|
809
|
-
* to: Route,
|
|
810
|
-
* from: Route,
|
|
811
|
-
* next: () => void
|
|
812
|
-
* ): void
|
|
813
|
-
* }
|
|
814
|
-
* }
|
|
815
|
-
* ```
|
|
816
|
-
*/
|
|
806
|
+
* Interface for declaring custom options.
|
|
807
|
+
*
|
|
808
|
+
* @example
|
|
809
|
+
* ```ts
|
|
810
|
+
* declare module 'vue' {
|
|
811
|
+
* interface ComponentCustomOptions {
|
|
812
|
+
* beforeRouteUpdate?(
|
|
813
|
+
* to: Route,
|
|
814
|
+
* from: Route,
|
|
815
|
+
* next: () => void
|
|
816
|
+
* ): void
|
|
817
|
+
* }
|
|
818
|
+
* }
|
|
819
|
+
* ```
|
|
820
|
+
*/
|
|
817
821
|
export interface ComponentCustomOptions {}
|
|
818
|
-
|
|
822
|
+
/**
|
|
823
|
+
* Registry for additional render result types.
|
|
824
|
+
*
|
|
825
|
+
* @example
|
|
826
|
+
* ```ts
|
|
827
|
+
* import type { VaporRenderResult } from 'vue'
|
|
828
|
+
*
|
|
829
|
+
* declare module 'vue' {
|
|
830
|
+
* interface RenderResultExtensions {
|
|
831
|
+
* vapor: VaporRenderResult
|
|
832
|
+
* }
|
|
833
|
+
* }
|
|
834
|
+
* ```
|
|
835
|
+
*/
|
|
836
|
+
export interface RenderResultExtensions {}
|
|
837
|
+
type RenderResult = VNodeChild | RenderResultExtensions[keyof RenderResultExtensions] | RenderResult[];
|
|
838
|
+
export type RenderFunction = () => RenderResult;
|
|
819
839
|
export interface ComponentOptionsBase<Props, RawBindings, D, C extends ComputedOptions, M extends MethodOptions, Mixin extends ComponentOptionsMixin, Extends extends ComponentOptionsMixin, E extends EmitsOptions, EE extends string = string, Defaults = {}, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions> extends LegacyOptions<Props, D, C, M, Mixin, Extends, I, II, Provide>, ComponentInternalOptions, AsyncComponentInternalOptions, ComponentCustomOptions {
|
|
820
840
|
setup?: (this: void, props: LooseRequired<Props & Prettify<UnwrapMixinsType<IntersectionMixin<Mixin> & IntersectionMixin<Extends>, "P">>>, ctx: SetupContext<E, S>) => Promise<RawBindings> | RawBindings | RenderFunction | void;
|
|
821
841
|
name?: string;
|
|
@@ -836,8 +856,8 @@ export interface ComponentOptionsBase<Props, RawBindings, D, C extends ComputedO
|
|
|
836
856
|
__defaults?: Defaults;
|
|
837
857
|
}
|
|
838
858
|
/**
|
|
839
|
-
* Subset of compiler options that makes sense for the runtime.
|
|
840
|
-
*/
|
|
859
|
+
* Subset of compiler options that makes sense for the runtime.
|
|
860
|
+
*/
|
|
841
861
|
export interface RuntimeCompilerOptions {
|
|
842
862
|
isCustomElement?: (tag: string) => boolean;
|
|
843
863
|
whitespace?: "preserve" | "condense";
|
|
@@ -852,7 +872,7 @@ export interface MethodOptions {
|
|
|
852
872
|
}
|
|
853
873
|
type ExtractComputedReturns<T extends any> = { [key in keyof T]: T[key] extends {
|
|
854
874
|
get: (...args: any[]) => infer TReturn;
|
|
855
|
-
} ? TReturn : T[key] extends ((...args: any[]) => infer TReturn) ? TReturn : never };
|
|
875
|
+
} ? TReturn : T[key] extends ((...args: any[]) => infer TReturn) ? TReturn : never; };
|
|
856
876
|
type ObjectWatchOptionItem = {
|
|
857
877
|
handler: WatchCallback | string;
|
|
858
878
|
} & WatchOptions;
|
|
@@ -866,7 +886,7 @@ type ObjectInjectOptions = Record<string | symbol, string | symbol | {
|
|
|
866
886
|
from?: string | symbol;
|
|
867
887
|
default?: unknown;
|
|
868
888
|
}>;
|
|
869
|
-
type InjectToObject<T extends ComponentInjectOptions> = T extends string[] ? { [K in T[number]]?: unknown } : T extends ObjectInjectOptions ? { [K in keyof T]?: unknown } : never;
|
|
889
|
+
type InjectToObject<T extends ComponentInjectOptions> = T extends string[] ? { [K in T[number]]?: unknown; } : T extends ObjectInjectOptions ? { [K in keyof T]?: unknown; } : never;
|
|
870
890
|
interface LegacyOptions<Props, D, C extends ComputedOptions, M extends MethodOptions, Mixin extends ComponentOptionsMixin, Extends extends ComponentOptionsMixin, I extends ComponentInjectOptions, II extends string, Provide extends ComponentProvideOptions = ComponentProvideOptions> {
|
|
871
891
|
compatConfig?: CompatConfig;
|
|
872
892
|
[key: string]: any;
|
|
@@ -897,18 +917,18 @@ interface LegacyOptions<Props, D, C extends ComputedOptions, M extends MethodOpt
|
|
|
897
917
|
renderTriggered?: DebuggerHook;
|
|
898
918
|
errorCaptured?: ErrorCapturedHook;
|
|
899
919
|
/**
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
920
|
+
* runtime compile only
|
|
921
|
+
* @deprecated use `compilerOptions.delimiters` instead.
|
|
922
|
+
*/
|
|
903
923
|
delimiters?: [string, string];
|
|
904
924
|
/**
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
925
|
+
* #3468
|
|
926
|
+
*
|
|
927
|
+
* type-only, used to assist Mixin's type inference,
|
|
928
|
+
* TypeScript will try to simplify the inferred `Mixin` type,
|
|
929
|
+
* with the `__differentiator`, TypeScript won't be able to combine different mixins,
|
|
930
|
+
* because the `__differentiator` will be different
|
|
931
|
+
*/
|
|
912
932
|
__differentiator?: keyof D | keyof C | keyof M;
|
|
913
933
|
}
|
|
914
934
|
type MergedHook<T = () => void> = T | T[];
|
|
@@ -920,9 +940,11 @@ type MergedComponentOptionsOverride = {
|
|
|
920
940
|
beforeUpdate?: MergedHook;
|
|
921
941
|
updated?: MergedHook;
|
|
922
942
|
activated?: MergedHook;
|
|
923
|
-
deactivated?: MergedHook;
|
|
943
|
+
deactivated?: MergedHook;
|
|
944
|
+
/** @deprecated use `beforeUnmount` instead */
|
|
924
945
|
beforeDestroy?: MergedHook;
|
|
925
|
-
beforeUnmount?: MergedHook;
|
|
946
|
+
beforeUnmount?: MergedHook;
|
|
947
|
+
/** @deprecated use `unmounted` instead */
|
|
926
948
|
destroyed?: MergedHook;
|
|
927
949
|
unmounted?: MergedHook;
|
|
928
950
|
renderTracked?: MergedHook<DebuggerHook>;
|
|
@@ -939,28 +961,28 @@ type OptionTypesType<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M e
|
|
|
939
961
|
Defaults: Defaults;
|
|
940
962
|
};
|
|
941
963
|
/**
|
|
942
|
-
* @deprecated
|
|
943
|
-
*/
|
|
944
|
-
export type ComponentOptionsWithoutProps<Props = {}, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, TE extends ComponentTypeEmits = {}, ResolvedEmits extends EmitsOptions =
|
|
964
|
+
* @deprecated
|
|
965
|
+
*/
|
|
966
|
+
export type ComponentOptionsWithoutProps<Props = {}, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, TE extends ComponentTypeEmits = {}, ResolvedEmits extends EmitsOptions = {} extends E ? TypeEmitsToOptions<TE> : E, PE = Props & EmitsToProps<ResolvedEmits>> = ComponentOptionsBase<PE, RawBindings, D, C, M, Mixin, Extends, E, EE, {}, I, II, S, LC, Directives, Exposed, Provide> & {
|
|
945
967
|
props?: never;
|
|
946
968
|
/**
|
|
947
|
-
|
|
948
|
-
|
|
969
|
+
* @private for language-tools use only
|
|
970
|
+
*/
|
|
949
971
|
__typeProps?: Props;
|
|
950
972
|
/**
|
|
951
|
-
|
|
952
|
-
|
|
973
|
+
* @private for language-tools use only
|
|
974
|
+
*/
|
|
953
975
|
__typeEmits?: TE;
|
|
954
976
|
} & ThisType<CreateComponentPublicInstanceWithMixins<PE, RawBindings, D, C, M, Mixin, Extends, ResolvedEmits, EE, {}, false, I, S, LC, Directives, string>>;
|
|
955
977
|
/**
|
|
956
|
-
* @deprecated
|
|
957
|
-
*/
|
|
958
|
-
export type ComponentOptionsWithArrayProps<PropNames extends string = string, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, Props = Prettify<Readonly<{ [key in PropNames]?: any } & EmitsToProps<E>>>> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, {}, I, II, S, LC, Directives, Exposed, Provide> & {
|
|
978
|
+
* @deprecated
|
|
979
|
+
*/
|
|
980
|
+
export type ComponentOptionsWithArrayProps<PropNames extends string = string, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, Props = Prettify<Readonly<{ [key in PropNames]?: any; } & EmitsToProps<E>>>> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, {}, I, II, S, LC, Directives, Exposed, Provide> & {
|
|
959
981
|
props: PropNames[];
|
|
960
982
|
} & ThisType<CreateComponentPublicInstanceWithMixins<Props, RawBindings, D, C, M, Mixin, Extends, E, Props, {}, false, I, S, LC, Directives, string>>;
|
|
961
983
|
/**
|
|
962
|
-
* @deprecated
|
|
963
|
-
*/
|
|
984
|
+
* @deprecated
|
|
985
|
+
*/
|
|
964
986
|
export type ComponentOptionsWithObjectProps<PropsOptions = ComponentObjectPropsOptions, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, Props = Prettify<Readonly<ExtractPropTypes<PropsOptions>> & Readonly<EmitsToProps<E>>>, Defaults = ExtractDefaultPropTypes<PropsOptions>> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults, I, II, S, LC, Directives, Exposed, Provide> & {
|
|
965
987
|
props: PropsOptions & ThisType<void>;
|
|
966
988
|
} & ThisType<CreateComponentPublicInstanceWithMixins<Props, RawBindings, D, C, M, Mixin, Extends, E, Props, Defaults, false, I, S, LC, Directives>>;
|
|
@@ -973,10 +995,10 @@ export declare function inject<T>(key: InjectionKey<T> | string): T | undefined;
|
|
|
973
995
|
export declare function inject<T>(key: InjectionKey<T> | string, defaultValue: T, treatDefaultAsFactory?: false): T;
|
|
974
996
|
export declare function inject<T>(key: InjectionKey<T> | string, defaultValue: T | (() => T), treatDefaultAsFactory: true): T;
|
|
975
997
|
/**
|
|
976
|
-
* Returns true if `inject()` can be used without warning about being called in the wrong place (e.g. outside of
|
|
977
|
-
* setup()). This is used by libraries that want to use `inject()` internally without triggering a warning to the end
|
|
978
|
-
* user. One example is `useRoute()` in `vue-router`.
|
|
979
|
-
*/
|
|
998
|
+
* Returns true if `inject()` can be used without warning about being called in the wrong place (e.g. outside of
|
|
999
|
+
* setup()). This is used by libraries that want to use `inject()` internally without triggering a warning to the end
|
|
1000
|
+
* user. One example is `useRoute()` in `vue-router`.
|
|
1001
|
+
*/
|
|
980
1002
|
export declare function hasInjectionContext(): boolean;
|
|
981
1003
|
//#endregion
|
|
982
1004
|
//#region temp/packages/runtime-core/src/apiDefineComponent.d.ts
|
|
@@ -995,23 +1017,23 @@ export declare function defineComponent<Props extends Record<string, any>, E ext
|
|
|
995
1017
|
emits?: E | EE[];
|
|
996
1018
|
slots?: S;
|
|
997
1019
|
}): DefineSetupFnComponent<Props, E, S>;
|
|
998
|
-
export declare function defineComponent<TypeProps, RuntimePropsOptions extends ComponentObjectPropsOptions = ComponentObjectPropsOptions, RuntimePropsKeys extends string = string, TypeEmits extends ComponentTypeEmits = {}, RuntimeEmitsOptions extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Data = {}, SetupBindings = {}, Computed extends ComputedOptions = {}, Methods extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, InjectOptions extends ComponentInjectOptions = {}, InjectKeys extends string = string, Slots extends SlotsType = {}, LocalComponents extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, ResolvedEmits extends EmitsOptions =
|
|
1020
|
+
export declare function defineComponent<TypeProps, RuntimePropsOptions extends ComponentObjectPropsOptions = ComponentObjectPropsOptions, RuntimePropsKeys extends string = string, TypeEmits extends ComponentTypeEmits = {}, RuntimeEmitsOptions extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Data = {}, SetupBindings = {}, Computed extends ComputedOptions = {}, Methods extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, InjectOptions extends ComponentInjectOptions = {}, InjectKeys extends string = string, Slots extends SlotsType = {}, LocalComponents extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, ResolvedEmits extends EmitsOptions = {} extends RuntimeEmitsOptions ? TypeEmitsToOptions<TypeEmits> : RuntimeEmitsOptions, InferredProps = IsKeyValues<TypeProps> extends true ? TypeProps : string extends RuntimePropsKeys ? ComponentObjectPropsOptions extends RuntimePropsOptions ? {} : ExtractPropTypes<RuntimePropsOptions> : { [key in RuntimePropsKeys]?: any; }, TypeRefs extends Record<string, unknown> = {}, TypeEl = any>(options: {
|
|
999
1021
|
props?: (RuntimePropsOptions & ThisType<void>) | RuntimePropsKeys[];
|
|
1000
1022
|
/**
|
|
1001
|
-
|
|
1002
|
-
|
|
1023
|
+
* @private for language-tools use only
|
|
1024
|
+
*/
|
|
1003
1025
|
__typeProps?: TypeProps;
|
|
1004
1026
|
/**
|
|
1005
|
-
|
|
1006
|
-
|
|
1027
|
+
* @private for language-tools use only
|
|
1028
|
+
*/
|
|
1007
1029
|
__typeEmits?: TypeEmits;
|
|
1008
1030
|
/**
|
|
1009
|
-
|
|
1010
|
-
|
|
1031
|
+
* @private for language-tools use only
|
|
1032
|
+
*/
|
|
1011
1033
|
__typeRefs?: TypeRefs;
|
|
1012
1034
|
/**
|
|
1013
|
-
|
|
1014
|
-
|
|
1035
|
+
* @private for language-tools use only
|
|
1036
|
+
*/
|
|
1015
1037
|
__typeEl?: TypeEl;
|
|
1016
1038
|
} & ComponentOptionsBase<ToResolvedProps<InferredProps, ResolvedEmits>, SetupBindings, Data, Computed, Methods, Mixin, Extends, RuntimeEmitsOptions, RuntimeEmitsKeys, {}, InjectOptions, InjectKeys, Slots, LocalComponents, Directives, Exposed, Provide> & ThisType<CreateComponentPublicInstanceWithMixins<ToResolvedProps<InferredProps, ResolvedEmits>, SetupBindings, Data, Computed, Methods, Mixin, Extends, ResolvedEmits, {}, {}, false, InjectOptions, Slots, LocalComponents, Directives, string>>): DefineComponent<InferredProps, SetupBindings, Data, Computed, Methods, Mixin, Extends, ResolvedEmits, RuntimeEmitsKeys, PublicProps, ToResolvedProps<InferredProps, ResolvedEmits>, ExtractDefaultPropTypes<RuntimePropsOptions>, Slots, LocalComponents, Directives, Exposed, Provide, unknown extends TypeProps ? true : false, TypeRefs, TypeEl>;
|
|
1017
1039
|
//#endregion
|
|
@@ -1032,11 +1054,11 @@ export interface App<HostElement = any> {
|
|
|
1032
1054
|
onUnmount(cb: () => void): void;
|
|
1033
1055
|
provide<T, K = InjectionKey<T> | string | number>(key: K, value: K extends InjectionKey<infer V> ? V : T): this;
|
|
1034
1056
|
/**
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1057
|
+
* Runs a function with the app as active instance. This allows using of `inject()` within the function to get access
|
|
1058
|
+
* to variables provided via `app.provide()`.
|
|
1059
|
+
*
|
|
1060
|
+
* @param fn - function to run with the app as active instance
|
|
1061
|
+
*/
|
|
1040
1062
|
runWithContext<T>(fn: () => T): T;
|
|
1041
1063
|
_uid: number;
|
|
1042
1064
|
_component: GenericComponent;
|
|
@@ -1045,28 +1067,28 @@ export interface App<HostElement = any> {
|
|
|
1045
1067
|
_context: AppContext;
|
|
1046
1068
|
_instance: GenericComponentInstance | null;
|
|
1047
1069
|
/**
|
|
1048
|
-
|
|
1049
|
-
|
|
1070
|
+
* v2 compat only
|
|
1071
|
+
*/
|
|
1050
1072
|
filter?(name: string): Function | undefined;
|
|
1051
1073
|
filter?(name: string, filter: Function): this;
|
|
1052
1074
|
}
|
|
1053
1075
|
export type OptionMergeFunction = (to: unknown, from: unknown) => any;
|
|
1054
1076
|
/**
|
|
1055
|
-
* Shared app config between vdom and vapor
|
|
1056
|
-
*/
|
|
1077
|
+
* Shared app config between vdom and vapor
|
|
1078
|
+
*/
|
|
1057
1079
|
interface GenericAppConfig {
|
|
1058
1080
|
performance?: boolean;
|
|
1059
1081
|
errorHandler?: (err: unknown, instance: ComponentPublicInstance | null, info: string) => void;
|
|
1060
1082
|
warnHandler?: (msg: string, instance: ComponentPublicInstance | null, trace: string) => void;
|
|
1061
1083
|
/**
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1084
|
+
* Whether to throw unhandled errors in production.
|
|
1085
|
+
* Default is `false` to avoid crashing on any error (and only logs it)
|
|
1086
|
+
* But in some cases, e.g. SSR, throwing might be more desirable.
|
|
1087
|
+
*/
|
|
1066
1088
|
throwUnhandledErrorInProduction?: boolean;
|
|
1067
1089
|
/**
|
|
1068
|
-
|
|
1069
|
-
|
|
1090
|
+
* Prefix for all useId() calls within this app
|
|
1091
|
+
*/
|
|
1070
1092
|
idPrefix?: string;
|
|
1071
1093
|
}
|
|
1072
1094
|
export interface AppConfig extends GenericAppConfig {
|
|
@@ -1074,18 +1096,18 @@ export interface AppConfig extends GenericAppConfig {
|
|
|
1074
1096
|
optionMergeStrategies: Record<string, OptionMergeFunction>;
|
|
1075
1097
|
globalProperties: ComponentCustomProperties & Record<string, any>;
|
|
1076
1098
|
/**
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1099
|
+
* Options to pass to `@vue/compiler-dom`.
|
|
1100
|
+
* Only supported in runtime compiler build.
|
|
1101
|
+
*/
|
|
1080
1102
|
compilerOptions: RuntimeCompilerOptions;
|
|
1081
1103
|
/**
|
|
1082
|
-
|
|
1083
|
-
|
|
1104
|
+
* @deprecated use config.compilerOptions.isCustomElement
|
|
1105
|
+
*/
|
|
1084
1106
|
isCustomElement?: (tag: string) => boolean;
|
|
1085
1107
|
}
|
|
1086
1108
|
/**
|
|
1087
|
-
* Minimal app context shared between vdom and vapor
|
|
1088
|
-
*/
|
|
1109
|
+
* Minimal app context shared between vdom and vapor
|
|
1110
|
+
*/
|
|
1089
1111
|
export interface GenericAppContext {
|
|
1090
1112
|
app: App;
|
|
1091
1113
|
config: GenericAppConfig;
|
|
@@ -1104,7 +1126,7 @@ export type ObjectPlugin<Options = any[]> = {
|
|
|
1104
1126
|
install: PluginInstallFunction<Options>;
|
|
1105
1127
|
};
|
|
1106
1128
|
export type FunctionPlugin<Options = any[]> = PluginInstallFunction<Options> & Partial<ObjectPlugin<Options>>;
|
|
1107
|
-
export type Plugin<Options = any[], P extends unknown[] =
|
|
1129
|
+
export type Plugin<Options = any[], P extends unknown[] = Options extends unknown[] ? Options : [Options]> = FunctionPlugin<P> | ObjectPlugin<P>;
|
|
1108
1130
|
export type CreateAppFunction<HostElement, Comp = Component> = (rootComponent: Comp, rootProps?: Data | null) => App<HostElement>;
|
|
1109
1131
|
//#endregion
|
|
1110
1132
|
//#region temp/packages/runtime-core/src/components/Teleport.d.ts
|
|
@@ -1118,12 +1140,7 @@ declare const TeleportImpl: {
|
|
|
1118
1140
|
name: string;
|
|
1119
1141
|
__isTeleport: boolean;
|
|
1120
1142
|
process(n1: TeleportVNode | null, n2: TeleportVNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, internals: RendererInternals): void;
|
|
1121
|
-
remove(vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, {
|
|
1122
|
-
um: unmount,
|
|
1123
|
-
o: {
|
|
1124
|
-
remove: hostRemove
|
|
1125
|
-
}
|
|
1126
|
-
}: RendererInternals, doRemove: boolean): void;
|
|
1143
|
+
remove(vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, { um: unmount, o: { remove: hostRemove } }: RendererInternals, doRemove: boolean): void;
|
|
1127
1144
|
move: typeof moveTeleport;
|
|
1128
1145
|
hydrate: typeof hydrateTeleport;
|
|
1129
1146
|
};
|
|
@@ -1132,21 +1149,8 @@ declare enum TeleportMoveTypes {
|
|
|
1132
1149
|
TOGGLE = 1,
|
|
1133
1150
|
REORDER = 2
|
|
1134
1151
|
}
|
|
1135
|
-
declare function moveTeleport(vnode: VNode, container: RendererElement, parentAnchor: RendererNode | null, {
|
|
1136
|
-
|
|
1137
|
-
insert
|
|
1138
|
-
},
|
|
1139
|
-
m: move
|
|
1140
|
-
}: RendererInternals, parentComponent: ComponentInternalInstance | null, moveType?: TeleportMoveTypes): void;
|
|
1141
|
-
declare function hydrateTeleport(node: Node, vnode: TeleportVNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean, {
|
|
1142
|
-
o: {
|
|
1143
|
-
nextSibling,
|
|
1144
|
-
parentNode,
|
|
1145
|
-
querySelector,
|
|
1146
|
-
insert,
|
|
1147
|
-
createText
|
|
1148
|
-
}
|
|
1149
|
-
}: RendererInternals<Node, Element>, hydrateChildren: (node: Node | null, vnode: VNode, container: Element, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null;
|
|
1152
|
+
declare function moveTeleport(vnode: VNode, container: RendererElement, parentAnchor: RendererNode | null, { o: { insert }, m: move }: RendererInternals, parentComponent: ComponentInternalInstance | null, moveType?: TeleportMoveTypes): void;
|
|
1153
|
+
declare function hydrateTeleport(node: Node, vnode: TeleportVNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean, { o: { nextSibling, parentNode, querySelector, insert, createText } }: RendererInternals<Node, Element>, hydrateChildren: (node: Node | null, vnode: VNode, container: Element, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null;
|
|
1150
1154
|
export declare const Teleport: {
|
|
1151
1155
|
__isTeleport: true;
|
|
1152
1156
|
new (): {
|
|
@@ -1159,17 +1163,17 @@ export declare const Teleport: {
|
|
|
1159
1163
|
//#endregion
|
|
1160
1164
|
//#region temp/packages/runtime-core/src/helpers/resolveAssets.d.ts
|
|
1161
1165
|
/**
|
|
1162
|
-
* @private
|
|
1163
|
-
*/
|
|
1166
|
+
* @private
|
|
1167
|
+
*/
|
|
1164
1168
|
export declare function resolveComponent(name: string, maybeSelfReference?: boolean): ConcreteComponent | string;
|
|
1165
1169
|
export declare const NULL_DYNAMIC_COMPONENT: unique symbol;
|
|
1166
1170
|
/**
|
|
1167
|
-
* @private
|
|
1168
|
-
*/
|
|
1171
|
+
* @private
|
|
1172
|
+
*/
|
|
1169
1173
|
export declare function resolveDynamicComponent(component: unknown): VNodeTypes;
|
|
1170
1174
|
/**
|
|
1171
|
-
* @private
|
|
1172
|
-
*/
|
|
1175
|
+
* @private
|
|
1176
|
+
*/
|
|
1173
1177
|
export declare function resolveDirective(name: string): Directive | undefined;
|
|
1174
1178
|
//#endregion
|
|
1175
1179
|
//#region temp/packages/runtime-core/src/vnode.d.ts
|
|
@@ -1187,20 +1191,20 @@ export type VNodeTypes = string | VNode | Component | typeof Text | typeof Stati
|
|
|
1187
1191
|
export type VNodeRef = string | Ref$1 | ((ref: Element | ComponentPublicInstance | null, refs: Record<string, any>) => void);
|
|
1188
1192
|
type VNodeNormalizedRefAtom = {
|
|
1189
1193
|
/**
|
|
1190
|
-
|
|
1191
|
-
|
|
1194
|
+
* component instance
|
|
1195
|
+
*/
|
|
1192
1196
|
i: ComponentInternalInstance;
|
|
1193
1197
|
/**
|
|
1194
|
-
|
|
1195
|
-
|
|
1198
|
+
* Actual ref
|
|
1199
|
+
*/
|
|
1196
1200
|
r: VNodeRef;
|
|
1197
1201
|
/**
|
|
1198
|
-
|
|
1199
|
-
|
|
1202
|
+
* setup ref key
|
|
1203
|
+
*/
|
|
1200
1204
|
k?: string;
|
|
1201
1205
|
/**
|
|
1202
|
-
|
|
1203
|
-
|
|
1206
|
+
* refInFor marker
|
|
1207
|
+
*/
|
|
1204
1208
|
f?: boolean;
|
|
1205
1209
|
};
|
|
1206
1210
|
type VNodeNormalizedRef = VNodeNormalizedRefAtom | VNodeNormalizedRefAtom[];
|
|
@@ -1230,9 +1234,9 @@ export interface VNode<HostNode = RendererNode, HostElement = RendererElement, E
|
|
|
1230
1234
|
key: PropertyKey | null;
|
|
1231
1235
|
ref: VNodeNormalizedRef | null;
|
|
1232
1236
|
/**
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1237
|
+
* SFC only. This is assigned on vnode creation using currentScopeId
|
|
1238
|
+
* which is set alongside currentRenderingInstance.
|
|
1239
|
+
*/
|
|
1236
1240
|
scopeId: string | null;
|
|
1237
1241
|
children: VNodeNormalizedChildren;
|
|
1238
1242
|
component: ComponentInternalInstance | null;
|
|
@@ -1250,59 +1254,59 @@ export interface VNode<HostNode = RendererNode, HostElement = RendererElement, E
|
|
|
1250
1254
|
appContext: AppContext | null;
|
|
1251
1255
|
}
|
|
1252
1256
|
/**
|
|
1253
|
-
* Open a block.
|
|
1254
|
-
* This must be called before `createBlock`. It cannot be part of `createBlock`
|
|
1255
|
-
* because the children of the block are evaluated before `createBlock` itself
|
|
1256
|
-
* is called. The generated code typically looks like this:
|
|
1257
|
-
*
|
|
1258
|
-
* ```js
|
|
1259
|
-
* function render() {
|
|
1260
|
-
* return (openBlock(),createBlock('div', null, [...]))
|
|
1261
|
-
* }
|
|
1262
|
-
* ```
|
|
1263
|
-
* disableTracking is true when creating a v-for fragment block, since a v-for
|
|
1264
|
-
* fragment always diffs its children.
|
|
1265
|
-
*
|
|
1266
|
-
* @private
|
|
1267
|
-
*/
|
|
1257
|
+
* Open a block.
|
|
1258
|
+
* This must be called before `createBlock`. It cannot be part of `createBlock`
|
|
1259
|
+
* because the children of the block are evaluated before `createBlock` itself
|
|
1260
|
+
* is called. The generated code typically looks like this:
|
|
1261
|
+
*
|
|
1262
|
+
* ```js
|
|
1263
|
+
* function render() {
|
|
1264
|
+
* return (openBlock(),createBlock('div', null, [...]))
|
|
1265
|
+
* }
|
|
1266
|
+
* ```
|
|
1267
|
+
* disableTracking is true when creating a v-for fragment block, since a v-for
|
|
1268
|
+
* fragment always diffs its children.
|
|
1269
|
+
*
|
|
1270
|
+
* @private
|
|
1271
|
+
*/
|
|
1268
1272
|
export declare function openBlock(disableTracking?: boolean): void;
|
|
1269
1273
|
/**
|
|
1270
|
-
* Block tracking sometimes needs to be disabled, for example during the
|
|
1271
|
-
* creation of a tree that needs to be cached by v-once. The compiler generates
|
|
1272
|
-
* code like this:
|
|
1273
|
-
*
|
|
1274
|
-
* ``` js
|
|
1275
|
-
* _cache[1] || (
|
|
1276
|
-
* setBlockTracking(-1, true),
|
|
1277
|
-
* _cache[1] = createVNode(...),
|
|
1278
|
-
* setBlockTracking(1),
|
|
1279
|
-
* _cache[1]
|
|
1280
|
-
* )
|
|
1281
|
-
* ```
|
|
1282
|
-
*
|
|
1283
|
-
* @private
|
|
1284
|
-
*/
|
|
1274
|
+
* Block tracking sometimes needs to be disabled, for example during the
|
|
1275
|
+
* creation of a tree that needs to be cached by v-once. The compiler generates
|
|
1276
|
+
* code like this:
|
|
1277
|
+
*
|
|
1278
|
+
* ``` js
|
|
1279
|
+
* _cache[1] || (
|
|
1280
|
+
* setBlockTracking(-1, true),
|
|
1281
|
+
* _cache[1] = createVNode(...),
|
|
1282
|
+
* setBlockTracking(1),
|
|
1283
|
+
* _cache[1]
|
|
1284
|
+
* )
|
|
1285
|
+
* ```
|
|
1286
|
+
*
|
|
1287
|
+
* @private
|
|
1288
|
+
*/
|
|
1285
1289
|
export declare function setBlockTracking(value: number, inVOnce?: boolean): void;
|
|
1286
1290
|
/**
|
|
1287
|
-
* @private
|
|
1288
|
-
*/
|
|
1291
|
+
* @private
|
|
1292
|
+
*/
|
|
1289
1293
|
export declare function createElementBlock(type: string | typeof Fragment, props?: Record<string, any> | null, children?: any, patchFlag?: number, dynamicProps?: string[], shapeFlag?: number): VNode;
|
|
1290
1294
|
/**
|
|
1291
|
-
* Create a block root vnode. Takes the same exact arguments as `createVNode`.
|
|
1292
|
-
* A block root keeps track of dynamic nodes within the block in the
|
|
1293
|
-
* `dynamicChildren` array.
|
|
1294
|
-
*
|
|
1295
|
-
* @private
|
|
1296
|
-
*/
|
|
1295
|
+
* Create a block root vnode. Takes the same exact arguments as `createVNode`.
|
|
1296
|
+
* A block root keeps track of dynamic nodes within the block in the
|
|
1297
|
+
* `dynamicChildren` array.
|
|
1298
|
+
*
|
|
1299
|
+
* @private
|
|
1300
|
+
*/
|
|
1297
1301
|
export declare function createBlock(type: VNodeTypes | ClassComponent, props?: Record<string, any> | null, children?: any, patchFlag?: number, dynamicProps?: string[]): VNode;
|
|
1298
1302
|
export declare function isVNode(value: any): value is VNode;
|
|
1299
1303
|
declare let vnodeArgsTransformer: ((args: Parameters<typeof _createVNode>, instance: ComponentInternalInstance | null) => Parameters<typeof _createVNode>) | undefined;
|
|
1300
1304
|
/**
|
|
1301
|
-
* Internal API for registering an arguments transform for createVNode
|
|
1302
|
-
* used for creating stubs in the test-utils
|
|
1303
|
-
* It is *internal* but needs to be exposed for test-utils to pick up proper
|
|
1304
|
-
* typings
|
|
1305
|
-
*/
|
|
1305
|
+
* Internal API for registering an arguments transform for createVNode
|
|
1306
|
+
* used for creating stubs in the test-utils
|
|
1307
|
+
* It is *internal* but needs to be exposed for test-utils to pick up proper
|
|
1308
|
+
* typings
|
|
1309
|
+
*/
|
|
1306
1310
|
export declare function transformVNodeArgs(transformer?: typeof vnodeArgsTransformer): void;
|
|
1307
1311
|
export declare function createBaseVNode(type: VNodeTypes | ClassComponent | typeof NULL_DYNAMIC_COMPONENT, props?: (Data & VNodeProps) | null, children?: unknown, patchFlag?: number, dynamicProps?: string[] | null, shapeFlag?: number, isBlockNode?: boolean, needFullChildrenNormalization?: boolean): VNode;
|
|
1308
1312
|
export declare const createVNode: typeof _createVNode;
|
|
@@ -1310,16 +1314,16 @@ declare function _createVNode(type: VNodeTypes | ClassComponent | typeof NULL_DY
|
|
|
1310
1314
|
export declare function guardReactiveProps(props: (Data & VNodeProps) | null): (Data & VNodeProps) | null;
|
|
1311
1315
|
export declare function cloneVNode<T, U>(vnode: VNode<T, U>, extraProps?: (Data & VNodeProps) | null, mergeRef?: boolean, cloneTransition?: boolean): VNode<T, U>;
|
|
1312
1316
|
/**
|
|
1313
|
-
* @private
|
|
1314
|
-
*/
|
|
1317
|
+
* @private
|
|
1318
|
+
*/
|
|
1315
1319
|
export declare function createTextVNode(text?: string, flag?: number): VNode;
|
|
1316
1320
|
/**
|
|
1317
|
-
* @private
|
|
1318
|
-
*/
|
|
1321
|
+
* @private
|
|
1322
|
+
*/
|
|
1319
1323
|
export declare function createStaticVNode(content: string, numberOfNodes: number): VNode;
|
|
1320
1324
|
/**
|
|
1321
|
-
* @private
|
|
1322
|
-
*/
|
|
1325
|
+
* @private
|
|
1326
|
+
*/
|
|
1323
1327
|
export declare function createCommentVNode(text?: string, asBlock?: boolean): VNode;
|
|
1324
1328
|
export declare function mergeProps(...args: (Data & VNodeProps)[]): Data;
|
|
1325
1329
|
//#endregion
|
|
@@ -1329,62 +1333,62 @@ export declare const getCurrentInstance: () => ComponentInternalInstance | null;
|
|
|
1329
1333
|
//#region temp/packages/runtime-core/src/component.d.ts
|
|
1330
1334
|
type Data = Record<string, unknown>;
|
|
1331
1335
|
/**
|
|
1332
|
-
* For extending allowed non-declared attrs on components in TSX
|
|
1333
|
-
*/
|
|
1336
|
+
* For extending allowed non-declared attrs on components in TSX
|
|
1337
|
+
*/
|
|
1334
1338
|
export interface AllowedAttrs {}
|
|
1335
1339
|
export type Attrs = Data & AllowedAttrs;
|
|
1336
1340
|
/**
|
|
1337
|
-
* Public utility type for extracting the instance type of a component.
|
|
1338
|
-
* Works with all valid component definition types. This is intended to replace
|
|
1339
|
-
* the usage of `InstanceType<typeof Comp>` which only works for
|
|
1340
|
-
* constructor-based component definition types.
|
|
1341
|
-
*
|
|
1342
|
-
* @example
|
|
1343
|
-
* ```ts
|
|
1344
|
-
* const MyComp = { ... }
|
|
1345
|
-
* declare const instance: ComponentInstance<typeof MyComp>
|
|
1346
|
-
* ```
|
|
1347
|
-
*/
|
|
1341
|
+
* Public utility type for extracting the instance type of a component.
|
|
1342
|
+
* Works with all valid component definition types. This is intended to replace
|
|
1343
|
+
* the usage of `InstanceType<typeof Comp>` which only works for
|
|
1344
|
+
* constructor-based component definition types.
|
|
1345
|
+
*
|
|
1346
|
+
* @example
|
|
1347
|
+
* ```ts
|
|
1348
|
+
* const MyComp = { ... }
|
|
1349
|
+
* declare const instance: ComponentInstance<typeof MyComp>
|
|
1350
|
+
* ```
|
|
1351
|
+
*/
|
|
1348
1352
|
export type ComponentInstance<T> = T extends {
|
|
1349
1353
|
new (): ComponentPublicInstance;
|
|
1350
1354
|
} ? InstanceType<T> : T extends FunctionalComponent<infer Props, infer Emits> ? ComponentPublicInstance<Props, {}, {}, {}, {}, ShortEmitsToObject<Emits>> : T extends Component<infer PropsOrInstance, infer RawBindings, infer D, infer C, infer M> ? PropsOrInstance extends {
|
|
1351
1355
|
$props: unknown;
|
|
1352
1356
|
} ? PropsOrInstance : ComponentPublicInstance<unknown extends PropsOrInstance ? {} : PropsOrInstance, unknown extends RawBindings ? {} : RawBindings, unknown extends D ? {} : D, C, M> : never;
|
|
1353
1357
|
/**
|
|
1354
|
-
* For extending allowed non-declared props on components in TSX
|
|
1355
|
-
*/
|
|
1358
|
+
* For extending allowed non-declared props on components in TSX
|
|
1359
|
+
*/
|
|
1356
1360
|
export interface ComponentCustomProps {}
|
|
1357
1361
|
/**
|
|
1358
|
-
* For globally defined Directives
|
|
1359
|
-
* Here is an example of adding a directive `VTooltip` as global directive:
|
|
1360
|
-
*
|
|
1361
|
-
* @example
|
|
1362
|
-
* ```ts
|
|
1363
|
-
* import VTooltip from 'v-tooltip'
|
|
1364
|
-
*
|
|
1365
|
-
* declare module '@vue/runtime-core' {
|
|
1366
|
-
* interface GlobalDirectives {
|
|
1367
|
-
* VTooltip
|
|
1368
|
-
* }
|
|
1369
|
-
* }
|
|
1370
|
-
* ```
|
|
1371
|
-
*/
|
|
1362
|
+
* For globally defined Directives
|
|
1363
|
+
* Here is an example of adding a directive `VTooltip` as global directive:
|
|
1364
|
+
*
|
|
1365
|
+
* @example
|
|
1366
|
+
* ```ts
|
|
1367
|
+
* import VTooltip from 'v-tooltip'
|
|
1368
|
+
*
|
|
1369
|
+
* declare module '@vue/runtime-core' {
|
|
1370
|
+
* interface GlobalDirectives {
|
|
1371
|
+
* VTooltip
|
|
1372
|
+
* }
|
|
1373
|
+
* }
|
|
1374
|
+
* ```
|
|
1375
|
+
*/
|
|
1372
1376
|
export interface GlobalDirectives {}
|
|
1373
1377
|
/**
|
|
1374
|
-
* For globally defined Components
|
|
1375
|
-
* Here is an example of adding a component `RouterView` as global component:
|
|
1376
|
-
*
|
|
1377
|
-
* @example
|
|
1378
|
-
* ```ts
|
|
1379
|
-
* import { RouterView } from 'vue-router'
|
|
1380
|
-
*
|
|
1381
|
-
* declare module '@vue/runtime-core' {
|
|
1382
|
-
* interface GlobalComponents {
|
|
1383
|
-
* RouterView
|
|
1384
|
-
* }
|
|
1385
|
-
* }
|
|
1386
|
-
* ```
|
|
1387
|
-
*/
|
|
1378
|
+
* For globally defined Components
|
|
1379
|
+
* Here is an example of adding a component `RouterView` as global component:
|
|
1380
|
+
*
|
|
1381
|
+
* @example
|
|
1382
|
+
* ```ts
|
|
1383
|
+
* import { RouterView } from 'vue-router'
|
|
1384
|
+
*
|
|
1385
|
+
* declare module '@vue/runtime-core' {
|
|
1386
|
+
* interface GlobalComponents {
|
|
1387
|
+
* RouterView
|
|
1388
|
+
* }
|
|
1389
|
+
* }
|
|
1390
|
+
* ```
|
|
1391
|
+
*/
|
|
1388
1392
|
export interface GlobalComponents {
|
|
1389
1393
|
Teleport: DefineComponent<TeleportProps>;
|
|
1390
1394
|
Suspense: DefineComponent<SuspenseProps>;
|
|
@@ -1392,36 +1396,36 @@ export interface GlobalComponents {
|
|
|
1392
1396
|
BaseTransition: DefineComponent<BaseTransitionProps>;
|
|
1393
1397
|
}
|
|
1394
1398
|
/**
|
|
1395
|
-
* Default allowed non-declared props on component in TSX
|
|
1396
|
-
*/
|
|
1399
|
+
* Default allowed non-declared props on component in TSX
|
|
1400
|
+
*/
|
|
1397
1401
|
export interface AllowedComponentProps {
|
|
1398
1402
|
class?: unknown;
|
|
1399
1403
|
style?: unknown;
|
|
1400
1404
|
}
|
|
1401
1405
|
export interface ComponentInternalOptions {
|
|
1402
1406
|
/**
|
|
1403
|
-
|
|
1404
|
-
|
|
1407
|
+
* indicates vapor component
|
|
1408
|
+
*/
|
|
1405
1409
|
__vapor?: boolean;
|
|
1406
1410
|
/**
|
|
1407
|
-
|
|
1408
|
-
|
|
1411
|
+
* whether this vapor component has multiple root nodes
|
|
1412
|
+
*/
|
|
1409
1413
|
__multiRoot?: boolean;
|
|
1410
1414
|
/**
|
|
1411
|
-
|
|
1412
|
-
|
|
1415
|
+
* indicates keep-alive component
|
|
1416
|
+
*/
|
|
1413
1417
|
__isKeepAlive?: boolean;
|
|
1414
1418
|
/**
|
|
1415
|
-
|
|
1416
|
-
|
|
1419
|
+
* Compat build only, for bailing out of certain compatibility behavior
|
|
1420
|
+
*/
|
|
1417
1421
|
__isBuiltIn?: boolean;
|
|
1418
1422
|
/**
|
|
1419
|
-
|
|
1420
|
-
|
|
1423
|
+
* This one should be exposed so that devtools can make use of it
|
|
1424
|
+
*/
|
|
1421
1425
|
__file?: string;
|
|
1422
1426
|
/**
|
|
1423
|
-
|
|
1424
|
-
|
|
1427
|
+
* name inferred from filename
|
|
1428
|
+
*/
|
|
1425
1429
|
__name?: string;
|
|
1426
1430
|
}
|
|
1427
1431
|
export interface AsyncComponentInternalOptions<R = ConcreteComponent, I = ComponentInternalInstance> {}
|
|
@@ -1439,24 +1443,24 @@ interface ClassComponent {
|
|
|
1439
1443
|
__vccOpts: ComponentOptions;
|
|
1440
1444
|
}
|
|
1441
1445
|
/**
|
|
1442
|
-
* Type used where a function accepts both vdom and vapor components.
|
|
1443
|
-
*/
|
|
1446
|
+
* Type used where a function accepts both vdom and vapor components.
|
|
1447
|
+
*/
|
|
1444
1448
|
type GenericComponent = ({
|
|
1445
1449
|
name?: string;
|
|
1446
1450
|
} | ((() => any) & {
|
|
1447
1451
|
displayName?: string;
|
|
1448
1452
|
})) & ComponentInternalOptions;
|
|
1449
1453
|
/**
|
|
1450
|
-
* Concrete component type matches its actual value: it's either an options
|
|
1451
|
-
* object, or a function. Use this where the code expects to work with actual
|
|
1452
|
-
* values, e.g. checking if its a function or not. This is mostly for internal
|
|
1453
|
-
* implementation code.
|
|
1454
|
-
*/
|
|
1454
|
+
* Concrete component type matches its actual value: it's either an options
|
|
1455
|
+
* object, or a function. Use this where the code expects to work with actual
|
|
1456
|
+
* values, e.g. checking if its a function or not. This is mostly for internal
|
|
1457
|
+
* implementation code.
|
|
1458
|
+
*/
|
|
1455
1459
|
export type ConcreteComponent<Props = {}, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, E extends EmitsOptions | Record<string, any[]> = {}, S extends Record<string, any> = any> = ComponentOptions<Props, RawBindings, D, C, M> | FunctionalComponent<Props, E, S>;
|
|
1456
1460
|
/**
|
|
1457
|
-
* A type used in public APIs where a component type is expected.
|
|
1458
|
-
* The constructor type is an artificial type returned by defineComponent().
|
|
1459
|
-
*/
|
|
1461
|
+
* A type used in public APIs where a component type is expected.
|
|
1462
|
+
* The constructor type is an artificial type returned by defineComponent().
|
|
1463
|
+
*/
|
|
1460
1464
|
export type Component<PropsOrInstance = any, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, E extends EmitsOptions | Record<string, any[]> = {}, S extends Record<string, any> = any> = ConcreteComponent<PropsOrInstance, RawBindings, D, C, M, E, S> | ComponentPublicInstanceConstructor<PropsOrInstance>;
|
|
1461
1465
|
export type LifecycleHook<TFn = Function> = (TFn & SchedulerJob)[] | null;
|
|
1462
1466
|
export type SetupContext<E = EmitsOptions, S extends SlotsType = {}> = E extends any ? {
|
|
@@ -1466,10 +1470,10 @@ export type SetupContext<E = EmitsOptions, S extends SlotsType = {}> = E extends
|
|
|
1466
1470
|
expose: <Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed) => void;
|
|
1467
1471
|
} : never;
|
|
1468
1472
|
/**
|
|
1469
|
-
* Base component instance interface that is shared between vdom mode and vapor
|
|
1470
|
-
* mode, so that we can have a mixed instance tree and reuse core logic that
|
|
1471
|
-
* operate on both.
|
|
1472
|
-
*/
|
|
1473
|
+
* Base component instance interface that is shared between vdom mode and vapor
|
|
1474
|
+
* mode, so that we can have a mixed instance tree and reuse core logic that
|
|
1475
|
+
* operate on both.
|
|
1476
|
+
*/
|
|
1473
1477
|
export interface GenericComponentInstance {
|
|
1474
1478
|
vapor?: boolean;
|
|
1475
1479
|
uid: number;
|
|
@@ -1478,8 +1482,8 @@ export interface GenericComponentInstance {
|
|
|
1478
1482
|
parent: GenericComponentInstance | null;
|
|
1479
1483
|
appContext: GenericAppContext;
|
|
1480
1484
|
/**
|
|
1481
|
-
|
|
1482
|
-
|
|
1485
|
+
* render function will have different types between vdom and vapor
|
|
1486
|
+
*/
|
|
1483
1487
|
render?: Function | null;
|
|
1484
1488
|
props: Data;
|
|
1485
1489
|
attrs: Data;
|
|
@@ -1491,16 +1495,16 @@ export interface GenericComponentInstance {
|
|
|
1491
1495
|
isUnmounted: boolean;
|
|
1492
1496
|
isDeactivated: boolean;
|
|
1493
1497
|
/**
|
|
1494
|
-
|
|
1495
|
-
|
|
1498
|
+
* Public instance proxy, vdom only
|
|
1499
|
+
*/
|
|
1496
1500
|
proxy?: any;
|
|
1497
1501
|
vnode?: VNode;
|
|
1498
1502
|
subTree?: VNode;
|
|
1499
1503
|
}
|
|
1500
1504
|
/**
|
|
1501
|
-
* We expose a subset of properties on the internal instance as they are
|
|
1502
|
-
* useful for advanced external libraries and tools.
|
|
1503
|
-
*/
|
|
1505
|
+
* We expose a subset of properties on the internal instance as they are
|
|
1506
|
+
* useful for advanced external libraries and tools.
|
|
1507
|
+
*/
|
|
1504
1508
|
export interface ComponentInternalInstance extends GenericComponentInstance {
|
|
1505
1509
|
vapor?: never;
|
|
1506
1510
|
uid: number;
|
|
@@ -1509,24 +1513,24 @@ export interface ComponentInternalInstance extends GenericComponentInstance {
|
|
|
1509
1513
|
root: GenericComponentInstance;
|
|
1510
1514
|
appContext: AppContext;
|
|
1511
1515
|
/**
|
|
1512
|
-
|
|
1513
|
-
|
|
1516
|
+
* Vnode representing this component in its parent's vdom tree
|
|
1517
|
+
*/
|
|
1514
1518
|
vnode: VNode;
|
|
1515
1519
|
/**
|
|
1516
|
-
|
|
1517
|
-
|
|
1520
|
+
* Root vnode of this component's own vdom tree
|
|
1521
|
+
*/
|
|
1518
1522
|
subTree: VNode;
|
|
1519
1523
|
/**
|
|
1520
|
-
|
|
1521
|
-
|
|
1524
|
+
* Render effect instance
|
|
1525
|
+
*/
|
|
1522
1526
|
effect: ReactiveEffect$1;
|
|
1523
1527
|
/**
|
|
1524
|
-
|
|
1525
|
-
|
|
1528
|
+
* Force update render effect
|
|
1529
|
+
*/
|
|
1526
1530
|
update: () => void;
|
|
1527
1531
|
/**
|
|
1528
|
-
|
|
1529
|
-
|
|
1532
|
+
* Render effect job to be passed to scheduler (checks if dirty)
|
|
1533
|
+
*/
|
|
1530
1534
|
job: SchedulerJob;
|
|
1531
1535
|
proxy: ComponentPublicInstance | null;
|
|
1532
1536
|
data: Data;
|
|
@@ -1535,16 +1539,16 @@ export interface ComponentInternalInstance extends GenericComponentInstance {
|
|
|
1535
1539
|
exposeProxy: Record<string, any> | null;
|
|
1536
1540
|
}
|
|
1537
1541
|
/**
|
|
1538
|
-
* For runtime-dom to register the compiler.
|
|
1539
|
-
* Note the exported method uses any to avoid d.ts relying on the compiler types.
|
|
1540
|
-
*/
|
|
1542
|
+
* For runtime-dom to register the compiler.
|
|
1543
|
+
* Note the exported method uses any to avoid d.ts relying on the compiler types.
|
|
1544
|
+
*/
|
|
1541
1545
|
export declare function registerRuntimeCompiler(_compile: any): void;
|
|
1542
1546
|
export declare const isRuntimeOnly: () => boolean;
|
|
1543
1547
|
export interface ComponentCustomElementInterface {}
|
|
1544
1548
|
//#endregion
|
|
1545
1549
|
//#region temp/packages/runtime-core/src/apiWatch.d.ts
|
|
1546
1550
|
type MaybeUndefined<T, I> = I extends true ? T | undefined : T;
|
|
1547
|
-
type MapSources<T, Immediate> = { [K in keyof T]: T[K] extends WatchSource$1<infer V> ? MaybeUndefined<V, Immediate> : T[K] extends object ? MaybeUndefined<T[K], Immediate> : never };
|
|
1551
|
+
type MapSources<T, Immediate> = { [K in keyof T]: T[K] extends WatchSource$1<infer V> ? MaybeUndefined<V, Immediate> : T[K] extends object ? MaybeUndefined<T[K], Immediate> : never; };
|
|
1548
1552
|
export interface WatchEffectOptions extends DebuggerOptions$1 {
|
|
1549
1553
|
flush?: "pre" | "post" | "sync";
|
|
1550
1554
|
}
|
|
@@ -1564,14 +1568,14 @@ export declare function watch<T extends object, Immediate extends Readonly<boole
|
|
|
1564
1568
|
//#endregion
|
|
1565
1569
|
//#region temp/packages/runtime-core/src/hydrationStrategies.d.ts
|
|
1566
1570
|
/**
|
|
1567
|
-
* A lazy hydration strategy for async components.
|
|
1568
|
-
* @param hydrate - call this to perform the actual hydration.
|
|
1569
|
-
* @param forEachElement - iterate through the root elements of the component's
|
|
1570
|
-
* non-hydrated DOM, accounting for possible fragments.
|
|
1571
|
-
* @returns a teardown function to be called if the async component is unmounted
|
|
1572
|
-
* before it is hydrated. This can be used to e.g. remove DOM event
|
|
1573
|
-
* listeners.
|
|
1574
|
-
*/
|
|
1571
|
+
* A lazy hydration strategy for async components.
|
|
1572
|
+
* @param hydrate - call this to perform the actual hydration.
|
|
1573
|
+
* @param forEachElement - iterate through the root elements of the component's
|
|
1574
|
+
* non-hydrated DOM, accounting for possible fragments.
|
|
1575
|
+
* @returns a teardown function to be called if the async component is unmounted
|
|
1576
|
+
* before it is hydrated. This can be used to e.g. remove DOM event
|
|
1577
|
+
* listeners.
|
|
1578
|
+
*/
|
|
1575
1579
|
export type HydrationStrategy = (hydrate: () => void, forEachElement: (cb: (el: Element) => any) => void) => (() => void) | void;
|
|
1576
1580
|
export type HydrationStrategyFactory<Options> = (options?: Options) => HydrationStrategy;
|
|
1577
1581
|
export declare const hydrateOnIdle: HydrationStrategyFactory<number>;
|
|
@@ -1622,7 +1626,7 @@ interface Constructor<P = any> {
|
|
|
1622
1626
|
$props: P;
|
|
1623
1627
|
};
|
|
1624
1628
|
}
|
|
1625
|
-
type HTMLElementEventHandler = { [K in keyof HTMLElementEventMap as `on${Capitalize<K>}`]?: (ev: HTMLElementEventMap[K]) => any };
|
|
1629
|
+
type HTMLElementEventHandler = { [K in keyof HTMLElementEventMap as `on${Capitalize<K>}`]?: (ev: HTMLElementEventMap[K]) => any; };
|
|
1626
1630
|
export declare function h<K extends keyof HTMLElementTagNameMap>(type: K, children?: RawChildren): VNode;
|
|
1627
1631
|
export declare function h<K extends keyof HTMLElementTagNameMap>(type: K, props?: (RawProps & HTMLElementEventHandler) | null, children?: RawChildren | RawSlots): VNode;
|
|
1628
1632
|
export declare function h(type: string, children?: RawChildren): VNode;
|
|
@@ -1694,9 +1698,9 @@ interface DevtoolsHook {
|
|
|
1694
1698
|
off: (event: string, handler: Function) => void;
|
|
1695
1699
|
appRecords: AppRecord[];
|
|
1696
1700
|
/**
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1701
|
+
* Added at https://github.com/vuejs/devtools/commit/f2ad51eea789006ab66942e5a27c0f0986a257f9
|
|
1702
|
+
* Returns whether the arg was buffered or not
|
|
1703
|
+
*/
|
|
1700
1704
|
cleanupBuffer?: (matchArg: unknown) => boolean;
|
|
1701
1705
|
}
|
|
1702
1706
|
declare function setDevtoolsHook$1(hook: DevtoolsHook, target: any): void;
|
|
@@ -1714,67 +1718,63 @@ declare function reload(id: string, newComp: HMRComponent): void;
|
|
|
1714
1718
|
//#endregion
|
|
1715
1719
|
//#region temp/packages/runtime-core/src/componentRenderContext.d.ts
|
|
1716
1720
|
/**
|
|
1717
|
-
* Set scope id when creating hoisted vnodes.
|
|
1718
|
-
* @private compiler helper
|
|
1719
|
-
*/
|
|
1721
|
+
* Set scope id when creating hoisted vnodes.
|
|
1722
|
+
* @private compiler helper
|
|
1723
|
+
*/
|
|
1720
1724
|
export declare function pushScopeId(id: string | null): void;
|
|
1721
1725
|
/**
|
|
1722
|
-
* Technically we no longer need this after 3.0.8 but we need to keep the same
|
|
1723
|
-
* API for backwards compat w/ code generated by compilers.
|
|
1724
|
-
* @private
|
|
1725
|
-
*/
|
|
1726
|
+
* Technically we no longer need this after 3.0.8 but we need to keep the same
|
|
1727
|
+
* API for backwards compat w/ code generated by compilers.
|
|
1728
|
+
* @private
|
|
1729
|
+
*/
|
|
1726
1730
|
export declare function popScopeId(): void;
|
|
1727
1731
|
/**
|
|
1728
|
-
* Only for backwards compat
|
|
1729
|
-
* @private
|
|
1730
|
-
*/
|
|
1732
|
+
* Only for backwards compat
|
|
1733
|
+
* @private
|
|
1734
|
+
*/
|
|
1731
1735
|
export declare const withScopeId: (_id: string) => typeof withCtx;
|
|
1732
1736
|
/**
|
|
1733
|
-
* Wrap a slot function to memoize current rendering instance
|
|
1734
|
-
* @private compiler helper
|
|
1735
|
-
*/
|
|
1737
|
+
* Wrap a slot function to memoize current rendering instance
|
|
1738
|
+
* @private compiler helper
|
|
1739
|
+
*/
|
|
1736
1740
|
export declare function withCtx(fn: Function, ctx?: ComponentInternalInstance | null, isNonScopedSlot?: boolean): Function;
|
|
1737
1741
|
//#endregion
|
|
1738
1742
|
//#region temp/packages/runtime-core/src/helpers/renderList.d.ts
|
|
1739
1743
|
/**
|
|
1740
|
-
* v-for string
|
|
1741
|
-
* @private
|
|
1742
|
-
*/
|
|
1744
|
+
* v-for string
|
|
1745
|
+
* @private
|
|
1746
|
+
*/
|
|
1743
1747
|
export declare function renderList(source: string, renderItem: (value: string, index: number) => VNodeChild): VNodeChild[];
|
|
1744
1748
|
/**
|
|
1745
|
-
* v-for number
|
|
1746
|
-
*/
|
|
1749
|
+
* v-for number
|
|
1750
|
+
*/
|
|
1747
1751
|
export declare function renderList(source: number, renderItem: (value: number, index: number) => VNodeChild): VNodeChild[];
|
|
1748
1752
|
/**
|
|
1749
|
-
* v-for array
|
|
1750
|
-
*/
|
|
1753
|
+
* v-for array
|
|
1754
|
+
*/
|
|
1751
1755
|
export declare function renderList<T>(source: T[], renderItem: (value: T, index: number) => VNodeChild): VNodeChild[];
|
|
1752
1756
|
/**
|
|
1753
|
-
* v-for iterable
|
|
1754
|
-
*/
|
|
1757
|
+
* v-for iterable
|
|
1758
|
+
*/
|
|
1755
1759
|
export declare function renderList<T>(source: Iterable<T>, renderItem: (value: T, index: number) => VNodeChild): VNodeChild[];
|
|
1756
1760
|
/**
|
|
1757
|
-
* v-for object
|
|
1758
|
-
*/
|
|
1761
|
+
* v-for object
|
|
1762
|
+
*/
|
|
1759
1763
|
export declare function renderList<T>(source: T, renderItem: <K extends keyof T>(value: T[K], key: string, index: number) => VNodeChild): VNodeChild[];
|
|
1760
1764
|
//#endregion
|
|
1761
1765
|
//#region temp/packages/runtime-core/src/helpers/toHandlers.d.ts
|
|
1762
1766
|
/**
|
|
1763
|
-
* For prefixing keys in v-on="obj" with "on"
|
|
1764
|
-
* @private
|
|
1765
|
-
*/
|
|
1767
|
+
* For prefixing keys in v-on="obj" with "on"
|
|
1768
|
+
* @private
|
|
1769
|
+
*/
|
|
1766
1770
|
export declare function toHandlers(obj: Record<string, any>, preserveCaseIfNecessary?: boolean): Record<string, any>;
|
|
1767
1771
|
//#endregion
|
|
1768
1772
|
//#region temp/packages/runtime-core/src/helpers/renderSlot.d.ts
|
|
1769
|
-
type SlotFallback = {
|
|
1770
|
-
(): VNodeArrayChildren;
|
|
1771
|
-
__vdom?: boolean;
|
|
1772
|
-
};
|
|
1773
1773
|
/**
|
|
1774
|
-
* Compiler runtime helper for rendering `<slot/>`
|
|
1775
|
-
* @private
|
|
1776
|
-
*/
|
|
1777
|
-
export declare function renderSlot(slots: Slots, name: string, props?: Data, fallback?:
|
|
1774
|
+
* Compiler runtime helper for rendering `<slot/>`
|
|
1775
|
+
* @private
|
|
1776
|
+
*/
|
|
1777
|
+
export declare function renderSlot(slots: Slots, name: string, props?: Data | null, fallback?: () => VNodeArrayChildren, noSlotted?: boolean, branchKey?: PropertyKey): VNode;
|
|
1778
1778
|
//#endregion
|
|
1779
1779
|
//#region temp/packages/runtime-core/src/helpers/createSlots.d.ts
|
|
1780
1780
|
type SSRSlot = (...args: any[]) => VNode[] | undefined;
|
|
@@ -1784,9 +1784,9 @@ interface CompiledSlotDescriptor {
|
|
|
1784
1784
|
key?: string;
|
|
1785
1785
|
}
|
|
1786
1786
|
/**
|
|
1787
|
-
* Compiler runtime helper for creating dynamic slots object
|
|
1788
|
-
* @private
|
|
1789
|
-
*/
|
|
1787
|
+
* Compiler runtime helper for creating dynamic slots object
|
|
1788
|
+
* @private
|
|
1789
|
+
*/
|
|
1790
1790
|
export declare function createSlots(slots: Record<string, SSRSlot>, dynamicSlots: (CompiledSlotDescriptor | CompiledSlotDescriptor[] | undefined)[]): Record<string, SSRSlot>;
|
|
1791
1791
|
//#endregion
|
|
1792
1792
|
//#region temp/packages/runtime-core/src/helpers/withMemo.d.ts
|
|
@@ -1796,28 +1796,28 @@ export declare function isMemoSame(cached: VNode, memo: any[]): boolean;
|
|
|
1796
1796
|
//#region temp/packages/runtime-core/src/compat/globalConfig.d.ts
|
|
1797
1797
|
export type LegacyConfig = {
|
|
1798
1798
|
/**
|
|
1799
|
-
|
|
1800
|
-
|
|
1799
|
+
* @deprecated `config.silent` option has been removed
|
|
1800
|
+
*/
|
|
1801
1801
|
silent?: boolean;
|
|
1802
1802
|
/**
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1803
|
+
* @deprecated use __VUE_PROD_DEVTOOLS__ compile-time feature flag instead
|
|
1804
|
+
* https://github.com/vuejs/core/tree/main/packages/vue#bundler-build-feature-flags
|
|
1805
|
+
*/
|
|
1806
1806
|
devtools?: boolean;
|
|
1807
1807
|
/**
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1808
|
+
* @deprecated use `config.isCustomElement` instead
|
|
1809
|
+
* https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-ignoredelements-is-now-config-iscustomelement
|
|
1810
|
+
*/
|
|
1811
1811
|
ignoredElements?: (string | RegExp)[];
|
|
1812
1812
|
/**
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1813
|
+
* @deprecated
|
|
1814
|
+
* https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html
|
|
1815
|
+
*/
|
|
1816
1816
|
keyCodes?: Record<string, number | number[]>;
|
|
1817
1817
|
/**
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1818
|
+
* @deprecated
|
|
1819
|
+
* https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-productiontip-removed
|
|
1820
|
+
*/
|
|
1821
1821
|
productionTip?: boolean;
|
|
1822
1822
|
};
|
|
1823
1823
|
//#endregion
|
|
@@ -1838,10 +1838,10 @@ interface LegacyPublicProperties {
|
|
|
1838
1838
|
//#endregion
|
|
1839
1839
|
//#region temp/packages/runtime-core/src/compat/global.d.ts
|
|
1840
1840
|
/**
|
|
1841
|
-
* @deprecated the default `Vue` export has been removed in Vue 3. The type for
|
|
1842
|
-
* the default export is provided only for migration purposes. Please use
|
|
1843
|
-
* named imports instead - e.g. `import { createApp } from 'vue'`.
|
|
1844
|
-
*/
|
|
1841
|
+
* @deprecated the default `Vue` export has been removed in Vue 3. The type for
|
|
1842
|
+
* the default export is provided only for migration purposes. Please use
|
|
1843
|
+
* named imports instead - e.g. `import { createApp } from 'vue'`.
|
|
1844
|
+
*/
|
|
1845
1845
|
export type CompatVue = Pick<App, "version" | "component" | "directive"> & {
|
|
1846
1846
|
configureCompat: typeof configureCompat;
|
|
1847
1847
|
new (options?: ComponentOptions): LegacyPublicInstance;
|
|
@@ -1857,24 +1857,24 @@ export type CompatVue = Pick<App, "version" | "component" | "directive"> & {
|
|
|
1857
1857
|
directive<T = any, V = any>(name: string, directive: Directive<T, V>): CompatVue;
|
|
1858
1858
|
compile(template: string): RenderFunction;
|
|
1859
1859
|
/**
|
|
1860
|
-
|
|
1861
|
-
|
|
1860
|
+
* @deprecated Vue 3 no longer supports extending constructors.
|
|
1861
|
+
*/
|
|
1862
1862
|
extend: (options?: ComponentOptions) => CompatVue;
|
|
1863
1863
|
/**
|
|
1864
|
-
|
|
1865
|
-
|
|
1864
|
+
* @deprecated Vue 3 no longer needs set() for adding new properties.
|
|
1865
|
+
*/
|
|
1866
1866
|
set(target: any, key: PropertyKey, value: any): void;
|
|
1867
1867
|
/**
|
|
1868
|
-
|
|
1869
|
-
|
|
1868
|
+
* @deprecated Vue 3 no longer needs delete() for property deletions.
|
|
1869
|
+
*/
|
|
1870
1870
|
delete(target: any, key: PropertyKey): void;
|
|
1871
1871
|
/**
|
|
1872
|
-
|
|
1873
|
-
|
|
1872
|
+
* @deprecated use `reactive` instead.
|
|
1873
|
+
*/
|
|
1874
1874
|
observable: typeof reactive$1;
|
|
1875
1875
|
/**
|
|
1876
|
-
|
|
1877
|
-
|
|
1876
|
+
* @deprecated filters have been removed from Vue 3.
|
|
1877
|
+
*/
|
|
1878
1878
|
filter(name: string, arg?: any): null;
|
|
1879
1879
|
};
|
|
1880
1880
|
//#endregion
|
|
@@ -1892,7 +1892,7 @@ declare module "@vue/reactivity" {
|
|
|
1892
1892
|
}
|
|
1893
1893
|
export declare const DeprecationTypes: typeof DeprecationTypes$1;
|
|
1894
1894
|
//#endregion
|
|
1895
|
-
export { Comment$1 as Comment, type ComputedGetter, type ComputedRef, type ComputedSetter, type CustomRefFactory, type DebuggerEvent, type DebuggerEventExtraInfo, type DebuggerOptions, type DeepReadonly, type EffectScheduler, EffectScope, type MaybeRef, type MaybeRefOrGetter, type Raw, type Reactive, ReactiveEffect, type ReactiveEffectOptions, type ReactiveEffectRunner, type ReactiveFlags, type Ref, type ShallowReactive, type ShallowRef, type ShallowUnwrapRef, type ToRef, type ToRefs, TrackOpTypes, TriggerOpTypes, type UnwrapNestedRefs, type UnwrapRef, type WatchCallback, type WatchEffect, type WatchHandle, type WatchEffectOptions as WatchOptionsBase, type WatchSource, type WatchStopHandle, type WritableComputedOptions, type WritableComputedRef, camelize, capitalize, createBaseVNode as createElementVNode, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, normalizeClass, normalizeProps, normalizeStyle, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref$1 as ref, shallowReactive, shallowReadonly, shallowRef, stop, toDisplayString, toHandlerKey, toRaw, toRef, toRefs, toValue, triggerRef, unref
|
|
1895
|
+
export { Comment$1 as Comment, type ComputedGetter, type ComputedRef, type ComputedSetter, type CustomRefFactory, type DebuggerEvent, type DebuggerEventExtraInfo, type DebuggerOptions, type DeepReadonly, type EffectScheduler, EffectScope, type MaybeRef, type MaybeRefOrGetter, type Raw, type Reactive, ReactiveEffect, type ReactiveEffectOptions, type ReactiveEffectRunner, type ReactiveFlags, type Ref, type ShallowReactive, type ShallowRef, type ShallowUnwrapRef, type ToRef, type ToRefs, TrackOpTypes, TriggerOpTypes, type UnwrapNestedRefs, type UnwrapRef, type WatchCallback, type WatchEffect, type WatchHandle, type WatchEffectOptions as WatchOptionsBase, type WatchSource, type WatchStopHandle, type WritableComputedOptions, type WritableComputedRef, camelize, capitalize, createBaseVNode as createElementVNode, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, normalizeClass, normalizeProps, normalizeStyle, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref$1 as ref, shallowReactive, shallowReadonly, shallowRef, stop, toDisplayString, toHandlerKey, toRaw, toRef, toRefs, toValue, triggerRef, unref };
|
|
1896
1896
|
// Note: this file is auto concatenated to the end of the bundled d.ts during
|
|
1897
1897
|
// build.
|
|
1898
1898
|
|