# @types/connect-history-api-fallback

> TypeScript definitions for connect-history-api-fallback

Latest version **1.5.4** (published 2023-11-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/connect-history-api-fallback
pnpm add @types/connect-history-api-fallback
yarn add @types/connect-history-api-fallback
bun add @types/connect-history-api-fallback
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.5.4 |
| Published | 2023-11-20 |
| First published | 2017-06-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51437 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/connect-history-api-fallback
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/connect-history-api-fallback
- npm.io page: https://npm.io/package/@types/connect-history-api-fallback

## Dependencies (2)

- [@types/node](https://npm.io/package/@types/node.md) *
- [@types/express-serve-static-core](https://npm.io/package/@types/express-serve-static-core.md) *

## Recent versions

- 1.5.4 (latest) — 2023-11-20
- 1.5.1 (ts4.3) — 2023-09-04
- 1.3.5 (ts3.6) — 2021-07-06
- 1.3.4 (ts3.5) — 2021-03-16
- 1.3.3 (ts2.3) — 2019-08-19
- 1.3.2 (ts2.2) — 2019-03-25
- 1.3.0 (ts2.0) — 2017-06-05
- 1.5.3 — 2023-11-07
- 1.5.2 — 2023-10-18
- 1.5.0 — 2023-04-28
- 1.3.1 — 2017-11-08

## 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/connect-history-api-fallback/index.d.ts)
````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
 * Last updated: Mon, 20 Nov 2023 23:36:24 GMT
 * Dependencies: [@types/express-serve-static-core](https://npmjs.com/package/@types/express-serve-static-core), [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Douglas Duteil](https://github.com/douglasduteil).

---
_Source: https://npm.io/package/@types/connect-history-api-fallback · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
