You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
xiaoz
db49ff5e85
|
3 years ago | |
---|---|---|
.. | ||
LICENSE | 3 years ago | |
README.md | 3 years ago | |
index.d.ts | 3 years ago | |
package.json | 3 years ago |
README.md
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
// Type definitions for connect-history-api-fallback 1.3
// Project: https://github.com/bripkens/connect-history-api-fallback#readme
// Definitions by: Douglas Duteil <https://github.com/douglasduteil>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/// <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?: ReadonlyArray<string> | undefined;
readonly index?: string | undefined;
readonly logger?: typeof console.log | undefined;
readonly rewrites?: ReadonlyArray<Rewrite> | undefined;
readonly verbose?: boolean | undefined;
}
interface Context {
readonly match: RegExpMatchArray;
readonly parsedUrl: Url;
}
type RewriteTo = (context: Context) => string;
interface Rewrite {
readonly from: RegExp;
readonly to: string | RegExp | RewriteTo;
}
}
Additional Details
- Last updated: Tue, 06 Jul 2021 18:05:59 GMT
- Dependencies: @types/express-serve-static-core, @types/node
- Global values: none
Credits
These definitions were written by Douglas Duteil.