update types
This commit is contained in:
parent
f5180240ca
commit
f5de4f5879
14
dist/index.d.ts
vendored
14
dist/index.d.ts
vendored
@ -1,4 +1,6 @@
|
|||||||
export declare type TLogLevel = "error" | "warn" | "info" | "verbose" | "debug" | "silly";
|
export declare type TLogLevel = 'error' | 'warn' | 'info' | 'verbose' | 'debug' | 'silly';
|
||||||
|
export declare type TEnvironment = 'local' | 'test' | 'staging' | 'production';
|
||||||
|
export declare type TRuntime = 'node' | 'browser';
|
||||||
export interface ILogContext {
|
export interface ILogContext {
|
||||||
zone?: string;
|
zone?: string;
|
||||||
company?: string;
|
company?: string;
|
||||||
@ -7,11 +9,11 @@ export interface ILogContext {
|
|||||||
environment: TEnvironment;
|
environment: TEnvironment;
|
||||||
runtime: TRuntime;
|
runtime: TRuntime;
|
||||||
}
|
}
|
||||||
export declare type TEnvironment = "local" | "test" | "staging" | "production";
|
export interface ILogPackage {
|
||||||
export declare type TRuntime = "node" | "browser";
|
logContext: ILogContext;
|
||||||
export interface IHandleLogFunc {
|
logLevel: TLogLevel;
|
||||||
(logObject: any): void;
|
message: string;
|
||||||
}
|
}
|
||||||
export interface ILogDestination {
|
export interface ILogDestination {
|
||||||
handleLog: IHandleLogFunc;
|
handleLog: (logPackage: ILogPackage) => void;
|
||||||
}
|
}
|
||||||
|
@ -18,5 +18,5 @@ export interface ILogPackage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface ILogDestination {
|
export interface ILogDestination {
|
||||||
handleLog: (ILogPackage) => void;
|
handleLog: (logPackage: ILogPackage) => void;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user