-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: type hints say there's a logger.warning() but it does not exist #2280
Comments
This probably affects all the rest of the syslog levels, not just warning. |
Is this project still being maintained? Would you be willing to accept a PR removing incorrect types and push a new release? We just got bit by this in production, and it seems like a very urgent and easy fix. |
As the code changes in the fix PR have been reverted (for good reason), this is what I will be resorting to in my current project in order to avoid this issue, which is unfortunately unresolved: import winston from 'winston';
const logger = winston.createLogger() as Pick<
winston.Logger,
'error' | 'warn' | 'info' | 'http' | 'verbose' | 'debug' | 'silly'
>; Given the polymorphic nature of the |
🔎 Search Terms
warning
The problem
index.d.ts claims
Logger
has a warning function. Calling that function leads toTypeError: logger.warning is not a function at ...
.Please remove the wrong type hint, and potentially everything under
// for syslog levels only
?What version of Winston presents the issue?
v3.8.2
What version of Node are you using?
v18.12.1
If this worked in a previous version of Winston, which was it?
No response
Minimum Working Example
Additional information
No response
The text was updated successfully, but these errors were encountered: