index.d.ts 1011 B

12345678910111213141516171819202122232425262728293031323334353637
  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. constructor(opts?: TransportStream.TransportStreamOptions);
  14. public log?(info: any, next: () => void): any;
  15. public logv?(info: any, next: () => void): any;
  16. public close?(): void;
  17. }
  18. declare namespace TransportStream {
  19. interface TransportStreamOptions {
  20. format?: logform.Format;
  21. level?: string;
  22. silent?: boolean;
  23. handleExceptions?: boolean;
  24. log?(info: any, next: () => void): any;
  25. logv?(info: any, next: () => void): any;
  26. close?(): void;
  27. }
  28. }
  29. export = TransportStream;