interface RemoveAllListeners { removeAllListeners: () => void; } /** * MediaQueryList is the name of the interface that `window.matchMedia` natively * returns. This class is designed to imitate it as closely as possible for use * within JSDOM. */ export declare class MockMediaQueryList implements MediaQueryList, RemoveAllListeners { #private; readonly media: string; constructor(query: string); get matches(): boolean; /** * Can be manually modified on the instance to listen to changes. * When available, prefer using `addEventListener`. */ onchange: MediaQueryList['onchange']; private _addListener; private _removeListener; /** * https://caniuse.com/mdn-api_mediaquerylistevent * @deprecated */ addListener(callback: EventListener): void; /** * https://caniuse.com/mdn-api_mediaquerylistevent * @deprecated */ removeListener(callback: EventListener): void; /** * Add an event listener to respond to changes in the value of `matches`. * Currently, the only supported option is `once`, which, if set to true, * automatically removes the event listener after a single callback. */ addEventListener(type: string, callback: EventListener, options?: AddEventListenerOptions): void; /** * Remove an event listener by function reference. */ removeEventListener(type: string, callback: EventListener): void; /** * Dispatches a synthetic event and executes callbacks for any listeners. */ dispatchEvent(event: MediaQueryListEvent): boolean; /** * Just to be safe, removes all hanging listeners when resetting mocks. */ removeAllListeners(): void; } export {};