@vue/runtime-core 3.6.0-beta.4 → 3.6.0-beta.6
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 +5479 -8353
- package/dist/runtime-core.cjs.prod.js +4340 -6712
- package/dist/runtime-core.d.ts +1397 -1447
- package/dist/runtime-core.esm-bundler.js +5517 -8391
- package/package.json +3 -3
package/dist/runtime-core.d.ts
CHANGED
|
@@ -1,716 +1,655 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { IfAny, Prettify, LooseRequired, UnionToIntersection, OverloadParameters, IsKeyValues } from '@vue/shared';
|
|
4
|
-
export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
|
|
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
|
+
import { IfAny, IsKeyValues, LooseRequired, OverloadParameters, Prettify, UnionToIntersection, camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from "@vue/shared";
|
|
5
3
|
|
|
4
|
+
//#region temp/packages/runtime-core/src/apiComputed.d.ts
|
|
6
5
|
export declare const computed: typeof computed$1;
|
|
7
|
-
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region temp/packages/runtime-core/src/componentSlots.d.ts
|
|
8
8
|
export type Slot<T extends any = any> = (...args: IfAny<T, any[], [T] | (T extends undefined ? [] : never)>) => VNode[];
|
|
9
9
|
type InternalSlots = {
|
|
10
|
-
|
|
10
|
+
[name: string]: Slot | undefined;
|
|
11
11
|
};
|
|
12
12
|
export type Slots = Readonly<InternalSlots>;
|
|
13
13
|
declare const SlotSymbol: unique symbol;
|
|
14
14
|
export type SlotsType<T extends Record<string, any> = Record<string, any>> = {
|
|
15
|
-
|
|
15
|
+
[SlotSymbol]?: T;
|
|
16
16
|
};
|
|
17
17
|
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<{
|
|
19
|
-
[K in keyof T]: NonNullable<T[K]> extends (...args: any[]) => any ? T[K] : Slot<T[K]>;
|
|
20
|
-
}>>;
|
|
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]> }>>;
|
|
21
19
|
type RawSlots = {
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
[name: string]: unknown;
|
|
21
|
+
$stable?: boolean;
|
|
24
22
|
};
|
|
25
|
-
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region temp/packages/runtime-core/src/scheduler.d.ts
|
|
26
25
|
declare enum SchedulerJobFlags {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
26
|
+
QUEUED = 1,
|
|
27
|
+
/**
|
|
28
|
+
* Indicates whether the effect is allowed to recursively trigger itself
|
|
29
|
+
* when managed by the scheduler.
|
|
30
|
+
*
|
|
31
|
+
* By default, a job cannot trigger itself because some built-in method calls,
|
|
32
|
+
* e.g. Array.prototype.push actually performs reads as well (#1740) which
|
|
33
|
+
* can lead to confusing infinite loops.
|
|
34
|
+
* The allowed cases are component update functions and watch callbacks.
|
|
35
|
+
* Component update functions may update child component props, which in turn
|
|
36
|
+
* trigger flush: "pre" watch callbacks that mutates state that the parent
|
|
37
|
+
* relies on (#1801). Watch callbacks doesn't track its dependencies so if it
|
|
38
|
+
* triggers itself again, it's likely intentional and it is the user's
|
|
39
|
+
* responsibility to perform recursive state mutation that eventually
|
|
40
|
+
* stabilizes (#1727).
|
|
41
|
+
*/
|
|
42
|
+
ALLOW_RECURSE = 2,
|
|
43
|
+
DISPOSED = 4
|
|
45
44
|
}
|
|
46
45
|
export interface SchedulerJob extends Function {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
46
|
+
order?: number;
|
|
47
|
+
/**
|
|
48
|
+
* flags can technically be undefined, but it can still be used in bitwise
|
|
49
|
+
* operations just like 0.
|
|
50
|
+
*/
|
|
51
|
+
flags?: SchedulerJobFlags;
|
|
52
|
+
/**
|
|
53
|
+
* Attached by renderer.ts when setting up a component's render effect
|
|
54
|
+
* Used to obtain component information when reporting max recursive updates.
|
|
55
|
+
*/
|
|
56
|
+
i?: GenericComponentInstance;
|
|
58
57
|
}
|
|
59
58
|
type SchedulerJobs = SchedulerJob | SchedulerJob[];
|
|
60
59
|
export declare function nextTick(): Promise<void>;
|
|
61
60
|
export declare function nextTick<T, R>(this: T, fn: (this: T) => R | Promise<R>): Promise<R>;
|
|
62
61
|
export declare function queuePostFlushCb(jobs: SchedulerJobs, id?: number): void;
|
|
63
|
-
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region temp/packages/runtime-core/src/componentProps.d.ts
|
|
64
64
|
export type ComponentPropsOptions<P = Data> = ComponentObjectPropsOptions<P> | string[];
|
|
65
|
-
export type ComponentObjectPropsOptions<P = Data> = {
|
|
66
|
-
[K in keyof P]: Prop<P[K]> | null;
|
|
67
|
-
};
|
|
65
|
+
export type ComponentObjectPropsOptions<P = Data> = { [K in keyof P]: Prop<P[K]> | null };
|
|
68
66
|
export type Prop<T, D = T> = PropOptions<T, D> | PropType<T>;
|
|
69
67
|
type DefaultFactory<T> = (props: Data) => T | null | undefined;
|
|
70
68
|
interface PropOptions<T = any, D = T> {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
type?: PropType<T> | true | null;
|
|
70
|
+
required?: boolean;
|
|
71
|
+
default?: D | DefaultFactory<D> | null | undefined | object;
|
|
72
|
+
validator?(value: unknown, props: Data): boolean;
|
|
75
73
|
}
|
|
76
74
|
export type PropType<T> = PropConstructor<T> | (PropConstructor<T> | null)[];
|
|
77
75
|
type PropConstructor<T = any> = {
|
|
78
|
-
|
|
76
|
+
new (...args: any[]): T & {};
|
|
79
77
|
} | {
|
|
80
|
-
|
|
78
|
+
(): T;
|
|
81
79
|
} | PropMethod<T>;
|
|
82
|
-
type PropMethod<T, TConstructor = any> = [T] extends [
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
(): T;
|
|
87
|
-
readonly prototype: TConstructor;
|
|
80
|
+
type PropMethod<T, TConstructor = any> = [T] extends [((...args: any) => any) | undefined] ? {
|
|
81
|
+
new (): TConstructor;
|
|
82
|
+
(): T;
|
|
83
|
+
readonly prototype: TConstructor;
|
|
88
84
|
} : never;
|
|
89
|
-
type RequiredKeys<T> = {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
} ? never : K : never;
|
|
99
|
-
}[keyof T];
|
|
85
|
+
type RequiredKeys<T> = { [K in keyof T]: T[K] extends {
|
|
86
|
+
required: true;
|
|
87
|
+
} | {
|
|
88
|
+
default: any;
|
|
89
|
+
} | BooleanConstructor | {
|
|
90
|
+
type: BooleanConstructor;
|
|
91
|
+
} ? T[K] extends {
|
|
92
|
+
default: undefined | (() => undefined);
|
|
93
|
+
} ? never : K : never }[keyof T];
|
|
100
94
|
type OptionalKeys<T> = Exclude<keyof T, RequiredKeys<T>>;
|
|
101
|
-
type DefaultKeys<T> = {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
} ? never : K : never;
|
|
110
|
-
}[keyof T];
|
|
95
|
+
type DefaultKeys<T> = { [K in keyof T]: T[K] extends {
|
|
96
|
+
default: any;
|
|
97
|
+
} | BooleanConstructor | {
|
|
98
|
+
type: BooleanConstructor;
|
|
99
|
+
} ? T[K] extends {
|
|
100
|
+
type: BooleanConstructor;
|
|
101
|
+
required: true;
|
|
102
|
+
} ? never : K : never }[keyof T];
|
|
111
103
|
type InferPropType<T, NullAsAny = true> = [T] extends [null] ? NullAsAny extends true ? any : null : [T] extends [{
|
|
112
|
-
|
|
104
|
+
type: null | true;
|
|
113
105
|
}] ? any : [T] extends [ObjectConstructor | {
|
|
114
|
-
|
|
106
|
+
type: ObjectConstructor;
|
|
115
107
|
}] ? Record<string, any> : [T] extends [BooleanConstructor | {
|
|
116
|
-
|
|
108
|
+
type: BooleanConstructor;
|
|
117
109
|
}] ? boolean : [T] extends [DateConstructor | {
|
|
118
|
-
|
|
110
|
+
type: DateConstructor;
|
|
119
111
|
}] ? Date : [T] extends [(infer U)[] | {
|
|
120
|
-
|
|
112
|
+
type: (infer U)[];
|
|
121
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;
|
|
122
114
|
/**
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
export type ExtractPropTypes<O> = {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
};
|
|
138
|
-
type PublicRequiredKeys<T> = {
|
|
139
|
-
[K in keyof T]: T[K] extends {
|
|
140
|
-
required: true;
|
|
141
|
-
} ? K : never;
|
|
142
|
-
}[keyof T];
|
|
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
|
+
*/
|
|
123
|
+
export type ExtractPropTypes<O> = { [K in keyof Pick<O, RequiredKeys<O>>]: O[K] extends {
|
|
124
|
+
default: any;
|
|
125
|
+
} ? Exclude<InferPropType<O[K]>, undefined> : InferPropType<O[K]> } & { [K in keyof Pick<O, OptionalKeys<O>>]?: InferPropType<O[K]> };
|
|
126
|
+
type PublicRequiredKeys<T> = { [K in keyof T]: T[K] extends {
|
|
127
|
+
required: true;
|
|
128
|
+
} ? K : never }[keyof T];
|
|
143
129
|
type PublicOptionalKeys<T> = Exclude<keyof T, PublicRequiredKeys<T>>;
|
|
144
130
|
/**
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
export type ExtractPublicPropTypes<O> = {
|
|
150
|
-
[K in keyof Pick<O, PublicRequiredKeys<O>>]: InferPropType<O[K]>;
|
|
151
|
-
} & {
|
|
152
|
-
[K in keyof Pick<O, PublicOptionalKeys<O>>]?: InferPropType<O[K]>;
|
|
153
|
-
};
|
|
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]> } & { [K in keyof Pick<O, PublicOptionalKeys<O>>]?: InferPropType<O[K]> };
|
|
154
136
|
declare enum BooleanFlags {
|
|
155
|
-
|
|
156
|
-
|
|
137
|
+
shouldCast = 0,
|
|
138
|
+
shouldCastTrue = 1
|
|
157
139
|
}
|
|
158
|
-
export type ExtractDefaultPropTypes<O> = O extends object ? {
|
|
159
|
-
[K in keyof Pick<O, DefaultKeys<O>>]: InferPropType<O[K]>;
|
|
160
|
-
} : {};
|
|
140
|
+
export type ExtractDefaultPropTypes<O> = O extends object ? { [K in keyof Pick<O, DefaultKeys<O>>]: InferPropType<O[K]> } : {};
|
|
161
141
|
type NormalizedProp = PropOptions & {
|
|
162
|
-
|
|
163
|
-
|
|
142
|
+
[BooleanFlags.shouldCast]?: boolean;
|
|
143
|
+
[BooleanFlags.shouldCastTrue]?: boolean;
|
|
164
144
|
};
|
|
165
145
|
/**
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
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
|
+
*/
|
|
169
149
|
type NormalizedProps = Record<string, NormalizedProp>;
|
|
170
150
|
export type NormalizedPropsOptions = [NormalizedProps, string[]] | [];
|
|
171
|
-
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region temp/packages/runtime-core/src/apiSetupHelpers.d.ts
|
|
172
153
|
/**
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
export declare function defineProps<PropNames extends string = string>(props: PropNames[]): Prettify<Readonly<{
|
|
205
|
-
[key in PropNames]?: any;
|
|
206
|
-
}>>;
|
|
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 }>>;
|
|
207
186
|
export declare function defineProps<PP extends ComponentObjectPropsOptions = ComponentObjectPropsOptions>(props: PP): Prettify<Readonly<ExtractPropTypes<PP>>>;
|
|
208
187
|
export declare function defineProps<TypeProps>(): DefineProps<LooseRequired<TypeProps>, BooleanKey<TypeProps>>;
|
|
209
|
-
export type DefineProps<T, BKeys extends keyof T> = Readonly<T> & {
|
|
210
|
-
readonly [K in BKeys]-?: boolean;
|
|
211
|
-
};
|
|
188
|
+
export type DefineProps<T, BKeys extends keyof T> = Readonly<T> & { readonly [K in BKeys]-?: boolean };
|
|
212
189
|
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;
|
|
213
190
|
/**
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
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
|
+
*/
|
|
239
216
|
export declare function defineEmits<EE extends string = string>(emitOptions: EE[]): EmitFn<EE[]>;
|
|
240
217
|
export declare function defineEmits<E extends EmitsOptions = EmitsOptions>(emitOptions: E): EmitFn<E>;
|
|
241
|
-
export declare function defineEmits<T extends ComponentTypeEmits>(): T extends (...args: any[]) => any ? T : ShortEmits<T>;
|
|
218
|
+
export declare function defineEmits<T extends ComponentTypeEmits>(): T extends ((...args: any[]) => any) ? T : ShortEmits<T>;
|
|
242
219
|
export type ComponentTypeEmits = ((...args: any[]) => any) | Record<string, any>;
|
|
243
220
|
type RecordToUnion<T extends Record<string, any>> = T[keyof T];
|
|
244
|
-
type ShortEmits<T extends Record<string, any>> = UnionToIntersection<RecordToUnion<{
|
|
245
|
-
[K in keyof T]: (evt: K, ...args: T[K]) => void;
|
|
246
|
-
}>>;
|
|
221
|
+
type ShortEmits<T extends Record<string, any>> = UnionToIntersection<RecordToUnion<{ [K in keyof T]: (evt: K, ...args: T[K]) => void }>>;
|
|
247
222
|
/**
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
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
|
+
*/
|
|
261
236
|
export declare function defineExpose<Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed): void;
|
|
262
237
|
/**
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
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
|
+
*/
|
|
269
244
|
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, {}> & {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
245
|
+
/**
|
|
246
|
+
* props should be defined via defineProps().
|
|
247
|
+
*/
|
|
248
|
+
props?: never;
|
|
249
|
+
/**
|
|
250
|
+
* emits should be defined via defineEmits().
|
|
251
|
+
*/
|
|
252
|
+
emits?: never;
|
|
253
|
+
/**
|
|
254
|
+
* expose should be defined via defineExpose().
|
|
255
|
+
*/
|
|
256
|
+
expose?: never;
|
|
257
|
+
/**
|
|
258
|
+
* slots should be defined via defineSlots().
|
|
259
|
+
*/
|
|
260
|
+
slots?: never;
|
|
286
261
|
}): void;
|
|
287
262
|
export declare function defineSlots<S extends Record<string, any> = Record<string, any>>(): StrictUnwrapSlotsType<SlotsType<S>>;
|
|
288
|
-
export type ModelRef<T, M extends PropertyKey = string, G = T, S = T> = Ref<G, S> & [
|
|
289
|
-
ModelRef<T, M, G, S>,
|
|
290
|
-
Record<M, true | undefined>
|
|
291
|
-
];
|
|
263
|
+
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>];
|
|
292
264
|
type DefineModelOptions<T = any, G = T, S = T> = {
|
|
293
|
-
|
|
294
|
-
|
|
265
|
+
get?: (v: T) => G;
|
|
266
|
+
set?: (v: S) => any;
|
|
295
267
|
};
|
|
296
268
|
/**
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
269
|
+
* Vue `<script setup>` compiler macro for declaring a
|
|
270
|
+
* two-way binding prop that can be consumed via `v-model` from the parent
|
|
271
|
+
* component. This will declare a prop with the same name and a corresponding
|
|
272
|
+
* `update:propName` event.
|
|
273
|
+
*
|
|
274
|
+
* If the first argument is a string, it will be used as the prop name;
|
|
275
|
+
* Otherwise the prop name will default to "modelValue". In both cases, you
|
|
276
|
+
* can also pass an additional object which will be used as the prop's options.
|
|
277
|
+
*
|
|
278
|
+
* The returned ref behaves differently depending on whether the parent
|
|
279
|
+
* provided the corresponding v-model props or not:
|
|
280
|
+
* - If yes, the returned ref's value will always be in sync with the parent
|
|
281
|
+
* prop.
|
|
282
|
+
* - If not, the returned ref will behave like a normal local ref.
|
|
283
|
+
*
|
|
284
|
+
* @example
|
|
285
|
+
* ```ts
|
|
286
|
+
* // default model (consumed via `v-model`)
|
|
287
|
+
* const modelValue = defineModel<string>()
|
|
288
|
+
* modelValue.value = "hello"
|
|
289
|
+
*
|
|
290
|
+
* // default model with options
|
|
291
|
+
* const modelValue = defineModel<string>({ required: true })
|
|
292
|
+
*
|
|
293
|
+
* // with specified name (consumed via `v-model:count`)
|
|
294
|
+
* const count = defineModel<number>('count')
|
|
295
|
+
* count.value++
|
|
296
|
+
*
|
|
297
|
+
* // with specified name and default value
|
|
298
|
+
* const count = defineModel<number>('count', { default: 0 })
|
|
299
|
+
* ```
|
|
300
|
+
*/
|
|
329
301
|
export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(options: ({
|
|
330
|
-
|
|
302
|
+
default: any;
|
|
331
303
|
} | {
|
|
332
|
-
|
|
304
|
+
required: true;
|
|
333
305
|
}) & PropOptions<T> & DefineModelOptions<T, G, S>): ModelRef<T, M, G, S>;
|
|
334
306
|
export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(options?: PropOptions<T> & DefineModelOptions<T, G, S>): ModelRef<T | undefined, M, G | undefined, S | undefined>;
|
|
335
307
|
export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(name: string, options: ({
|
|
336
|
-
|
|
308
|
+
default: any;
|
|
337
309
|
} | {
|
|
338
|
-
|
|
310
|
+
required: true;
|
|
339
311
|
}) & PropOptions<T> & DefineModelOptions<T, G, S>): ModelRef<T, M, G, S>;
|
|
340
312
|
export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(name: string, options?: PropOptions<T> & DefineModelOptions<T, G, S>): ModelRef<T | undefined, M, G | undefined, S | undefined>;
|
|
341
313
|
type NotUndefined<T> = T extends undefined ? never : T;
|
|
342
|
-
type MappedOmit<T, K extends keyof any> = {
|
|
343
|
-
|
|
344
|
-
};
|
|
345
|
-
type InferDefaults<T> = {
|
|
346
|
-
[K in keyof T]?: InferDefault<T, T[K]>;
|
|
347
|
-
};
|
|
314
|
+
type MappedOmit<T, K extends keyof any> = { [P in keyof T as P extends K ? never : P]: T[P] };
|
|
315
|
+
type InferDefaults<T> = { [K in keyof T]?: InferDefault<T, T[K]> };
|
|
348
316
|
type NativeType = null | undefined | number | string | boolean | symbol | Function;
|
|
349
317
|
type InferDefault<P, T> = ((props: P) => T & {}) | (T extends NativeType ? T : never);
|
|
350
|
-
type PropsWithDefaults<T, Defaults extends InferDefaults<T>, BKeys extends keyof T> = T extends unknown ? Readonly<MappedOmit<T, keyof Defaults>> & {
|
|
351
|
-
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;
|
|
352
|
-
} & {
|
|
353
|
-
readonly [K in BKeys]-?: K extends keyof Defaults ? Defaults[K] extends undefined ? boolean | undefined : boolean : boolean;
|
|
354
|
-
} : never;
|
|
318
|
+
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;
|
|
355
319
|
/**
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
320
|
+
* Vue `<script setup>` compiler macro for providing props default values when
|
|
321
|
+
* using type-based `defineProps` declaration.
|
|
322
|
+
*
|
|
323
|
+
* Example usage:
|
|
324
|
+
* ```ts
|
|
325
|
+
* withDefaults(defineProps<{
|
|
326
|
+
* size?: number
|
|
327
|
+
* labels?: string[]
|
|
328
|
+
* }>(), {
|
|
329
|
+
* size: 3,
|
|
330
|
+
* labels: () => ['default label']
|
|
331
|
+
* })
|
|
332
|
+
* ```
|
|
333
|
+
*
|
|
334
|
+
* This is only usable inside `<script setup>`, is compiled away in the output
|
|
335
|
+
* and should **not** be actually called at runtime.
|
|
336
|
+
*
|
|
337
|
+
* @see {@link https://vuejs.org/guide/typescript/composition-api.html#typing-component-props}
|
|
338
|
+
*/
|
|
375
339
|
export declare function withDefaults<T, BKeys extends keyof T, Defaults extends InferDefaults<T>>(props: DefineProps<T, BKeys>, defaults: Defaults): PropsWithDefaults<T, Defaults, BKeys>;
|
|
376
|
-
export declare function useSlots(): SetupContext[
|
|
377
|
-
export declare function useAttrs(): SetupContext[
|
|
378
|
-
|
|
340
|
+
export declare function useSlots(): SetupContext["slots"];
|
|
341
|
+
export declare function useAttrs(): SetupContext["attrs"];
|
|
342
|
+
//#endregion
|
|
343
|
+
//#region temp/packages/runtime-core/src/componentEmits.d.ts
|
|
379
344
|
export type ObjectEmitsOptions = Record<string, ((...args: any[]) => any) | null>;
|
|
380
345
|
export type EmitsOptions = ObjectEmitsOptions | string[];
|
|
381
|
-
export type EmitsToProps<T extends EmitsOptions | ComponentTypeEmits> = T extends string[] ? {
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
[K in string & keyof T as `on${Capitalize<K>}`]?: (...args: T[K] extends (...args: infer P) => any ? P : T[K] extends null ? any[] : never) => any;
|
|
385
|
-
} : {};
|
|
386
|
-
export type TypeEmitsToOptions<T extends ComponentTypeEmits> = {
|
|
387
|
-
[K in keyof T & string]: T[K] extends [...args: infer Args] ? (...args: Args) => any : () => any;
|
|
388
|
-
} & (T extends (...args: any[]) => any ? ParametersToFns<OverloadParameters<T>> : {});
|
|
389
|
-
type ParametersToFns<T extends any[]> = {
|
|
390
|
-
[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;
|
|
391
|
-
};
|
|
346
|
+
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[] : never) => any } : {};
|
|
347
|
+
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>> : {});
|
|
348
|
+
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 };
|
|
392
349
|
type IsStringLiteral<T> = T extends string ? string extends T ? false : true : false;
|
|
393
|
-
export type ShortEmitsToObject<E> = E extends Record<string, any[]> ? {
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
[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;
|
|
398
|
-
}[Event]>;
|
|
399
|
-
|
|
400
|
-
/**
|
|
401
|
-
Runtime helper for applying directives to a vnode. Example usage:
|
|
402
|
-
|
|
403
|
-
const comp = resolveComponent('comp')
|
|
404
|
-
const foo = resolveDirective('foo')
|
|
405
|
-
const bar = resolveDirective('bar')
|
|
406
|
-
|
|
407
|
-
return withDirectives(h(comp), [
|
|
408
|
-
[foo, this.x],
|
|
409
|
-
[bar, this.y]
|
|
410
|
-
])
|
|
411
|
-
*/
|
|
412
|
-
|
|
350
|
+
export type ShortEmitsToObject<E> = E extends Record<string, any[]> ? { [K in keyof E]: (...args: E[K]) => any } : E;
|
|
351
|
+
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]>;
|
|
352
|
+
//#endregion
|
|
353
|
+
//#region temp/packages/runtime-core/src/directives.d.ts
|
|
413
354
|
export interface DirectiveBinding<Value = any, Modifiers extends string = string, Arg = any> {
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
355
|
+
instance: ComponentPublicInstance | Record<string, any> | null;
|
|
356
|
+
value: Value;
|
|
357
|
+
oldValue: Value | null;
|
|
358
|
+
arg?: Arg;
|
|
359
|
+
modifiers: DirectiveModifiers<Modifiers>;
|
|
360
|
+
dir: ObjectDirective<any, Value, Modifiers, Arg>;
|
|
420
361
|
}
|
|
421
362
|
export type DirectiveHook<HostElement = any, Prev = VNode<any, HostElement> | null, Value = any, Modifiers extends string = string, Arg = any> = (el: HostElement, binding: DirectiveBinding<Value, Modifiers, Arg>, vnode: VNode<any, HostElement>, prevVNode: Prev) => void;
|
|
422
363
|
type SSRDirectiveHook<Value = any, Modifiers extends string = string, Arg = any> = (binding: DirectiveBinding<Value, Modifiers, Arg>, vnode: VNode) => Data | undefined;
|
|
423
364
|
export interface ObjectDirective<HostElement = any, Value = any, Modifiers extends string = string, Arg = any> {
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
365
|
+
created?: DirectiveHook<HostElement, null, Value, Modifiers, Arg>;
|
|
366
|
+
beforeMount?: DirectiveHook<HostElement, null, Value, Modifiers, Arg>;
|
|
367
|
+
mounted?: DirectiveHook<HostElement, null, Value, Modifiers, Arg>;
|
|
368
|
+
beforeUpdate?: DirectiveHook<HostElement, VNode<any, HostElement>, Value, Modifiers, Arg>;
|
|
369
|
+
updated?: DirectiveHook<HostElement, VNode<any, HostElement>, Value, Modifiers, Arg>;
|
|
370
|
+
beforeUnmount?: DirectiveHook<HostElement, null, Value, Modifiers, Arg>;
|
|
371
|
+
unmounted?: DirectiveHook<HostElement, null, Value, Modifiers, Arg>;
|
|
372
|
+
getSSRProps?: SSRDirectiveHook<Value, Modifiers, Arg>;
|
|
373
|
+
deep?: boolean;
|
|
433
374
|
}
|
|
434
375
|
export type FunctionDirective<HostElement = any, V = any, Modifiers extends string = string, Arg = any> = DirectiveHook<HostElement, any, V, Modifiers, Arg>;
|
|
435
376
|
export type Directive<HostElement = any, Value = any, Modifiers extends string = string, Arg = any> = ObjectDirective<HostElement, Value, Modifiers, Arg> | FunctionDirective<HostElement, Value, Modifiers, Arg>;
|
|
436
377
|
export type DirectiveModifiers<K extends string = string> = Partial<Record<K, boolean>>;
|
|
437
378
|
export type DirectiveArguments = Array<[Directive | undefined] | [Directive | undefined, any] | [Directive | undefined, any, any] | [Directive | undefined, any, any, DirectiveModifiers]>;
|
|
438
379
|
/**
|
|
439
|
-
|
|
440
|
-
|
|
380
|
+
* Adds directives to a VNode.
|
|
381
|
+
*/
|
|
441
382
|
export declare function withDirectives<T extends VNode>(vnode: T, directives: DirectiveArguments): T;
|
|
442
|
-
|
|
383
|
+
//#endregion
|
|
384
|
+
//#region temp/packages/runtime-core/src/componentPublicInstance.d.ts
|
|
443
385
|
/**
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
export interface ComponentCustomProperties {
|
|
469
|
-
}
|
|
386
|
+
* Custom properties added to component instances in any way and can be accessed through `this`
|
|
387
|
+
*
|
|
388
|
+
* @example
|
|
389
|
+
* Here is an example of adding a property `$router` to every component instance:
|
|
390
|
+
* ```ts
|
|
391
|
+
* import { createApp } from 'vue'
|
|
392
|
+
* import { Router, createRouter } from 'vue-router'
|
|
393
|
+
*
|
|
394
|
+
* declare module 'vue' {
|
|
395
|
+
* interface ComponentCustomProperties {
|
|
396
|
+
* $router: Router
|
|
397
|
+
* }
|
|
398
|
+
* }
|
|
399
|
+
*
|
|
400
|
+
* // effectively adding the router to every component instance
|
|
401
|
+
* const app = createApp({})
|
|
402
|
+
* const router = createRouter()
|
|
403
|
+
* app.config.globalProperties.$router = router
|
|
404
|
+
*
|
|
405
|
+
* const vm = app.mount('#app')
|
|
406
|
+
* // we can access the router from the instance
|
|
407
|
+
* vm.$router.push('/')
|
|
408
|
+
* ```
|
|
409
|
+
*/
|
|
410
|
+
export interface ComponentCustomProperties {}
|
|
470
411
|
type IsDefaultMixinComponent<T> = T extends ComponentOptionsMixin ? ComponentOptionsMixin extends T ? true : false : false;
|
|
471
412
|
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;
|
|
472
413
|
type ExtractMixin<T> = {
|
|
473
|
-
|
|
474
|
-
}[T extends ComponentOptionsMixin ?
|
|
414
|
+
Mixin: MixinToOptionTypes<T>;
|
|
415
|
+
}[T extends ComponentOptionsMixin ? "Mixin" : never];
|
|
475
416
|
type IntersectionMixin<T> = IsDefaultMixinComponent<T> extends true ? OptionTypesType : UnionToIntersection<ExtractMixin<T>>;
|
|
476
417
|
type UnwrapMixinsType<T, Type extends OptionTypesKeys> = T extends OptionTypesType ? T[Type] : never;
|
|
477
418
|
type EnsureNonVoid<T> = T extends void ? {} : T;
|
|
478
419
|
type ComponentPublicInstanceConstructor<T extends ComponentPublicInstance<Props, RawBindings, D, C, M> = ComponentPublicInstance<any>, Props = any, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions> = {
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
420
|
+
__isFragment?: never;
|
|
421
|
+
__isTeleport?: never;
|
|
422
|
+
__isSuspense?: never;
|
|
423
|
+
new (...args: any[]): T;
|
|
483
424
|
};
|
|
484
425
|
/**
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
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,
|
|
426
|
+
* @deprecated This is no longer used internally, but exported and relied on by
|
|
427
|
+
* existing library types generated by vue-tsc.
|
|
428
|
+
*/
|
|
429
|
+
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>;
|
|
489
430
|
/**
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
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 extends Element = any, Provide extends ComponentProvideOptions = ComponentProvideOptions, PublicMixin = IntersectionMixin<Mixin> & IntersectionMixin<Extends>, PublicP = UnwrapMixinsType<PublicMixin,
|
|
497
|
-
type ExposedKeys<T, Exposed extends string & keyof T> =
|
|
498
|
-
export type ComponentPublicInstance<P = {},
|
|
499
|
-
|
|
500
|
-
D
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
$nextTick: typeof nextTick;
|
|
516
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
|
|
517
|
-
} & ExposedKeys<IfAny<P, P, Readonly<Defaults> & Omit<P, keyof ShallowUnwrapRef<B> | keyof Defaults>> & ShallowUnwrapRef<B> & UnwrapNestedRefs<D> & ExtractComputedReturns<C> & M & ComponentCustomProperties & InjectToObject<I>, Exposed>;
|
|
431
|
+
* This is the same as `CreateComponentPublicInstance` but adds local components,
|
|
432
|
+
* global directives, exposed, and provide inference.
|
|
433
|
+
* It changes the arguments order so that we don't need to repeat mixin
|
|
434
|
+
* inference everywhere internally, but it has to be a new type to avoid
|
|
435
|
+
* breaking types that relies on previous arguments order (#10842)
|
|
436
|
+
*/
|
|
437
|
+
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 extends Element = 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>;
|
|
438
|
+
type ExposedKeys<T, Exposed extends string & keyof T> = "" extends Exposed ? T : Pick<T, Exposed>;
|
|
439
|
+
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 extends Element = any> = {
|
|
440
|
+
$: ComponentInternalInstance;
|
|
441
|
+
$data: D;
|
|
442
|
+
$props: MakeDefaultsOptional extends true ? Partial<Defaults> & Omit<Prettify<P> & PublicProps, keyof Defaults> : Prettify<P> & PublicProps;
|
|
443
|
+
$attrs: Data;
|
|
444
|
+
$refs: Data & TypeRefs;
|
|
445
|
+
$slots: UnwrapSlotsType<S>;
|
|
446
|
+
$root: ComponentPublicInstance | null;
|
|
447
|
+
$parent: ComponentPublicInstance | null;
|
|
448
|
+
$host: Element | null;
|
|
449
|
+
$emit: EmitFn<E>;
|
|
450
|
+
$el: TypeEl;
|
|
451
|
+
$options: Options & MergedComponentOptionsOverride;
|
|
452
|
+
$forceUpdate: () => void;
|
|
453
|
+
$nextTick: typeof nextTick;
|
|
454
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends ((...args: any) => infer R) ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
|
|
455
|
+
} & ExposedKeys<IfAny<P, P, Readonly<Defaults> & Omit<P, keyof ShallowUnwrapRef$1<B> | keyof Defaults>> & ShallowUnwrapRef$1<B> & UnwrapNestedRefs$1<D> & ExtractComputedReturns<C> & M & ComponentCustomProperties & InjectToObject<I>, Exposed>;
|
|
518
456
|
interface ComponentRenderContext {
|
|
519
|
-
|
|
520
|
-
|
|
457
|
+
[key: string]: any;
|
|
458
|
+
_: ComponentInternalInstance;
|
|
521
459
|
}
|
|
522
|
-
|
|
460
|
+
//#endregion
|
|
461
|
+
//#region temp/packages/runtime-core/src/enums.d.ts
|
|
523
462
|
declare enum LifecycleHooks {
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
}
|
|
539
|
-
|
|
463
|
+
BEFORE_CREATE = "bc",
|
|
464
|
+
CREATED = "c",
|
|
465
|
+
BEFORE_MOUNT = "bm",
|
|
466
|
+
MOUNTED = "m",
|
|
467
|
+
BEFORE_UPDATE = "bu",
|
|
468
|
+
UPDATED = "u",
|
|
469
|
+
BEFORE_UNMOUNT = "bum",
|
|
470
|
+
UNMOUNTED = "um",
|
|
471
|
+
DEACTIVATED = "da",
|
|
472
|
+
ACTIVATED = "a",
|
|
473
|
+
RENDER_TRIGGERED = "rtg",
|
|
474
|
+
RENDER_TRACKED = "rtc",
|
|
475
|
+
ERROR_CAPTURED = "ec",
|
|
476
|
+
SERVER_PREFETCH = "sp"
|
|
477
|
+
}
|
|
478
|
+
//#endregion
|
|
479
|
+
//#region temp/packages/runtime-core/src/components/Suspense.d.ts
|
|
540
480
|
export interface SuspenseProps {
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
481
|
+
onResolve?: () => void;
|
|
482
|
+
onPending?: () => void;
|
|
483
|
+
onFallback?: () => void;
|
|
484
|
+
timeout?: string | number;
|
|
485
|
+
/**
|
|
486
|
+
* Allow suspense to be captured by parent suspense
|
|
487
|
+
*
|
|
488
|
+
* @default false
|
|
489
|
+
*/
|
|
490
|
+
suspensible?: boolean;
|
|
551
491
|
}
|
|
552
492
|
declare const SuspenseImpl: {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
493
|
+
name: string;
|
|
494
|
+
__isSuspense: boolean;
|
|
495
|
+
process(n1: VNode | null, n2: VNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, rendererInternals: RendererInternals): void;
|
|
496
|
+
hydrate: typeof hydrateSuspense;
|
|
497
|
+
normalize: typeof normalizeSuspenseChildren;
|
|
558
498
|
};
|
|
559
499
|
export declare const Suspense: {
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
};
|
|
500
|
+
__isSuspense: true;
|
|
501
|
+
new (): {
|
|
502
|
+
$props: VNodeProps & SuspenseProps;
|
|
503
|
+
$slots: {
|
|
504
|
+
default(): VNode[];
|
|
505
|
+
fallback(): VNode[];
|
|
567
506
|
};
|
|
507
|
+
};
|
|
568
508
|
};
|
|
569
509
|
export interface SuspenseBoundary {
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
510
|
+
vnode: VNode<RendererNode, RendererElement, SuspenseProps>;
|
|
511
|
+
parent: SuspenseBoundary | null;
|
|
512
|
+
parentComponent: ComponentInternalInstance | null;
|
|
513
|
+
namespace: ElementNamespace;
|
|
514
|
+
container: RendererElement;
|
|
515
|
+
hiddenContainer: RendererElement;
|
|
516
|
+
activeBranch: VNode | null;
|
|
517
|
+
pendingBranch: VNode | null;
|
|
518
|
+
deps: number;
|
|
519
|
+
pendingId: number;
|
|
520
|
+
timeout: number;
|
|
521
|
+
isInFallback: boolean;
|
|
522
|
+
isHydrating: boolean;
|
|
523
|
+
isUnmounted: boolean;
|
|
524
|
+
effects: Function[];
|
|
525
|
+
resolve(force?: boolean, sync?: boolean): void;
|
|
526
|
+
fallback(fallbackVNode: VNode): void;
|
|
527
|
+
move(container: RendererElement, anchor: RendererNode | null, type: MoveType): void;
|
|
528
|
+
next(): RendererNode | null;
|
|
529
|
+
registerDep(instance: GenericComponentInstance, onResolve: (setupResult: unknown) => void): void;
|
|
530
|
+
unmount(parentSuspense: SuspenseBoundary | null, doRemove?: boolean): void;
|
|
591
531
|
}
|
|
592
532
|
declare function hydrateSuspense(node: Node, vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, rendererInternals: RendererInternals, hydrateNode: (node: Node, vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null;
|
|
593
533
|
declare function normalizeSuspenseChildren(vnode: VNode): void;
|
|
594
|
-
|
|
534
|
+
//#endregion
|
|
535
|
+
//#region temp/packages/runtime-core/src/hydration.d.ts
|
|
536
|
+
export declare function setIsHydratingEnabled(value: boolean): void;
|
|
595
537
|
export type RootHydrateFunction = (vnode: VNode<Node, Element>, container: (Element | ShadowRoot) & {
|
|
596
|
-
|
|
538
|
+
_vnode?: VNode;
|
|
597
539
|
}) => void;
|
|
598
|
-
declare function createHydrationFunctions(rendererInternals: RendererInternals<Node, Element>): [
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
];
|
|
602
|
-
|
|
540
|
+
declare function createHydrationFunctions(rendererInternals: RendererInternals<Node, Element>): [RootHydrateFunction, (node: Node, vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized?: boolean) => Node | null];
|
|
541
|
+
//#endregion
|
|
542
|
+
//#region temp/packages/runtime-core/src/components/BaseTransition.d.ts
|
|
603
543
|
type Hook<T = () => void> = T | T[];
|
|
604
544
|
declare const leaveCbKey: unique symbol;
|
|
605
545
|
declare const enterCbKey: unique symbol;
|
|
606
546
|
export interface BaseTransitionProps<HostElement = RendererElement> {
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
547
|
+
mode?: "in-out" | "out-in" | "default";
|
|
548
|
+
appear?: boolean;
|
|
549
|
+
persisted?: boolean;
|
|
550
|
+
onBeforeEnter?: Hook<(el: HostElement) => void>;
|
|
551
|
+
onEnter?: Hook<(el: HostElement, done: () => void) => void>;
|
|
552
|
+
onAfterEnter?: Hook<(el: HostElement) => void>;
|
|
553
|
+
onEnterCancelled?: Hook<(el: HostElement) => void>;
|
|
554
|
+
onBeforeLeave?: Hook<(el: HostElement) => void>;
|
|
555
|
+
onLeave?: Hook<(el: HostElement, done: () => void) => void>;
|
|
556
|
+
onAfterLeave?: Hook<(el: HostElement) => void>;
|
|
557
|
+
onLeaveCancelled?: Hook<(el: HostElement) => void>;
|
|
558
|
+
onBeforeAppear?: Hook<(el: HostElement) => void>;
|
|
559
|
+
onAppear?: Hook<(el: HostElement, done: () => void) => void>;
|
|
560
|
+
onAfterAppear?: Hook<(el: HostElement) => void>;
|
|
561
|
+
onAppearCancelled?: Hook<(el: HostElement) => void>;
|
|
622
562
|
}
|
|
623
563
|
export interface TransitionHooks<HostElement = RendererElement> {
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
564
|
+
mode: BaseTransitionProps["mode"];
|
|
565
|
+
persisted: boolean;
|
|
566
|
+
beforeEnter(el: HostElement): void;
|
|
567
|
+
enter(el: HostElement): void;
|
|
568
|
+
leave(el: HostElement, remove: () => void): void;
|
|
569
|
+
clone(vnode: VNode): TransitionHooks<HostElement>;
|
|
570
|
+
afterLeave?(): void;
|
|
571
|
+
delayLeave?(el: HostElement, earlyRemove: () => void, delayedLeave: () => void): void;
|
|
572
|
+
delayedLeave?(): void;
|
|
633
573
|
}
|
|
634
574
|
type PendingCallback = (cancelled?: boolean) => void;
|
|
635
575
|
export interface TransitionState {
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
576
|
+
isMounted: boolean;
|
|
577
|
+
isLeaving: boolean;
|
|
578
|
+
isUnmounting: boolean;
|
|
579
|
+
leavingNodes: Map<any, Record<string, any>>;
|
|
640
580
|
}
|
|
641
581
|
export interface TransitionElement {
|
|
642
|
-
|
|
643
|
-
|
|
582
|
+
[enterCbKey]?: PendingCallback;
|
|
583
|
+
[leaveCbKey]?: PendingCallback;
|
|
644
584
|
}
|
|
645
585
|
export declare function useTransitionState(): TransitionState;
|
|
646
586
|
export declare const BaseTransitionPropsValidators: Record<string, any>;
|
|
647
587
|
export declare const BaseTransition: {
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
};
|
|
588
|
+
new (): {
|
|
589
|
+
$props: BaseTransitionProps<any>;
|
|
590
|
+
$slots: {
|
|
591
|
+
default(): VNode[];
|
|
653
592
|
};
|
|
593
|
+
};
|
|
654
594
|
};
|
|
655
595
|
export interface TransitionHooksContext {
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
596
|
+
setLeavingNodeCache: (node: any) => void;
|
|
597
|
+
unsetLeavingNodeCache: (node: any) => void;
|
|
598
|
+
earlyRemove: () => void;
|
|
599
|
+
cloneHooks: (node: any) => TransitionHooks;
|
|
660
600
|
}
|
|
661
601
|
export declare function resolveTransitionHooks(vnode: VNode, props: BaseTransitionProps<any>, state: TransitionState, instance: GenericComponentInstance, postClone?: (hooks: TransitionHooks) => void): TransitionHooks;
|
|
662
602
|
export declare function setTransitionHooks(vnode: VNode, hooks: TransitionHooks): void;
|
|
663
|
-
export declare function getTransitionRawChildren(children: VNode[], keepComment?: boolean, parentKey?: VNode[
|
|
664
|
-
|
|
603
|
+
export declare function getTransitionRawChildren(children: VNode[], keepComment?: boolean, parentKey?: VNode["key"]): VNode[];
|
|
604
|
+
//#endregion
|
|
605
|
+
//#region temp/packages/runtime-core/src/renderer.d.ts
|
|
665
606
|
export interface Renderer<HostElement = RendererElement> {
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
607
|
+
render: RootRenderFunction<HostElement>;
|
|
608
|
+
createApp: CreateAppFunction<HostElement>;
|
|
609
|
+
internals: RendererInternals;
|
|
669
610
|
}
|
|
670
611
|
export interface HydrationRenderer extends Renderer<Element | ShadowRoot> {
|
|
671
|
-
|
|
672
|
-
|
|
612
|
+
hydrate: RootHydrateFunction;
|
|
613
|
+
hydrateNode: ReturnType<typeof createHydrationFunctions>[1];
|
|
673
614
|
}
|
|
674
|
-
export type ElementNamespace =
|
|
615
|
+
export type ElementNamespace = "svg" | "mathml" | undefined;
|
|
675
616
|
export type RootRenderFunction<HostElement = RendererElement> = (vnode: VNode | null, container: HostElement, namespace?: ElementNamespace) => void;
|
|
676
617
|
export interface RendererOptions<HostNode = RendererNode, HostElement = RendererElement> {
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
618
|
+
patchProp(el: HostElement, key: string, prevValue: any, nextValue: any, namespace?: ElementNamespace, parentComponent?: ComponentInternalInstance | null): void;
|
|
619
|
+
insert(el: HostNode, parent: HostElement, anchor?: HostNode | null): void;
|
|
620
|
+
remove(el: HostNode): void;
|
|
621
|
+
createElement(type: string, namespace?: ElementNamespace, isCustomizedBuiltIn?: string, vnodeProps?: (VNodeProps & {
|
|
622
|
+
[key: string]: any;
|
|
623
|
+
}) | null): HostElement;
|
|
624
|
+
createText(text: string): HostNode;
|
|
625
|
+
createComment(text: string): HostNode;
|
|
626
|
+
setText(node: HostNode, text: string): void;
|
|
627
|
+
setElementText(node: HostElement, text: string): void;
|
|
628
|
+
parentNode(node: HostNode): HostElement | null;
|
|
629
|
+
nextSibling(node: HostNode): HostNode | null;
|
|
630
|
+
querySelector?(selector: string): HostElement | null;
|
|
631
|
+
setScopeId?(el: HostElement, id: string): void;
|
|
632
|
+
cloneNode?(node: HostNode): HostNode;
|
|
633
|
+
insertStaticContent?(content: string, parent: HostElement, anchor: HostNode | null, namespace: ElementNamespace, start?: HostNode | null, end?: HostNode | null): [HostNode, HostNode];
|
|
693
634
|
}
|
|
694
635
|
export interface RendererNode {
|
|
695
|
-
|
|
696
|
-
}
|
|
697
|
-
export interface RendererElement extends RendererNode {
|
|
636
|
+
[key: string | symbol]: any;
|
|
698
637
|
}
|
|
638
|
+
export interface RendererElement extends RendererNode {}
|
|
699
639
|
interface RendererInternals<HostNode = RendererNode, HostElement = RendererElement> {
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
}
|
|
712
|
-
type PatchFn = (n1: VNode | null,
|
|
713
|
-
n2: VNode, container: RendererElement, anchor?: RendererNode | null, parentComponent?: ComponentInternalInstance | null, parentSuspense?: SuspenseBoundary | null, namespace?: ElementNamespace, slotScopeIds?: string[] | null, optimized?: boolean) => void;
|
|
640
|
+
p: PatchFn;
|
|
641
|
+
um: UnmountFn;
|
|
642
|
+
r: RemoveFn;
|
|
643
|
+
m: MoveFn;
|
|
644
|
+
mt: MountComponentFn;
|
|
645
|
+
umt: UnmountComponentFn;
|
|
646
|
+
mc: MountChildrenFn;
|
|
647
|
+
pc: PatchChildrenFn;
|
|
648
|
+
pbc: PatchBlockChildrenFn;
|
|
649
|
+
n: NextFn;
|
|
650
|
+
o: RendererOptions<HostNode, HostElement>;
|
|
651
|
+
}
|
|
652
|
+
type PatchFn = (n1: VNode | null, n2: VNode, container: RendererElement, anchor?: RendererNode | null, parentComponent?: ComponentInternalInstance | null, parentSuspense?: SuspenseBoundary | null, namespace?: ElementNamespace, slotScopeIds?: string[] | null, optimized?: boolean) => void;
|
|
714
653
|
type MountChildrenFn = (children: VNodeArrayChildren, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, start?: number) => void;
|
|
715
654
|
type PatchChildrenFn = (n1: VNode | null, n2: VNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean) => void;
|
|
716
655
|
type PatchBlockChildrenFn = (oldChildren: VNode[], newChildren: VNode[], fallbackContainer: RendererElement, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null) => void;
|
|
@@ -721,53 +660,55 @@ type RemoveFn = (vnode: VNode) => void;
|
|
|
721
660
|
type MountComponentFn = (initialVNode: VNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, optimized: boolean) => void;
|
|
722
661
|
type UnmountComponentFn = (instance: ComponentInternalInstance, parentSuspense: SuspenseBoundary | null, doRemove?: boolean) => void;
|
|
723
662
|
export declare enum MoveType {
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
663
|
+
ENTER = 0,
|
|
664
|
+
LEAVE = 1,
|
|
665
|
+
REORDER = 2
|
|
727
666
|
}
|
|
728
667
|
/**
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
668
|
+
* The createRenderer function accepts two generic arguments:
|
|
669
|
+
* HostNode and HostElement, corresponding to Node and Element types in the
|
|
670
|
+
* host environment. For example, for runtime-dom, HostNode would be the DOM
|
|
671
|
+
* `Node` interface and HostElement would be the DOM `Element` interface.
|
|
672
|
+
*
|
|
673
|
+
* Custom renderers can pass in the platform specific types like this:
|
|
674
|
+
*
|
|
675
|
+
* ``` js
|
|
676
|
+
* const { render, createApp } = createRenderer<Node, Element>({
|
|
677
|
+
* patchProp,
|
|
678
|
+
* ...nodeOps
|
|
679
|
+
* })
|
|
680
|
+
* ```
|
|
681
|
+
*/
|
|
743
682
|
export declare function createRenderer<HostNode = RendererNode, HostElement = RendererElement>(options: RendererOptions<HostNode, HostElement>): Renderer<HostElement>;
|
|
744
683
|
export declare function createHydrationRenderer(options: RendererOptions<Node, Element>): HydrationRenderer;
|
|
745
|
-
|
|
684
|
+
//#endregion
|
|
685
|
+
//#region temp/packages/runtime-core/src/components/KeepAlive.d.ts
|
|
746
686
|
type MatchPattern = string | RegExp | (string | RegExp)[];
|
|
747
687
|
export interface KeepAliveProps {
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
688
|
+
include?: MatchPattern;
|
|
689
|
+
exclude?: MatchPattern;
|
|
690
|
+
max?: number | string;
|
|
751
691
|
}
|
|
752
692
|
export interface KeepAliveContext extends ComponentRenderContext {
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
693
|
+
renderer: RendererInternals;
|
|
694
|
+
activate: (vnode: VNode, container: RendererElement, anchor: RendererNode | null, namespace: ElementNamespace, optimized: boolean) => void;
|
|
695
|
+
deactivate: (vnode: VNode) => void;
|
|
696
|
+
getCachedComponent: (vnode: VNode) => VNode;
|
|
697
|
+
getStorageContainer: () => RendererElement;
|
|
758
698
|
}
|
|
759
699
|
export declare const KeepAlive: {
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
};
|
|
700
|
+
__isKeepAlive: true;
|
|
701
|
+
new (): {
|
|
702
|
+
$props: VNodeProps & KeepAliveProps;
|
|
703
|
+
$slots: {
|
|
704
|
+
default(): VNode[];
|
|
766
705
|
};
|
|
706
|
+
};
|
|
767
707
|
};
|
|
768
708
|
export declare function onActivated(hook: Function, target?: GenericComponentInstance | null): void;
|
|
769
709
|
export declare function onDeactivated(hook: Function, target?: GenericComponentInstance | null): void;
|
|
770
|
-
|
|
710
|
+
//#endregion
|
|
711
|
+
//#region temp/packages/runtime-core/src/apiLifecycle.d.ts
|
|
771
712
|
type CreateHook<T = any> = (hook: T, target?: GenericComponentInstance | null) => void;
|
|
772
713
|
export declare const onBeforeMount: CreateHook;
|
|
773
714
|
export declare const onMounted: CreateHook;
|
|
@@ -776,121 +717,120 @@ export declare const onUpdated: CreateHook;
|
|
|
776
717
|
export declare const onBeforeUnmount: CreateHook;
|
|
777
718
|
export declare const onUnmounted: CreateHook;
|
|
778
719
|
export declare const onServerPrefetch: CreateHook;
|
|
779
|
-
type DebuggerHook = (e: DebuggerEvent) => void;
|
|
720
|
+
type DebuggerHook = (e: DebuggerEvent$1) => void;
|
|
780
721
|
export declare const onRenderTriggered: CreateHook<DebuggerHook>;
|
|
781
722
|
export declare const onRenderTracked: CreateHook<DebuggerHook>;
|
|
782
723
|
type ErrorCapturedHook<TError = unknown> = (err: TError, instance: ComponentPublicInstance | null, info: string) => boolean | void;
|
|
783
724
|
export declare function onErrorCaptured<TError = Error>(hook: ErrorCapturedHook<TError>, target?: GenericComponentInstance | null): void;
|
|
784
|
-
|
|
725
|
+
//#endregion
|
|
726
|
+
//#region temp/packages/runtime-core/src/compat/compatConfig.d.ts
|
|
785
727
|
declare enum DeprecationTypes$1 {
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
}
|
|
829
|
-
type CompatConfig = Partial<Record<DeprecationTypes$1, boolean |
|
|
830
|
-
|
|
728
|
+
GLOBAL_MOUNT = "GLOBAL_MOUNT",
|
|
729
|
+
GLOBAL_MOUNT_CONTAINER = "GLOBAL_MOUNT_CONTAINER",
|
|
730
|
+
GLOBAL_EXTEND = "GLOBAL_EXTEND",
|
|
731
|
+
GLOBAL_PROTOTYPE = "GLOBAL_PROTOTYPE",
|
|
732
|
+
GLOBAL_SET = "GLOBAL_SET",
|
|
733
|
+
GLOBAL_DELETE = "GLOBAL_DELETE",
|
|
734
|
+
GLOBAL_OBSERVABLE = "GLOBAL_OBSERVABLE",
|
|
735
|
+
GLOBAL_PRIVATE_UTIL = "GLOBAL_PRIVATE_UTIL",
|
|
736
|
+
CONFIG_SILENT = "CONFIG_SILENT",
|
|
737
|
+
CONFIG_DEVTOOLS = "CONFIG_DEVTOOLS",
|
|
738
|
+
CONFIG_KEY_CODES = "CONFIG_KEY_CODES",
|
|
739
|
+
CONFIG_PRODUCTION_TIP = "CONFIG_PRODUCTION_TIP",
|
|
740
|
+
CONFIG_IGNORED_ELEMENTS = "CONFIG_IGNORED_ELEMENTS",
|
|
741
|
+
CONFIG_WHITESPACE = "CONFIG_WHITESPACE",
|
|
742
|
+
CONFIG_OPTION_MERGE_STRATS = "CONFIG_OPTION_MERGE_STRATS",
|
|
743
|
+
INSTANCE_SET = "INSTANCE_SET",
|
|
744
|
+
INSTANCE_DELETE = "INSTANCE_DELETE",
|
|
745
|
+
INSTANCE_DESTROY = "INSTANCE_DESTROY",
|
|
746
|
+
INSTANCE_EVENT_EMITTER = "INSTANCE_EVENT_EMITTER",
|
|
747
|
+
INSTANCE_EVENT_HOOKS = "INSTANCE_EVENT_HOOKS",
|
|
748
|
+
INSTANCE_CHILDREN = "INSTANCE_CHILDREN",
|
|
749
|
+
INSTANCE_LISTENERS = "INSTANCE_LISTENERS",
|
|
750
|
+
INSTANCE_SCOPED_SLOTS = "INSTANCE_SCOPED_SLOTS",
|
|
751
|
+
INSTANCE_ATTRS_CLASS_STYLE = "INSTANCE_ATTRS_CLASS_STYLE",
|
|
752
|
+
OPTIONS_DATA_FN = "OPTIONS_DATA_FN",
|
|
753
|
+
OPTIONS_DATA_MERGE = "OPTIONS_DATA_MERGE",
|
|
754
|
+
OPTIONS_BEFORE_DESTROY = "OPTIONS_BEFORE_DESTROY",
|
|
755
|
+
OPTIONS_DESTROYED = "OPTIONS_DESTROYED",
|
|
756
|
+
WATCH_ARRAY = "WATCH_ARRAY",
|
|
757
|
+
PROPS_DEFAULT_THIS = "PROPS_DEFAULT_THIS",
|
|
758
|
+
V_ON_KEYCODE_MODIFIER = "V_ON_KEYCODE_MODIFIER",
|
|
759
|
+
CUSTOM_DIR = "CUSTOM_DIR",
|
|
760
|
+
ATTR_FALSE_VALUE = "ATTR_FALSE_VALUE",
|
|
761
|
+
ATTR_ENUMERATED_COERCION = "ATTR_ENUMERATED_COERCION",
|
|
762
|
+
TRANSITION_CLASSES = "TRANSITION_CLASSES",
|
|
763
|
+
TRANSITION_GROUP_ROOT = "TRANSITION_GROUP_ROOT",
|
|
764
|
+
COMPONENT_ASYNC = "COMPONENT_ASYNC",
|
|
765
|
+
COMPONENT_FUNCTIONAL = "COMPONENT_FUNCTIONAL",
|
|
766
|
+
COMPONENT_V_MODEL = "COMPONENT_V_MODEL",
|
|
767
|
+
RENDER_FUNCTION = "RENDER_FUNCTION",
|
|
768
|
+
FILTERS = "FILTERS",
|
|
769
|
+
PRIVATE_APIS = "PRIVATE_APIS"
|
|
770
|
+
}
|
|
771
|
+
type CompatConfig = Partial<Record<DeprecationTypes$1, boolean | "suppress-warning">> & {
|
|
772
|
+
MODE?: 2 | 3 | ((comp: Component | null) => 2 | 3);
|
|
831
773
|
};
|
|
832
774
|
declare function configureCompat(config: CompatConfig): void;
|
|
833
|
-
|
|
775
|
+
//#endregion
|
|
776
|
+
//#region temp/packages/runtime-core/src/componentOptions.d.ts
|
|
834
777
|
/**
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
export interface ComponentCustomOptions {
|
|
851
|
-
}
|
|
778
|
+
* Interface for declaring custom options.
|
|
779
|
+
*
|
|
780
|
+
* @example
|
|
781
|
+
* ```ts
|
|
782
|
+
* declare module 'vue' {
|
|
783
|
+
* interface ComponentCustomOptions {
|
|
784
|
+
* beforeRouteUpdate?(
|
|
785
|
+
* to: Route,
|
|
786
|
+
* from: Route,
|
|
787
|
+
* next: () => void
|
|
788
|
+
* ): void
|
|
789
|
+
* }
|
|
790
|
+
* }
|
|
791
|
+
* ```
|
|
792
|
+
*/
|
|
793
|
+
export interface ComponentCustomOptions {}
|
|
852
794
|
export type RenderFunction = () => VNodeChild;
|
|
853
795
|
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 {
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
796
|
+
setup?: (this: void, props: LooseRequired<Props & Prettify<UnwrapMixinsType<IntersectionMixin<Mixin> & IntersectionMixin<Extends>, "P">>>, ctx: SetupContext<E, S>) => Promise<RawBindings> | RawBindings | RenderFunction | void;
|
|
797
|
+
name?: string;
|
|
798
|
+
template?: string | object;
|
|
799
|
+
render?: Function;
|
|
800
|
+
components?: LC & Record<string, Component>;
|
|
801
|
+
directives?: Directives & Record<string, Directive>;
|
|
802
|
+
inheritAttrs?: boolean;
|
|
803
|
+
emits?: (E | EE[]) & ThisType<void>;
|
|
804
|
+
slots?: S;
|
|
805
|
+
expose?: Exposed[];
|
|
806
|
+
serverPrefetch?(): void | Promise<any>;
|
|
807
|
+
compilerOptions?: RuntimeCompilerOptions;
|
|
808
|
+
call?: (this: unknown, ...args: unknown[]) => never;
|
|
809
|
+
__isFragment?: never;
|
|
810
|
+
__isTeleport?: never;
|
|
811
|
+
__isSuspense?: never;
|
|
812
|
+
__defaults?: Defaults;
|
|
871
813
|
}
|
|
872
814
|
/**
|
|
873
|
-
|
|
874
|
-
|
|
815
|
+
* Subset of compiler options that makes sense for the runtime.
|
|
816
|
+
*/
|
|
875
817
|
export interface RuntimeCompilerOptions {
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
818
|
+
isCustomElement?: (tag: string) => boolean;
|
|
819
|
+
whitespace?: "preserve" | "condense";
|
|
820
|
+
comments?: boolean;
|
|
821
|
+
delimiters?: [string, string];
|
|
880
822
|
}
|
|
881
823
|
export type ComponentOptions<Props = {}, RawBindings = any, D = any, C extends ComputedOptions = any, M extends MethodOptions = any, Mixin extends ComponentOptionsMixin = any, Extends extends ComponentOptionsMixin = any, E extends EmitsOptions = any, 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> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults, I, II, S, LC, Directives, Exposed, Provide> & ThisType<CreateComponentPublicInstanceWithMixins<{}, RawBindings, D, C, M, Mixin, Extends, E, Readonly<Props>, Defaults, false, I, S, LC, Directives>>;
|
|
882
824
|
export type ComponentOptionsMixin = ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any>;
|
|
883
|
-
export type ComputedOptions = Record<string, ComputedGetter<any> | WritableComputedOptions<any>>;
|
|
825
|
+
export type ComputedOptions = Record<string, ComputedGetter$1<any> | WritableComputedOptions$1<any>>;
|
|
884
826
|
export interface MethodOptions {
|
|
885
|
-
|
|
827
|
+
[key: string]: Function;
|
|
886
828
|
}
|
|
887
|
-
type ExtractComputedReturns<T extends any> = {
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
} ? TReturn : T[key] extends (...args: any[]) => infer TReturn ? TReturn : never;
|
|
891
|
-
};
|
|
829
|
+
type ExtractComputedReturns<T extends any> = { [key in keyof T]: T[key] extends {
|
|
830
|
+
get: (...args: any[]) => infer TReturn;
|
|
831
|
+
} ? TReturn : T[key] extends ((...args: any[]) => infer TReturn) ? TReturn : never };
|
|
892
832
|
type ObjectWatchOptionItem = {
|
|
893
|
-
|
|
833
|
+
handler: WatchCallback | string;
|
|
894
834
|
} & WatchOptions;
|
|
895
835
|
type WatchOptionItem = string | WatchCallback | ObjectWatchOptionItem;
|
|
896
836
|
type ComponentWatchOptionItem = WatchOptionItem | WatchOptionItem[];
|
|
@@ -899,764 +839,763 @@ export type ComponentProvideOptions = ObjectProvideOptions | Function;
|
|
|
899
839
|
type ObjectProvideOptions = Record<string | symbol, unknown>;
|
|
900
840
|
export type ComponentInjectOptions = string[] | ObjectInjectOptions;
|
|
901
841
|
type ObjectInjectOptions = Record<string | symbol, string | symbol | {
|
|
902
|
-
|
|
903
|
-
|
|
842
|
+
from?: string | symbol;
|
|
843
|
+
default?: unknown;
|
|
904
844
|
}>;
|
|
905
|
-
type InjectToObject<T extends ComponentInjectOptions> = T extends string[] ? {
|
|
906
|
-
[K in T[number]]?: unknown;
|
|
907
|
-
} : T extends ObjectInjectOptions ? {
|
|
908
|
-
[K in keyof T]?: unknown;
|
|
909
|
-
} : never;
|
|
845
|
+
type InjectToObject<T extends ComponentInjectOptions> = T extends string[] ? { [K in T[number]]?: unknown } : T extends ObjectInjectOptions ? { [K in keyof T]?: unknown } : never;
|
|
910
846
|
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> {
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
847
|
+
compatConfig?: CompatConfig;
|
|
848
|
+
[key: string]: any;
|
|
849
|
+
data?: (this: CreateComponentPublicInstanceWithMixins<Props, {}, {}, {}, MethodOptions, Mixin, Extends>, vm: CreateComponentPublicInstanceWithMixins<Props, {}, {}, {}, MethodOptions, Mixin, Extends>) => D;
|
|
850
|
+
computed?: C;
|
|
851
|
+
methods?: M;
|
|
852
|
+
watch?: ComponentWatchOptions;
|
|
853
|
+
provide?: Provide;
|
|
854
|
+
inject?: I | II[];
|
|
855
|
+
filters?: Record<string, Function>;
|
|
856
|
+
mixins?: Mixin[];
|
|
857
|
+
extends?: Extends;
|
|
858
|
+
beforeCreate?(): any;
|
|
859
|
+
created?(): any;
|
|
860
|
+
beforeMount?(): any;
|
|
861
|
+
mounted?(): any;
|
|
862
|
+
beforeUpdate?(): any;
|
|
863
|
+
updated?(): any;
|
|
864
|
+
activated?(): any;
|
|
865
|
+
deactivated?(): any;
|
|
866
|
+
/** @deprecated use `beforeUnmount` instead */
|
|
867
|
+
beforeDestroy?(): any;
|
|
868
|
+
beforeUnmount?(): any;
|
|
869
|
+
/** @deprecated use `unmounted` instead */
|
|
870
|
+
destroyed?(): any;
|
|
871
|
+
unmounted?(): any;
|
|
872
|
+
renderTracked?: DebuggerHook;
|
|
873
|
+
renderTriggered?: DebuggerHook;
|
|
874
|
+
errorCaptured?: ErrorCapturedHook;
|
|
875
|
+
/**
|
|
876
|
+
* runtime compile only
|
|
877
|
+
* @deprecated use `compilerOptions.delimiters` instead.
|
|
878
|
+
*/
|
|
879
|
+
delimiters?: [string, string];
|
|
880
|
+
/**
|
|
881
|
+
* #3468
|
|
882
|
+
*
|
|
883
|
+
* type-only, used to assist Mixin's type inference,
|
|
884
|
+
* TypeScript will try to simplify the inferred `Mixin` type,
|
|
885
|
+
* with the `__differentiator`, TypeScript won't be able to combine different mixins,
|
|
886
|
+
* because the `__differentiator` will be different
|
|
887
|
+
*/
|
|
888
|
+
__differentiator?: keyof D | keyof C | keyof M;
|
|
953
889
|
}
|
|
954
890
|
type MergedHook<T = () => void> = T | T[];
|
|
955
891
|
type MergedComponentOptionsOverride = {
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
renderTriggered?: MergedHook<DebuggerHook>;
|
|
972
|
-
errorCaptured?: MergedHook<ErrorCapturedHook>;
|
|
892
|
+
beforeCreate?: MergedHook;
|
|
893
|
+
created?: MergedHook;
|
|
894
|
+
beforeMount?: MergedHook;
|
|
895
|
+
mounted?: MergedHook;
|
|
896
|
+
beforeUpdate?: MergedHook;
|
|
897
|
+
updated?: MergedHook;
|
|
898
|
+
activated?: MergedHook;
|
|
899
|
+
deactivated?: MergedHook; /** @deprecated use `beforeUnmount` instead */
|
|
900
|
+
beforeDestroy?: MergedHook;
|
|
901
|
+
beforeUnmount?: MergedHook; /** @deprecated use `unmounted` instead */
|
|
902
|
+
destroyed?: MergedHook;
|
|
903
|
+
unmounted?: MergedHook;
|
|
904
|
+
renderTracked?: MergedHook<DebuggerHook>;
|
|
905
|
+
renderTriggered?: MergedHook<DebuggerHook>;
|
|
906
|
+
errorCaptured?: MergedHook<ErrorCapturedHook>;
|
|
973
907
|
};
|
|
974
|
-
type OptionTypesKeys =
|
|
908
|
+
type OptionTypesKeys = "P" | "B" | "D" | "C" | "M" | "Defaults";
|
|
975
909
|
type OptionTypesType<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Defaults = {}> = {
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
910
|
+
P: P;
|
|
911
|
+
B: B;
|
|
912
|
+
D: D;
|
|
913
|
+
C: C;
|
|
914
|
+
M: M;
|
|
915
|
+
Defaults: Defaults;
|
|
982
916
|
};
|
|
983
917
|
/**
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
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> & {
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
918
|
+
* @deprecated
|
|
919
|
+
*/
|
|
920
|
+
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> & {
|
|
921
|
+
props?: never;
|
|
922
|
+
/**
|
|
923
|
+
* @private for language-tools use only
|
|
924
|
+
*/
|
|
925
|
+
__typeProps?: Props;
|
|
926
|
+
/**
|
|
927
|
+
* @private for language-tools use only
|
|
928
|
+
*/
|
|
929
|
+
__typeEmits?: TE;
|
|
996
930
|
} & ThisType<CreateComponentPublicInstanceWithMixins<PE, RawBindings, D, C, M, Mixin, Extends, ResolvedEmits, EE, {}, false, I, S, LC, Directives, string>>;
|
|
997
931
|
/**
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
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<{
|
|
1001
|
-
|
|
1002
|
-
} & EmitsToProps<E>>>> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, {}, I, II, S, LC, Directives, Exposed, Provide> & {
|
|
1003
|
-
props: PropNames[];
|
|
932
|
+
* @deprecated
|
|
933
|
+
*/
|
|
934
|
+
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> & {
|
|
935
|
+
props: PropNames[];
|
|
1004
936
|
} & ThisType<CreateComponentPublicInstanceWithMixins<Props, RawBindings, D, C, M, Mixin, Extends, E, Props, {}, false, I, S, LC, Directives, string>>;
|
|
1005
937
|
/**
|
|
1006
|
-
|
|
1007
|
-
|
|
938
|
+
* @deprecated
|
|
939
|
+
*/
|
|
1008
940
|
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> & {
|
|
1009
|
-
|
|
941
|
+
props: PropsOptions & ThisType<void>;
|
|
1010
942
|
} & ThisType<CreateComponentPublicInstanceWithMixins<Props, RawBindings, D, C, M, Mixin, Extends, E, Props, Defaults, false, I, S, LC, Directives>>;
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
}
|
|
943
|
+
//#endregion
|
|
944
|
+
//#region temp/packages/runtime-core/src/apiInject.d.ts
|
|
945
|
+
interface InjectionConstraint<T> {}
|
|
1014
946
|
export type InjectionKey<T> = symbol & InjectionConstraint<T>;
|
|
1015
947
|
export declare function provide<T, K = InjectionKey<T> | string | number>(key: K, value: K extends InjectionKey<infer V> ? V : T): void;
|
|
1016
948
|
export declare function inject<T>(key: InjectionKey<T> | string): T | undefined;
|
|
1017
949
|
export declare function inject<T>(key: InjectionKey<T> | string, defaultValue: T, treatDefaultAsFactory?: false): T;
|
|
1018
950
|
export declare function inject<T>(key: InjectionKey<T> | string, defaultValue: T | (() => T), treatDefaultAsFactory: true): T;
|
|
1019
951
|
/**
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
952
|
+
* Returns true if `inject()` can be used without warning about being called in the wrong place (e.g. outside of
|
|
953
|
+
* setup()). This is used by libraries that want to use `inject()` internally without triggering a warning to the end
|
|
954
|
+
* user. One example is `useRoute()` in `vue-router`.
|
|
955
|
+
*/
|
|
1024
956
|
export declare function hasInjectionContext(): boolean;
|
|
1025
|
-
|
|
957
|
+
//#endregion
|
|
958
|
+
//#region temp/packages/runtime-core/src/apiDefineComponent.d.ts
|
|
1026
959
|
export type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
1027
960
|
type ResolveProps<PropsOrPropOptions, E extends EmitsOptions> = Readonly<PropsOrPropOptions extends ComponentPropsOptions ? ExtractPropTypes<PropsOrPropOptions> : PropsOrPropOptions> & ({} extends E ? {} : EmitsToProps<E>);
|
|
1028
961
|
export type DefineComponent<PropsOrPropOptions = {}, RawBindings = {}, D = {}, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, PP = PublicProps, Props = ResolveProps<PropsOrPropOptions, E>, Defaults = ExtractDefaultPropTypes<PropsOrPropOptions>, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, MakeDefaultsOptional extends boolean = true, TypeRefs extends Record<string, unknown> = {}, TypeEl extends Element = any> = ComponentPublicInstanceConstructor<CreateComponentPublicInstanceWithMixins<Props, RawBindings, D, C, M, Mixin, Extends, E, PP, Defaults, MakeDefaultsOptional, {}, S, LC & GlobalComponents, Directives & GlobalDirectives, Exposed, TypeRefs, TypeEl>> & ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults, {}, string, S, LC & GlobalComponents, Directives & GlobalDirectives, Exposed, Provide> & PP;
|
|
1029
962
|
export type DefineSetupFnComponent<P extends Record<string, any>, E extends EmitsOptions = {}, S extends SlotsType = SlotsType, Props = P & EmitsToProps<E>, PP = PublicProps> = new (props: Props & PP) => CreateComponentPublicInstanceWithMixins<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, E, PP, {}, false, {}, S>;
|
|
1030
963
|
type ToResolvedProps<Props, Emits extends EmitsOptions> = Readonly<Props> & Readonly<EmitsToProps<Emits>>;
|
|
1031
|
-
export declare function defineComponent<Props extends Record<string, any>, E extends EmitsOptions = {}, EE extends string = string, S extends SlotsType = {}>(setup: (props: Props, ctx: SetupContext<E, S>) => RenderFunction | Promise<RenderFunction>, options?: Pick<ComponentOptions,
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
964
|
+
export declare function defineComponent<Props extends Record<string, any>, E extends EmitsOptions = {}, EE extends string = string, S extends SlotsType = {}>(setup: (props: Props, ctx: SetupContext<E, S>) => RenderFunction | Promise<RenderFunction>, options?: Pick<ComponentOptions, "name" | "inheritAttrs"> & {
|
|
965
|
+
props?: (keyof Props)[];
|
|
966
|
+
emits?: E | EE[];
|
|
967
|
+
slots?: S;
|
|
1035
968
|
}): DefineSetupFnComponent<Props, E, S>;
|
|
1036
|
-
export declare function defineComponent<Props extends Record<string, any>, E extends EmitsOptions = {}, EE extends string = string, S extends SlotsType = {}>(setup: (props: Props, ctx: SetupContext<E, S>) => RenderFunction | Promise<RenderFunction>, options?: Pick<ComponentOptions,
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
969
|
+
export declare function defineComponent<Props extends Record<string, any>, E extends EmitsOptions = {}, EE extends string = string, S extends SlotsType = {}>(setup: (props: Props, ctx: SetupContext<E, S>) => RenderFunction | Promise<RenderFunction>, options?: Pick<ComponentOptions, "name" | "inheritAttrs"> & {
|
|
970
|
+
props?: ComponentObjectPropsOptions<Props>;
|
|
971
|
+
emits?: E | EE[];
|
|
972
|
+
slots?: S;
|
|
1040
973
|
}): DefineSetupFnComponent<Props, E, S>;
|
|
1041
|
-
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> : {
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
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>;
|
|
1063
|
-
|
|
974
|
+
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 extends Element = any>(options: {
|
|
975
|
+
props?: (RuntimePropsOptions & ThisType<void>) | RuntimePropsKeys[];
|
|
976
|
+
/**
|
|
977
|
+
* @private for language-tools use only
|
|
978
|
+
*/
|
|
979
|
+
__typeProps?: TypeProps;
|
|
980
|
+
/**
|
|
981
|
+
* @private for language-tools use only
|
|
982
|
+
*/
|
|
983
|
+
__typeEmits?: TypeEmits;
|
|
984
|
+
/**
|
|
985
|
+
* @private for language-tools use only
|
|
986
|
+
*/
|
|
987
|
+
__typeRefs?: TypeRefs;
|
|
988
|
+
/**
|
|
989
|
+
* @private for language-tools use only
|
|
990
|
+
*/
|
|
991
|
+
__typeEl?: TypeEl;
|
|
992
|
+
} & 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>;
|
|
993
|
+
//#endregion
|
|
994
|
+
//#region temp/packages/runtime-core/src/apiCreateApp.d.ts
|
|
1064
995
|
export interface App<HostElement = any> {
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
runWithContext<T>(fn: () => T): T;
|
|
1098
|
-
_uid: number;
|
|
1099
|
-
_component: GenericComponent;
|
|
1100
|
-
_props: Data | null;
|
|
1101
|
-
_container: HostElement | null;
|
|
1102
|
-
_context: AppContext;
|
|
1103
|
-
_instance: GenericComponentInstance | null;
|
|
1104
|
-
/**
|
|
1105
|
-
* v2 compat only
|
|
1106
|
-
*/
|
|
1107
|
-
filter?(name: string): Function | undefined;
|
|
1108
|
-
filter?(name: string, filter: Function): this;
|
|
996
|
+
vapor?: boolean;
|
|
997
|
+
version: string;
|
|
998
|
+
config: AppConfig;
|
|
999
|
+
use<Options extends unknown[]>(plugin: Plugin<Options>, ...options: NoInfer<Options>): this;
|
|
1000
|
+
use<Options>(plugin: Plugin<Options>, options: NoInfer<Options>): this;
|
|
1001
|
+
mixin(mixin: ComponentOptions): this;
|
|
1002
|
+
component(name: string): Component | undefined;
|
|
1003
|
+
component<T extends Component | DefineComponent>(name: string, component: T): this;
|
|
1004
|
+
directive<HostElement = any, Value = any, Modifiers extends string = string, Arg = any>(name: string): Directive<HostElement, Value, Modifiers, Arg> | undefined;
|
|
1005
|
+
directive<HostElement = any, Value = any, Modifiers extends string = string, Arg = any>(name: string, directive: Directive<HostElement, Value, Modifiers, Arg>): this;
|
|
1006
|
+
mount(rootContainer: HostElement | string, isHydrate?: boolean, namespace?: boolean | ElementNamespace, vnode?: VNode): ComponentPublicInstance;
|
|
1007
|
+
unmount(): void;
|
|
1008
|
+
onUnmount(cb: () => void): void;
|
|
1009
|
+
provide<T, K = InjectionKey<T> | string | number>(key: K, value: K extends InjectionKey<infer V> ? V : T): this;
|
|
1010
|
+
/**
|
|
1011
|
+
* Runs a function with the app as active instance. This allows using of `inject()` within the function to get access
|
|
1012
|
+
* to variables provided via `app.provide()`.
|
|
1013
|
+
*
|
|
1014
|
+
* @param fn - function to run with the app as active instance
|
|
1015
|
+
*/
|
|
1016
|
+
runWithContext<T>(fn: () => T): T;
|
|
1017
|
+
_uid: number;
|
|
1018
|
+
_component: GenericComponent;
|
|
1019
|
+
_props: Data | null;
|
|
1020
|
+
_container: HostElement | null;
|
|
1021
|
+
_context: AppContext;
|
|
1022
|
+
_instance: GenericComponentInstance | null;
|
|
1023
|
+
/**
|
|
1024
|
+
* v2 compat only
|
|
1025
|
+
*/
|
|
1026
|
+
filter?(name: string): Function | undefined;
|
|
1027
|
+
filter?(name: string, filter: Function): this;
|
|
1109
1028
|
}
|
|
1110
1029
|
export type OptionMergeFunction = (to: unknown, from: unknown) => any;
|
|
1111
1030
|
/**
|
|
1112
|
-
|
|
1113
|
-
|
|
1031
|
+
* Shared app config between vdom and vapor
|
|
1032
|
+
*/
|
|
1114
1033
|
interface GenericAppConfig {
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1034
|
+
performance?: boolean;
|
|
1035
|
+
errorHandler?: (err: unknown, instance: ComponentPublicInstance | null, info: string) => void;
|
|
1036
|
+
warnHandler?: (msg: string, instance: ComponentPublicInstance | null, trace: string) => void;
|
|
1037
|
+
/**
|
|
1038
|
+
* Whether to throw unhandled errors in production.
|
|
1039
|
+
* Default is `false` to avoid crashing on any error (and only logs it)
|
|
1040
|
+
* But in some cases, e.g. SSR, throwing might be more desirable.
|
|
1041
|
+
*/
|
|
1042
|
+
throwUnhandledErrorInProduction?: boolean;
|
|
1043
|
+
/**
|
|
1044
|
+
* Prefix for all useId() calls within this app
|
|
1045
|
+
*/
|
|
1046
|
+
idPrefix?: string;
|
|
1128
1047
|
}
|
|
1129
1048
|
export interface AppConfig extends GenericAppConfig {
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1049
|
+
readonly isNativeTag: (tag: string) => boolean;
|
|
1050
|
+
optionMergeStrategies: Record<string, OptionMergeFunction>;
|
|
1051
|
+
globalProperties: ComponentCustomProperties & Record<string, any>;
|
|
1052
|
+
/**
|
|
1053
|
+
* Options to pass to `@vue/compiler-dom`.
|
|
1054
|
+
* Only supported in runtime compiler build.
|
|
1055
|
+
*/
|
|
1056
|
+
compilerOptions: RuntimeCompilerOptions;
|
|
1057
|
+
/**
|
|
1058
|
+
* @deprecated use config.compilerOptions.isCustomElement
|
|
1059
|
+
*/
|
|
1060
|
+
isCustomElement?: (tag: string) => boolean;
|
|
1142
1061
|
}
|
|
1143
1062
|
/**
|
|
1144
|
-
|
|
1145
|
-
|
|
1063
|
+
* Minimal app context shared between vdom and vapor
|
|
1064
|
+
*/
|
|
1146
1065
|
export interface GenericAppContext {
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1066
|
+
app: App;
|
|
1067
|
+
config: GenericAppConfig;
|
|
1068
|
+
provides: Record<string | symbol, any>;
|
|
1069
|
+
components?: Record<string, Component>;
|
|
1070
|
+
directives?: Record<string, Directive>;
|
|
1152
1071
|
}
|
|
1153
1072
|
export interface AppContext extends GenericAppContext {
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1073
|
+
config: AppConfig;
|
|
1074
|
+
components: Record<string, Component>;
|
|
1075
|
+
directives: Record<string, Directive>;
|
|
1076
|
+
mixins: ComponentOptions[];
|
|
1158
1077
|
}
|
|
1159
1078
|
type PluginInstallFunction<Options = any[]> = Options extends unknown[] ? (app: App, ...options: Options) => any : (app: App, options: Options) => any;
|
|
1160
1079
|
export type ObjectPlugin<Options = any[]> = {
|
|
1161
|
-
|
|
1080
|
+
install: PluginInstallFunction<Options>;
|
|
1162
1081
|
};
|
|
1163
1082
|
export type FunctionPlugin<Options = any[]> = PluginInstallFunction<Options> & Partial<ObjectPlugin<Options>>;
|
|
1164
|
-
export type Plugin<Options = any[], P extends unknown[] = Options extends unknown[] ? Options : [Options]> = FunctionPlugin<P> | ObjectPlugin<P>;
|
|
1083
|
+
export type Plugin<Options = any[], P extends unknown[] = (Options extends unknown[] ? Options : [Options])> = FunctionPlugin<P> | ObjectPlugin<P>;
|
|
1165
1084
|
export type CreateAppFunction<HostElement, Comp = Component> = (rootComponent: Comp, rootProps?: Data | null) => App<HostElement>;
|
|
1166
|
-
|
|
1085
|
+
//#endregion
|
|
1086
|
+
//#region temp/packages/runtime-core/src/components/Teleport.d.ts
|
|
1167
1087
|
type TeleportVNode = VNode<RendererNode, RendererElement, TeleportProps>;
|
|
1168
1088
|
export interface TeleportProps {
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1089
|
+
to: string | RendererElement | null | undefined;
|
|
1090
|
+
disabled?: boolean;
|
|
1091
|
+
defer?: boolean;
|
|
1172
1092
|
}
|
|
1173
1093
|
declare const TeleportImpl: {
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1094
|
+
name: string;
|
|
1095
|
+
__isTeleport: boolean;
|
|
1096
|
+
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;
|
|
1097
|
+
remove(vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, {
|
|
1098
|
+
um: unmount,
|
|
1099
|
+
o: {
|
|
1100
|
+
remove: hostRemove
|
|
1101
|
+
}
|
|
1102
|
+
}: RendererInternals, doRemove: boolean): void;
|
|
1103
|
+
move: typeof moveTeleport;
|
|
1104
|
+
hydrate: typeof hydrateTeleport;
|
|
1180
1105
|
};
|
|
1181
1106
|
declare enum TeleportMoveTypes {
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
}
|
|
1186
|
-
declare function moveTeleport(vnode: VNode, container: RendererElement, parentAnchor: RendererNode | null, {
|
|
1187
|
-
|
|
1107
|
+
TARGET_CHANGE = 0,
|
|
1108
|
+
TOGGLE = 1,
|
|
1109
|
+
REORDER = 2
|
|
1110
|
+
}
|
|
1111
|
+
declare function moveTeleport(vnode: VNode, container: RendererElement, parentAnchor: RendererNode | null, {
|
|
1112
|
+
o: {
|
|
1113
|
+
insert
|
|
1114
|
+
},
|
|
1115
|
+
m: move
|
|
1116
|
+
}: RendererInternals, parentComponent: ComponentInternalInstance | null, moveType?: TeleportMoveTypes): void;
|
|
1117
|
+
declare function hydrateTeleport(node: Node, vnode: TeleportVNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean, {
|
|
1118
|
+
o: {
|
|
1119
|
+
nextSibling,
|
|
1120
|
+
parentNode,
|
|
1121
|
+
querySelector,
|
|
1122
|
+
insert,
|
|
1123
|
+
createText
|
|
1124
|
+
}
|
|
1125
|
+
}: 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;
|
|
1188
1126
|
export declare const Teleport: {
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
};
|
|
1127
|
+
__isTeleport: true;
|
|
1128
|
+
new (): {
|
|
1129
|
+
$props: VNodeProps & TeleportProps;
|
|
1130
|
+
$slots: {
|
|
1131
|
+
default(): VNode[];
|
|
1195
1132
|
};
|
|
1133
|
+
};
|
|
1196
1134
|
};
|
|
1197
|
-
|
|
1135
|
+
//#endregion
|
|
1136
|
+
//#region temp/packages/runtime-core/src/helpers/resolveAssets.d.ts
|
|
1198
1137
|
/**
|
|
1199
|
-
|
|
1200
|
-
|
|
1138
|
+
* @private
|
|
1139
|
+
*/
|
|
1201
1140
|
export declare function resolveComponent(name: string, maybeSelfReference?: boolean): ConcreteComponent | string;
|
|
1202
1141
|
export declare const NULL_DYNAMIC_COMPONENT: unique symbol;
|
|
1203
1142
|
/**
|
|
1204
|
-
|
|
1205
|
-
|
|
1143
|
+
* @private
|
|
1144
|
+
*/
|
|
1206
1145
|
export declare function resolveDynamicComponent(component: unknown): VNodeTypes;
|
|
1207
1146
|
/**
|
|
1208
|
-
|
|
1209
|
-
|
|
1147
|
+
* @private
|
|
1148
|
+
*/
|
|
1210
1149
|
export declare function resolveDirective(name: string): Directive | undefined;
|
|
1211
|
-
|
|
1150
|
+
//#endregion
|
|
1151
|
+
//#region temp/packages/runtime-core/src/vnode.d.ts
|
|
1212
1152
|
export declare const Fragment: {
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1153
|
+
__isFragment: true;
|
|
1154
|
+
new (): {
|
|
1155
|
+
$props: VNodeProps;
|
|
1156
|
+
};
|
|
1217
1157
|
};
|
|
1218
1158
|
export declare const Text: unique symbol;
|
|
1219
|
-
export declare const Comment: unique symbol;
|
|
1159
|
+
export declare const Comment$1: unique symbol;
|
|
1220
1160
|
export declare const Static: unique symbol;
|
|
1221
1161
|
declare const VaporSlot: unique symbol;
|
|
1222
|
-
export type VNodeTypes = string | VNode | Component | typeof Text | typeof Static | typeof Comment | typeof Fragment | typeof Teleport | typeof TeleportImpl | typeof Suspense | typeof SuspenseImpl | typeof VaporSlot;
|
|
1223
|
-
export type VNodeRef = string | Ref | ((ref: Element | ComponentPublicInstance | null, refs: Record<string, any>) => void);
|
|
1162
|
+
export type VNodeTypes = string | VNode | Component | typeof Text | typeof Static | typeof Comment$1 | typeof Fragment | typeof Teleport | typeof TeleportImpl | typeof Suspense | typeof SuspenseImpl | typeof VaporSlot;
|
|
1163
|
+
export type VNodeRef = string | Ref$1 | ((ref: Element | ComponentPublicInstance | null, refs: Record<string, any>) => void);
|
|
1224
1164
|
type VNodeNormalizedRefAtom = {
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1165
|
+
/**
|
|
1166
|
+
* component instance
|
|
1167
|
+
*/
|
|
1168
|
+
i: ComponentInternalInstance;
|
|
1169
|
+
/**
|
|
1170
|
+
* Actual ref
|
|
1171
|
+
*/
|
|
1172
|
+
r: VNodeRef;
|
|
1173
|
+
/**
|
|
1174
|
+
* setup ref key
|
|
1175
|
+
*/
|
|
1176
|
+
k?: string;
|
|
1177
|
+
/**
|
|
1178
|
+
* refInFor marker
|
|
1179
|
+
*/
|
|
1180
|
+
f?: boolean;
|
|
1241
1181
|
};
|
|
1242
1182
|
type VNodeNormalizedRef = VNodeNormalizedRefAtom | VNodeNormalizedRefAtom[];
|
|
1243
1183
|
type VNodeMountHook = (vnode: VNode) => void;
|
|
1244
1184
|
type VNodeUpdateHook = (vnode: VNode, oldVNode: VNode) => void;
|
|
1245
1185
|
export type VNodeProps = {
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1186
|
+
key?: PropertyKey;
|
|
1187
|
+
ref?: VNodeRef;
|
|
1188
|
+
ref_for?: boolean;
|
|
1189
|
+
ref_key?: string;
|
|
1190
|
+
onVnodeBeforeMount?: VNodeMountHook | VNodeMountHook[];
|
|
1191
|
+
onVnodeMounted?: VNodeMountHook | VNodeMountHook[];
|
|
1192
|
+
onVnodeBeforeUpdate?: VNodeUpdateHook | VNodeUpdateHook[];
|
|
1193
|
+
onVnodeUpdated?: VNodeUpdateHook | VNodeUpdateHook[];
|
|
1194
|
+
onVnodeBeforeUnmount?: VNodeMountHook | VNodeMountHook[];
|
|
1195
|
+
onVnodeUnmounted?: VNodeMountHook | VNodeMountHook[];
|
|
1256
1196
|
};
|
|
1257
1197
|
type VNodeChildAtom = VNode | string | number | boolean | null | undefined | void;
|
|
1258
1198
|
export type VNodeArrayChildren = Array<VNodeArrayChildren | VNodeChildAtom>;
|
|
1259
1199
|
export type VNodeChild = VNodeChildAtom | VNodeArrayChildren;
|
|
1260
1200
|
export type VNodeNormalizedChildren = string | VNodeArrayChildren | RawSlots | null;
|
|
1261
1201
|
export interface VNode<HostNode = RendererNode, HostElement = RendererElement, ExtraProps = {
|
|
1262
|
-
|
|
1202
|
+
[key: string]: any;
|
|
1263
1203
|
}> {
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1204
|
+
type: VNodeTypes;
|
|
1205
|
+
props: (VNodeProps & ExtraProps) | null;
|
|
1206
|
+
key: PropertyKey | null;
|
|
1207
|
+
ref: VNodeNormalizedRef | null;
|
|
1208
|
+
/**
|
|
1209
|
+
* SFC only. This is assigned on vnode creation using currentScopeId
|
|
1210
|
+
* which is set alongside currentRenderingInstance.
|
|
1211
|
+
*/
|
|
1212
|
+
scopeId: string | null;
|
|
1213
|
+
children: VNodeNormalizedChildren;
|
|
1214
|
+
component: ComponentInternalInstance | null;
|
|
1215
|
+
dirs: DirectiveBinding[] | null;
|
|
1216
|
+
transition: TransitionHooks<HostElement> | null;
|
|
1217
|
+
el: HostNode | null;
|
|
1218
|
+
placeholder: HostNode | null;
|
|
1219
|
+
anchor: HostNode | null;
|
|
1220
|
+
target: HostElement | null;
|
|
1221
|
+
targetStart: HostNode | null;
|
|
1222
|
+
targetAnchor: HostNode | null;
|
|
1223
|
+
suspense: SuspenseBoundary | null;
|
|
1224
|
+
shapeFlag: number;
|
|
1225
|
+
patchFlag: number;
|
|
1226
|
+
appContext: AppContext | null;
|
|
1287
1227
|
}
|
|
1288
1228
|
/**
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1229
|
+
* Open a block.
|
|
1230
|
+
* This must be called before `createBlock`. It cannot be part of `createBlock`
|
|
1231
|
+
* because the children of the block are evaluated before `createBlock` itself
|
|
1232
|
+
* is called. The generated code typically looks like this:
|
|
1233
|
+
*
|
|
1234
|
+
* ```js
|
|
1235
|
+
* function render() {
|
|
1236
|
+
* return (openBlock(),createBlock('div', null, [...]))
|
|
1237
|
+
* }
|
|
1238
|
+
* ```
|
|
1239
|
+
* disableTracking is true when creating a v-for fragment block, since a v-for
|
|
1240
|
+
* fragment always diffs its children.
|
|
1241
|
+
*
|
|
1242
|
+
* @private
|
|
1243
|
+
*/
|
|
1304
1244
|
export declare function openBlock(disableTracking?: boolean): void;
|
|
1305
1245
|
/**
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1246
|
+
* Block tracking sometimes needs to be disabled, for example during the
|
|
1247
|
+
* creation of a tree that needs to be cached by v-once. The compiler generates
|
|
1248
|
+
* code like this:
|
|
1249
|
+
*
|
|
1250
|
+
* ``` js
|
|
1251
|
+
* _cache[1] || (
|
|
1252
|
+
* setBlockTracking(-1, true),
|
|
1253
|
+
* _cache[1] = createVNode(...),
|
|
1254
|
+
* setBlockTracking(1),
|
|
1255
|
+
* _cache[1]
|
|
1256
|
+
* )
|
|
1257
|
+
* ```
|
|
1258
|
+
*
|
|
1259
|
+
* @private
|
|
1260
|
+
*/
|
|
1321
1261
|
export declare function setBlockTracking(value: number, inVOnce?: boolean): void;
|
|
1322
1262
|
/**
|
|
1323
|
-
|
|
1324
|
-
|
|
1263
|
+
* @private
|
|
1264
|
+
*/
|
|
1325
1265
|
export declare function createElementBlock(type: string | typeof Fragment, props?: Record<string, any> | null, children?: any, patchFlag?: number, dynamicProps?: string[], shapeFlag?: number): VNode;
|
|
1326
1266
|
/**
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1267
|
+
* Create a block root vnode. Takes the same exact arguments as `createVNode`.
|
|
1268
|
+
* A block root keeps track of dynamic nodes within the block in the
|
|
1269
|
+
* `dynamicChildren` array.
|
|
1270
|
+
*
|
|
1271
|
+
* @private
|
|
1272
|
+
*/
|
|
1333
1273
|
export declare function createBlock(type: VNodeTypes | ClassComponent, props?: Record<string, any> | null, children?: any, patchFlag?: number, dynamicProps?: string[]): VNode;
|
|
1334
1274
|
export declare function isVNode(value: any): value is VNode;
|
|
1335
1275
|
declare let vnodeArgsTransformer: ((args: Parameters<typeof _createVNode>, instance: ComponentInternalInstance | null) => Parameters<typeof _createVNode>) | undefined;
|
|
1336
1276
|
/**
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1277
|
+
* Internal API for registering an arguments transform for createVNode
|
|
1278
|
+
* used for creating stubs in the test-utils
|
|
1279
|
+
* It is *internal* but needs to be exposed for test-utils to pick up proper
|
|
1280
|
+
* typings
|
|
1281
|
+
*/
|
|
1342
1282
|
export declare function transformVNodeArgs(transformer?: typeof vnodeArgsTransformer): void;
|
|
1343
1283
|
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;
|
|
1344
|
-
|
|
1345
1284
|
export declare const createVNode: typeof _createVNode;
|
|
1346
1285
|
declare function _createVNode(type: VNodeTypes | ClassComponent | typeof NULL_DYNAMIC_COMPONENT, props?: (Data & VNodeProps) | null, children?: unknown, patchFlag?: number, dynamicProps?: string[] | null, isBlockNode?: boolean): VNode;
|
|
1347
1286
|
export declare function guardReactiveProps(props: (Data & VNodeProps) | null): (Data & VNodeProps) | null;
|
|
1348
1287
|
export declare function cloneVNode<T, U>(vnode: VNode<T, U>, extraProps?: (Data & VNodeProps) | null, mergeRef?: boolean, cloneTransition?: boolean): VNode<T, U>;
|
|
1349
1288
|
/**
|
|
1350
|
-
|
|
1351
|
-
|
|
1289
|
+
* @private
|
|
1290
|
+
*/
|
|
1352
1291
|
export declare function createTextVNode(text?: string, flag?: number): VNode;
|
|
1353
1292
|
/**
|
|
1354
|
-
|
|
1355
|
-
|
|
1293
|
+
* @private
|
|
1294
|
+
*/
|
|
1356
1295
|
export declare function createStaticVNode(content: string, numberOfNodes: number): VNode;
|
|
1357
1296
|
/**
|
|
1358
|
-
|
|
1359
|
-
|
|
1297
|
+
* @private
|
|
1298
|
+
*/
|
|
1360
1299
|
export declare function createCommentVNode(text?: string, asBlock?: boolean): VNode;
|
|
1361
1300
|
export declare function mergeProps(...args: (Data & VNodeProps)[]): Data;
|
|
1362
|
-
|
|
1301
|
+
//#endregion
|
|
1302
|
+
//#region temp/packages/runtime-core/src/componentCurrentInstance.d.ts
|
|
1363
1303
|
export declare const getCurrentInstance: () => ComponentInternalInstance | null;
|
|
1364
|
-
|
|
1304
|
+
//#endregion
|
|
1305
|
+
//#region temp/packages/runtime-core/src/component.d.ts
|
|
1365
1306
|
type Data = Record<string, unknown>;
|
|
1366
1307
|
/**
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1308
|
+
* Public utility type for extracting the instance type of a component.
|
|
1309
|
+
* Works with all valid component definition types. This is intended to replace
|
|
1310
|
+
* the usage of `InstanceType<typeof Comp>` which only works for
|
|
1311
|
+
* constructor-based component definition types.
|
|
1312
|
+
*
|
|
1313
|
+
* @example
|
|
1314
|
+
* ```ts
|
|
1315
|
+
* const MyComp = { ... }
|
|
1316
|
+
* declare const instance: ComponentInstance<typeof MyComp>
|
|
1317
|
+
* ```
|
|
1318
|
+
*/
|
|
1378
1319
|
export type ComponentInstance<T> = T extends {
|
|
1379
|
-
|
|
1320
|
+
new (): ComponentPublicInstance;
|
|
1380
1321
|
} ? 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 {
|
|
1381
|
-
|
|
1322
|
+
$props: unknown;
|
|
1382
1323
|
} ? PropsOrInstance : ComponentPublicInstance<unknown extends PropsOrInstance ? {} : PropsOrInstance, unknown extends RawBindings ? {} : RawBindings, unknown extends D ? {} : D, C, M> : never;
|
|
1383
1324
|
/**
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
export interface ComponentCustomProps {
|
|
1387
|
-
}
|
|
1325
|
+
* For extending allowed non-declared props on components in TSX
|
|
1326
|
+
*/
|
|
1327
|
+
export interface ComponentCustomProps {}
|
|
1388
1328
|
/**
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
export interface GlobalDirectives {
|
|
1404
|
-
}
|
|
1329
|
+
* For globally defined Directives
|
|
1330
|
+
* Here is an example of adding a directive `VTooltip` as global directive:
|
|
1331
|
+
*
|
|
1332
|
+
* @example
|
|
1333
|
+
* ```ts
|
|
1334
|
+
* import VTooltip from 'v-tooltip'
|
|
1335
|
+
*
|
|
1336
|
+
* declare module '@vue/runtime-core' {
|
|
1337
|
+
* interface GlobalDirectives {
|
|
1338
|
+
* VTooltip
|
|
1339
|
+
* }
|
|
1340
|
+
* }
|
|
1341
|
+
* ```
|
|
1342
|
+
*/
|
|
1343
|
+
export interface GlobalDirectives {}
|
|
1405
1344
|
/**
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1345
|
+
* For globally defined Components
|
|
1346
|
+
* Here is an example of adding a component `RouterView` as global component:
|
|
1347
|
+
*
|
|
1348
|
+
* @example
|
|
1349
|
+
* ```ts
|
|
1350
|
+
* import { RouterView } from 'vue-router'
|
|
1351
|
+
*
|
|
1352
|
+
* declare module '@vue/runtime-core' {
|
|
1353
|
+
* interface GlobalComponents {
|
|
1354
|
+
* RouterView
|
|
1355
|
+
* }
|
|
1356
|
+
* }
|
|
1357
|
+
* ```
|
|
1358
|
+
*/
|
|
1420
1359
|
export interface GlobalComponents {
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1360
|
+
Teleport: DefineComponent<TeleportProps>;
|
|
1361
|
+
Suspense: DefineComponent<SuspenseProps>;
|
|
1362
|
+
KeepAlive: DefineComponent<KeepAliveProps>;
|
|
1363
|
+
BaseTransition: DefineComponent<BaseTransitionProps>;
|
|
1425
1364
|
}
|
|
1426
1365
|
/**
|
|
1427
|
-
|
|
1428
|
-
|
|
1366
|
+
* Default allowed non-declared props on component in TSX
|
|
1367
|
+
*/
|
|
1429
1368
|
export interface AllowedComponentProps {
|
|
1430
|
-
|
|
1431
|
-
|
|
1369
|
+
class?: unknown;
|
|
1370
|
+
style?: unknown;
|
|
1432
1371
|
}
|
|
1433
1372
|
export interface ComponentInternalOptions {
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
}
|
|
1455
|
-
export interface AsyncComponentInternalOptions<R = ConcreteComponent, I = ComponentInternalInstance> {
|
|
1456
|
-
}
|
|
1373
|
+
/**
|
|
1374
|
+
* indicates vapor component
|
|
1375
|
+
*/
|
|
1376
|
+
__vapor?: boolean;
|
|
1377
|
+
/**
|
|
1378
|
+
* indicates keep-alive component
|
|
1379
|
+
*/
|
|
1380
|
+
__isKeepAlive?: boolean;
|
|
1381
|
+
/**
|
|
1382
|
+
* Compat build only, for bailing out of certain compatibility behavior
|
|
1383
|
+
*/
|
|
1384
|
+
__isBuiltIn?: boolean;
|
|
1385
|
+
/**
|
|
1386
|
+
* This one should be exposed so that devtools can make use of it
|
|
1387
|
+
*/
|
|
1388
|
+
__file?: string;
|
|
1389
|
+
/**
|
|
1390
|
+
* name inferred from filename
|
|
1391
|
+
*/
|
|
1392
|
+
__name?: string;
|
|
1393
|
+
}
|
|
1394
|
+
export interface AsyncComponentInternalOptions<R = ConcreteComponent, I = ComponentInternalInstance> {}
|
|
1457
1395
|
export interface FunctionalComponent<P = {}, E extends EmitsOptions | Record<string, any[]> = {}, S extends Record<string, any> = any, EE extends EmitsOptions = ShortEmitsToObject<E>> extends ComponentInternalOptions {
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1396
|
+
(props: P & EmitsToProps<EE>, ctx: Omit<SetupContext<EE, IfAny<S, {}, SlotsType<S>>>, "expose">): any;
|
|
1397
|
+
props?: ComponentPropsOptions<P>;
|
|
1398
|
+
emits?: EE | (keyof EE)[];
|
|
1399
|
+
slots?: IfAny<S, Slots, SlotsType<S>>;
|
|
1400
|
+
inheritAttrs?: boolean;
|
|
1401
|
+
displayName?: string;
|
|
1402
|
+
compatConfig?: CompatConfig;
|
|
1465
1403
|
}
|
|
1466
1404
|
interface ClassComponent {
|
|
1467
|
-
|
|
1468
|
-
|
|
1405
|
+
new (...args: any[]): ComponentPublicInstance<any, any, any, any, any>;
|
|
1406
|
+
__vccOpts: ComponentOptions;
|
|
1469
1407
|
}
|
|
1470
1408
|
/**
|
|
1471
|
-
|
|
1472
|
-
|
|
1409
|
+
* Type used where a function accepts both vdom and vapor components.
|
|
1410
|
+
*/
|
|
1473
1411
|
type GenericComponent = ({
|
|
1474
|
-
|
|
1412
|
+
name?: string;
|
|
1475
1413
|
} | ((() => any) & {
|
|
1476
|
-
|
|
1414
|
+
displayName?: string;
|
|
1477
1415
|
})) & ComponentInternalOptions;
|
|
1478
1416
|
/**
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1417
|
+
* Concrete component type matches its actual value: it's either an options
|
|
1418
|
+
* object, or a function. Use this where the code expects to work with actual
|
|
1419
|
+
* values, e.g. checking if its a function or not. This is mostly for internal
|
|
1420
|
+
* implementation code.
|
|
1421
|
+
*/
|
|
1484
1422
|
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>;
|
|
1485
1423
|
/**
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1424
|
+
* A type used in public APIs where a component type is expected.
|
|
1425
|
+
* The constructor type is an artificial type returned by defineComponent().
|
|
1426
|
+
*/
|
|
1489
1427
|
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>;
|
|
1490
|
-
|
|
1491
1428
|
export type LifecycleHook<TFn = Function> = (TFn & SchedulerJob)[] | null;
|
|
1492
1429
|
export type SetupContext<E = EmitsOptions, S extends SlotsType = {}> = E extends any ? {
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1430
|
+
attrs: Data;
|
|
1431
|
+
slots: UnwrapSlotsType<S>;
|
|
1432
|
+
emit: EmitFn<E>;
|
|
1433
|
+
expose: <Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed) => void;
|
|
1497
1434
|
} : never;
|
|
1498
1435
|
/**
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1436
|
+
* Base component instance interface that is shared between vdom mode and vapor
|
|
1437
|
+
* mode, so that we can have a mixed instance tree and reuse core logic that
|
|
1438
|
+
* operate on both.
|
|
1439
|
+
*/
|
|
1503
1440
|
export interface GenericComponentInstance {
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1441
|
+
vapor?: boolean;
|
|
1442
|
+
uid: number;
|
|
1443
|
+
type: GenericComponent;
|
|
1444
|
+
root: GenericComponentInstance | null;
|
|
1445
|
+
parent: GenericComponentInstance | null;
|
|
1446
|
+
appContext: GenericAppContext;
|
|
1447
|
+
/**
|
|
1448
|
+
* render function will have different types between vdom and vapor
|
|
1449
|
+
*/
|
|
1450
|
+
render?: Function | null;
|
|
1451
|
+
props: Data;
|
|
1452
|
+
attrs: Data;
|
|
1453
|
+
refs: Data;
|
|
1454
|
+
emit: EmitFn;
|
|
1455
|
+
exposed: Record<string, any> | null;
|
|
1456
|
+
exposeProxy: Record<string, any> | null;
|
|
1457
|
+
isMounted: boolean;
|
|
1458
|
+
isUnmounted: boolean;
|
|
1459
|
+
isDeactivated: boolean;
|
|
1460
|
+
/**
|
|
1461
|
+
* Public instance proxy, vdom only
|
|
1462
|
+
*/
|
|
1463
|
+
proxy?: any;
|
|
1464
|
+
vnode?: VNode;
|
|
1465
|
+
subTree?: VNode;
|
|
1529
1466
|
}
|
|
1530
1467
|
/**
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1468
|
+
* We expose a subset of properties on the internal instance as they are
|
|
1469
|
+
* useful for advanced external libraries and tools.
|
|
1470
|
+
*/
|
|
1534
1471
|
export interface ComponentInternalInstance extends GenericComponentInstance {
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1472
|
+
vapor?: never;
|
|
1473
|
+
uid: number;
|
|
1474
|
+
type: ConcreteComponent;
|
|
1475
|
+
parent: GenericComponentInstance | null;
|
|
1476
|
+
root: GenericComponentInstance;
|
|
1477
|
+
appContext: AppContext;
|
|
1478
|
+
/**
|
|
1479
|
+
* Vnode representing this component in its parent's vdom tree
|
|
1480
|
+
*/
|
|
1481
|
+
vnode: VNode;
|
|
1482
|
+
/**
|
|
1483
|
+
* Root vnode of this component's own vdom tree
|
|
1484
|
+
*/
|
|
1485
|
+
subTree: VNode;
|
|
1486
|
+
/**
|
|
1487
|
+
* Render effect instance
|
|
1488
|
+
*/
|
|
1489
|
+
effect: ReactiveEffect$1;
|
|
1490
|
+
/**
|
|
1491
|
+
* Force update render effect
|
|
1492
|
+
*/
|
|
1493
|
+
update: () => void;
|
|
1494
|
+
/**
|
|
1495
|
+
* Render effect job to be passed to scheduler (checks if dirty)
|
|
1496
|
+
*/
|
|
1497
|
+
job: SchedulerJob;
|
|
1498
|
+
proxy: ComponentPublicInstance | null;
|
|
1499
|
+
data: Data;
|
|
1500
|
+
emit: EmitFn;
|
|
1501
|
+
slots: InternalSlots;
|
|
1502
|
+
exposeProxy: Record<string, any> | null;
|
|
1566
1503
|
}
|
|
1567
1504
|
/**
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1505
|
+
* For runtime-dom to register the compiler.
|
|
1506
|
+
* Note the exported method uses any to avoid d.ts relying on the compiler types.
|
|
1507
|
+
*/
|
|
1571
1508
|
export declare function registerRuntimeCompiler(_compile: any): void;
|
|
1572
1509
|
export declare const isRuntimeOnly: () => boolean;
|
|
1573
|
-
export interface ComponentCustomElementInterface {
|
|
1574
|
-
|
|
1575
|
-
|
|
1510
|
+
export interface ComponentCustomElementInterface {}
|
|
1511
|
+
//#endregion
|
|
1512
|
+
//#region temp/packages/runtime-core/src/apiWatch.d.ts
|
|
1576
1513
|
type MaybeUndefined<T, I> = I extends true ? T | undefined : T;
|
|
1577
|
-
type MapSources<T, Immediate> = {
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
export interface WatchEffectOptions extends DebuggerOptions {
|
|
1581
|
-
flush?: 'pre' | 'post' | 'sync';
|
|
1514
|
+
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 };
|
|
1515
|
+
export interface WatchEffectOptions extends DebuggerOptions$1 {
|
|
1516
|
+
flush?: "pre" | "post" | "sync";
|
|
1582
1517
|
}
|
|
1583
1518
|
export interface WatchOptions<Immediate = boolean> extends WatchEffectOptions {
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
}
|
|
1588
|
-
export declare function watchEffect(effect: WatchEffect, options?: WatchEffectOptions): WatchHandle;
|
|
1589
|
-
export declare function watchPostEffect(effect: WatchEffect, options?: DebuggerOptions): WatchHandle;
|
|
1590
|
-
export declare function watchSyncEffect(effect: WatchEffect, options?: DebuggerOptions): WatchHandle;
|
|
1591
|
-
export type MultiWatchSources = (WatchSource<unknown> | object)[];
|
|
1592
|
-
export declare function watch<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, MaybeUndefined<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle;
|
|
1593
|
-
export declare function watch<T extends Readonly<MultiWatchSources>, Immediate extends Readonly<boolean> = false>(sources: readonly [...T] | T, cb: [T] extends [ReactiveMarker] ? WatchCallback<T, MaybeUndefined<T, Immediate>> : WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle;
|
|
1594
|
-
export declare function watch<T extends MultiWatchSources, Immediate extends Readonly<boolean> = false>(sources: [...T], cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle;
|
|
1595
|
-
export declare function watch<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, MaybeUndefined<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle;
|
|
1596
|
-
|
|
1519
|
+
immediate?: Immediate;
|
|
1520
|
+
deep?: boolean | number;
|
|
1521
|
+
once?: boolean;
|
|
1522
|
+
}
|
|
1523
|
+
export declare function watchEffect(effect: WatchEffect$1, options?: WatchEffectOptions): WatchHandle$1;
|
|
1524
|
+
export declare function watchPostEffect(effect: WatchEffect$1, options?: DebuggerOptions$1): WatchHandle$1;
|
|
1525
|
+
export declare function watchSyncEffect(effect: WatchEffect$1, options?: DebuggerOptions$1): WatchHandle$1;
|
|
1526
|
+
export type MultiWatchSources = (WatchSource$1<unknown> | object)[];
|
|
1527
|
+
export declare function watch<T, Immediate extends Readonly<boolean> = false>(source: WatchSource$1<T>, cb: WatchCallback$1<T, MaybeUndefined<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle$1;
|
|
1528
|
+
export declare function watch<T extends Readonly<MultiWatchSources>, Immediate extends Readonly<boolean> = false>(sources: readonly [...T] | T, cb: [T] extends [ReactiveMarker] ? WatchCallback$1<T, MaybeUndefined<T, Immediate>> : WatchCallback$1<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle$1;
|
|
1529
|
+
export declare function watch<T extends MultiWatchSources, Immediate extends Readonly<boolean> = false>(sources: [...T], cb: WatchCallback$1<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle$1;
|
|
1530
|
+
export declare function watch<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback$1<T, MaybeUndefined<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle$1;
|
|
1531
|
+
//#endregion
|
|
1532
|
+
//#region temp/packages/runtime-core/src/hydrationStrategies.d.ts
|
|
1597
1533
|
/**
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1534
|
+
* A lazy hydration strategy for async components.
|
|
1535
|
+
* @param hydrate - call this to perform the actual hydration.
|
|
1536
|
+
* @param forEachElement - iterate through the root elements of the component's
|
|
1537
|
+
* non-hydrated DOM, accounting for possible fragments.
|
|
1538
|
+
* @returns a teardown function to be called if the async component is unmounted
|
|
1539
|
+
* before it is hydrated. This can be used to e.g. remove DOM event
|
|
1540
|
+
* listeners.
|
|
1541
|
+
*/
|
|
1606
1542
|
export type HydrationStrategy = (hydrate: () => void, forEachElement: (cb: (el: Element) => any) => void) => (() => void) | void;
|
|
1607
1543
|
export type HydrationStrategyFactory<Options> = (options?: Options) => HydrationStrategy;
|
|
1608
1544
|
export declare const hydrateOnIdle: HydrationStrategyFactory<number>;
|
|
1609
1545
|
export declare const hydrateOnVisible: HydrationStrategyFactory<IntersectionObserverInit>;
|
|
1610
1546
|
export declare const hydrateOnMediaQuery: HydrationStrategyFactory<string>;
|
|
1611
1547
|
export declare const hydrateOnInteraction: HydrationStrategyFactory<keyof HTMLElementEventMap | Array<keyof HTMLElementEventMap>>;
|
|
1612
|
-
|
|
1548
|
+
//#endregion
|
|
1549
|
+
//#region temp/packages/runtime-core/src/apiAsyncComponent.d.ts
|
|
1613
1550
|
type AsyncComponentResolveResult<T = Component> = T | {
|
|
1614
|
-
|
|
1551
|
+
default: T;
|
|
1615
1552
|
};
|
|
1616
1553
|
export type AsyncComponentLoader<T = any> = () => Promise<AsyncComponentResolveResult<T>>;
|
|
1617
1554
|
export interface AsyncComponentOptions<T = any, C = any> {
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1555
|
+
loader: AsyncComponentLoader<T>;
|
|
1556
|
+
loadingComponent?: C;
|
|
1557
|
+
errorComponent?: C;
|
|
1558
|
+
delay?: number;
|
|
1559
|
+
timeout?: number;
|
|
1560
|
+
suspensible?: boolean;
|
|
1561
|
+
hydrate?: HydrationStrategy;
|
|
1562
|
+
onError?: (error: Error, retry: () => void, fail: () => void, attempts: number) => any;
|
|
1626
1563
|
}
|
|
1627
1564
|
export declare function defineAsyncComponent<T extends Component = {
|
|
1628
|
-
|
|
1565
|
+
new (): ComponentPublicInstance;
|
|
1629
1566
|
}>(source: AsyncComponentLoader<T> | AsyncComponentOptions<T, Component>): T;
|
|
1630
|
-
|
|
1567
|
+
//#endregion
|
|
1568
|
+
//#region temp/packages/runtime-core/src/helpers/useModel.d.ts
|
|
1631
1569
|
export declare function useModel<M extends PropertyKey, T extends Record<string, any>, K extends keyof T, G = T[K], S = T[K]>(props: T, name: K, options?: DefineModelOptions<T[K], G, S>): ModelRef<T[K], M, G, S>;
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
export
|
|
1635
|
-
|
|
1570
|
+
//#endregion
|
|
1571
|
+
//#region temp/packages/runtime-core/src/helpers/useTemplateRef.d.ts
|
|
1572
|
+
export type TemplateRef<T = unknown> = Readonly<ShallowRef$1<T | null>>;
|
|
1573
|
+
export declare function useTemplateRef<T = unknown, Keys extends string = string>(key: Keys): Readonly<ShallowRef$1<T | null>>;
|
|
1574
|
+
//#endregion
|
|
1575
|
+
//#region temp/packages/runtime-core/src/helpers/useId.d.ts
|
|
1636
1576
|
export declare function useId(): string;
|
|
1637
|
-
|
|
1577
|
+
//#endregion
|
|
1578
|
+
//#region temp/packages/runtime-core/src/h.d.ts
|
|
1638
1579
|
type RawProps = VNodeProps & {
|
|
1639
|
-
|
|
1640
|
-
|
|
1580
|
+
__v_isVNode?: never;
|
|
1581
|
+
[Symbol.iterator]?: never;
|
|
1641
1582
|
} & Record<string, any>;
|
|
1642
1583
|
type RawChildren = string | number | boolean | VNode | VNodeArrayChildren | (() => any);
|
|
1643
1584
|
interface Constructor<P = any> {
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
}
|
|
1651
|
-
type HTMLElementEventHandler = {
|
|
1652
|
-
[K in keyof HTMLElementEventMap as `on${Capitalize<K>}`]?: (ev: HTMLElementEventMap[K]) => any;
|
|
1653
|
-
};
|
|
1585
|
+
__isFragment?: never;
|
|
1586
|
+
__isTeleport?: never;
|
|
1587
|
+
__isSuspense?: never;
|
|
1588
|
+
new (...args: any[]): {
|
|
1589
|
+
$props: P;
|
|
1590
|
+
};
|
|
1591
|
+
}
|
|
1592
|
+
type HTMLElementEventHandler = { [K in keyof HTMLElementEventMap as `on${Capitalize<K>}`]?: (ev: HTMLElementEventMap[K]) => any };
|
|
1654
1593
|
export declare function h<K extends keyof HTMLElementTagNameMap>(type: K, children?: RawChildren): VNode;
|
|
1655
1594
|
export declare function h<K extends keyof HTMLElementTagNameMap>(type: K, props?: (RawProps & HTMLElementEventHandler) | null, children?: RawChildren | RawSlots): VNode;
|
|
1656
1595
|
export declare function h(type: string, children?: RawChildren): VNode;
|
|
1657
1596
|
export declare function h(type: string, props?: RawProps | null, children?: RawChildren | RawSlots): VNode;
|
|
1658
|
-
export declare function h(type: typeof Text | typeof Comment, children?: string | number | boolean): VNode;
|
|
1659
|
-
export declare function h(type: typeof Text | typeof Comment, props?: null, children?: string | number | boolean): VNode;
|
|
1597
|
+
export declare function h(type: typeof Text | typeof Comment$1, children?: string | number | boolean): VNode;
|
|
1598
|
+
export declare function h(type: typeof Text | typeof Comment$1, props?: null, children?: string | number | boolean): VNode;
|
|
1660
1599
|
export declare function h(type: typeof Fragment, children?: VNodeArrayChildren): VNode;
|
|
1661
1600
|
export declare function h(type: typeof Fragment, props?: RawProps | null, children?: VNodeArrayChildren): VNode;
|
|
1662
1601
|
export declare function h(type: typeof Teleport, props: RawProps & TeleportProps, children: RawChildren | RawSlots): VNode;
|
|
@@ -1674,238 +1613,249 @@ export declare function h(type: DefineComponent, children?: RawChildren): VNode;
|
|
|
1674
1613
|
export declare function h<P>(type: DefineComponent<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode;
|
|
1675
1614
|
export declare function h(type: string | Component, children?: RawChildren): VNode;
|
|
1676
1615
|
export declare function h<P>(type: string | Component<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode;
|
|
1677
|
-
|
|
1616
|
+
//#endregion
|
|
1617
|
+
//#region temp/packages/runtime-core/src/helpers/useSsrContext.d.ts
|
|
1678
1618
|
export declare const ssrContextKey: unique symbol;
|
|
1679
1619
|
export declare const useSSRContext: <T = Record<string, any>>() => T | undefined;
|
|
1680
|
-
|
|
1620
|
+
//#endregion
|
|
1621
|
+
//#region temp/packages/runtime-core/src/warning.d.ts
|
|
1681
1622
|
declare function warn$1(msg: string, ...args: any[]): void;
|
|
1682
|
-
|
|
1623
|
+
//#endregion
|
|
1624
|
+
//#region temp/packages/runtime-core/src/errorHandling.d.ts
|
|
1683
1625
|
export declare enum ErrorCodes {
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1626
|
+
SETUP_FUNCTION = 0,
|
|
1627
|
+
RENDER_FUNCTION = 1,
|
|
1628
|
+
NATIVE_EVENT_HANDLER = 5,
|
|
1629
|
+
COMPONENT_EVENT_HANDLER = 6,
|
|
1630
|
+
VNODE_HOOK = 7,
|
|
1631
|
+
DIRECTIVE_HOOK = 8,
|
|
1632
|
+
TRANSITION_HOOK = 9,
|
|
1633
|
+
APP_ERROR_HANDLER = 10,
|
|
1634
|
+
APP_WARN_HANDLER = 11,
|
|
1635
|
+
FUNCTION_REF = 12,
|
|
1636
|
+
ASYNC_COMPONENT_LOADER = 13,
|
|
1637
|
+
SCHEDULER = 14,
|
|
1638
|
+
COMPONENT_UPDATE = 15,
|
|
1639
|
+
APP_UNMOUNT_CLEANUP = 16
|
|
1698
1640
|
}
|
|
1699
1641
|
type ErrorTypes = LifecycleHooks | ErrorCodes | WatchErrorCodes;
|
|
1700
1642
|
export declare function callWithErrorHandling(fn: Function, instance: GenericComponentInstance | null | undefined, type: ErrorTypes, args?: unknown[]): any;
|
|
1701
1643
|
export declare function callWithAsyncErrorHandling(fn: Function | Function[], instance: GenericComponentInstance | null, type: ErrorTypes, args?: unknown[]): any;
|
|
1702
1644
|
export declare function handleError(err: unknown, instance: GenericComponentInstance | null | undefined, type: ErrorTypes, throwInDev?: boolean): void;
|
|
1703
|
-
|
|
1645
|
+
//#endregion
|
|
1646
|
+
//#region temp/packages/runtime-core/src/customFormatter.d.ts
|
|
1704
1647
|
export declare function initCustomFormatter(): void;
|
|
1705
|
-
|
|
1648
|
+
//#endregion
|
|
1649
|
+
//#region temp/packages/runtime-core/src/devtools.d.ts
|
|
1706
1650
|
interface AppRecord {
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1651
|
+
id: number;
|
|
1652
|
+
app: App;
|
|
1653
|
+
version: string;
|
|
1654
|
+
types: Record<string, string | Symbol>;
|
|
1711
1655
|
}
|
|
1712
1656
|
interface DevtoolsHook {
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1657
|
+
enabled?: boolean;
|
|
1658
|
+
emit: (event: string, ...payload: any[]) => void;
|
|
1659
|
+
on: (event: string, handler: Function) => void;
|
|
1660
|
+
once: (event: string, handler: Function) => void;
|
|
1661
|
+
off: (event: string, handler: Function) => void;
|
|
1662
|
+
appRecords: AppRecord[];
|
|
1663
|
+
/**
|
|
1664
|
+
* Added at https://github.com/vuejs/devtools/commit/f2ad51eea789006ab66942e5a27c0f0986a257f9
|
|
1665
|
+
* Returns whether the arg was buffered or not
|
|
1666
|
+
*/
|
|
1667
|
+
cleanupBuffer?: (matchArg: unknown) => boolean;
|
|
1724
1668
|
}
|
|
1725
1669
|
declare function setDevtoolsHook$1(hook: DevtoolsHook, target: any): void;
|
|
1726
|
-
|
|
1670
|
+
//#endregion
|
|
1671
|
+
//#region temp/packages/runtime-core/src/hmr.d.ts
|
|
1727
1672
|
type HMRComponent = ComponentOptions | ClassComponent;
|
|
1728
1673
|
export interface HMRRuntime {
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1674
|
+
createRecord: typeof createRecord;
|
|
1675
|
+
rerender: typeof rerender;
|
|
1676
|
+
reload: typeof reload;
|
|
1732
1677
|
}
|
|
1733
1678
|
declare function createRecord(id: string, initialDef: HMRComponent): boolean;
|
|
1734
1679
|
declare function rerender(id: string, newRender?: Function): void;
|
|
1735
1680
|
declare function reload(id: string, newComp: HMRComponent): void;
|
|
1736
|
-
|
|
1681
|
+
//#endregion
|
|
1682
|
+
//#region temp/packages/runtime-core/src/componentRenderContext.d.ts
|
|
1737
1683
|
/**
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1684
|
+
* Set scope id when creating hoisted vnodes.
|
|
1685
|
+
* @private compiler helper
|
|
1686
|
+
*/
|
|
1741
1687
|
export declare function pushScopeId(id: string | null): void;
|
|
1742
1688
|
/**
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1689
|
+
* Technically we no longer need this after 3.0.8 but we need to keep the same
|
|
1690
|
+
* API for backwards compat w/ code generated by compilers.
|
|
1691
|
+
* @private
|
|
1692
|
+
*/
|
|
1747
1693
|
export declare function popScopeId(): void;
|
|
1748
1694
|
/**
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1695
|
+
* Only for backwards compat
|
|
1696
|
+
* @private
|
|
1697
|
+
*/
|
|
1752
1698
|
export declare const withScopeId: (_id: string) => typeof withCtx;
|
|
1753
1699
|
/**
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1700
|
+
* Wrap a slot function to memoize current rendering instance
|
|
1701
|
+
* @private compiler helper
|
|
1702
|
+
*/
|
|
1757
1703
|
export declare function withCtx(fn: Function, ctx?: ComponentInternalInstance | null, isNonScopedSlot?: boolean): Function;
|
|
1758
|
-
|
|
1704
|
+
//#endregion
|
|
1705
|
+
//#region temp/packages/runtime-core/src/helpers/renderList.d.ts
|
|
1759
1706
|
/**
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1707
|
+
* v-for string
|
|
1708
|
+
* @private
|
|
1709
|
+
*/
|
|
1763
1710
|
export declare function renderList(source: string, renderItem: (value: string, index: number) => VNodeChild): VNodeChild[];
|
|
1764
1711
|
/**
|
|
1765
|
-
|
|
1766
|
-
|
|
1712
|
+
* v-for number
|
|
1713
|
+
*/
|
|
1767
1714
|
export declare function renderList(source: number, renderItem: (value: number, index: number) => VNodeChild): VNodeChild[];
|
|
1768
1715
|
/**
|
|
1769
|
-
|
|
1770
|
-
|
|
1716
|
+
* v-for array
|
|
1717
|
+
*/
|
|
1771
1718
|
export declare function renderList<T>(source: T[], renderItem: (value: T, index: number) => VNodeChild): VNodeChild[];
|
|
1772
1719
|
/**
|
|
1773
|
-
|
|
1774
|
-
|
|
1720
|
+
* v-for iterable
|
|
1721
|
+
*/
|
|
1775
1722
|
export declare function renderList<T>(source: Iterable<T>, renderItem: (value: T, index: number) => VNodeChild): VNodeChild[];
|
|
1776
1723
|
/**
|
|
1777
|
-
|
|
1778
|
-
|
|
1724
|
+
* v-for object
|
|
1725
|
+
*/
|
|
1779
1726
|
export declare function renderList<T>(source: T, renderItem: <K extends keyof T>(value: T[K], key: string, index: number) => VNodeChild): VNodeChild[];
|
|
1780
|
-
|
|
1727
|
+
//#endregion
|
|
1728
|
+
//#region temp/packages/runtime-core/src/helpers/toHandlers.d.ts
|
|
1781
1729
|
/**
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1730
|
+
* For prefixing keys in v-on="obj" with "on"
|
|
1731
|
+
* @private
|
|
1732
|
+
*/
|
|
1785
1733
|
export declare function toHandlers(obj: Record<string, any>, preserveCaseIfNecessary?: boolean): Record<string, any>;
|
|
1786
|
-
|
|
1734
|
+
//#endregion
|
|
1735
|
+
//#region temp/packages/runtime-core/src/helpers/renderSlot.d.ts
|
|
1787
1736
|
/**
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1737
|
+
* Compiler runtime helper for rendering `<slot/>`
|
|
1738
|
+
* @private
|
|
1739
|
+
*/
|
|
1791
1740
|
export declare function renderSlot(slots: Slots, name: string, props?: Data, fallback?: () => VNodeArrayChildren, noSlotted?: boolean): VNode;
|
|
1792
|
-
|
|
1741
|
+
//#endregion
|
|
1742
|
+
//#region temp/packages/runtime-core/src/helpers/createSlots.d.ts
|
|
1793
1743
|
type SSRSlot = (...args: any[]) => VNode[] | undefined;
|
|
1794
1744
|
interface CompiledSlotDescriptor {
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1745
|
+
name: string;
|
|
1746
|
+
fn: SSRSlot;
|
|
1747
|
+
key?: string;
|
|
1798
1748
|
}
|
|
1799
1749
|
/**
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1750
|
+
* Compiler runtime helper for creating dynamic slots object
|
|
1751
|
+
* @private
|
|
1752
|
+
*/
|
|
1803
1753
|
export declare function createSlots(slots: Record<string, SSRSlot>, dynamicSlots: (CompiledSlotDescriptor | CompiledSlotDescriptor[] | undefined)[]): Record<string, SSRSlot>;
|
|
1804
|
-
|
|
1754
|
+
//#endregion
|
|
1755
|
+
//#region temp/packages/runtime-core/src/helpers/withMemo.d.ts
|
|
1805
1756
|
export declare function withMemo(memo: any[], render: () => VNode<any, any>, cache: any[], index: number): VNode<any, any>;
|
|
1806
1757
|
export declare function isMemoSame(cached: VNode, memo: any[]): boolean;
|
|
1807
|
-
|
|
1758
|
+
//#endregion
|
|
1759
|
+
//#region temp/packages/runtime-core/src/compat/globalConfig.d.ts
|
|
1808
1760
|
export type LegacyConfig = {
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1761
|
+
/**
|
|
1762
|
+
* @deprecated `config.silent` option has been removed
|
|
1763
|
+
*/
|
|
1764
|
+
silent?: boolean;
|
|
1765
|
+
/**
|
|
1766
|
+
* @deprecated use __VUE_PROD_DEVTOOLS__ compile-time feature flag instead
|
|
1767
|
+
* https://github.com/vuejs/core/tree/main/packages/vue#bundler-build-feature-flags
|
|
1768
|
+
*/
|
|
1769
|
+
devtools?: boolean;
|
|
1770
|
+
/**
|
|
1771
|
+
* @deprecated use `config.isCustomElement` instead
|
|
1772
|
+
* https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-ignoredelements-is-now-config-iscustomelement
|
|
1773
|
+
*/
|
|
1774
|
+
ignoredElements?: (string | RegExp)[];
|
|
1775
|
+
/**
|
|
1776
|
+
* @deprecated
|
|
1777
|
+
* https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html
|
|
1778
|
+
*/
|
|
1779
|
+
keyCodes?: Record<string, number | number[]>;
|
|
1780
|
+
/**
|
|
1781
|
+
* @deprecated
|
|
1782
|
+
* https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-productiontip-removed
|
|
1783
|
+
*/
|
|
1784
|
+
productionTip?: boolean;
|
|
1833
1785
|
};
|
|
1834
|
-
|
|
1786
|
+
//#endregion
|
|
1787
|
+
//#region temp/packages/runtime-core/src/compat/instance.d.ts
|
|
1835
1788
|
type LegacyPublicInstance = ComponentPublicInstance & LegacyPublicProperties;
|
|
1836
1789
|
interface LegacyPublicProperties {
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
}
|
|
1848
|
-
|
|
1790
|
+
$set<T extends Record<keyof any, any>, K extends keyof T>(target: T, key: K, value: T[K]): void;
|
|
1791
|
+
$delete<T extends Record<keyof any, any>, K extends keyof T>(target: T, key: K): void;
|
|
1792
|
+
$mount(el?: string | Element): this;
|
|
1793
|
+
$destroy(): void;
|
|
1794
|
+
$scopedSlots: Slots;
|
|
1795
|
+
$on(event: string | string[], fn: Function): this;
|
|
1796
|
+
$once(event: string, fn: Function): this;
|
|
1797
|
+
$off(event?: string | string[], fn?: Function): this;
|
|
1798
|
+
$children: LegacyPublicProperties[];
|
|
1799
|
+
$listeners: Record<string, Function | Function[]>;
|
|
1800
|
+
}
|
|
1801
|
+
//#endregion
|
|
1802
|
+
//#region temp/packages/runtime-core/src/compat/global.d.ts
|
|
1849
1803
|
/**
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
export type CompatVue = Pick<App,
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1804
|
+
* @deprecated the default `Vue` export has been removed in Vue 3. The type for
|
|
1805
|
+
* the default export is provided only for migration purposes. Please use
|
|
1806
|
+
* named imports instead - e.g. `import { createApp } from 'vue'`.
|
|
1807
|
+
*/
|
|
1808
|
+
export type CompatVue = Pick<App, "version" | "component" | "directive"> & {
|
|
1809
|
+
configureCompat: typeof configureCompat;
|
|
1810
|
+
new (options?: ComponentOptions): LegacyPublicInstance;
|
|
1811
|
+
version: string;
|
|
1812
|
+
config: AppConfig & LegacyConfig;
|
|
1813
|
+
nextTick: typeof nextTick;
|
|
1814
|
+
use<Options extends unknown[]>(plugin: Plugin<Options>, ...options: Options): CompatVue;
|
|
1815
|
+
use<Options>(plugin: Plugin<Options>, options: Options): CompatVue;
|
|
1816
|
+
mixin(mixin: ComponentOptions): CompatVue;
|
|
1817
|
+
component(name: string): Component | undefined;
|
|
1818
|
+
component(name: string, component: Component): CompatVue;
|
|
1819
|
+
directive<T = any, V = any>(name: string): Directive<T, V> | undefined;
|
|
1820
|
+
directive<T = any, V = any>(name: string, directive: Directive<T, V>): CompatVue;
|
|
1821
|
+
compile(template: string): RenderFunction;
|
|
1822
|
+
/**
|
|
1823
|
+
* @deprecated Vue 3 no longer supports extending constructors.
|
|
1824
|
+
*/
|
|
1825
|
+
extend: (options?: ComponentOptions) => CompatVue;
|
|
1826
|
+
/**
|
|
1827
|
+
* @deprecated Vue 3 no longer needs set() for adding new properties.
|
|
1828
|
+
*/
|
|
1829
|
+
set(target: any, key: PropertyKey, value: any): void;
|
|
1830
|
+
/**
|
|
1831
|
+
* @deprecated Vue 3 no longer needs delete() for property deletions.
|
|
1832
|
+
*/
|
|
1833
|
+
delete(target: any, key: PropertyKey): void;
|
|
1834
|
+
/**
|
|
1835
|
+
* @deprecated use `reactive` instead.
|
|
1836
|
+
*/
|
|
1837
|
+
observable: typeof reactive$1;
|
|
1838
|
+
/**
|
|
1839
|
+
* @deprecated filters have been removed from Vue 3.
|
|
1840
|
+
*/
|
|
1841
|
+
filter(name: string, arg?: any): null;
|
|
1888
1842
|
};
|
|
1889
|
-
|
|
1843
|
+
//#endregion
|
|
1844
|
+
//#region temp/packages/runtime-core/src/index.d.ts
|
|
1890
1845
|
export declare const version: string;
|
|
1891
|
-
|
|
1892
1846
|
export declare const warn: typeof warn$1;
|
|
1893
|
-
|
|
1894
1847
|
export declare const devtools: DevtoolsHook;
|
|
1895
1848
|
export declare const setDevtoolsHook: typeof setDevtoolsHook$1;
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
}
|
|
1849
|
+
declare module "@vue/reactivity" {
|
|
1850
|
+
interface RefUnwrapBailTypes {
|
|
1851
|
+
runtimeCoreBailTypes: VNode | {
|
|
1852
|
+
$: ComponentInternalInstance;
|
|
1853
|
+
};
|
|
1854
|
+
}
|
|
1903
1855
|
}
|
|
1904
|
-
|
|
1905
1856
|
export declare const DeprecationTypes: typeof DeprecationTypes$1;
|
|
1906
|
-
|
|
1907
|
-
export { createBaseVNode as createElementVNode, };
|
|
1908
|
-
export type { WatchEffectOptions as WatchOptionsBase };
|
|
1857
|
+
//#endregion
|
|
1858
|
+
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, };
|
|
1909
1859
|
// Note: this file is auto concatenated to the end of the bundled d.ts during
|
|
1910
1860
|
// build.
|
|
1911
1861
|
|