@timberio/types
Advanced tools
Comparing version 0.30.0 to 0.31.0
@@ -30,4 +30,11 @@ /** | ||
/** | ||
* Interface representing a Timber log | ||
* Context type - a string/number/bool/Date, or a nested object of the same | ||
*/ | ||
export declare type ContextKey = string | number | boolean | Date; | ||
export declare type Context = { | ||
[key: string]: ContextKey | Context; | ||
}; | ||
/** | ||
* Interface representing a minimal Timber log | ||
*/ | ||
export interface ITimberLog { | ||
@@ -37,3 +44,3 @@ dt: Date; | ||
message: string; | ||
context?: object; | ||
[key: string]: ContextKey | Context; | ||
} | ||
@@ -40,0 +47,0 @@ /** |
@@ -30,4 +30,11 @@ /** | ||
/** | ||
* Interface representing a Timber log | ||
* Context type - a string/number/bool/Date, or a nested object of the same | ||
*/ | ||
export declare type ContextKey = string | number | boolean | Date; | ||
export declare type Context = { | ||
[key: string]: ContextKey | Context; | ||
}; | ||
/** | ||
* Interface representing a minimal Timber log | ||
*/ | ||
export interface ITimberLog { | ||
@@ -37,3 +44,3 @@ dt: Date; | ||
message: string; | ||
context?: object; | ||
[key: string]: ContextKey | Context; | ||
} | ||
@@ -40,0 +47,0 @@ /** |
{ | ||
"name": "@timberio/types", | ||
"version": "0.30.0", | ||
"version": "0.31.0", | ||
"description": "Timber.io - Typescript types", | ||
@@ -40,3 +40,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "16941238360eae52d6106dc864e11678fbac0636", | ||
"gitHead": "03cb2806851c894e300389565ceae08df857461a", | ||
"dependencies": { | ||
@@ -43,0 +43,0 @@ "js": "^0.1.0" |
@@ -66,3 +66,3 @@ # 🌲 Timber - Shared Typescript types | ||
Warn = "warn", | ||
Error = "error", | ||
Error = "error" | ||
} | ||
@@ -69,0 +69,0 @@ ``` |
@@ -36,4 +36,10 @@ /** | ||
/** | ||
* Interface representing a Timber log | ||
* Context type - a string/number/bool/Date, or a nested object of the same | ||
*/ | ||
export type ContextKey = string | number | boolean | Date; | ||
export type Context = { [key: string]: ContextKey | Context }; | ||
/** | ||
* Interface representing a minimal Timber log | ||
*/ | ||
export interface ITimberLog { | ||
@@ -43,3 +49,3 @@ dt: Date; | ||
message: string; | ||
context?: object; | ||
[key: string]: ContextKey | Context; | ||
} | ||
@@ -46,0 +52,0 @@ |
9688
176