JSPM

@types/connect-history-api-fallback

1.5.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 10177156
  • Score
    100M100P100Q234283F
  • License MIT

TypeScript definitions for connect-history-api-fallback

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@types/connect-history-api-fallback) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Installation

    npm install --save @types/connect-history-api-fallback

    Summary

    This package contains type definitions for connect-history-api-fallback (https://github.com/bripkens/connect-history-api-fallback#readme).

    Details

    Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/connect-history-api-fallback.

    index.d.ts

    /// <reference types="node" />
    
    import { Url } from "url";
    
    import * as core from "express-serve-static-core";
    
    export = historyApiFallback;
    
    declare function historyApiFallback(options?: historyApiFallback.Options): core.RequestHandler;
    
    declare namespace historyApiFallback {
        interface Options {
            readonly disableDotRule?: true | undefined;
            readonly htmlAcceptHeaders?: readonly string[] | undefined;
            readonly index?: string | undefined;
            readonly logger?: typeof console.log | undefined;
            readonly rewrites?: readonly Rewrite[] | undefined;
            readonly verbose?: boolean | undefined;
        }
    
        interface Context {
            readonly match: RegExpMatchArray;
            readonly parsedUrl: Url;
            readonly request: core.Request;
        }
        type RewriteTo = (context: Context) => string;
    
        interface Rewrite {
            readonly from: RegExp;
            readonly to: string | RegExp | RewriteTo;
        }
    }
    

    Additional Details

    Credits

    These definitions were written by Douglas Duteil.