1 | /**
|
2 | * -------------------------------------------------------------------------------------------
|
3 | * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
|
4 | * See License in the project root for license information.
|
5 | * -------------------------------------------------------------------------------------------
|
6 | */
|
7 |
|
8 | import { Context } from "../IContext";
|
9 |
|
10 | /**
|
11 | * @interface
|
12 | * @property {Function} execute - The method to execute the middleware
|
13 | * @property {Function} [setNext] - A method to set the next middleware in the chain
|
14 | */
|
15 | export interface Middleware {
|
16 | execute: (context: Context) => Promise<void>;
|
17 | setNext?: (middleware: Middleware) => void;
|
18 | }
|