index.d.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Type definitions for winston-transport 3.0
  2. // Project: https://github.com/winstonjs/winston-transport
  3. // Definitions by: DABH <https://github.com/DABH>
  4. // Definitions: https://github.com/winstonjs/winston-transport
  5. /// <reference types="node" />
  6. import * as stream from 'stream';
  7. import * as logform from 'logform';
  8. declare class TransportStream extends stream.Writable {
  9. public format?: logform.Format;
  10. public level?: string;
  11. public silent?: boolean;
  12. public handleExceptions?: boolean;
  13. public handleRejections?: boolean;
  14. constructor(opts?: TransportStream.TransportStreamOptions);
  15. public log?(info: any, next: () => void): any;
  16. public logv?(info: any, next: () => void): any;
  17. public close?(): void;
  18. }
  19. declare namespace TransportStream {
  20. interface TransportStreamOptions {
  21. format?: logform.Format;
  22. level?: string;
  23. silent?: boolean;
  24. handleExceptions?: boolean;
  25. handleRejections?: boolean;
  26. log?(info: any, next: () => void): any;
  27. logv?(info: any, next: () => void): any;
  28. close?(): void;
  29. }
  30. }
  31. export = TransportStream;