Socket
Socket
Sign inDemoInstall

@types/koa-static-cache

Package Overview
Dependencies
19
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @types/koa-static-cache

TypeScript definitions for koa-static-cache


Version published
Maintainers
1
Created

Readme

Source

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.

FAQs

Last updated on 07 Nov 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc