Neutral Political Machine

    @types/express-unless
    TypeScript icon, indicating that this package has built-in type declarations

    0.5.3 • Public • Published

    Installation

    npm install --save @types/express-unless

    Summary

    This package contains type definitions for express-unless (https://www.npmjs.org/package/express-unless).

    Details

    Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-unless.

    index.d.ts

    // Type definitions for express-unless 0.5
    // Project: https://www.npmjs.org/package/express-unless
    // Definitions by: Wonshik Kim <https://github.com/wokim>
    //                 Joao Vieira <https://github.com/joaovieira>
    //                 Michal Kaminski <https://github.com/michal-b-kaminski>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    // TypeScript Version: 2.3
    
    import express = require("express");
    
    declare function unless(options: unless.Options): express.RequestHandler;
    declare function unless(options: unless.Options["custom"]): express.RequestHandler;
    declare function unless(middleware: express.RequestHandler, options: unless.Options): express.RequestHandler;
    
    declare namespace unless {
        type pathFilter = string | RegExp | { url: string | RegExp, methods?: string[] | undefined, method?: string | string[] | undefined };
    
        export interface Options {
            custom?: ((req: express.Request) => boolean) | undefined;
            path?: pathFilter | pathFilter[] | undefined;
            ext?: string | string[] | undefined;
            method?: string | string[] | undefined;
            useOriginalUrl?: boolean | undefined;
        }
        export interface RequestHandler extends express.RequestHandler {
            unless?: typeof unless | undefined;
        }
    }
    
    export = unless;

    Additional Details

    • Last updated: Thu, 10 Feb 2022 07:31:36 GMT
    • Dependencies: @types/express
    • Global values: none

    Credits

    These definitions were written by Wonshik Kim, Joao Vieira, and Michal Kaminski.

    Keywords

    none

    Install

    npm i @types/express-unless

    DownloadsWeekly Downloads

    1,642,382

    Version

    0.5.3

    License

    MIT

    Unpacked Size

    5.71 kB

    Total Files

    4

    Last publish

    Collaborators

    • types