Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@types/type-is) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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.
index.d.ts
// Type definitions for type-is 1.6
// Project: https://github.com/jshttp/type-is#readme
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/// <reference types="node" />
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 mimeMatch(expected: false | string, actual: string): boolean;
}
Additional Details
- Last updated: Tue, 12 Sep 2023 12:34:57 GMT
- Dependencies: @types/node
- Global values: none
Credits
These definitions were written by BendingBender.