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