///
import * as _vue_devtools_kit0 from "@vue/devtools-kit";
import { AppRecord, CustomCommand, CustomTab, DevToolsV6PluginAPIHookKeys, DevToolsV6PluginAPIHookPayloads, OpenInEditorOptions, getRpcClient, getRpcServer, getViteRpcClient } from "@vue/devtools-kit";
import * as vue from "vue";
import { AllowedComponentProps, AnchorHTMLAttributes, App, Component as Component$1, ComponentCustomProps, ComponentPublicInstance, ComputedRef, DefineComponent, MaybeRef, Ref, ShallowRef, UnwrapRef, VNode, VNodeProps } from "vue";
import * as http from "node:http";
import { Agent, ClientRequest, ClientRequestArgs, OutgoingHttpHeaders } from "node:http";
import { Http2SecureServer } from "node:http2";
import * as fs from "node:fs";
import { EventEmitter } from "node:events";
import { Server as Server$1, ServerOptions as ServerOptions$1 } from "node:https";
import * as net from "node:net";
import { Duplex, DuplexOptions, Stream } from "node:stream";
import { SecureContextOptions } from "node:tls";
import { URL as URL$1 } from "node:url";
import { ZlibOptions } from "node:zlib";
import Lightningcss from "lightningcss";
import Less from "less";
import Stylus from "stylus";
//#region src/client.d.ts
declare function setDevToolsClientUrl(url: string): void;
declare function getDevToolsClientUrl(): any;
//#endregion
//#region ../../node_modules/.pnpm/vue-router@4.6.0_vue@3.5.22_typescript@5.9.3_/node_modules/vue-router/dist/router-CXzcRfJt.d.mts
//#region src/query.d.ts
/**
* Possible values in normalized {@link LocationQuery}. `null` renders the query
* param but without an `=`.
*
* @example
* ```
* ?isNull&isEmpty=&other=other
* gives
* `{ isNull: null, isEmpty: '', other: 'other' }`.
* ```
*
* @internal
*/
type LocationQueryValue = string | null;
/**
* Possible values when defining a query. `undefined` allows to remove a value.
*
* @internal
*/
type LocationQueryValueRaw = LocationQueryValue | number | undefined;
/**
* Normalized query object that appears in {@link RouteLocationNormalized}
*
* @public
*/
type LocationQuery = Record;
/**
* Loose {@link LocationQuery} object that can be passed to functions like
* {@link Router.push} and {@link Router.replace} or anywhere when creating a
* {@link RouteLocationRaw}
*
* @public
*/
type LocationQueryRaw = Record;
/**
* Transforms a queryString into a {@link LocationQuery} object. Accept both, a
* version with the leading `?` and without Should work as URLSearchParams
* @internal
*
* @param search - search string to parse
* @returns a query object
*/
declare function parseQuery(search: string): LocationQuery;
/**
* Stringifies a {@link LocationQueryRaw} object. Like `URLSearchParams`, it
* doesn't prepend a `?`
*
* @internal
*
* @param query - query object to stringify
* @returns string version of the query without the leading `?`
*/
declare function stringifyQuery(query: LocationQueryRaw | undefined): string; //#endregion
//#region src/config.d.ts
/**
* Allows customizing existing types of the router that are used globally like `$router`, ``, etc. **ONLY FOR INTERNAL USAGE**.
*
* - `$router` - the router instance
* - `$route` - the current route location
* - `beforeRouteEnter` - Page component option
* - `beforeRouteUpdate` - Page component option
* - `beforeRouteLeave` - Page component option
* - `RouterLink` - RouterLink Component
* - `RouterView` - RouterView Component
*
* @internal
*/
interface TypesConfig {} //#endregion
//#region src/typed-routes/route-map.d.ts
/**
* Helper type to define a Typed `RouteRecord`
* @see {@link RouteRecord}
*/
interface RouteRecordInfo {
name: Name;
path: Path;
paramsRaw: ParamsRaw;
params: Params;
childrenNames: ChildrenNames;
}
type RouteRecordInfoGeneric = RouteRecordInfo;
/**
* Convenience type to get the typed RouteMap or a generic one if not provided. It is extracted from the {@link TypesConfig} if it exists, it becomes {@link RouteMapGeneric} otherwise.
*/
type RouteMap = TypesConfig extends Record<'RouteNamedMap', infer RouteNamedMap> ? RouteNamedMap : RouteMapGeneric;
/**
* Generic version of the `RouteMap`.
*/
type RouteMapGeneric = Record; //#endregion
//#region src/types/utils.d.ts
/**
* Creates a union type that still allows autocompletion for strings.
* @internal
*/
type _LiteralUnion = LiteralType | (BaseType & Record);
/**
* Maybe a promise maybe not
* @internal
*/
type _Awaitable = T | PromiseLike;
/**
* @internal
*/
//#endregion
//#region src/typed-routes/route-records.d.ts
/**
* @internal
*/
type RouteRecordRedirectOption = RouteLocationRaw | ((to: RouteLocation, from: RouteLocationNormalizedLoaded) => RouteLocationRaw);
/**
* Generic version of {@link RouteRecordName}.
*/
type RouteRecordNameGeneric = string | symbol | undefined;
/**
* Possible values for a route record **after normalization**
*
* NOTE: since `RouteRecordName` is a type, it evaluates too early and it's often the generic version {@link RouteRecordNameGeneric}. If you need a typed version of all of the names of routes, use {@link RouteMap | `keyof RouteMap`}
*/
/**
* @internal
*/
type _RouteRecordProps = boolean | Record | ((to: RouteLocationNormalized) => Record); //#endregion
//#region src/typed-routes/route-location.d.ts
/**
* Generic version of {@link RouteLocation}. It is used when no {@link RouteMap} is provided.
*/
interface RouteLocationGeneric extends _RouteLocationBase, RouteLocationOptions {
/**
* Array of {@link RouteRecord} containing components as they were
* passed when adding records. It can also contain redirect records. This
* can't be used directly. **This property is non-enumerable**.
*/
matched: RouteRecord[];
}
/**
* Helper to generate a type safe version of the {@link RouteLocation} type.
*/
interface RouteLocationTyped extends RouteLocationGeneric {
name: Extract;
params: RouteMap[Name]['params'];
}
/**
* List of all possible {@link RouteLocation} indexed by the route name.
* @internal
*/
type RouteLocationTypedList = { [N in keyof RouteMap]: RouteLocationTyped };
/**
* Generic version of {@link RouteLocationNormalized} that is used when no {@link RouteMap} is provided.
*/
interface RouteLocationNormalizedGeneric extends _RouteLocationBase {
name: RouteRecordNameGeneric;
/**
* Array of {@link RouteRecordNormalized}
*/
matched: RouteRecordNormalized[];
}
/**
* Helper to generate a type safe version of the {@link RouteLocationNormalized} type.
*/
interface RouteLocationNormalizedTyped extends RouteLocationNormalizedGeneric {
name: Extract;
params: RouteMap[Name]['params'];
/**
* Array of {@link RouteRecordNormalized}
*/
matched: RouteRecordNormalized[];
}
/**
* List of all possible {@link RouteLocationNormalized} indexed by the route name.
* @internal
*/
type RouteLocationNormalizedTypedList = { [N in keyof RouteMap]: RouteLocationNormalizedTyped };
/**
* Generic version of {@link RouteLocationNormalizedLoaded} that is used when no {@link RouteMap} is provided.
*/
interface RouteLocationNormalizedLoadedGeneric extends RouteLocationNormalizedGeneric {
/**
* Array of {@link RouteLocationMatched} containing only plain components (any
* lazy-loaded components have been loaded and were replaced inside the
* `components` object) so it can be directly used to display routes. It
* cannot contain redirect records either. **This property is non-enumerable**.
*/
matched: RouteLocationMatched[];
}
/**
* Helper to generate a type safe version of the {@link RouteLocationNormalizedLoaded} type.
*/
interface RouteLocationNormalizedLoadedTyped extends RouteLocationNormalizedLoadedGeneric {
name: Extract;
params: RouteMap[Name]['params'];
}
/**
* List of all possible {@link RouteLocationNormalizedLoaded} indexed by the route name.
* @internal
*/
type RouteLocationNormalizedLoadedTypedList = { [N in keyof RouteMap]: RouteLocationNormalizedLoadedTyped };
/**
* Generic version of {@link RouteLocationAsRelative}. It is used when no {@link RouteMap} is provided.
*/
interface RouteLocationAsRelativeGeneric extends RouteQueryAndHash, RouteLocationOptions {
name?: RouteRecordNameGeneric;
params?: RouteParamsRawGeneric;
/**
* A relative path to the current location. This property should be removed
*/
path?: undefined;
}
/**
* Helper to generate a type safe version of the {@link RouteLocationAsRelative} type.
*/
interface RouteLocationAsRelativeTyped extends RouteLocationAsRelativeGeneric {
name?: Extract;
params?: RouteMap[Name]['paramsRaw'];
}
/**
* List of all possible {@link RouteLocationAsRelative} indexed by the route name.
* @internal
*/
type RouteLocationAsRelativeTypedList = { [N in keyof RouteMap]: RouteLocationAsRelativeTyped };
/**
* Generic version of {@link RouteLocationAsPath}. It is used when no {@link RouteMap} is provided.
*/
interface RouteLocationAsPathGeneric extends RouteQueryAndHash, RouteLocationOptions {
/**
* Percentage encoded pathname section of the URL.
*/
path: string;
}
/**
* Helper to generate a type safe version of the {@link RouteLocationAsPath} type.
*/
interface RouteLocationAsPathTyped extends RouteLocationAsPathGeneric {
path: _LiteralUnion;
}
/**
* List of all possible {@link RouteLocationAsPath} indexed by the route name.
* @internal
*/
type RouteLocationAsPathTypedList = { [N in keyof RouteMap]: RouteLocationAsPathTyped };
/**
* Helper to generate a type safe version of the {@link RouteLocationAsString} type.
*/
type RouteLocationAsStringTyped = RouteMap[Name]['path'];
/**
* List of all possible {@link RouteLocationAsString} indexed by the route name.
* @internal
*/
type RouteLocationAsStringTypedList = { [N in keyof RouteMap]: RouteLocationAsStringTyped };
/**
* Generic version of {@link RouteLocationResolved}. It is used when no {@link RouteMap} is provided.
*/
interface RouteLocationResolvedGeneric extends RouteLocationGeneric {
/**
* Resolved `href` for the route location that will be set on the ``.
*/
href: string;
}
/**
* Helper to generate a type safe version of the {@link RouteLocationResolved} type.
*/
interface RouteLocationResolvedTyped extends RouteLocationTyped {
/**
* Resolved `href` for the route location that will be set on the ``.
*/
href: string;
}
/**
* List of all possible {@link RouteLocationResolved} indexed by the route name.
* @internal
*/
type RouteLocationResolvedTypedList = { [N in keyof RouteMap]: RouteLocationResolvedTyped };
/**
* Type safe versions of types that are exposed by vue-router. We have to use a generic check to allow for names to be `undefined` when no `RouteMap` is provided.
*/
/**
* {@link RouteLocationRaw} resolved using the matcher
*/
type RouteLocation = RouteMapGeneric extends RouteMap ? RouteLocationGeneric : RouteLocationTypedList[Name];
/**
* Similar to {@link RouteLocation} but its
* {@link RouteLocationNormalizedTyped.matched | `matched` property} cannot contain redirect records
*/
type RouteLocationNormalized = RouteMapGeneric extends RouteMap ? RouteLocationNormalizedGeneric : RouteLocationNormalizedTypedList[Name];
/**
* Similar to {@link RouteLocationNormalized} but its `components` do not contain any function to lazy load components.
* In other words, it's ready to be rendered by ``.
*/
type RouteLocationNormalizedLoaded = RouteMapGeneric extends RouteMap ? RouteLocationNormalizedLoadedGeneric : RouteLocationNormalizedLoadedTypedList[Name];
/**
* Route location relative to the current location. It accepts other properties than `path` like `params`, `query` and
* `hash` to conveniently change them.
*/
type RouteLocationAsRelative = RouteMapGeneric extends RouteMap ? RouteLocationAsRelativeGeneric : RouteLocationAsRelativeTypedList[Name];
/**
* Route location resolved with {@link Router | `router.resolve()`}.
*/
type RouteLocationResolved = RouteMapGeneric extends RouteMap ? RouteLocationResolvedGeneric : RouteLocationResolvedTypedList[Name];
/**
* Same as {@link RouteLocationAsPath} but as a string literal.
*/
type RouteLocationAsString = RouteMapGeneric extends RouteMap ? string : _LiteralUnion[Name], string>;
/**
* Route location as an object with a `path` property.
*/
type RouteLocationAsPath = RouteMapGeneric extends RouteMap ? RouteLocationAsPathGeneric : RouteLocationAsPathTypedList[Name];
/**
* Route location that can be passed to `router.push()` and other user-facing APIs.
*/
type RouteLocationRaw = RouteMapGeneric extends RouteMap ? RouteLocationAsString | RouteLocationAsRelativeGeneric | RouteLocationAsPathGeneric : _LiteralUnion[Name], string> | RouteLocationAsRelativeTypedList[Name] | RouteLocationAsPathTypedList[Name]; //#endregion
//#region src/typed-routes/navigation-guards.d.ts
/**
* Return types for a Navigation Guard. Based on `TypesConfig`
*
* @see {@link TypesConfig}
*/
type NavigationGuardReturn = void | Error | boolean | RouteLocationRaw;
/**
* Navigation Guard with a type parameter for `this`.
* @see {@link TypesConfig}
*/
interface NavigationGuardWithThis {
(this: T, to: RouteLocationNormalized, from: RouteLocationNormalizedLoaded, next: NavigationGuardNext): _Awaitable;
}
/**
* Navigation Guard.
*/
interface NavigationGuard {
(to: RouteLocationNormalized, from: RouteLocationNormalizedLoaded, next: NavigationGuardNext): _Awaitable;
}
/**
* Navigation hook triggered after a navigation is settled.
*/
interface NavigationHookAfter {
(to: RouteLocationNormalized, from: RouteLocationNormalizedLoaded, failure?: NavigationFailure | void): unknown;
}
/**
* `next()` callback passed to navigation guards.
*/
interface NavigationGuardNext {
(): void;
(error: Error): void;
(location: RouteLocationRaw): void;
(valid: boolean | undefined): void;
(cb: NavigationGuardNextCallback): void;
}
/**
* Callback that can be passed to `next()` in `beforeRouteEnter()` guards.
*/
type NavigationGuardNextCallback = (vm: ComponentPublicInstance) => unknown; //#endregion
//#region src/matcher/types.d.ts
/**
* Normalized version of a {@link RouteRecord | route record}.
*/
interface RouteRecordNormalized {
/**
* {@inheritDoc _RouteRecordBase.path}
*/
path: _RouteRecordBase['path'];
/**
* {@inheritDoc _RouteRecordBase.redirect}
*/
redirect: _RouteRecordBase['redirect'] | undefined;
/**
* {@inheritDoc _RouteRecordBase.name}
*/
name: _RouteRecordBase['name'];
/**
* {@inheritDoc RouteRecordMultipleViews.components}
*/
components: RouteRecordMultipleViews['components'] | null | undefined;
/**
* Contains the original modules for lazy loaded components.
* @internal
*/
mods: Record;
/**
* Nested route records.
*/
children: RouteRecordRaw[];
/**
* {@inheritDoc _RouteRecordBase.meta}
*/
meta: Exclude<_RouteRecordBase['meta'], void>;
/**
* {@inheritDoc RouteRecordMultipleViews.props}
*/
props: Record;
/**
* Registered beforeEnter guards
*/
beforeEnter: _RouteRecordBase['beforeEnter'];
/**
* Registered leave guards
*
* @internal
*/
leaveGuards: Set;
/**
* Registered update guards
*
* @internal
*/
updateGuards: Set;
/**
* Registered beforeRouteEnter callbacks passed to `next` or returned in guards
*
* @internal
*/
enterCallbacks: Record;
/**
* Mounted route component instances
* Having the instances on the record mean beforeRouteUpdate and
* beforeRouteLeave guards can only be invoked with the latest mounted app
* instance if there are multiple application instances rendering the same
* view, basically duplicating the content on the page, which shouldn't happen
* in practice. It will work if multiple apps are rendering different named
* views.
*/
instances: Record;
/**
* Defines if this record is the alias of another one. This property is
* `undefined` if the record is the original one.
*/
aliasOf: RouteRecordNormalized | undefined;
}
/**
* {@inheritDoc RouteRecordNormalized}
*/
type RouteRecord = RouteRecordNormalized; //#endregion
//#region src/matcher/pathParserRanker.d.ts
/**
* @internal
*/
interface _PathParserOptions {
/**
* Makes the RegExp case-sensitive.
*
* @defaultValue `false`
*/
sensitive?: boolean;
/**
* Whether to disallow a trailing slash or not.
*
* @defaultValue `false`
*/
strict?: boolean;
/**
* Should the RegExp match from the beginning by prepending a `^` to it.
* @internal
*
* @defaultValue `true`
*/
start?: boolean;
/**
* Should the RegExp match until the end by appending a `$` to it.
*
* @deprecated this option will alsways be `true` in the future. Open a discussion in vuejs/router if you need this to be `false`
*
* @defaultValue `true`
*/
end?: boolean;
}
type PathParserOptions = Pick<_PathParserOptions, 'end' | 'sensitive' | 'strict'>; //#endregion
//#region src/matcher/pathMatcher.d.ts
//#endregion
//#region src/history/common.d.ts
type HistoryLocation = string;
/**
* Allowed variables in HTML5 history state. Note that pushState clones the state
* passed and does not accept everything: e.g.: it doesn't accept symbols, nor
* functions as values. It also ignores Symbols as keys.
*
* @internal
*/
type HistoryStateValue = string | number | boolean | null | undefined | HistoryState | HistoryStateArray;
/**
* Allowed HTML history.state
*/
interface HistoryState {
[x: number]: HistoryStateValue;
[x: string]: HistoryStateValue;
}
/**
* Allowed arrays for history.state.
*
* @internal
*/
interface HistoryStateArray extends Array {}
declare enum NavigationType {
pop = "pop",
push = "push"
}
declare enum NavigationDirection {
back = "back",
forward = "forward",
unknown = ""
}
interface NavigationInformation {
type: NavigationType;
direction: NavigationDirection;
delta: number;
}
interface NavigationCallback {
(to: HistoryLocation, from: HistoryLocation, information: NavigationInformation): void;
}
/**
* Interface implemented by History implementations that can be passed to the
* router as {@link Router.history}
*
* @alpha
*/
interface RouterHistory {
/**
* Base path that is prepended to every url. This allows hosting an SPA at a
* sub-folder of a domain like `example.com/sub-folder` by having a `base` of
* `/sub-folder`
*/
readonly base: string;
/**
* Current History location
*/
readonly location: HistoryLocation;
/**
* Current History state
*/
readonly state: HistoryState;
/**
* Navigates to a location. In the case of an HTML5 History implementation,
* this will call `history.pushState` to effectively change the URL.
*
* @param to - location to push
* @param data - optional {@link HistoryState} to be associated with the
* navigation entry
*/
push(to: HistoryLocation, data?: HistoryState): void;
/**
* Same as {@link RouterHistory.push} but performs a `history.replaceState`
* instead of `history.pushState`
*
* @param to - location to set
* @param data - optional {@link HistoryState} to be associated with the
* navigation entry
*/
replace(to: HistoryLocation, data?: HistoryState): void;
/**
* Traverses history in a given direction.
*
* @example
* ```js
* myHistory.go(-1) // equivalent to window.history.back()
* myHistory.go(1) // equivalent to window.history.forward()
* ```
*
* @param delta - distance to travel. If delta is \< 0, it will go back,
* if it's \> 0, it will go forward by that amount of entries.
* @param triggerListeners - whether this should trigger listeners attached to
* the history
*/
go(delta: number, triggerListeners?: boolean): void;
/**
* Attach a listener to the History implementation that is triggered when the
* navigation is triggered from outside (like the Browser back and forward
* buttons) or when passing `true` to {@link RouterHistory.back} and
* {@link RouterHistory.forward}
*
* @param callback - listener to attach
* @returns a callback to remove the listener
*/
listen(callback: NavigationCallback): () => void;
/**
* Generates the corresponding href to be used in an anchor tag.
*
* @param location - history location that should create an href
*/
createHref(location: HistoryLocation): string;
/**
* Clears any event listener attached by the history implementation.
*/
destroy(): void;
} //#endregion
//#region src/types/index.d.ts
type Lazy = () => Promise;
/**
* @internal
*/
type RouteParamValue = string;
/**
* @internal
*/
type RouteParamValueRaw = RouteParamValue | number | null | undefined;
type RouteParamsGeneric = Record;
type RouteParamsRawGeneric = Record[]>;
/**
* @internal
*/
interface RouteQueryAndHash {
query?: LocationQueryRaw;
hash?: string;
}
/**
* @internal
*/
/**
* Common options for all navigation methods.
*/
interface RouteLocationOptions {
/**
* Replace the entry in the history instead of pushing a new entry
*/
replace?: boolean;
/**
* Triggers the navigation even if the location is the same as the current one.
* Note this will also add a new entry to the history unless `replace: true`
* is passed.
*/
force?: boolean;
/**
* State to save using the History API. This cannot contain any reactive
* values and some primitives like Symbols are forbidden. More info at
* https://developer.mozilla.org/en-US/docs/Web/API/History/state
*/
state?: HistoryState;
}
/**
* Route Location that can infer the necessary params based on the name.
*
* @internal
*/
interface RouteLocationMatched extends RouteRecordNormalized {
components: Record | null | undefined;
}
/**
* Base properties for a normalized route location.
*
* @internal
*/
interface _RouteLocationBase extends Pick {
/**
* The whole location including the `search` and `hash`. This string is
* percentage encoded.
*/
fullPath: string;
/**
* Object representation of the `search` property of the current location.
*/
query: LocationQuery;
/**
* Hash of the current location. If present, starts with a `#`.
*/
hash: string;
/**
* Contains the location we were initially trying to access before ending up
* on the current location.
*/
redirectedFrom: RouteLocation | undefined;
}
/**
* Allowed Component in {@link RouteLocationMatched}
*/
type RouteComponent = Component$1 | DefineComponent;
/**
* Allowed Component definitions in route records provided by the user
*/
type RawRouteComponent = RouteComponent | Lazy;
/**
* Internal type for common properties among all kind of {@link RouteRecordRaw}.
*/
interface _RouteRecordBase extends PathParserOptions {
/**
* Path of the record. Should start with `/` unless the record is the child of
* another record.
*
* @example `/users/:id` matches `/users/1` as well as `/users/posva`.
*/
path: string;
/**
* Where to redirect if the route is directly matched. The redirection happens
* before any navigation guard and triggers a new navigation with the new
* target location.
*/
redirect?: RouteRecordRedirectOption;
/**
* Aliases for the record. Allows defining extra paths that will behave like a
* copy of the record. Allows having paths shorthands like `/users/:id` and
* `/u/:id`. All `alias` and `path` values must share the same params.
*/
alias?: string | string[];
/**
* Name for the route record. Must be unique.
*/
name?: RouteRecordNameGeneric;
/**
* Before Enter guard specific to this record. Note `beforeEnter` has no
* effect if the record has a `redirect` property.
*/
beforeEnter?: NavigationGuardWithThis | NavigationGuardWithThis[];
/**
* Arbitrary data attached to the record.
*/
meta?: RouteMeta;
/**
* Array of nested routes.
*/
children?: RouteRecordRaw[];
/**
* Allow passing down params as props to the component rendered by `router-view`.
*/
props?: _RouteRecordProps | Record;
}
/**
* Interface to type `meta` fields in route records.
*
* @example
*
* ```ts
* // typings.d.ts or router.ts
* import 'vue-router';
*
* declare module 'vue-router' {
* interface RouteMeta {
* requiresAuth?: boolean
* }
* }
* ```
*/
interface RouteMeta extends Record {}
/**
* Route Record defining one single component with the `component` option.
*/
interface RouteRecordSingleView extends _RouteRecordBase {
/**
* Component to display when the URL matches this route.
*/
component: RawRouteComponent;
components?: never;
children?: never;
redirect?: never;
/**
* Allow passing down params as props to the component rendered by `router-view`.
*/
props?: _RouteRecordProps;
}
/**
* Route Record defining one single component with a nested view. Differently
* from {@link RouteRecordSingleView}, this record has children and allows a
* `redirect` option.
*/
interface RouteRecordSingleViewWithChildren extends _RouteRecordBase {
/**
* Component to display when the URL matches this route.
*/
component?: RawRouteComponent | null | undefined;
components?: never;
children: RouteRecordRaw[];
/**
* Allow passing down params as props to the component rendered by `router-view`.
*/
props?: _RouteRecordProps;
}
/**
* Route Record defining multiple named components with the `components` option.
*/
interface RouteRecordMultipleViews extends _RouteRecordBase {
/**
* Components to display when the URL matches this route. Allow using named views.
*/
components: Record;
component?: never;
children?: never;
redirect?: never;
/**
* Allow passing down params as props to the component rendered by
* `router-view`. Should be an object with the same keys as `components` or a
* boolean to be applied to every component.
*/
props?: Record | boolean;
}
/**
* Route Record defining multiple named components with the `components` option and children.
*/
interface RouteRecordMultipleViewsWithChildren extends _RouteRecordBase {
/**
* Components to display when the URL matches this route. Allow using named views.
*/
components?: Record | null | undefined;
component?: never;
children: RouteRecordRaw[];
/**
* Allow passing down params as props to the component rendered by
* `router-view`. Should be an object with the same keys as `components` or a
* boolean to be applied to every component.
*/
props?: Record | boolean;
}
/**
* Route Record that defines a redirect. Cannot have `component` or `components`
* as it is never rendered.
*/
interface RouteRecordRedirect extends _RouteRecordBase {
redirect: RouteRecordRedirectOption;
component?: never;
components?: never;
props?: never;
}
type RouteRecordRaw = RouteRecordSingleView | RouteRecordSingleViewWithChildren | RouteRecordMultipleViews | RouteRecordMultipleViewsWithChildren | RouteRecordRedirect;
/**
* Route location that can be passed to the matcher.
*/
/**
* Normalized/resolved Route location that returned by the matcher.
*/
interface MatcherLocation {
/**
* Name of the matched record
*/
name: RouteRecordNameGeneric | null | undefined;
/**
* Percentage encoded pathname section of the URL.
*/
path: string;
/**
* Object of decoded params extracted from the `path`.
*/
params: RouteParamsGeneric;
/**
* Merged `meta` properties from all the matched route records.
*/
meta: RouteMeta;
/**
* Array of {@link RouteRecord} containing components as they were
* passed when adding records. It can also contain redirect records. This
* can't be used directly
*/
matched: RouteRecord[];
} //#endregion
//#region src/errors.d.ts
/**
* Flags so we can combine them when checking for multiple errors. This is the internal version of
* {@link NavigationFailureType}.
*
* @internal
*/
declare const enum ErrorTypes {
MATCHER_NOT_FOUND = 1,
NAVIGATION_GUARD_REDIRECT = 2,
NAVIGATION_ABORTED = 4,
NAVIGATION_CANCELLED = 8,
NAVIGATION_DUPLICATED = 16
}
/**
* Enumeration with all possible types for navigation failures. Can be passed to
* {@link isNavigationFailure} to check for specific failures.
*/
/**
* Extended Error that contains extra information regarding a failed navigation.
*/
interface NavigationFailure extends Error {
/**
* Type of the navigation. One of {@link NavigationFailureType}
*/
type: ErrorTypes.NAVIGATION_CANCELLED | ErrorTypes.NAVIGATION_ABORTED | ErrorTypes.NAVIGATION_DUPLICATED;
/**
* Route location we were navigating from
*/
from: RouteLocationNormalized;
/**
* Route location we were navigating to
*/
to: RouteLocationNormalized;
}
/**
* Internal error used to detect a redirection.
*
* @internal
*/
/**
* Internal type to define an ErrorHandler
*
* @param error - error thrown
* @param to - location we were navigating to when the error happened
* @param from - location we were navigating from when the error happened
* @internal
*/
interface _ErrorListener {
(error: any, to: RouteLocationNormalized, from: RouteLocationNormalizedLoaded): any;
} //#endregion
//#region src/scrollBehavior.d.ts
/**
* Scroll position similar to
* {@link https://developer.mozilla.org/en-US/docs/Web/API/ScrollToOptions | `ScrollToOptions`}.
* Note that not all browsers support `behavior`.
*/
type ScrollPositionCoordinates = {
behavior?: ScrollOptions['behavior'];
left?: number;
top?: number;
};
/**
* Internal normalized version of {@link ScrollPositionCoordinates} that always
* has `left` and `top` coordinates. Must be a type to be assignable to HistoryStateValue.
*
* @internal
*/
type _ScrollPositionNormalized = {
behavior?: ScrollOptions['behavior'];
left: number;
top: number;
};
/**
* Type of the `scrollBehavior` option that can be passed to `createRouter`.
*/
interface RouterScrollBehavior {
/**
* @param to - Route location where we are navigating to
* @param from - Route location where we are navigating from
* @param savedPosition - saved position if it exists, `null` otherwise
*/
(to: RouteLocationNormalized, from: RouteLocationNormalizedLoaded, savedPosition: _ScrollPositionNormalized | null): Awaitable;
}
interface ScrollPositionElement extends ScrollToOptions {
/**
* A valid CSS selector. Note some characters must be escaped in id selectors (https://mathiasbynens.be/notes/css-escapes).
* @example
* Here are a few examples:
*
* - `.title`
* - `.content:first-child`
* - `#marker`
* - `#marker\~with\~symbols`
* - `#marker.with.dot`: selects `class="with dot" id="marker"`, not `id="marker.with.dot"`
*
*/
el: string | Element;
}
type ScrollPosition = ScrollPositionCoordinates | ScrollPositionElement;
type Awaitable = T | PromiseLike; //#endregion
//#region src/experimental/route-resolver/matchers/param-parsers/types.d.ts
/**
* Defines a parser that can read a param from the url (string-based) and
* transform it into a more complex type, or vice versa.
*
* @see MatcherPattern
*/
//#endregion
//#region src/experimental/router.d.ts
/**
* Options to initialize a {@link Router} instance.
*/
interface EXPERIMENTAL_RouterOptions_Base extends PathParserOptions {
/**
* History implementation used by the router. Most web applications should use
* `createWebHistory` but it requires the server to be properly configured.
* You can also use a _hash_ based history with `createWebHashHistory` that
* does not require any configuration on the server but isn't handled at all
* by search engines and does poorly on SEO.
*
* @example
* ```js
* createRouter({
* history: createWebHistory(),
* // other options...
* })
* ```
*/
history: RouterHistory;
/**
* Function to control scrolling when navigating between pages. Can return a
* Promise to delay scrolling.
*
* @see {@link RouterScrollBehavior}.
*
* @example
* ```js
* function scrollBehavior(to, from, savedPosition) {
* // `to` and `from` are both route locations
* // `savedPosition` can be null if there isn't one
* }
* ```
*/
scrollBehavior?: RouterScrollBehavior;
/**
* Custom implementation to parse a query. See its counterpart,
* {@link EXPERIMENTAL_RouterOptions_Base.stringifyQuery}.
*
* @example
* Let's say you want to use the [qs package](https://github.com/ljharb/qs)
* to parse queries, you can provide both `parseQuery` and `stringifyQuery`:
* ```js
* import qs from 'qs'
*
* createRouter({
* // other options...
* parseQuery: qs.parse,
* stringifyQuery: qs.stringify,
* })
* ```
*/
parseQuery?: typeof parseQuery;
/**
* Custom implementation to stringify a query object. Should not prepend a leading `?`.
* {@link parseQuery} counterpart to handle query parsing.
*/
stringifyQuery?: typeof stringifyQuery;
/**
* Default class applied to active {@link RouterLink}. If none is provided,
* `router-link-active` will be applied.
*/
linkActiveClass?: string;
/**
* Default class applied to exact active {@link RouterLink}. If none is provided,
* `router-link-exact-active` will be applied.
*/
linkExactActiveClass?: string;
}
/**
* Internal type for common properties among all kind of {@link RouteRecordRaw}.
*/
/**
* Router base instance.
*
* @experimental This version is not stable, it's meant to replace {@link Router} in the future.
*/
interface EXPERIMENTAL_Router_Base {
/**
* Current {@link RouteLocationNormalized}
*/
readonly currentRoute: ShallowRef;
/**
* Allows turning off the listening of history events. This is a low level api for micro-frontend.
*/
listening: boolean;
/**
* Checks if a route with a given name exists
*
* @param name - Name of the route to check
*/
hasRoute(name: NonNullable): boolean;
/**
* Get a full list of all the {@link RouteRecord | route records}.
*/
getRoutes(): TRecord[];
/**
* Returns the {@link RouteLocation | normalized version} of a
* {@link RouteLocationRaw | route location}. Also includes an `href` property
* that includes any existing `base`. By default, the `currentLocation` used is
* `router.currentRoute` and should only be overridden in advanced use cases.
*
* @param to - Raw route location to resolve
* @param currentLocation - Optional current location to resolve against
*/
resolve(to: RouteLocationAsRelativeTyped, currentLocation?: RouteLocationNormalizedLoaded): RouteLocationResolved;
resolve(to: RouteLocationAsString | RouteLocationAsRelative | RouteLocationAsPath, currentLocation?: RouteLocationNormalizedLoaded): RouteLocationResolved;
/**
* Programmatically navigate to a new URL by pushing an entry in the history
* stack.
*
* @param to - Route location to navigate to
*/
push(to: RouteLocationRaw): Promise;
/**
* Programmatically navigate to a new URL by replacing the current entry in
* the history stack.
*
* @param to - Route location to navigate to
*/
replace(to: RouteLocationRaw): Promise;
/**
* Go back in history if possible by calling `history.back()`. Equivalent to
* `router.go(-1)`.
*/
back(): void;
/**
* Go forward in history if possible by calling `history.forward()`.
* Equivalent to `router.go(1)`.
*/
forward(): void;
/**
* Allows you to move forward or backward through the history. Calls
* `history.go()`.
*
* @param delta - The position in the history to which you want to move,
* relative to the current page
*/
go(delta: number): void;
/**
* Add a navigation guard that executes before any navigation. Returns a
* function that removes the registered guard.
*
* @param guard - navigation guard to add
*/
beforeEach(guard: NavigationGuardWithThis): () => void;
/**
* Add a navigation guard that executes before navigation is about to be
* resolved. At this state all component have been fetched and other
* navigation guards have been successful. Returns a function that removes the
* registered guard.
*
* @param guard - navigation guard to add
* @returns a function that removes the registered guard
*
* @example
* ```js
* router.beforeResolve(to => {
* if (to.meta.requiresAuth && !isAuthenticated) return false
* })
* ```
*
*/
beforeResolve(guard: NavigationGuardWithThis): () => void;
/**
* Add a navigation hook that is executed after every navigation. Returns a
* function that removes the registered hook.
*
* @param guard - navigation hook to add
* @returns a function that removes the registered hook
*
* @example
* ```js
* router.afterEach((to, from, failure) => {
* if (isNavigationFailure(failure)) {
* console.log('failed navigation', failure)
* }
* })
* ```
*/
afterEach(guard: NavigationHookAfter): () => void;
/**
* Adds an error handler that is called every time a non caught error happens
* during navigation. This includes errors thrown synchronously and
* asynchronously, errors returned or passed to `next` in any navigation
* guard, and errors occurred when trying to resolve an async component that
* is required to render a route.
*
* @param handler - error handler to register
*/
onError(handler: _ErrorListener): () => void;
/**
* Returns a Promise that resolves when the router has completed the initial
* navigation, which means it has resolved all async enter hooks and async
* components that are associated with the initial route. If the initial
* navigation already happened, the promise resolves immediately.
*
* This is useful in server-side rendering to ensure consistent output on both
* the server and the client. Note that on server side, you need to manually
* push the initial location while on client side, the router automatically
* picks it up from the URL.
*/
isReady(): Promise;
/**
* Called automatically by `app.use(router)`. Should not be called manually by
* the user. This will trigger the initial navigation when on client side.
*
* @internal
* @param app - Application that uses the router
*/
install(app: App): void;
}
//#endregion
//#region ../../node_modules/.pnpm/vue-router@4.6.0_vue@3.5.22_typescript@5.9.3_/node_modules/vue-router/dist/vue-router.d.mts
//#endregion
//#region src/router.d.ts
/**
* Options to initialize a {@link Router} instance.
*/
interface RouterOptions extends EXPERIMENTAL_RouterOptions_Base {
/**
* Initial list of routes that should be added to the router.
*/
routes: Readonly;
}
/**
* Router instance.
*/
interface Router extends EXPERIMENTAL_Router_Base {
/**
* Original options object passed to create the Router
*/
readonly options: RouterOptions;
/**
* Add a new {@link RouteRecordRaw | route record} as the child of an existing route.
*
* @param parentName - Parent Route Record where `route` should be appended at
* @param route - Route Record to add
*/
addRoute(parentName: NonNullable, route: RouteRecordRaw): () => void;
/**
* Add a new {@link RouteRecordRaw | route record} to the router.
*
* @param route - Route Record to add
*/
addRoute(route: RouteRecordRaw): () => void;
/**
* Remove an existing route by its name.
*
* @param name - Name of the route to remove
*/
removeRoute(name: NonNullable): void;
/**
* Delete all routes from the router.
*/
clearRoutes(): void;
}
/**
* Creates a Router instance that can be used by a Vue app.
*
* @param options - {@link RouterOptions}
*/
//#endregion
//#region src/RouterLink.d.ts
interface RouterLinkOptions {
/**
* Route Location the link should navigate to when clicked on.
*/
to: RouteLocationRaw;
/**
* Calls `router.replace` instead of `router.push`.
*/
replace?: boolean;
}
interface RouterLinkProps extends RouterLinkOptions {
/**
* Whether RouterLink should not wrap its content in an `a` tag. Useful when
* using `v-slot` to create a custom RouterLink
*/
custom?: boolean;
/**
* Class to apply when the link is active
*/
activeClass?: string;
/**
* Class to apply when the link is exact active
*/
exactActiveClass?: string;
/**
* Value passed to the attribute `aria-current` when the link is exact active.
*
* @defaultValue `'page'`
*/
ariaCurrentValue?: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false';
/**
* Pass the returned promise of `router.push()` to `document.startViewTransition()` if supported.
*/
viewTransition?: boolean;
}
/**
* Options passed to {@link useLink}.
*/
interface UseLinkOptions {
to: MaybeRef | RouteLocationAsPath | RouteLocationRaw>;
replace?: MaybeRef;
/**
* Pass the returned promise of `router.push()` to `document.startViewTransition()` if supported.
*/
viewTransition?: boolean;
}
/**
* Return type of {@link useLink}.
* @internal
*/
interface UseLinkReturn {
route: ComputedRef>;
href: ComputedRef;
isActive: ComputedRef;
isExactActive: ComputedRef;
navigate(e?: MouseEvent): Promise;
}
/**
* Returns the internal behavior of a {@link RouterLink} without the rendering part.
*
* @param props - a `to` location and an optional `replace` flag
*/
declare function useLink(props: UseLinkOptions): UseLinkReturn;
/**
* Component to render a link that triggers a navigation on click.
*/
declare const RouterLink: _RouterLinkI;
/**
* @internal
*/
type _RouterLinkPropsTypedBase = AllowedComponentProps & ComponentCustomProps & VNodeProps & RouterLinkProps;
/**
* @internal
*/
type RouterLinkPropsTyped = Custom extends true ? _RouterLinkPropsTypedBase & {
custom: true;
} : _RouterLinkPropsTypedBase & {
custom?: false | undefined;
} & Omit;
/**
* Typed version of the `RouterLink` component. Its generic defaults to the typed router, so it can be inferred
* automatically for JSX.
*
* @internal
*/
interface _RouterLinkI {
new (): {
$props: RouterLinkPropsTyped;
$slots: {
default?: ({
route,
href,
isActive,
isExactActive,
navigate
}: UnwrapRef) => VNode[];
};
};
/**
* Access to `useLink()` without depending on using vue-router
*
* @internal
*/
useLink: typeof useLink;
} //#endregion
//#region src/RouterView.d.ts
interface RouterViewProps {
name?: string;
route?: RouteLocationNormalized;
}
/**
* Component to display the current route the user is at.
*/
declare const RouterView: {
new (): {
$props: AllowedComponentProps & ComponentCustomProps & VNodeProps & RouterViewProps;
$slots: {
default?: ({
Component,
route
}: {
Component: VNode;
route: RouteLocationNormalizedLoaded;
}) => VNode[];
};
};
}; //#endregion
//#region src/useApi.d.ts
/**
* Returns the router instance. Equivalent to using `$router` inside
* templates.
*/
//#endregion
//#region src/index.d.ts
declare module 'vue' {
interface ComponentCustomOptions {
/**
* Guard called when the router is navigating to the route that is rendering
* this component from a different route. Differently from `beforeRouteUpdate`
* and `beforeRouteLeave`, `beforeRouteEnter` does not have access to the
* component instance through `this` because it triggers before the component
* is even mounted.
*
* @param to - RouteLocationRaw we are navigating to
* @param from - RouteLocationRaw we are navigating from
* @param next - function to validate, cancel or modify (by redirecting) the
* navigation
*/
beforeRouteEnter?: TypesConfig extends Record<'beforeRouteEnter', infer T> ? T : NavigationGuardWithThis;
/**
* Guard called whenever the route that renders this component has changed, but
* it is reused for the new route. This allows you to guard for changes in
* params, the query or the hash.
*
* @param to - RouteLocationRaw we are navigating to
* @param from - RouteLocationRaw we are navigating from
* @param next - function to validate, cancel or modify (by redirecting) the
* navigation
*/
beforeRouteUpdate?: TypesConfig extends Record<'beforeRouteUpdate', infer T> ? T : NavigationGuard;
/**
* Guard called when the router is navigating away from the current route that
* is rendering this component.
*
* @param to - RouteLocationRaw we are navigating to
* @param from - RouteLocationRaw we are navigating from
* @param next - function to validate, cancel or modify (by redirecting) the
* navigation
*/
beforeRouteLeave?: TypesConfig extends Record<'beforeRouteLeave', infer T> ? T : NavigationGuard;
}
interface ComponentCustomProperties {
/**
* Normalized current location. See {@link RouteLocationNormalizedLoaded}.
*/
$route: TypesConfig extends Record<'$route', infer T> ? T : RouteLocationNormalizedLoaded;
/**
* {@link Router} instance used by the application.
*/
$router: TypesConfig extends Record<'$router', infer T> ? T : Router;
}
interface GlobalComponents {
RouterView: TypesConfig extends Record<'RouterView', infer T> ? T : typeof RouterView;
RouterLink: TypesConfig extends Record<'RouterLink', infer T> ? T : typeof RouterLink;
}
} //#endregion
//#endregion
//#region src/rpc/global.d.ts
declare enum DevToolsMessagingEvents {
INSPECTOR_TREE_UPDATED = "inspector-tree-updated",
INSPECTOR_STATE_UPDATED = "inspector-state-updated",
DEVTOOLS_STATE_UPDATED = "devtools-state-updated",
ROUTER_INFO_UPDATED = "router-info-updated",
TIMELINE_EVENT_UPDATED = "timeline-event-updated",
INSPECTOR_UPDATED = "inspector-updated",
ACTIVE_APP_UNMOUNTED = "active-app-updated",
DESTROY_DEVTOOLS_CLIENT = "destroy-devtools-client",
RELOAD_DEVTOOLS_CLIENT = "reload-devtools-client"
}
declare const functions: {
on: (event: string, handler: Function) => void;
off: (event: string, handler: Function) => void;
once: (event: string, handler: Function) => void;
emit: (event: string, ...args: any[]) => void;
heartbeat: () => boolean;
devtoolsState: () => {
connected: boolean;
clientConnected: boolean;
vueVersion: string;
tabs: _vue_devtools_kit0.CustomTab[];
commands: _vue_devtools_kit0.CustomCommand[];
vitePluginDetected: boolean;
appRecords: {
id: string;
name: string;
version: string | undefined;
routerId: string | undefined;
iframe: string | undefined;
}[];
activeAppRecordId: string;
timelineLayersState: Record;
};
getInspectorTree(payload: Pick): Promise;
getInspectorState(payload: Pick): Promise;
editInspectorState(payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.EDIT_INSPECTOR_STATE]): Promise;
sendInspectorState(id: string): void;
inspectComponentInspector(): Promise;
cancelInspectComponentInspector(): void;
getComponentRenderCode(id: string): any;
scrollToComponent(id: string): void;
inspectDOM(id: string): void;
getInspectorNodeActions(id: string): {
icon: string;
tooltip?: string;
action: (nodeId: string) => void | Promise;
}[] | undefined;
getInspectorActions(id: string): {
icon: string;
tooltip?: string;
action: () => void | Promise;
}[] | undefined;
updateTimelineLayersState(state: Record): void;
callInspectorNodeAction(inspectorId: string, actionIndex: number, nodeId: string): void;
callInspectorAction(inspectorId: string, actionIndex: number): void;
openInEditor(options: OpenInEditorOptions): void;
checkVueInspectorDetected(): Promise;
enableVueInspector(): Promise;
toggleApp(id: string, options?: {
inspectingComponent?: boolean;
}): Promise;
updatePluginSettings(pluginId: string, key: string, value: string): void;
getPluginSettings(pluginId: string): {
options: Record | null;
values: any;
};
getRouterInfo(): _vue_devtools_kit0.RouterInfo;
navigate(path: string): Promise;
getMatchedRoutes(path: string): RouteRecordNormalized[];
toggleClientConnected(state: boolean): void;
getCustomInspector(): {
id: string;
label: string;
logo: string;
icon: string;
packageName: string | undefined;
homepage: string | undefined;
pluginId: string;
}[];
getInspectorInfo(id: string): {
id: string;
label: string;
logo: string | undefined;
packageName: string | undefined;
homepage: string | undefined;
timelineLayers: {
id: string;
label: string;
color: number;
}[];
treeFilterPlaceholder: string;
stateFilterPlaceholder: string;
} | undefined;
highlighComponent(uid: string): Promise;
unhighlight(): Promise;
updateDevToolsClientDetected(params: Record): void;
initDevToolsServerListener(): void;
};
type RPCFunctions = typeof functions;
declare const rpc: {
value: ReturnType>;
functions: ReturnType>;
};
declare const rpcServer: {
value: ReturnType>;
functions: ReturnType>;
};
declare function onRpcConnected(callback: () => void): void;
declare function onRpcSeverReady(callback: () => void): void;
//#endregion
//#region ../../node_modules/.pnpm/vite@7.1.10_@types+node@24.7.2_jiti@2.5.1_sass-embedded@1.93.2_sass@1.93.2_terser@5.44.0_tsx@4.20.6_yaml@2.8.1/node_modules/vite/types/hmrPayload.d.ts
type HotPayload = ConnectedPayload | PingPayload | UpdatePayload | FullReloadPayload | CustomPayload | ErrorPayload | PrunePayload;
interface ConnectedPayload {
type: 'connected';
}
interface PingPayload {
type: 'ping';
}
interface UpdatePayload {
type: 'update';
updates: Update[];
}
interface Update {
type: 'js-update' | 'css-update';
path: string;
acceptedPath: string;
timestamp: number;
/** @internal */
explicitImportRequired?: boolean;
/** @internal */
isWithinCircularImport?: boolean;
/** @internal */
firstInvalidatedBy?: string;
/** @internal */
invalidates?: string[];
}
interface PrunePayload {
type: 'prune';
paths: string[];
}
interface FullReloadPayload {
type: 'full-reload';
path?: string;
/** @internal */
triggeredBy?: string;
}
interface CustomPayload {
type: 'custom';
event: string;
data?: any;
}
interface ErrorPayload {
type: 'error';
err: {
[name: string]: any;
message: string;
stack: string;
id?: string;
frame?: string;
plugin?: string;
pluginCode?: string;
loc?: {
file?: string;
line: number;
column: number;
};
};
}
//#endregion
//#region ../../node_modules/.pnpm/vite@7.1.10_@types+node@24.7.2_jiti@2.5.1_sass-embedded@1.93.2_sass@1.93.2_terser@5.44.0_tsx@4.20.6_yaml@2.8.1/node_modules/vite/dist/node/moduleRunnerTransport-BWUZBVLX.d.ts
//#region src/shared/invokeMethods.d.ts
interface FetchFunctionOptions {
cached?: boolean;
startOffset?: number;
}
type FetchResult = CachedFetchResult | ExternalFetchResult | ViteFetchResult;
interface CachedFetchResult {
/**
* If module cached in the runner, we can just confirm
* it wasn't invalidated on the server side.
*/
cache: true;
}
interface ExternalFetchResult {
/**
* The path to the externalized module starting with file://,
* by default this will be imported via a dynamic "import"
* instead of being transformed by vite and loaded with vite runner
*/
externalize: string;
/**
* Type of the module. Will be used to determine if import statement is correct.
* For example, if Vite needs to throw an error if variable is not actually exported
*/
type: 'module' | 'commonjs' | 'builtin' | 'network';
}
interface ViteFetchResult {
/**
* Code that will be evaluated by vite runner
* by default this will be wrapped in an async function
*/
code: string;
/**
* File path of the module on disk.
* This will be resolved as import.meta.url/filename
* Will be equal to `null` for virtual modules
*/
file: string | null;
/**
* Module ID in the server module graph.
*/
id: string;
/**
* Module URL used in the import.
*/
url: string;
/**
* Invalidate module on the client side.
*/
invalidate: boolean;
}
//#endregion
//#region ../../node_modules/.pnpm/vite@7.1.10_@types+node@24.7.2_jiti@2.5.1_sass-embedded@1.93.2_sass@1.93.2_terser@5.44.0_tsx@4.20.6_yaml@2.8.1/node_modules/vite/types/customEvent.d.ts
interface CustomEventMap {
'vite:beforeUpdate': UpdatePayload;
'vite:afterUpdate': UpdatePayload;
'vite:beforePrune': PrunePayload;
'vite:beforeFullReload': FullReloadPayload;
'vite:error': ErrorPayload;
'vite:invalidate': InvalidatePayload;
'vite:ws:connect': WebSocketConnectionPayload;
'vite:ws:disconnect': WebSocketConnectionPayload;
}
interface WebSocketConnectionPayload {
/**
* @experimental
* We expose this instance experimentally to see potential usage.
* This might be removed in the future if we didn't find reasonable use cases.
* If you find this useful, please open an issue with details so we can discuss and make it stable API.
*/
// eslint-disable-next-line n/no-unsupported-features/node-builtins
webSocket: WebSocket;
}
interface InvalidatePayload {
path: string;
message: string | undefined;
firstInvalidatedBy: string;
}
/**
* provides types for payloads of built-in Vite events
*/
type InferCustomEventPayload = T extends keyof CustomEventMap ? CustomEventMap[T] : any;
//#endregion
//#region ../../node_modules/.pnpm/@types+estree@1.0.8/node_modules/@types/estree/index.d.ts
// This definition file follows a somewhat unusual format. ESTree allows
// runtime type checks based on the `type` parameter. In order to explain this
// to typescript we want to use discriminated union types:
// https://github.com/Microsoft/TypeScript/pull/9163
//
// For ESTree this is a bit tricky because the high level interfaces like
// Node or Function are pulling double duty. We want to pass common fields down
// to the interfaces that extend them (like Identifier or
// ArrowFunctionExpression), but you can't extend a type union or enforce
// common fields on them. So we've split the high level interfaces into two
// types, a base type which passes down inherited fields, and a type union of
// all types which extend the base type. Only the type union is exported, and
// the union is how other types refer to the collection of inheriting types.
//
// This makes the definitions file here somewhat more difficult to maintain,
// but it has the notable advantage of making ESTree much easier to use as
// an end user.
interface BaseNodeWithoutComments {
// Every leaf interface that extends BaseNode must specify a type property.
// The type property should be a string literal. For example, Identifier
// has: `type: "Identifier"`
type: string;
loc?: SourceLocation | null | undefined;
range?: [number, number] | undefined;
}
interface BaseNode extends BaseNodeWithoutComments {
leadingComments?: Comment$1[] | undefined;
trailingComments?: Comment$1[] | undefined;
}
interface NodeMap {
AssignmentProperty: AssignmentProperty;
CatchClause: CatchClause;
Class: Class;
ClassBody: ClassBody;
Expression: Expression;
Function: Function$1;
Identifier: Identifier;
Literal: Literal;
MethodDefinition: MethodDefinition;
ModuleDeclaration: ModuleDeclaration;
ModuleSpecifier: ModuleSpecifier;
Pattern: Pattern;
PrivateIdentifier: PrivateIdentifier;
Program: Program;
Property: Property;
PropertyDefinition: PropertyDefinition;
SpreadElement: SpreadElement;
Statement: Statement;
Super: Super;
SwitchCase: SwitchCase;
TemplateElement: TemplateElement;
VariableDeclarator: VariableDeclarator;
}
type Node$1 = NodeMap[keyof NodeMap];
interface Comment$1 extends BaseNodeWithoutComments {
type: "Line" | "Block";
value: string;
}
interface SourceLocation {
source?: string | null | undefined;
start: Position$1;
end: Position$1;
}
interface Position$1 {
/** >= 1 */
line: number;
/** >= 0 */
column: number;
}
interface Program extends BaseNode {
type: "Program";
sourceType: "script" | "module";
body: Array;
comments?: Comment$1[] | undefined;
}
interface Directive extends BaseNode {
type: "ExpressionStatement";
expression: Literal;
directive: string;
}
interface BaseFunction extends BaseNode {
params: Pattern[];
generator?: boolean | undefined;
async?: boolean | undefined; // The body is either BlockStatement or Expression because arrow functions
// can have a body that's either. FunctionDeclarations and
// FunctionExpressions have only BlockStatement bodies.
body: BlockStatement | Expression;
}
type Function$1 = FunctionDeclaration | FunctionExpression | ArrowFunctionExpression;
type Statement = ExpressionStatement | BlockStatement | StaticBlock | EmptyStatement | DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement | BreakStatement | ContinueStatement | IfStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | Declaration$1;
interface BaseStatement extends BaseNode {}
interface EmptyStatement extends BaseStatement {
type: "EmptyStatement";
}
interface BlockStatement extends BaseStatement {
type: "BlockStatement";
body: Statement[];
innerComments?: Comment$1[] | undefined;
}
interface StaticBlock extends Omit {
type: "StaticBlock";
}
interface ExpressionStatement extends BaseStatement {
type: "ExpressionStatement";
expression: Expression;
}
interface IfStatement extends BaseStatement {
type: "IfStatement";
test: Expression;
consequent: Statement;
alternate?: Statement | null | undefined;
}
interface LabeledStatement extends BaseStatement {
type: "LabeledStatement";
label: Identifier;
body: Statement;
}
interface BreakStatement extends BaseStatement {
type: "BreakStatement";
label?: Identifier | null | undefined;
}
interface ContinueStatement extends BaseStatement {
type: "ContinueStatement";
label?: Identifier | null | undefined;
}
interface WithStatement extends BaseStatement {
type: "WithStatement";
object: Expression;
body: Statement;
}
interface SwitchStatement extends BaseStatement {
type: "SwitchStatement";
discriminant: Expression;
cases: SwitchCase[];
}
interface ReturnStatement extends BaseStatement {
type: "ReturnStatement";
argument?: Expression | null | undefined;
}
interface ThrowStatement extends BaseStatement {
type: "ThrowStatement";
argument: Expression;
}
interface TryStatement extends BaseStatement {
type: "TryStatement";
block: BlockStatement;
handler?: CatchClause | null | undefined;
finalizer?: BlockStatement | null | undefined;
}
interface WhileStatement extends BaseStatement {
type: "WhileStatement";
test: Expression;
body: Statement;
}
interface DoWhileStatement extends BaseStatement {
type: "DoWhileStatement";
body: Statement;
test: Expression;
}
interface ForStatement extends BaseStatement {
type: "ForStatement";
init?: VariableDeclaration | Expression | null | undefined;
test?: Expression | null | undefined;
update?: Expression | null | undefined;
body: Statement;
}
interface BaseForXStatement extends BaseStatement {
left: VariableDeclaration | Pattern;
right: Expression;
body: Statement;
}
interface ForInStatement extends BaseForXStatement {
type: "ForInStatement";
}
interface DebuggerStatement extends BaseStatement {
type: "DebuggerStatement";
}
type Declaration$1 = FunctionDeclaration | VariableDeclaration | ClassDeclaration;
interface BaseDeclaration extends BaseStatement {}
interface MaybeNamedFunctionDeclaration extends BaseFunction, BaseDeclaration {
type: "FunctionDeclaration";
/** It is null when a function declaration is a part of the `export default function` statement */
id: Identifier | null;
body: BlockStatement;
}
interface FunctionDeclaration extends MaybeNamedFunctionDeclaration {
id: Identifier;
}
interface VariableDeclaration extends BaseDeclaration {
type: "VariableDeclaration";
declarations: VariableDeclarator[];
kind: "var" | "let" | "const" | "using" | "await using";
}
interface VariableDeclarator extends BaseNode {
type: "VariableDeclarator";
id: Pattern;
init?: Expression | null | undefined;
}
interface ExpressionMap {
ArrayExpression: ArrayExpression;
ArrowFunctionExpression: ArrowFunctionExpression;
AssignmentExpression: AssignmentExpression;
AwaitExpression: AwaitExpression;
BinaryExpression: BinaryExpression;
CallExpression: CallExpression;
ChainExpression: ChainExpression;
ClassExpression: ClassExpression;
ConditionalExpression: ConditionalExpression;
FunctionExpression: FunctionExpression;
Identifier: Identifier;
ImportExpression: ImportExpression;
Literal: Literal;
LogicalExpression: LogicalExpression;
MemberExpression: MemberExpression;
MetaProperty: MetaProperty;
NewExpression: NewExpression;
ObjectExpression: ObjectExpression;
SequenceExpression: SequenceExpression;
TaggedTemplateExpression: TaggedTemplateExpression;
TemplateLiteral: TemplateLiteral;
ThisExpression: ThisExpression;
UnaryExpression: UnaryExpression;
UpdateExpression: UpdateExpression;
YieldExpression: YieldExpression;
}
type Expression = ExpressionMap[keyof ExpressionMap];
interface BaseExpression extends BaseNode {}
type ChainElement = SimpleCallExpression | MemberExpression;
interface ChainExpression extends BaseExpression {
type: "ChainExpression";
expression: ChainElement;
}
interface ThisExpression extends BaseExpression {
type: "ThisExpression";
}
interface ArrayExpression extends BaseExpression {
type: "ArrayExpression";
elements: Array;
}
interface ObjectExpression extends BaseExpression {
type: "ObjectExpression";
properties: Array;
}
interface PrivateIdentifier extends BaseNode {
type: "PrivateIdentifier";
name: string;
}
interface Property extends BaseNode {
type: "Property";
key: Expression | PrivateIdentifier;
value: Expression | Pattern; // Could be an AssignmentProperty
kind: "init" | "get" | "set";
method: boolean;
shorthand: boolean;
computed: boolean;
}
interface PropertyDefinition extends BaseNode {
type: "PropertyDefinition";
key: Expression | PrivateIdentifier;
value?: Expression | null | undefined;
computed: boolean;
static: boolean;
}
interface FunctionExpression extends BaseFunction, BaseExpression {
id?: Identifier | null | undefined;
type: "FunctionExpression";
body: BlockStatement;
}
interface SequenceExpression extends BaseExpression {
type: "SequenceExpression";
expressions: Expression[];
}
interface UnaryExpression extends BaseExpression {
type: "UnaryExpression";
operator: UnaryOperator;
prefix: true;
argument: Expression;
}
interface BinaryExpression extends BaseExpression {
type: "BinaryExpression";
operator: BinaryOperator;
left: Expression | PrivateIdentifier;
right: Expression;
}
interface AssignmentExpression extends BaseExpression {
type: "AssignmentExpression";
operator: AssignmentOperator;
left: Pattern | MemberExpression;
right: Expression;
}
interface UpdateExpression extends BaseExpression {
type: "UpdateExpression";
operator: UpdateOperator;
argument: Expression;
prefix: boolean;
}
interface LogicalExpression extends BaseExpression {
type: "LogicalExpression";
operator: LogicalOperator;
left: Expression;
right: Expression;
}
interface ConditionalExpression extends BaseExpression {
type: "ConditionalExpression";
test: Expression;
alternate: Expression;
consequent: Expression;
}
interface BaseCallExpression extends BaseExpression {
callee: Expression | Super;
arguments: Array;
}
type CallExpression = SimpleCallExpression | NewExpression;
interface SimpleCallExpression extends BaseCallExpression {
type: "CallExpression";
optional: boolean;
}
interface NewExpression extends BaseCallExpression {
type: "NewExpression";
}
interface MemberExpression extends BaseExpression, BasePattern {
type: "MemberExpression";
object: Expression | Super;
property: Expression | PrivateIdentifier;
computed: boolean;
optional: boolean;
}
type Pattern = Identifier | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | MemberExpression;
interface BasePattern extends BaseNode {}
interface SwitchCase extends BaseNode {
type: "SwitchCase";
test?: Expression | null | undefined;
consequent: Statement[];
}
interface CatchClause extends BaseNode {
type: "CatchClause";
param: Pattern | null;
body: BlockStatement;
}
interface Identifier extends BaseNode, BaseExpression, BasePattern {
type: "Identifier";
name: string;
}
type Literal = SimpleLiteral | RegExpLiteral | BigIntLiteral;
interface SimpleLiteral extends BaseNode, BaseExpression {
type: "Literal";
value: string | boolean | number | null;
raw?: string | undefined;
}
interface RegExpLiteral extends BaseNode, BaseExpression {
type: "Literal";
value?: RegExp | null | undefined;
regex: {
pattern: string;
flags: string;
};
raw?: string | undefined;
}
interface BigIntLiteral extends BaseNode, BaseExpression {
type: "Literal";
value?: bigint | null | undefined;
bigint: string;
raw?: string | undefined;
}
type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete";
type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "|" | "^" | "&" | "in" | "instanceof";
type LogicalOperator = "||" | "&&" | "??";
type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "**=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "||=" | "&&=" | "??=";
type UpdateOperator = "++" | "--";
interface ForOfStatement extends BaseForXStatement {
type: "ForOfStatement";
await: boolean;
}
interface Super extends BaseNode {
type: "Super";
}
interface SpreadElement extends BaseNode {
type: "SpreadElement";
argument: Expression;
}
interface ArrowFunctionExpression extends BaseExpression, BaseFunction {
type: "ArrowFunctionExpression";
expression: boolean;
body: BlockStatement | Expression;
}
interface YieldExpression extends BaseExpression {
type: "YieldExpression";
argument?: Expression | null | undefined;
delegate: boolean;
}
interface TemplateLiteral extends BaseExpression {
type: "TemplateLiteral";
quasis: TemplateElement[];
expressions: Expression[];
}
interface TaggedTemplateExpression extends BaseExpression {
type: "TaggedTemplateExpression";
tag: Expression;
quasi: TemplateLiteral;
}
interface TemplateElement extends BaseNode {
type: "TemplateElement";
tail: boolean;
value: {
/** It is null when the template literal is tagged and the text has an invalid escape (e.g. - tag`\unicode and \u{55}`) */cooked?: string | null | undefined;
raw: string;
};
}
interface AssignmentProperty extends Property {
value: Pattern;
kind: "init";
method: boolean; // false
}
interface ObjectPattern extends BasePattern {
type: "ObjectPattern";
properties: Array;
}
interface ArrayPattern extends BasePattern {
type: "ArrayPattern";
elements: Array;
}
interface RestElement extends BasePattern {
type: "RestElement";
argument: Pattern;
}
interface AssignmentPattern extends BasePattern {
type: "AssignmentPattern";
left: Pattern;
right: Expression;
}
type Class = ClassDeclaration | ClassExpression;
interface BaseClass extends BaseNode {
superClass?: Expression | null | undefined;
body: ClassBody;
}
interface ClassBody extends BaseNode {
type: "ClassBody";
body: Array;
}
interface MethodDefinition extends BaseNode {
type: "MethodDefinition";
key: Expression | PrivateIdentifier;
value: FunctionExpression;
kind: "constructor" | "method" | "get" | "set";
computed: boolean;
static: boolean;
}
interface MaybeNamedClassDeclaration extends BaseClass, BaseDeclaration {
type: "ClassDeclaration";
/** It is null when a class declaration is a part of the `export default class` statement */
id: Identifier | null;
}
interface ClassDeclaration extends MaybeNamedClassDeclaration {
id: Identifier;
}
interface ClassExpression extends BaseClass, BaseExpression {
type: "ClassExpression";
id?: Identifier | null | undefined;
}
interface MetaProperty extends BaseExpression {
type: "MetaProperty";
meta: Identifier;
property: Identifier;
}
type ModuleDeclaration = ImportDeclaration | ExportNamedDeclaration | ExportDefaultDeclaration | ExportAllDeclaration;
interface BaseModuleDeclaration extends BaseNode {}
type ModuleSpecifier = ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier;
interface BaseModuleSpecifier extends BaseNode {
local: Identifier;
}
interface ImportDeclaration extends BaseModuleDeclaration {
type: "ImportDeclaration";
specifiers: Array;
attributes: ImportAttribute[];
source: Literal;
}
interface ImportSpecifier extends BaseModuleSpecifier {
type: "ImportSpecifier";
imported: Identifier | Literal;
}
interface ImportAttribute extends BaseNode {
type: "ImportAttribute";
key: Identifier | Literal;
value: Literal;
}
interface ImportExpression extends BaseExpression {
type: "ImportExpression";
source: Expression;
options?: Expression | null | undefined;
}
interface ImportDefaultSpecifier extends BaseModuleSpecifier {
type: "ImportDefaultSpecifier";
}
interface ImportNamespaceSpecifier extends BaseModuleSpecifier {
type: "ImportNamespaceSpecifier";
}
interface ExportNamedDeclaration extends BaseModuleDeclaration {
type: "ExportNamedDeclaration";
declaration?: Declaration$1 | null | undefined;
specifiers: ExportSpecifier[];
attributes: ImportAttribute[];
source?: Literal | null | undefined;
}
interface ExportSpecifier extends Omit {
type: "ExportSpecifier";
local: Identifier | Literal;
exported: Identifier | Literal;
}
interface ExportDefaultDeclaration extends BaseModuleDeclaration {
type: "ExportDefaultDeclaration";
declaration: MaybeNamedFunctionDeclaration | MaybeNamedClassDeclaration | Expression;
}
interface ExportAllDeclaration extends BaseModuleDeclaration {
type: "ExportAllDeclaration";
exported: Identifier | Literal | null;
attributes: ImportAttribute[];
source: Literal;
}
interface AwaitExpression extends BaseExpression {
type: "AwaitExpression";
argument: Expression;
}
//#endregion
//#region ../../node_modules/.pnpm/rollup@4.50.1/node_modules/rollup/dist/rollup.d.ts
declare module 'estree' {
export interface Decorator extends BaseNode {
type: 'Decorator';
expression: Expression;
}
interface PropertyDefinition {
decorators: undefined[];
}
interface MethodDefinition {
decorators: undefined[];
}
interface BaseClass {
decorators: undefined[];
}
}
// utils
type NullValue = null | undefined | void;
type MaybeArray = T | T[];
type MaybePromise = T | Promise;
type PartialNull = { [P in keyof T]: T[P] | null };
interface RollupError extends RollupLog {
name?: string | undefined;
stack?: string | undefined;
watchFiles?: string[] | undefined;
}
interface RollupLog {
binding?: string | undefined;
cause?: unknown | undefined;
code?: string | undefined;
exporter?: string | undefined;
frame?: string | undefined;
hook?: string | undefined;
id?: string | undefined;
ids?: string[] | undefined;
loc?: {
column: number;
file?: string | undefined;
line: number;
};
message: string;
meta?: any | undefined;
names?: string[] | undefined;
plugin?: string | undefined;
pluginCode?: unknown | undefined;
pos?: number | undefined;
reexporter?: string | undefined;
stack?: string | undefined;
url?: string | undefined;
}
type LogLevel$2 = 'warn' | 'info' | 'debug';
type LogLevelOption = LogLevel$2 | 'silent';
type SourceMapSegment$1 = [number] | [number, number, number, number] | [number, number, number, number, number];
interface ExistingDecodedSourceMap {
file?: string | undefined;
readonly mappings: SourceMapSegment$1[][];
names: string[];
sourceRoot?: string | undefined;
sources: string[];
sourcesContent?: string[] | undefined;
version: number;
x_google_ignoreList?: number[] | undefined;
}
interface ExistingRawSourceMap {
file?: string | undefined;
mappings: string;
names: string[];
sourceRoot?: string | undefined;
sources: string[];
sourcesContent?: string[] | undefined;
version: number;
x_google_ignoreList?: number[] | undefined;
}
type DecodedSourceMapOrMissing = {
missing: true;
plugin: string;
} | (ExistingDecodedSourceMap & {
missing?: false | undefined;
});
interface SourceMap$2 {
file: string;
mappings: string;
names: string[];
sources: string[];
sourcesContent?: string[] | undefined;
version: number;
debugId?: string | undefined;
toString(): string;
toUrl(): string;
}
type SourceMapInput$1 = ExistingRawSourceMap | string | null | {
mappings: '';
};
interface ModuleOptions {
attributes: Record;
meta: CustomPluginOptions;
moduleSideEffects: boolean | 'no-treeshake';
syntheticNamedExports: boolean | string;
}
interface SourceDescription extends Partial> {
ast?: ProgramNode | undefined;
code: string;
map?: SourceMapInput$1 | undefined;
}
interface TransformModuleJSON {
ast?: ProgramNode | undefined;
code: string; // note if plugins use new this.cache to opt-out auto transform cache
customTransformCache: boolean;
originalCode: string;
originalSourcemap: ExistingDecodedSourceMap | null;
sourcemapChain: DecodedSourceMapOrMissing[];
transformDependencies: string[];
}
interface ModuleJSON extends TransformModuleJSON, ModuleOptions {
ast: ProgramNode;
dependencies: string[];
id: string;
resolvedIds: ResolvedIdMap;
transformFiles: EmittedFile[] | undefined;
}
interface PluginCache {
delete(id: string): boolean;
get(id: string): T;
has(id: string): boolean;
set(id: string, value: T): void;
}
type LoggingFunction = (log: RollupLog | string | (() => RollupLog | string)) => void;
interface MinimalPluginContext {
debug: LoggingFunction;
error: (error: RollupError | string) => never;
info: LoggingFunction;
meta: PluginContextMeta;
warn: LoggingFunction;
}
interface EmittedAsset {
fileName?: string | undefined;
name?: string | undefined;
needsCodeReference?: boolean | undefined;
originalFileName?: string | null | undefined;
source?: string | Uint8Array | undefined;
type: 'asset';
}
interface EmittedChunk {
fileName?: string | undefined;
id: string;
implicitlyLoadedAfterOneOf?: string[] | undefined;
importer?: string | undefined;
name?: string | undefined;
preserveSignature?: PreserveEntrySignaturesOption | undefined;
type: 'chunk';
}
interface EmittedPrebuiltChunk {
code: string;
exports?: string[] | undefined;
fileName: string;
map?: SourceMap$2 | undefined;
sourcemapFileName?: string | undefined;
type: 'prebuilt-chunk';
}
type EmittedFile = EmittedAsset | EmittedChunk | EmittedPrebuiltChunk;
type EmitFile = (emittedFile: EmittedFile) => string;
interface ModuleInfo$1 extends ModuleOptions {
ast: ProgramNode | null;
code: string | null;
dynamicImporters: readonly string[];
dynamicallyImportedIdResolutions: readonly ResolvedId[];
dynamicallyImportedIds: readonly string[];
exportedBindings: Record | null;
exports: string[] | null;
hasDefaultExport: boolean | null;
id: string;
implicitlyLoadedAfterOneOf: readonly string[];
implicitlyLoadedBefore: readonly string[];
importedIdResolutions: readonly ResolvedId[];
importedIds: readonly string[];
importers: readonly string[];
isEntry: boolean;
isExternal: boolean;
isIncluded: boolean | null;
}
type GetModuleInfo = (moduleId: string) => ModuleInfo$1 | null;
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style -- this is an interface so that it can be extended by plugins
interface CustomPluginOptions {
[plugin: string]: any;
}
type LoggingFunctionWithPosition = (log: RollupLog | string | (() => RollupLog | string), pos?: number | {
column: number;
line: number;
}) => void;
type ParseAst = (input: string, options?: {
allowReturnOutsideFunction?: boolean;
jsx?: boolean;
}) => ProgramNode;
// declare AbortSignal here for environments without DOM lib or @types/node
declare global {
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
interface AbortSignal {}
}
interface PluginContext extends MinimalPluginContext {
addWatchFile: (id: string) => void;
cache: PluginCache;
debug: LoggingFunction;
emitFile: EmitFile;
error: (error: RollupError | string) => never;
fs: RollupFsModule;
getFileName: (fileReferenceId: string) => string;
getModuleIds: () => IterableIterator;
getModuleInfo: GetModuleInfo;
getWatchFiles: () => string[];
info: LoggingFunction;
load: (options: {
id: string;
resolveDependencies?: boolean;
} & Partial>) => Promise;
parse: ParseAst;
resolve: (source: string, importer?: string, options?: {
attributes?: Record;
custom?: CustomPluginOptions;
isEntry?: boolean;
skipSelf?: boolean;
}) => Promise;
setAssetSource: (assetReferenceId: string, source: string | Uint8Array) => void;
warn: LoggingFunction;
}
interface PluginContextMeta {
rollupVersion: string;
watchMode: boolean;
}
type StringOrRegExp = string | RegExp;
type StringFilter$1 = MaybeArray | {
include?: MaybeArray | undefined;
exclude?: MaybeArray | undefined;
};
interface HookFilter {
id?: StringFilter$1 | undefined;
code?: StringFilter$1 | undefined;
}
interface ResolvedId extends ModuleOptions {
external: boolean | 'absolute';
id: string;
resolvedBy: string;
}
type ResolvedIdMap = Record;
interface PartialResolvedId extends Partial> {
external?: boolean | 'absolute' | 'relative' | undefined;
id: string;
resolvedBy?: string | undefined;
}
type ResolveIdResult = string | NullValue | false | PartialResolvedId;
type ResolveIdHook = (this: PluginContext, source: string, importer: string | undefined, options: {
attributes: Record;
custom?: CustomPluginOptions;
isEntry: boolean;
}) => ResolveIdResult;
type ShouldTransformCachedModuleHook = (this: PluginContext, options: {
ast: ProgramNode;
code: string;
id: string;
meta: CustomPluginOptions;
moduleSideEffects: boolean | 'no-treeshake';
resolvedSources: ResolvedIdMap;
syntheticNamedExports: boolean | string;
}) => boolean | NullValue;
type IsExternal = (source: string, importer: string | undefined, isResolved: boolean) => boolean;
type HasModuleSideEffects = (id: string, external: boolean) => boolean;
type LoadResult = SourceDescription | string | NullValue;
type LoadHook = (this: PluginContext, id: string) => LoadResult;
interface TransformPluginContext extends PluginContext {
debug: LoggingFunctionWithPosition;
error: (error: RollupError | string, pos?: number | {
column: number;
line: number;
}) => never;
getCombinedSourcemap: () => SourceMap$2;
info: LoggingFunctionWithPosition;
warn: LoggingFunctionWithPosition;
}
type TransformResult$2 = string | NullValue | Partial;
type TransformHook = (this: TransformPluginContext, code: string, id: string) => TransformResult$2;
type ModuleParsedHook = (this: PluginContext, info: ModuleInfo$1) => void;
type RenderChunkHook = (this: PluginContext, code: string, chunk: RenderedChunk, options: NormalizedOutputOptions, meta: {
chunks: Record;
}) => {
code: string;
map?: SourceMapInput$1;
} | string | NullValue;
type ResolveDynamicImportHook = (this: PluginContext, specifier: string | AstNode, importer: string, options: {
attributes: Record;
}) => ResolveIdResult;
type ResolveImportMetaHook = (this: PluginContext, property: string | null, options: {
chunkId: string;
format: InternalModuleFormat;
moduleId: string;
}) => string | NullValue;
type ResolveFileUrlHook = (this: PluginContext, options: {
chunkId: string;
fileName: string;
format: InternalModuleFormat;
moduleId: string;
referenceId: string;
relativePath: string;
}) => string | NullValue;
type AddonHookFunction = (this: PluginContext, chunk: RenderedChunk) => string | Promise;
type AddonHook = string | AddonHookFunction;
type ChangeEvent = 'create' | 'update' | 'delete';
type WatchChangeHook = (this: PluginContext, id: string, change: {
event: ChangeEvent;
}) => void;
type OutputBundle = Record;
type PreRenderedChunkWithFileName = PreRenderedChunk & {
fileName: string;
};
interface ImportedInternalChunk {
type: 'internal';
fileName: string;
resolvedImportPath: string;
chunk: PreRenderedChunk;
}
interface ImportedExternalChunk {
type: 'external';
fileName: string;
resolvedImportPath: string;
}
type DynamicImportTargetChunk = ImportedInternalChunk | ImportedExternalChunk;
interface FunctionPluginHooks {
augmentChunkHash: (this: PluginContext, chunk: RenderedChunk) => string | void;
buildEnd: (this: PluginContext, error?: Error) => void;
buildStart: (this: PluginContext, options: NormalizedInputOptions) => void;
closeBundle: (this: PluginContext, error?: Error) => void;
closeWatcher: (this: PluginContext) => void;
generateBundle: (this: PluginContext, options: NormalizedOutputOptions, bundle: OutputBundle, isWrite: boolean) => void;
load: LoadHook;
moduleParsed: ModuleParsedHook;
onLog: (this: MinimalPluginContext, level: LogLevel$2, log: RollupLog) => boolean | NullValue;
options: (this: MinimalPluginContext, options: InputOptions) => InputOptions | NullValue;
outputOptions: (this: PluginContext, options: OutputOptions) => OutputOptions | NullValue;
renderChunk: RenderChunkHook;
renderDynamicImport: (this: PluginContext, options: {
customResolution: string | null;
format: InternalModuleFormat;
moduleId: string;
targetModuleId: string | null;
chunk: PreRenderedChunkWithFileName;
targetChunk: PreRenderedChunkWithFileName | null;
getTargetChunkImports: () => DynamicImportTargetChunk[] | null;
}) => {
left: string;
right: string;
} | NullValue;
renderError: (this: PluginContext, error?: Error) => void;
renderStart: (this: PluginContext, outputOptions: NormalizedOutputOptions, inputOptions: NormalizedInputOptions) => void;
resolveDynamicImport: ResolveDynamicImportHook;
resolveFileUrl: ResolveFileUrlHook;
resolveId: ResolveIdHook;
resolveImportMeta: ResolveImportMetaHook;
shouldTransformCachedModule: ShouldTransformCachedModuleHook;
transform: TransformHook;
watchChange: WatchChangeHook;
writeBundle: (this: PluginContext, options: NormalizedOutputOptions, bundle: OutputBundle) => void;
}
type OutputPluginHooks = 'augmentChunkHash' | 'generateBundle' | 'outputOptions' | 'renderChunk' | 'renderDynamicImport' | 'renderError' | 'renderStart' | 'resolveFileUrl' | 'resolveImportMeta' | 'writeBundle';
type SyncPluginHooks = 'augmentChunkHash' | 'onLog' | 'outputOptions' | 'renderDynamicImport' | 'resolveFileUrl' | 'resolveImportMeta';
type AsyncPluginHooks = Exclude;
type FirstPluginHooks = 'load' | 'renderDynamicImport' | 'resolveDynamicImport' | 'resolveFileUrl' | 'resolveId' | 'resolveImportMeta' | 'shouldTransformCachedModule';
type SequentialPluginHooks = 'augmentChunkHash' | 'generateBundle' | 'onLog' | 'options' | 'outputOptions' | 'renderChunk' | 'transform';
type ParallelPluginHooks = Exclude;
type AddonHooks = 'banner' | 'footer' | 'intro' | 'outro';
type MakeAsync = Function_ extends ((this: infer This, ...parameters: infer Arguments) => infer Return) ? (this: This, ...parameters: Arguments) => Return | Promise : never; // eslint-disable-next-line @typescript-eslint/no-empty-object-type
type ObjectHook = T | ({
handler: T;
order?: 'pre' | 'post' | null;
} & O);
type HookFilterExtension = K extends 'transform' ? {
filter?: HookFilter | undefined;
} : K extends 'load' ? {
filter?: Pick | undefined;
} : K extends 'resolveId' ? {
filter?: {
id?: StringFilter$1 | undefined;
};
} | undefined : // eslint-disable-next-line @typescript-eslint/no-empty-object-type
{};
type PluginHooks = { [K in keyof FunctionPluginHooks]: ObjectHook : FunctionPluginHooks[K], // eslint-disable-next-line @typescript-eslint/no-empty-object-type
HookFilterExtension & (K extends ParallelPluginHooks ? {
sequential?: boolean;
} : {})> };
interface OutputPlugin extends Partial<{ [K in OutputPluginHooks]: PluginHooks[K] }>, Partial>> {
cacheKey?: string | undefined;
name: string;
version?: string | undefined;
}
interface Plugin$3 extends OutputPlugin, Partial {
// for inter-plugin communication
api?: A | undefined;
}
type JsxPreset = 'react' | 'react-jsx' | 'preserve' | 'preserve-react';
type NormalizedJsxOptions = NormalizedJsxPreserveOptions | NormalizedJsxClassicOptions | NormalizedJsxAutomaticOptions;
interface NormalizedJsxPreserveOptions {
factory: string | null;
fragment: string | null;
importSource: string | null;
mode: 'preserve';
}
interface NormalizedJsxClassicOptions {
factory: string;
fragment: string;
importSource: string | null;
mode: 'classic';
}
interface NormalizedJsxAutomaticOptions {
factory: string;
importSource: string | null;
jsxImportSource: string;
mode: 'automatic';
}
type JsxOptions = Partial & {
preset?: JsxPreset | undefined;
};
type TreeshakingPreset = 'smallest' | 'safest' | 'recommended';
interface NormalizedTreeshakingOptions {
annotations: boolean;
correctVarValueBeforeDeclaration: boolean;
manualPureFunctions: readonly string[];
moduleSideEffects: HasModuleSideEffects;
propertyReadSideEffects: boolean | 'always';
tryCatchDeoptimization: boolean;
unknownGlobalSideEffects: boolean;
}
interface TreeshakingOptions extends Partial> {
moduleSideEffects?: ModuleSideEffectsOption | undefined;
preset?: TreeshakingPreset | undefined;
}
interface ManualChunkMeta {
getModuleIds: () => IterableIterator;
getModuleInfo: GetModuleInfo;
}
type GetManualChunk = (id: string, meta: ManualChunkMeta) => string | NullValue;
type ExternalOption = (string | RegExp)[] | string | RegExp | ((source: string, importer: string | undefined, isResolved: boolean) => boolean | NullValue);
type GlobalsOption = Record | ((name: string) => string);
type InputOption = string | string[] | Record;
type ManualChunksOption = Record | GetManualChunk;
type LogHandlerWithDefault = (level: LogLevel$2, log: RollupLog, defaultHandler: LogOrStringHandler) => void;
type LogOrStringHandler = (level: LogLevel$2 | 'error', log: RollupLog | string) => void;
type LogHandler = (level: LogLevel$2, log: RollupLog) => void;
type ModuleSideEffectsOption = boolean | 'no-external' | string[] | HasModuleSideEffects;
type PreserveEntrySignaturesOption = false | 'strict' | 'allow-extension' | 'exports-only';
type SourcemapPathTransformOption = (relativeSourcePath: string, sourcemapPath: string) => string;
type SourcemapIgnoreListOption = (relativeSourcePath: string, sourcemapPath: string) => boolean;
type InputPluginOption = MaybePromise;
interface InputOptions {
cache?: boolean | RollupCache | undefined;
context?: string | undefined;
experimentalCacheExpiry?: number | undefined;
experimentalLogSideEffects?: boolean | undefined;
external?: ExternalOption | undefined;
fs?: RollupFsModule | undefined;
input?: InputOption | undefined;
jsx?: false | JsxPreset | JsxOptions | undefined;
logLevel?: LogLevelOption | undefined;
makeAbsoluteExternalsRelative?: boolean | 'ifRelativeSource' | undefined;
maxParallelFileOps?: number | undefined;
moduleContext?: ((id: string) => string | NullValue) | Record | undefined;
onLog?: LogHandlerWithDefault | undefined;
onwarn?: WarningHandlerWithDefault | undefined;
perf?: boolean | undefined;
plugins?: InputPluginOption | undefined;
preserveEntrySignatures?: PreserveEntrySignaturesOption | undefined;
preserveSymlinks?: boolean | undefined;
shimMissingExports?: boolean | undefined;
strictDeprecations?: boolean | undefined;
treeshake?: boolean | TreeshakingPreset | TreeshakingOptions | undefined;
watch?: WatcherOptions | false | undefined;
}
interface NormalizedInputOptions {
cache: false | undefined | RollupCache;
context: string;
experimentalCacheExpiry: number;
experimentalLogSideEffects: boolean;
external: IsExternal;
fs: RollupFsModule;
input: string[] | Record;
jsx: false | NormalizedJsxOptions;
logLevel: LogLevelOption;
makeAbsoluteExternalsRelative: boolean | 'ifRelativeSource';
maxParallelFileOps: number;
moduleContext: (id: string) => string;
onLog: LogHandler;
perf: boolean;
plugins: Plugin$3[];
preserveEntrySignatures: PreserveEntrySignaturesOption;
preserveSymlinks: boolean;
shimMissingExports: boolean;
strictDeprecations: boolean;
treeshake: false | NormalizedTreeshakingOptions;
}
type InternalModuleFormat = 'amd' | 'cjs' | 'es' | 'iife' | 'system' | 'umd';
type ImportAttributesKey = 'with' | 'assert';
type ModuleFormat = InternalModuleFormat | 'commonjs' | 'esm' | 'module' | 'systemjs';
type GeneratedCodePreset = 'es5' | 'es2015';
interface NormalizedGeneratedCodeOptions {
arrowFunctions: boolean;
constBindings: boolean;
objectShorthand: boolean;
reservedNamesAsProps: boolean;
symbols: boolean;
}
interface GeneratedCodeOptions extends Partial {
preset?: GeneratedCodePreset | undefined;
}
type OptionsPaths = Record | ((id: string) => string);
type InteropType = 'compat' | 'auto' | 'esModule' | 'default' | 'defaultOnly';
type GetInterop = (id: string | null) => InteropType;
type AmdOptions = ({
autoId?: false | undefined;
id: string;
} | {
autoId: true;
basePath?: string | undefined;
id?: undefined | undefined;
} | {
autoId?: false | undefined;
id?: undefined | undefined;
}) & {
define?: string | undefined;
forceJsExtensionForImports?: boolean | undefined;
};
type NormalizedAmdOptions = ({
autoId: false;
id?: string | undefined;
} | {
autoId: true;
basePath: string;
}) & {
define: string;
forceJsExtensionForImports: boolean;
};
type AddonFunction = (chunk: RenderedChunk) => string | Promise;
type OutputPluginOption = MaybePromise;
type HashCharacters = 'base64' | 'base36' | 'hex';
interface OutputOptions {
amd?: AmdOptions | undefined;
assetFileNames?: string | ((chunkInfo: PreRenderedAsset) => string) | undefined;
banner?: string | AddonFunction | undefined;
chunkFileNames?: string | ((chunkInfo: PreRenderedChunk) => string) | undefined;
compact?: boolean | undefined; // only required for bundle.write
dir?: string | undefined;
dynamicImportInCjs?: boolean | undefined;
entryFileNames?: string | ((chunkInfo: PreRenderedChunk) => string) | undefined;
esModule?: boolean | 'if-default-prop' | undefined;
experimentalMinChunkSize?: number | undefined;
exports?: 'default' | 'named' | 'none' | 'auto' | undefined;
extend?: boolean | undefined;
/** @deprecated Use "externalImportAttributes" instead. */
externalImportAssertions?: boolean | undefined;
externalImportAttributes?: boolean | undefined;
externalLiveBindings?: boolean | undefined; // only required for bundle.write
file?: string | undefined;
footer?: string | AddonFunction | undefined;
format?: ModuleFormat | undefined;
freeze?: boolean | undefined;
generatedCode?: GeneratedCodePreset | GeneratedCodeOptions | undefined;
globals?: GlobalsOption | undefined;
hashCharacters?: HashCharacters | undefined;
hoistTransitiveImports?: boolean | undefined;
importAttributesKey?: ImportAttributesKey | undefined;
indent?: string | boolean | undefined;
inlineDynamicImports?: boolean | undefined;
interop?: InteropType | GetInterop | undefined;
intro?: string | AddonFunction | undefined;
manualChunks?: ManualChunksOption | undefined;
minifyInternalExports?: boolean | undefined;
name?: string | undefined;
noConflict?: boolean | undefined;
outro?: string | AddonFunction | undefined;
paths?: OptionsPaths | undefined;
plugins?: OutputPluginOption | undefined;
preserveModules?: boolean | undefined;
preserveModulesRoot?: string | undefined;
reexportProtoFromExternal?: boolean | undefined;
sanitizeFileName?: boolean | ((fileName: string) => string) | undefined;
sourcemap?: boolean | 'inline' | 'hidden' | undefined;
sourcemapBaseUrl?: string | undefined;
sourcemapExcludeSources?: boolean | undefined;
sourcemapFile?: string | undefined;
sourcemapFileNames?: string | ((chunkInfo: PreRenderedChunk) => string) | undefined;
sourcemapIgnoreList?: boolean | SourcemapIgnoreListOption | undefined;
sourcemapPathTransform?: SourcemapPathTransformOption | undefined;
sourcemapDebugIds?: boolean | undefined;
strict?: boolean | undefined;
systemNullSetters?: boolean | undefined;
validate?: boolean | undefined;
virtualDirname?: string | undefined;
}
interface NormalizedOutputOptions {
amd: NormalizedAmdOptions;
assetFileNames: string | ((chunkInfo: PreRenderedAsset) => string);
banner: AddonFunction;
chunkFileNames: string | ((chunkInfo: PreRenderedChunk) => string);
compact: boolean;
dir: string | undefined;
dynamicImportInCjs: boolean;
entryFileNames: string | ((chunkInfo: PreRenderedChunk) => string);
esModule: boolean | 'if-default-prop';
experimentalMinChunkSize: number;
exports: 'default' | 'named' | 'none' | 'auto';
extend: boolean;
/** @deprecated Use "externalImportAttributes" instead. */
externalImportAssertions: boolean;
externalImportAttributes: boolean;
externalLiveBindings: boolean;
file: string | undefined;
footer: AddonFunction;
format: InternalModuleFormat;
freeze: boolean;
generatedCode: NormalizedGeneratedCodeOptions;
globals: GlobalsOption;
hashCharacters: HashCharacters;
hoistTransitiveImports: boolean;
importAttributesKey: ImportAttributesKey;
indent: true | string;
inlineDynamicImports: boolean;
interop: GetInterop;
intro: AddonFunction;
manualChunks: ManualChunksOption;
minifyInternalExports: boolean;
name: string | undefined;
noConflict: boolean;
outro: AddonFunction;
paths: OptionsPaths;
plugins: OutputPlugin[];
preserveModules: boolean;
preserveModulesRoot: string | undefined;
reexportProtoFromExternal: boolean;
sanitizeFileName: (fileName: string) => string;
sourcemap: boolean | 'inline' | 'hidden';
sourcemapBaseUrl: string | undefined;
sourcemapExcludeSources: boolean;
sourcemapFile: string | undefined;
sourcemapFileNames: string | ((chunkInfo: PreRenderedChunk) => string) | undefined;
sourcemapIgnoreList: SourcemapIgnoreListOption;
sourcemapPathTransform: SourcemapPathTransformOption | undefined;
sourcemapDebugIds: boolean;
strict: boolean;
systemNullSetters: boolean;
validate: boolean;
virtualDirname: string;
}
type WarningHandlerWithDefault = (warning: RollupLog, defaultHandler: LoggingFunction) => void;
type SerializedTimings = Record;
interface PreRenderedAsset {
/** @deprecated Use "names" instead. */
name: string | undefined;
names: string[];
/** @deprecated Use "originalFileNames" instead. */
originalFileName: string | null;
originalFileNames: string[];
source: string | Uint8Array;
type: 'asset';
}
interface OutputAsset extends PreRenderedAsset {
fileName: string;
needsCodeReference: boolean;
}
interface RenderedModule {
readonly code: string | null;
originalLength: number;
removedExports: string[];
renderedExports: string[];
renderedLength: number;
}
interface PreRenderedChunk {
exports: string[];
facadeModuleId: string | null;
isDynamicEntry: boolean;
isEntry: boolean;
isImplicitEntry: boolean;
moduleIds: string[];
name: string;
type: 'chunk';
}
interface RenderedChunk extends PreRenderedChunk {
dynamicImports: string[];
fileName: string;
implicitlyLoadedBefore: string[];
importedBindings: Record;
imports: string[];
modules: Record;
referencedFiles: string[];
}
interface OutputChunk extends RenderedChunk {
code: string;
map: SourceMap$2 | null;
sourcemapFileName: string | null;
preliminaryFileName: string;
}
type SerializablePluginCache = Record;
interface RollupCache {
modules: ModuleJSON[];
plugins?: Record;
}
interface RollupOutput {
output: [OutputChunk, ...(OutputChunk | OutputAsset)[]];
}
interface RollupBuild {
cache: RollupCache | undefined;
close: () => Promise;
closed: boolean;
[Symbol.asyncDispose](): Promise;
generate: (outputOptions: OutputOptions) => Promise;
getTimings?: (() => SerializedTimings) | undefined;
watchFiles: string[];
write: (options: OutputOptions) => Promise;
}
interface RollupOptions extends InputOptions {
// This is included for compatibility with config files but ignored by rollup.rollup
output?: OutputOptions | OutputOptions[] | undefined;
}
interface ChokidarOptions {
alwaysStat?: boolean | undefined;
atomic?: boolean | number | undefined;
awaitWriteFinish?: {
pollInterval?: number | undefined;
stabilityThreshold?: number | undefined;
} | boolean | undefined;
binaryInterval?: number | undefined;
cwd?: string | undefined;
depth?: number | undefined;
disableGlobbing?: boolean | undefined;
followSymlinks?: boolean | undefined;
ignoreInitial?: boolean | undefined;
ignorePermissionErrors?: boolean | undefined;
ignored?: any | undefined;
interval?: number | undefined;
persistent?: boolean | undefined;
useFsEvents?: boolean | undefined;
usePolling?: boolean | undefined;
}
interface WatcherOptions {
allowInputInsideOutputPath?: boolean | undefined;
buildDelay?: number | undefined;
chokidar?: ChokidarOptions | undefined;
clearScreen?: boolean | undefined;
exclude?: string | RegExp | (string | RegExp)[] | undefined;
include?: string | RegExp | (string | RegExp)[] | undefined;
skipWrite?: boolean | undefined;
onInvalidate?: ((id: string) => void) | undefined;
}
type AwaitedEventListener any>, K extends keyof T> = (...parameters: Parameters) => void | Promise;
interface AwaitingEventEmitter any>> {
close(): Promise;
emit(event: K, ...parameters: Parameters): Promise;
/**
* Removes an event listener.
*/
off(event: K, listener: AwaitedEventListener): this;
/**
* Registers an event listener that will be awaited before Rollup continues.
* All listeners will be awaited in parallel while rejections are tracked via
* Promise.all.
*/
on(event: K, listener: AwaitedEventListener): this;
/**
* Registers an event listener that will be awaited before Rollup continues.
* All listeners will be awaited in parallel while rejections are tracked via
* Promise.all.
* Listeners are removed automatically when removeListenersForCurrentRun is
* called, which happens automatically after each run.
*/
onCurrentRun(event: K, listener: (...parameters: Parameters) => Promise>): this;
removeAllListeners(): this;
removeListenersForCurrentRun(): this;
}
type RollupWatcherEvent = {
code: 'START';
} | {
code: 'BUNDLE_START';
input?: InputOption | undefined;
output: readonly string[];
} | {
code: 'BUNDLE_END';
duration: number;
input?: InputOption | undefined;
output: readonly string[];
result: RollupBuild;
} | {
code: 'END';
} | {
code: 'ERROR';
error: RollupError;
result: RollupBuild | null;
};
type RollupWatcher = AwaitingEventEmitter<{
change: (id: string, change: {
event: ChangeEvent;
}) => void;
close: () => void;
event: (event: RollupWatcherEvent) => void;
restart: () => void;
}>;
interface AstNodeLocation {
end: number;
start: number;
}
type OmittedEstreeKeys = 'loc' | 'range' | 'leadingComments' | 'trailingComments' | 'innerComments' | 'comments';
type RollupAstNode = Omit & AstNodeLocation;
type ProgramNode = RollupAstNode;
type AstNode = RollupAstNode;
interface RollupFsModule {
appendFile(path: string, data: string | Uint8Array, options?: {
encoding?: BufferEncoding$1 | null;
mode?: string | number;
flag?: string | number;
}): Promise;
copyFile(source: string, destination: string, mode?: string | number): Promise;
mkdir(path: string, options?: {
recursive?: boolean;
mode?: string | number;
}): Promise;
mkdtemp(prefix: string): Promise;
readdir(path: string, options?: {
withFileTypes?: false;
}): Promise;
readdir(path: string, options?: {
withFileTypes: true;
}): Promise;
readFile(path: string, options?: {
encoding?: null;
flag?: string | number;
signal?: AbortSignal;
}): Promise;
readFile(path: string, options?: {
encoding: BufferEncoding$1;
flag?: string | number;
signal?: AbortSignal;
}): Promise;
realpath(path: string): Promise;
rename(oldPath: string, newPath: string): Promise;
rmdir(path: string, options?: {
recursive?: boolean;
}): Promise;
stat(path: string): Promise;
lstat(path: string): Promise;
unlink(path: string): Promise;
writeFile(path: string, data: string | Uint8Array, options?: {
encoding?: BufferEncoding$1 | null;
mode?: string | number;
flag?: string | number;
}): Promise;
}
type BufferEncoding$1 = 'ascii' | 'utf8' | 'utf16le' | 'ucs2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex';
interface RollupDirectoryEntry {
isFile(): boolean;
isDirectory(): boolean;
isSymbolicLink(): boolean;
name: string;
}
interface RollupFileStats {
isFile(): boolean;
isDirectory(): boolean;
isSymbolicLink(): boolean;
size: number;
mtime: Date;
ctime: Date;
atime: Date;
birthtime: Date;
}
//#endregion
//#region ../../node_modules/.pnpm/esbuild@0.25.9/node_modules/esbuild/lib/main.d.ts
type Platform = 'browser' | 'node' | 'neutral';
type Format = 'iife' | 'cjs' | 'esm';
type Loader = 'base64' | 'binary' | 'copy' | 'css' | 'dataurl' | 'default' | 'empty' | 'file' | 'js' | 'json' | 'jsx' | 'local-css' | 'text' | 'ts' | 'tsx';
type LogLevel$1 = 'verbose' | 'debug' | 'info' | 'warning' | 'error' | 'silent';
type Charset = 'ascii' | 'utf8';
type Drop = 'console' | 'debugger';
type AbsPaths = 'code' | 'log' | 'metafile';
interface CommonOptions {
/** Documentation: https://esbuild.github.io/api/#sourcemap */
sourcemap?: boolean | 'linked' | 'inline' | 'external' | 'both';
/** Documentation: https://esbuild.github.io/api/#legal-comments */
legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'external';
/** Documentation: https://esbuild.github.io/api/#source-root */
sourceRoot?: string;
/** Documentation: https://esbuild.github.io/api/#sources-content */
sourcesContent?: boolean;
/** Documentation: https://esbuild.github.io/api/#format */
format?: Format;
/** Documentation: https://esbuild.github.io/api/#global-name */
globalName?: string;
/** Documentation: https://esbuild.github.io/api/#target */
target?: string | string[];
/** Documentation: https://esbuild.github.io/api/#supported */
supported?: Record;
/** Documentation: https://esbuild.github.io/api/#platform */
platform?: Platform;
/** Documentation: https://esbuild.github.io/api/#mangle-props */
mangleProps?: RegExp;
/** Documentation: https://esbuild.github.io/api/#mangle-props */
reserveProps?: RegExp;
/** Documentation: https://esbuild.github.io/api/#mangle-props */
mangleQuoted?: boolean;
/** Documentation: https://esbuild.github.io/api/#mangle-props */
mangleCache?: Record;
/** Documentation: https://esbuild.github.io/api/#drop */
drop?: Drop[];
/** Documentation: https://esbuild.github.io/api/#drop-labels */
dropLabels?: string[];
/** Documentation: https://esbuild.github.io/api/#minify */
minify?: boolean;
/** Documentation: https://esbuild.github.io/api/#minify */
minifyWhitespace?: boolean;
/** Documentation: https://esbuild.github.io/api/#minify */
minifyIdentifiers?: boolean;
/** Documentation: https://esbuild.github.io/api/#minify */
minifySyntax?: boolean;
/** Documentation: https://esbuild.github.io/api/#line-limit */
lineLimit?: number;
/** Documentation: https://esbuild.github.io/api/#charset */
charset?: Charset;
/** Documentation: https://esbuild.github.io/api/#tree-shaking */
treeShaking?: boolean;
/** Documentation: https://esbuild.github.io/api/#ignore-annotations */
ignoreAnnotations?: boolean;
/** Documentation: https://esbuild.github.io/api/#jsx */
jsx?: 'transform' | 'preserve' | 'automatic';
/** Documentation: https://esbuild.github.io/api/#jsx-factory */
jsxFactory?: string;
/** Documentation: https://esbuild.github.io/api/#jsx-fragment */
jsxFragment?: string;
/** Documentation: https://esbuild.github.io/api/#jsx-import-source */
jsxImportSource?: string;
/** Documentation: https://esbuild.github.io/api/#jsx-development */
jsxDev?: boolean;
/** Documentation: https://esbuild.github.io/api/#jsx-side-effects */
jsxSideEffects?: boolean;
/** Documentation: https://esbuild.github.io/api/#define */
define?: {
[key: string]: string;
};
/** Documentation: https://esbuild.github.io/api/#pure */
pure?: string[];
/** Documentation: https://esbuild.github.io/api/#keep-names */
keepNames?: boolean;
/** Documentation: https://esbuild.github.io/api/#abs-paths */
absPaths?: AbsPaths[];
/** Documentation: https://esbuild.github.io/api/#color */
color?: boolean;
/** Documentation: https://esbuild.github.io/api/#log-level */
logLevel?: LogLevel$1;
/** Documentation: https://esbuild.github.io/api/#log-limit */
logLimit?: number;
/** Documentation: https://esbuild.github.io/api/#log-override */
logOverride?: Record;
/** Documentation: https://esbuild.github.io/api/#tsconfig-raw */
tsconfigRaw?: string | TsconfigRaw;
}
interface TsconfigRaw {
compilerOptions?: {
alwaysStrict?: boolean;
baseUrl?: string;
experimentalDecorators?: boolean;
importsNotUsedAsValues?: 'remove' | 'preserve' | 'error';
jsx?: 'preserve' | 'react-native' | 'react' | 'react-jsx' | 'react-jsxdev';
jsxFactory?: string;
jsxFragmentFactory?: string;
jsxImportSource?: string;
paths?: Record