Skip to main content

toOperationOutput

@webda/core


Function: toOperationOutput()

toOperationOutput(value, seen?): any

Defined in: packages/core/src/core/operations.ts:1053

Public form of an operation result, the one every transport serializes: a value with toDTO() (a model) is replaced by its DTO, arrays and plain objects (a query page, a wrapper) are walked, anything else is kept as is

Call it within the operation context: a DTO may depend on the caller.

Parameters​

value​

any

the operation result or a streamed chunk

seen?​

WeakSet<object> = ...

objects already walked, a circular reference is left to the serializer

Returns​

any

the value to write