<commit_before>import {ObjectType, Field, Root, Int} from "type-graphql"

export interface PageParams<T extends object> {
  limit: number

  offset: number

  page: number

  count: number

  rows: T[]
}

@ObjectType({isAbstract: true})
export abstract class Page<T extends object> {
  @Field(() => Int)
  count: number

  @Field(() => Int)
  limit: number

  @Field(() => Int)
  offset: number

  @Field(() => Int)
  current(@Root() {page = 1}: PageParams<T>): number {
    return page
  }
<commit_msg>nicel: Improve types for Page<commit_after>import {ObjectType, Field, Root, Int} from "type-graphql"

import AnyObject from "type/AnyObject"

export interface PageParams<T extends AnyObject> {
  limit: number

  offset: number

  page: number

  count: number

  rows: T[]
}

@ObjectType({isAbstract: true})
export abstract class Page<T extends AnyObject> {
  @Field(() => Int)
  count: number

  @Field(() => Int)
  limit: number

  @Field(() => Int)
  offset: number

  @Field(() => Int)
  current(@Root() {page = 1}: PageParams<T>): number {
    return page
  }

{'fraction_non_alphanumeric': 0.14606741573033707, 'fraction_numerical': 0.0018726591760299626, 'mean_word_length': 3.9262672811059907, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4651143', 'n_tokens_mistral': 362, 'n_tokens_neox': 344, 'n_words': 110}