vike
Version:
The Framework *You* Control - Next.js & Nuxt alternative for unprecedented flexibility and dependability.
36 lines (35 loc) • 2.03 kB
TypeScript
export { getGlobalContext };
export { getGlobalContextSync };
export { createGetGlobalContextClient };
export type GlobalContextClientInternalShared = GlobalContextClientInternal | GlobalContextClientInternalWithServerRouting;
import { type GlobalContextBase } from '../../shared/createGlobalContextShared.js';
import type { GlobalContextClientInternal } from '../runtime-client-routing/globalContext.js';
import type { GlobalContextClientInternalWithServerRouting } from '../runtime-server-routing/globalContext.js';
declare function createGetGlobalContextClient<GlobalContextAddendum extends object>(virtualFileExports: unknown, isClientRouting: boolean, addGlobalContext?: (globalContext: GlobalContextBase) => Promise<GlobalContextAddendum>): () => Promise<{
isGlobalContext: true;
_isOriginalObject: true;
_virtualFileExports: unknown;
_pageFilesAll: import("../../shared/getPageFiles.js").PageFile[];
_pageConfigs: import("../../types/PageConfig.js").PageConfigRuntime[];
_pageConfigGlobal: import("../../types/PageConfig.js").PageConfigGlobalRuntime;
_allPageIds: string[];
_vikeConfigPublicGlobal: {
config: import("../../types/index.js").ConfigResolved;
_source: import("../../shared/page-configs/resolveVikeConfigPublic.js").Source;
_sources: import("../../shared/page-configs/resolveVikeConfigPublic.js").Sources;
_from: import("../../shared/page-configs/resolveVikeConfigPublic.js").From;
};
config: import("../../types/index.js").ConfigResolved;
pages: {
[k: string]: import("../../shared/page-configs/resolveVikeConfigPublic.js").VikeConfigPublicPageEager;
};
} & Awaited<{
/**
* Whether the environment is client-side or server-side / pre-rendering.
*
* We recommend using `import.meta.env.SSR` instead, see https://vike.dev/globalContext
*/
isClientSide: true;
} & Awaited<GlobalContextAddendum>>>;
declare function getGlobalContext(): Promise<never>;
declare function getGlobalContextSync(): never;