update types

This commit is contained in:
Philipp Kunz 2018-03-01 23:31:47 +01:00
parent f5180240ca
commit f5de4f5879
2 changed files with 9 additions and 7 deletions

14
dist/index.d.ts vendored
View File

@ -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;
} }

View File

@ -18,5 +18,5 @@ export interface ILogPackage {
} }
export interface ILogDestination { export interface ILogDestination {
handleLog: (ILogPackage) => void; handleLog: (logPackage: ILogPackage) => void;
} }