UNPKG

@augment-vir/common

Version:

A collection of augments, helpers types, functions, and classes for any JavaScript environment.

36 lines (35 loc) 1.11 kB
import { LogColorKey, type LogColorConfig } from './log-colors.js'; import { type LogWriterParams } from './log-writer.js'; /** * Options for a custom Logger. * * @category Log : Util * @category Package : @augment-vir/common * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) */ export type LoggerOptions = { colorConfig: LogColorConfig; omitColors: boolean; }; /** * Parameters for {@link toLogString}. * * @category Log : Util * @category Package : @augment-vir/common * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) */ export type ToLogStringParams = { colorKey: LogColorKey; args: ReadonlyArray<any>; options: Readonly<LoggerOptions>; }; type ToLogString = (params: Readonly<ToLogStringParams>) => LogWriterParams; /** * Converts log arguments into a single {@link LogWriterParams}. * * @category Log : Util * @category Package : @augment-vir/common * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) */ export declare const toLogString: ToLogString; export {};