UNPKG

@types/matchmediaquery

Version:
52 lines (40 loc) 1.26 kB
# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/matchmediaquery/index.d.ts) ````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 09:09:39 GMT * Dependencies: none # Credits These definitions were written by [Nick Whitlock](https://github.com/eezstreet).