File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import { encode } from 'base64-arraybuffer';
1010
1111import  {  patch  }  from  '../../utils' ; 
1212
13- import  type  {  recordOptions  }  from  '../../types' ; 
13+ import  type  {  recordOptions ,   assetStatus  }  from  '../../types' ; 
1414import  {  isAttributeCapturable ,  getSourcesFromSrcset  }  from  'rrweb-snapshot' ; 
1515
1616export  default  class  AssetManager  { 
@@ -126,9 +126,7 @@ export default class AssetManager {
126126    } 
127127  } 
128128
129-   public  capture ( asset : asset ) : { 
130-     status : 'capturing'  |  'captured'  |  'error'  |  'refused' ; 
131-   }  { 
129+   public  capture ( asset : asset ) : assetStatus  { 
132130    if  ( asset . attr  ===  'srcset' )  { 
133131       getSourcesFromSrcset ( asset . value ) . forEach ( ( url )  =>  { 
134132        this . captureUrl ( url ) ; 
@@ -138,9 +136,7 @@ export default class AssetManager {
138136    } 
139137  } 
140138
141-   public  captureUrl ( url ) : { 
142-     status : 'capturing'  |  'captured'  |  'error'  |  'refused' ; 
143-   }  { 
139+   public  captureUrl ( url ) : assetStatus  { 
144140    if  ( this . shouldIgnore ( url ) )  return  {  status : 'refused'  } ; 
145141
146142    if  ( this . capturedURLs . has ( url ) )  { 
Original file line number Diff line number Diff line change @@ -226,3 +226,11 @@ export type CrossOriginIframeMessageEvent =
226226  MessageEvent < CrossOriginIframeMessageEventContent > ; 
227227
228228export  type  ErrorHandler  =  ( error : unknown )  =>  void   |  boolean ; 
229+ 
230+ export  type  assetStatus  =  { 
231+   status :
232+     |  'capturing' 
233+     |  'captured' 
234+     |  'error' 
235+     |  'refused' 
236+ } ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments