Add the components getter for the Strapi interface

This commit is contained in:
Convly 2022-10-27 10:15:21 +02:00
parent 57d7deea7d
commit f7fff30f70

View File

@ -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
*/