diff --git a/test/test.ts b/test/test.ts index 71e19a5..99e50f1 100644 --- a/test/test.ts +++ b/test/test.ts @@ -1,8 +1,8 @@ -import { expect, tap } from 'tapbundle' -import * as commonlog from '../ts/index' +import { expect, tap } from 'tapbundle'; +import * as commonlog from '../ts/index'; tap.test('first test', async () => { - console.log('Since this is an interface package, there is nothing to test dynamically :)') -}) + console.log('Since this is an interface package, there is nothing to test dynamically :)'); +}); -tap.start() +tap.start(); diff --git a/ts/index.ts b/ts/index.ts index 8a1ebf7..68a3825 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -1,10 +1,6 @@ -export type TLogLevel = - | "error" - | "warn" - | "info" - | "verbose" - | "debug" - | "silly"; +export type TLogLevel = 'error' | 'warn' | 'info' | 'verbose' | 'debug' | 'silly'; +export type TEnvironment = 'local' | 'test' | 'staging' | 'production'; +export type TRuntime = 'node' | 'browser'; export interface ILogContext { zone?: string; @@ -15,13 +11,12 @@ export interface ILogContext { runtime: TRuntime; } -export type TEnvironment = "local" | "test" | "staging" | "production"; -export type TRuntime = "node" | "browser"; - -export interface IHandleLogFunc { - (logObject): void +export interface ILogPackage { + logContext: ILogContext; + logLevel: TLogLevel + message: string; } export interface ILogDestination { - handleLog: IHandleLogFunc -} \ No newline at end of file + handleLog: (ILogPackage) => void; +}