From 157f59ed3b703aedb0d898eb805a63dc8e547dce Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Mon, 22 Sep 2025 17:38:34 +0200 Subject: [PATCH] docs: fix Strapi TypeScript import example (#2721) --- docusaurus/docs/cms/typescript/development.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docusaurus/docs/cms/typescript/development.md b/docusaurus/docs/cms/typescript/development.md index 8060affdf4..fae4b31c88 100644 --- a/docusaurus/docs/cms/typescript/development.md +++ b/docusaurus/docs/cms/typescript/development.md @@ -33,13 +33,13 @@ Strapi provides typings on the `Strapi` class to enhance the TypeScript developm To experience TypeScript-based autocomplete while developing Strapi applications, you could try the following: 1. Open the `./src/index.ts` file from your code editor. -2. Declare the `strapi` argument as type `Strapi` within the global `register` method: +2. Import the `Core` types from `@strapi/strapi` and declare the `strapi` argument as type `Core.Strapi` within the global `register` method: ```typescript title="./src/index.ts" - import { Strapi } from '@strapi/strapi'; + import type { Core } from '@strapi/strapi'; export default { - register({ strapi }: { strapi: Strapi }) { + register({ strapi }: { strapi: Core.Strapi }) { // ... }, };