Optional
extensionAn optional msgpack ExtensionCodec to use for encoding and decoding messages.
Whether or not to ignore undefined
properties of objects passed to or from a Procedure. Defaults to true
.
When true
on a Procedure, only affects properties of input parameters.
When true
on a call, only affects properties of the return value.
The procedure.js library uses the msgpack
serialization format for encoding JavaScript objects and values for transmission to and from remote procedures.
The JavaScript implementation of msgpack maps undefined
to null
.
This means that when passing objects in or out of a Procedure (i.e. as a parameter or return value), any properties defined as
undefined
will evaluate to null
on receipt.
ignoreUndefinedProperties aims to alleviate this by signalling msgpack to ignore undefined properties from objects before they are encoded,
allowing undefined
to be evaluated as undefined
and null
to be evaluated as null
.
This operation incurs some overhead, and means that code relying on the presence of a property to infer meaning
may not operate as expected.
Whether the endpoint requires ipv6 support. Defaults to false
.
Whether or not to enable optional parameter support. Defaults to true
.
When true
on a Procedure, a null
input parameter will be coerced to undefined
.
When true
for a call, a null
return value will be coerced to undefined
.
The procedure.js library uses the msgpack
serialization format for encoding JavaScript objects and values for transmission to and from remote procedures.
The JavaScript implementation of msgpack maps undefined
to null
.
For procedures which accept optional parameters, this is problematic.
It could also be an issue if you depend on the return value of a procedure to conditionally be undefined
,
for the convenience of passing the return value into an optional parameter of another function call.
optionalParameterSupport aims to alleviate these issues by mapping null
to undefined
for the input and output of your Procedure calls.
Optional
pingThe number of milliseconds to wait for a ping-pong from the endpoint before calling the remote procedure.
When set, if a ping-pong is not received in the given time, the call will be aborted.
NaN
or infinite numbers will result in the ping never timing out if no response is received,
unless signal is a valid AbortSignal and gets aborted.
Non-NaN
, finite values will be clamped between 0
and Number.MAX_SAFE_INTEGER
inclusive.
Defaults to 1000
.
Optional
pingOptional
signalAn optional AbortSignal which will be used to abort the Procedure call.
The number of milliseconds after which the call will automatically be aborted.
Set to Infinity
or NaN
to never timeout.
Non-NaN
, finite values will be clamped between 0
and Number.MAX_SAFE_INTEGER
inclusive.
Defaults to 1000
.
Generated using TypeDoc
Options for calling a Procedure.