Skip to content

Commit

Permalink
feat: including typesript types.
Browse files Browse the repository at this point in the history
  • Loading branch information
mateodelnorte committed Sep 13, 2022
1 parent 9c452bc commit e05d062
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 15 deletions.
15 changes: 15 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
declare type BunyanLogFunction = (formatMessage?: string, ...interpolationArg?: unknown) => void;
declare type DebugLogFunction = (formatMessage?: string, ...interpolationArg?: unknown) => void;
declare type PinoLogFunction = (merginObject?: unknown, formatMessage?: string, ...interpolationArg?: unknown) => void;
declare type LlogFunction = BunyanLogFunction | DebugLogFunction | PinoLogFunction;

declare module "llog" {
export default {
trace: LlogFunction,
debug: LlogFunction,
info: LlogFunction,
warn: LlogFunction,
error: LlogFunction,
fatal: LlogFunction,
}
}
31 changes: 16 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
{
"name": "llog",
"version": "0.0.0-development",
"author": "mattwalters5@gmail.com",
"dependencies": {
"debug": "^4.3.4"
},
"description": "simple multi-level application logging module",
"main": "index.js",
"scripts": {
"perf-test": "time node ./test/load-test.js >> /dev/null",
"pre-test": "npm install bunyan pino --no-save",
"test": "make test"
"devDependencies": {
"mocha": "10.0.0"
},
"license": "BSD-2-Clause",
"main": "index.js",
"name": "llog",
"repository": {
"type": "git",
"url": "git@github.com:mateodelnorte/llog.git"
},
"author": "mattwalters5@gmail.com",
"license": "BSD-2-Clause",
"dependencies": {
"debug": "^4.3.4"
"scripts": {
"perf-test": "time node ./test/load-test.js >> /dev/null",
"pre-test": "npm install bunyan pino --no-save",
"test": "make test"
},
"devDependencies": {
"mocha": "10.0.0"
}
}
"types": "index.d.ts",
"version": "0.0.0-development"
}

0 comments on commit e05d062

Please sign in to comment.