Creates a new insight with reduced bucket items (retrieved by applying the modifications function).
export declare function insightReduceItems<T extends IInsightDefinition>(insight: T, reducer?: BucketItemReducer): T;
|insight||T||insight to use as template for the new insight|
|reducer||BucketItemReducer||(Optional) reduce function to apply to the bucket items|
always new instance
Note: the bucket item modification function SHOULD NOT modify bucket item's localId. The localId MAY be used to reference the item from other places in the insight (for example from sorts). Changing the item localId has potential to break the insight: as-is this function does not concern itself with changing the references.