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