mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
bunyan-blackhole : Initial commit for v0.2.0 (#14668)
* Initial commit for v0.2.0 * added tslint compliance
This commit is contained in:
parent
f4e385218b
commit
9af10f325e
26
bunyan-blackhole/bunyan-blackhole-tests.ts
Normal file
26
bunyan-blackhole/bunyan-blackhole-tests.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import blackhole = require("bunyan-blackhole");
|
||||
|
||||
|
||||
|
||||
var logsLaboursLost = blackhole("lost");
|
||||
|
||||
const rotten = new Error("Something is rotten in the state of Denmark");
|
||||
|
||||
logsLaboursLost.info(rotten, "Play %s", "Hamlet");
|
||||
logsLaboursLost.debug(rotten, "Play %s", "King Lear");
|
||||
logsLaboursLost.trace(rotten, "Play %s", "Much Ado About Nothing");
|
||||
logsLaboursLost.warn(rotten, "Play %s", "All's Well That Ends Well");
|
||||
logsLaboursLost.error(rotten, "Play %s", "Romeo and Juliet");
|
||||
|
||||
logsLaboursLost.error("Something is rotten in the state of Denmark");
|
||||
|
||||
logsLaboursLost.debug({character: "Marcellus", play: "King Lear"}, "Friends of my soul, you twain");
|
||||
logsLaboursLost.trace({play: "All's Well That Ends Well"}, "Love all, trust a few, do wrong to none");
|
||||
logsLaboursLost.info({play: "Much Ado About Nothing"}, "Let me be that I am and seek not to alter me.");
|
||||
logsLaboursLost.warn({play: "All's Well That Ends Well"}, "Love all, trust a few, do wrong to none");
|
||||
logsLaboursLost.error({play: "All's Well That Ends Well"}, "Love all, trust a few, do wrong to none");
|
||||
|
||||
var hamlet = logsLaboursLost.child({play: "Hamlet"});
|
||||
hamlet.info({character: "Polonius"}, "Though this be madness, yet there is method in't");
|
||||
|
||||
|
||||
14
bunyan-blackhole/index.d.ts
vendored
Normal file
14
bunyan-blackhole/index.d.ts
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
// Type definitions for bunyan-blackhole 0.2
|
||||
// Project: https://github.com/Floby/node-bunyan-blackhole
|
||||
// Definitions by: Olivier Chevet <https://github.com/olivr70>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import * as Logger from "bunyan";
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param {string} [name] name of the blackhole Logger
|
||||
* @return {Logger} A bunyan logger .
|
||||
*/
|
||||
declare function bunyanBlackHole(name: string): Logger;
|
||||
export = bunyanBlackHole;
|
||||
22
bunyan-blackhole/tsconfig.json
Normal file
22
bunyan-blackhole/tsconfig.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"bunyan-blackhole-tests.ts"
|
||||
]
|
||||
}
|
||||
1
bunyan-blackhole/tslint.json
Normal file
1
bunyan-blackhole/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "../tslint.json" }
|
||||
Loading…
Reference in New Issue
Block a user