# @types/koa-static-cache

> TypeScript definitions for koa-static-cache

Latest version **5.1.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/koa-static-cache
pnpm add @types/koa-static-cache
yarn add @types/koa-static-cache
bun add @types/koa-static-cache
```

## 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 | 5.1.4 |
| Published | 2023-11-07 |
| First published | 2018-06-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51371 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/koa-static-cache
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-static-cache
- npm.io page: https://npm.io/package/@types/koa-static-cache

## Dependencies (1)

- [@types/koa](https://npm.io/package/@types/koa.md) *

## Recent versions

- 5.1.4 (latest) — 2023-11-07
- 5.1.1 (ts3.6) — 2021-07-08
- 5.1.0 (ts2.3) — 2018-06-06
- 5.1.3 — 2023-10-18
- 5.1.2 — 2023-09-14

## README

# Installation
> `npm install --save @types/koa-static-cache`

# Summary
This package contains type definitions for koa-static-cache (https://github.com/koajs/static-cache#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-static-cache.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-static-cache/index.d.ts)
````ts
/**
 * Static server for koa.
 */

import { Middleware } from "koa";

declare namespace staticCache {
    interface Files {
        [path: string]: Options;
    }

    interface Options {
        dir?: string | undefined;
        maxAge?: number | undefined;
        cacheControl?: string | undefined;
        buffer?: boolean | undefined;
        gzip?: boolean | undefined;
        usePrecompiledGzip?: boolean | undefined;
        alias?: {} | undefined;
        prefix?: string | undefined;
        dynamic?: boolean | undefined;
        filter?: ((path: string) => boolean) | string[] | undefined;
        preload?: boolean | undefined;
        files?: Files | undefined;
    }
}

declare function staticCache(
    dir: string | staticCache.Options,
    options?: staticCache.Options | staticCache.Files,
    files?: staticCache.Files,
): Middleware;

export = staticCache;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:38 GMT
 * Dependencies: [@types/koa](https://npmjs.com/package/@types/koa)

# Credits
These definitions were written by [JounQin](https://github.com/JounQin).

---
_Source: https://npm.io/package/@types/koa-static-cache · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
