Installation
npm install --save @types/type-is
Summary
This package contains type definitions for type-is (https://github.com/jshttp/type-is#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/type-is.
import { IncomingMessage } from "http";
export = typeIs;
declare function typeIs(request: IncomingMessage, types: string[]): string | false | null;
declare function typeIs(request: IncomingMessage, ...types: string[]): string | false | null;
declare namespace typeIs {
function normalize(type: string): string | false;
function hasBody(request: IncomingMessage): boolean;
function is(mediaType: string, types: string[]): string | false;
function is(mediaType: string, ...types: string[]): string | false;
function match(expected: false | string, actual: string): boolean;
}
Additional Details
- Last updated: Wed, 15 Jan 2025 05:02:45 GMT
- Dependencies: @types/node
Credits
These definitions were written by BendingBender.