winstonjs / winston-daily-rotate-file

A transport for winston which logs to a rotating file each day.
MIT License
895 stars 155 forks source link

Remove unnecessary intersection type. #308

Closed nullromo closed 3 years ago

nullromo commented 3 years ago

Remove unnecessary intersection type from DailyRotateFileTransportOptions type definition. Since OptionsWithFilename and OptionsWithStream already both extend GeneralDailyRotateFileTransportOptions, they both contain all the member of GeneralDailyRotateFileTransportOptions, and there is no need to intersect them.

nullromo commented 3 years ago

Linking this SO question for reference: https://stackoverflow.com/questions/66466326/is-intersection-of-a-subtype-and-its-supertype-the-same-as-the-subtype