@exadel/esl
Version:
Exadel Smart Library (ESL) is the lightweight custom elements library that provide a set of super-flexible components
25 lines (24 loc) • 826 B
TypeScript
/**
* Static shortcuts preprocessor. Used to store device related shortcuts.
* @author Alexey Stsefanovich (ala'n)
*
* @implements IMediaQueryPreprocessor statically
*/
export declare class ESLEnvShortcuts {
private static readonly _shortcuts;
/**
* Add mapping
* @param shortcut - term to find in query
* @param value - media query string or boolean result (that represents `all` or `not all` conditions)
*/
static add(shortcut: string, value: string | boolean): void;
/** Remove mapping for passed shortcut term */
static remove(shortcut: string): boolean;
/** Replaces shortcut to registered result */
static process(match: string): string | boolean | undefined;
}
declare global {
export interface ESLLibrary {
EnvShortcuts: typeof ESLEnvShortcuts;
}
}