express-winston: relax types on meta object#25036
express-winston: relax types on meta object#25036RyanCavanaugh merged 2 commits intoDefinitelyTyped:masterfrom dylanscott:master
Conversation
|
@dylanscott Thank you for submitting this PR! 🔔 @bricka - please review this PR in the next few days. Be sure to explicitly select If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead. |
bricka
left a comment
There was a problem hiding this comment.
First of all, awesome thanks for all of these improvements!
I'm a bit confused by this one. According to the express-winston docs, this needs to be an object:
https://github.com/bithavoc/express-winston#options
If you look at the Winston code itself, the examples also use an object here:
https://github.com/winstonjs/winston/blob/master/examples/metadata.js
I'm a bit inclined to say that the winston types should be updated to expect an object as opposed to making this accept any.
What do you think?
|
That's a good point, the |
|
🔔 @bricka - Thanks for your review of this PR! Can you please look at the new code and update your review status if appropriate? |
|
A definition author has approved this PR ⭐️. A maintainer will merge this PR shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait. Thank you for your contribution to DefinitelyTyped! |
Relaxes the type of the metadata object in express-winston. Winston's own typings use
anyfor the meta object and there are cases where you may want nested metadata. In my case I'm using the dynamic meta function to set http request metadata in a specific format to be consumed by a specific transport and can't express this with the current types.npm test.)npm run lint package-name(ortscif notslint.jsonis present).If changing an existing definition:
tslint.jsoncontaining{ "extends": "dtslint/dt.json" }.