Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/koa-send

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/koa-send - npm Package Compare versions

Comparing version 3.3.1 to 4.1.0

50

koa-send/index.d.ts

@@ -1,24 +0,46 @@

// Type definitions for koa-send v3.3
// Type definitions for koa-send 4.1
// Project: https://github.com/koajs/send
// Definitions by: Peter Safranek <https://github.com/pe8ter>
// Tomek Łaziuk <https://github.com/tlaziuk>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import * as Koa from 'koa';
import {
Context,
} from "koa";
interface ISendOptions {
root?: string;
index?: string;
maxAge?: number;
hidden?: boolean;
format?: boolean;
gzip?: boolean;
setHeaders?: Function;
extensions?: string[];
}
import {
Stats,
} from "fs";
declare function send(ctx: Koa.Context, path: string, opts?: ISendOptions): Promise<string>;
declare function send(ctx: Context, path: string, opts?: send.SendOptions): Promise<string>;
declare namespace send {}
declare namespace send {
type SetHeaders = (res: Context["res"], path: string, stats: Stats) => any;
interface SendOptions {
/** Browser cache max-age in milliseconds. (defaults to 0) */
maxage?: number;
maxAge?: SendOptions["maxage"];
/** Tell the browser the resource is immutable and can be cached indefinitely. (defaults to false) */
immutable?: boolean;
/** Allow transfer of hidden files. (defaults to false) */
hidden?: boolean;
/** Root directory to restrict file access. (defaults to '') */
root?: string;
/** Name of the index file to serve automatically when visiting the root location. (defaults to none) */
index?: string;
/** Try to serve the gzipped version of a file automatically when gzip is supported by a client and if the requested file with .gz extension exists. (defaults to true). */
gzip?: boolean;
/** Try to serve the brotli version of a file automatically when brotli is supported by a client and if the requested file with .br extension exists. (defaults to true). */
brotli?: boolean;
/** If not false (defaults to true), format the path to serve static file servers and not require a trailing slash for directories, so that you can do both /directory and /directory/. */
format?: boolean;
/** Function to set custom headers on response. */
setHeaders?: SetHeaders;
/** Try to match extensions from passed array to search for file when no extension is sufficed in URL. First found is served. (defaults to false) */
extensions?: string[] | false;
}
}
export = send;
{
"name": "@types/koa-send",
"version": "3.3.1",
"version": "4.1.0",
"description": "TypeScript definitions for koa-send",

@@ -11,2 +11,7 @@ "license": "MIT",

"githubUsername": "pe8ter"
},
{
"name": "Tomek Łaziuk",
"url": "https://github.com/tlaziuk",
"githubUsername": "tlaziuk"
}

@@ -23,4 +28,4 @@ ],

},
"typesPublisherContentHash": "aa2b2892b7f550bc06789ec02ff50bcbee6286be8f2df12782987de682eef758",
"typesPublisherContentHash": "89dd2ea4fbd9d51fd2df962c5f6712fa8c4b60c7021aead9a26b0293df95e130",
"typeScriptVersion": "2.3"
}

@@ -11,7 +11,7 @@ # Installation

Additional Details
* Last updated: Thu, 09 Nov 2017 09:38:00 GMT
* Dependencies: koa
* Last updated: Wed, 06 Dec 2017 20:09:40 GMT
* Dependencies: koa, fs
* Global values: none
# Credits
These definitions were written by Peter Safranek <https://github.com/pe8ter>.
These definitions were written by Peter Safranek <https://github.com/pe8ter>, Tomek Łaziuk <https://github.com/tlaziuk>.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc