forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compression.d.ts
62 lines (50 loc) · 1.9 KB
/
compression.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Type definitions for compression
// Project: https://github.com/expressjs/compression
// Definitions by: Santi Albo <https://github.com/santialbo/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../express/express.d.ts" />
declare module "compression" {
import express = require('express');
namespace e {
interface CompressionOptions {
/**
* See https://github.com/expressjs/compression#chunksize regarding the usage.
*/
chunkSize?: number;
/**
* See https://github.com/expressjs/compression#level regarding the usage.
*/
level?: number;
/**
* See https://github.com/expressjs/compression#memlevel regarding the usage.
*/
memLevel?: number;
/**
* See https://github.com/expressjs/compression#strategy regarding the usage.
*/
strategy?: number;
/**
* See https://github.com/expressjs/compression#threshold regarding the usage.
*/
threshold?: number|string;
/**
* See https://github.com/expressjs/compression#windowbits regarding the usage.
*/
windowBits?: number;
/**
* See https://github.com/expressjs/compression#filter regarding the usage.
*/
filter?: Function;
/**
* See https://nodejs.org/api/zlib.html#zlib_class_options regarding the usage.
*/
flush?: number;
/**
* See https://nodejs.org/api/zlib.html#zlib_class_options regarding the usage.
*/
finishFlush?: number;
}
}
function e(options?: e.CompressionOptions): express.RequestHandler;
export = e;
}