File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed 
packages/open-next/src/types Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -54,15 +54,29 @@ export type CachedFile =
5454      meta ?: Meta ; 
5555    } ; 
5656
57- export  type  FetchCache  =  Object ; 
57+ // type taken from: https://github.com/vercel/next.js/blob/9a1cd356/packages/next/src/server/response-cache/types.ts#L26-L38 
58+ export  type  CachedFetchValue  =  { 
59+   kind : "FETCH" ; 
60+   data : { 
61+     headers : {  [ k : string ] : string  } ; 
62+     body : string ; 
63+     url : string ; 
64+     status ?: number ; 
65+     // field used by older versions of Next.js (see: https://github.com/vercel/next.js/blob/fda1ecc/packages/next/src/server/response-cache/types.ts#L23) 
66+     tags ?: string [ ] ; 
67+   } ; 
68+   // tags are only present with file-system-cache 
69+   // fetch cache stores tags outside of cache entry 
70+   tags ?: string [ ] ; 
71+ } ; 
5872
5973export  type  WithLastModified < T >  =  { 
6074  lastModified ?: number ; 
6175  value ?: T ; 
6276} ; 
6377
6478export  type  CacheValue < IsFetch  extends  boolean >  =  ( IsFetch  extends  true 
65-   ? FetchCache 
79+   ? Partial < CachedFetchValue > 
6680  : CachedFile )  &  {  revalidate ?: number  |  false  } ; 
6781
6882export  type  IncrementalCache  =  { 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments