Skip to content

Typescript on pagination. #398

Description

@Mirare23

So im trying to get pagecount on responsed. Here's what i do

const { data: BlogResponses } = await useAsyncData("blog", () => find<IAttributes>("blogs", { populate: "*", sort: "id:desc", pagination: { page: 1, pageSize: 10, withCount: true }, fields: ["title", "description", "slug", "Date", "Is_recomended"], }) )

onMounted(() => { maxPage.value = BlogResponses.value?.meta.pagination.pageCount })

Im getting typescript error that pageCount is not exist. i checked the types on the modules it provide this

image

What i did wrong? im new to TS .

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions