Add exports

This commit is contained in:
Fabian Stamm 2021-05-08 22:24:00 +02:00
parent 6daf815ea8
commit eeed068ddd
5 changed files with 21 additions and 18 deletions

View File

@ -1,6 +1,6 @@
{
"name": "logging",
"version": "3.0.3",
"version": "3.0.4",
"description": "",
"author": "Fabian Stamm <dev@fabianstamm.de>",
"contributors": [],

View File

@ -1,6 +1,6 @@
{
"name": "@hibas123/logging",
"version": "3.0.3",
"version": "3.0.4",
"description": "",
"main": "out/index.js",
"types": "out/index.d.ts",

View File

@ -6,28 +6,13 @@ import {
Format,
FormatConfig,
Formatted,
ILoggingInterface,
LoggingTypes,
Message,
} from "./types.js";
const browser = typeof window !== "undefined";
export interface ILoggingTimer {
end: () => number;
}
export interface ILoggingInterface {
debug(...message: any[]): void;
log(...message: any[]): void;
warn(...message: any[]): void;
error(...message: any[]): void;
time(name?: string): ILoggingTimer;
timeEnd(id: string): number;
getChild(name: string): ILoggingInterface;
}
export interface ILoggingOptions {
/**
* Name will be prefixed on Console output and added to logfiles, if not specified here

View File

@ -14,6 +14,8 @@ export {
TerminalFormats,
Formatted,
IFormatted,
ILoggingInterface,
ILoggingTimer,
} from "./types.js";
const Logging = new LoggingBase();

View File

@ -234,3 +234,19 @@ export interface Adapter {
*/
close?(): void;
}
export interface ILoggingTimer {
end: () => number;
}
export interface ILoggingInterface {
debug(...message: any[]): void;
log(...message: any[]): void;
warn(...message: any[]): void;
error(...message: any[]): void;
time(name?: string): ILoggingTimer;
timeEnd(id: string): number;
getChild(name: string): ILoggingInterface;
}