runtime-core.d.ts 80 KB

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