1 | # Installation
|
2 | > `npm install --save @types/connect-history-api-fallback`
|
3 |
|
4 | # Summary
|
5 | This package contains type definitions for connect-history-api-fallback (https://github.com/bripkens/connect-history-api-fallback#readme).
|
6 |
|
7 | # Details
|
8 | Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/connect-history-api-fallback.
|
9 | ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/connect-history-api-fallback/index.d.ts)
|
10 | ````ts
|
11 | // Type definitions for connect-history-api-fallback 1.3
|
12 | // Project: https://github.com/bripkens/connect-history-api-fallback#readme
|
13 | // Definitions by: Douglas Duteil <https://github.com/douglasduteil>
|
14 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
15 | // TypeScript Version: 2.3
|
16 |
|
17 | /// <reference types="node" />
|
18 |
|
19 | import { Url } from 'url';
|
20 |
|
21 | import * as core from "express-serve-static-core";
|
22 |
|
23 | export = historyApiFallback;
|
24 |
|
25 | declare function historyApiFallback(options?: historyApiFallback.Options): core.RequestHandler;
|
26 |
|
27 | declare namespace historyApiFallback {
|
28 | interface Options {
|
29 | readonly disableDotRule?: true | undefined;
|
30 | readonly htmlAcceptHeaders?: ReadonlyArray<string> | undefined;
|
31 | readonly index?: string | undefined;
|
32 | readonly logger?: typeof console.log | undefined;
|
33 | readonly rewrites?: ReadonlyArray<Rewrite> | undefined;
|
34 | readonly verbose?: boolean | undefined;
|
35 | }
|
36 |
|
37 | interface Context {
|
38 | readonly match: RegExpMatchArray;
|
39 | readonly parsedUrl: Url;
|
40 | }
|
41 | type RewriteTo = (context: Context) => string;
|
42 |
|
43 | interface Rewrite {
|
44 | readonly from: RegExp;
|
45 | readonly to: string | RegExp | RewriteTo;
|
46 | }
|
47 | }
|
48 |
|
49 | ````
|
50 |
|
51 | ### Additional Details
|
52 | * Last updated: Tue, 06 Jul 2021 18:05:59 GMT
|
53 | * Dependencies: [@types/express-serve-static-core](https://npmjs.com/package/@types/express-serve-static-core), [@types/node](https://npmjs.com/package/@types/node)
|
54 | * Global values: none
|
55 |
|
56 | # Credits
|
57 | These definitions were written by [Douglas Duteil](https://github.com/douglasduteil).
|
58 |
|
\ | No newline at end of file |