UNPKG

@nativescript/core

Version:

A JavaScript library providing an easy to use api for interacting with iOS and Android platform APIs.

22 lines (21 loc) 1.2 kB
import { EventData, Observable } from '../data/observable'; declare function checkIfMediaQueryMatches(mediaQueryString: string): boolean; declare function matchMedia(mediaQueryString: string): MediaQueryListImpl; declare class MediaQueryListImpl extends Observable implements MediaQueryList { static readonly changeEvent = "change"; _media: string; _matches: boolean; private _onChange; private mediaQueryChangeListeners; constructor(); get media(): string; get matches(): boolean; addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: any, once?: boolean): void; removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: any): void; addListener(callback: (this: MediaQueryList, ev: MediaQueryListEvent) => any): void; removeListener(callback: (this: MediaQueryList, ev: MediaQueryListEvent) => any): void; get onchange(): (this: MediaQueryList, ev: MediaQueryListEvent) => any; set onchange(callback: (this: MediaQueryList, ev: MediaQueryListEvent) => any); private _throwInvocationError; } export { matchMedia, MediaQueryListImpl as MediaQueryList, checkIfMediaQueryMatches };