Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Eric Byers
committed
Dec 30, 2015
1 parent
dc9dabe
commit e59b587
Showing
2 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/// <reference path="console-stamp.d.ts" /> | ||
|
||
import consoleStamp = require("console-stamp"); | ||
|
||
consoleStamp(console); | ||
|
||
var options = {}; | ||
consoleStamp(console, options); | ||
|
||
var options2 = { | ||
metadata: function ():string { | ||
return 'string'; | ||
}, | ||
colors: { | ||
stamp: "yellow", | ||
label: "white", | ||
metadata: "green" | ||
}, | ||
label: true | ||
}; | ||
consoleStamp(console, options2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Type definitions for console-stamp 0.2.0 | ||
// Project: https://github.com/starak/node-console-stamp | ||
// Definitions by: Eric Byers <https://github.com/ericbyers/> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
|
||
declare module 'console-stamp' { | ||
|
||
function consoleStamp(console:{}, options?: { | ||
/** | ||
* A string with date format based on Javascript Date Format | ||
*/ | ||
pattern?: string | ||
|
||
/** | ||
* If true it will show the label (LOG | INFO | WARN | ERROR) | ||
*/ | ||
label?: boolean; | ||
|
||
/** | ||
* An array containing the methods to include in the patch | ||
*/ | ||
include?: any; | ||
|
||
/** | ||
* An array containing the methods to exclude in the patch) | ||
*/ | ||
exclude?: any; | ||
|
||
/** | ||
* Types can be String, Object (interpreted with util.inspect), or Function. See the test-metadata.js for examples. | ||
* Note that metadata can still be sent as the third parameter (as in vesion 1.6) as a backward compatibillity feature, but this is deprecated. | ||
*/ | ||
metadata?: any; | ||
|
||
/** | ||
* An object representing a color theme. More info https://www.npmjs.com/package/colors | ||
*/ | ||
colors?: { | ||
stamp?: any; | ||
label?: any; | ||
metadata?: any; | ||
}; | ||
}): void; | ||
|
||
export = consoleStamp; | ||
} |