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