# @types/node-slack

> TypeScript definitions for node-slack

Latest version **0.0.34** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/node-slack
pnpm add @types/node-slack
yarn add @types/node-slack
bun add @types/node-slack
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.34 |
| Published | 2023-11-07 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51446 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/node-slack
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-slack
- npm.io page: https://npm.io/package/@types/node-slack

## Dependencies (1)

- [@types/request](https://npm.io/package/@types/request.md) *

## Recent versions

- 0.0.34 (latest) — 2023-11-07
- 0.0.31 (ts3.6) — 2021-07-08
- 0.0.30 (ts2.3) — 2017-11-09
- 0.0.29 (ts2.0) — 2016-09-19
- 0.0.33 — 2023-10-18
- 0.0.32 — 2023-09-23
- 0.0.28 — 2016-07-14
- 0.0.27-alpha — 2016-07-08
- 0.0.26-alpha — 2016-07-04
- 0.0.25-alpha — 2016-07-02
- 0.0.24-alpha — 2016-07-01
- 0.0.23-alpha — 2016-07-01
- 0.0.22-alpha — 2016-05-25
- 0.0.21-alpha — 2016-05-20
- 0.0.16-alpha — 2016-05-19
- … 1 more at https://npm.io/package/@types/node-slack/versions

## README

# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-slack/index.d.ts)
````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](https://npmjs.com/package/@types/request)

# Credits
These definitions were written by [Qubo](https://github.com/tkQubo).

---
_Source: https://npm.io/package/@types/node-slack · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
