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
/**
* 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
Credits
These definitions were written by JounQin.