UNPKG

608 BJavaScriptView Raw
1/** @flow */
2/* eslint-disable no-use-before-define, block-scoped-const */
3
4import type {PluginConfig, PluginResult} from './plugins';
5
6type MediaQueryListListener = (mql: MediaQueryList) => void;
7
8type MediaQueryList = {
9 matches: boolean,
10 addListener(listener: MediaQueryListListener): void,
11 removeListener(listener: MediaQueryListListener): void,
12};
13
14export type Plugin = (pluginConfig: PluginConfig) => PluginResult;
15export type MatchMediaType = (mediaQueryString: string) => MediaQueryList;
16
17export type Config = {
18 matchMedia?: MatchMediaType,
19 plugins?: Array<Plugin>,
20 userAgent?: string,
21};