mirror of
https://github.com/strapi/strapi.git
synced 2025-09-22 06:50:51 +00:00
remove TStrapi
This commit is contained in:
parent
70ca791274
commit
7c71ea3de2
@ -1,2 +1,2 @@
|
||||
export { Admin } from './strapi-admin';
|
||||
export { Server } from './strapi-server';
|
||||
export * from './strapi-admin';
|
||||
export * from './strapi-server';
|
||||
|
@ -3,12 +3,11 @@ import { Routes } from './routes';
|
||||
import { ContentTypes } from './content-types';
|
||||
import { Controllers } from './controllers';
|
||||
import { Register, Bootstrap, Destroy } from './lifecycle';
|
||||
import { LoadedStrapi } from '../../../../..';
|
||||
|
||||
export interface ServerObject<TStrapi> {
|
||||
register: Register<TStrapi>;
|
||||
bootstrap: Bootstrap<TStrapi>;
|
||||
destroy: Destroy<TStrapi>;
|
||||
export interface ServerObject {
|
||||
register: Register;
|
||||
bootstrap: Bootstrap;
|
||||
destroy: Destroy;
|
||||
config: Config;
|
||||
routes: Routes;
|
||||
contentTypes: ContentTypes;
|
||||
@ -20,7 +19,7 @@ export interface ServerObject<TStrapi> {
|
||||
middlewares: any;
|
||||
}
|
||||
|
||||
export type ServerFunction<TStrapi> = () => ServerObject<TStrapi>;
|
||||
export type ServerFunction = () => ServerObject;
|
||||
|
||||
// Interface for the plugin strapi-server file
|
||||
export type Server<TStrapi = LoadedStrapi> = ServerObject<TStrapi> | ServerFunction<TStrapi>;
|
||||
export type Server = ServerObject | ServerFunction;
|
||||
|
@ -1,9 +1,7 @@
|
||||
export type LifecycleMethod<TStrapi> = ({
|
||||
strapi,
|
||||
}: {
|
||||
strapi: TStrapi;
|
||||
}) => Promise<unknown> | unknown;
|
||||
import { Strapi } from '../../../../..';
|
||||
|
||||
export type Register<TStrapi> = LifecycleMethod<TStrapi>;
|
||||
export type Bootstrap<TStrapi> = LifecycleMethod<TStrapi>;
|
||||
export type Destroy<TStrapi> = LifecycleMethod<TStrapi>;
|
||||
export type LifecycleMethod = ({ strapi }: { strapi: Strapi }) => Promise<unknown> | unknown;
|
||||
|
||||
export type Register = LifecycleMethod;
|
||||
export type Bootstrap = LifecycleMethod;
|
||||
export type Destroy = LifecycleMethod;
|
||||
|
Loading…
x
Reference in New Issue
Block a user