@cmtlyt/logger
Version:
22 lines (21 loc) • 648 B
TypeScript
import type { CustomColorizerOptions, ThemeColor } from './types';
/**
* 尝试导入yoctocolors,如果不可用则返回null
*/
export declare const tryImportColors: (() => null) | (() => Promise<any>);
/**
* 默认颜色映射配置
*/
export declare const colorMap: Record<string, ThemeColor>;
/**
* 获取默认颜色配置
* @param type 日志类型
* @returns 颜色配置对象
*/
export declare function getDefaultColors(type: string): ThemeColor;
/**
* 默认着色器函数
* @param options 着色器选项
* @returns 着色后的文本
*/
export declare function defaultApplyColor(options: CustomColorizerOptions): string;