Skip to content

Commit 3006ce7

Browse files
authored
Update typescript defs (#121)
1 parent 4bfee0d commit 3006ce7

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

index.d.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FastifyPlugin, FastifyReply, FastifyRequest, RawServerBase, RequestGenericInterface } from 'fastify';
1+
import { FastifyPlugin, FastifyReply, FastifyRequest } from 'fastify';
22
import { Input, InputObject } from 'into-stream';
33
import { Stream } from 'stream';
44
import { BrotliOptions, ZlibOptions } from 'zlib';
@@ -19,12 +19,12 @@ export interface FastifyCompressOptions {
1919
brotliOptions?: BrotliOptions
2020
zlibOptions?: ZlibOptions
2121
inflateIfDeflated?: boolean
22-
onUnsupportedEncoding?: (encoding: string, request: FastifyRequest<RequestGenericInterface, RawServerBase>, reply: FastifyReply<RawServerBase>) => string | Buffer | Stream
22+
onUnsupportedEncoding?: (encoding: string, request: FastifyRequest, reply: FastifyReply) => string | Buffer | Stream
2323
encodings?: Array<EncodingToken>
2424
requestEncodings?: Array<EncodingToken>
2525
forceRequestEncoding?: EncodingToken
26-
  onUnsupportedRequestEncoding?: (encoding: string, request: FastifyRequest<RequestGenericInterface, RawServerBase>, reply: FastifyReply<RawServerBase>) => Error | undefined | null
27-
onInvalidRequestPayload?: (encoding: string, request: FastifyRequest<RequestGenericInterface, RawServerBase>, error: Error) => Error | undefined | null
26+
  onUnsupportedRequestEncoding?: (encoding: string, request: FastifyRequest, reply: FastifyReply) => Error | undefined | null
27+
onInvalidRequestPayload?: (encoding: string, request: FastifyRequest, error: Error) => Error | undefined | null
2828
}
2929

3030
declare const fastifyCompress: FastifyPlugin<FastifyCompressOptions>

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "index.js",
66
"dependencies": {
77
"encoding-negotiator": "^2.0.0",
8-
"fastify-plugin": "^2.0.0",
8+
"fastify-plugin": "^2.2.0",
99
"into-stream": "^5.1.1",
1010
"is-deflate": "^1.0.0",
1111
"is-gzip": "^2.0.0",
@@ -20,16 +20,16 @@
2020
"unzipper": "^0.10.8"
2121
},
2222
"devDependencies": {
23-
"@types/node": "^14.0.1",
24-
"@typescript-eslint/parser": "^3.0.0",
23+
"@types/node": "^14.0.27",
24+
"@typescript-eslint/parser": "^3.8.0",
2525
"eslint-plugin-typescript": "^0.14.0",
2626
"fastify": "^3.0.0",
2727
"jsonstream": "^1.0.3",
2828
"pre-commit": "^1.2.2",
2929
"standard": "^14.3.1",
30-
"tap": "^14.10.7",
30+
"tap": "^14.10.8",
3131
"tsd": "^0.13.1",
32-
"typescript": "^3.7.5"
32+
"typescript": "^3.9.7"
3333
},
3434
"scripts": {
3535
"unit": "tap test/*.js",

0 commit comments

Comments
 (0)