npm.io
0.0.8 • Published 2 years ago

@types/slack-winston

Licence
MIT
Version
0.0.8
Deps
0
Size
5 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/slack-winston

Summary

This package contains type definitions for slack-winston (https://github.com/niftylettuce/slack-winston).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/slack-winston.

index.d.ts

export interface SlackTransportOptions {
    domain: string;
    token: string;
    webhook_url: string;
    channel: string;

    username?: string | undefined;
    icon_emoji?: string | undefined;
    message?: string | undefined;
    queueDelay?: number | undefined;

    // from winston-transport TransportStreamOptions
    format?: Format | undefined;
    level?: string | undefined;
    silent?: boolean | undefined;
    handleExceptions?: boolean | undefined;

    log?(info: any, next: () => void): any;
    logv?(info: any, next: () => void): any;
    close?(): void;
}

export class Slack {
    constructor(options?: SlackTransportOptions);
    format?: Format | undefined;
    level?: string | undefined;
    silent?: boolean | undefined;
    handleExceptions?: boolean | undefined;

    log?(info: any, next: () => void): any;
    logv?(info: any, next: () => void): any;
    close?(): void;
}

export class Format {
    constructor(opts?: object);

    options?: object | undefined;
    transform: (info: TransformableInfo, opts?: any) => TransformableInfo | boolean;
}

export interface TransformableInfo {
    level: string;
    message: string;
    [key: string]: any;
}

Additional Details

  • Last updated: Fri, 06 Sep 2024 2054 GMT
  • Dependencies: none

Credits

These definitions were written by .