@vue/runtime-core 3.2.47 → 3.3.0-alpha.10

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