Skip to content

Commit

Permalink
Add triple beam properties to types (#194)
Browse files Browse the repository at this point in the history
* add triple beam properties to types

* run npm install to update lock

---------

Minor merge conflict in package-lock.json resolved by @wbt
  • Loading branch information
robinpokorny authored Feb 6, 2023
1 parent fdc37d1 commit ead6256
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
// Type definitions for logform 1.2
// Type definitions for logform 2.x
// Project: https://github.com/winstonjs/logform
// Definitions by: DABH <https://github.com/DABH>
// Definitions: https://github.com/winstonjs/logform
// TypeScript Version: 2.2
import {LEVEL, MESSAGE, SPLAT} from 'triple-beam'

export interface TransformableInfo {
level: string;
message: any;
[LEVEL]?: string;
[MESSAGE]?: any;
[SPLAT]?: any;
[key: string]: any;
}

Expand Down
25 changes: 25 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"@babel/core": "^7.10.3",
"@babel/preset-env": "^7.10.3",
"@dabh/eslint-config-populist": "^5.0.0",
"@types/triple-beam": "^1.3.2",
"assume": "^2.2.0",
"eslint": "^8.8.0",
"mocha": "^10.0.0",
Expand Down

2 comments on commit ead6256

@G0ldDiggAA
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It brakes the library in TS:

node_modules/logform/index.d.ts(11,3): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.

@wbt
Copy link
Contributor

@wbt wbt commented on ead6256 Feb 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@G0ldDiggAA I think that's addressed in #242 but thanks for tagging the specific commit.

Please sign in to comment.