From eb2a4486332371ebcdb4eaff4f02d4e919ecac29 Mon Sep 17 00:00:00 2001 From: Oliver Joseph Ash Date: Thu, 7 May 2020 13:46:16 +0100 Subject: [PATCH] Make `filter` optional Fixes https://github.com/Alorel/shrink-ray/issues/52 --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 78b20f26..15fb6a6e 100644 --- a/index.d.ts +++ b/index.d.ts @@ -11,7 +11,7 @@ interface Filterable { * The default filter function uses the compressible module to determine if * res.getHeader('Content-Type') is compressible. */ - filter(req: Request, res: Response): boolean; + filter?(req: Request, res: Response): boolean; } interface ShrinkRayOptions extends Filterable {