function pageOf pageOf<T>(rows: T[],limit: number): Page<T> Turns rows fetched with LIMIT limit + 1 into a page. The extra row, when it comes back, is dropped and tells that another page follows, which spares a COUNT(*) over the whole list. Type Parameters T Parameters rows: T[] limit: number Return Type Page<T>