# Any method requires type "page" and doesn't accept my own types

**URL:** https://community.prismic.io/t/any-method-requires-type-page-and-doesnt-accept-my-own-types/14196
**Category:** Developing with Prismic
**Tags:** nextjs, typescript
**Created:** [September 27, 2023, 9:37am UTC](https://community.prismic.io/t/any-method-requires-type-page-and-doesnt-accept-my-own-types/14196 "2023-09-27T09:37:07Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ppkdomal2424](https://avatars.discourse-cdn.com/v4/letter/p/fbc32d/32.png) [@ppkdomal2424](https://community.prismic.io/u/ppkdomal2424)
#### Post date: [September 27, 2023, 9:37am UTC](https://community.prismic.io/t/any-method-requires-type-page-and-doesnt-accept-my-own-types/14196/1 "2023-09-27T09:37:07Z")

</div>

In my code, I get the same problem for each try of use some method of client: getSingle, getByUID or anything else. They all says: "Argument of type '"post"' is not assignable to parameter of type '"page"'.ts(2345)"  
I already checked my prismicio.ts in its routes and etc and nothing get changed.  
Please, help me ;-;  
prismicio.ts

```auto
/**
 * The project's Prismic repository name.
 */
export const repositoryName = config.repositoryName;

/**
 * A list of Route Resolver objects that define how a document's `url` field is resolved.
 *
 * {@link https://prismic.io/docs/route-resolver#route-resolver}
 */
// TODO: Update the routes array to match your project's route structure.
const routes: prismic.ClientConfig["routes"] = [
  {
    type: "home",
    path: "/",
  },
  {
    type: "post",
    path: "/posts",
  },
  {
    type: "about",
    path: "/about",
  },
];

/**
 * Creates a Prismic client for the project's repository. The client is used to
 * query content from the Prismic API.
 *
 * @param config - Configuration for the Prismic client.
 */
export const createClient = (config: prismicNext.CreateClientConfig = {}) => {
  const client = prismic.createClient(repositoryName, {
    routes,
    fetchOptions:
      process.env.NODE_ENV === "production"
        ? { next: { tags: ["prismic"] }, cache: "force-cache" }
        : { next: { revalidate: 5 } },
    ...config,
  });

  prismicNext.enableAutoPreviews({
    client,
    previewData: config.previewData,
    req: config.req,
  });

  return client;
};

```

---

<div class="post-metadata">

### Author: ![samlittlefair](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/samlittlefair/32/696_2.png) [@samlittlefair](https://community.prismic.io/u/samlittlefair)
#### Post date: [September 28, 2023, 2:04pm UTC](https://community.prismic.io/t/any-method-requires-type-page-and-doesnt-accept-my-own-types/14196/3 "2023-09-28T14:04:34Z")

</div>

Hey Gustavo,

Could you show us the code where the error is appearing?

Sam
