@eggjs/router 3.0.6 → 4.0.0-beta.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.ts DELETED
@@ -1,9 +0,0 @@
1
- import { Router } from './Router.js';
2
-
3
- export type * from './types.js';
4
- export * from './Layer.js';
5
- export * from './Router.js';
6
- export * from './EggRouter.js';
7
-
8
- export const KoaRouter = Router;
9
- export default Router;
package/src/types.ts DELETED
@@ -1,15 +0,0 @@
1
- export type Next = () => Promise<void>;
2
- export type MiddlewareFunc = (ctx: any, next: Next) => Promise<void> | void;
3
- export type MiddlewareFuncWithParamProperty = MiddlewareFunc & { param?: string };
4
- export type ParamMiddlewareFunc = (param: string, ctx: any, next: Next) => Promise<void> | void;
5
- export type MiddlewareFuncWithRouter<T> = MiddlewareFunc & { router: T };
6
-
7
- export interface ResourcesController {
8
- index?: MiddlewareFunc;
9
- new?: MiddlewareFunc;
10
- create?: MiddlewareFunc;
11
- show?: MiddlewareFunc;
12
- edit?: MiddlewareFunc;
13
- update?: MiddlewareFunc;
14
- destroy?: MiddlewareFunc;
15
- }