i18n-pro
Version:
An out-of-the-box, lightweight JavaScript i18n auto-translation solution
18 lines (17 loc) • 684 B
TypeScript
export declare const STYLE_EOF = "\u001B[0m";
declare const basic8Color: readonly ["black", "red", "green", "yellow", "blue", "magenta", "cyan", "white"];
declare const modifier: {
bold: string;
italic: string;
underline: string;
};
declare type UnionType<T extends string, R extends typeof modifier> = T | `${T}Bright` | `bg${Capitalize<T>}` | `bg${Capitalize<T>}Bright` | keyof R;
declare type OperateType = UnionType<typeof basic8Color[number], typeof modifier>;
interface Chalk extends Record<OperateType, Chalk> {
(...res: Array<string | number>): string;
}
/**
* 基础的chalk函数实现
*/
declare const chalk: Chalk;
export default chalk;