@@ -37,7 +37,8 @@ export class Procedure<Input = undefined, Output = undefined>
3737 extends ( EventEmitter as {
3838 new < Input > ( ) : TypedEmitter < ProcedureEvents < Input > > ;
3939 } ) < Input >
40- implements ProcedureDefinitionOptions {
40+ implements ProcedureDefinitionOptions
41+ {
4142 #endpoint?: string ;
4243 /**
4344 * The endpoint at which the {@link Procedure}, when {@link bind bound}, can be {@link call called}.
@@ -161,7 +162,7 @@ export class Procedure<Input = undefined, Output = undefined>
161162 for ( let i = 0 ; i < this . workers ; i ++ ) {
162163 const socket =
163164 this . sockets [
164- this . sockets . push ( createSocket ( 'rep' , { ipv6 } ) ) - 1
165+ this . sockets . push ( createSocket ( 'rep' , { ipv6 } ) ) - 1
165166 ] ;
166167 socket
167168 . on ( 'data' , ( data : Buffer ) =>
@@ -229,9 +230,9 @@ export class Procedure<Input = undefined, Output = undefined>
229230 output :
230231 ( await this . callback (
231232 input ??
232- ( ( this . optionalParameterSupport
233- ? undefined
234- : input ) as Input )
233+ ( ( this . optionalParameterSupport
234+ ? undefined
235+ : input ) as Input )
235236 ) ) ?? null ,
236237 } ;
237238 } catch ( e ) {
@@ -638,12 +639,12 @@ export async function call<Output = unknown>(
638639 try {
639640 await ( opts . pingCacheLength
640641 ? cachedPing (
641- endpoint ,
642- opts . ping ,
643- opts . pingCacheLength ,
644- opts . ipv6 ,
645- opts . signal
646- )
642+ endpoint ,
643+ opts . ping ,
644+ opts . pingCacheLength ,
645+ opts . ipv6 ,
646+ opts . signal
647+ )
647648 : ping ( endpoint , opts . ping , opts . ipv6 , opts . signal ) ) ;
648649 } catch ( error ) {
649650 throw error instanceof ProcedureTimedOutError
@@ -658,8 +659,8 @@ export async function call<Output = unknown>(
658659 if ( 'output' in response && ! ( 'error' in response ) ) {
659660 // success!
660661 return response . output ?? < Output > ( opts . optionalParameterSupport
661- ? undefined // coerce null to undefined
662- : response . output ) ;
662+ ? undefined // coerce null to undefined
663+ : response . output ) ;
663664 } else if ( isProcedureError ( response . error ) ) {
664665 // response indicates an error happened server-side
665666 throw response . error ;
@@ -756,9 +757,9 @@ async function cachedPing(
756757 cachedPingsByEndpoint [ endpoint ] . resolving = cachedPingsByEndpoint [ endpoint ]
757758 . resolving
758759 ? Promise . any < void > ( [
759- cachedPingsByEndpoint [ endpoint ] . resolving ,
760- ping ( endpoint , timeout , ipv6 , signal ) ,
761- ] )
760+ cachedPingsByEndpoint [ endpoint ] . resolving ,
761+ ping ( endpoint , timeout , ipv6 , signal ) ,
762+ ] )
762763 : ping ( endpoint , timeout , ipv6 , signal ) ;
763764
764765 await cachedPingsByEndpoint [ endpoint ] . resolving ;
0 commit comments