3.0.2 • Published 6 months ago

@types/whatwg-mimetype v3.0.2

Weekly downloads
59,141
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/whatwg-mimetype

Summary

This package contains type definitions for whatwg-mimetype (https://github.com/jsdom/whatwg-mimetype#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/whatwg-mimetype.

index.d.ts

// Type definitions for whatwg-mimetype 2.1
// Project: https://github.com/jsdom/whatwg-mimetype#readme
// Definitions by: Pete Johanson <https://github.com/petejohanson>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

export = MIMEType;

declare class MIMEType {
  type: string;
  subtype: string;

  readonly essence: string;
  readonly parameters: Map<string, string>;

  static parse(s: string): MIMEType | null;

  constructor(s: string);

  isHTML(): boolean;
  isXML(): boolean;
  isJavaScript(opts?: { allowParameters?: boolean | undefined }): boolean;
}

Additional Details

  • Last updated: Fri, 02 Jul 2021 18:05:36 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Pete Johanson.