Installation
npm install --save @types/koa-send
Summary
This package contains type definitions for koa-send (https://github.com/koajs/send).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-send.
import { ParameterizedContext } from "koa";
import { Stats } from "fs";
declare function send(ctx: ParameterizedContext, path: string, opts?: send.SendOptions): Promise<string>;
declare namespace send {
type SetHeaders = (res: ParameterizedContext["res"], path: string, stats: Stats) => any;
interface SendOptions {
maxage?: number | undefined;
maxAge?: SendOptions["maxage"] | undefined;
immutable?: boolean | undefined;
hidden?: boolean | undefined;
root?: string | undefined;
index?: string | false | undefined;
gzip?: boolean | undefined;
brotli?: boolean | undefined;
format?: boolean | undefined;
setHeaders?: SetHeaders | undefined;
extensions?: string[] | false | undefined;
}
}
export = send;
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:38 GMT
- Dependencies: @types/koa
Credits
These definitions were written by Peter Safranek, and Tomek Łaziuk.