import { Color } from './util'; export type StyleDef = { fg?: Color; bg?: Color; }; export declare const styles: Record; export type StyleName = keyof typeof styles; export type StyleOptions = { styles?: Record; }; export declare class Style { protected colorFormat: boolean; readonly styles: Record; [key: string]: ((val: any) => string) | any; constructor(options?: StyleOptions); addStyleMethods(): void; /** * Enables or disables color formatting. * @param {boolean} [val=true] - If true, color formatting is enabled. */ enable(val?: boolean): void; /** * Adds a style to the style map or replace an existing style * @param {string} name - The name of the style. * @param {StyleDef} styleDef - The style definition. */ addStyle(name: string, styleDef: StyleDef): void; format(val: any, style: StyleName | StyleDef): string; } export type StyleInstance = Style & Record string>;