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; } }