Skip to main content

Function: report()

report<T>(stream, spec, options?): Stream<ReportData>

Defined in: packages/core/src/graph/transforms.ts:110

Summarize an array stream into ReportData.

const daily = report(labeled, spec); // Stream

The declared-fold sibling of aggregate: the fold is a portable ReportSpec rather than a closure, so the same spec works in a stored definition (registerReportOperation) and in this fluent graph. Validates the spec and options when the graph is built, so an invalid one fails construction. Field paths are runtime JSON; the compiler does not check them against T.

Type Parameters

T

T

Parameters

stream

Stream<readonly T[]>

spec

ReportSpec

options?

SummarizeReportOptions

Returns

Stream<ReportData>