From f7fff30f70a64fbe7dbca13a21756098b24ec2c7 Mon Sep 17 00:00:00 2001 From: Convly Date: Thu, 27 Oct 2022 10:15:21 +0200 Subject: [PATCH] Add the components getter for the Strapi interface --- .../core/strapi/lib/types/core/strapi/index.d.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/core/strapi/lib/types/core/strapi/index.d.ts b/packages/core/strapi/lib/types/core/strapi/index.d.ts index 3d720b96ec..3bee42f607 100644 --- a/packages/core/strapi/lib/types/core/strapi/index.d.ts +++ b/packages/core/strapi/lib/types/core/strapi/index.d.ts @@ -2,8 +2,8 @@ import type Koa from 'koa'; import { Database } from '@strapi/database'; import type { StringMap } from './utils'; -import type { GenericController } from '../../../core-api/controller' -import type { GenericService } from '../../../core-api/service' +import type { GenericController } from '../../../core-api/controller'; +import type { GenericService } from '../../../core-api/service'; // TODO move custom fields types to a separate file interface CustomFieldServerOptions { @@ -92,9 +92,16 @@ export interface Strapi { */ contentType(uid: string): any; + /** + * Getter for the Strapi component container + * + * It returns all the registered components + */ + readonly components: any; + /** * The custom fields registry - * + * * It returns the custom fields interface */ readonly customFields: CustomFields; @@ -361,7 +368,6 @@ export interface Strapi { */ log: any; - /** * Used to manage cron within Strapi */