Aggregate over a series using TypeScript V2 function

Hello!

According to the documentation (https://www.palantir.com/docs/foundry/time-series/time-series-in-functions#aggregate-over-a-series), it’s possible to use aggregation over a time series on TypeScript. The article shows methods for getting the first point and last point that do exist, but when I try to use the .aggregate method, it’s not found with the following error:

Property ‘aggregate’ does not exist on type ‘TimeSeriesProperty’.typescript(2339)

How do I use aggregation over a Time Series in a TypeScript V2 function?

Hey, I think the documentation is showing the examples with v1 syntax.

I thought it could be the case since it has the @Function decorator. Is there any way to do this using V2?