npm.io
0.3.3 • Published 2 years ago

@types/matchmediaquery

Licence
MIT
Version
0.3.3
Deps
0
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/matchmediaquery

Summary

This package contains type definitions for matchmediaquery (https://github.com/ncochard/matchmediaquery#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/matchmediaquery.

index.d.ts

type MediaValues = Record<
    | "aspect-ratio"
    | "color-index"
    | "color"
    | "device-aspect-ratio"
    | "device-height"
    | "device-width"
    | "grid"
    | "height"
    | "monochrome"
    | "orientation"
    | "resolution"
    | "scan"
    | "type"
    | "width",
    unknown
>;

declare class Mql {
    constructor(query: string, values?: Partial<MediaValues>, forceStatic?: boolean);

    update(evt: Mql): void;

    dispose(): void;

    matches: boolean;

    media: string;
}

declare function matchMedia(query: string, values?: Partial<MediaValues>, forceStatic?: boolean): Mql;
export = matchMedia;

Additional Details

  • Last updated: Tue, 07 Nov 2023 0939 GMT
  • Dependencies: none

Credits

These definitions were written by Nick Whitlock.