UNPKG

nsole

Version:

A drop-in isomorphic console.* replacement that's pretty, small, fast, and flexible

14 lines 1.67 kB
import type { ColorSpace, Definitions, DefinitionsD, DefinitionsDP, EnvKeyValMap, GetEnvVal, LogFn, LogLevel, PluginFn, PtagInstance } from './../types.ts'; /** // ###[IF]is_any=1;sed=/ptag/{#}tag{+}/; * browser ptag logger * @template M - custom log method names (otherwise ptag infers/handles automatically from def) * @param {string} [id='{}'] - (id)entifier tag/text with '{}' method placeholder * @param {L} [level=5] - log visibility threshold (-1=native, 0=silent, 1-5=verbosity) * @param {Definitions<M>} [definitions] - method definitions & styling overrides * @param {PluginFn<M>} [pluginFn] - log transformation/interception plugin * @param {ColorSpace} [colorSpace=1] - color space/support (0-1=on/off, -neg=same + disables-cache) * @returns {PtagInstance} configured ptag (ProxyConstructor) instance */ export declare const ptag: <M extends string = never>(id?: null | string, level?: null | number, definitions?: null | Definitions<M>, pluginFn?: null | PluginFn<M>, colorSpace?: null | ColorSpace, i?: "_id", s?: "_def", l?: "_lvl", G?: "PTAG_", F?: "_FORCE", eobj?: any, lnoop?: LogFn, tof?: <T>(v: unknown, k?: string) => v is T, gthis?: any, getEnvDefVal?: GetEnvVal<M, keyof EnvKeyValMap<M>>, [[idG, idF], [lvlG, lvlF], [pluginG, pluginF], [defsG, defsF]]?: [[string, string | null], [LogLevel, LogLevel | null], [PluginFn<M> | null | undefined, PluginFn<M> | null | undefined], [Partial<DefinitionsD>, Partial<DefinitionsD | null>]], _defs?: DefinitionsD<M>, setStyle?: (value?: null | DefinitionsDP, dvalue?: DefinitionsD) => DefinitionsD, isForceRerun?: boolean, gconsole?: Console) => PtagInstance<M>; //# sourceMappingURL=_tmpl_.d.ts.map