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 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.
Whether or not to output errors and events to the console. Defaults to false
.
The number of workers to spin up for the Procedure. Useful for procedures which may take a long time to complete.
Will be clamped between 1
and Number.MAX_SAFE_INTEGER
inclusive.
Defaults to 1
.
Generated using TypeDoc
Options for defining a Procedure.