@@ -10,6 +10,8 @@ import { CachedFetchValue } from "next/dist/server/response-cache";
1010import type { OutgoingHttpHeaders } from "http" ;
1111import { getTagsFromHeaders } from "./helpers/getTagsFromHeaders" ;
1212
13+ type CacheHandlerType = typeof import ( '../handlers/next-15-cache-handler' ) . Next15CacheHandler ;
14+
1315type NextRouteMetadata = {
1416 status : number | undefined ;
1517 headers : OutgoingHttpHeaders | undefined ;
@@ -80,7 +82,7 @@ export type RegisterInitialCacheOptions = {
8082 *
8183 */
8284export async function registerInitialCache (
83- CacheHandler : CacheHandler ,
85+ CacheHandler : CacheHandlerType ,
8486 options : RegisterInitialCacheOptions = { } ,
8587) {
8688 const debug = typeof process . env . NEXT_PRIVATE_DEBUG_CACHE !== "undefined" ;
@@ -125,11 +127,11 @@ export async function registerInitialCache(
125127 dev : process . env . NODE_ENV === "development" ,
126128 } ;
127129
128- let cacheHandler : CacheHandler ;
130+ let cacheHandler : InstanceType < CacheHandlerType > ;
129131
130132 try {
131- cacheHandler = new Next15CacheHandler (
132- context as ConstructorParameters < typeof Next15CacheHandler > [ 0 ] ,
133+ cacheHandler = new CacheHandler (
134+ context as ConstructorParameters < typeof CacheHandler > [ 0 ] ,
133135 ) ;
134136 } catch ( error ) {
135137 if ( debug ) {
0 commit comments