mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 11:41:44 +00:00
Add 'extensions' option.
This commit is contained in:
Vendored
+2
-1
@@ -1,4 +1,4 @@
|
||||
// Type definitions for koa-send v3.x
|
||||
// Type definitions for koa-send v3.3
|
||||
// Project: https://github.com/koajs/send
|
||||
// Definitions by: Peter Safranek <https://github.com/pe8ter>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -13,6 +13,7 @@ interface ISendOptions {
|
||||
format?: boolean;
|
||||
gzip?: boolean;
|
||||
setHeaders?: Function;
|
||||
extensions?: string[];
|
||||
}
|
||||
|
||||
declare function send(ctx: Koa.Context, path: string, opts?: ISendOptions): Promise<string>;
|
||||
|
||||
@@ -17,5 +17,6 @@ app.use(async (ctx: Koa.Context) => {
|
||||
format: true,
|
||||
gzip: true,
|
||||
setHeaders: () => {},
|
||||
extensions: ['shemp'],
|
||||
});
|
||||
});
|
||||
|
||||
Vendored
-27
@@ -1,27 +0,0 @@
|
||||
// Type definitions for koa-send v3.x
|
||||
// Project: https://github.com/koajs/send
|
||||
// Definitions by: Peter Safranek <https://github.com/pe8ter>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference path="../koa/koa.d.ts" />
|
||||
|
||||
declare module "koa-send" {
|
||||
|
||||
import * as Koa from "koa";
|
||||
|
||||
interface ISendOptions {
|
||||
root?: string;
|
||||
index?: string;
|
||||
maxAge?: number;
|
||||
hidden?: boolean;
|
||||
format?: boolean;
|
||||
gzip?: boolean;
|
||||
setHeaders?: Function;
|
||||
}
|
||||
|
||||
function send(ctx: Koa.Context, path: string, opts?: ISendOptions): Promise<string>;
|
||||
|
||||
namespace send {}
|
||||
|
||||
export = send;
|
||||
}
|
||||
Reference in New Issue
Block a user