šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

@types/node-slack

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/node-slack

TypeScript definitions for node-slack

0.0.34
ts4.5
ts4.6
ts4.7
ts4.8
ts4.9
ts5.0
ts5.1
ts5.2
ts5.3
ts5.4
ts5.5
ts5.6
ts5.7
ts5.8
ts5.9
latest
Source
npm
Version published
Weekly downloads
789
9.89%
Maintainers
1
Weekly downloads
Ā 
Created
Source

Installation

npm install --save @types/node-slack

Summary

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

Details

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

index.d.ts

import request = require("request");

declare class Slack {
    constructor(hookUrl: string, option?: Slack.Option);
    send(message: Slack.Message): any; // TODO: Here comes deferred's promise as a return type
    send(message: Slack.Message, callback: Slack.SendCallback): request.Request;
    respond(query: Slack.Query): Slack.TextResponse;
    respond(query: Slack.Query, callback: Slack.ResponseCallback): Slack.TextResponse;
}

declare namespace Slack {
    interface Option {
        proxy: string;
    }

    interface Message {
        text: string;
        channel?: string | undefined;
        username?: string | undefined;
        icon_emoji?: string | undefined;
        attachments?: any[] | undefined;
        unfurl_links?: boolean | undefined;
        link_names?: number | undefined;
    }

    interface SendCallback {
        (err: any, body: any): any;
    }

    interface Query {
        token?: string | undefined;
        team_id?: string | undefined;
        channel_id?: string | undefined;
        channel_name?: string | undefined;
        timestamp?: number | undefined;
        user_id?: string | undefined;
        user_name?: string | undefined;
        text: string;
    }

    interface TextResponse {
        text: string;
    }

    interface ResponseCallback {
        (err: any, query: Query): any;
    }
}

export = Slack;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: @types/request

Credits

These definitions were written by Qubo.

FAQs

Package last updated on 07 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts