runtime-core.d.ts 82 KB

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