@types/type-is
TypeScript icon, indicating that this package has built-in type declarations

1.6.6 • Public • Published

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

/// <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, 07 Nov 2023 15:11:36 GMT
  • Dependencies: @types/node

Credits

These definitions were written by BendingBender.

Versions

Current Tags

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.6.6
    108,377
  • 1.6.5
    1,217
  • 1.6.4
    12,935
  • 1.6.3
    44,631
  • 1.6.2
    20
  • 1.6.1
    0
  • 1.6.0
    0

Package Sidebar

Install

npm i @types/type-is

Weekly Downloads

167,180

Version

1.6.6

License

MIT

Unpacked Size

3.88 kB

Total Files

5

Last publish

Collaborators

  • types