Add exports
This commit is contained in:
parent
6daf815ea8
commit
eeed068ddd
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "logging",
|
||||
"version": "3.0.3",
|
||||
"version": "3.0.4",
|
||||
"description": "",
|
||||
"author": "Fabian Stamm <dev@fabianstamm.de>",
|
||||
"contributors": [],
|
||||
|
@ -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",
|
||||
|
17
src/base.ts
17
src/base.ts
@ -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
|
||||
|
@ -14,6 +14,8 @@ export {
|
||||
TerminalFormats,
|
||||
Formatted,
|
||||
IFormatted,
|
||||
ILoggingInterface,
|
||||
ILoggingTimer,
|
||||
} from "./types.js";
|
||||
|
||||
const Logging = new LoggingBase();
|
||||
|
16
src/types.ts
16
src/types.ts
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user