import { PaginatedList } from './types' ; export let paginate = < T > ( offset , limit , array ) : PaginatedList < T > => ( { results : array . slice ( offset , offset + limit ) , hasNextPage : offset + limit < array . length , total : array . length } ) ;