diff --git a/packages/nextjs/src/index.types.ts b/packages/nextjs/src/index.types.ts index 7c92fecd7834..842e92fe8eaf 100644 --- a/packages/nextjs/src/index.types.ts +++ b/packages/nextjs/src/index.types.ts @@ -151,3 +151,5 @@ export declare const openFeatureIntegration: typeof clientSdk.openFeatureIntegra export declare const OpenFeatureIntegrationHook: typeof clientSdk.OpenFeatureIntegrationHook; export declare const statsigIntegration: typeof clientSdk.statsigIntegration; export declare const unleashIntegration: typeof clientSdk.unleashIntegration; + +export declare const captureRouterTransitionStart: typeof clientSdk.captureRouterTransitionStart; diff --git a/packages/nextjs/src/server/index.ts b/packages/nextjs/src/server/index.ts index 0483ab6448ff..df6c1e7398c9 100644 --- a/packages/nextjs/src/server/index.ts +++ b/packages/nextjs/src/server/index.ts @@ -93,6 +93,13 @@ export function showReportDialog(): void { return; } +/** + * Noop on the server - this is a client-only API to capture Next.js router transitions. + */ +export function captureRouterTransitionStart(_href: string, _navigationType: string): void { + return; +} + /** * Returns the runtime configuration for the SDK based on the environment. * When running on OpenNext/Cloudflare, returns cloudflare runtime config.