The type definition for transport options (TransportStreamOptions, used in FileTransportOptions, etc.) in the [email protected] package is missing the filter property.
Steps to Reproduce:
Install dependencies:
npm install winston winston-transport typescript
(Ensures [email protected] and [email protected]).
Use a Transport (like transports.File) and try to add the filter option:
import { createLogger, format, transports } from 'winston';
// ... other imports and logger configuration
new transports.File({
// ... other options
filter: (info) => info.level === 'info' // <-- Causes TypeScript error here
})
Expected Behavior:
No TypeScript errors. The filter property should be accepted in the Transport options.
Actual Behavior:
TypeScript compilation fails with an error similar to:
Object literal may only specify known properties, and 'filter' does not exist in type 'FileTransportOptions'.ts(2353)