mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Fix accepts.types()
accepts.types is an alias of accepts.type
This commit is contained in:
Vendored
+5
-7
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user