From 83dcdc3d87a3a2289d584ec831b8e9d5d3cb8f67 Mon Sep 17 00:00:00 2001 From: Dave Wasmer Date: Wed, 6 Sep 2017 00:17:33 -0600 Subject: [PATCH] Fix accepts.types() accepts.types is an alias of accepts.type --- types/accepts/index.d.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/types/accepts/index.d.ts b/types/accepts/index.d.ts index 1fef801986..08ac71e919 100644 --- a/types/accepts/index.d.ts +++ b/types/accepts/index.d.ts @@ -44,16 +44,14 @@ declare namespace accepts { /** * Return the first accepted type (and it is returned as the same text as what appears in the `types` array). If nothing in `types` is accepted, then `false` is returned. + * If no types are supplied, return the entire set of acceptable types. * * The `types` array can contain full MIME types or file extensions. Any value that is not a full MIME types is passed to `require('mime-types').lookup`. */ - type(types: string[]): string | false; - type(...types: string[]): string | false; - - /** - * Return the types that the request accepts, in the order of the client's preference (most preferred first). - */ - types(): string[]; + type(types: string[]): string[] | string | false; + type(...types: string[]): string[] | string | false; + types(types: string[]): string[] | string | false; + types(...types: string[]): string[] | string | false; } }