@@ -160,7 +160,7 @@ export class SimpleHandler extends SimpleHandlerDefinition {
160160 writeHead ( response , this . status , this . statusMessage , this . headers ) ;
161161
162162 if ( isSerializedBuffer ( this . data ) ) {
163- this . data = Buffer . from ( < any > this . data ) ;
163+ this . data = Buffer . from ( this . data as any ) ;
164164 }
165165
166166 if ( this . trailers ) {
@@ -408,7 +408,7 @@ export class PassThroughHandler extends PassThroughHandlerDefinition {
408408 let { protocol, hostname, port, path } = url . parse ( reqUrl ) ;
409409
410410 // Check if this request is a request loop:
411- if ( isSocketLoop ( this . outgoingSockets , ( < any > clientReq ) . socket ) ) {
411+ if ( isSocketLoop ( this . outgoingSockets , ( clientReq as any ) . socket ) ) {
412412 throw new Error ( oneLine `
413413 Passthrough loop detected. This probably means you're sending a request directly
414414 to a passthrough endpoint, which is forwarding it to the target URL, which is a
@@ -588,7 +588,7 @@ export class PassThroughHandler extends PassThroughHandlerDefinition {
588588
589589 if ( modifiedReq ?. response ) {
590590 if ( modifiedReq . response === 'close' ) {
591- const socket : net . Socket = ( < any > clientReq ) . socket ;
591+ const socket : net . Socket = ( clientReq as any ) . socket ;
592592 socket . end ( ) ;
593593 throw new AbortError ( 'Connection closed intentionally by rule' ) ;
594594 } else if ( modifiedReq . response === 'reset' ) {
@@ -1301,7 +1301,7 @@ export class PassThroughHandler extends PassThroughHandlerDefinition {
13011301
13021302export class CloseConnectionHandler extends CloseConnectionHandlerDefinition {
13031303 async handle ( request : OngoingRequest ) {
1304- const socket : net . Socket = ( < any > request ) . socket ;
1304+ const socket : net . Socket = ( request as any ) . socket ;
13051305 socket . end ( ) ;
13061306 throw new AbortError ( 'Connection closed intentionally by rule' ) ;
13071307 }
0 commit comments