Skip to content
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]: forceConsole is missing from ConsoleTransportOptions type definition #2495

Closed
neilenns opened this issue Aug 8, 2024 · 0 comments · Fixed by #2496
Closed

[Bug]: forceConsole is missing from ConsoleTransportOptions type definition #2495

neilenns opened this issue Aug 8, 2024 · 0 comments · Fixed by #2496

Comments

@neilenns
Copy link
Contributor

neilenns commented Aug 8, 2024

🔎 Search Terms

forceConsole, consoleTransportOptions, typescript

The problem

#2276 added a new forceConsole option to the console transport but did not include the new property on the type definition for ConsoleTransportOptions. This means you get TypeScript errors when you try and create a new transport with the option.

What version of Winston presents the issue?

v3.14.1

What version of Node are you using?

v20.11.0

If this worked in a previous version of Winston, which was it?

No response

Minimum Working Example

const Logger = winston.createLogger({
  level: "debug",
  transports: [new winston.transports.Console({ forceConsole: true })],
});

Additional information

Needs to be added here:

interface ConsoleTransportOptions extends Transport.TransportStreamOptions {
. Will open a PR shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant