Rest ...items: T[]Private arrayStatic filterThe filter function takes an array and a predicate function, and returns a new array containing
only the elements that satisfy the predicate.
The arr parameter is an array of elements of type T.
The predicate parameter in the filter function is a callback function that
takes an item of type T as its argument and returns a boolean value. This function is used to
determine whether an item should be included in the resulting array based on the specified
condition.
The filter method is returning an array of elements that satisfy the given predicate
function.
Static groupThe groupBy function in TypeScript takes an array of items and groups them based on a specified
key function.
The arr parameter is an array of elements of type T that you want to group
based on a specific key.
The keyFn parameter is a function that takes an item of type T as input and
returns a string. This function is used to determine the key for grouping the items in the array
arr.
The groupBy function returns an object where the keys are strings and the values are
arrays of type T.
Static mapGenerated using TypeDoc
The function
getLengthreturns the length of an array in TypeScript.