File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 1+ export type { MiddlewareShape } from './middleware.shape' ;
Original file line number Diff line number Diff line change 1+ /**
2+ * @description The shape of a middleware system.
3+ * @export
4+ * @interface MiddlewareShape
5+ * @typedef {MiddlewareShape }
6+ * @template [Input=any] The type of the arguments passed to middleware functions.
7+ * @template [Output=any] The type of the output returned by middleware functions.
8+ * @template [Middleware=any] The type of the middleware.
9+ */
10+ export interface MiddlewareShape < Input = any , Output = any , Middleware = any > {
11+ execute ( context : Input ) : void ;
12+ execute ( ...args : Input [ ] ) : void ;
13+ use ( middleware : Middleware ) : this;
14+ executeAsync ( context : Input ) : Promise < Output > ; // Or Promise<Output> if defined
15+ executeAsync ( ...args : Input [ ] ) : Promise < Output > ; // Or Promise<Output> if defined
16+ }
You can’t perform that action at this time.
0 commit comments