How to use getAggFunc of AG-Grid in react.js but in java-script

is there any way to use this function (getAggFunc) of ag-grid in react but instead of typescript im using java-script. can any one help me in this. the reason is simple because i want to find which aggregation is applied on column.