@types/koa-static-cache
TypeScript icon, indicating that this package has built-in type declarations

5.1.4 • Public • Published

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.

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @types/koa-static-cache

    Weekly Downloads

    3,073

    Version

    5.1.4

    License

    MIT

    Unpacked Size

    4.42 kB

    Total Files

    5

    Last publish

    Collaborators

    • types