OverrideMiddleware Decorator

Module
import { OverrideMiddleware } from "@tsed/common"
Source/packages/common/src/mvc/decorators/class/overrideMiddleware.ts

Overview

const OverrideMiddleware: typeof OverrideProvider;

Description

Override a middleware which is already registered in MiddlewareRegistry.

Usage

import {OriginalMiddlware, OverrideMiddleware} from "@tsed/common";

@OverrideMiddleware(OriginalMiddlware)
export class CustomMiddleware extends OriginalMiddlware {
  public use() {

  }
}

Override examples