Options for defining or calling a Procedure.

See

Hierarchy

Properties

ignoreUndefinedProperties: boolean

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.

Remarks

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.

See

null and undefined properties

optionalParameterSupport: boolean

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.

Remarks

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.

See

Generated using TypeDoc