UNPKG

700 BTypeScriptView Raw
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 */
7import { Context } from "../IContext";
8/**
9 * @interface
10 * @property {Function} execute - The method to execute the middleware
11 * @property {Function} [setNext] - A method to set the next middleware in the chain
12 */
13export interface Middleware {
14 execute: (context: Context) => Promise<void>;
15 setNext?: (middleware: Middleware) => void;
16}