jimpex
    Preparing search index...

    Type Alias MiddlewareConnectFn

    MiddlewareConnectFn: <ContainerType extends Jimpex = Jimpex>(
        app: ContainerType,
        route?: string,
    ) => Router | ExpressMiddlewareLike | undefined

    The function a middleware uses to mount itself in the container.

    Type Declaration

      • <ContainerType extends Jimpex = Jimpex>(
            app: ContainerType,
            route?: string,
        ): Router | ExpressMiddlewareLike | undefined
      • Type Parameters

        Parameters

        • app: ContainerType
        • Optionalroute: string

          This is optional because the implementation can use it as a "global middleware", or for a specific route.

        Returns Router | ExpressMiddlewareLike | undefined

        The resource can choose to be enabled or not by returning the function, or undefined.