How to type the Context object in Strapi API with TypeScript?

I installed the @types/koa types and use the Context type.

import { Strapi } from "@strapi/strapi";
import { Context } from "koa";

export default ({ strapi }: { strapi: Strapi }) => ({
  async findOne(ctx: Context) {
    // ...
  },
});
1 Like