declare class InertiaPlugin { private _namespaces; addNamespace(namespace: string, resolver: PageResolver | PageResolver[]): this; get namespaces(): Record | PageResolver[]>[]; } declare namespace __runtime_plugin { export { InertiaPlugin as default, }; } declare global { var InertiaPlugin: InstanceType; } interface Options { /** * Current work directory. * * @default process.cwd() */ cwd?: string; /** * Define namespace mapping. * * @default [] */ namespaces?: Namespaces; /** * Namespace separator. * * @default '::' */ separator?: string; /** * Module extensions. * * vite: * @type {string|string[]} * @default 'vue' * * webpack: * @type {string} * @default '' */ extensions?: string | string[]; /** * Use `import()` to load pages for webpack, default is using `require()`. * Only for webpack. * * @default false */ import?: boolean; /** * Enable SSR mode. * * @default false */ ssr?: boolean; } declare type ResolvedOptions = Required> & { /** * Module extensions. */ extensions: string[]; }; declare type PageResolver = (name: string) => T | Promise; declare type Namespace = Record; declare type ResolvedNamespace = Record; interface NamespacesArgs { npm(pkg: string, dir: string): Namespace; composer(pkg: string, dir: string): Namespace; } declare type Namespaces = Namespace[] | ((args: NamespacesArgs) => Namespace[]); export { Namespace, Namespaces, NamespacesArgs, Options, PageResolver, ResolvedNamespace, ResolvedOptions };