Skip to content

Commit 697e9a9

Browse files
committed
Run prettier
1 parent b920f4c commit 697e9a9

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

src/index.ts

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ export class Procedure<Input = undefined, Output = undefined>
3838
extends (EventEmitter as {
3939
new <Input>(): TypedEmitter<ProcedureEvents<Input>>;
4040
})<Input>
41-
implements ProcedureDefinitionOptions {
41+
implements ProcedureDefinitionOptions
42+
{
4243
#endpoint?: string;
4344
/**
4445
* The endpoint at which the {@link Procedure}, when {@link bind bound}, can be {@link call called}.
@@ -162,7 +163,7 @@ export class Procedure<Input = undefined, Output = undefined>
162163
for (let i = 0; i < this.workers; i++) {
163164
const socket =
164165
this.sockets[
165-
this.sockets.push(createSocket('rep', { ipv6 })) - 1
166+
this.sockets.push(createSocket('rep', { ipv6 })) - 1
166167
];
167168
socket
168169
.on('data', (data: Buffer) =>
@@ -230,9 +231,9 @@ export class Procedure<Input = undefined, Output = undefined>
230231
output:
231232
(await this.callback(
232233
input ??
233-
((this.optionalParameterSupport
234-
? undefined
235-
: input) as Input)
234+
((this.optionalParameterSupport
235+
? undefined
236+
: input) as Input)
236237
)) ?? null,
237238
};
238239
} catch (e) {
@@ -620,12 +621,12 @@ export async function call<Output = unknown>(
620621
try {
621622
await (opts.pingCacheLength
622623
? cachedPing(
623-
endpoint,
624-
opts.ping,
625-
opts.pingCacheLength,
626-
opts.ipv6,
627-
opts.signal
628-
)
624+
endpoint,
625+
opts.ping,
626+
opts.pingCacheLength,
627+
opts.ipv6,
628+
opts.signal
629+
)
629630
: ping(endpoint, opts.ping, opts.ipv6, opts.signal));
630631
} catch (error) {
631632
const isTimeoutError = (error: unknown): boolean =>
@@ -648,8 +649,8 @@ export async function call<Output = unknown>(
648649
if ('output' in response && !('error' in response)) {
649650
// success!
650651
return response.output ?? <Output>(opts.optionalParameterSupport
651-
? undefined // coerce null to undefined
652-
: response.output);
652+
? undefined // coerce null to undefined
653+
: response.output);
653654
} else if (isProcedureError(response.error)) {
654655
// response indicates an error happened server-side
655656
throw response.error;
@@ -739,9 +740,9 @@ async function cachedPing(
739740
cachedPingsByEndpoint[endpoint].resolving = cachedPingsByEndpoint[endpoint]
740741
.resolving
741742
? Promise.any<void>([
742-
cachedPingsByEndpoint[endpoint].resolving,
743-
ping(endpoint, timeout, ipv6, signal),
744-
])
743+
cachedPingsByEndpoint[endpoint].resolving,
744+
ping(endpoint, timeout, ipv6, signal),
745+
])
745746
: ping(endpoint, timeout, ipv6, signal);
746747

747748
await cachedPingsByEndpoint[endpoint].resolving;

0 commit comments

Comments
 (0)