@@ -10,8 +10,8 @@ import type {
1010  FrameLocator , 
1111  LaunchOptions , 
1212  Page , 
13+   CDPSession  as  PlaywrightCDPSession , 
1314}  from  'playwright' 
14- import  type  {  Protocol  }  from  'playwright-core/types/protocol' 
1515import  type  {  SourceMap  }  from  'rollup' 
1616import  type  {  ResolvedConfig  }  from  'vite' 
1717import  type  { 
@@ -570,6 +570,8 @@ type PWScreenshotOptions = NonNullable<Parameters<Page['screenshot']>[0]>
570570type  PWSelectOptions  =  NonNullable < Parameters < Page [ 'selectOption' ] > [ 2 ] > 
571571type  PWDragAndDropOptions  =  NonNullable < Parameters < Page [ 'dragAndDrop' ] > [ 2 ] > 
572572type  PWSetInputFiles  =  NonNullable < Parameters < Page [ 'setInputFiles' ] > [ 2 ] > 
573+ // Must be re-aliased here or rollup-plugin-dts removes the import alias and you end up with a circular reference 
574+ type  PWCDPSession  =  PlaywrightCDPSession 
573575
574576declare  module 'vitest/browser'  { 
575577  export  interface  UserEventHoverOptions  extends  PWHoverOptions  { } 
@@ -585,22 +587,5 @@ declare module 'vitest/browser' {
585587    mask ?: ReadonlyArray < Element  |  Locator >  |  undefined 
586588  } 
587589
588-   export  interface  CDPSession  { 
589-     send < T  extends  keyof  Protocol . CommandParameters > ( 
590-       method : T , 
591-       params ?: Protocol . CommandParameters [ T ] 
592-     ) : Promise < Protocol . CommandReturnValues [ T ] > 
593-     on < T  extends  keyof  Protocol . Events > ( 
594-       event : T , 
595-       listener : ( payload : Protocol . Events [ T ] )  =>  void 
596-     ) : this
597-     once < T  extends  keyof  Protocol . Events > ( 
598-       event : T , 
599-       listener : ( payload : Protocol . Events [ T ] )  =>  void 
600-     ) : this
601-     off < T  extends  keyof  Protocol . Events > ( 
602-       event : T , 
603-       listener : ( payload : Protocol . Events [ T ] )  =>  void 
604-     ) : this
605-   } 
590+   export  interface  CDPSession  extends  PWCDPSession  { } 
606591} 
0 commit comments