Skip to content

Commit

Permalink
fix: missing d.ts function declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
xseman committed May 11, 2024
1 parent 23f910f commit 1b9b730
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 4 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const defaults: Config = {
withContext: true,
};

module.exports = function jsonLayout(config: Config): log4js.LayoutFunction {
export function jsonLayout(config: Config): log4js.LayoutFunction {
config = Object.assign(config, defaults);

return function layout(event: log4js.LoggingEvent): string {
Expand All @@ -62,4 +62,6 @@ module.exports = function jsonLayout(config: Config): log4js.LayoutFunction {
const output = JSON.stringify(formated);
return output;
};
};
}

module.exports = jsonLayout;
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"type": "git",
"url": "git+https://github.com/xseman/log4js-layout-json.git"
},
"type": "module",
"scripts": {
"build": "tsc",
"pretest": "tsc",
Expand Down

0 comments on commit 1b9b730

Please sign in to comment.