JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 388905
  • Score
    100M100P100Q173404F
  • License MIT

TypeScript definitions for type-is

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

    /// <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 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.