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